Class: FdxV660Api::PaymentMethodEntity2
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::PaymentMethodEntity2
- Defined in:
- lib/fdx_v660_api/models/payment_method_entity2.rb
Overview
Payment method details
Instance Attribute Summary collapse
-
#external_clearing_system_identification1_code ⇒ String
Unique identifier code of the external clearing system.
-
#external_clearing_system_identification1_proprietary ⇒ String
For few examples where the payment rail is not part of the ISO 20022 scope.
-
#external_local_instrument1_code ⇒ String
Unique identifier code of the payment method rail as documented internally to the FI.
-
#payment_method_id ⇒ String
Unique identifier of the payment method.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(payment_method_id: SKIP, external_local_instrument1_code: SKIP, external_clearing_system_identification1_code: SKIP, external_clearing_system_identification1_proprietary: SKIP, additional_properties: nil) ⇒ PaymentMethodEntity2
constructor
A new instance of PaymentMethodEntity2.
-
#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(payment_method_id: SKIP, external_local_instrument1_code: SKIP, external_clearing_system_identification1_code: SKIP, external_clearing_system_identification1_proprietary: SKIP, additional_properties: nil) ⇒ PaymentMethodEntity2
Returns a new instance of PaymentMethodEntity2.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/fdx_v660_api/models/payment_method_entity2.rb', line 63 def initialize(payment_method_id: SKIP, external_local_instrument1_code: SKIP, external_clearing_system_identification1_code: SKIP, external_clearing_system_identification1_proprietary: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @payment_method_id = payment_method_id unless payment_method_id == SKIP unless external_local_instrument1_code == SKIP @external_local_instrument1_code = external_local_instrument1_code end unless external_clearing_system_identification1_code == SKIP @external_clearing_system_identification1_code = external_clearing_system_identification1_code end unless external_clearing_system_identification1_proprietary == SKIP @external_clearing_system_identification1_proprietary = external_clearing_system_identification1_proprietary end @additional_properties = additional_properties end |
Instance Attribute Details
#external_clearing_system_identification1_code ⇒ String
Unique identifier code of the external clearing system. This is aligned with ISO 20022 pacs.008 group level. It can be used to send the payment rail for the payment. ISO has already listed codes in the fields which indicates the payment rail like "ACH" for ACH, "ACS" for EFT Payments, "LVT" for Canada LVTS, "LYX" for Lynx Canada, etc.
29 30 31 |
# File 'lib/fdx_v660_api/models/payment_method_entity2.rb', line 29 def external_clearing_system_identification1_code @external_clearing_system_identification1_code end |
#external_clearing_system_identification1_proprietary ⇒ String
For few examples where the payment rail is not part of the ISO 20022 scope
33 34 35 |
# File 'lib/fdx_v660_api/models/payment_method_entity2.rb', line 33 def external_clearing_system_identification1_proprietary @external_clearing_system_identification1_proprietary end |
#external_local_instrument1_code ⇒ String
Unique identifier code of the payment method rail as documented internally to the FI. This is aligned with ISO 20022 pain.001, transaction level
20 21 22 |
# File 'lib/fdx_v660_api/models/payment_method_entity2.rb', line 20 def external_local_instrument1_code @external_local_instrument1_code end |
#payment_method_id ⇒ String
Unique identifier of the payment method
14 15 16 |
# File 'lib/fdx_v660_api/models/payment_method_entity2.rb', line 14 def payment_method_id @payment_method_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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/payment_method_entity2.rb', line 88 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. payment_method_id = hash.key?('paymentMethodId') ? hash['paymentMethodId'] : SKIP external_local_instrument1_code = hash.key?('externalLocalInstrument1Code') ? hash['externalLocalInstrument1Code'] : SKIP external_clearing_system_identification1_code = hash.key?('externalClearingSystemIdentification1Code') ? hash['externalClearingSystemIdentification1Code'] : SKIP external_clearing_system_identification1_proprietary = hash.key?('externalClearingSystemIdentification1Proprietary') ? hash['externalClearingSystemIdentification1Proprietary'] : 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. PaymentMethodEntity2.new(payment_method_id: payment_method_id, external_local_instrument1_code: external_local_instrument1_code, external_clearing_system_identification1_code: external_clearing_system_identification1_code, external_clearing_system_identification1_proprietary: external_clearing_system_identification1_proprietary, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/fdx_v660_api/models/payment_method_entity2.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['payment_method_id'] = 'paymentMethodId' @_hash['external_local_instrument1_code'] = 'externalLocalInstrument1Code' @_hash['external_clearing_system_identification1_code'] = 'externalClearingSystemIdentification1Code' @_hash['external_clearing_system_identification1_proprietary'] = 'externalClearingSystemIdentification1Proprietary' @_hash end |
.nullables ⇒ Object
An array for nullable fields
59 60 61 |
# File 'lib/fdx_v660_api/models/payment_method_entity2.rb', line 59 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 |
# File 'lib/fdx_v660_api/models/payment_method_entity2.rb', line 49 def self.optionals %w[ payment_method_id external_local_instrument1_code external_clearing_system_identification1_code external_clearing_system_identification1_proprietary ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
118 119 120 121 122 123 124 |
# File 'lib/fdx_v660_api/models/payment_method_entity2.rb', line 118 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
138 139 140 141 142 143 144 145 146 147 |
# File 'lib/fdx_v660_api/models/payment_method_entity2.rb', line 138 def inspect class_name = self.class.name.split('::').last "<#{class_name} payment_method_id: #{@payment_method_id.inspect},"\ " external_local_instrument1_code: #{@external_local_instrument1_code.inspect},"\ ' external_clearing_system_identification1_code:'\ " #{@external_clearing_system_identification1_code.inspect},"\ ' external_clearing_system_identification1_proprietary:'\ " #{@external_clearing_system_identification1_proprietary.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
127 128 129 130 131 132 133 134 135 |
# File 'lib/fdx_v660_api/models/payment_method_entity2.rb', line 127 def to_s class_name = self.class.name.split('::').last "<#{class_name} payment_method_id: #{@payment_method_id}, external_local_instrument1_code:"\ " #{@external_local_instrument1_code}, external_clearing_system_identification1_code:"\ " #{@external_clearing_system_identification1_code},"\ ' external_clearing_system_identification1_proprietary:'\ " #{@external_clearing_system_identification1_proprietary}, additional_properties:"\ " #{@additional_properties}>" end |