Class: Io::Flow::V0::Models::PartnerCenterForm

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 = {}) ⇒ PartnerCenterForm

Returns a new instance of PartnerCenterForm.



49714
49715
49716
49717
49718
49719
49720
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49714

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:partner_id], 'PartnerCenterForm')
  @partner_id = HttpClient::Preconditions.assert_class('partner_id', opts.delete(:partner_id), String)
  @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

Instance Attribute Details

#feesObject (readonly)

Returns the value of attribute fees.



49712
49713
49714
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49712

def fees
  @fees
end

#numberObject (readonly)

Returns the value of attribute number.



49712
49713
49714
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49712

def number
  @number
end

#partner_idObject (readonly)

Returns the value of attribute partner_id.



49712
49713
49714
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49712

def partner_id
  @partner_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



49726
49727
49728
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49726

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

#to_hashObject



49730
49731
49732
49733
49734
49735
49736
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49730

def to_hash
  {
    :partner_id => partner_id,
    :number => number,
    :fees => fees.nil? ? nil : fees.map { |o| o.to_hash }
  }
end

#to_jsonObject



49722
49723
49724
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49722

def to_json
  JSON.dump(to_hash)
end