Class: AdvancedBilling::GetOneTimeTokenBankAccountPaymentProfile
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::GetOneTimeTokenBankAccountPaymentProfile
- Defined in:
- lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb
Overview
GetOneTimeTokenBankAccountPaymentProfile Model.
Instance Attribute Summary collapse
-
#bank_account_holder_type ⇒ BankAccountHolderType
Defaults to personal.
-
#bank_account_type ⇒ BankAccountType
Defaults to checking.
-
#bank_name ⇒ String
The vault that stores the payment profile with the provided vault_token.
-
#billing_address ⇒ String
The vault that stores the payment profile with the provided vault_token.
-
#billing_address_2 ⇒ String
The vault that stores the payment profile with the provided vault_token.
-
#billing_city ⇒ String
The vault that stores the payment profile with the provided vault_token.
-
#billing_country ⇒ String
The vault that stores the payment profile with the provided vault_token.
-
#billing_state ⇒ String
The vault that stores the payment profile with the provided vault_token.
-
#billing_zip ⇒ String
The vault that stores the payment profile with the provided vault_token.
-
#current_vault ⇒ BankAccountVault
The vault that stores the payment profile with the provided vault_token.
-
#customer_id ⇒ String
TODO: Write general description for this method.
-
#customer_vault_token ⇒ String
Defaults to personal.
-
#disabled ⇒ TrueClass | FalseClass
Defaults to personal.
-
#first_name ⇒ String
TODO: Write general description for this method.
-
#gateway_handle ⇒ String
Defaults to personal.
-
#id ⇒ String
TODO: Write general description for this method.
-
#last_name ⇒ String
TODO: Write general description for this method.
-
#masked_bank_account_number ⇒ String
The vault that stores the payment profile with the provided vault_token.
-
#masked_bank_routing_number ⇒ String
The vault that stores the payment profile with the provided vault_token.
-
#payment_type ⇒ String
Defaults to personal.
-
#site_gateway_setting_id ⇒ Integer
Defaults to personal.
-
#vault_token ⇒ String
The vault that stores the payment profile with the provided vault_token.
-
#verified ⇒ TrueClass | FalseClass
Defaults to personal.
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(first_name:, last_name:, current_vault:, vault_token:, billing_address:, billing_city:, billing_country:, billing_state:, billing_zip:, bank_name:, masked_bank_routing_number:, masked_bank_account_number:, bank_account_type:, bank_account_holder_type:, payment_type:, disabled:, site_gateway_setting_id:, id: SKIP, customer_id: SKIP, billing_address_2: SKIP, customer_vault_token: SKIP, gateway_handle: SKIP, verified: SKIP, additional_properties: {}) ⇒ GetOneTimeTokenBankAccountPaymentProfile
constructor
A new instance of GetOneTimeTokenBankAccountPaymentProfile.
-
#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, #get_additional_properties, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(first_name:, last_name:, current_vault:, vault_token:, billing_address:, billing_city:, billing_country:, billing_state:, billing_zip:, bank_name:, masked_bank_routing_number:, masked_bank_account_number:, bank_account_type:, bank_account_holder_type:, payment_type:, disabled:, site_gateway_setting_id:, id: SKIP, customer_id: SKIP, billing_address_2: SKIP, customer_vault_token: SKIP, gateway_handle: SKIP, verified: SKIP, additional_properties: {}) ⇒ GetOneTimeTokenBankAccountPaymentProfile
Returns a new instance of GetOneTimeTokenBankAccountPaymentProfile.
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 167 def initialize(first_name:, last_name:, current_vault:, vault_token:, billing_address:, billing_city:, billing_country:, billing_state:, billing_zip:, bank_name:, masked_bank_routing_number:, masked_bank_account_number:, bank_account_type:, bank_account_holder_type:, payment_type:, disabled:, site_gateway_setting_id:, id: SKIP, customer_id: SKIP, billing_address_2: SKIP, customer_vault_token: SKIP, gateway_handle: SKIP, verified: SKIP, additional_properties: {}) # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end @id = id unless id == SKIP @first_name = first_name @last_name = last_name @customer_id = customer_id unless customer_id == SKIP @current_vault = current_vault @vault_token = vault_token @billing_address = billing_address @billing_address_2 = billing_address_2 unless billing_address_2 == SKIP @billing_city = billing_city @billing_country = billing_country @billing_state = billing_state @billing_zip = billing_zip @bank_name = bank_name @masked_bank_routing_number = masked_bank_routing_number @masked_bank_account_number = masked_bank_account_number @bank_account_type = bank_account_type @bank_account_holder_type = bank_account_holder_type @payment_type = payment_type @disabled = disabled @site_gateway_setting_id = site_gateway_setting_id @customer_vault_token = customer_vault_token unless customer_vault_token == SKIP @gateway_handle = gateway_handle unless gateway_handle == SKIP @verified = verified unless verified == SKIP end |
Instance Attribute Details
#bank_account_holder_type ⇒ BankAccountHolderType
Defaults to personal
89 90 91 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 89 def bank_account_holder_type @bank_account_holder_type end |
#bank_account_type ⇒ BankAccountType
Defaults to checking
85 86 87 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 85 def bank_account_type @bank_account_type end |
#bank_name ⇒ String
The vault that stores the payment profile with the provided vault_token.
Use bogus for testing.
71 72 73 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 71 def bank_name @bank_name end |
#billing_address ⇒ String
The vault that stores the payment profile with the provided vault_token.
Use bogus for testing.
41 42 43 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 41 def billing_address @billing_address end |
#billing_address_2 ⇒ String
The vault that stores the payment profile with the provided vault_token.
Use bogus for testing.
46 47 48 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 46 def billing_address_2 @billing_address_2 end |
#billing_city ⇒ String
The vault that stores the payment profile with the provided vault_token.
Use bogus for testing.
51 52 53 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 51 def billing_city @billing_city end |
#billing_country ⇒ String
The vault that stores the payment profile with the provided vault_token.
Use bogus for testing.
56 57 58 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 56 def billing_country @billing_country end |
#billing_state ⇒ String
The vault that stores the payment profile with the provided vault_token.
Use bogus for testing.
61 62 63 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 61 def billing_state @billing_state end |
#billing_zip ⇒ String
The vault that stores the payment profile with the provided vault_token.
Use bogus for testing.
66 67 68 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 66 def billing_zip @billing_zip end |
#current_vault ⇒ BankAccountVault
The vault that stores the payment profile with the provided vault_token.
Use bogus for testing.
31 32 33 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 31 def current_vault @current_vault end |
#customer_id ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 26 def customer_id @customer_id end |
#customer_vault_token ⇒ String
Defaults to personal
105 106 107 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 105 def customer_vault_token @customer_vault_token end |
#disabled ⇒ TrueClass | FalseClass
Defaults to personal
97 98 99 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 97 def disabled @disabled end |
#first_name ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 18 def first_name @first_name end |
#gateway_handle ⇒ String
Defaults to personal
109 110 111 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 109 def gateway_handle @gateway_handle end |
#id ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 14 def id @id end |
#last_name ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 22 def last_name @last_name end |
#masked_bank_account_number ⇒ String
The vault that stores the payment profile with the provided vault_token.
Use bogus for testing.
81 82 83 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 81 def masked_bank_account_number @masked_bank_account_number end |
#masked_bank_routing_number ⇒ String
The vault that stores the payment profile with the provided vault_token.
Use bogus for testing.
76 77 78 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 76 def masked_bank_routing_number @masked_bank_routing_number end |
#payment_type ⇒ String
Defaults to personal
93 94 95 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 93 def payment_type @payment_type end |
#site_gateway_setting_id ⇒ Integer
Defaults to personal
101 102 103 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 101 def site_gateway_setting_id @site_gateway_setting_id end |
#vault_token ⇒ String
The vault that stores the payment profile with the provided vault_token.
Use bogus for testing.
36 37 38 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 36 def vault_token @vault_token end |
#verified ⇒ TrueClass | FalseClass
Defaults to personal
113 114 115 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 113 def verified @verified end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 207 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. first_name = hash.key?('first_name') ? hash['first_name'] : nil last_name = hash.key?('last_name') ? hash['last_name'] : nil current_vault = hash.key?('current_vault') ? hash['current_vault'] : nil vault_token = hash.key?('vault_token') ? hash['vault_token'] : nil billing_address = hash.key?('billing_address') ? hash['billing_address'] : nil billing_city = hash.key?('billing_city') ? hash['billing_city'] : nil billing_country = hash.key?('billing_country') ? hash['billing_country'] : nil billing_state = hash.key?('billing_state') ? hash['billing_state'] : nil billing_zip = hash.key?('billing_zip') ? hash['billing_zip'] : nil bank_name = hash.key?('bank_name') ? hash['bank_name'] : nil masked_bank_routing_number = hash.key?('masked_bank_routing_number') ? hash['masked_bank_routing_number'] : nil masked_bank_account_number = hash.key?('masked_bank_account_number') ? hash['masked_bank_account_number'] : nil bank_account_type = hash.key?('bank_account_type') ? hash['bank_account_type'] : nil bank_account_holder_type = hash.key?('bank_account_holder_type') ? hash['bank_account_holder_type'] : nil payment_type = hash.key?('payment_type') ? hash['payment_type'] : nil disabled = hash.key?('disabled') ? hash['disabled'] : nil site_gateway_setting_id = hash.key?('site_gateway_setting_id') ? hash['site_gateway_setting_id'] : nil id = hash.key?('id') ? hash['id'] : SKIP customer_id = hash.key?('customer_id') ? hash['customer_id'] : SKIP billing_address_2 = hash.key?('billing_address_2') ? hash['billing_address_2'] : SKIP customer_vault_token = hash.key?('customer_vault_token') ? hash['customer_vault_token'] : SKIP gateway_handle = hash.key?('gateway_handle') ? hash['gateway_handle'] : SKIP verified = hash.key?('verified') ? hash['verified'] : SKIP # Clean out expected properties from Hash. additional_properties = hash.reject { |k, _| names.value?(k) } # Create object from extracted values. GetOneTimeTokenBankAccountPaymentProfile.new(first_name: first_name, last_name: last_name, current_vault: current_vault, vault_token: vault_token, billing_address: billing_address, billing_city: billing_city, billing_country: billing_country, billing_state: billing_state, billing_zip: billing_zip, bank_name: bank_name, masked_bank_routing_number: masked_bank_routing_number, masked_bank_account_number: masked_bank_account_number, bank_account_type: bank_account_type, bank_account_holder_type: bank_account_holder_type, payment_type: payment_type, disabled: disabled, site_gateway_setting_id: site_gateway_setting_id, id: id, customer_id: customer_id, billing_address_2: billing_address_2, customer_vault_token: customer_vault_token, gateway_handle: gateway_handle, verified: verified, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 116 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['first_name'] = 'first_name' @_hash['last_name'] = 'last_name' @_hash['customer_id'] = 'customer_id' @_hash['current_vault'] = 'current_vault' @_hash['vault_token'] = 'vault_token' @_hash['billing_address'] = 'billing_address' @_hash['billing_address_2'] = 'billing_address_2' @_hash['billing_city'] = 'billing_city' @_hash['billing_country'] = 'billing_country' @_hash['billing_state'] = 'billing_state' @_hash['billing_zip'] = 'billing_zip' @_hash['bank_name'] = 'bank_name' @_hash['masked_bank_routing_number'] = 'masked_bank_routing_number' @_hash['masked_bank_account_number'] = 'masked_bank_account_number' @_hash['bank_account_type'] = 'bank_account_type' @_hash['bank_account_holder_type'] = 'bank_account_holder_type' @_hash['payment_type'] = 'payment_type' @_hash['disabled'] = 'disabled' @_hash['site_gateway_setting_id'] = 'site_gateway_setting_id' @_hash['customer_vault_token'] = 'customer_vault_token' @_hash['gateway_handle'] = 'gateway_handle' @_hash['verified'] = 'verified' @_hash end |
.nullables ⇒ Object
An array for nullable fields
157 158 159 160 161 162 163 164 165 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 157 def self.nullables %w[ id customer_id customer_vault_token gateway_handle verified ] end |
.optionals ⇒ Object
An array for optional fields
145 146 147 148 149 150 151 152 153 154 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 145 def self.optionals %w[ id customer_id billing_address_2 customer_vault_token gateway_handle verified ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 277 def self.validate(value) if value.instance_of? self return ( APIHelper.valid_type?(value.first_name, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.last_name, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.current_vault, ->(val) { BankAccountVault.validate(val) }) and APIHelper.valid_type?(value.vault_token, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.billing_address, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.billing_city, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.billing_country, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.billing_state, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.billing_zip, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.bank_name, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.masked_bank_routing_number, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.masked_bank_account_number, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.bank_account_type, ->(val) { BankAccountType.validate(val) }) and APIHelper.valid_type?(value.bank_account_holder_type, ->(val) { BankAccountHolderType.validate(val) }) and APIHelper.valid_type?(value.payment_type, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.disabled, ->(val) { val.instance_of? TrueClass or val.instance_of? FalseClass }) and APIHelper.valid_type?(value.site_gateway_setting_id, ->(val) { val.instance_of? Integer }) ) end return false unless value.instance_of? Hash ( APIHelper.valid_type?(value['first_name'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['last_name'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['current_vault'], ->(val) { BankAccountVault.validate(val) }) and APIHelper.valid_type?(value['vault_token'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['billing_address'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['billing_city'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['billing_country'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['billing_state'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['billing_zip'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['bank_name'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['masked_bank_routing_number'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['masked_bank_account_number'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['bank_account_type'], ->(val) { BankAccountType.validate(val) }) and APIHelper.valid_type?(value['bank_account_holder_type'], ->(val) { BankAccountHolderType.validate(val) }) and APIHelper.valid_type?(value['payment_type'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['disabled'], ->(val) { val.instance_of? TrueClass or val.instance_of? FalseClass }) and APIHelper.valid_type?(value['site_gateway_setting_id'], ->(val) { val.instance_of? Integer }) ) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 375 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, first_name: #{@first_name.inspect}, last_name:"\ " #{@last_name.inspect}, customer_id: #{@customer_id.inspect}, current_vault:"\ " #{@current_vault.inspect}, vault_token: #{@vault_token.inspect}, billing_address:"\ " #{@billing_address.inspect}, billing_address_2: #{@billing_address_2.inspect},"\ " billing_city: #{@billing_city.inspect}, billing_country: #{@billing_country.inspect},"\ " billing_state: #{@billing_state.inspect}, billing_zip: #{@billing_zip.inspect}, bank_name:"\ " #{@bank_name.inspect}, masked_bank_routing_number: #{@masked_bank_routing_number.inspect},"\ " masked_bank_account_number: #{@masked_bank_account_number.inspect}, bank_account_type:"\ " #{@bank_account_type.inspect}, bank_account_holder_type:"\ " #{@bank_account_holder_type.inspect}, payment_type: #{@payment_type.inspect}, disabled:"\ " #{@disabled.inspect}, site_gateway_setting_id: #{@site_gateway_setting_id.inspect},"\ " customer_vault_token: #{@customer_vault_token.inspect}, gateway_handle:"\ " #{@gateway_handle.inspect}, verified: #{@verified.inspect}, additional_properties:"\ " #{get_additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/advanced_billing/models/get_one_time_token_bank_account_payment_profile.rb', line 358 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, first_name: #{@first_name}, last_name: #{@last_name},"\ " customer_id: #{@customer_id}, current_vault: #{@current_vault}, vault_token:"\ " #{@vault_token}, billing_address: #{@billing_address}, billing_address_2:"\ " #{@billing_address_2}, billing_city: #{@billing_city}, billing_country:"\ " #{@billing_country}, billing_state: #{@billing_state}, billing_zip: #{@billing_zip},"\ " bank_name: #{@bank_name}, masked_bank_routing_number: #{@masked_bank_routing_number},"\ " masked_bank_account_number: #{@masked_bank_account_number}, bank_account_type:"\ " #{@bank_account_type}, bank_account_holder_type: #{@bank_account_holder_type},"\ " payment_type: #{@payment_type}, disabled: #{@disabled}, site_gateway_setting_id:"\ " #{@site_gateway_setting_id}, customer_vault_token: #{@customer_vault_token},"\ " gateway_handle: #{@gateway_handle}, verified: #{@verified}, additional_properties:"\ " #{get_additional_properties}>" end |