Class: Io::Flow::V0::Models::ManifestType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ManifestType
- 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
Manifest all open shipping labels that are not part of a manifest yet for the organization and carrier service.
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of ManifestType for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of ManifestType for this value, or nil if not found.
-
.list ⇒ Object
Manifest only the list of specified labels.
Instance Method Summary collapse
-
#initialize(value) ⇒ ManifestType
constructor
A new instance of ManifestType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ManifestType
Returns a new instance of ManifestType.
8887 8888 8889 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8887 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
8885 8886 8887 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8885 def value @value end |
Class Method Details
.all ⇒ Object
Manifest all open shipping labels that are not part of a manifest yet for the organization and carrier service
8913 8914 8915 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8913 def ManifestType.all @@_all ||= ManifestType.new('all') end |
.ALL ⇒ Object
8907 8908 8909 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8907 def ManifestType.ALL @@all ||= [ManifestType.all, ManifestType.list] end |
.apply(value) ⇒ Object
Returns the instance of ManifestType for this value, creating a new instance for an unknown value
8892 8893 8894 8895 8896 8897 8898 8899 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8892 def ManifestType.apply(value) if value.instance_of?(ManifestType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ManifestType.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of ManifestType for this value, or nil if not found
8902 8903 8904 8905 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8902 def ManifestType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ManifestType.ALL.find { |v| v.value == value } end |
.list ⇒ Object
Manifest only the list of specified labels
8918 8919 8920 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8918 def ManifestType.list @@_list ||= ManifestType.new('list') end |
Instance Method Details
#to_hash ⇒ Object
8922 8923 8924 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8922 def to_hash value end |