Class: Io::Flow::V0::Models::ShipmentIntegrationType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShipmentIntegrationType
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of ShipmentIntegrationType for this value, creating a new instance for an unknown value.
-
.direct ⇒ Object
Always generate a label for the chosen delivery option.
-
.from_string(value) ⇒ Object
Returns the instance of ShipmentIntegrationType for this value, or nil if not found.
-
.information ⇒ Object
Booking and label generation is not available.
-
.preadvice ⇒ Object
A generic label will be provided by the client organization when available as pre-advice shipment notification to carrier partner.
Instance Method Summary collapse
-
#initialize(value) ⇒ ShipmentIntegrationType
constructor
A new instance of ShipmentIntegrationType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ShipmentIntegrationType
Returns a new instance of ShipmentIntegrationType.
12369 12370 12371 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12369 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
12367 12368 12369 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12367 def value @value end |
Class Method Details
.ALL ⇒ Object
12389 12390 12391 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12389 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
12374 12375 12376 12377 12378 12379 12380 12381 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12374 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 |
.direct ⇒ Object
Always generate a label for the chosen delivery option.
12394 12395 12396 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12394 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
12384 12385 12386 12387 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12384 def ShipmentIntegrationType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ShipmentIntegrationType.ALL.find { |v| v.value == value } end |
.information ⇒ Object
Booking and label generation is not available. Just use Flow to calculate delivery window estimates and shipment prices to display.
12400 12401 12402 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12400 def ShipmentIntegrationType.information @@_information ||= ShipmentIntegrationType.new('information') end |
.preadvice ⇒ Object
A generic label will be provided by the client organization when available as pre-advice shipment notification to carrier partner.
12406 12407 12408 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12406 def ShipmentIntegrationType.preadvice @@_preadvice ||= ShipmentIntegrationType.new('preadvice') end |
Instance Method Details
#to_hash ⇒ Object
12410 12411 12412 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12410 def to_hash value end |