Class: ModernTreasury::ExternalAccountVerifyRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/modern_treasury/models/external_account_verify_request.rb

Overview

ExternalAccountVerifyRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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 = nil, payment_type = nil, currency = SKIP) ⇒ ExternalAccountVerifyRequest

Returns a new instance of ExternalAccountVerifyRequest.



46
47
48
49
50
51
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 46

def initialize( = nil, payment_type = nil,
               currency = SKIP)
  @originating_account_id = 
  @payment_type = payment_type
  @currency = currency unless currency == SKIP
end

Instance Attribute Details

#currencyCurrencyEnum

Three-letter ISO currency code.

Returns:



23
24
25
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 23

def currency
  @currency
end

#originating_account_idUUID | String

The ID of the internal account where the micro-deposits originate from. Both credit and debit capabilities must be enabled.

Returns:

  • (UUID | String)


15
16
17
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 15

def 
  @originating_account_id
end

#payment_typePaymentType4Enum

Both ach and eft are supported payment types.

Returns:



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.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 54

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   =
    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 object from extracted values.
  ExternalAccountVerifyRequest.new(,
                                   payment_type,
                                   currency)
end

.namesObject

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

.nullablesObject

An array for nullable fields



42
43
44
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 42

def self.nullables
  []
end

.optionalsObject

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

#inspectObject

Provides a debugging-friendly string with detailed object information.



77
78
79
80
81
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 77

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}>"
end

#to_sObject

Provides a human-readable string representation of the object.



70
71
72
73
74
# File 'lib/modern_treasury/models/external_account_verify_request.rb', line 70

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} originating_account_id: #{@originating_account_id}, payment_type:"\
  " #{@payment_type}, currency: #{@currency}>"
end