diff --git a/README.md b/README.md index 58b09fd..fa020a4 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A PHP client library for the PAY.JP v2 API. This SDK provides a convenient way t This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `2.0.0` -- Package version: `1.0.6` +- Package version: `1.0.7` - Generator version: `7.14.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` @@ -307,6 +307,6 @@ vendor/bin/phpunit This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `2.0.0` -- Package version: `1.0.6` +- Package version: `1.0.7` - Generator version: `7.14.0` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/docs/Api/PaymentMethodsApi.md b/docs/Api/PaymentMethodsApi.md index a0c5b90..d0af24c 100644 --- a/docs/Api/PaymentMethodsApi.md +++ b/docs/Api/PaymentMethodsApi.md @@ -86,6 +86,8 @@ createPaymentMethod($paymentMethodCreateRequest): \PAYJPV2\Model\PaymentMethodRe Create Payment Method +**このエンドポイントはテストモードでのみ使用できます。** + ### Example ```php diff --git a/docs/Api/TaxRatesApi.md b/docs/Api/TaxRatesApi.md index 7be6743..776055e 100644 --- a/docs/Api/TaxRatesApi.md +++ b/docs/Api/TaxRatesApi.md @@ -76,7 +76,7 @@ try { ## `getAllTaxRates()` ```php -getAllTaxRates($limit, $startingAfter, $endingBefore): \PAYJPV2\Model\TaxRateListResponse +getAllTaxRates($limit, $startingAfter, $endingBefore, $active, $inclusive): \PAYJPV2\Model\TaxRateListResponse ``` Get All Tax Rates @@ -106,9 +106,11 @@ $apiInstance = new PAYJPV2\Api\TaxRatesApi( $limit = 10; // int | 取得するデータの最大件数 $startingAfter = 'startingAfter_example'; // string | このIDより後のデータを取得 $endingBefore = 'endingBefore_example'; // string | このIDより前のデータを取得 +$active = True; // bool | この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 +$inclusive = True; // bool | 税込みかどうか。税込 = `true` 税抜 = `false` try { - $result = $apiInstance->getAllTaxRates($limit, $startingAfter, $endingBefore); + $result = $apiInstance->getAllTaxRates($limit, $startingAfter, $endingBefore, $active, $inclusive); print_r($result); } catch (Exception $e) { echo 'Exception when calling TaxRatesApi->getAllTaxRates: ', $e->getMessage(), PHP_EOL; @@ -122,6 +124,8 @@ try { | **limit** | **int**| 取得するデータの最大件数 | [optional] [default to 10] | | **startingAfter** | **string**| このIDより後のデータを取得 | [optional] | | **endingBefore** | **string**| このIDより前のデータを取得 | [optional] | +| **active** | **bool**| この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 | [optional] | +| **inclusive** | **bool**| 税込みかどうか。税込 = `true` 税抜 = `false` | [optional] | ### Return type diff --git a/docs/Model/ProductDetailsResponse.md b/docs/Model/ProductDetailsResponse.md index f268aa5..8904aad 100644 --- a/docs/Model/ProductDetailsResponse.md +++ b/docs/Model/ProductDetailsResponse.md @@ -6,11 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **string** | | [optional] [default to 'product'] **id** | **string** | 商品 ID | +**livemode** | **bool** | 本番環境かどうか | **name** | **string** | Checkout などで顧客に表示される商品名 | **active** | **bool** | 商品が購入可能かどうか | **defaultPriceId** | **string** | | **description** | **string** | | **unitLabel** | **string** | | **url** | **string** | | +**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | +**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TaxRateDetailsResponse.md b/docs/Model/TaxRateDetailsResponse.md index 77664b1..c8afd48 100644 --- a/docs/Model/TaxRateDetailsResponse.md +++ b/docs/Model/TaxRateDetailsResponse.md @@ -6,12 +6,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **string** | | [optional] [default to 'tax_rate'] **id** | **string** | 税率 ID | +**livemode** | **bool** | 本番環境かどうか | **displayName** | **string** | 表示名。顧客に表示されます。 | **inclusive** | **bool** | 税込みかどうか。税込 = `true` 税抜 = `false` | **percentage** | **float** | 税率 (% 単位) | **active** | **bool** | この税率が有効であるかどうか | **country** | [**\PAYJPV2\Model\Country**](Country.md) | | **description** | **string** | | +**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | +**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | **metadata** | [**array**](MetadataValue.md) | メタデータ | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/TaxRatesApi.php b/lib/Api/TaxRatesApi.php index 4024897..66d5ea9 100644 --- a/lib/Api/TaxRatesApi.php +++ b/lib/Api/TaxRatesApi.php @@ -443,15 +443,17 @@ public function createTaxRateRequest($taxRateCreateRequest, ?string $idempotency * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) + * @param bool|null $active この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 (optional) + * @param bool|null $inclusive 税込みかどうか。税込 = `true` 税抜 = `false` (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \PAYJPV2\Model\TaxRateListResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ - public function getAllTaxRates($limit = 10, $startingAfter = null, $endingBefore = null, ?string $idempotencyKey = null) + public function getAllTaxRates($limit = 10, $startingAfter = null, $endingBefore = null, $active = null, $inclusive = null, ?string $idempotencyKey = null) { - list($response) = $this->getAllTaxRatesWithHttpInfo($limit, $startingAfter, $endingBefore, $idempotencyKey); + list($response) = $this->getAllTaxRatesWithHttpInfo($limit, $startingAfter, $endingBefore, $active, $inclusive, $idempotencyKey); return $response; } @@ -464,15 +466,17 @@ public function getAllTaxRates($limit = 10, $startingAfter = null, $endingBefore * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) + * @param bool|null $active この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 (optional) + * @param bool|null $inclusive 税込みかどうか。税込 = `true` 税抜 = `false` (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \PAYJPV2\Model\TaxRateListResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getAllTaxRatesWithHttpInfo($limit = 10, $startingAfter = null, $endingBefore = null, ?string $idempotencyKey = null) + public function getAllTaxRatesWithHttpInfo($limit = 10, $startingAfter = null, $endingBefore = null, $active = null, $inclusive = null, ?string $idempotencyKey = null) { - $request = $this->getAllTaxRatesRequest($limit, $startingAfter, $endingBefore, $idempotencyKey); + $request = $this->getAllTaxRatesRequest($limit, $startingAfter, $endingBefore, $active, $inclusive, $idempotencyKey); try { $options = $this->createHttpClientOption(); @@ -583,14 +587,16 @@ public function getAllTaxRatesWithHttpInfo($limit = 10, $startingAfter = null, $ * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) + * @param bool|null $active この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 (optional) + * @param bool|null $inclusive 税込みかどうか。税込 = `true` 税抜 = `false` (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllTaxRatesAsync($limit = 10, $startingAfter = null, $endingBefore = null, ?string $idempotencyKey = null) + public function getAllTaxRatesAsync($limit = 10, $startingAfter = null, $endingBefore = null, $active = null, $inclusive = null, ?string $idempotencyKey = null) { - return $this->getAllTaxRatesAsyncWithHttpInfo($limit, $startingAfter, $endingBefore, $idempotencyKey) + return $this->getAllTaxRatesAsyncWithHttpInfo($limit, $startingAfter, $endingBefore, $active, $inclusive, $idempotencyKey) ->then( function ($response) { return $response[0]; @@ -606,15 +612,17 @@ function ($response) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) + * @param bool|null $active この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 (optional) + * @param bool|null $inclusive 税込みかどうか。税込 = `true` 税抜 = `false` (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllTaxRatesAsyncWithHttpInfo($limit = 10, $startingAfter = null, $endingBefore = null, ?string $idempotencyKey = null) + public function getAllTaxRatesAsyncWithHttpInfo($limit = 10, $startingAfter = null, $endingBefore = null, $active = null, $inclusive = null, ?string $idempotencyKey = null) { $returnType = '\PAYJPV2\Model\TaxRateListResponse'; - $request = $this->getAllTaxRatesRequest($limit, $startingAfter, $endingBefore, $idempotencyKey); + $request = $this->getAllTaxRatesRequest($limit, $startingAfter, $endingBefore, $active, $inclusive, $idempotencyKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -659,12 +667,14 @@ function ($exception) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) + * @param bool|null $active この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 (optional) + * @param bool|null $inclusive 税込みかどうか。税込 = `true` 税抜 = `false` (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAllTaxRatesRequest($limit = 10, $startingAfter = null, $endingBefore = null, ?string $idempotencyKey = null) + public function getAllTaxRatesRequest($limit = 10, $startingAfter = null, $endingBefore = null, $active = null, $inclusive = null, ?string $idempotencyKey = null) { if ($limit !== null && $limit > 100) { @@ -677,6 +687,8 @@ public function getAllTaxRatesRequest($limit = 10, $startingAfter = null, $endin + + $resourcePath = '/v2/tax_rates'; $formParams = []; $queryParams = []; @@ -716,6 +728,24 @@ public function getAllTaxRatesRequest($limit = 10, $startingAfter = null, $endin true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $active, + 'active', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $inclusive, + 'inclusive', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); diff --git a/lib/Configuration.php b/lib/Configuration.php index 0ad469a..dc73de9 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -101,7 +101,7 @@ class Configuration * * @var string */ - protected $userAgent = 'payjp/payjpv2 PHPBindings/1.0.6'; + protected $userAgent = 'payjp/payjpv2 PHPBindings/1.0.7'; /** * Debug switch (default set to false) @@ -339,7 +339,7 @@ public function getUserAgent(): string public static function buildClientUserAgent(): string { $uaInfo = [ - 'bindings_version' => '1.0.6', + 'bindings_version' => '1.0.7', 'lang' => 'php', 'lang_version' => PHP_VERSION, 'publisher' => 'payjp', @@ -458,7 +458,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 2.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 1.0.6' . PHP_EOL; + $report .= ' SDK Package Version: 1.0.7' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/ProductDetailsResponse.php b/lib/Model/ProductDetailsResponse.php index e1f4ef7..4641d1a 100644 --- a/lib/Model/ProductDetailsResponse.php +++ b/lib/Model/ProductDetailsResponse.php @@ -60,12 +60,15 @@ class ProductDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial protected static $openAPITypes = [ 'object' => 'string', 'id' => 'string', + 'livemode' => 'bool', 'name' => 'string', 'active' => 'bool', 'defaultPriceId' => 'string', 'description' => 'string', 'unitLabel' => 'string', 'url' => 'string', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime', ]; /** @@ -78,12 +81,15 @@ class ProductDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial protected static $openAPIFormats = [ 'object' => null, 'id' => null, + 'livemode' => null, 'name' => null, 'active' => null, 'defaultPriceId' => null, 'description' => null, 'unitLabel' => null, 'url' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', ]; /** @@ -94,12 +100,15 @@ class ProductDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial protected static array $openAPINullables = [ 'object' => false, 'id' => false, + 'livemode' => false, 'name' => false, 'active' => false, 'defaultPriceId' => true, 'description' => true, 'unitLabel' => true, 'url' => true, + 'createdAt' => false, + 'updatedAt' => false, ]; /** @@ -190,12 +199,15 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'object' => 'object', 'id' => 'id', + 'livemode' => 'livemode', 'name' => 'name', 'active' => 'active', 'defaultPriceId' => 'default_price_id', 'description' => 'description', 'unitLabel' => 'unit_label', 'url' => 'url', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', ]; /** @@ -206,12 +218,15 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'object' => 'setObject', 'id' => 'setId', + 'livemode' => 'setLivemode', 'name' => 'setName', 'active' => 'setActive', 'defaultPriceId' => 'setDefaultPriceId', 'description' => 'setDescription', 'unitLabel' => 'setUnitLabel', 'url' => 'setUrl', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -222,12 +237,15 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'object' => 'getObject', 'id' => 'getId', + 'livemode' => 'getLivemode', 'name' => 'getName', 'active' => 'getActive', 'defaultPriceId' => 'getDefaultPriceId', 'description' => 'getDescription', 'unitLabel' => 'getUnitLabel', 'url' => 'getUrl', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -302,12 +320,15 @@ public function __construct(?array $data = null) { $this->setIfExists('object', $data ?? [], 'product'); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); $this->setIfExists('defaultPriceId', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('unitLabel', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); } /** @@ -349,6 +370,9 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['livemode'] === null) { + $invalidProperties[] = "'livemode' can't be null"; + } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } @@ -367,6 +391,12 @@ public function listInvalidProperties() if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } return $invalidProperties; } @@ -451,6 +481,37 @@ public function setId(string $id): self return $this; } + /** + * Gets livemode + * + * @return bool + */ + public function getLivemode(): bool + { + if ($this->container['livemode'] === null) { + throw new \LogicException('Property "livemode" is required but has not been set.'); + } + + return $this->container['livemode']; + } + + /** + * Sets livemode + * + * @param bool $livemode 本番環境かどうか + * + * @return self + */ + public function setLivemode(bool $livemode): self + { + if (is_null($livemode)) { + throw new \InvalidArgumentException('non-nullable livemode cannot be null'); + } + $this->container['livemode'] = $livemode; + + return $this; + } + /** * Gets name * @@ -648,6 +709,68 @@ public function setUrl(?string $url): self return $this; } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt(): \DateTime + { + if ($this->container['createdAt'] === null) { + throw new \LogicException('Property "createdAt" is required but has not been set.'); + } + + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setCreatedAt(\DateTime $createdAt): self + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt(): \DateTime + { + if ($this->container['updatedAt'] === null) { + throw new \LogicException('Property "updatedAt" is required but has not been set.'); + } + + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setUpdatedAt(\DateTime $updatedAt): self + { + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + } + $this->container['updatedAt'] = $updatedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/TaxRateDetailsResponse.php b/lib/Model/TaxRateDetailsResponse.php index 3505355..fbfd9e2 100644 --- a/lib/Model/TaxRateDetailsResponse.php +++ b/lib/Model/TaxRateDetailsResponse.php @@ -60,12 +60,15 @@ class TaxRateDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial protected static $openAPITypes = [ 'object' => 'string', 'id' => 'string', + 'livemode' => 'bool', 'displayName' => 'string', 'inclusive' => 'bool', 'percentage' => 'float', 'active' => 'bool', 'country' => '\PAYJPV2\Model\Country', 'description' => 'string', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime', 'metadata' => 'array', ]; @@ -79,12 +82,15 @@ class TaxRateDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial protected static $openAPIFormats = [ 'object' => null, 'id' => null, + 'livemode' => null, 'displayName' => null, 'inclusive' => null, 'percentage' => null, 'active' => null, 'country' => null, 'description' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', 'metadata' => null, ]; @@ -96,12 +102,15 @@ class TaxRateDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial protected static array $openAPINullables = [ 'object' => false, 'id' => false, + 'livemode' => false, 'displayName' => false, 'inclusive' => false, 'percentage' => false, 'active' => false, 'country' => true, 'description' => true, + 'createdAt' => false, + 'updatedAt' => false, 'metadata' => false, ]; @@ -193,12 +202,15 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'object' => 'object', 'id' => 'id', + 'livemode' => 'livemode', 'displayName' => 'display_name', 'inclusive' => 'inclusive', 'percentage' => 'percentage', 'active' => 'active', 'country' => 'country', 'description' => 'description', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', 'metadata' => 'metadata', ]; @@ -210,12 +222,15 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'object' => 'setObject', 'id' => 'setId', + 'livemode' => 'setLivemode', 'displayName' => 'setDisplayName', 'inclusive' => 'setInclusive', 'percentage' => 'setPercentage', 'active' => 'setActive', 'country' => 'setCountry', 'description' => 'setDescription', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', 'metadata' => 'setMetadata', ]; @@ -227,12 +242,15 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'object' => 'getObject', 'id' => 'getId', + 'livemode' => 'getLivemode', 'displayName' => 'getDisplayName', 'inclusive' => 'getInclusive', 'percentage' => 'getPercentage', 'active' => 'getActive', 'country' => 'getCountry', 'description' => 'getDescription', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', 'metadata' => 'getMetadata', ]; @@ -308,12 +326,15 @@ public function __construct(?array $data = null) { $this->setIfExists('object', $data ?? [], 'tax_rate'); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('displayName', $data ?? [], null); $this->setIfExists('inclusive', $data ?? [], null); $this->setIfExists('percentage', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); } @@ -356,6 +377,9 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['livemode'] === null) { + $invalidProperties[] = "'livemode' can't be null"; + } if ($this->container['displayName'] === null) { $invalidProperties[] = "'displayName' can't be null"; } @@ -374,6 +398,12 @@ public function listInvalidProperties() if ($this->container['description'] === null) { $invalidProperties[] = "'description' can't be null"; } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } if ($this->container['metadata'] === null) { $invalidProperties[] = "'metadata' can't be null"; } @@ -461,6 +491,37 @@ public function setId(string $id): self return $this; } + /** + * Gets livemode + * + * @return bool + */ + public function getLivemode(): bool + { + if ($this->container['livemode'] === null) { + throw new \LogicException('Property "livemode" is required but has not been set.'); + } + + return $this->container['livemode']; + } + + /** + * Sets livemode + * + * @param bool $livemode 本番環境かどうか + * + * @return self + */ + public function setLivemode(bool $livemode): self + { + if (is_null($livemode)) { + throw new \InvalidArgumentException('non-nullable livemode cannot be null'); + } + $this->container['livemode'] = $livemode; + + return $this; + } + /** * Gets displayName * @@ -653,6 +714,68 @@ public function setDescription(?string $description): self return $this; } + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt(): \DateTime + { + if ($this->container['createdAt'] === null) { + throw new \LogicException('Property "createdAt" is required but has not been set.'); + } + + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setCreatedAt(\DateTime $createdAt): self + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt(): \DateTime + { + if ($this->container['updatedAt'] === null) { + throw new \LogicException('Property "updatedAt" is required but has not been set.'); + } + + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setUpdatedAt(\DateTime $updatedAt): self + { + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + } + $this->container['updatedAt'] = $updatedAt; + + return $this; + } + /** * Gets metadata * diff --git a/test/Model/ProductDetailsResponseTest.php b/test/Model/ProductDetailsResponseTest.php index fb3fdba..2529d00 100644 --- a/test/Model/ProductDetailsResponseTest.php +++ b/test/Model/ProductDetailsResponseTest.php @@ -97,6 +97,15 @@ public function testPropertyId() self::markTestIncomplete('Not implemented'); } + /** + * Test attribute "livemode" + */ + public function testPropertyLivemode() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + /** * Test attribute "name" */ @@ -150,4 +159,22 @@ public function testPropertyUrl() // TODO: implement self::markTestIncomplete('Not implemented'); } + + /** + * Test attribute "createdAt" + */ + public function testPropertyCreatedAt() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "updatedAt" + */ + public function testPropertyUpdatedAt() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } } diff --git a/test/Model/TaxRateDetailsResponseTest.php b/test/Model/TaxRateDetailsResponseTest.php index 22b5ef7..4993488 100644 --- a/test/Model/TaxRateDetailsResponseTest.php +++ b/test/Model/TaxRateDetailsResponseTest.php @@ -97,6 +97,15 @@ public function testPropertyId() self::markTestIncomplete('Not implemented'); } + /** + * Test attribute "livemode" + */ + public function testPropertyLivemode() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + /** * Test attribute "displayName" */ @@ -151,6 +160,24 @@ public function testPropertyDescription() self::markTestIncomplete('Not implemented'); } + /** + * Test attribute "createdAt" + */ + public function testPropertyCreatedAt() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "updatedAt" + */ + public function testPropertyUpdatedAt() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + /** * Test attribute "metadata" */