Class: Io::Flow::V0::Models::CenterCapability
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CenterCapability
- 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 CenterCapability for this value, creating a new instance for an unknown value.
- .commercial_invoice ⇒ Object
- .crossdock ⇒ Object
- .domestic ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of CenterCapability for this value, or nil if not found.
- .international ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ CenterCapability
constructor
A new instance of CenterCapability.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ CenterCapability
Returns a new instance of CenterCapability.
13361 13362 13363 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13361 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
13359 13360 13361 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13359 def value @value end |
Class Method Details
.ALL ⇒ Object
13381 13382 13383 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13381 def CenterCapability.ALL @@all ||= [CenterCapability.international, CenterCapability.domestic, CenterCapability.crossdock, CenterCapability.commercial_invoice] end |
.apply(value) ⇒ Object
Returns the instance of CenterCapability for this value, creating a new instance for an unknown value
13366 13367 13368 13369 13370 13371 13372 13373 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13366 def CenterCapability.apply(value) if value.instance_of?(CenterCapability) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || CenterCapability.new(value)) end end |
.commercial_invoice ⇒ Object
13397 13398 13399 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13397 def CenterCapability.commercial_invoice @@_commercial_invoice ||= CenterCapability.new('commercial_invoice') end |
.crossdock ⇒ Object
13393 13394 13395 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13393 def CenterCapability.crossdock @@_crossdock ||= CenterCapability.new('crossdock') end |
.domestic ⇒ Object
13389 13390 13391 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13389 def CenterCapability.domestic @@_domestic ||= CenterCapability.new('domestic') end |
.from_string(value) ⇒ Object
Returns the instance of CenterCapability for this value, or nil if not found
13376 13377 13378 13379 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13376 def CenterCapability.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) CenterCapability.ALL.find { |v| v.value == value } end |
.international ⇒ Object
13385 13386 13387 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13385 def CenterCapability.international @@_international ||= CenterCapability.new('international') end |
Instance Method Details
#to_hash ⇒ Object
13401 13402 13403 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13401 def to_hash value end |