class Io::Flow::V0::Models::CenterReference

Attributes

center_key[R]
organization_id[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 34676
def initialize(incoming={})
  super(:discriminator => ExpandableCenter::Types::CENTER_REFERENCE)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:organization_id, :center_key], 'CenterReference')
  @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String)
  @center_key = HttpClient::Preconditions.assert_class('center_key', opts.delete(:center_key), String)
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 34688
def copy(incoming={})
  CenterReference.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
subtype_to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 34692
def subtype_to_hash
  {
    :organization_id => organization_id,
    :center_key => center_key
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 34684
def to_json
  JSON.dump(to_hash)
end