class Io::Flow::V0::Models::CustomerAddressPreference
Represents a customer address preference. Only a single address book contact can be associated per type. If contact is created or updated with a preference, existing preferences of the same type will be removed.
Attributes
type[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 38277 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:type], 'CustomerAddressPreference') @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::CustomerAddressType) ? x : ::Io::Flow::V0::Models::CustomerAddressType.apply(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 38287 def copy(incoming={}) CustomerAddressPreference.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 38291 def to_hash { :type => type.value } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 38283 def to_json JSON.dump(to_hash) end