Class: Io::Flow::V0::Models::PaymentProcessorAccountReference

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



54007
54008
54009
54010
54011
54012
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54007

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:organization, :key], 'PaymentProcessorAccountReference')
  @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



54005
54006
54007
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54005

def key
  @key
end

#organizationObject (readonly)

Returns the value of attribute organization.



54005
54006
54007
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54005

def organization
  @organization
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



54018
54019
54020
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54018

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

#to_hashObject



54022
54023
54024
54025
54026
54027
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54022

def to_hash
  {
    :organization => organization,
    :key => key
  }
end

#to_jsonObject



54014
54015
54016
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54014

def to_json
  JSON.dump(to_hash)
end