Class: FdxV660Api::PaymentMethodCreditAccountEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::PaymentMethodCreditAccountEntity
- Defined in:
- lib/fdx_v660_api/models/payment_method_credit_account_entity.rb
Overview
A payment initiation party's payment method that credits an account
Instance Attribute Summary collapse
-
#account_registration_id ⇒ String
Unique identifier of the registration of the destination account to the payment method associated with a particular payment initiation party.
-
#destination_account ⇒ PaymentGenericAccountEntity1
Destination account details.
-
#direct_deposit ⇒ DirectDepositEntity
Direct deposit details.
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(account_registration_id: SKIP, direct_deposit: SKIP, destination_account: SKIP, additional_properties: nil) ⇒ PaymentMethodCreditAccountEntity
constructor
A new instance of PaymentMethodCreditAccountEntity.
-
#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(account_registration_id: SKIP, direct_deposit: SKIP, destination_account: SKIP, additional_properties: nil) ⇒ PaymentMethodCreditAccountEntity
Returns a new instance of PaymentMethodCreditAccountEntity.
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/fdx_v660_api/models/payment_method_credit_account_entity.rb', line 48 def initialize(account_registration_id: SKIP, direct_deposit: SKIP, destination_account: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_registration_id = account_registration_id unless account_registration_id == SKIP @direct_deposit = direct_deposit unless direct_deposit == SKIP @destination_account = destination_account unless destination_account == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_registration_id ⇒ String
Unique identifier of the registration of the destination account to the payment method associated with a particular payment initiation party
15 16 17 |
# File 'lib/fdx_v660_api/models/payment_method_credit_account_entity.rb', line 15 def account_registration_id @account_registration_id end |
#destination_account ⇒ PaymentGenericAccountEntity1
Destination account details
23 24 25 |
# File 'lib/fdx_v660_api/models/payment_method_credit_account_entity.rb', line 23 def destination_account @destination_account end |
#direct_deposit ⇒ DirectDepositEntity
Direct deposit details
19 20 21 |
# File 'lib/fdx_v660_api/models/payment_method_credit_account_entity.rb', line 19 def direct_deposit @direct_deposit end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/fdx_v660_api/models/payment_method_credit_account_entity.rb', line 60 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_registration_id = hash.key?('accountRegistrationId') ? hash['accountRegistrationId'] : SKIP direct_deposit = DirectDepositEntity.from_hash(hash['directDeposit']) if hash['directDeposit'] destination_account = PaymentGenericAccountEntity1.from_hash(hash['destinationAccount']) if hash['destinationAccount'] # 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. PaymentMethodCreditAccountEntity.new(account_registration_id: account_registration_id, direct_deposit: direct_deposit, destination_account: destination_account, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/fdx_v660_api/models/payment_method_credit_account_entity.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['account_registration_id'] = 'accountRegistrationId' @_hash['direct_deposit'] = 'directDeposit' @_hash['destination_account'] = 'destinationAccount' @_hash end |
.nullables ⇒ Object
An array for nullable fields
44 45 46 |
# File 'lib/fdx_v660_api/models/payment_method_credit_account_entity.rb', line 44 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 40 41 |
# File 'lib/fdx_v660_api/models/payment_method_credit_account_entity.rb', line 35 def self.optionals %w[ account_registration_id direct_deposit destination_account ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
87 88 89 90 91 92 93 |
# File 'lib/fdx_v660_api/models/payment_method_credit_account_entity.rb', line 87 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.
104 105 106 107 108 109 |
# File 'lib/fdx_v660_api/models/payment_method_credit_account_entity.rb', line 104 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_registration_id: #{@account_registration_id.inspect},"\ " direct_deposit: #{@direct_deposit.inspect}, destination_account:"\ " #{@destination_account.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
96 97 98 99 100 101 |
# File 'lib/fdx_v660_api/models/payment_method_credit_account_entity.rb', line 96 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_registration_id: #{@account_registration_id}, direct_deposit:"\ " #{@direct_deposit}, destination_account: #{@destination_account}, additional_properties:"\ " #{@additional_properties}>" end |