Class: Io::Flow::V0::Models::TrackingStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TrackingStatus
- 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 TrackingStatus for this value, creating a new instance for an unknown value.
- .attempt_fail ⇒ Object
- .delivered ⇒ Object
- .exception ⇒ Object
- .expired ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of TrackingStatus for this value, or nil if not found.
- .in_transit ⇒ Object
- .info_received ⇒ Object
- .out_for_delivery ⇒ Object
- .pending ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ TrackingStatus
constructor
A new instance of TrackingStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ TrackingStatus
Returns a new instance of TrackingStatus.
5650 5651 5652 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5650 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
5648 5649 5650 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5648 def value @value end |
Class Method Details
.ALL ⇒ Object
5670 5671 5672 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5670 def TrackingStatus.ALL @@all ||= [TrackingStatus.pending, TrackingStatus.info_received, TrackingStatus.in_transit, TrackingStatus.out_for_delivery, TrackingStatus.attempt_fail, TrackingStatus.delivered, TrackingStatus.exception, TrackingStatus.expired] end |
.apply(value) ⇒ Object
Returns the instance of TrackingStatus for this value, creating a new instance for an unknown value
5655 5656 5657 5658 5659 5660 5661 5662 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5655 def TrackingStatus.apply(value) if value.instance_of?(TrackingStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || TrackingStatus.new(value)) end end |
.attempt_fail ⇒ Object
5690 5691 5692 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5690 def TrackingStatus.attempt_fail @@_attempt_fail ||= TrackingStatus.new('attempt_fail') end |
.delivered ⇒ Object
5694 5695 5696 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5694 def TrackingStatus.delivered @@_delivered ||= TrackingStatus.new('delivered') end |
.exception ⇒ Object
5698 5699 5700 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5698 def TrackingStatus.exception @@_exception ||= TrackingStatus.new('exception') end |
.expired ⇒ Object
5702 5703 5704 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5702 def TrackingStatus.expired @@_expired ||= TrackingStatus.new('expired') end |
.from_string(value) ⇒ Object
Returns the instance of TrackingStatus for this value, or nil if not found
5665 5666 5667 5668 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5665 def TrackingStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) TrackingStatus.ALL.find { |v| v.value == value } end |
.in_transit ⇒ Object
5682 5683 5684 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5682 def TrackingStatus.in_transit @@_in_transit ||= TrackingStatus.new('in_transit') end |
.info_received ⇒ Object
5678 5679 5680 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5678 def TrackingStatus.info_received @@_info_received ||= TrackingStatus.new('info_received') end |
.out_for_delivery ⇒ Object
5686 5687 5688 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5686 def TrackingStatus.out_for_delivery @@_out_for_delivery ||= TrackingStatus.new('out_for_delivery') end |
.pending ⇒ Object
5674 5675 5676 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5674 def TrackingStatus.pending @@_pending ||= TrackingStatus.new('pending') end |
Instance Method Details
#to_hash ⇒ Object
5706 5707 5708 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5706 def to_hash value end |