Skip to content

Commit 1d01d1e

Browse files
committed
Update php SDK [skip ci]
1 parent a2ee0c0 commit 1d01d1e

File tree

7 files changed

+94
-6
lines changed

7 files changed

+94
-6
lines changed

docs/Model/Product.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Name | Type | Description | Notes
3434
**weight_unit** | **string** | | [optional]
3535
**sort_order** | **int** | | [optional]
3636
**in_stock** | **bool** | | [optional]
37+
**on_sale** | **bool** | | [optional]
3738
**backorders** | **string** | | [optional]
3839
**manage_stock** | **string** | | [optional]
3940
**is_stock_managed** | **bool** | | [optional]

docs/Model/ProductUpdate.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,6 @@ Name | Type | Description | Notes
8383
**downloadable** | **bool** | Defines whether the product is downloadable | [optional] [default to false]
8484
**materials** | **string[]** | A list of material strings for materials used in the product. | [optional]
8585
**auto_renew** | **bool** | When true, automatically renews a listing upon its expiration. | [optional] [default to false]
86+
**on_sale** | **bool** | Set whether the product on sale | [optional] [default to false]
8687

8788
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

lib/Model/Product.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class Product implements ModelInterface, ArrayAccess, \JsonSerializable
8888
'weight_unit' => 'string',
8989
'sort_order' => 'int',
9090
'in_stock' => 'bool',
91+
'on_sale' => 'bool',
9192
'backorders' => 'string',
9293
'manage_stock' => 'string',
9394
'is_stock_managed' => 'bool',
@@ -154,6 +155,7 @@ class Product implements ModelInterface, ArrayAccess, \JsonSerializable
154155
'weight_unit' => null,
155156
'sort_order' => null,
156157
'in_stock' => null,
158+
'on_sale' => null,
157159
'backorders' => null,
158160
'manage_stock' => null,
159161
'is_stock_managed' => null,
@@ -218,6 +220,7 @@ class Product implements ModelInterface, ArrayAccess, \JsonSerializable
218220
'weight_unit' => false,
219221
'sort_order' => false,
220222
'in_stock' => false,
223+
'on_sale' => false,
221224
'backorders' => false,
222225
'manage_stock' => false,
223226
'is_stock_managed' => false,
@@ -362,6 +365,7 @@ public function isNullableSetToNull(string $property): bool
362365
'weight_unit' => 'weight_unit',
363366
'sort_order' => 'sort_order',
364367
'in_stock' => 'in_stock',
368+
'on_sale' => 'on_sale',
365369
'backorders' => 'backorders',
366370
'manage_stock' => 'manage_stock',
367371
'is_stock_managed' => 'is_stock_managed',
@@ -426,6 +430,7 @@ public function isNullableSetToNull(string $property): bool
426430
'weight_unit' => 'setWeightUnit',
427431
'sort_order' => 'setSortOrder',
428432
'in_stock' => 'setInStock',
433+
'on_sale' => 'setOnSale',
429434
'backorders' => 'setBackorders',
430435
'manage_stock' => 'setManageStock',
431436
'is_stock_managed' => 'setIsStockManaged',
@@ -490,6 +495,7 @@ public function isNullableSetToNull(string $property): bool
490495
'weight_unit' => 'getWeightUnit',
491496
'sort_order' => 'getSortOrder',
492497
'in_stock' => 'getInStock',
498+
'on_sale' => 'getOnSale',
493499
'backorders' => 'getBackorders',
494500
'manage_stock' => 'getManageStock',
495501
'is_stock_managed' => 'getIsStockManaged',
@@ -605,6 +611,7 @@ public function __construct(?array $data = null)
605611
$this->setIfExists('weight_unit', $data ?? [], null);
606612
$this->setIfExists('sort_order', $data ?? [], null);
607613
$this->setIfExists('in_stock', $data ?? [], null);
614+
$this->setIfExists('on_sale', $data ?? [], null);
608615
$this->setIfExists('backorders', $data ?? [], null);
609616
$this->setIfExists('manage_stock', $data ?? [], null);
610617
$this->setIfExists('is_stock_managed', $data ?? [], null);
@@ -1485,6 +1492,33 @@ public function setInStock($in_stock)
14851492
return $this;
14861493
}
14871494

1495+
/**
1496+
* Gets on_sale
1497+
*
1498+
* @return bool|null
1499+
*/
1500+
public function getOnSale()
1501+
{
1502+
return $this->container['on_sale'];
1503+
}
1504+
1505+
/**
1506+
* Sets on_sale
1507+
*
1508+
* @param bool|null $on_sale on_sale
1509+
*
1510+
* @return self
1511+
*/
1512+
public function setOnSale($on_sale)
1513+
{
1514+
if (is_null($on_sale)) {
1515+
throw new \InvalidArgumentException('non-nullable on_sale cannot be null');
1516+
}
1517+
$this->container['on_sale'] = $on_sale;
1518+
1519+
return $this;
1520+
}
1521+
14881522
/**
14891523
* Gets backorders
14901524
*

lib/Model/ProductUpdate.php

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ class ProductUpdate implements ModelInterface, ArrayAccess, \JsonSerializable
136136
'is_supply' => 'bool',
137137
'downloadable' => 'bool',
138138
'materials' => 'string[]',
139-
'auto_renew' => 'bool'
139+
'auto_renew' => 'bool',
140+
'on_sale' => 'bool'
140141
];
141142

142143
/**
@@ -225,7 +226,8 @@ class ProductUpdate implements ModelInterface, ArrayAccess, \JsonSerializable
225226
'is_supply' => null,
226227
'downloadable' => null,
227228
'materials' => null,
228-
'auto_renew' => null
229+
'auto_renew' => null,
230+
'on_sale' => null
229231
];
230232

231233
/**
@@ -312,7 +314,8 @@ class ProductUpdate implements ModelInterface, ArrayAccess, \JsonSerializable
312314
'is_supply' => false,
313315
'downloadable' => false,
314316
'materials' => false,
315-
'auto_renew' => false
317+
'auto_renew' => false,
318+
'on_sale' => false
316319
];
317320

318321
/**
@@ -479,7 +482,8 @@ public function isNullableSetToNull(string $property): bool
479482
'is_supply' => 'is_supply',
480483
'downloadable' => 'downloadable',
481484
'materials' => 'materials',
482-
'auto_renew' => 'auto_renew'
485+
'auto_renew' => 'auto_renew',
486+
'on_sale' => 'on_sale'
483487
];
484488

485489
/**
@@ -566,7 +570,8 @@ public function isNullableSetToNull(string $property): bool
566570
'is_supply' => 'setIsSupply',
567571
'downloadable' => 'setDownloadable',
568572
'materials' => 'setMaterials',
569-
'auto_renew' => 'setAutoRenew'
573+
'auto_renew' => 'setAutoRenew',
574+
'on_sale' => 'setOnSale'
570575
];
571576

572577
/**
@@ -653,7 +658,8 @@ public function isNullableSetToNull(string $property): bool
653658
'is_supply' => 'getIsSupply',
654659
'downloadable' => 'getDownloadable',
655660
'materials' => 'getMaterials',
656-
'auto_renew' => 'getAutoRenew'
661+
'auto_renew' => 'getAutoRenew',
662+
'on_sale' => 'getOnSale'
657663
];
658664

659665
/**
@@ -792,6 +798,7 @@ public function __construct(?array $data = null)
792798
$this->setIfExists('downloadable', $data ?? [], false);
793799
$this->setIfExists('materials', $data ?? [], null);
794800
$this->setIfExists('auto_renew', $data ?? [], false);
801+
$this->setIfExists('on_sale', $data ?? [], false);
795802
}
796803

797804
/**
@@ -2968,6 +2975,33 @@ public function setAutoRenew($auto_renew)
29682975

29692976
return $this;
29702977
}
2978+
2979+
/**
2980+
* Gets on_sale
2981+
*
2982+
* @return bool|null
2983+
*/
2984+
public function getOnSale()
2985+
{
2986+
return $this->container['on_sale'];
2987+
}
2988+
2989+
/**
2990+
* Sets on_sale
2991+
*
2992+
* @param bool|null $on_sale Set whether the product on sale
2993+
*
2994+
* @return self
2995+
*/
2996+
public function setOnSale($on_sale)
2997+
{
2998+
if (is_null($on_sale)) {
2999+
throw new \InvalidArgumentException('non-nullable on_sale cannot be null');
3000+
}
3001+
$this->container['on_sale'] = $on_sale;
3002+
3003+
return $this;
3004+
}
29713005
/**
29723006
* Returns true if offset exists. False otherwise.
29733007
*

php.tgz

422 Bytes
Binary file not shown.

test/Model/ProductTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,15 @@ public function testPropertyInStock()
350350
self::markTestIncomplete('Not implemented');
351351
}
352352

353+
/**
354+
* Test attribute "on_sale"
355+
*/
356+
public function testPropertyOnSale()
357+
{
358+
// TODO: implement
359+
self::markTestIncomplete('Not implemented');
360+
}
361+
353362
/**
354363
* Test attribute "backorders"
355364
*/

test/Model/ProductUpdateTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,4 +790,13 @@ public function testPropertyAutoRenew()
790790
// TODO: implement
791791
self::markTestIncomplete('Not implemented');
792792
}
793+
794+
/**
795+
* Test attribute "on_sale"
796+
*/
797+
public function testPropertyOnSale()
798+
{
799+
// TODO: implement
800+
self::markTestIncomplete('Not implemented');
801+
}
793802
}

0 commit comments

Comments
 (0)