class Io::Flow::V0::Models::FlowEntity

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20607
def FlowEntity.ALL
  @@all ||= [FlowEntity.flow_usa, FlowEntity.flow_irl, FlowEntity.flow_can]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 20592
def FlowEntity.apply(value)
  if value.instance_of?(FlowEntity)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || FlowEntity.new(value))
  end
end
flow_can() click to toggle source

Flow Commerce Canada Inc., Vancouver, BC, CAN

# File lib/flow_commerce/flow_api_v0_client.rb, line 20622
def FlowEntity.flow_can
  @@_flow_can ||= FlowEntity.new('flow-can')
end
flow_irl() click to toggle source

Flow Commerce Ltd., Dublin, IRL

# File lib/flow_commerce/flow_api_v0_client.rb, line 20617
def FlowEntity.flow_irl
  @@_flow_irl ||= FlowEntity.new('flow-irl')
end
flow_usa() click to toggle source

Flow Commerce Inc., Hoboken, NJ, USA

# File lib/flow_commerce/flow_api_v0_client.rb, line 20612
def FlowEntity.flow_usa
  @@_flow_usa ||= FlowEntity.new('flow-usa')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 20602
def FlowEntity.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  FlowEntity.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20587
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Public Instance Methods

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