Skip to content

Commit 39c9a53

Browse files
committed
Auto-generate wrapper from updated spec
1 parent 942da32 commit 39c9a53

2 files changed

Lines changed: 77 additions & 6 deletions

File tree

docs/Model/Addon.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**addon_id** | **int** | | [optional]
8+
**resource_id** | **int** | | [optional]
89
**title** | **string** | | [optional]
910
**description** | **string** | | [optional]
1011
**type** | **string** | | [optional]
@@ -13,5 +14,6 @@ Name | Type | Description | Notes
1314
**default** | **bool** | | [optional]
1415
**list_price** | [**\OpenAPI\Client\Model\Price**](Price.md) | | [optional]
1516
**final_price** | [**\OpenAPI\Client\Model\Price**](Price.md) | | [optional]
17+
**resource** | [**\OpenAPI\Client\Model\Resource**](Resource.md) | | [optional]
1618

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

lib/Model/Addon.php

Lines changed: 75 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* Addon Class Doc Comment
3636
*
3737
* @category Class
38+
* @description Supported 'with' hints: - Resource: the resource this addon belongs to
3839
* @package OpenAPI\Client
3940
* @author OpenAPI Generator team
4041
* @link https://openapi-generator.tech
@@ -58,14 +59,16 @@ class Addon implements ModelInterface, ArrayAccess, \JsonSerializable
5859
*/
5960
protected static $openAPITypes = [
6061
'addon_id' => 'int',
62+
'resource_id' => 'int',
6163
'title' => 'string',
6264
'description' => 'string',
6365
'type' => 'string',
6466
'state' => 'string',
6567
'display_order' => 'int',
6668
'default' => 'bool',
6769
'list_price' => '\OpenAPI\Client\Model\Price',
68-
'final_price' => '\OpenAPI\Client\Model\Price'
70+
'final_price' => '\OpenAPI\Client\Model\Price',
71+
'resource' => '\OpenAPI\Client\Model\Resource'
6972
];
7073

7174
/**
@@ -77,14 +80,16 @@ class Addon implements ModelInterface, ArrayAccess, \JsonSerializable
7780
*/
7881
protected static $openAPIFormats = [
7982
'addon_id' => null,
83+
'resource_id' => null,
8084
'title' => null,
8185
'description' => null,
8286
'type' => null,
8387
'state' => null,
8488
'display_order' => null,
8589
'default' => null,
8690
'list_price' => null,
87-
'final_price' => null
91+
'final_price' => null,
92+
'resource' => null
8893
];
8994

9095
/**
@@ -94,14 +99,16 @@ class Addon implements ModelInterface, ArrayAccess, \JsonSerializable
9499
*/
95100
protected static array $openAPINullables = [
96101
'addon_id' => false,
102+
'resource_id' => false,
97103
'title' => false,
98104
'description' => false,
99105
'type' => false,
100106
'state' => false,
101107
'display_order' => false,
102108
'default' => false,
103109
'list_price' => false,
104-
'final_price' => false
110+
'final_price' => false,
111+
'resource' => false
105112
];
106113

107114
/**
@@ -191,14 +198,16 @@ public function isNullableSetToNull(string $property): bool
191198
*/
192199
protected static $attributeMap = [
193200
'addon_id' => 'addon_id',
201+
'resource_id' => 'resource_id',
194202
'title' => 'title',
195203
'description' => 'description',
196204
'type' => 'type',
197205
'state' => 'state',
198206
'display_order' => 'display_order',
199207
'default' => 'default',
200208
'list_price' => 'ListPrice',
201-
'final_price' => 'FinalPrice'
209+
'final_price' => 'FinalPrice',
210+
'resource' => 'Resource'
202211
];
203212

204213
/**
@@ -208,14 +217,16 @@ public function isNullableSetToNull(string $property): bool
208217
*/
209218
protected static $setters = [
210219
'addon_id' => 'setAddonId',
220+
'resource_id' => 'setResourceId',
211221
'title' => 'setTitle',
212222
'description' => 'setDescription',
213223
'type' => 'setType',
214224
'state' => 'setState',
215225
'display_order' => 'setDisplayOrder',
216226
'default' => 'setDefault',
217227
'list_price' => 'setListPrice',
218-
'final_price' => 'setFinalPrice'
228+
'final_price' => 'setFinalPrice',
229+
'resource' => 'setResource'
219230
];
220231

221232
/**
@@ -225,14 +236,16 @@ public function isNullableSetToNull(string $property): bool
225236
*/
226237
protected static $getters = [
227238
'addon_id' => 'getAddonId',
239+
'resource_id' => 'getResourceId',
228240
'title' => 'getTitle',
229241
'description' => 'getDescription',
230242
'type' => 'getType',
231243
'state' => 'getState',
232244
'display_order' => 'getDisplayOrder',
233245
'default' => 'getDefault',
234246
'list_price' => 'getListPrice',
235-
'final_price' => 'getFinalPrice'
247+
'final_price' => 'getFinalPrice',
248+
'resource' => 'getResource'
236249
];
237250

238251
/**
@@ -308,6 +321,7 @@ public function getStateAllowableValues()
308321
public function __construct(array $data = null)
309322
{
310323
$this->setIfExists('addon_id', $data ?? [], null);
324+
$this->setIfExists('resource_id', $data ?? [], null);
311325
$this->setIfExists('title', $data ?? [], null);
312326
$this->setIfExists('description', $data ?? [], null);
313327
$this->setIfExists('type', $data ?? [], null);
@@ -316,6 +330,7 @@ public function __construct(array $data = null)
316330
$this->setIfExists('default', $data ?? [], null);
317331
$this->setIfExists('list_price', $data ?? [], null);
318332
$this->setIfExists('final_price', $data ?? [], null);
333+
$this->setIfExists('resource', $data ?? [], null);
319334
}
320335

321336
/**
@@ -396,6 +411,33 @@ public function setAddonId($addon_id)
396411
return $this;
397412
}
398413

414+
/**
415+
* Gets resource_id
416+
*
417+
* @return int|null
418+
*/
419+
public function getResourceId()
420+
{
421+
return $this->container['resource_id'];
422+
}
423+
424+
/**
425+
* Sets resource_id
426+
*
427+
* @param int|null $resource_id resource_id
428+
*
429+
* @return self
430+
*/
431+
public function setResourceId($resource_id)
432+
{
433+
if (is_null($resource_id)) {
434+
throw new \InvalidArgumentException('non-nullable resource_id cannot be null');
435+
}
436+
$this->container['resource_id'] = $resource_id;
437+
438+
return $this;
439+
}
440+
399441
/**
400442
* Gets title
401443
*
@@ -621,6 +663,33 @@ public function setFinalPrice($final_price)
621663

622664
return $this;
623665
}
666+
667+
/**
668+
* Gets resource
669+
*
670+
* @return \OpenAPI\Client\Model\Resource|null
671+
*/
672+
public function getResource()
673+
{
674+
return $this->container['resource'];
675+
}
676+
677+
/**
678+
* Sets resource
679+
*
680+
* @param \OpenAPI\Client\Model\Resource|null $resource resource
681+
*
682+
* @return self
683+
*/
684+
public function setResource($resource)
685+
{
686+
if (is_null($resource)) {
687+
throw new \InvalidArgumentException('non-nullable resource cannot be null');
688+
}
689+
$this->container['resource'] = $resource;
690+
691+
return $this;
692+
}
624693
/**
625694
* Returns true if offset exists. False otherwise.
626695
*

0 commit comments

Comments
 (0)