-
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.
- Loading branch information
1 parent
29ea60b
commit 157c37c
Showing
14 changed files
with
472 additions
and
0 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
55 changes: 55 additions & 0 deletions
55
php/src/Snagshout/Promote/Endpoint/CompleteFacebookOrder.php
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,55 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright 2016-2018, 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\Endpoint; | ||
|
||
class CompleteFacebookOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7HttplugEndpoint | ||
{ | ||
/** | ||
* | ||
* | ||
* @param \Snagshout\Promote\Model\CompleteFacebookOrderRequestBody $body | ||
*/ | ||
public function __construct(\Snagshout\Promote\Model\CompleteFacebookOrderRequestBody $body) | ||
{ | ||
$this->body = $body; | ||
} | ||
|
||
use \Jane\OpenApiRuntime\Client\Psr7HttplugEndpointTrait; | ||
|
||
public function getMethod() : string | ||
{ | ||
return 'PATCH'; | ||
} | ||
public function getUri() : string | ||
{ | ||
return '/facebook/order'; | ||
} | ||
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null) : array | ||
{ | ||
return $this->getSerializedBody($serializer); | ||
} | ||
public function getExtraHeaders() : array | ||
{ | ||
return ['Accept' => ['application/json']]; | ||
} | ||
/** | ||
* {@inheritdoc} | ||
* | ||
* | ||
*/ | ||
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer) | ||
{ | ||
if (204 === $status) { | ||
return null; | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
php/src/Snagshout/Promote/Endpoint/CreateFacebookOrder.php
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,55 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright 2016-2018, 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\Endpoint; | ||
|
||
class CreateFacebookOrder extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7HttplugEndpoint | ||
{ | ||
/** | ||
* | ||
* | ||
* @param \Snagshout\Promote\Model\CreateFacebookOrderRequestBody $body | ||
*/ | ||
public function __construct(\Snagshout\Promote\Model\CreateFacebookOrderRequestBody $body) | ||
{ | ||
$this->body = $body; | ||
} | ||
|
||
use \Jane\OpenApiRuntime\Client\Psr7HttplugEndpointTrait; | ||
|
||
public function getMethod() : string | ||
{ | ||
return 'POST'; | ||
} | ||
public function getUri() : string | ||
{ | ||
return '/facebook/order'; | ||
} | ||
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null) : array | ||
{ | ||
return $this->getSerializedBody($serializer); | ||
} | ||
public function getExtraHeaders() : array | ||
{ | ||
return ['Accept' => ['application/json']]; | ||
} | ||
/** | ||
* {@inheritdoc} | ||
* | ||
* | ||
*/ | ||
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer) | ||
{ | ||
if (204 === $status) { | ||
return null; | ||
} | ||
} | ||
} |
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
72 changes: 72 additions & 0 deletions
72
php/src/Snagshout/Promote/Model/CompleteFacebookOrderRequestBody.php
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,72 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright 2016-2018, 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 CompleteFacebookOrderRequestBody | ||
{ | ||
/** | ||
* The Facebook shopper's email address. | ||
* | ||
* @var string | ||
*/ | ||
protected $email; | ||
/** | ||
* The unique Facebook user ID. | ||
* | ||
* @var string | ||
*/ | ||
protected $fbUserId; | ||
/** | ||
* The Facebook shopper's email address. | ||
* | ||
* @return string | ||
*/ | ||
public function getEmail() : ? string | ||
{ | ||
return $this->email; | ||
} | ||
/** | ||
* The Facebook shopper's email address. | ||
* | ||
* @param string $email | ||
* | ||
* @return self | ||
*/ | ||
public function setEmail(? string $email) : self | ||
{ | ||
$this->email = $email; | ||
|
||
return $this; | ||
} | ||
/** | ||
* The unique Facebook user ID. | ||
* | ||
* @return string | ||
*/ | ||
public function getFbUserId() : ? string | ||
{ | ||
return $this->fbUserId; | ||
} | ||
/** | ||
* The unique Facebook user ID. | ||
* | ||
* @param string $fbUserId | ||
* | ||
* @return self | ||
*/ | ||
public function setFbUserId(? string $fbUserId) : self | ||
{ | ||
$this->fbUserId = $fbUserId; | ||
|
||
return $this; | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
php/src/Snagshout/Promote/Model/CreateFacebookOrderRequestBody.php
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,72 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright 2016-2018, 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 CreateFacebookOrderRequestBody | ||
{ | ||
/** | ||
* The Facebook Ad ID. | ||
* | ||
* @var string | ||
*/ | ||
protected $adId; | ||
/** | ||
* The Facebook unique user ID. | ||
* | ||
* @var string | ||
*/ | ||
protected $userId; | ||
/** | ||
* The Facebook Ad ID. | ||
* | ||
* @return string | ||
*/ | ||
public function getAdId() : ? string | ||
{ | ||
return $this->adId; | ||
} | ||
/** | ||
* The Facebook Ad ID. | ||
* | ||
* @param string $adId | ||
* | ||
* @return self | ||
*/ | ||
public function setAdId(? string $adId) : self | ||
{ | ||
$this->adId = $adId; | ||
|
||
return $this; | ||
} | ||
/** | ||
* The Facebook unique user ID. | ||
* | ||
* @return string | ||
*/ | ||
public function getUserId() : ? string | ||
{ | ||
return $this->userId; | ||
} | ||
/** | ||
* The Facebook unique user ID. | ||
* | ||
* @param string $userId | ||
* | ||
* @return self | ||
*/ | ||
public function setUserId(? string $userId) : self | ||
{ | ||
$this->userId = $userId; | ||
|
||
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
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
Oops, something went wrong.