Class: ThePlaidApi::PaymentInitiationConsentStatus
- Inherits:
-
Object
- Object
- ThePlaidApi::PaymentInitiationConsentStatus
- Defined in:
- lib/the_plaid_api/models/payment_initiation_consent_status.rb
Overview
The status of the payment consent. ‘UNAUTHORISED`: Consent created, but requires user authorisation. `REJECTED`: Consent authorisation was rejected by the bank. `AUTHORISED`: Consent is active and ready to be used. `REVOKED`: Consent has been revoked and can no longer be used. `EXPIRED`: Consent is no longer valid.
Constant Summary collapse
- PAYMENT_INITIATION_CONSENT_STATUS =
[ # TODO: Write general description for UNAUTHORISED UNAUTHORISED = 'UNAUTHORISED'.freeze, # TODO: Write general description for AUTHORISED AUTHORISED = 'AUTHORISED'.freeze, # TODO: Write general description for REVOKED REVOKED = 'REVOKED'.freeze, # TODO: Write general description for REJECTED REJECTED = 'REJECTED'.freeze, # TODO: Write general description for EXPIRED EXPIRED = 'EXPIRED'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = UNAUTHORISED) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_status.rb', line 36 def self.from_value(value, default_value = UNAUTHORISED) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'unauthorised' then UNAUTHORISED when 'authorised' then AUTHORISED when 'revoked' then REVOKED when 'rejected' then REJECTED when 'expired' then EXPIRED else default_value end end |
.validate(value) ⇒ Object
30 31 32 33 34 |
# File 'lib/the_plaid_api/models/payment_initiation_consent_status.rb', line 30 def self.validate(value) return false if value.nil? PAYMENT_INITIATION_CONSENT_STATUS.include?(value) end |