Skip to content
This repository was archived by the owner on Jun 13, 2021. It is now read-only.

Commit 0928850

Browse files
author
David T. Sadler
committed
Merge branch 'release-13.1.0'
2 parents 00785e2 + 3a4c07e commit 0928850

File tree

9 files changed

+292
-1
lines changed

9 files changed

+292
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## 13.1.0 - 2017-09-24
4+
5+
###
6+
7+
* Added withdrawOffer to Inventory service.
8+
39
## 13.0.3 - 2017-09-07
410

511
## Fixes

src/Inventory/Services/InventoryService.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,17 @@ class InventoryService extends \DTS\eBaySDK\Inventory\Services\InventoryBaseServ
260260
]
261261
]
262262
],
263+
'WithdrawOffer' => [
264+
'method' => 'POST',
265+
'resource' => 'offer/{offerId}/withdraw',
266+
'responseClass' => '\DTS\eBaySDK\Inventory\Types\WithdrawOfferRestResponse',
267+
'params' => [
268+
'offerId' => [
269+
'valid' => ['string'],
270+
'required' => true
271+
]
272+
]
273+
],
263274
'UpdateOffer' => [
264275
'method' => 'PUT',
265276
'resource' => 'offer/{offerId}',
@@ -710,6 +721,24 @@ public function publishOfferAsync(\DTS\eBaySDK\Inventory\Types\PublishOfferRestR
710721
return $this->callOperationAsync('PublishOffer', $request);
711722
}
712723

724+
/**
725+
* @param \DTS\eBaySDK\Inventory\Types\WithdrawOfferRestRequest $request
726+
* @return \DTS\eBaySDK\Inventory\Types\WithdrawOfferRestResponse
727+
*/
728+
public function withdrawOffer(\DTS\eBaySDK\Inventory\Types\WithdrawOfferRestRequest $request)
729+
{
730+
return $this->withdrawOfferAsync($request)->wait();
731+
}
732+
733+
/**
734+
* @param \DTS\eBaySDK\Inventory\Types\WithdrawOfferRestRequest $request
735+
* @return \GuzzleHttp\Promise\PromiseInterface
736+
*/
737+
public function withdrawOfferAsync(\DTS\eBaySDK\Inventory\Types\WithdrawOfferRestRequest $request)
738+
{
739+
return $this->callOperationAsync('WithdrawOffer', $request);
740+
}
741+
713742
/**
714743
* @param \DTS\eBaySDK\Inventory\Types\UpdateOfferRestRequest $request
715744
* @return \DTS\eBaySDK\Inventory\Types\UpdateOfferRestResponse
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/**
3+
* DO NOT EDIT THIS FILE!
4+
*
5+
* This file was automatically generated from external sources.
6+
*
7+
* Any manual change here will be lost the next time the SDK
8+
* is updated. You've been warned!
9+
*/
10+
11+
namespace DTS\eBaySDK\Inventory\Types;
12+
13+
/**
14+
*
15+
* @property string $offerId
16+
*/
17+
class WithdrawOfferRestRequest extends \DTS\eBaySDK\Types\BaseType
18+
{
19+
/**
20+
* @var array Properties belonging to objects of this class.
21+
*/
22+
private static $propertyTypes = [
23+
'offerId' => [
24+
'type' => 'string',
25+
'repeatable' => false,
26+
'attribute' => false,
27+
'elementName' => 'offerId'
28+
]
29+
];
30+
31+
/**
32+
* @param array $values Optional properties and values to assign to the object.
33+
*/
34+
public function __construct(array $values = [])
35+
{
36+
list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values);
37+
38+
parent::__construct($parentValues);
39+
40+
if (!array_key_exists(__CLASS__, self::$properties)) {
41+
self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes);
42+
}
43+
44+
$this->setValues(__CLASS__, $childValues);
45+
}
46+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
/**
3+
* DO NOT EDIT THIS FILE!
4+
*
5+
* This file was automatically generated from external sources.
6+
*
7+
* Any manual change here will be lost the next time the SDK
8+
* is updated. You've been warned!
9+
*/
10+
11+
namespace DTS\eBaySDK\Inventory\Types;
12+
13+
use DTS\eBaySDK\StatusCodeTrait;
14+
use DTS\eBaySDK\HttpHeadersTrait;
15+
16+
/**
17+
*
18+
* @property \DTS\eBaySDK\Inventory\Types\ErrorDetailV3[] $errors
19+
* @property \DTS\eBaySDK\Inventory\Types\ErrorDetailV3[] $warnings
20+
*/
21+
class WithdrawOfferRestResponse extends \DTS\eBaySDK\Inventory\Types\WithdrawResponse
22+
{
23+
use StatusCodeTrait;
24+
use HttpHeadersTrait;
25+
26+
/**
27+
* @var array Properties belonging to objects of this class.
28+
*/
29+
private static $propertyTypes = [
30+
'errors' => [
31+
'type' => 'DTS\eBaySDK\Inventory\Types\ErrorDetailV3',
32+
'repeatable' => true,
33+
'attribute' => false,
34+
'elementName' => 'errors'
35+
],
36+
'warnings' => [
37+
'type' => 'DTS\eBaySDK\Inventory\Types\ErrorDetailV3',
38+
'repeatable' => true,
39+
'attribute' => false,
40+
'elementName' => 'warnings'
41+
]
42+
];
43+
44+
/**
45+
* @param array $values Optional properties and values to assign to the object.
46+
* @param int $statusCode Status code
47+
* @param array $headers HTTP Response headers.
48+
*/
49+
public function __construct(array $values = [], $statusCode = 200, array $headers = [])
50+
{
51+
list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values);
52+
53+
parent::__construct($parentValues);
54+
55+
if (!array_key_exists(__CLASS__, self::$properties)) {
56+
self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes);
57+
}
58+
59+
$this->setValues(__CLASS__, $childValues);
60+
61+
$this->statusCode = (int)$statusCode;
62+
63+
$this->setHeaders($headers);
64+
}
65+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/**
3+
* DO NOT EDIT THIS FILE!
4+
*
5+
* This file was automatically generated from external sources.
6+
*
7+
* Any manual change here will be lost the next time the SDK
8+
* is updated. You've been warned!
9+
*/
10+
11+
namespace DTS\eBaySDK\Inventory\Types;
12+
13+
/**
14+
*
15+
* @property string $listingId
16+
*/
17+
class WithdrawResponse extends \DTS\eBaySDK\Types\BaseType
18+
{
19+
/**
20+
* @var array Properties belonging to objects of this class.
21+
*/
22+
private static $propertyTypes = [
23+
'listingId' => [
24+
'type' => 'string',
25+
'repeatable' => false,
26+
'attribute' => false,
27+
'elementName' => 'listingId'
28+
]
29+
];
30+
31+
/**
32+
* @param array $values Optional properties and values to assign to the object.
33+
*/
34+
public function __construct(array $values = [])
35+
{
36+
list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values);
37+
38+
parent::__construct($parentValues);
39+
40+
if (!array_key_exists(__CLASS__, self::$properties)) {
41+
self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes);
42+
}
43+
44+
$this->setValues(__CLASS__, $childValues);
45+
}
46+
}

src/Sdk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*/
3131
class Sdk
3232
{
33-
const VERSION = '13.0.3';
33+
const VERSION = '13.1.0';
3434

3535
/**
3636
* @var bool Controls if the SDK should enforce strict types
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/**
3+
* DO NOT EDIT THIS FILE!
4+
*
5+
* This file was automatically generated from external sources.
6+
*
7+
* Any manual change here will be lost the next time the SDK
8+
* is updated. You've been warned!
9+
*/
10+
11+
namespace DTS\eBaySDK\Test\Inventory\Types;
12+
13+
use DTS\eBaySDK\Inventory\Types\WithdrawOfferRestRequest;
14+
15+
class WithdrawOfferRestRequestTest extends \PHPUnit_Framework_TestCase
16+
{
17+
private $obj;
18+
19+
protected function setUp()
20+
{
21+
$this->obj = new WithdrawOfferRestRequest();
22+
}
23+
24+
public function testCanBeCreated()
25+
{
26+
$this->assertInstanceOf('\DTS\eBaySDK\Inventory\Types\WithdrawOfferRestRequest', $this->obj);
27+
}
28+
29+
public function testExtendsBaseType()
30+
{
31+
$this->assertInstanceOf('\DTS\eBaySDK\Types\BaseType', $this->obj);
32+
}
33+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/**
3+
* DO NOT EDIT THIS FILE!
4+
*
5+
* This file was automatically generated from external sources.
6+
*
7+
* Any manual change here will be lost the next time the SDK
8+
* is updated. You've been warned!
9+
*/
10+
11+
namespace DTS\eBaySDK\Test\Inventory\Types;
12+
13+
use DTS\eBaySDK\Inventory\Types\WithdrawOfferRestResponse;
14+
15+
class WithdrawOfferRestResponseTest extends \PHPUnit_Framework_TestCase
16+
{
17+
private $obj;
18+
19+
protected function setUp()
20+
{
21+
$this->obj = new WithdrawOfferRestResponse();
22+
}
23+
24+
public function testCanBeCreated()
25+
{
26+
$this->assertInstanceOf('\DTS\eBaySDK\Inventory\Types\WithdrawOfferRestResponse', $this->obj);
27+
}
28+
29+
public function testExtendsWithdrawResponse()
30+
{
31+
$this->assertInstanceOf('\DTS\eBaySDK\Inventory\Types\WithdrawResponse', $this->obj);
32+
}
33+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/**
3+
* DO NOT EDIT THIS FILE!
4+
*
5+
* This file was automatically generated from external sources.
6+
*
7+
* Any manual change here will be lost the next time the SDK
8+
* is updated. You've been warned!
9+
*/
10+
11+
namespace DTS\eBaySDK\Test\Inventory\Types;
12+
13+
use DTS\eBaySDK\Inventory\Types\WithdrawResponse;
14+
15+
class WithdrawResponseTest extends \PHPUnit_Framework_TestCase
16+
{
17+
private $obj;
18+
19+
protected function setUp()
20+
{
21+
$this->obj = new WithdrawResponse();
22+
}
23+
24+
public function testCanBeCreated()
25+
{
26+
$this->assertInstanceOf('\DTS\eBaySDK\Inventory\Types\WithdrawResponse', $this->obj);
27+
}
28+
29+
public function testExtendsBaseType()
30+
{
31+
$this->assertInstanceOf('\DTS\eBaySDK\Types\BaseType', $this->obj);
32+
}
33+
}

0 commit comments

Comments
 (0)