class Io::Flow::V0::Models::SyncStreamType

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27042
def SyncStreamType.ALL
  @@all ||= [SyncStreamType.submitted_order, SyncStreamType.placed_order]
end
apply(value) click to toggle source

Returns the instance of SyncStreamType for this value, creating a new instance for an unknown value

# 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) click to toggle source

Returns the instance of SyncStreamType for this value, or nil if not found

# 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
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27022
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
placed_order() click to toggle source

Represents a sync stream of placed orders - ie each record reported represents a placed order

# File lib/flow_commerce/flow_api_v0_client.rb, line 27054
def SyncStreamType.placed_order
  @@_placed_order ||= SyncStreamType.new('placed_order')
end
submitted_order() click to toggle source

Represents a sync stream of submitted orders - ie each record reported represents a submitted order

# File lib/flow_commerce/flow_api_v0_client.rb, line 27048
def SyncStreamType.submitted_order
  @@_submitted_order ||= SyncStreamType.new('submitted_order')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27058
def to_hash
  value
end