Skip to content

Commit 6ccef6c

Browse files
authored
Merge pull request #15 from payjp/sdk-update-2026-03-10-99cbc86
feat: Update SDK from generator (2026-03-10)
2 parents 5891a1f + ed0b088 commit 6ccef6c

15 files changed

Lines changed: 206 additions & 12 deletions

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
payjpv2 (1.0.6)
4+
payjpv2 (1.0.7)
55
typhoeus (~> 1.0, >= 1.0.1)
66

77
GEM

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A Ruby client library for the PAY.JP v2 API. This SDK provides a convenient way
55
This Ruby gem is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
66

77
- API version: 2.0.0
8-
- Package version: 1.0.6
8+
- Package version: 1.0.7
99
- Generator version: 7.14.0
1010
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
1111

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

2828
```ruby
29-
gem 'payjpv2', '~> 1.0.6'
29+
gem 'payjpv2', '~> 1.0.7'
3030
```
3131

3232
Then execute:

docs/PaymentMethodsApi.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ end
9090
9191
Create Payment Method
9292

93+
**このエンドポイントはテストモードでのみ使用できます。**
94+
9395
### Examples
9496

9597
```ruby

docs/ProductDetailsResponse.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
| ---- | ---- | ----------- | ----- |
77
| **object** | **String** | | [optional][default to 'product'] |
88
| **id** | **String** | 商品 ID | |
9+
| **livemode** | **Boolean** | 本番環境かどうか | |
910
| **name** | **String** | Checkout などで顧客に表示される商品名 | |
1011
| **active** | **Boolean** | 商品が購入可能かどうか | |
1112
| **default_price_id** | **String** | | |
1213
| **description** | **String** | | |
1314
| **unit_label** | **String** | | |
1415
| **url** | **String** | | |
16+
| **created_at** | **Time** | 作成日時 (UTC, ISO 8601 形式) | |
17+
| **updated_at** | **Time** | 更新日時 (UTC, ISO 8601 形式) | |
1518

1619
## Example
1720

@@ -21,12 +24,15 @@ require 'payjpv2'
2124
instance = PAYJPv2::ProductDetailsResponse.new(
2225
object: null,
2326
id: null,
27+
livemode: null,
2428
name: null,
2529
active: null,
2630
default_price_id: null,
2731
description: null,
2832
unit_label: null,
29-
url: null
33+
url: null,
34+
created_at: null,
35+
updated_at: null
3036
)
3137
```
3238

docs/TaxRateDetailsResponse.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
| ---- | ---- | ----------- | ----- |
77
| **object** | **String** | | [optional][default to 'tax_rate'] |
88
| **id** | **String** | 税率 ID | |
9+
| **livemode** | **Boolean** | 本番環境かどうか | |
910
| **display_name** | **String** | 表示名。顧客に表示されます。 | |
1011
| **inclusive** | **Boolean** | 税込みかどうか。税込 = `true` 税抜 = `false` | |
1112
| **percentage** | **Float** | 税率 (% 単位) | |
1213
| **active** | **Boolean** | この税率が有効であるかどうか | |
1314
| **country** | [**Country**](Country.md) | | |
1415
| **description** | **String** | | |
16+
| **created_at** | **Time** | 作成日時 (UTC, ISO 8601 形式) | |
17+
| **updated_at** | **Time** | 更新日時 (UTC, ISO 8601 形式) | |
1518
| **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | メタデータ | |
1619

1720
## Example
@@ -22,12 +25,15 @@ require 'payjpv2'
2225
instance = PAYJPv2::TaxRateDetailsResponse.new(
2326
object: null,
2427
id: null,
28+
livemode: null,
2529
display_name: null,
2630
inclusive: null,
2731
percentage: null,
2832
active: null,
2933
country: null,
3034
description: null,
35+
created_at: null,
36+
updated_at: null,
3137
metadata: null
3238
)
3339
```

docs/TaxRatesApi.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ api_instance = PAYJPv2::TaxRatesApi.new
104104
opts = {
105105
limit: 56, # Integer | 取得するデータの最大件数
106106
starting_after: 'starting_after_example', # String | このIDより後のデータを取得
107-
ending_before: 'ending_before_example' # String | このIDより前のデータを取得
107+
ending_before: 'ending_before_example', # String | このIDより前のデータを取得
108+
active: true, # Boolean | この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。
109+
inclusive: true # Boolean | 税込みかどうか。税込 = `true` 税抜 = `false`
108110
}
109111

110112
begin
@@ -139,6 +141,8 @@ end
139141
| **limit** | **Integer** | 取得するデータの最大件数 | [optional][default to 10] |
140142
| **starting_after** | **String** | このIDより後のデータを取得 | [optional] |
141143
| **ending_before** | **String** | このIDより前のデータを取得 | [optional] |
144+
| **active** | **Boolean** | この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 | [optional] |
145+
| **inclusive** | **Boolean** | 税込みかどうか。税込 = `true` 税抜 = `false` | [optional] |
142146

143147
### Return type
144148

lib/payjpv2/api/payment_methods_api.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ def attach_payment_method(payment_method_id, payment_method_attach_request, opts
9090
end
9191

9292
# Create Payment Method
93+
# **このエンドポイントはテストモードでのみ使用できます。**
9394
# @param payment_method_create_request [PaymentMethodCreateRequest]
9495
# @param [Hash] opts the optional parameters
9596
# @option opts [String] :idempotency_key Idempotency key for the request

lib/payjpv2/api/tax_rates_api.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ def create_tax_rate(tax_rate_create_request, opts = {})
8989
# @option opts [Integer] :limit 取得するデータの最大件数 (default to 10)
9090
# @option opts [String] :starting_after このIDより後のデータを取得
9191
# @option opts [String] :ending_before このIDより前のデータを取得
92+
# @option opts [Boolean] :active この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。
93+
# @option opts [Boolean] :inclusive 税込みかどうか。税込 = `true` 税抜 = `false`
9294
# @option opts [String] :idempotency_key Idempotency key for the request
9395
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
9496
# @return [TaxRateListResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
@@ -112,6 +114,8 @@ def get_all_tax_rates(opts = {})
112114
query_params[:limit] = opts[:limit] if !opts[:limit].nil?
113115
query_params[:starting_after] = opts[:starting_after] if !opts[:starting_after].nil?
114116
query_params[:ending_before] = opts[:ending_before] if !opts[:ending_before].nil?
117+
query_params[:active] = opts[:active] if !opts[:active].nil?
118+
query_params[:inclusive] = opts[:inclusive] if !opts[:inclusive].nil?
115119

116120
# header parameters
117121
header_params = opts[:header_params] || {}

lib/payjpv2/models/product_details_response.rb

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class ProductDetailsResponse
2020
# 商品 ID
2121
attr_accessor :id
2222

23+
# 本番環境かどうか
24+
attr_accessor :livemode
25+
2326
# Checkout などで顧客に表示される商品名
2427
attr_accessor :name
2528

@@ -34,6 +37,12 @@ class ProductDetailsResponse
3437

3538
attr_accessor :url
3639

40+
# 作成日時 (UTC, ISO 8601 形式)
41+
attr_accessor :created_at
42+
43+
# 更新日時 (UTC, ISO 8601 形式)
44+
attr_accessor :updated_at
45+
3746
class EnumAttributeValidator
3847
attr_reader :datatype
3948
attr_reader :allowable_values
@@ -61,12 +70,15 @@ def self.attribute_map
6170
{
6271
:object => :object,
6372
:id => :id,
73+
:livemode => :livemode,
6474
:name => :name,
6575
:active => :active,
6676
:default_price_id => :default_price_id,
6777
:description => :description,
6878
:unit_label => :unit_label,
69-
:url => :url
79+
:url => :url,
80+
:created_at => :created_at,
81+
:updated_at => :updated_at
7082
}
7183
end
7284

@@ -85,12 +97,15 @@ def self.openapi_types
8597
{
8698
:object => :'String',
8799
:id => :'String',
100+
:livemode => :'Boolean',
88101
:name => :'String',
89102
:active => :'Boolean',
90103
:default_price_id => :'String',
91104
:description => :'String',
92105
:unit_label => :'String',
93-
:url => :'String'
106+
:url => :'String',
107+
:created_at => :'Time',
108+
:updated_at => :'Time'
94109
}
95110
end
96111

@@ -100,7 +115,7 @@ def self.openapi_nullable
100115
:default_price_id,
101116
:description,
102117
:unit_label,
103-
:url
118+
:url,
104119
])
105120
end
106121

@@ -132,6 +147,12 @@ def initialize(attributes = {})
132147
self.id = nil
133148
end
134149

150+
if attributes.key?(:livemode)
151+
self.livemode = attributes[:livemode]
152+
else
153+
self.livemode = nil
154+
end
155+
135156
if attributes.key?(:name)
136157
self.name = attributes[:name]
137158
else
@@ -167,6 +188,18 @@ def initialize(attributes = {})
167188
else
168189
self.url = nil
169190
end
191+
192+
if attributes.key?(:created_at)
193+
self.created_at = attributes[:created_at]
194+
else
195+
self.created_at = nil
196+
end
197+
198+
if attributes.key?(:updated_at)
199+
self.updated_at = attributes[:updated_at]
200+
else
201+
self.updated_at = nil
202+
end
170203
end
171204

172205
# Custom attribute writer method checking allowed values (enum).
@@ -189,6 +222,16 @@ def id=(id)
189222
@id = id
190223
end
191224

225+
# Custom attribute writer method with validation
226+
# @param [Object] livemode Value to be assigned
227+
def livemode=(livemode)
228+
if livemode.nil?
229+
raise ArgumentError, 'livemode cannot be nil'
230+
end
231+
232+
@livemode = livemode
233+
end
234+
192235
# Custom attribute writer method with validation
193236
# @param [Object] name Value to be assigned
194237
def name=(name)
@@ -209,19 +252,42 @@ def active=(active)
209252
@active = active
210253
end
211254

255+
# Custom attribute writer method with validation
256+
# @param [Object] created_at Value to be assigned
257+
def created_at=(created_at)
258+
if created_at.nil?
259+
raise ArgumentError, 'created_at cannot be nil'
260+
end
261+
262+
@created_at = created_at
263+
end
264+
265+
# Custom attribute writer method with validation
266+
# @param [Object] updated_at Value to be assigned
267+
def updated_at=(updated_at)
268+
if updated_at.nil?
269+
raise ArgumentError, 'updated_at cannot be nil'
270+
end
271+
272+
@updated_at = updated_at
273+
end
274+
212275
# Checks equality by comparing each attribute.
213276
# @param [Object] Object to be compared
214277
def ==(o)
215278
return true if self.equal?(o)
216279
self.class == o.class &&
217280
object == o.object &&
218281
id == o.id &&
282+
livemode == o.livemode &&
219283
name == o.name &&
220284
active == o.active &&
221285
default_price_id == o.default_price_id &&
222286
description == o.description &&
223287
unit_label == o.unit_label &&
224-
url == o.url
288+
url == o.url &&
289+
created_at == o.created_at &&
290+
updated_at == o.updated_at
225291
end
226292

227293
# @see the `==` method
@@ -233,7 +299,7 @@ def eql?(o)
233299
# Calculates hash code according to all attributes.
234300
# @return [Integer] Hash code
235301
def hash
236-
[object, id, name, active, default_price_id, description, unit_label, url].hash
302+
[object, id, livemode, name, active, default_price_id, description, unit_label, url, created_at, updated_at].hash
237303
end
238304

239305
# Builds the object from hash

0 commit comments

Comments
 (0)