class Io::Flow::V0::Models::LogisticsFormat
Attributes
description[R]
preference[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 49321 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:preference], 'LogisticsFormat') @preference = (x = opts.delete(:preference); x.is_a?(::Io::Flow::V0::Models::LogisticsFormatPreference) ? x : ::Io::Flow::V0::Models::LogisticsFormatPreference.apply(x)) @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 49332 def copy(incoming={}) LogisticsFormat.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 49336 def to_hash { :preference => preference.value, :description => description } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 49328 def to_json JSON.dump(to_hash) end