Class: ThePlaidApi::PaymentInitiationConsentType
- Inherits:
-
Object
- Object
- ThePlaidApi::PaymentInitiationConsentType
- Defined in:
- lib/the_plaid_api/models/payment_initiation_consent_type.rb
Overview
Payment consent type. Defines possible use case for payments made with the given consent. ‘SWEEPING`: Allows moving money between accounts owned by the same user. `COMMERCIAL`: Allows initiating payments from the user’s account to third parties.
Constant Summary collapse
- PAYMENT_INITIATION_CONSENT_TYPE =
[ # TODO: Write general description for SWEEPING SWEEPING = 'SWEEPING'.freeze, # TODO: Write general description for COMMERCIAL COMMERCIAL = 'COMMERCIAL'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = SWEEPING) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_type.rb', line 26 def self.from_value(value, default_value = SWEEPING) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'sweeping' then SWEEPING when 'commercial' then COMMERCIAL else default_value end end |
.validate(value) ⇒ Object
20 21 22 23 24 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_type.rb', line 20 def self.validate(value) return false if value.nil? PAYMENT_INITIATION_CONSENT_TYPE.include?(value) end |