Class: Io::Flow::V0::Models::OrderStorage
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderStorage
- 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 OrderStorage for this value, creating a new instance for an unknown value.
-
.do_not_persist ⇒ Object
Indicates to not persist the order.
-
.from_string(value) ⇒ Object
Returns the instance of OrderStorage for this value, or nil if not found.
-
.persist ⇒ Object
Indicates to persist the order.
Instance Method Summary collapse
-
#initialize(value) ⇒ OrderStorage
constructor
A new instance of OrderStorage.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ OrderStorage
Returns a new instance of OrderStorage.
18576 18577 18578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18576 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
18574 18575 18576 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18574 def value @value end |
Class Method Details
.ALL ⇒ Object
18596 18597 18598 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18596 def OrderStorage.ALL @@all ||= [OrderStorage.do_not_persist, OrderStorage.persist] end |
.apply(value) ⇒ Object
Returns the instance of OrderStorage for this value, creating a new instance for an unknown value
18581 18582 18583 18584 18585 18586 18587 18588 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18581 def OrderStorage.apply(value) if value.instance_of?(OrderStorage) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || OrderStorage.new(value)) end end |
.do_not_persist ⇒ Object
Indicates to not persist the order.
18601 18602 18603 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18601 def OrderStorage.do_not_persist @@_do_not_persist ||= OrderStorage.new('do_not_persist') end |
.from_string(value) ⇒ Object
Returns the instance of OrderStorage for this value, or nil if not found
18591 18592 18593 18594 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18591 def OrderStorage.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderStorage.ALL.find { |v| v.value == value } end |
.persist ⇒ Object
Indicates to persist the order.
18606 18607 18608 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18606 def OrderStorage.persist @@_persist ||= OrderStorage.new('persist') end |
Instance Method Details
#to_hash ⇒ Object
18610 18611 18612 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18610 def to_hash value end |