Class: UnivapayClientSdk::IssuerTokenCallMethod
- Inherits:
-
Object
- Object
- UnivapayClientSdk::IssuerTokenCallMethod
- Defined in:
- lib/univapay_client_sdk/models/issuer_token_call_method.rb
Overview
(Online) How the client should execute the token. - sdk / app: Direct
use in native app environments/SDKs. - web: Direct use in special extended
browser environments. - http_get / http_post: Execute directly in a new
browser window or iframe.
Constant Summary collapse
- ISSUER_TOKEN_CALL_METHOD =
[ # TODO: Write general description for HTTP_GET HTTP_GET = 'http_get'.freeze, # TODO: Write general description for HTTP_POST HTTP_POST = 'http_post'.freeze, # TODO: Write general description for SDK SDK = 'sdk'.freeze, # TODO: Write general description for WEB WEB = 'web'.freeze, # TODO: Write general description for APP APP = 'app'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = HTTP_GET) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/univapay_client_sdk/models/issuer_token_call_method.rb', line 35 def self.from_value(value, default_value = HTTP_GET) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'http_get' then HTTP_GET when 'http_post' then HTTP_POST when 'sdk' then SDK when 'web' then WEB when 'app' then APP else default_value end end |
.validate(value) ⇒ Object
29 30 31 32 33 |
# File 'lib/univapay_client_sdk/models/issuer_token_call_method.rb', line 29 def self.validate(value) return false if value.nil? ISSUER_TOKEN_CALL_METHOD.include?(value) end |