Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down Expand Up @@ -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`
2 changes: 2 additions & 0 deletions docs/Api/PaymentMethodsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ createPaymentMethod($paymentMethodCreateRequest): \PAYJPV2\Model\PaymentMethodRe

Create Payment Method

**このエンドポイントはテストモードでのみ使用できます。**

### Example

```php
Expand Down
8 changes: 6 additions & 2 deletions docs/Api/TaxRatesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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

Expand Down
3 changes: 3 additions & 0 deletions docs/Model/ProductDetailsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 3 additions & 0 deletions docs/Model/TaxRateDetailsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<string,\PAYJPV2\Model\MetadataValue>**](MetadataValue.md) | メタデータ |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
48 changes: 39 additions & 9 deletions lib/Api/TaxRatesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 税込みかどうか。税込 &#x3D; &#x60;true&#x60; 税抜 &#x3D; &#x60;false&#x60; (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;
}
Expand All @@ -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 税込みかどうか。税込 &#x3D; &#x60;true&#x60; 税抜 &#x3D; &#x60;false&#x60; (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();
Expand Down Expand Up @@ -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 税込みかどうか。税込 &#x3D; &#x60;true&#x60; 税抜 &#x3D; &#x60;false&#x60; (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];
Expand All @@ -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 税込みかどうか。税込 &#x3D; &#x60;true&#x60; 税抜 &#x3D; &#x60;false&#x60; (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())
Expand Down Expand Up @@ -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 税込みかどうか。税込 &#x3D; &#x60;true&#x60; 税抜 &#x3D; &#x60;false&#x60; (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) {
Expand All @@ -677,6 +687,8 @@ public function getAllTaxRatesRequest($limit = 10, $startingAfter = null, $endin





$resourcePath = '/v2/tax_rates';
$formParams = [];
$queryParams = [];
Expand Down Expand Up @@ -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
) ?? []);



Expand Down
6 changes: 3 additions & 3 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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;
Expand Down
Loading