class Io::Flow::V0::Models::PricingSettings

Attributes

default_duty_display[R]
default_tax_display[R]
editable[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60740
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:editable, :default_tax_display, :default_duty_display], 'PricingSettings')
  @editable = HttpClient::Preconditions.assert_boolean('editable', opts.delete(:editable))
  @default_tax_display = (x = opts.delete(:default_tax_display); x.is_a?(::Io::Flow::V0::Models::PricingLevySetting) ? x : ::Io::Flow::V0::Models::PricingLevySetting.apply(x))
  @default_duty_display = (x = opts.delete(:default_duty_display); x.is_a?(::Io::Flow::V0::Models::PricingLevySetting) ? x : ::Io::Flow::V0::Models::PricingLevySetting.apply(x))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60752
def copy(incoming={})
  PricingSettings.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 60756
def to_hash
  {
    :editable => editable,
    :default_tax_display => default_tax_display.value,
    :default_duty_display => default_duty_display.value
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60748
def to_json
  JSON.dump(to_hash)
end