Class: ThePlaidApi::FdxHateoasLinkAction
- Inherits:
-
Object
- Object
- ThePlaidApi::FdxHateoasLinkAction
- Defined in:
- lib/the_plaid_api/models/fdx_hateoas_link_action.rb
Overview
HTTP Method to use for the request
Constant Summary collapse
- FDX_HATEOAS_LINK_ACTION =
[ # TODO: Write general description for GET GET = 'GET'.freeze, # TODO: Write general description for POST POST = 'POST'.freeze, # TODO: Write general description for PATCH PATCH = 'PATCH'.freeze, # TODO: Write general description for DELETE DELETE = 'DELETE'.freeze, # TODO: Write general description for PUT PUT = 'PUT'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = GET) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/the_plaid_api/models/fdx_hateoas_link_action.rb', line 32 def self.from_value(value, default_value = GET) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'get' then GET when 'post' then POST when 'patch' then PATCH when 'delete' then DELETE when 'put' then PUT else default_value end end |
.validate(value) ⇒ Object
26 27 28 29 30 |
# File 'lib/the_plaid_api/models/fdx_hateoas_link_action.rb', line 26 def self.validate(value) return false if value.nil? FDX_HATEOAS_LINK_ACTION.include?(value) end |