Class: CorePro::Transaction
- Inherits:
-
Models::ModelBase
- Object
- Models::JsonBase
- Models::ModelBase
- CorePro::Transaction
- Defined in:
- lib/corepro/transaction.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#availableDate ⇒ Object
Returns the value of attribute availableDate.
-
#createdDate ⇒ Object
Returns the value of attribute createdDate.
-
#customerId ⇒ Object
Returns the value of attribute customerId.
-
#friendlyDescription ⇒ Object
Returns the value of attribute friendlyDescription.
-
#isCredit ⇒ Object
Returns the value of attribute isCredit.
-
#nachaDescription ⇒ Object
Returns the value of attribute nachaDescription.
-
#returnCode ⇒ Object
Returns the value of attribute returnCode.
-
#settledDate ⇒ Object
Returns the value of attribute settledDate.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#transactionCount ⇒ Object
Returns the value of attribute transactionCount.
-
#transactionId ⇒ Object
Returns the value of attribute transactionId.
-
#type ⇒ Object
Returns the value of attribute type.
-
#typeCode ⇒ Object
Returns the value of attribute typeCode.
-
#voidedDate ⇒ Object
Returns the value of attribute voidedDate.
Attributes inherited from Models::ModelBase
Class Method Summary collapse
- .get(customerId, transactionId, connection = nil, loggingObject = nil) ⇒ Object
- .getByTag(customerId, tag, connection = nil, loggingObject = nil) ⇒ Object
- .list(customerId, accountId, status = nil, beginDate = nil, endDate = nil, pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) ⇒ Object
Instance Method Summary collapse
Methods inherited from Models::ModelBase
Methods inherited from Models::JsonBase
#from_json!, #is_hash?, #to_hash, #to_json
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
15 16 17 |
# File 'lib/corepro/transaction.rb', line 15 def amount @amount end |
#availableDate ⇒ Object
Returns the value of attribute availableDate.
20 21 22 |
# File 'lib/corepro/transaction.rb', line 20 def availableDate @availableDate end |
#createdDate ⇒ Object
Returns the value of attribute createdDate.
11 12 13 |
# File 'lib/corepro/transaction.rb', line 11 def createdDate @createdDate end |
#customerId ⇒ Object
Returns the value of attribute customerId.
8 9 10 |
# File 'lib/corepro/transaction.rb', line 8 def customerId @customerId end |
#friendlyDescription ⇒ Object
Returns the value of attribute friendlyDescription.
19 20 21 |
# File 'lib/corepro/transaction.rb', line 19 def friendlyDescription @friendlyDescription end |
#isCredit ⇒ Object
Returns the value of attribute isCredit.
22 23 24 |
# File 'lib/corepro/transaction.rb', line 22 def isCredit @isCredit end |
#nachaDescription ⇒ Object
Returns the value of attribute nachaDescription.
18 19 20 |
# File 'lib/corepro/transaction.rb', line 18 def nachaDescription @nachaDescription end |
#returnCode ⇒ Object
Returns the value of attribute returnCode.
21 22 23 |
# File 'lib/corepro/transaction.rb', line 21 def returnCode @returnCode end |
#settledDate ⇒ Object
Returns the value of attribute settledDate.
16 17 18 |
# File 'lib/corepro/transaction.rb', line 16 def settledDate @settledDate end |
#status ⇒ Object
Returns the value of attribute status.
14 15 16 |
# File 'lib/corepro/transaction.rb', line 14 def status @status end |
#tag ⇒ Object
Returns the value of attribute tag.
10 11 12 |
# File 'lib/corepro/transaction.rb', line 10 def tag @tag end |
#transactionCount ⇒ Object
Returns the value of attribute transactionCount.
7 8 9 |
# File 'lib/corepro/transaction.rb', line 7 def transactionCount @transactionCount end |
#transactionId ⇒ Object
Returns the value of attribute transactionId.
9 10 11 |
# File 'lib/corepro/transaction.rb', line 9 def transactionId @transactionId end |
#type ⇒ Object
Returns the value of attribute type.
12 13 14 |
# File 'lib/corepro/transaction.rb', line 12 def type @type end |
#typeCode ⇒ Object
Returns the value of attribute typeCode.
13 14 15 |
# File 'lib/corepro/transaction.rb', line 13 def typeCode @typeCode end |
#voidedDate ⇒ Object
Returns the value of attribute voidedDate.
17 18 19 |
# File 'lib/corepro/transaction.rb', line 17 def voidedDate @voidedDate end |
Class Method Details
.get(customerId, transactionId, connection = nil, loggingObject = nil) ⇒ Object
44 45 46 |
# File 'lib/corepro/transaction.rb', line 44 def self.get(customerId, transactionId, connection = nil, loggingObject = nil) CorePro::Utils::Requestor.get("/transaction/get/#{customerId}/#{transactionId}", Transaction, connection, loggingObject) end |
.getByTag(customerId, tag, connection = nil, loggingObject = nil) ⇒ Object
48 49 50 |
# File 'lib/corepro/transaction.rb', line 48 def self.getByTag(customerId, tag, connection = nil, loggingObject = nil) CorePro::Utils::Requestor.get("/transaction/getByTag/#{customerId}/#{Transaction.escape(tag)}", Transaction, connection, loggingObject) end |
.list(customerId, accountId, status = nil, beginDate = nil, endDate = nil, pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) ⇒ Object
24 25 26 27 28 |
# File 'lib/corepro/transaction.rb', line 24 def self.list(customerId, accountId, status = nil, beginDate = nil, endDate = nil, pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) t = Transaction.new t.customerId = customerId t.list accountId, status, beginDate, endDate, pageNumber, pageSize, connection, loggingObject end |
Instance Method Details
#list(accountId = nil, status = nil, beginDate = nil, endDate = nil, pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/corepro/transaction.rb', line 30 def list(accountId = nil, status = nil, beginDate = nil, endDate =nil, pageNumber =0, pageSize = 200, connection = nil, loggingObject = nil) start = beginDate.kind_of?(Date) ? beginDate.strftime('%Y-%m-%d') : (beginDate.kind_of?(String) ? beginDate[0..9] : nil) finish = endDate.kind_of?(Date) ? endDate.strftime('%Y-%m-%d') : (endDate.kind_of?(String) ? endDate[0..9] : nil) start ||= '' finish ||= '' if finish != '' && start == '' start = '1900-01-01' end CorePro::Utils::Requestor.get("/transaction/list/#{self.customerId}/#{accountId}/#{Transaction.escape(status)}/#{start}/#{finish}?pageNumber=#{pageNumber}&pageSize=#{pageSize}", Transaction, connection, loggingObject) end |