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



9071
9072
9073
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9071

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



9069
9070
9071
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9069

def value
  @value
end

Class Method Details

.ALLObject



9091
9092
9093
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9091

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



9076
9077
9078
9079
9080
9081
9082
9083
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9076

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.



9096
9097
9098
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9096

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



9086
9087
9088
9089
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9086

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.



9102
9103
9104
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9102

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.



9108
9109
9110
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9108

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

Instance Method Details

#to_hashObject



9112
9113
9114
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9112

def to_hash
  value
end