Class: PayTrace::Transaction

Inherits:
Object
  • Object
show all
Extended by:
TransactionOperations
Defined in:
lib/paytrace/transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from TransactionOperations

sale

Constructor Details

#initialize(amount: nil, credit_card: nil, type: nil) ⇒ Transaction

Returns a new instance of Transaction.



25
26
27
28
29
# File 'lib/paytrace/transaction.rb', line 25

def initialize(amount: nil, credit_card: nil, type: nil)
  @amount = amount
  @credit_card = CreditCard.new(credit_card)
  @type = type
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



22
23
24
# File 'lib/paytrace/transaction.rb', line 22

def amount
  @amount
end

#credit_cardObject (readonly)

Returns the value of attribute credit_card.



22
23
24
# File 'lib/paytrace/transaction.rb', line 22

def credit_card
  @credit_card
end

#responseObject

Returns the value of attribute response.



23
24
25
# File 'lib/paytrace/transaction.rb', line 23

def response
  @response
end

#typeObject (readonly)

Returns the value of attribute type.



22
23
24
# File 'lib/paytrace/transaction.rb', line 22

def type
  @type
end