Class: ThePlaidApi::HostedLinkDeliveryMethod
- Inherits:
-
Object
- Object
- ThePlaidApi::HostedLinkDeliveryMethod
- Defined in:
- lib/the_plaid_api/models/hosted_link_delivery_method.rb
Overview
How Plaid should deliver the Plaid Link session to the customer. Only available to customers enabled for Link Delivery (beta). To request Link Delivery access, contact your account manager. ‘sms’ will deliver via SMS. Must pass ‘user.phone_number`. ’email’ will deliver via email. Must pass ‘user.email_address`. In the Sandbox environment, this field will be ignored; use the Production environment to test Link Delivery instead.
Constant Summary collapse
- HOSTED_LINK_DELIVERY_METHOD =
[ # TODO: Write general description for SMS SMS = 'sms'.freeze, # TODO: Write general description for EMAIL EMAIL = 'email'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = SMS) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/the_plaid_api/models/hosted_link_delivery_method.rb', line 28 def self.from_value(value, default_value = SMS) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'sms' then SMS when 'email' then EMAIL else default_value end end |
.validate(value) ⇒ Object
22 23 24 25 26 |
# File 'lib/the_plaid_api/models/hosted_link_delivery_method.rb', line 22 def self.validate(value) return false if value.nil? HOSTED_LINK_DELIVERY_METHOD.include?(value) end |