Class: ThePlaidApi::PaymentInitiationConsentScope
- Inherits:
-
Object
- Object
- ThePlaidApi::PaymentInitiationConsentScope
- Defined in:
- lib/the_plaid_api/models/payment_initiation_consent_scope.rb
Overview
This field is deprecated in favor of the consent ‘type` field. Consents are required to have a single type. Payment consent scope. Defines possible directions for payments made with the given consent. `ME_TO_ME`: Allows moving money between accounts owned by the same user. `EXTERNAL`: Allows initiating payments from the user’s account to third parties.
Constant Summary collapse
- PAYMENT_INITIATION_CONSENT_SCOPE =
[ # TODO: Write general description for ME_TO_ME ME_TO_ME = 'ME_TO_ME'.freeze, # TODO: Write general description for EXTERNAL EXTERNAL = 'EXTERNAL'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ME_TO_ME) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_scope.rb', line 27 def self.from_value(value, default_value = ME_TO_ME) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'me_to_me' then ME_TO_ME when 'external' then EXTERNAL else default_value end end |
.validate(value) ⇒ Object
21 22 23 24 25 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_scope.rb', line 21 def self.validate(value) return false if value.nil? PAYMENT_INITIATION_CONSENT_SCOPE.include?(value) end |