Class: ThePlaidApi::PaymentScheme
- Inherits:
-
Object
- Object
- ThePlaidApi::PaymentScheme
- Defined in:
- lib/the_plaid_api/models/payment_scheme.rb
Overview
Payment scheme. If not specified - the default in the region will be used (e.g. ‘SEPA_CREDIT_TRANSFER` for EU). In responses, if the scheme is not explicitly specified in the request, this value will be `null`. Using unsupported values will result in a failed payment. `LOCAL_DEFAULT`: The default payment scheme for the selected market and currency will be used. `LOCAL_INSTANT`: The instant payment scheme for the selected market and currency will be used (if applicable). Fees may be applied by the institution. `SEPA_CREDIT_TRANSFER`: The standard payment to a beneficiary within the SEPA area. `SEPA_CREDIT_TRANSFER_INSTANT`: Instant payment within the SEPA area. May involve additional fees and may not be available at some banks.
Constant Summary collapse
- PAYMENT_SCHEME =
[ # TODO: Write general description for LOCAL_DEFAULT LOCAL_DEFAULT = 'LOCAL_DEFAULT'.freeze, # TODO: Write general description for LOCAL_INSTANT LOCAL_INSTANT = 'LOCAL_INSTANT'.freeze, # TODO: Write general description for SEPA_CREDIT_TRANSFER SEPA_CREDIT_TRANSFER = 'SEPA_CREDIT_TRANSFER'.freeze, # TODO: Write general description for SEPA_CREDIT_TRANSFER_INSTANT SEPA_CREDIT_TRANSFER_INSTANT = 'SEPA_CREDIT_TRANSFER_INSTANT'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = LOCAL_DEFAULT) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/the_plaid_api/models/payment_scheme.rb', line 39 def self.from_value(value, default_value = LOCAL_DEFAULT) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'local_default' then LOCAL_DEFAULT when 'local_instant' then LOCAL_INSTANT when 'sepa_credit_transfer' then SEPA_CREDIT_TRANSFER when 'sepa_credit_transfer_instant' then SEPA_CREDIT_TRANSFER_INSTANT else default_value end end |
.validate(value) ⇒ Object
33 34 35 36 37 |
# File 'lib/the_plaid_api/models/payment_scheme.rb', line 33 def self.validate(value) return false if value.nil? PAYMENT_SCHEME.include?(value) end |