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.
17760 17761 17762 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17760 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17758 17759 17760 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17758 def value @value end |
Class Method Details
.ALL ⇒ Object
17780 17781 17782 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17780 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
17765 17766 17767 17768 17769 17770 17771 17772 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17765 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.
17785 17786 17787 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17785 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
17775 17776 17777 17778 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17775 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.
17790 17791 17792 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17790 def OrderStorage.persist @@_persist ||= OrderStorage.new('persist') end |
Instance Method Details
#to_hash ⇒ Object
17794 17795 17796 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17794 def to_hash value end |