Class: UnivapayClientSdk::TransactionTokenListItem
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::TransactionTokenListItem
- Defined in:
- lib/univapay_client_sdk/models/transaction_token_list_item.rb
Overview
Transaction token entry returned in list responses.
Instance Attribute Summary collapse
-
#active ⇒ TrueClass | FalseClass
Whether the resource is active.
-
#created_on ⇒ DateTime
Timestamp when the resource was created.
-
#email ⇒ String
Customer email address.
-
#id ⇒ UUID | String
Unique identifier.
-
#merchant_name ⇒ String
Merchant display name.
-
#mode ⇒ String
Processing mode for the resource.
-
#payment_type ⇒ String
Payment method type.
-
#store_id ⇒ UUID | String
Store identifier.
-
#store_name ⇒ String
Store display name.
-
#type ⇒ String
Type of the resource.
-
#updated_on ⇒ DateTime
Timestamp when the resource was last updated.
-
#user_data ⇒ TransactionTokenListItemUserData
Transaction Token List Item User Data 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.
Instance Method Summary collapse
-
#initialize(id: SKIP, store_id: SKIP, merchant_name: SKIP, store_name: SKIP, email: SKIP, payment_type: SKIP, active: SKIP, mode: SKIP, type: SKIP, created_on: SKIP, updated_on: SKIP, user_data: SKIP, additional_properties: nil) ⇒ TransactionTokenListItem
constructor
A new instance of TransactionTokenListItem.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_created_on ⇒ Object
- #to_custom_updated_on ⇒ Object
-
#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(id: SKIP, store_id: SKIP, merchant_name: SKIP, store_name: SKIP, email: SKIP, payment_type: SKIP, active: SKIP, mode: SKIP, type: SKIP, created_on: SKIP, updated_on: SKIP, user_data: SKIP, additional_properties: nil) ⇒ TransactionTokenListItem
Returns a new instance of TransactionTokenListItem.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 102 def initialize(id: SKIP, store_id: SKIP, merchant_name: SKIP, store_name: SKIP, email: SKIP, payment_type: SKIP, active: SKIP, mode: SKIP, type: SKIP, created_on: SKIP, updated_on: SKIP, user_data: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id unless id == SKIP @store_id = store_id unless store_id == SKIP @merchant_name = merchant_name unless merchant_name == SKIP @store_name = store_name unless store_name == SKIP @email = email unless email == SKIP @payment_type = payment_type unless payment_type == SKIP @active = active unless active == SKIP @mode = mode unless mode == SKIP @type = type unless type == SKIP @created_on = created_on unless created_on == SKIP @updated_on = updated_on unless updated_on == SKIP @user_data = user_data unless user_data == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#active ⇒ TrueClass | FalseClass
Whether the resource is active.
39 40 41 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 39 def active @active end |
#created_on ⇒ DateTime
Timestamp when the resource was created.
51 52 53 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 51 def created_on @created_on end |
#email ⇒ String
Customer email address.
31 32 33 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 31 def email @email end |
#id ⇒ UUID | String
Unique identifier.
15 16 17 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 15 def id @id end |
#merchant_name ⇒ String
Merchant display name.
23 24 25 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 23 def merchant_name @merchant_name end |
#mode ⇒ String
Processing mode for the resource.
43 44 45 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 43 def mode @mode end |
#payment_type ⇒ String
Payment method type.
35 36 37 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 35 def payment_type @payment_type end |
#store_id ⇒ UUID | String
Store identifier.
19 20 21 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 19 def store_id @store_id end |
#store_name ⇒ String
Store display name.
27 28 29 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 27 def store_name @store_name end |
#type ⇒ String
Type of the resource.
47 48 49 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 47 def type @type end |
#updated_on ⇒ DateTime
Timestamp when the resource was last updated.
55 56 57 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 55 def updated_on @updated_on end |
#user_data ⇒ TransactionTokenListItemUserData
Transaction Token List Item User Data schema.
59 60 61 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 59 def user_data @user_data end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 126 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP store_id = hash.key?('store_id') ? hash['store_id'] : SKIP merchant_name = hash.key?('merchant_name') ? hash['merchant_name'] : SKIP store_name = hash.key?('store_name') ? hash['store_name'] : SKIP email = hash.key?('email') ? hash['email'] : SKIP payment_type = hash.key?('payment_type') ? hash['payment_type'] : SKIP active = hash.key?('active') ? hash['active'] : SKIP mode = hash.key?('mode') ? hash['mode'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP created_on = if hash.key?('created_on') (DateTimeHelper.from_rfc3339(hash['created_on']) if hash['created_on']) else SKIP end updated_on = if hash.key?('updated_on') (DateTimeHelper.from_rfc3339(hash['updated_on']) if hash['updated_on']) else SKIP end user_data = TransactionTokenListItemUserData.from_hash(hash['user_data']) if hash['user_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. TransactionTokenListItem.new(id: id, store_id: store_id, merchant_name: merchant_name, store_name: store_name, email: email, payment_type: payment_type, active: active, mode: mode, type: type, created_on: created_on, updated_on: updated_on, user_data: user_data, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 62 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['store_id'] = 'store_id' @_hash['merchant_name'] = 'merchant_name' @_hash['store_name'] = 'store_name' @_hash['email'] = 'email' @_hash['payment_type'] = 'payment_type' @_hash['active'] = 'active' @_hash['mode'] = 'mode' @_hash['type'] = 'type' @_hash['created_on'] = 'created_on' @_hash['updated_on'] = 'updated_on' @_hash['user_data'] = 'user_data' @_hash end |
.nullables ⇒ Object
An array for nullable fields
98 99 100 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 98 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 80 def self.optionals %w[ id store_id merchant_name store_name email payment_type active mode type created_on updated_on user_data ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
194 195 196 197 198 199 200 201 202 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 194 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, store_id: #{@store_id.inspect}, merchant_name:"\ " #{@merchant_name.inspect}, store_name: #{@store_name.inspect}, email: #{@email.inspect},"\ " payment_type: #{@payment_type.inspect}, active: #{@active.inspect}, mode:"\ " #{@mode.inspect}, type: #{@type.inspect}, created_on: #{@created_on.inspect}, updated_on:"\ " #{@updated_on.inspect}, user_data: #{@user_data.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_custom_created_on ⇒ Object
175 176 177 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 175 def to_custom_created_on DateTimeHelper.to_rfc3339(created_on) end |
#to_custom_updated_on ⇒ Object
179 180 181 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 179 def to_custom_updated_on DateTimeHelper.to_rfc3339(updated_on) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
184 185 186 187 188 189 190 191 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_item.rb', line 184 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, store_id: #{@store_id}, merchant_name: #{@merchant_name},"\ " store_name: #{@store_name}, email: #{@email}, payment_type: #{@payment_type}, active:"\ " #{@active}, mode: #{@mode}, type: #{@type}, created_on: #{@created_on}, updated_on:"\ " #{@updated_on}, user_data: #{@user_data}, additional_properties:"\ " #{@additional_properties}>" end |