Class: Io::Flow::V0::Models::ShippingConfigurationSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShippingConfigurationSummary
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShippingConfigurationSummary
constructor
A new instance of ShippingConfigurationSummary.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ShippingConfigurationSummary
Returns a new instance of ShippingConfigurationSummary.
50543 50544 50545 50546 50547 50548 50549 50550 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50543 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :name, :key, :type], 'ShippingConfigurationSummary') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String) @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ShippingConfigurationType) ? x : ::Io::Flow::V0::Models::ShippingConfigurationType.apply(x)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
50541 50542 50543 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50541 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
50541 50542 50543 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50541 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
50541 50542 50543 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50541 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
50541 50542 50543 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50541 def type @type end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
50556 50557 50558 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50556 def copy(incoming={}) ShippingConfigurationSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
50560 50561 50562 50563 50564 50565 50566 50567 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50560 def to_hash { :id => id, :name => name, :key => key, :type => type.value } end |
#to_json ⇒ Object
50552 50553 50554 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50552 def to_json JSON.dump(to_hash) end |