Class: Io::Flow::V0::Models::ShippingConfigurationReference

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ ShippingConfigurationReference

Returns a new instance of ShippingConfigurationReference.



36676
36677
36678
36679
36680
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36676

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:key], 'ShippingConfigurationReference')
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



36674
36675
36676
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36674

def key
  @key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



36686
36687
36688
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36686

def copy(incoming={})
  ShippingConfigurationReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



36690
36691
36692
36693
36694
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36690

def to_hash
  {
    :key => key
  }
end

#to_jsonObject



36682
36683
36684
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36682

def to_json
  JSON.dump(to_hash)
end