Class: SVGiftRecentTransactions

Inherits:
SVRecentTransactions show all
Defined in:
lib/SVClient/SVGiftRecentTransactions.rb

Overview

Overview

This class contains values of Recent Transaction attributes which is returned from the server.

SVResponse.getgiftrecenttransactions() method would return the Array of objects of this class type. If server responds with any recent transactions in the response.

Instance Attribute Summary

Attributes inherited from SVRecentTransactions

#cardbalance, #cardnumber, #invoicenumber, #outletcode, #outletname, #transactionamount, #transactiondate, #transactiondateatserver, #transactiontype

Instance Method Summary collapse

Instance Method Details

#getcardbalanceObject

return

Float - the Card Balance of the selected recent transaction.



67
68
69
# File 'lib/SVClient/SVGiftRecentTransactions.rb', line 67

def getcardbalance
  @cardbalance
end

#getcardnumberObject

return

String - the Card Number of the selected recent transaction.



18
19
20
# File 'lib/SVClient/SVGiftRecentTransactions.rb', line 18

def getcardnumber
  @cardnumber
end

#getinvoicenumberObject

return

String - the Invoice Number of the selected recent transaction.



49
50
51
# File 'lib/SVClient/SVGiftRecentTransactions.rb', line 49

def getinvoicenumber
  @invoicenumber
end

#getoutletcodeObject

return

String - the descriptive Outlet Code on which the selected recent transaction happened.



43
44
45
# File 'lib/SVClient/SVGiftRecentTransactions.rb', line 43

def getoutletcode
  @outletcode
end

#getoutletnameObject

return

String - the descriptive Outlet Name on which the selected recent transaction happened.



37
38
39
# File 'lib/SVClient/SVGiftRecentTransactions.rb', line 37

def getoutletname
  @outletname
end

#gettransactionamountObject

return

Float - the Transaction Amount of the selected recent transaction.



61
62
63
# File 'lib/SVClient/SVGiftRecentTransactions.rb', line 61

def gettransactionamount
  @transactionamount
end

#gettransactiondateObject

return

DateTime - the transaction date at which the selected recent transaction happened.



24
25
26
# File 'lib/SVClient/SVGiftRecentTransactions.rb', line 24

def gettransactiondate
  SVUtils::getdate(@transactiondate, SVUtils::QC_DATE_FORMAT)
end

#gettransactiondateatserverObject

return

DateTime - the transaction date at server on which the selected recent transaction happened. If this date differs from Transaction Date then the transaction might have happened offline.



31
32
33
# File 'lib/SVClient/SVGiftRecentTransactions.rb', line 31

def gettransactiondateatserver
  @transactiondateatserver
end

#gettransactiontypeObject

return

String - the Transaction Type of the selected recent transaction.



55
56
57
# File 'lib/SVClient/SVGiftRecentTransactions.rb', line 55

def gettransactiontype
  @transactiontype
end

#setvalue(keypaircollection) ⇒ Object



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/SVClient/SVGiftRecentTransactions.rb', line 71

def setvalue(keypaircollection)
  tempcoll = keypaircollection.split(/~/)
  key = tempcoll[0]
  value = tempcoll[1]
  case key
  when "CardNumber"
    @cardnumber = value
  when "TransactionDate"
    @transactiondate = value
  when "TransactionDateAtServer"
    @transactiondateatserver = value
  when "OutletName"
    @outletname = value
  when "OutletCode"
    @outletcode = value
  when "InvoiceNumber"
    @invoicenumber = value
  when "TransactionType"
    @transactiontype = value
  when "TransactionAmount"
    @transactionamount = value
  when "CardBalance"
    @cardbalance = value
  end
end