Class: ModernTreasury::ExternalAccountVerifyRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ModernTreasury::ExternalAccountVerifyRequest
- Defined in:
- lib/modern_treasury/models/external_account_verify_request.rb
Overview
ExternalAccountVerifyRequest Model.
Instance Attribute Summary collapse
-
#currency ⇒ Currency
Three-letter ISO currency code.
-
#originating_account_id ⇒ UUID | String
The ID of the internal account where the micro-deposits originate from.
-
#payment_type ⇒ PaymentType4
Both ach and eft are supported payment types.
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(originating_account_id:, payment_type:, currency: SKIP, additional_properties: nil) ⇒ ExternalAccountVerifyRequest
constructor
A new instance of ExternalAccountVerifyRequest.
-
#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(originating_account_id:, payment_type:, currency: SKIP, additional_properties: nil) ⇒ ExternalAccountVerifyRequest
Returns a new instance of ExternalAccountVerifyRequest.
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 46 def initialize(originating_account_id:, payment_type:, currency: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @originating_account_id = originating_account_id @payment_type = payment_type @currency = currency unless currency == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#currency ⇒ Currency
Three-letter ISO currency code.
23 24 25 |
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 23 def currency @currency end |
#originating_account_id ⇒ UUID | String
The ID of the internal account where the micro-deposits originate from. Both credit and debit capabilities must be enabled.
15 16 17 |
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 15 def originating_account_id @originating_account_id end |
#payment_type ⇒ PaymentType4
Both ach and eft are supported payment types.
19 20 21 |
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 19 def payment_type @payment_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 58 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. originating_account_id = hash.key?('originating_account_id') ? hash['originating_account_id'] : nil payment_type = hash.key?('payment_type') ? hash['payment_type'] : nil currency = hash.key?('currency') ? hash['currency'] : 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 { |value| value } ) # Create object from extracted values. ExternalAccountVerifyRequest.new(originating_account_id: originating_account_id, payment_type: payment_type, currency: currency, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['originating_account_id'] = 'originating_account_id' @_hash['payment_type'] = 'payment_type' @_hash['currency'] = 'currency' @_hash end |
.nullables ⇒ Object
An array for nullable fields
42 43 44 |
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 42 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 |
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 35 def self.optionals %w[ currency ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
90 91 92 93 94 95 |
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 90 def inspect class_name = self.class.name.split('::').last "<#{class_name} originating_account_id: #{@originating_account_id.inspect}, payment_type:"\ " #{@payment_type.inspect}, currency: #{@currency.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
82 83 84 85 86 87 |
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 82 def to_s class_name = self.class.name.split('::').last "<#{class_name} originating_account_id: #{@originating_account_id}, payment_type:"\ " #{@payment_type}, currency: #{@currency}, additional_properties:"\ " #{@additional_properties}>" end |