Class: UnivapayClientSdk::TokenResponseKonbiniData
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::TokenResponseKonbiniData
- Defined in:
- lib/univapay_client_sdk/models/token_response_konbini_data.rb
Overview
Token Response 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').
-
#expiration_time_shift ⇒ String
Time shift applied to the expiration, typically pushing it to the end of the day in a specific timezone (e.g., '23:59:59.999999+09:00').
-
#phone_number ⇒ TokenResponsePhoneNumber
Token Response Phone Number schema.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(customer_name: SKIP, convenience_store: SKIP, expiration_period: SKIP, expiration_time_shift: SKIP, phone_number: SKIP, additional_properties: nil) ⇒ TokenResponseKonbiniData
constructor
A new instance of TokenResponseKonbiniData.
-
#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, expiration_time_shift: SKIP, phone_number: SKIP, additional_properties: nil) ⇒ TokenResponseKonbiniData
Returns a new instance of TokenResponseKonbiniData.
62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/univapay_client_sdk/models/token_response_konbini_data.rb', line 62 def initialize(customer_name: SKIP, convenience_store: SKIP, expiration_period: SKIP, expiration_time_shift: SKIP, phone_number: 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 @expiration_time_shift = expiration_time_shift unless expiration_time_shift == SKIP @phone_number = phone_number unless phone_number == 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/token_response_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/token_response_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/token_response_konbini_data.rb', line 22 def expiration_period @expiration_period end |
#expiration_time_shift ⇒ String
Time shift applied to the expiration, typically pushing it to the end of the day in a specific timezone (e.g., '23:59:59.999999+09:00').
27 28 29 |
# File 'lib/univapay_client_sdk/models/token_response_konbini_data.rb', line 27 def expiration_time_shift @expiration_time_shift end |
#phone_number ⇒ TokenResponsePhoneNumber
Token Response Phone Number schema.
31 32 33 |
# File 'lib/univapay_client_sdk/models/token_response_konbini_data.rb', line 31 def phone_number @phone_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/univapay_client_sdk/models/token_response_konbini_data.rb', line 77 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 expiration_time_shift = hash.key?('expiration_time_shift') ? hash['expiration_time_shift'] : SKIP phone_number = TokenResponsePhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] # 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. TokenResponseKonbiniData.new(customer_name: customer_name, convenience_store: convenience_store, expiration_period: expiration_period, expiration_time_shift: expiration_time_shift, phone_number: phone_number, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 41 42 |
# File 'lib/univapay_client_sdk/models/token_response_konbini_data.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['customer_name'] = 'customer_name' @_hash['convenience_store'] = 'convenience_store' @_hash['expiration_period'] = 'expiration_period' @_hash['expiration_time_shift'] = 'expiration_time_shift' @_hash['phone_number'] = 'phone_number' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 59 60 |
# File 'lib/univapay_client_sdk/models/token_response_konbini_data.rb', line 56 def self.nullables %w[ expiration_time_shift ] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 48 49 50 51 52 53 |
# File 'lib/univapay_client_sdk/models/token_response_konbini_data.rb', line 45 def self.optionals %w[ customer_name convenience_store expiration_period expiration_time_shift phone_number ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
109 110 111 112 113 114 115 |
# File 'lib/univapay_client_sdk/models/token_response_konbini_data.rb', line 109 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
127 128 129 130 131 132 133 |
# File 'lib/univapay_client_sdk/models/token_response_konbini_data.rb', line 127 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},"\ " expiration_time_shift: #{@expiration_time_shift.inspect}, phone_number:"\ " #{@phone_number.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
118 119 120 121 122 123 124 |
# File 'lib/univapay_client_sdk/models/token_response_konbini_data.rb', line 118 def to_s class_name = self.class.name.split('::').last "<#{class_name} customer_name: #{@customer_name}, convenience_store: #{@convenience_store},"\ " expiration_period: #{@expiration_period}, expiration_time_shift:"\ " #{@expiration_time_shift}, phone_number: #{@phone_number}, additional_properties:"\ " #{@additional_properties}>" end |