Class: Io::Flow::V0::Models::PermittedHttpMethod
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PermittedHttpMethod
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of PermittedHttpMethod for this value, creating a new instance for an unknown value.
- .delete ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of PermittedHttpMethod for this value, or nil if not found.
- .get ⇒ Object
- .patch ⇒ Object
- .post ⇒ Object
- .put ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ PermittedHttpMethod
constructor
A new instance of PermittedHttpMethod.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ PermittedHttpMethod
Returns a new instance of PermittedHttpMethod.
18555 18556 18557 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18555 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
18553 18554 18555 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18553 def value @value end |
Class Method Details
.ALL ⇒ Object
18575 18576 18577 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18575 def PermittedHttpMethod.ALL @@all ||= [PermittedHttpMethod.get, PermittedHttpMethod.post, PermittedHttpMethod.put, PermittedHttpMethod.delete, PermittedHttpMethod.patch] end |
.apply(value) ⇒ Object
Returns the instance of PermittedHttpMethod for this value, creating a new instance for an unknown value
18560 18561 18562 18563 18564 18565 18566 18567 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18560 def PermittedHttpMethod.apply(value) if value.instance_of?(PermittedHttpMethod) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || PermittedHttpMethod.new(value)) end end |
.delete ⇒ Object
18591 18592 18593 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18591 def PermittedHttpMethod.delete @@_delete ||= PermittedHttpMethod.new('DELETE') end |
.from_string(value) ⇒ Object
Returns the instance of PermittedHttpMethod for this value, or nil if not found
18570 18571 18572 18573 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18570 def PermittedHttpMethod.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PermittedHttpMethod.ALL.find { |v| v.value == value } end |
.get ⇒ Object
18579 18580 18581 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18579 def PermittedHttpMethod.get @@_get ||= PermittedHttpMethod.new('GET') end |
.patch ⇒ Object
18595 18596 18597 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18595 def PermittedHttpMethod.patch @@_patch ||= PermittedHttpMethod.new('PATCH') end |
.post ⇒ Object
18583 18584 18585 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18583 def PermittedHttpMethod.post @@_post ||= PermittedHttpMethod.new('POST') end |
.put ⇒ Object
18587 18588 18589 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18587 def PermittedHttpMethod.put @@_put ||= PermittedHttpMethod.new('PUT') end |
Instance Method Details
#to_hash ⇒ Object
18599 18600 18601 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18599 def to_hash value end |