Class: Io::Flow::V0::Models::ShippingConfigurationForm

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 = {}) ⇒ ShippingConfigurationForm



39073
39074
39075
39076
39077
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39073

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



39071
39072
39073
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39071

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



39083
39084
39085
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39083

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

#to_hashObject



39087
39088
39089
39090
39091
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39087

def to_hash
  {
    :name => name
  }
end

#to_jsonObject



39079
39080
39081
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39079

def to_json
  JSON.dump(to_hash)
end