Skip to content
Closed
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
5 changes: 3 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.1.0`
- Package version: `1.2.0`
- Generator version: `7.14.0`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`

Expand Down Expand Up @@ -81,6 +81,7 @@ Class | Method | HTTP request | Description
*BalancesApi* | [**getAllBalances**](docs/Api/BalancesApi.md#getallbalances) | **GET** /v2/balances | Get All Balances
*BalancesApi* | [**getBalance**](docs/Api/BalancesApi.md#getbalance) | **GET** /v2/balances/{balance_id} | Get Balance
*CheckoutSessionsApi* | [**createCheckoutSession**](docs/Api/CheckoutSessionsApi.md#createcheckoutsession) | **POST** /v2/checkout/sessions | Create Checkout Session
*CheckoutSessionsApi* | [**expireCheckoutSession**](docs/Api/CheckoutSessionsApi.md#expirecheckoutsession) | **POST** /v2/checkout/sessions/{checkout_session_id}/expire | Expire Checkout Session
*CheckoutSessionsApi* | [**getAllCheckoutSessionLineItems**](docs/Api/CheckoutSessionsApi.md#getallcheckoutsessionlineitems) | **GET** /v2/checkout/sessions/{checkout_session_id}/line_items | Get All Checkout Session Line Items
*CheckoutSessionsApi* | [**getAllCheckoutSessions**](docs/Api/CheckoutSessionsApi.md#getallcheckoutsessions) | **GET** /v2/checkout/sessions | Get All Checkout Sessions
*CheckoutSessionsApi* | [**getCheckoutSession**](docs/Api/CheckoutSessionsApi.md#getcheckoutsession) | **GET** /v2/checkout/sessions/{checkout_session_id} | Get Checkout Session
Expand Down Expand Up @@ -308,6 +309,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.1.0`
- Package version: `1.2.0`
- Generator version: `7.14.0`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`
64 changes: 64 additions & 0 deletions docs/Api/CheckoutSessionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All URIs are relative to https://api.pay.jp, except if the operation defines ano
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**createCheckoutSession()**](CheckoutSessionsApi.md#createCheckoutSession) | **POST** /v2/checkout/sessions | Create Checkout Session |
| [**expireCheckoutSession()**](CheckoutSessionsApi.md#expireCheckoutSession) | **POST** /v2/checkout/sessions/{checkout_session_id}/expire | Expire Checkout Session |
| [**getAllCheckoutSessionLineItems()**](CheckoutSessionsApi.md#getAllCheckoutSessionLineItems) | **GET** /v2/checkout/sessions/{checkout_session_id}/line_items | Get All Checkout Session Line Items |
| [**getAllCheckoutSessions()**](CheckoutSessionsApi.md#getAllCheckoutSessions) | **GET** /v2/checkout/sessions | Get All Checkout Sessions |
| [**getCheckoutSession()**](CheckoutSessionsApi.md#getCheckoutSession) | **GET** /v2/checkout/sessions/{checkout_session_id} | Get Checkout Session |
Expand Down Expand Up @@ -74,6 +75,69 @@ try {
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `expireCheckoutSession()`

```php
expireCheckoutSession($checkoutSessionId): \PAYJPV2\Model\CheckoutSessionDetailsResponse
```

Expire Checkout Session

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: HTTPBasic
$config = PAYJPV2\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');

// Configure Bearer authorization: HTTPBearer
$config = PAYJPV2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new PAYJPV2\Api\CheckoutSessionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$checkoutSessionId = 'checkoutSessionId_example'; // string

try {
$result = $apiInstance->expireCheckoutSession($checkoutSessionId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CheckoutSessionsApi->expireCheckoutSession: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **checkoutSessionId** | **string**| | |

### Return type

[**\PAYJPV2\Model\CheckoutSessionDetailsResponse**](../Model/CheckoutSessionDetailsResponse.md)

### Authorization

[HTTPBasic](../../README.md#HTTPBasic), [HTTPBearer](../../README.md#HTTPBearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`, `application/problem+json`

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

## `getAllCheckoutSessionLineItems()`

```php
Expand Down
2 changes: 1 addition & 1 deletion docs/Model/SetupFlowCancelRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cancellationReason** | [**\PAYJPV2\Model\SetupFlowCancellationReason**](SetupFlowCancellationReason.md) | この SetupFlow のキャンセル理由。 | 値 | |:---| | **abandoned**: 顧客が SetupFlow を完了しなかった場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **duplicate**: 支払い方法が重複している場合。 | | [optional]
**cancellationReason** | **string** | この SetupFlow のキャンセル理由。 | 値 | |:---| | **abandoned**: 顧客が SetupFlow を完了しなかった場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **duplicate**: 支払い方法が重複している場合。 | | [optional]

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