Class: ThePlaidApi::PaymentProfileStatus
- Inherits:
-
Object
- Object
- ThePlaidApi::PaymentProfileStatus
- Defined in:
- lib/the_plaid_api/models/payment_profile_status.rb
Overview
The status of the given Payment Profile. ‘READY`: This Payment Profile is ready to be used to create transfers using `/transfer/authorization/create` and `/transfer/create`. `PENDING`: This Payment Profile is not ready to be used. You’ll need to call `/link/token/create` and provide the `payment_profile_token` in the `transfer.payment_profile_token` field to initiate the account linking experience. `REMOVED`: This Payment Profile has been removed.
Constant Summary collapse
- PAYMENT_PROFILE_STATUS =
[ # TODO: Write general description for PENDING PENDING = 'PENDING'.freeze, # TODO: Write general description for READY READY = 'READY'.freeze, # TODO: Write general description for REMOVED REMOVED = 'REMOVED'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = PENDING) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/the_plaid_api/models/payment_profile_status.rb', line 32 def self.from_value(value, default_value = PENDING) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'pending' then PENDING when 'ready' then READY when 'removed' then REMOVED else default_value end end |
.validate(value) ⇒ Object
26 27 28 29 30 |
# File 'lib/the_plaid_api/models/payment_profile_status.rb', line 26 def self.validate(value) return false if value.nil? PAYMENT_PROFILE_STATUS.include?(value) end |