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

Returns a new instance of PaymentProcessorAccountReference.



58396
58397
58398
58399
58400
58401
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58396

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.



58394
58395
58396
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58394

def key
  @key
end

#organizationObject (readonly)

Returns the value of attribute organization.



58394
58395
58396
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58394

def organization
  @organization
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



58407
58408
58409
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58407

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

#to_hashObject



58411
58412
58413
58414
58415
58416
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58411

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

#to_jsonObject



58403
58404
58405
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58403

def to_json
  JSON.dump(to_hash)
end