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
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
payjpv2 (1.0.7)
payjpv2 (1.0.8)
typhoeus (~> 1.0, >= 1.0.1)

GEM
Expand Down
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 Ruby client library for the PAY.JP v2 API. This SDK provides a convenient way
This Ruby gem is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 2.0.0
- Package version: 1.0.7
- Package version: 1.0.8
- Generator version: 7.14.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen

Expand All @@ -26,7 +26,7 @@ gem install payjpv2
Add this line to your application's Gemfile:

```ruby
gem 'payjpv2', '~> 1.0.7'
gem 'payjpv2', '~> 1.0.8'
```

Then execute:
Expand Down
2 changes: 1 addition & 1 deletion docs/PaymentFlowResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
| **payment_method_id** | **String** | | |
| **payment_method_options** | **Hash<String, Object>** | | |
| **payment_method_types** | [**Array<PaymentMethodTypes>**](PaymentMethodTypes.md) | この PaymentFlow で使用できる支払い方法の種類のリスト | |
| **status** | [**PaymentFlowStatus**](PaymentFlowStatus.md) | この PaymentFlow のステータス。<a href=\"https://docs.pay.jp/v2/payment_flows#status\" target=\"_blank\">ステータスの詳細についてはこちらをご覧ください。</a> | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 | | |
| **status** | [**PaymentFlowStatus**](PaymentFlowStatus.md) | この PaymentFlow のステータス。 | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 | | |
| **next_action** | **Hash<String, Object>** | | |
| **return_url** | **String** | | |
| **capture_method** | [**CaptureMethod**](CaptureMethod.md) | 支払いの確定方法 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | |
Expand Down
15 changes: 10 additions & 5 deletions example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
prices_api = PAYJPv2::PricesApi.new

customer_create_request = PAYJPv2::CustomerCreateRequest.new(
email: 'jennyrosen@example.com'
email: 'jennyrosen@example.com',
metadata: { key1: 'value1', key2: 123, key3: true }
)

# Test idempotency key
Expand All @@ -39,25 +40,29 @@
)
customer_id = result.id
puts "Created customer: #{customer_id}"
puts "Email: #{result.email}\n\n"
puts "Email: #{result.email}"
puts "Metadata: #{result.metadata}\n\n"

# 2. Get Customer
puts "=== 2. Get Customer ==="
retrieved = api_instance.get_customer(customer_id)
puts "Retrieved customer: #{retrieved.id}"
puts "Email: #{retrieved.email}"
puts "Description: #{retrieved.description || '(none)'}\n\n"
puts "Description: #{retrieved.description || '(none)'}"
puts "Metadata: #{retrieved.metadata}\n\n"

# 3. Update Customer
puts "=== 3. Update Customer ==="
update_request = PAYJPv2::CustomerUpdateRequest.new(
email: 'updated@example.com',
description: 'Updated description from Ruby SDK'
description: 'Updated description from Ruby SDK',
metadata: { key1: 'updated_value', key4: 456 }
)
updated = api_instance.update_customer(customer_id, update_request)
puts "Updated customer: #{updated.id}"
puts "New email: #{updated.email}"
puts "New description: #{updated.description || '(none)'}\n\n"
puts "New description: #{updated.description || '(none)'}"
puts "Metadata: #{updated.metadata}\n\n"

# 4. List Customers
puts "=== 4. List Customers ==="
Expand Down
2 changes: 1 addition & 1 deletion lib/payjpv2/models/payment_flow_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PaymentFlowResponse
# この PaymentFlow で使用できる支払い方法の種類のリスト
attr_accessor :payment_method_types

# この PaymentFlow のステータス。<a href=\"https://docs.pay.jp/v2/payment_flows#status\" target=\"_blank\">ステータスの詳細についてはこちらをご覧ください。</a> | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 |
# この PaymentFlow のステータス。 | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 |
attr_accessor :status

attr_accessor :next_action
Expand Down
2 changes: 1 addition & 1 deletion lib/payjpv2/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
=end

module PAYJPv2
VERSION = '1.0.7'
VERSION = '1.0.8'
end
Loading