Class: UnivapayClientSdk::TransactionTokenUpdateRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::TransactionTokenUpdateRequest
- Defined in:
- lib/univapay_client_sdk/models/transaction_token_update_request.rb
Overview
Request payload for updating a transaction token.
Instance Attribute Summary collapse
-
#data ⇒ TransactionTokenUpdateRequestData
Transaction Token Update Request Data schema.
-
#email ⇒ String
Customer email address.
-
#metadata ⇒ GenericMetadata
A free-form dictionary for custom metadata.
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(email: SKIP, metadata: SKIP, data: SKIP, additional_properties: nil) ⇒ TransactionTokenUpdateRequest
constructor
A new instance of TransactionTokenUpdateRequest.
-
#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(email: SKIP, metadata: SKIP, data: SKIP, additional_properties: nil) ⇒ TransactionTokenUpdateRequest
Returns a new instance of TransactionTokenUpdateRequest.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/univapay_client_sdk/models/transaction_token_update_request.rb', line 47 def initialize(email: SKIP, metadata: SKIP, data: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @email = email unless email == SKIP @metadata = unless == SKIP @data = data unless data == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#data ⇒ TransactionTokenUpdateRequestData
Transaction Token Update Request Data schema.
22 23 24 |
# File 'lib/univapay_client_sdk/models/transaction_token_update_request.rb', line 22 def data @data end |
#email ⇒ String
Customer email address.
14 15 16 |
# File 'lib/univapay_client_sdk/models/transaction_token_update_request.rb', line 14 def email @email end |
#metadata ⇒ GenericMetadata
A free-form dictionary for custom metadata.
18 19 20 |
# File 'lib/univapay_client_sdk/models/transaction_token_update_request.rb', line 18 def @metadata 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 |
# File 'lib/univapay_client_sdk/models/transaction_token_update_request.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. email = hash.key?('email') ? hash['email'] : SKIP = GenericMetadata.from_hash(hash['metadata']) if hash['metadata'] data = TransactionTokenUpdateRequestData.from_hash(hash['data']) if hash['data'] # 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. TransactionTokenUpdateRequest.new(email: email, metadata: , data: data, 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/transaction_token_update_request.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['email'] = 'email' @_hash['metadata'] = 'metadata' @_hash['data'] = 'data' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/univapay_client_sdk/models/transaction_token_update_request.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/transaction_token_update_request.rb', line 34 def self.optionals %w[ email metadata data ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
89 90 91 92 93 |
# File 'lib/univapay_client_sdk/models/transaction_token_update_request.rb', line 89 def inspect class_name = self.class.name.split('::').last "<#{class_name} email: #{@email.inspect}, metadata: #{@metadata.inspect}, data:"\ " #{@data.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
82 83 84 85 86 |
# File 'lib/univapay_client_sdk/models/transaction_token_update_request.rb', line 82 def to_s class_name = self.class.name.split('::').last "<#{class_name} email: #{@email}, metadata: #{@metadata}, data: #{@data},"\ " additional_properties: #{@additional_properties}>" end |