Class: Io::Flow::V0::Models::ShippingConfigurationCopy
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShippingConfigurationCopy
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#new ⇒ Object
readonly
Returns the value of attribute new.
-
#original ⇒ Object
readonly
Returns the value of attribute original.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShippingConfigurationCopy
constructor
A new instance of ShippingConfigurationCopy.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ShippingConfigurationCopy
Returns a new instance of ShippingConfigurationCopy.
61112 61113 61114 61115 61116 61117 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61112 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:original, :new], 'ShippingConfigurationCopy') @original = (x = opts.delete(:original); x.is_a?(::Io::Flow::V0::Models::ShippingConfigurationReference) ? x : ::Io::Flow::V0::Models::ShippingConfigurationReference.new(x)) @new = (x = opts.delete(:new); x.is_a?(::Io::Flow::V0::Models::ShippingConfigurationReference) ? x : ::Io::Flow::V0::Models::ShippingConfigurationReference.new(x)) end |
Instance Attribute Details
#new ⇒ Object (readonly)
Returns the value of attribute new.
61110 61111 61112 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61110 def new @new end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
61110 61111 61112 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61110 def original @original end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
61123 61124 61125 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61123 def copy(incoming={}) ShippingConfigurationCopy.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
61127 61128 61129 61130 61131 61132 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61127 def to_hash { :original => original.to_hash, :new => new.to_hash } end |
#to_json ⇒ Object
61119 61120 61121 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61119 def to_json JSON.dump(to_hash) end |