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.11)
payjpv2 (1.1.0)
typhoeus (~> 1.0, >= 1.0.1)

GEM
Expand Down
6 changes: 4 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.11
- Package version: 1.1.0
- 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.11'
gem 'payjpv2', '~> 1.1.0'
```

Then execute:
Expand Down Expand Up @@ -350,11 +350,13 @@ Class | Method | HTTP request | Description
- [PAYJPv2::PaymentTransactionResponse](docs/PaymentTransactionResponse.md)
- [PAYJPv2::PaymentTransactionType](docs/PaymentTransactionType.md)
- [PAYJPv2::PriceCreateRequest](docs/PriceCreateRequest.md)
- [PAYJPv2::PriceDataRequest](docs/PriceDataRequest.md)
- [PAYJPv2::PriceDetailsResponse](docs/PriceDetailsResponse.md)
- [PAYJPv2::PriceListResponse](docs/PriceListResponse.md)
- [PAYJPv2::PriceType](docs/PriceType.md)
- [PAYJPv2::PriceUpdateRequest](docs/PriceUpdateRequest.md)
- [PAYJPv2::ProductCreateRequest](docs/ProductCreateRequest.md)
- [PAYJPv2::ProductDataRequest](docs/ProductDataRequest.md)
- [PAYJPv2::ProductDeletedResponse](docs/ProductDeletedResponse.md)
- [PAYJPv2::ProductDetailsResponse](docs/ProductDetailsResponse.md)
- [PAYJPv2::ProductListResponse](docs/ProductListResponse.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/CustomerUpdateRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **default_payment_method_id** | **String** | | [optional] |
| **default_payment_method_id** | **String** | 支払いにデフォルトで使用される支払い方法 ID | [optional] |
| **email** | **String** | 顧客のメールアドレス。メールアドレスの形式が正しいかどうかは検証されます。 | [optional] |
| **description** | **String** | 顧客オブジェクトに付加できる任意の文字列です。管理画面で顧客と一緒に表示されます。 | [optional] |
| **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] |
Expand Down
4 changes: 3 additions & 1 deletion docs/LineItemRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **price_id** | **String** | 料金 ID | |
| **price_id** | **String** | | [optional] |
| **price_data** | [**PriceDataRequest**](PriceDataRequest.md) | | [optional] |
| **quantity** | **Integer** | 購入する商品の数量 | |
| **tax_rates** | **Array<String>** | 税率 ID | [optional] |

Expand All @@ -15,6 +16,7 @@ require 'payjpv2'

instance = PAYJPv2::LineItemRequest.new(
price_id: null,
price_data: null,
quantity: null,
tax_rates: null
)
Expand Down
24 changes: 24 additions & 0 deletions docs/PriceDataRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# PAYJPv2::PriceDataRequest

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **currency** | [**Currency**](Currency.md) | 通貨。現在は `jpy` のみサポートしています。 | |
| **unit_amount** | **Integer** | 単価(0以上の整数) | |
| **product_id** | **String** | | [optional] |
| **product_data** | [**ProductDataRequest**](ProductDataRequest.md) | | [optional] |

## Example

```ruby
require 'payjpv2'

instance = PAYJPv2::PriceDataRequest.new(
currency: null,
unit_amount: null,
product_id: null,
product_data: null
)
```

20 changes: 20 additions & 0 deletions docs/ProductDataRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# PAYJPv2::ProductDataRequest

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **name** | **String** | Checkout などで顧客に表示される商品名 | |
| **description** | **String** | | [optional] |

## Example

```ruby
require 'payjpv2'

instance = PAYJPv2::ProductDataRequest.new(
name: null,
description: null
)
```

2 changes: 2 additions & 0 deletions lib/payjpv2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@
require 'payjpv2/models/payment_transaction_response'
require 'payjpv2/models/payment_transaction_type'
require 'payjpv2/models/price_create_request'
require 'payjpv2/models/price_data_request'
require 'payjpv2/models/price_details_response'
require 'payjpv2/models/price_list_response'
require 'payjpv2/models/price_type'
require 'payjpv2/models/price_update_request'
require 'payjpv2/models/product_create_request'
require 'payjpv2/models/product_data_request'
require 'payjpv2/models/product_deleted_response'
require 'payjpv2/models/product_details_response'
require 'payjpv2/models/product_list_response'
Expand Down
2 changes: 1 addition & 1 deletion lib/payjpv2/models/customer_update_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

module PAYJPv2
class CustomerUpdateRequest
# 支払いにデフォルトで使用される支払い方法 ID
attr_accessor :default_payment_method_id

# 顧客のメールアドレス。メールアドレスの形式が正しいかどうかは検証されます。
Expand Down Expand Up @@ -59,7 +60,6 @@ def self.openapi_types
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
:default_payment_method_id,
])
end

Expand Down
26 changes: 12 additions & 14 deletions lib/payjpv2/models/line_item_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@

module PAYJPv2
class LineItemRequest
# 料金 ID
attr_accessor :price_id

attr_accessor :price_data

# 購入する商品の数量
attr_accessor :quantity

Expand All @@ -28,6 +29,7 @@ class LineItemRequest
def self.attribute_map
{
:price_id => :price_id,
:price_data => :price_data,
:quantity => :quantity,
:tax_rates => :tax_rates
}
Expand All @@ -47,6 +49,7 @@ def self.acceptable_attributes
def self.openapi_types
{
:price_id => :'String',
:price_data => :'PriceDataRequest',
:quantity => :'Integer',
:tax_rates => :'Array<String>'
}
Expand All @@ -55,6 +58,8 @@ def self.openapi_types
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
:price_id,
:price_data,
])
end

Expand All @@ -76,8 +81,10 @@ def initialize(attributes = {})

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

if attributes.key?(:price_data)
self.price_data = attributes[:price_data]
end

if attributes.key?(:quantity)
Expand All @@ -93,16 +100,6 @@ def initialize(attributes = {})
end
end

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

@price_id = price_id
end

# Custom attribute writer method with validation
# @param [Object] quantity Value to be assigned
def quantity=(quantity)
Expand All @@ -119,6 +116,7 @@ def ==(o)
return true if self.equal?(o)
self.class == o.class &&
price_id == o.price_id &&
price_data == o.price_data &&
quantity == o.quantity &&
tax_rates == o.tax_rates
end
Expand All @@ -132,7 +130,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[price_id, quantity, tax_rates].hash
[price_id, price_data, quantity, tax_rates].hash
end

# Builds the object from hash
Expand Down
Loading
Loading