Class: GimmeGimme::FakeCimServer::AuthOnlyTransaction

Inherits:
Transaction
  • Object
show all
Defined in:
lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb

Instance Attribute Summary collapse

Attributes inherited from Transaction

#amount, #customer_payment_profile, #customer_profile, #customer_profile_id, #transactions

Instance Method Summary collapse

Methods inherited from Transaction

#card_number, create, #success?

Methods included from RequestParser

#at

Constructor Details

#initialize(customer_profiles, customer_payment_profiles, document, transactions) ⇒ AuthOnlyTransaction

Returns a new instance of AuthOnlyTransaction.



273
274
275
276
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 273

def initialize(customer_profiles, customer_payment_profiles, document, transactions)
  super
  @authorization_code = Sequencer.next_id
end

Instance Attribute Details

#authorization_codeObject

Returns the value of attribute authorization_code.



271
272
273
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 271

def authorization_code
  @authorization_code
end

Instance Method Details

#extra_response_optsObject



278
279
280
281
282
283
# File 'lib/generators/gimme_gimme/test_support/templates/testing/fake_cim_server.rb', line 278

def extra_response_opts
  success = success? ? 1 : 0
  {
    :directResponse => "#{success},,,,#{@authorization_code},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
  }
end