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.6)
payjpv2 (1.0.7)
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.6
- Package version: 1.0.7
- 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.6'
gem 'payjpv2', '~> 1.0.7'
```

Then execute:
Expand Down
2 changes: 2 additions & 0 deletions docs/PaymentMethodsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ end

Create Payment Method

**このエンドポイントはテストモードでのみ使用できます。**

### Examples

```ruby
Expand Down
8 changes: 7 additions & 1 deletion docs/ProductDetailsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
| ---- | ---- | ----------- | ----- |
| **object** | **String** | | [optional][default to 'product'] |
| **id** | **String** | 商品 ID | |
| **livemode** | **Boolean** | 本番環境かどうか | |
| **name** | **String** | Checkout などで顧客に表示される商品名 | |
| **active** | **Boolean** | 商品が購入可能かどうか | |
| **default_price_id** | **String** | | |
| **description** | **String** | | |
| **unit_label** | **String** | | |
| **url** | **String** | | |
| **created_at** | **Time** | 作成日時 (UTC, ISO 8601 形式) | |
| **updated_at** | **Time** | 更新日時 (UTC, ISO 8601 形式) | |

## Example

Expand All @@ -21,12 +24,15 @@ require 'payjpv2'
instance = PAYJPv2::ProductDetailsResponse.new(
object: null,
id: null,
livemode: null,
name: null,
active: null,
default_price_id: null,
description: null,
unit_label: null,
url: null
url: null,
created_at: null,
updated_at: null
)
```

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

## Example
Expand All @@ -22,12 +25,15 @@ require 'payjpv2'
instance = PAYJPv2::TaxRateDetailsResponse.new(
object: null,
id: null,
livemode: null,
display_name: null,
inclusive: null,
percentage: null,
active: null,
country: null,
description: null,
created_at: null,
updated_at: null,
metadata: null
)
```
Expand Down
6 changes: 5 additions & 1 deletion docs/TaxRatesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ api_instance = PAYJPv2::TaxRatesApi.new
opts = {
limit: 56, # Integer | 取得するデータの最大件数
starting_after: 'starting_after_example', # String | このIDより後のデータを取得
ending_before: 'ending_before_example' # String | このIDより前のデータを取得
ending_before: 'ending_before_example', # String | このIDより前のデータを取得
active: true, # Boolean | この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。
inclusive: true # Boolean | 税込みかどうか。税込 = `true` 税抜 = `false`
}

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

### Return type

Expand Down
1 change: 1 addition & 0 deletions lib/payjpv2/api/payment_methods_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def attach_payment_method(payment_method_id, payment_method_attach_request, opts
end

# Create Payment Method
# **このエンドポイントはテストモードでのみ使用できます。**
# @param payment_method_create_request [PaymentMethodCreateRequest]
# @param [Hash] opts the optional parameters
# @option opts [String] :idempotency_key Idempotency key for the request
Expand Down
4 changes: 4 additions & 0 deletions lib/payjpv2/api/tax_rates_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ def create_tax_rate(tax_rate_create_request, opts = {})
# @option opts [Integer] :limit 取得するデータの最大件数 (default to 10)
# @option opts [String] :starting_after このIDより後のデータを取得
# @option opts [String] :ending_before このIDより前のデータを取得
# @option opts [Boolean] :active この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。
# @option opts [Boolean] :inclusive 税込みかどうか。税込 = `true` 税抜 = `false`
# @option opts [String] :idempotency_key Idempotency key for the request
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
# @return [TaxRateListResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
Expand All @@ -112,6 +114,8 @@ def get_all_tax_rates(opts = {})
query_params[:limit] = opts[:limit] if !opts[:limit].nil?
query_params[:starting_after] = opts[:starting_after] if !opts[:starting_after].nil?
query_params[:ending_before] = opts[:ending_before] if !opts[:ending_before].nil?
query_params[:active] = opts[:active] if !opts[:active].nil?
query_params[:inclusive] = opts[:inclusive] if !opts[:inclusive].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down
76 changes: 71 additions & 5 deletions lib/payjpv2/models/product_details_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class ProductDetailsResponse
# 商品 ID
attr_accessor :id

# 本番環境かどうか
attr_accessor :livemode

# Checkout などで顧客に表示される商品名
attr_accessor :name

Expand All @@ -34,6 +37,12 @@ class ProductDetailsResponse

attr_accessor :url

# 作成日時 (UTC, ISO 8601 形式)
attr_accessor :created_at

# 更新日時 (UTC, ISO 8601 形式)
attr_accessor :updated_at

class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values
Expand Down Expand Up @@ -61,12 +70,15 @@ def self.attribute_map
{
:object => :object,
:id => :id,
:livemode => :livemode,
:name => :name,
:active => :active,
:default_price_id => :default_price_id,
:description => :description,
:unit_label => :unit_label,
:url => :url
:url => :url,
:created_at => :created_at,
:updated_at => :updated_at
}
end

Expand All @@ -85,12 +97,15 @@ def self.openapi_types
{
:object => :'String',
:id => :'String',
:livemode => :'Boolean',
:name => :'String',
:active => :'Boolean',
:default_price_id => :'String',
:description => :'String',
:unit_label => :'String',
:url => :'String'
:url => :'String',
:created_at => :'Time',
:updated_at => :'Time'
}
end

Expand All @@ -100,7 +115,7 @@ def self.openapi_nullable
:default_price_id,
:description,
:unit_label,
:url
:url,
])
end

Expand Down Expand Up @@ -132,6 +147,12 @@ def initialize(attributes = {})
self.id = nil
end

if attributes.key?(:livemode)
self.livemode = attributes[:livemode]
else
self.livemode = nil
end

if attributes.key?(:name)
self.name = attributes[:name]
else
Expand Down Expand Up @@ -167,6 +188,18 @@ def initialize(attributes = {})
else
self.url = nil
end

if attributes.key?(:created_at)
self.created_at = attributes[:created_at]
else
self.created_at = nil
end

if attributes.key?(:updated_at)
self.updated_at = attributes[:updated_at]
else
self.updated_at = nil
end
end

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

# Custom attribute writer method with validation
# @param [Object] livemode Value to be assigned
def livemode=(livemode)
if livemode.nil?
raise ArgumentError, 'livemode cannot be nil'
end

@livemode = livemode
end

# Custom attribute writer method with validation
# @param [Object] name Value to be assigned
def name=(name)
Expand All @@ -209,19 +252,42 @@ def active=(active)
@active = active
end

# Custom attribute writer method with validation
# @param [Object] created_at Value to be assigned
def created_at=(created_at)
if created_at.nil?
raise ArgumentError, 'created_at cannot be nil'
end

@created_at = created_at
end

# Custom attribute writer method with validation
# @param [Object] updated_at Value to be assigned
def updated_at=(updated_at)
if updated_at.nil?
raise ArgumentError, 'updated_at cannot be nil'
end

@updated_at = updated_at
end

# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
object == o.object &&
id == o.id &&
livemode == o.livemode &&
name == o.name &&
active == o.active &&
default_price_id == o.default_price_id &&
description == o.description &&
unit_label == o.unit_label &&
url == o.url
url == o.url &&
created_at == o.created_at &&
updated_at == o.updated_at
end

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

# Builds the object from hash
Expand Down
Loading
Loading