Class: Io::Flow::V0::Models::LabelRequestMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ LabelRequestMethod

Returns a new instance of LabelRequestMethod.



21820
21821
21822
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21820

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



21818
21819
21820
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21818

def value
  @value
end

Class Method Details

.apply(value) ⇒ Object

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



21825
21826
21827
21828
21829
21830
21831
21832
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21825

def LabelRequestMethod.apply(value)
  if value.instance_of?(LabelRequestMethod)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || LabelRequestMethod.new(value))
  end
end

.autogeneratedObject

Label was provided by an event condition in our system (e.g. Fraud Clearance or Order Received)



21881
21882
21883
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21881

def LabelRequestMethod.autogenerated
  @@_autogenerated ||= LabelRequestMethod.new('autogenerated')
end

.bridge_api_syncObject

Label was provided by the Global-e Bridge



21865
21866
21867
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21865

def LabelRequestMethod.bridge_api_sync
  @@_bridge_api_sync ||= LabelRequestMethod.new('bridge_api_sync')
end

.channel_web_asyncObject

Label was provided by Shopify



21850
21851
21852
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21850

def LabelRequestMethod.channel_web_async
  @@_channel_web_async ||= LabelRequestMethod.new('channel_web_async')
end

.direct_api_asyncObject

Label was provided by third party directly integrated with our async API



21860
21861
21862
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21860

def LabelRequestMethod.direct_api_async
  @@_direct_api_async ||= LabelRequestMethod.new('direct_api_async')
end

.direct_api_syncObject

Label was provided by third party directly integrated with our sync API



21855
21856
21857
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21855

def LabelRequestMethod.direct_api_sync
  @@_direct_api_sync ||= LabelRequestMethod.new('direct_api_sync')
end

.flow_web_syncObject

Label was provided by the Flow Console



21845
21846
21847
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21845

def LabelRequestMethod.flow_web_sync
  @@_flow_web_sync ||= LabelRequestMethod.new('flow_web_sync')
end

.from_string(value) ⇒ Object

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



21835
21836
21837
21838
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21835

def LabelRequestMethod.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  LabelRequestMethod.ALL.find { |v| v.value == value }
end

.notification_requiring_crossdockObject

Label was provided by an external logistics provider going to a crossdock



21875
21876
21877
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21875

def LabelRequestMethod.notification_requiring_crossdock
  @@_notification_requiring_crossdock ||= LabelRequestMethod.new('notification_requiring_crossdock')
end

.partner_api_syncObject

Label was provided by non-Global-e logistics partner



21870
21871
21872
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21870

def LabelRequestMethod.partner_api_sync
  @@_partner_api_sync ||= LabelRequestMethod.new('partner_api_sync')
end

Instance Method Details

#to_hashObject



21885
21886
21887
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21885

def to_hash
  value
end