Class: UnivapayClientSdk::BaseKonbiniData
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::BaseKonbiniData
- Defined in:
- lib/univapay_client_sdk/models/base_konbini_data.rb
Overview
Base Konbini Data schema.
Instance Attribute Summary collapse
-
#convenience_store ⇒ BaseKonbiniDataConvenienceStore
Base Konbini Data Convenience Store schema.
-
#customer_name ⇒ String
Customer name.
-
#expiration_period ⇒ String
ISO-8601 Duration (e.g., 'P7D').
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(customer_name: SKIP, convenience_store: SKIP, expiration_period: SKIP, additional_properties: nil) ⇒ BaseKonbiniData
constructor
A new instance of BaseKonbiniData.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(customer_name: SKIP, convenience_store: SKIP, expiration_period: SKIP, additional_properties: nil) ⇒ BaseKonbiniData
Returns a new instance of BaseKonbiniData.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/univapay_client_sdk/models/base_konbini_data.rb', line 47 def initialize(customer_name: SKIP, convenience_store: SKIP, expiration_period: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @customer_name = customer_name unless customer_name == SKIP @convenience_store = convenience_store unless convenience_store == SKIP @expiration_period = expiration_period unless expiration_period == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#convenience_store ⇒ BaseKonbiniDataConvenienceStore
Base Konbini Data Convenience Store schema.
18 19 20 |
# File 'lib/univapay_client_sdk/models/base_konbini_data.rb', line 18 def convenience_store @convenience_store end |
#customer_name ⇒ String
Customer name.
14 15 16 |
# File 'lib/univapay_client_sdk/models/base_konbini_data.rb', line 14 def customer_name @customer_name end |
#expiration_period ⇒ String
ISO-8601 Duration (e.g., 'P7D'). Default is 30 days.
22 23 24 |
# File 'lib/univapay_client_sdk/models/base_konbini_data.rb', line 22 def expiration_period @expiration_period end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/univapay_client_sdk/models/base_konbini_data.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. customer_name = hash.key?('customer_name') ? hash['customer_name'] : SKIP convenience_store = hash.key?('convenience_store') ? hash['convenience_store'] : SKIP expiration_period = hash.key?('expiration_period') ? hash['expiration_period'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. BaseKonbiniData.new(customer_name: customer_name, convenience_store: convenience_store, expiration_period: expiration_period, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/univapay_client_sdk/models/base_konbini_data.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['customer_name'] = 'customer_name' @_hash['convenience_store'] = 'convenience_store' @_hash['expiration_period'] = 'expiration_period' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/univapay_client_sdk/models/base_konbini_data.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/univapay_client_sdk/models/base_konbini_data.rb', line 34 def self.optionals %w[ customer_name convenience_store expiration_period ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
92 93 94 95 96 97 |
# File 'lib/univapay_client_sdk/models/base_konbini_data.rb', line 92 def inspect class_name = self.class.name.split('::').last "<#{class_name} customer_name: #{@customer_name.inspect}, convenience_store:"\ " #{@convenience_store.inspect}, expiration_period: #{@expiration_period.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
84 85 86 87 88 89 |
# File 'lib/univapay_client_sdk/models/base_konbini_data.rb', line 84 def to_s class_name = self.class.name.split('::').last "<#{class_name} customer_name: #{@customer_name}, convenience_store: #{@convenience_store},"\ " expiration_period: #{@expiration_period}, additional_properties:"\ " #{@additional_properties}>" end |