Class: Io::Flow::V0::Models::PartnerCenter

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ PartnerCenter

Returns a new instance of PartnerCenter.



26874
26875
26876
26877
26878
26879
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26874

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))
end

Instance Attribute Details

#numberObject (readonly)

Returns the value of attribute number.



26872
26873
26874
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26872

def number
  @number
end

#partner_referenceObject (readonly)

Returns the value of attribute partner_reference.



26872
26873
26874
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26872

def partner_reference
  @partner_reference
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



26885
26886
26887
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26885

def copy(incoming={})
  PartnerCenter.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



26889
26890
26891
26892
26893
26894
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26889

def to_hash
  {
    :partner_reference => partner_reference.to_hash,
    :number => number
  }
end

#to_jsonObject



26881
26882
26883
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26881

def to_json
  JSON.dump(to_hash)
end