Class: FdxV660Api::AssetTransferNetwork
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::AssetTransferNetwork
- Defined in:
- lib/fdx_v660_api/models/asset_transfer_network.rb
Overview
Information required to facilitate asset transfer from this account
Instance Attribute Summary collapse
-
#identifier ⇒ String
The number used to identify the account within the asset transfer network.
-
#identifier_type ⇒ PaymentNetworkIdentifierType1
Type of identifier.
-
#institution_id ⇒ String
Institution identifier used by the asset transfer network ie.
-
#institution_name ⇒ String
The name of the institution holding the account.
-
#joint_account ⇒ TrueClass | FalseClass
Whether this account has joint owners.
-
#type ⇒ AssetTransferType2
Type of asset transfer.
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(identifier: SKIP, identifier_type: SKIP, institution_name: SKIP, institution_id: SKIP, type: SKIP, joint_account: SKIP, additional_properties: nil) ⇒ AssetTransferNetwork
constructor
A new instance of AssetTransferNetwork.
-
#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(identifier: SKIP, identifier_type: SKIP, institution_name: SKIP, institution_id: SKIP, type: SKIP, joint_account: SKIP, additional_properties: nil) ⇒ AssetTransferNetwork
Returns a new instance of AssetTransferNetwork.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 70 def initialize(identifier: SKIP, identifier_type: SKIP, institution_name: SKIP, institution_id: SKIP, type: SKIP, joint_account: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @identifier = identifier unless identifier == SKIP @identifier_type = identifier_type unless identifier_type == SKIP @institution_name = institution_name unless institution_name == SKIP @institution_id = institution_id unless institution_id == SKIP @type = type unless type == SKIP @joint_account = joint_account unless joint_account == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#identifier ⇒ String
The number used to identify the account within the asset transfer network. If identifierType is ACCOUNT_NUMBER, this is the account number; if identifierType is TOKENIZED_ACCOUNT_NUMBER, this is a tokenized account number
17 18 19 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 17 def identifier @identifier end |
#identifier_type ⇒ PaymentNetworkIdentifierType1
Type of identifier
21 22 23 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 21 def identifier_type @identifier_type end |
#institution_id ⇒ String
Institution identifier used by the asset transfer network ie. the Depository Trust and Clearing Corporation code for the institution holding the account
31 32 33 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 31 def institution_id @institution_id end |
#institution_name ⇒ String
The name of the institution holding the account
25 26 27 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 25 def institution_name @institution_name end |
#joint_account ⇒ TrueClass | FalseClass
Whether this account has joint owners
39 40 41 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 39 def joint_account @joint_account end |
#type ⇒ AssetTransferType2
Type of asset transfer
35 36 37 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 35 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 86 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. identifier = hash.key?('identifier') ? hash['identifier'] : SKIP identifier_type = hash.key?('identifierType') ? hash['identifierType'] : SKIP institution_name = hash.key?('institutionName') ? hash['institutionName'] : SKIP institution_id = hash.key?('institutionId') ? hash['institutionId'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP joint_account = hash.key?('jointAccount') ? hash['jointAccount'] : 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. AssetTransferNetwork.new(identifier: identifier, identifier_type: identifier_type, institution_name: institution_name, institution_id: institution_id, type: type, joint_account: joint_account, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['identifier'] = 'identifier' @_hash['identifier_type'] = 'identifierType' @_hash['institution_name'] = 'institutionName' @_hash['institution_id'] = 'institutionId' @_hash['type'] = 'type' @_hash['joint_account'] = 'jointAccount' @_hash end |
.nullables ⇒ Object
An array for nullable fields
66 67 68 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 66 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 54 def self.optionals %w[ identifier identifier_type institution_name institution_id type joint_account ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
126 127 128 129 130 131 132 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 126 def inspect class_name = self.class.name.split('::').last "<#{class_name} identifier: #{@identifier.inspect}, identifier_type:"\ " #{@identifier_type.inspect}, institution_name: #{@institution_name.inspect},"\ " institution_id: #{@institution_id.inspect}, type: #{@type.inspect}, joint_account:"\ " #{@joint_account.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
117 118 119 120 121 122 123 |
# File 'lib/fdx_v660_api/models/asset_transfer_network.rb', line 117 def to_s class_name = self.class.name.split('::').last "<#{class_name} identifier: #{@identifier}, identifier_type: #{@identifier_type},"\ " institution_name: #{@institution_name}, institution_id: #{@institution_id}, type:"\ " #{@type}, joint_account: #{@joint_account}, additional_properties:"\ " #{@additional_properties}>" end |