Class: Io::Flow::V0::Models::PaymentProcessorReference

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

Instance Attribute Summary collapse

Attributes inherited from ExpandablePaymentProcessor

#discriminator

Instance Method Summary collapse

Methods inherited from ExpandablePaymentProcessor

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ PaymentProcessorReference

Returns a new instance of PaymentProcessorReference.



51687
51688
51689
51690
51691
51692
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51687

def initialize(incoming={})
  super(:discriminator => ExpandablePaymentProcessor::Types::PAYMENT_PROCESSOR_REFERENCE)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:processor], 'PaymentProcessorReference')
  @processor = HttpClient::Preconditions.assert_class('processor', opts.delete(:processor), String)
end

Instance Attribute Details

#processorObject (readonly)

Returns the value of attribute processor.



51685
51686
51687
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51685

def processor
  @processor
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



51698
51699
51700
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51698

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

#subtype_to_hashObject



51702
51703
51704
51705
51706
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51702

def subtype_to_hash
  {
    :processor => processor
  }
end

#to_jsonObject



51694
51695
51696
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51694

def to_json
  JSON.dump(to_hash)
end