Class: ThePlaidApi::PaymentInitiationMetadata
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::PaymentInitiationMetadata
- Defined in:
- lib/the_plaid_api/models/payment_initiation_metadata.rb
Overview
Metadata that captures what specific payment configurations an institution supports when making Payment Initiation requests.
Instance Attribute Summary collapse
-
#maximum_payment_amount ⇒ Hash[String, String]
A mapping of currency to maximum payment amount (denominated in the smallest unit of currency) supported by the institution.
-
#standing_order_metadata ⇒ PaymentInitiationStandingOrderMetadata
Metadata specifically related to valid Payment Initiation standing order configurations for the institution.
-
#supports_international_payments ⇒ TrueClass | FalseClass
Indicates whether the institution supports payments from a different country.
-
#supports_payment_consents ⇒ TrueClass | FalseClass
Indicates whether the institution supports payment consents.
-
#supports_refund_details ⇒ TrueClass | FalseClass
Indicates whether the institution supports returning refund details when initiating a payment.
-
#supports_sepa_instant ⇒ TrueClass | FalseClass
Indicates whether the institution supports SEPA Instant payments.
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(supports_international_payments:, supports_sepa_instant:, maximum_payment_amount:, supports_refund_details:, standing_order_metadata:, supports_payment_consents:, additional_properties: nil) ⇒ PaymentInitiationMetadata
constructor
A new instance of PaymentInitiationMetadata.
-
#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(supports_international_payments:, supports_sepa_instant:, maximum_payment_amount:, supports_refund_details:, standing_order_metadata:, supports_payment_consents:, additional_properties: nil) ⇒ PaymentInitiationMetadata
Returns a new instance of PaymentInitiationMetadata.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 67 def initialize(supports_international_payments:, supports_sepa_instant:, maximum_payment_amount:, supports_refund_details:, standing_order_metadata:, supports_payment_consents:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @supports_international_payments = supports_international_payments @supports_sepa_instant = supports_sepa_instant @maximum_payment_amount = maximum_payment_amount @supports_refund_details = supports_refund_details @standing_order_metadata = @supports_payment_consents = @additional_properties = additional_properties end |
Instance Attribute Details
#maximum_payment_amount ⇒ Hash[String, String]
A mapping of currency to maximum payment amount (denominated in the smallest unit of currency) supported by the institution. Example: ‘“10000”`
26 27 28 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 26 def maximum_payment_amount @maximum_payment_amount end |
#standing_order_metadata ⇒ PaymentInitiationStandingOrderMetadata
Metadata specifically related to valid Payment Initiation standing order configurations for the institution.
36 37 38 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 36 def @standing_order_metadata end |
#supports_international_payments ⇒ TrueClass | FalseClass
Indicates whether the institution supports payments from a different country.
16 17 18 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 16 def supports_international_payments @supports_international_payments end |
#supports_payment_consents ⇒ TrueClass | FalseClass
Indicates whether the institution supports payment consents.
40 41 42 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 40 def @supports_payment_consents end |
#supports_refund_details ⇒ TrueClass | FalseClass
Indicates whether the institution supports returning refund details when initiating a payment.
31 32 33 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 31 def supports_refund_details @supports_refund_details end |
#supports_sepa_instant ⇒ TrueClass | FalseClass
Indicates whether the institution supports SEPA Instant payments.
20 21 22 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 20 def supports_sepa_instant @supports_sepa_instant end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
84 85 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 115 116 117 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 84 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. supports_international_payments = hash.key?('supports_international_payments') ? hash['supports_international_payments'] : nil supports_sepa_instant = hash.key?('supports_sepa_instant') ? hash['supports_sepa_instant'] : nil maximum_payment_amount = hash.key?('maximum_payment_amount') ? hash['maximum_payment_amount'] : nil supports_refund_details = hash.key?('supports_refund_details') ? hash['supports_refund_details'] : nil if hash['standing_order_metadata'] = PaymentInitiationStandingOrderMetadata.from_hash(hash['standing_order_metadata']) end = hash.key?('supports_payment_consents') ? hash['supports_payment_consents'] : 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. PaymentInitiationMetadata.new(supports_international_payments: supports_international_payments, supports_sepa_instant: supports_sepa_instant, maximum_payment_amount: maximum_payment_amount, supports_refund_details: supports_refund_details, standing_order_metadata: , supports_payment_consents: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 43 def self.names @_hash = {} if @_hash.nil? @_hash['supports_international_payments'] = 'supports_international_payments' @_hash['supports_sepa_instant'] = 'supports_sepa_instant' @_hash['maximum_payment_amount'] = 'maximum_payment_amount' @_hash['supports_refund_details'] = 'supports_refund_details' @_hash['standing_order_metadata'] = 'standing_order_metadata' @_hash['supports_payment_consents'] = 'supports_payment_consents' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 64 65 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 61 def self.nullables %w[ standing_order_metadata ] end |
.optionals ⇒ Object
An array for optional fields
56 57 58 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 56 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
130 131 132 133 134 135 136 137 138 139 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 130 def inspect class_name = self.class.name.split('::').last "<#{class_name} supports_international_payments:"\ " #{@supports_international_payments.inspect}, supports_sepa_instant:"\ " #{@supports_sepa_instant.inspect}, maximum_payment_amount:"\ " #{@maximum_payment_amount.inspect}, supports_refund_details:"\ " #{@supports_refund_details.inspect}, standing_order_metadata:"\ " #{@standing_order_metadata.inspect}, supports_payment_consents:"\ " #{@supports_payment_consents.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
120 121 122 123 124 125 126 127 |
# File 'lib/the_plaid_api/models/payment_initiation_metadata.rb', line 120 def to_s class_name = self.class.name.split('::').last "<#{class_name} supports_international_payments: #{@supports_international_payments},"\ " supports_sepa_instant: #{@supports_sepa_instant}, maximum_payment_amount:"\ " #{@maximum_payment_amount}, supports_refund_details: #{@supports_refund_details},"\ " standing_order_metadata: #{@standing_order_metadata}, supports_payment_consents:"\ " #{@supports_payment_consents}, additional_properties: #{@additional_properties}>" end |