-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change Namespace, Add Users Endpoint (#4)
- Loading branch information
1 parent
1b8485d
commit d5b183e
Showing
30 changed files
with
477 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use-sort: | ||
sort-type: alph | ||
sort-direction: asc | ||
|
||
header: | | ||
/** | ||
* Copyright 2016-2017, Snagshout <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* This file is part of the Merchant package | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright 2014-2017, SellerLabs <sellerlabs-devs@sellerlabs.com> | ||
* Copyright 2016-2017, Snagshout <developers@snagshout.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* This file is part of the Promote package | ||
* This file is part of the Merchant package | ||
*/ | ||
|
||
namespace SellerLabs\Promote; | ||
namespace Snagshout\Promote; | ||
|
||
use Closure; | ||
use DateTime; | ||
use GuzzleHttp\Client as HttpClient; | ||
use Http\Adapter\Guzzle6\Client as GuzzleAdapter; | ||
use GuzzleHttp\Handler\CurlHandler; | ||
use GuzzleHttp\HandlerStack; | ||
use GuzzleHttp\Psr7\Uri; | ||
use Http\Adapter\Guzzle6\Client as GuzzleAdapter; | ||
use Http\Message\MessageFactory\GuzzleMessageFactory; | ||
use Joli\Jane\OpenApi\Runtime\Client\Resource; | ||
use Joli\Jane\Runtime\Encoder\RawEncoder; | ||
use Psr\Http\Message\RequestInterface; | ||
use SellerLabs\Promote\Normalizer\NormalizerFactory; | ||
use SellerLabs\Promote\Resource\DealsResource; | ||
use SellerLabs\Promote\Resource\DefaultResource; | ||
use SellerLabs\Promote\Resource\FrontResource; | ||
use Snagshout\Promote\Normalizer\NormalizerFactory; | ||
use Snagshout\Promote\Resource\DealsResource; | ||
use Snagshout\Promote\Resource\FrontResource; | ||
use Snagshout\Promote\Resource\UsersResource; | ||
use Symfony\Component\Serializer\Encoder\JsonDecode; | ||
use Symfony\Component\Serializer\Encoder\JsonEncode; | ||
use Symfony\Component\Serializer\Encoder\JsonEncoder; | ||
use Symfony\Component\Serializer\Serializer; | ||
|
||
/** | ||
* Class Client | ||
* Class Client. | ||
* | ||
* @package SellerLabs\Promote | ||
* @package Snagshout\Promote | ||
* | ||
* @author Eduardo Trujillo <[email protected]> | ||
*/ | ||
|
@@ -187,6 +187,14 @@ protected function buildResource($resourceClass) | |
); | ||
} | ||
|
||
/** | ||
* @return DealsResource|Resource | ||
*/ | ||
public function deals() | ||
{ | ||
return $this->buildResource(DealsResource::class); | ||
} | ||
|
||
/** | ||
* @return FrontResource|Resource | ||
*/ | ||
|
@@ -196,10 +204,10 @@ public function front() | |
} | ||
|
||
/** | ||
* @return DealsResource|Resource | ||
* @return UsersResource|Resource | ||
*/ | ||
public function deals() | ||
public function users() | ||
{ | ||
return $this->buildResource(DealsResource::class); | ||
return $this->buildResource(UsersResource::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
<?php | ||
|
||
namespace SellerLabs\Promote\Model; | ||
/** | ||
* Copyright 2016-2017, Snagshout <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* This file is part of the Merchant package | ||
*/ | ||
|
||
namespace Snagshout\Promote\Model; | ||
|
||
class Category | ||
{ | ||
|
@@ -27,6 +36,7 @@ public function getId() | |
public function setId($id = null) | ||
{ | ||
$this->id = $id; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -44,6 +54,7 @@ public function getName() | |
public function setName($name = null) | ||
{ | ||
$this->name = $name; | ||
|
||
return $this; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
<?php | ||
|
||
namespace SellerLabs\Promote\Model; | ||
/** | ||
* Copyright 2016-2017, Snagshout <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* This file is part of the Merchant package | ||
*/ | ||
|
||
namespace Snagshout\Promote\Model; | ||
|
||
class Deal | ||
{ | ||
|
@@ -115,6 +124,7 @@ public function getCampaignId() | |
public function setCampaignId($campaignId = null) | ||
{ | ||
$this->campaignId = $campaignId; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -132,6 +142,7 @@ public function getProductName() | |
public function setProductName($productName = null) | ||
{ | ||
$this->productName = $productName; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -149,6 +160,7 @@ public function getProductDescription() | |
public function setProductDescription($productDescription = null) | ||
{ | ||
$this->productDescription = $productDescription; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -166,6 +178,7 @@ public function getCategories() | |
public function setCategories(array $categories = null) | ||
{ | ||
$this->categories = $categories; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -183,6 +196,7 @@ public function getMedia() | |
public function setMedia(array $media = null) | ||
{ | ||
$this->media = $media; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -200,6 +214,7 @@ public function getListingUrl() | |
public function setListingUrl($listingUrl = null) | ||
{ | ||
$this->listingUrl = $listingUrl; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -217,6 +232,7 @@ public function getListingMetadata() | |
public function setListingMetadata($listingMetadata = null) | ||
{ | ||
$this->listingMetadata = $listingMetadata; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -234,6 +250,7 @@ public function getCurrency() | |
public function setCurrency($currency = null) | ||
{ | ||
$this->currency = $currency; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -251,6 +268,7 @@ public function getListingPrice() | |
public function setListingPrice($listingPrice = null) | ||
{ | ||
$this->listingPrice = $listingPrice; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -268,6 +286,7 @@ public function getDiscountPrice() | |
public function setDiscountPrice($discountPrice = null) | ||
{ | ||
$this->discountPrice = $discountPrice; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -285,6 +304,7 @@ public function getShippingPrice() | |
public function setShippingPrice($shippingPrice = null) | ||
{ | ||
$this->shippingPrice = $shippingPrice; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -302,6 +322,7 @@ public function getShippingDaysMin() | |
public function setShippingDaysMin($shippingDaysMin = null) | ||
{ | ||
$this->shippingDaysMin = $shippingDaysMin; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -319,6 +340,7 @@ public function getShippingDaysMax() | |
public function setShippingDaysMax($shippingDaysMax = null) | ||
{ | ||
$this->shippingDaysMax = $shippingDaysMax; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -336,6 +358,7 @@ public function getShippingType() | |
public function setShippingType($shippingType = null) | ||
{ | ||
$this->shippingType = $shippingType; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -353,6 +376,7 @@ public function getMarketplace() | |
public function setMarketplace($marketplace = null) | ||
{ | ||
$this->marketplace = $marketplace; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -370,6 +394,7 @@ public function getPayloadType() | |
public function setPayloadType($payloadType = null) | ||
{ | ||
$this->payloadType = $payloadType; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -387,6 +412,7 @@ public function getRequireEmail() | |
public function setRequireEmail($requireEmail = null) | ||
{ | ||
$this->requireEmail = $requireEmail; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -404,6 +430,7 @@ public function getStartsAt() | |
public function setStartsAt($startsAt = null) | ||
{ | ||
$this->startsAt = $startsAt; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -421,6 +448,7 @@ public function getReturnAt() | |
public function setReturnAt($returnAt = null) | ||
{ | ||
$this->returnAt = $returnAt; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -438,6 +466,7 @@ public function getUpdatedAt() | |
public function setUpdatedAt($updatedAt = null) | ||
{ | ||
$this->updatedAt = $updatedAt; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -455,6 +484,7 @@ public function getEndsAt() | |
public function setEndsAt($endsAt = null) | ||
{ | ||
$this->endsAt = $endsAt; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -472,6 +502,7 @@ public function getAvailable() | |
public function setAvailable($available = null) | ||
{ | ||
$this->available = $available; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -489,6 +520,7 @@ public function getRemainingQuantity() | |
public function setRemainingQuantity($remainingQuantity = null) | ||
{ | ||
$this->remainingQuantity = $remainingQuantity; | ||
|
||
return $this; | ||
} | ||
/** | ||
|
@@ -506,6 +538,7 @@ public function getDailyLimitReached() | |
public function setDailyLimitReached($dailyLimitReached = null) | ||
{ | ||
$this->dailyLimitReached = $dailyLimitReached; | ||
|
||
return $this; | ||
} | ||
} | ||
} |
Oops, something went wrong.