Class: Io::Flow::V0::Models::ShippingConfigurationType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShippingConfigurationType
- 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 ShippingConfigurationType for this value, creating a new instance for an unknown value.
- .default ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of ShippingConfigurationType for this value, or nil if not found.
- .variant ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ ShippingConfigurationType
constructor
A new instance of ShippingConfigurationType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ShippingConfigurationType
Returns a new instance of ShippingConfigurationType.
15622 15623 15624 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15622 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
15620 15621 15622 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15620 def value @value end |
Class Method Details
.ALL ⇒ Object
15642 15643 15644 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15642 def ShippingConfigurationType.ALL @@all ||= [ShippingConfigurationType.default, ShippingConfigurationType.variant] end |
.apply(value) ⇒ Object
Returns the instance of ShippingConfigurationType for this value, creating a new instance for an unknown value
15627 15628 15629 15630 15631 15632 15633 15634 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15627 def ShippingConfigurationType.apply(value) if value.instance_of?(ShippingConfigurationType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ShippingConfigurationType.new(value)) end end |
.default ⇒ Object
15646 15647 15648 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15646 def ShippingConfigurationType.default @@_default ||= ShippingConfigurationType.new('default') end |
.from_string(value) ⇒ Object
Returns the instance of ShippingConfigurationType for this value, or nil if not found
15637 15638 15639 15640 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15637 def ShippingConfigurationType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ShippingConfigurationType.ALL.find { |v| v.value == value } end |
.variant ⇒ Object
15650 15651 15652 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15650 def ShippingConfigurationType.variant @@_variant ||= ShippingConfigurationType.new('variant') end |
Instance Method Details
#to_hash ⇒ Object
15654 15655 15656 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15654 def to_hash value end |