payjpv2 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/docs/PaymentFlowResponse.md +1 -1
- data/example.rb +10 -5
- data/lib/payjpv2/models/payment_flow_response.rb +1 -1
- data/lib/payjpv2/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ca8c575db78b77fb06a21cdb1ffc6e284f77ee7ab3467cac2561ae8a785e1b4
|
|
4
|
+
data.tar.gz: 82b57ee3897a2fc4eb630bce32953b0eb0f90b91814ea5d788ec23351f368ac3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e27d9de313657404a90718cf6557fe580330f4d92bf7ebf9a1ba4bf2c2dc256115417511d403d0b1a0ba29f369daa8a21c798ff6b759f4e8a8f3fe643e116c25
|
|
7
|
+
data.tar.gz: 5ec8dde17ad88188980108f983b961f6f8a636c10fcd7f4e4d94ec12daea76dde422ddeea87037c83e57a42e22c800b9522b04ed4c0dd4dae8af138bd6c08976
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -5,7 +5,7 @@ A Ruby client library for the PAY.JP v2 API. This SDK provides a convenient way
|
|
|
5
5
|
This Ruby gem is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
6
6
|
|
|
7
7
|
- API version: 2.0.0
|
|
8
|
-
- Package version: 1.0.
|
|
8
|
+
- Package version: 1.0.9
|
|
9
9
|
- Generator version: 7.14.0
|
|
10
10
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
11
11
|
|
|
@@ -26,7 +26,7 @@ gem install payjpv2
|
|
|
26
26
|
Add this line to your application's Gemfile:
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
|
-
gem 'payjpv2', '~> 1.0.
|
|
29
|
+
gem 'payjpv2', '~> 1.0.9'
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Then execute:
|
data/docs/PaymentFlowResponse.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| **payment_method_id** | **String** | | |
|
|
18
18
|
| **payment_method_options** | **Hash<String, Object>** | | |
|
|
19
19
|
| **payment_method_types** | [**Array<PaymentMethodTypes>**](PaymentMethodTypes.md) | この PaymentFlow で使用できる支払い方法の種類のリスト | |
|
|
20
|
-
| **status** | [**PaymentFlowStatus**](PaymentFlowStatus.md) | この PaymentFlow
|
|
20
|
+
| **status** | [**PaymentFlowStatus**](PaymentFlowStatus.md) | この PaymentFlow のステータス。 | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 | | |
|
|
21
21
|
| **next_action** | **Hash<String, Object>** | | |
|
|
22
22
|
| **return_url** | **String** | | |
|
|
23
23
|
| **capture_method** | [**CaptureMethod**](CaptureMethod.md) | 支払いの確定方法 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | |
|
data/example.rb
CHANGED
|
@@ -23,7 +23,8 @@ products_api = PAYJPv2::ProductsApi.new
|
|
|
23
23
|
prices_api = PAYJPv2::PricesApi.new
|
|
24
24
|
|
|
25
25
|
customer_create_request = PAYJPv2::CustomerCreateRequest.new(
|
|
26
|
-
email: 'jennyrosen@example.com'
|
|
26
|
+
email: 'jennyrosen@example.com',
|
|
27
|
+
metadata: { key1: 'value1', key2: 123, key3: true }
|
|
27
28
|
)
|
|
28
29
|
|
|
29
30
|
# Test idempotency key
|
|
@@ -39,25 +40,29 @@ begin
|
|
|
39
40
|
)
|
|
40
41
|
customer_id = result.id
|
|
41
42
|
puts "Created customer: #{customer_id}"
|
|
42
|
-
puts "Email: #{result.email}
|
|
43
|
+
puts "Email: #{result.email}"
|
|
44
|
+
puts "Metadata: #{result.metadata}\n\n"
|
|
43
45
|
|
|
44
46
|
# 2. Get Customer
|
|
45
47
|
puts "=== 2. Get Customer ==="
|
|
46
48
|
retrieved = api_instance.get_customer(customer_id)
|
|
47
49
|
puts "Retrieved customer: #{retrieved.id}"
|
|
48
50
|
puts "Email: #{retrieved.email}"
|
|
49
|
-
puts "Description: #{retrieved.description || '(none)'}
|
|
51
|
+
puts "Description: #{retrieved.description || '(none)'}"
|
|
52
|
+
puts "Metadata: #{retrieved.metadata}\n\n"
|
|
50
53
|
|
|
51
54
|
# 3. Update Customer
|
|
52
55
|
puts "=== 3. Update Customer ==="
|
|
53
56
|
update_request = PAYJPv2::CustomerUpdateRequest.new(
|
|
54
57
|
email: 'updated@example.com',
|
|
55
|
-
description: 'Updated description from Ruby SDK'
|
|
58
|
+
description: 'Updated description from Ruby SDK',
|
|
59
|
+
metadata: { key1: 'updated_value', key4: 456 }
|
|
56
60
|
)
|
|
57
61
|
updated = api_instance.update_customer(customer_id, update_request)
|
|
58
62
|
puts "Updated customer: #{updated.id}"
|
|
59
63
|
puts "New email: #{updated.email}"
|
|
60
|
-
puts "New description: #{updated.description || '(none)'}
|
|
64
|
+
puts "New description: #{updated.description || '(none)'}"
|
|
65
|
+
puts "Metadata: #{updated.metadata}\n\n"
|
|
61
66
|
|
|
62
67
|
# 4. List Customers
|
|
63
68
|
puts "=== 4. List Customers ==="
|
|
@@ -47,7 +47,7 @@ module PAYJPv2
|
|
|
47
47
|
# この PaymentFlow で使用できる支払い方法の種類のリスト
|
|
48
48
|
attr_accessor :payment_method_types
|
|
49
49
|
|
|
50
|
-
# この PaymentFlow
|
|
50
|
+
# この PaymentFlow のステータス。 | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 |
|
|
51
51
|
attr_accessor :status
|
|
52
52
|
|
|
53
53
|
attr_accessor :next_action
|
data/lib/payjpv2/version.rb
CHANGED