Class: Io::Flow::V0::Models::OrderBuilderDestinationCountryForm

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

Returns a new instance of OrderBuilderDestinationCountryForm.



39861
39862
39863
39864
39865
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39861

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

Instance Attribute Details

#countryObject (readonly)

Returns the value of attribute country.



39859
39860
39861
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39859

def country
  @country
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



39871
39872
39873
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39871

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

#to_hashObject



39875
39876
39877
39878
39879
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39875

def to_hash
  {
    :country => country
  }
end

#to_jsonObject



39867
39868
39869
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39867

def to_json
  JSON.dump(to_hash)
end