Class: Io::Flow::V0::Models::SyncStreamType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::SyncStreamType
- 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 SyncStreamType for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of SyncStreamType for this value, or nil if not found.
-
.placed_order ⇒ Object
Represents a sync stream of placed orders - ie each record reported represents a placed order.
-
.submitted_order ⇒ Object
Represents a sync stream of submitted orders - ie each record reported represents a submitted order.
Instance Method Summary collapse
-
#initialize(value) ⇒ SyncStreamType
constructor
A new instance of SyncStreamType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ SyncStreamType
Returns a new instance of SyncStreamType.
27022 27023 27024 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27022 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
27020 27021 27022 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27020 def value @value end |
Class Method Details
.ALL ⇒ Object
27042 27043 27044 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27042 def SyncStreamType.ALL @@all ||= [SyncStreamType.submitted_order, SyncStreamType.placed_order] end |
.apply(value) ⇒ Object
Returns the instance of SyncStreamType for this value, creating a new instance for an unknown value
27027 27028 27029 27030 27031 27032 27033 27034 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27027 def SyncStreamType.apply(value) if value.instance_of?(SyncStreamType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || SyncStreamType.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of SyncStreamType for this value, or nil if not found
27037 27038 27039 27040 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27037 def SyncStreamType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) SyncStreamType.ALL.find { |v| v.value == value } end |
.placed_order ⇒ Object
Represents a sync stream of placed orders - ie each record reported represents a placed order
27054 27055 27056 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27054 def SyncStreamType.placed_order @@_placed_order ||= SyncStreamType.new('placed_order') end |
.submitted_order ⇒ Object
Represents a sync stream of submitted orders - ie each record reported represents a submitted order
27048 27049 27050 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27048 def SyncStreamType.submitted_order @@_submitted_order ||= SyncStreamType.new('submitted_order') end |
Instance Method Details
#to_hash ⇒ Object
27058 27059 27060 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27058 def to_hash value end |