class Io::Flow::V0::Models::CountryShippingPricing
Attributes
countries[R]
pricing[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 37248 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:pricing, :countries], 'CountryShippingPricing') @pricing = (x = opts.delete(:pricing); x.is_a?(::Io::Flow::V0::Models::ItemShippingPricing) ? x : ::Io::Flow::V0::Models::ItemShippingPricing.new(x)) @countries = HttpClient::Preconditions.assert_class('countries', opts.delete(:countries), Array).map { |v| HttpClient::Preconditions.assert_class('countries', v, String) } end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 37259 def copy(incoming={}) CountryShippingPricing.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 37263 def to_hash { :pricing => pricing.to_hash, :countries => countries } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 37255 def to_json JSON.dump(to_hash) end