Class: FdxV660Api::AccountPaymentNetwork
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::AccountPaymentNetwork
- Defined in:
- lib/fdx_v660_api/models/account_payment_network.rb
Overview
This provides details required to execute a transaction against the account
within the payment network. Replaces data elements formerly on
AccountDescriptor and Account. If identifier is ACCOUNT_NUMBER or
IBAN this is sensitive data which should only be exchanged if encrypted.
For detailed information on implementing encryption see the FDX CSDF API
Security Model document's "Part 2 FDX Message Encryption" in the Security
folder of the latest FDX Release download.
Instance Attribute Summary collapse
-
#bank_id ⇒ String
Bank identifier used by the payment network.
-
#bank_id_type ⇒ BankIdType2
If not specified, bankId should be interpreted as ABA for US accounts and be omitted for Canadian accounts (which use bankInstitutionId and bankTransitId).
-
#bank_institution_id ⇒ String
The Canadian 3-digit Institution (FID) associated with the account number, including leading zeros.
-
#bank_transit_id ⇒ String
The Canadian 5-digit Transit number associated with the account number, including leading zeros.
-
#identifier ⇒ String
The number used to identify the account within the payment network.
-
#identifier_type ⇒ PaymentNetworkIdentifierType3
The type of account
identifiere.g. -
#payment_network_id ⇒ String
The unique identifier for a payment network pair of
bankIdand accountidentifier. -
#status ⇒ AccountPaymentNetworkStatus2
Current status of the account
identifierandbankIdpair for this payment network, one ofACTIVE,SUSPENDEDorREVOKED. -
#supports_request_for_payment ⇒ TrueClass | FalseClass
Can receive Request for Payments.
-
#transfer_in ⇒ TrueClass | FalseClass
Can transfer funds to the account using this information.
-
#transfer_limits ⇒ IncomingAndOutgoingTransferLimits2
The amount limits for transfers over this payment network.
-
#transfer_out ⇒ TrueClass | FalseClass
Can transfer funds from the account over this payment network.
-
#type ⇒ PaymentNetworkType4
Type of Canadian or U.S.
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(bank_id:, identifier:, identifier_type:, type:, payment_network_id: SKIP, bank_id_type: SKIP, status: SKIP, transfer_in: SKIP, transfer_out: SKIP, supports_request_for_payment: SKIP, transfer_limits: SKIP, bank_institution_id: SKIP, bank_transit_id: SKIP, additional_properties: nil) ⇒ AccountPaymentNetwork
constructor
A new instance of AccountPaymentNetwork.
-
#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(bank_id:, identifier:, identifier_type:, type:, payment_network_id: SKIP, bank_id_type: SKIP, status: SKIP, transfer_in: SKIP, transfer_out: SKIP, supports_request_for_payment: SKIP, transfer_limits: SKIP, bank_institution_id: SKIP, bank_transit_id: SKIP, additional_properties: nil) ⇒ AccountPaymentNetwork
Returns a new instance of AccountPaymentNetwork.
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 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 126 def initialize(bank_id:, identifier:, identifier_type:, type:, payment_network_id: SKIP, bank_id_type: SKIP, status: SKIP, transfer_in: SKIP, transfer_out: SKIP, supports_request_for_payment: SKIP, transfer_limits: SKIP, bank_institution_id: SKIP, bank_transit_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @payment_network_id = payment_network_id unless payment_network_id == SKIP @bank_id = bank_id @bank_id_type = bank_id_type unless bank_id_type == SKIP @identifier = identifier @identifier_type = identifier_type @status = status unless status == SKIP @type = type @transfer_in = transfer_in unless transfer_in == SKIP @transfer_out = transfer_out unless transfer_out == SKIP unless supports_request_for_payment == SKIP @supports_request_for_payment = supports_request_for_payment end @transfer_limits = transfer_limits unless transfer_limits == SKIP @bank_institution_id = bank_institution_id unless bank_institution_id == SKIP @bank_transit_id = bank_transit_id unless bank_transit_id == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#bank_id ⇒ String
Bank identifier used by the payment network. Typically the 9-digit routing transit number (RTN) associated with the account number at a US institution. FDX v6.3 adds separate bankInstitutionId and bankTransitId properties and deprecates the prior approach to use this field for concatenated Canadian Institution IDs. Can also be BIC (SWIFT code) for international transfers or omitted entirely if not needed, such as for IBAN transfers or Canadian institutions.
35 36 37 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 35 def bank_id @bank_id end |
#bank_id_type ⇒ BankIdType2
If not specified, bankId should be interpreted as ABA for US accounts and be omitted for Canadian accounts (which use bankInstitutionId and bankTransitId)
41 42 43 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 41 def bank_id_type @bank_id_type end |
#bank_institution_id ⇒ String
The Canadian 3-digit Institution (FID) associated with the account number, including leading zeros
80 81 82 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 80 def bank_institution_id @bank_institution_id end |
#bank_transit_id ⇒ String
The Canadian 5-digit Transit number associated with the account number, including leading zeros
85 86 87 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 85 def bank_transit_id @bank_transit_id end |
#identifier ⇒ String
The number used to identify the account within the payment network
45 46 47 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 45 def identifier @identifier end |
#identifier_type ⇒ PaymentNetworkIdentifierType3
The type of account identifier e.g. ACCOUNT_NUMBER, IBAN, or
TOKENIZED_ACCOUNT_NUMBER
50 51 52 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 50 def identifier_type @identifier_type end |
#payment_network_id ⇒ String
The unique identifier for a payment network pair of bankId and account
identifier. Can be used across multiple payment network types if the
bankId and account identifier pair are also valid across those payment
network types. In that case lifecycle events and change requests for the
paymentNetworkId may need to also specify the applicable payment network
type(s)
25 26 27 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 25 def payment_network_id @payment_network_id end |
#status ⇒ AccountPaymentNetworkStatus2
Current status of the account identifier and bankId pair for this
payment network, one of ACTIVE, SUSPENDED or REVOKED
55 56 57 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 55 def status @status end |
#supports_request_for_payment ⇒ TrueClass | FalseClass
Can receive Request for Payments
71 72 73 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 71 def supports_request_for_payment @supports_request_for_payment end |
#transfer_in ⇒ TrueClass | FalseClass
Can transfer funds to the account using this information
63 64 65 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 63 def transfer_in @transfer_in end |
#transfer_limits ⇒ IncomingAndOutgoingTransferLimits2
The amount limits for transfers over this payment network
75 76 77 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 75 def transfer_limits @transfer_limits end |
#transfer_out ⇒ TrueClass | FalseClass
Can transfer funds from the account over this payment network
67 68 69 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 67 def transfer_out @transfer_out end |
#type ⇒ PaymentNetworkType4
Type of Canadian or U.S. payment network on which the account can be used
59 60 61 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 59 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
155 156 157 158 159 160 161 162 163 164 165 166 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 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 155 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. bank_id = hash.key?('bankId') ? hash['bankId'] : nil identifier = hash.key?('identifier') ? hash['identifier'] : nil identifier_type = hash.key?('identifierType') ? hash['identifierType'] : nil type = hash.key?('type') ? hash['type'] : nil payment_network_id = hash.key?('paymentNetworkId') ? hash['paymentNetworkId'] : SKIP bank_id_type = hash.key?('bankIdType') ? hash['bankIdType'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP transfer_in = hash.key?('transferIn') ? hash['transferIn'] : SKIP transfer_out = hash.key?('transferOut') ? hash['transferOut'] : SKIP supports_request_for_payment = hash.key?('supportsRequestForPayment') ? hash['supportsRequestForPayment'] : SKIP transfer_limits = IncomingAndOutgoingTransferLimits2.from_hash(hash['transferLimits']) if hash['transferLimits'] bank_institution_id = hash.key?('bankInstitutionId') ? hash['bankInstitutionId'] : SKIP bank_transit_id = hash.key?('bankTransitId') ? hash['bankTransitId'] : 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. AccountPaymentNetwork.new(bank_id: bank_id, identifier: identifier, identifier_type: identifier_type, type: type, payment_network_id: payment_network_id, bank_id_type: bank_id_type, status: status, transfer_in: transfer_in, transfer_out: transfer_out, supports_request_for_payment: supports_request_for_payment, transfer_limits: transfer_limits, bank_institution_id: bank_institution_id, bank_transit_id: bank_transit_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 88 def self.names @_hash = {} if @_hash.nil? @_hash['payment_network_id'] = 'paymentNetworkId' @_hash['bank_id'] = 'bankId' @_hash['bank_id_type'] = 'bankIdType' @_hash['identifier'] = 'identifier' @_hash['identifier_type'] = 'identifierType' @_hash['status'] = 'status' @_hash['type'] = 'type' @_hash['transfer_in'] = 'transferIn' @_hash['transfer_out'] = 'transferOut' @_hash['supports_request_for_payment'] = 'supportsRequestForPayment' @_hash['transfer_limits'] = 'transferLimits' @_hash['bank_institution_id'] = 'bankInstitutionId' @_hash['bank_transit_id'] = 'bankTransitId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
122 123 124 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 122 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 107 def self.optionals %w[ payment_network_id bank_id_type status transfer_in transfer_out supports_request_for_payment transfer_limits bank_institution_id bank_transit_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 216 def inspect class_name = self.class.name.split('::').last "<#{class_name} payment_network_id: #{@payment_network_id.inspect}, bank_id:"\ " #{@bank_id.inspect}, bank_id_type: #{@bank_id_type.inspect}, identifier:"\ " #{@identifier.inspect}, identifier_type: #{@identifier_type.inspect}, status:"\ " #{@status.inspect}, type: #{@type.inspect}, transfer_in: #{@transfer_in.inspect},"\ " transfer_out: #{@transfer_out.inspect}, supports_request_for_payment:"\ " #{@supports_request_for_payment.inspect}, transfer_limits: #{@transfer_limits.inspect},"\ " bank_institution_id: #{@bank_institution_id.inspect}, bank_transit_id:"\ " #{@bank_transit_id.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
204 205 206 207 208 209 210 211 212 213 |
# File 'lib/fdx_v660_api/models/account_payment_network.rb', line 204 def to_s class_name = self.class.name.split('::').last "<#{class_name} payment_network_id: #{@payment_network_id}, bank_id: #{@bank_id},"\ " bank_id_type: #{@bank_id_type}, identifier: #{@identifier}, identifier_type:"\ " #{@identifier_type}, status: #{@status}, type: #{@type}, transfer_in: #{@transfer_in},"\ " transfer_out: #{@transfer_out}, supports_request_for_payment:"\ " #{@supports_request_for_payment}, transfer_limits: #{@transfer_limits},"\ " bank_institution_id: #{@bank_institution_id}, bank_transit_id: #{@bank_transit_id},"\ " additional_properties: #{@additional_properties}>" end |