Skip to content
Open
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A Python client library for the PAY.JP v2 API. This SDK provides a convenient wa
This Python 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.PythonClientCodegen

Expand Down Expand Up @@ -83,6 +83,7 @@ Class | Method | HTTP request | Description
*BalancesApi* | [**get_all_balances**](docs/BalancesApi.md#get_all_balances) | **GET** /v2/balances | Get All Balances
*BalancesApi* | [**get_balance**](docs/BalancesApi.md#get_balance) | **GET** /v2/balances/{balance_id} | Get Balance
*CheckoutSessionsApi* | [**create_checkout_session**](docs/CheckoutSessionsApi.md#create_checkout_session) | **POST** /v2/checkout/sessions | Create Checkout Session
*CheckoutSessionsApi* | [**expire_checkout_session**](docs/CheckoutSessionsApi.md#expire_checkout_session) | **POST** /v2/checkout/sessions/{checkout_session_id}/expire | Expire Checkout Session
*CheckoutSessionsApi* | [**get_all_checkout_session_line_items**](docs/CheckoutSessionsApi.md#get_all_checkout_session_line_items) | **GET** /v2/checkout/sessions/{checkout_session_id}/line_items | Get All Checkout Session Line Items
*CheckoutSessionsApi* | [**get_all_checkout_sessions**](docs/CheckoutSessionsApi.md#get_all_checkout_sessions) | **GET** /v2/checkout/sessions | Get All Checkout Sessions
*CheckoutSessionsApi* | [**get_checkout_session**](docs/CheckoutSessionsApi.md#get_checkout_session) | **GET** /v2/checkout/sessions/{checkout_session_id} | Get Checkout Session
Expand Down
87 changes: 87 additions & 0 deletions docs/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*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_checkout_session**](CheckoutSessionsApi.md#create_checkout_session) | **POST** /v2/checkout/sessions | Create Checkout Session
[**expire_checkout_session**](CheckoutSessionsApi.md#expire_checkout_session) | **POST** /v2/checkout/sessions/{checkout_session_id}/expire | Expire Checkout Session
[**get_all_checkout_session_line_items**](CheckoutSessionsApi.md#get_all_checkout_session_line_items) | **GET** /v2/checkout/sessions/{checkout_session_id}/line_items | Get All Checkout Session Line Items
[**get_all_checkout_sessions**](CheckoutSessionsApi.md#get_all_checkout_sessions) | **GET** /v2/checkout/sessions | Get All Checkout Sessions
[**get_checkout_session**](CheckoutSessionsApi.md#get_checkout_session) | **GET** /v2/checkout/sessions/{checkout_session_id} | Get Checkout Session
Expand Down Expand Up @@ -97,6 +98,92 @@ Name | Type | Description | Notes

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

# **expire_checkout_session**
> CheckoutSessionDetailsResponse expire_checkout_session(checkout_session_id)

Expire Checkout Session

### Example

* Basic Authentication (HTTPBasic):
* Bearer Authentication (HTTPBearer):

```python
import payjpv2
from payjpv2.models.checkout_session_details_response import CheckoutSessionDetailsResponse
from payjpv2.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.pay.jp
# See configuration.py for a list of all supported configuration parameters.
configuration = payjpv2.Configuration(
host = "https://api.pay.jp"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: HTTPBasic
configuration = payjpv2.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)

# Configure Bearer authorization: HTTPBearer
configuration = payjpv2.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with payjpv2.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = payjpv2.CheckoutSessionsApi(api_client)
checkout_session_id = 'checkout_session_id_example' # str |

try:
# Expire Checkout Session
api_response = api_instance.expire_checkout_session(checkout_session_id)
print("The response of CheckoutSessionsApi->expire_checkout_session:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CheckoutSessionsApi->expire_checkout_session: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**checkout_session_id** | **str**| |

### Return type

[**CheckoutSessionDetailsResponse**](CheckoutSessionDetailsResponse.md)

### Authorization

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

### HTTP request headers

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

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |
**404** | Not Found | - |
**400** | Checkout Session Not Expirable | - |

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

# **get_all_checkout_session_line_items**
> CheckoutSessionLineItemListResponse get_all_checkout_session_line_items(checkout_session_id, limit=limit, starting_after=starting_after, ending_before=ending_before)

Expand Down
2 changes: 1 addition & 1 deletion docs/PaymentFlowsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ Name | Type | Description | Notes
**200** | Successful Response | - |
**422** | Validation Error | - |
**404** | Not Found | - |
**400** | Invalid Status<br>Missing Payment Method<br>Detached Payment Method Not Usable<br>Payment Method Not Owned By Customer<br>Customer Required For Payment Method<br>Payment Method Type Not Allowed<br>Extended Authorization Not Available<br>Apple Pay Disabled In Livemode<br>Invalid Apple Pay Token<br>Unacceptable Brand On Apple Pay | - |
**400** | Invalid Status<br>Checkout Session Expired<br>Missing Payment Method<br>Detached Payment Method Not Usable<br>Payment Method Not Owned By Customer<br>Customer Required For Payment Method<br>Payment Method Type Not Allowed<br>Extended Authorization Not Available<br>Apple Pay Disabled In Livemode<br>Invalid Apple Pay Token<br>Unacceptable Brand On Apple Pay | - |
**402** | Payment Failed | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/SetupFlowCancelRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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

## Example

Expand Down
2 changes: 2 additions & 0 deletions docs/SetupFlowCancellationReason.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

* `DUPLICATE` (value: `'duplicate'`)

* `EXPIRED` (value: `'expired'`)

* `REQUESTED_BY_CUSTOMER` (value: `'requested_by_customer'`)

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion payjpv2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "1.1.0"
__version__ = "1.2.0"

# import apis into sdk package
from payjpv2.api.balances_api import BalancesApi
Expand Down
Loading