class Io::Flow::V0::Models::ShipmentRecipient

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26530
def ShipmentRecipient.ALL
  @@all ||= [ShipmentRecipient.customer, ShipmentRecipient.return, ShipmentRecipient.crossdock]
end
apply(value) click to toggle source

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

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

Outbound shipment to a crossdock

# File lib/flow_commerce/flow_api_v0_client.rb, line 26545
def ShipmentRecipient.crossdock
  @@_crossdock ||= ShipmentRecipient.new('crossdock')
end
customer() click to toggle source

Outbound shipment to the customer

# File lib/flow_commerce/flow_api_v0_client.rb, line 26535
def ShipmentRecipient.customer
  @@_customer ||= ShipmentRecipient.new('customer')
end
from_string(value) click to toggle source

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

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

Inbound or return shipment

# File lib/flow_commerce/flow_api_v0_client.rb, line 26540
def ShipmentRecipient.return
  @@_return ||= ShipmentRecipient.new('return')
end

Public Instance Methods

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