From 887dab0b8867f5bb499968af2053a32df8f469c8 Mon Sep 17 00:00:00 2001 From: SDK Distribution Bot Date: Mon, 1 Jun 2026 07:14:24 +0000 Subject: [PATCH] feat: Update SDK from generator (2026-06-01) --- Gemfile.lock | 2 +- README.md | 6 +- docs/CustomerUpdateRequest.md | 2 +- docs/LineItemRequest.md | 4 +- docs/PriceDataRequest.md | 24 ++ docs/ProductDataRequest.md | 20 ++ lib/payjpv2.rb | 2 + lib/payjpv2/models/customer_update_request.rb | 2 +- lib/payjpv2/models/line_item_request.rb | 26 +- lib/payjpv2/models/price_data_request.rb | 286 ++++++++++++++++++ lib/payjpv2/models/product_data_request.rb | 228 ++++++++++++++ lib/payjpv2/version.rb | 2 +- spec/models/line_item_request_spec.rb | 6 + spec/models/price_data_request_spec.rb | 54 ++++ spec/models/product_data_request_spec.rb | 42 +++ 15 files changed, 685 insertions(+), 21 deletions(-) create mode 100644 docs/PriceDataRequest.md create mode 100644 docs/ProductDataRequest.md create mode 100644 lib/payjpv2/models/price_data_request.rb create mode 100644 lib/payjpv2/models/product_data_request.rb create mode 100644 spec/models/price_data_request_spec.rb create mode 100644 spec/models/product_data_request_spec.rb diff --git a/Gemfile.lock b/Gemfile.lock index 8dd1863..1533f79 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - payjpv2 (1.0.11) + payjpv2 (1.1.0) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/README.md b/README.md index 8df7d51..25e115b 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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: @@ -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) diff --git a/docs/CustomerUpdateRequest.md b/docs/CustomerUpdateRequest.md index 03531be..e6564d2 100644 --- a/docs/CustomerUpdateRequest.md +++ b/docs/CustomerUpdateRequest.md @@ -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] | diff --git a/docs/LineItemRequest.md b/docs/LineItemRequest.md index f94b5ec..d14c2d5 100644 --- a/docs/LineItemRequest.md +++ b/docs/LineItemRequest.md @@ -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] | @@ -15,6 +16,7 @@ require 'payjpv2' instance = PAYJPv2::LineItemRequest.new( price_id: null, + price_data: null, quantity: null, tax_rates: null ) diff --git a/docs/PriceDataRequest.md b/docs/PriceDataRequest.md new file mode 100644 index 0000000..779a0ee --- /dev/null +++ b/docs/PriceDataRequest.md @@ -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 +) +``` + diff --git a/docs/ProductDataRequest.md b/docs/ProductDataRequest.md new file mode 100644 index 0000000..a54f099 --- /dev/null +++ b/docs/ProductDataRequest.md @@ -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 +) +``` + diff --git a/lib/payjpv2.rb b/lib/payjpv2.rb index 0de0e3f..2e71bca 100644 --- a/lib/payjpv2.rb +++ b/lib/payjpv2.rb @@ -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' diff --git a/lib/payjpv2/models/customer_update_request.rb b/lib/payjpv2/models/customer_update_request.rb index 3a8dcd7..2c9dbc3 100644 --- a/lib/payjpv2/models/customer_update_request.rb +++ b/lib/payjpv2/models/customer_update_request.rb @@ -15,6 +15,7 @@ module PAYJPv2 class CustomerUpdateRequest + # 支払いにデフォルトで使用される支払い方法 ID attr_accessor :default_payment_method_id # 顧客のメールアドレス。メールアドレスの形式が正しいかどうかは検証されます。 @@ -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 diff --git a/lib/payjpv2/models/line_item_request.rb b/lib/payjpv2/models/line_item_request.rb index 5986668..6018ede 100644 --- a/lib/payjpv2/models/line_item_request.rb +++ b/lib/payjpv2/models/line_item_request.rb @@ -15,9 +15,10 @@ module PAYJPv2 class LineItemRequest - # 料金 ID attr_accessor :price_id + attr_accessor :price_data + # 購入する商品の数量 attr_accessor :quantity @@ -28,6 +29,7 @@ class LineItemRequest def self.attribute_map { :price_id => :price_id, + :price_data => :price_data, :quantity => :quantity, :tax_rates => :tax_rates } @@ -47,6 +49,7 @@ def self.acceptable_attributes def self.openapi_types { :price_id => :'String', + :price_data => :'PriceDataRequest', :quantity => :'Integer', :tax_rates => :'Array' } @@ -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 @@ -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) @@ -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) @@ -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 @@ -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 diff --git a/lib/payjpv2/models/price_data_request.rb b/lib/payjpv2/models/price_data_request.rb new file mode 100644 index 0000000..5ae2001 --- /dev/null +++ b/lib/payjpv2/models/price_data_request.rb @@ -0,0 +1,286 @@ +=begin +#PAY.JP API v2 + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 2.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module PAYJPv2 + class PriceDataRequest + # 通貨。現在は `jpy` のみサポートしています。 + attr_accessor :currency + + # 単価(0以上の整数) + attr_accessor :unit_amount + + attr_accessor :product_id + + attr_accessor :product_data + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :currency => :currency, + :unit_amount => :unit_amount, + :product_id => :product_id, + :product_data => :product_data + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :currency => :'Currency', + :unit_amount => :'Integer', + :product_id => :'String', + :product_data => :'ProductDataRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :product_id, + :product_data + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + raise ArgumentError, "The input argument (attributes) must be a hash in `PAYJPv2::PriceDataRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + raise ArgumentError, "`#{k}` is not a valid attribute in `PAYJPv2::PriceDataRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:currency) + self.currency = attributes[:currency] + else + self.currency = nil + end + + if attributes.key?(:unit_amount) + self.unit_amount = attributes[:unit_amount] + else + self.unit_amount = nil + end + + if attributes.key?(:product_id) + self.product_id = attributes[:product_id] + end + + if attributes.key?(:product_data) + self.product_data = attributes[:product_data] + end + end + + # Custom attribute writer method with validation + # @param [Object] currency Value to be assigned + def currency=(currency) + if currency.nil? + raise ArgumentError, 'currency cannot be nil' + end + + @currency = currency + end + + # Custom attribute writer method with validation + # @param [Object] unit_amount Value to be assigned + def unit_amount=(unit_amount) + if unit_amount.nil? + raise ArgumentError, 'unit_amount cannot be nil' + end + + if unit_amount < 0 + raise ArgumentError, 'invalid value for "unit_amount", must be greater than or equal to 0.' + end + + @unit_amount = unit_amount + 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 && + currency == o.currency && + unit_amount == o.unit_amount && + product_id == o.product_id && + product_data == o.product_data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [currency, unit_amount, product_id, product_data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PAYJPv2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/payjpv2/models/product_data_request.rb b/lib/payjpv2/models/product_data_request.rb new file mode 100644 index 0000000..3abb925 --- /dev/null +++ b/lib/payjpv2/models/product_data_request.rb @@ -0,0 +1,228 @@ +=begin +#PAY.JP API v2 + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 2.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module PAYJPv2 + class ProductDataRequest + # Checkout などで顧客に表示される商品名 + attr_accessor :name + + attr_accessor :description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :name => :name, + :description => :description + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :name => :'String', + :description => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :description + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + raise ArgumentError, "The input argument (attributes) must be a hash in `PAYJPv2::ProductDataRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + raise ArgumentError, "`#{k}` is not a valid attribute in `PAYJPv2::ProductDataRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:name) + self.name = attributes[:name] + else + self.name = nil + end + + if attributes.key?(:description) + self.description = attributes[:description] + end + end + + # Custom attribute writer method with validation + # @param [Object] name Value to be assigned + def name=(name) + if name.nil? + raise ArgumentError, 'name cannot be nil' + end + + @name = name + 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 && + name == o.name && + description == o.description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PAYJPv2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/payjpv2/version.rb b/lib/payjpv2/version.rb index 9a6bb1f..cd457e3 100644 --- a/lib/payjpv2/version.rb +++ b/lib/payjpv2/version.rb @@ -11,5 +11,5 @@ =end module PAYJPv2 - VERSION = '1.0.11' + VERSION = '1.1.0' end diff --git a/spec/models/line_item_request_spec.rb b/spec/models/line_item_request_spec.rb index 014df85..ac40cd7 100644 --- a/spec/models/line_item_request_spec.rb +++ b/spec/models/line_item_request_spec.rb @@ -33,6 +33,12 @@ end end + describe 'test attribute "price_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "quantity"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/price_data_request_spec.rb b/spec/models/price_data_request_spec.rb new file mode 100644 index 0000000..4cb71f5 --- /dev/null +++ b/spec/models/price_data_request_spec.rb @@ -0,0 +1,54 @@ +=begin +#PAY.JP API v2 + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 2.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PAYJPv2::PriceDataRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PAYJPv2::PriceDataRequest do + let(:instance) { PAYJPv2::PriceDataRequest.new } + + describe 'test an instance of PriceDataRequest' do + it 'should create an instance of PriceDataRequest' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(PAYJPv2::PriceDataRequest) + end + end + + describe 'test attribute "currency"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "unit_amount"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "product_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "product_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/product_data_request_spec.rb b/spec/models/product_data_request_spec.rb new file mode 100644 index 0000000..38381b7 --- /dev/null +++ b/spec/models/product_data_request_spec.rb @@ -0,0 +1,42 @@ +=begin +#PAY.JP API v2 + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 2.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PAYJPv2::ProductDataRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PAYJPv2::ProductDataRequest do + let(:instance) { PAYJPv2::ProductDataRequest.new } + + describe 'test an instance of ProductDataRequest' do + it 'should create an instance of ProductDataRequest' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(PAYJPv2::ProductDataRequest) + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end