class Io::Flow::V0::Models::PartnerCenter

Represents information about a partner (e.g. external 3PL) running the fulfillment center

Attributes

fees[R]
number[R]
partner_reference[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56021
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:partner_reference], 'PartnerCenter')
  @partner_reference = (x = opts.delete(:partner_reference); x.is_a?(::Io::Flow::V0::Models::PartnerReference) ? x : ::Io::Flow::V0::Models::PartnerReference.new(x))
  @number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
  @fees = (x = opts.delete(:fees); x.nil? ? nil : HttpClient::Preconditions.assert_class('fees', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PartnerCenterFee) ? x : ::Io::Flow::V0::Models::PartnerCenterFee.from_json(x)) })
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56033
def copy(incoming={})
  PartnerCenter.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 56037
def to_hash
  {
    :partner_reference => partner_reference.to_hash,
    :number => number,
    :fees => fees.nil? ? nil : fees.map { |o| o.to_hash }
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 56029
def to_json
  JSON.dump(to_hash)
end