Class: Io::Flow::V0::Models::ShipmentIntegrationType

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) ⇒ ShipmentIntegrationType

Returns a new instance of ShipmentIntegrationType.



14972
14973
14974
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14972

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



14970
14971
14972
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14970

def value
  @value
end

Class Method Details

.ALLObject



14992
14993
14994
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14992

def ShipmentIntegrationType.ALL
  @@all ||= [ShipmentIntegrationType.direct, ShipmentIntegrationType.information, ShipmentIntegrationType.preadvice]
end

.apply(value) ⇒ Object

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



14977
14978
14979
14980
14981
14982
14983
14984
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14977

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

.directObject

Always generate a label for the chosen delivery option.



14997
14998
14999
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14997

def ShipmentIntegrationType.direct
  @@_direct ||= ShipmentIntegrationType.new('direct')
end

.from_string(value) ⇒ Object

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



14987
14988
14989
14990
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14987

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

.informationObject

Booking and label generation is not available. Just use Flow to calculate delivery window estimates and shipment prices to display.



15003
15004
15005
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15003

def ShipmentIntegrationType.information
  @@_information ||= ShipmentIntegrationType.new('information')
end

.preadviceObject

A generic label will be provided by the client organization when available as pre-advice shipment notification to carrier partner.



15009
15010
15011
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15009

def ShipmentIntegrationType.preadvice
  @@_preadvice ||= ShipmentIntegrationType.new('preadvice')
end

Instance Method Details

#to_hashObject



15013
15014
15015
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15013

def to_hash
  value
end