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.



51631
51632
51633
51634
51635
51636
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51631

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.



51629
51630
51631
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51629

def key
  @key
end

#organizationObject (readonly)

Returns the value of attribute organization.



51629
51630
51631
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51629

def organization
  @organization
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



51642
51643
51644
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51642

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

#to_hashObject



51646
51647
51648
51649
51650
51651
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51646

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

#to_jsonObject



51638
51639
51640
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51638

def to_json
  JSON.dump(to_hash)
end