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.



45497
45498
45499
45500
45501
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45497

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.



45495
45496
45497
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45495

def country
  @country
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



45507
45508
45509
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45507

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

#to_hashObject



45511
45512
45513
45514
45515
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45511

def to_hash
  {
    :country => country
  }
end

#to_jsonObject



45503
45504
45505
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45503

def to_json
  JSON.dump(to_hash)
end