Class: UnivapayClientSdk::TransactionTokenCreateRequestMetadata
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::TransactionTokenCreateRequestMetadata
- Defined in:
- lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb
Overview
A free-form dictionary for custom metadata.
Instance Attribute Summary collapse
-
#univapay_customer_id ⇒ UUID | String
Customer ID.
-
#univapay_name ⇒ String
Consumer name passed to payment processors that require it (e.g., konbini, bank transfer).
-
#univapay_phone_number ⇒ String
Consumer phone number passed to payment processors that require it.
-
#univapay_reference_id ⇒ String
Any arbitrary value (Free format).
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(univapay_reference_id: SKIP, univapay_customer_id: SKIP, univapay_name: SKIP, univapay_phone_number: SKIP, additional_properties: nil) ⇒ TransactionTokenCreateRequestMetadata
constructor
A new instance of TransactionTokenCreateRequestMetadata.
-
#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(univapay_reference_id: SKIP, univapay_customer_id: SKIP, univapay_name: SKIP, univapay_phone_number: SKIP, additional_properties: nil) ⇒ TransactionTokenCreateRequestMetadata
Returns a new instance of TransactionTokenCreateRequestMetadata.
54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 54 def initialize(univapay_reference_id: SKIP, univapay_customer_id: SKIP, univapay_name: SKIP, univapay_phone_number: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @univapay_reference_id = univapay_reference_id unless univapay_reference_id == SKIP @univapay_customer_id = univapay_customer_id unless univapay_customer_id == SKIP @univapay_name = univapay_name unless univapay_name == SKIP @univapay_phone_number = univapay_phone_number unless univapay_phone_number == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#univapay_customer_id ⇒ UUID | String
Customer ID.
18 19 20 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 18 def univapay_customer_id @univapay_customer_id end |
#univapay_name ⇒ String
Consumer name passed to payment processors that require it (e.g., konbini, bank transfer).
23 24 25 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 23 def univapay_name @univapay_name end |
#univapay_phone_number ⇒ String
Consumer phone number passed to payment processors that require it.
27 28 29 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 27 def univapay_phone_number @univapay_phone_number end |
#univapay_reference_id ⇒ String
Any arbitrary value (Free format).
14 15 16 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 14 def univapay_reference_id @univapay_reference_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 68 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. univapay_reference_id = hash.key?('univapay-reference-id') ? hash['univapay-reference-id'] : SKIP univapay_customer_id = hash.key?('univapay-customer-id') ? hash['univapay-customer-id'] : SKIP univapay_name = hash.key?('univapay-name') ? hash['univapay-name'] : SKIP univapay_phone_number = hash.key?('univapay-phone-number') ? hash['univapay-phone-number'] : 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 { |x| APIHelper.deserialize_union_type(UnionTypeLookUp.get(:TransactionTokenCreateMetadataProps), x) } ) # Create object from extracted values. TransactionTokenCreateRequestMetadata.new(univapay_reference_id: univapay_reference_id, univapay_customer_id: univapay_customer_id, univapay_name: univapay_name, univapay_phone_number: univapay_phone_number, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['univapay_reference_id'] = 'univapay-reference-id' @_hash['univapay_customer_id'] = 'univapay-customer-id' @_hash['univapay_name'] = 'univapay-name' @_hash['univapay_phone_number'] = 'univapay-phone-number' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 40 def self.optionals %w[ univapay_reference_id univapay_customer_id univapay_name univapay_phone_number ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
99 100 101 102 103 104 105 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 99 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.
116 117 118 119 120 121 122 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 116 def inspect class_name = self.class.name.split('::').last "<#{class_name} univapay_reference_id: #{@univapay_reference_id.inspect},"\ " univapay_customer_id: #{@univapay_customer_id.inspect}, univapay_name:"\ " #{@univapay_name.inspect}, univapay_phone_number: #{@univapay_phone_number.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
108 109 110 111 112 113 |
# File 'lib/univapay_client_sdk/models/transaction_token_create_request_metadata.rb', line 108 def to_s class_name = self.class.name.split('::').last "<#{class_name} univapay_reference_id: #{@univapay_reference_id}, univapay_customer_id:"\ " #{@univapay_customer_id}, univapay_name: #{@univapay_name}, univapay_phone_number:"\ " #{@univapay_phone_number}, additional_properties: #{@additional_properties}>" end |