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.
19973 19974 19975 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19973 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
19971 19972 19973 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19971 def value @value end |
Class Method Details
.ALL ⇒ Object
19993 19994 19995 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19993 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
19978 19979 19980 19981 19982 19983 19984 19985 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19978 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
19997 19998 19999 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19997 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
19988 19989 19990 19991 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19988 def ShippingConfigurationType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ShippingConfigurationType.ALL.find { |v| v.value == value } end |
.variant ⇒ Object
20001 20002 20003 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20001 def ShippingConfigurationType.variant @@_variant ||= ShippingConfigurationType.new('variant') end |
Instance Method Details
#to_hash ⇒ Object
20005 20006 20007 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20005 def to_hash value end |