Class: Plaid::TransferAuthorizationProposedTransfer
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::TransferAuthorizationProposedTransfer
- Defined in:
- lib/plaid/models/transfer_authorization_proposed_transfer.rb
Overview
Details regarding the proposed transfer.
Instance Attribute Summary collapse
-
#account_id ⇒ String
The Plaid ‘account_id` for the account that will be debited or credited.
-
#ach_class ⇒ AchClass
Specifies the use case of the transfer.
-
#amount ⇒ String
The amount of the transfer (decimal string with two digits of precision e.g. “10.00”).
-
#network ⇒ String
The network or rails used for the transfer.
-
#origination_account_id ⇒ String
Plaid’s unique identifier for the origination account that was used for this transfer.
-
#type ⇒ TransferType1
The type of transfer.
-
#user ⇒ TransferUserInResponse
The legal name and other information for the account holder.
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(ach_class:, account_id:, type:, user:, amount:, network:, origination_account_id:, additional_properties: nil) ⇒ TransferAuthorizationProposedTransfer
constructor
A new instance of TransferAuthorizationProposedTransfer.
-
#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(ach_class:, account_id:, type:, user:, amount:, network:, origination_account_id:, additional_properties: nil) ⇒ TransferAuthorizationProposedTransfer
Returns a new instance of TransferAuthorizationProposedTransfer.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 86 def initialize(ach_class:, account_id:, type:, user:, amount:, network:, origination_account_id:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @ach_class = ach_class @account_id = account_id @type = type @user = user @amount = amount @network = network @origination_account_id = origination_account_id @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
The Plaid ‘account_id` for the account that will be debited or credited.
37 38 39 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 37 def account_id @account_id end |
#ach_class ⇒ AchClass
Specifies the use case of the transfer. Required for transfers on an ACH network. ‘“arc”` - Accounts Receivable Entry `“cbr`” - Cross Border Entry `“ccd”` - Corporate Credit or Debit - fund transfer between two corporate bank accounts `“cie”` - Customer Initiated Entry `“cor”` - Automated Notification of Change `“ctx”` - Corporate Trade Exchange `“iat”` - International `“mte”` - Machine Transfer Entry `“pbr”` - Cross Border Entry `“pop”` - Point-of-Purchase Entry `“pos”` - Point-of-Sale Entry `“ppd”` - Prearranged Payment or Deposit - the transfer is part of a pre-existing relationship with a consumer, eg. bill payment `“rck”` - Re-presented Check Entry `“tel”` - Telephone-Initiated Entry `“web”` - Internet-Initiated Entry - debits from a consumer’s account where their authorization is obtained over the Internet
33 34 35 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 33 def ach_class @ach_class end |
#amount ⇒ String
The amount of the transfer (decimal string with two digits of precision e.g. “10.00”).
52 53 54 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 52 def amount @amount end |
#network ⇒ String
The network or rails used for the transfer.
56 57 58 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 56 def network @network end |
#origination_account_id ⇒ String
Plaid’s unique identifier for the origination account that was used for this transfer.
61 62 63 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 61 def origination_account_id @origination_account_id end |
#type ⇒ TransferType1
The type of transfer. This will be either ‘debit` or `credit`. A `debit` indicates a transfer of money into the origination account; a `credit` indicates a transfer of money out of the origination account.
43 44 45 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 43 def type @type end |
#user ⇒ TransferUserInResponse
The legal name and other information for the account holder.
47 48 49 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 47 def user @user end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 102 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ach_class = hash.key?('ach_class') ? hash['ach_class'] : nil account_id = hash.key?('account_id') ? hash['account_id'] : nil type = hash.key?('type') ? hash['type'] : nil user = TransferUserInResponse.from_hash(hash['user']) if hash['user'] amount = hash.key?('amount') ? hash['amount'] : nil network = hash.key?('network') ? hash['network'] : nil origination_account_id = hash.key?('origination_account_id') ? hash['origination_account_id'] : nil # 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. TransferAuthorizationProposedTransfer.new(ach_class: ach_class, account_id: account_id, type: type, user: user, amount: amount, network: network, origination_account_id: origination_account_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 64 def self.names @_hash = {} if @_hash.nil? @_hash['ach_class'] = 'ach_class' @_hash['account_id'] = 'account_id' @_hash['type'] = 'type' @_hash['user'] = 'user' @_hash['amount'] = 'amount' @_hash['network'] = 'network' @_hash['origination_account_id'] = 'origination_account_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
82 83 84 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 82 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
77 78 79 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 77 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
142 143 144 145 146 147 148 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 142 def inspect class_name = self.class.name.split('::').last "<#{class_name} ach_class: #{@ach_class.inspect}, account_id: #{@account_id.inspect}, type:"\ " #{@type.inspect}, user: #{@user.inspect}, amount: #{@amount.inspect}, network:"\ " #{@network.inspect}, origination_account_id: #{@origination_account_id.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
134 135 136 137 138 139 |
# File 'lib/plaid/models/transfer_authorization_proposed_transfer.rb', line 134 def to_s class_name = self.class.name.split('::').last "<#{class_name} ach_class: #{@ach_class}, account_id: #{@account_id}, type: #{@type}, user:"\ " #{@user}, amount: #{@amount}, network: #{@network}, origination_account_id:"\ " #{@origination_account_id}, additional_properties: #{@additional_properties}>" end |