Class: ApRubySdk::Transaction
- Inherits:
-
ApiResource
- Object
- BaseModel
- ApiResource
- ApRubySdk::Transaction
- Defined in:
- lib/ap_ruby_sdk/transaction.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#customerId ⇒ Object
Returns the value of attribute customerId.
-
#description ⇒ Object
Returns the value of attribute description.
-
#initialTransactionId ⇒ Object
Returns the value of attribute initialTransactionId.
-
#ipAddress ⇒ Object
Returns the value of attribute ipAddress.
-
#isRecurring ⇒ Object
Returns the value of attribute isRecurring.
-
#merchantPassThruData ⇒ Object
Returns the value of attribute merchantPassThruData.
-
#merchantTransactionId ⇒ Object
Returns the value of attribute merchantTransactionId.
-
#payment ⇒ Object
Returns the value of attribute payment.
-
#phoneverification ⇒ Object
Returns the value of attribute phoneverification.
-
#preauthorization ⇒ Object
Returns the value of attribute preauthorization.
-
#redirectUrl ⇒ Object
Returns the value of attribute redirectUrl.
-
#redirectUrls ⇒ Object
Returns the value of attribute redirectUrls.
-
#status ⇒ Object
Returns the value of attribute status.
-
#token ⇒ Object
Returns the value of attribute token.
Attributes inherited from ApiResource
Attributes inherited from BaseModel
#created, #id, #mode, #updated
Class Method Summary collapse
- .list_members ⇒ Object
- .refund(reason = '', transaction_id = self.id) ⇒ Object
- .refunds(transaction_id = self.id) ⇒ Object
- .retrieve_refund(refund_id = nil, transaction_id = self.id) ⇒ Object
- .retrieve_void(void_id = nil, transaction_id = self.id) ⇒ Object
- .url ⇒ Object
- .void(reason = '', transaction_id = self.id) ⇒ Object
- .voids(transaction_id = self.id) ⇒ Object
Instance Method Summary collapse
- #refund(reason = '', transaction_id = self.id) ⇒ Object
- #refunds(transaction_id = self.id) ⇒ Object
- #retrieve_refund(refund_id = nil, transaction_id = self.id) ⇒ Object
- #retrieve_void(void_id = nil, transaction_id = self.id) ⇒ Object
- #void(reason = '', transaction_id = self.id) ⇒ Object
- #voids(transaction_id = self.id) ⇒ Object
Methods included from ApiOperations::Retrieve
Methods included from ApiOperations::List
Methods included from ApiOperations::Create
Methods inherited from ApiResource
construct_object, url_with_prefix
Methods inherited from BaseModel
#attributes=, #initialize, #to_json
Constructor Details
This class inherits a constructor from ApRubySdk::BaseModel
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def amount @amount end |
#currency ⇒ Object
Returns the value of attribute currency.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def currency @currency end |
#customer ⇒ Object
Returns the value of attribute customer.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def customer @customer end |
#customerId ⇒ Object
Returns the value of attribute customerId.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def customerId @customerId end |
#description ⇒ Object
Returns the value of attribute description.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def description @description end |
#initialTransactionId ⇒ Object
Returns the value of attribute initialTransactionId.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def initialTransactionId @initialTransactionId end |
#ipAddress ⇒ Object
Returns the value of attribute ipAddress.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def ipAddress @ipAddress end |
#isRecurring ⇒ Object
Returns the value of attribute isRecurring.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def isRecurring @isRecurring end |
#merchantPassThruData ⇒ Object
Returns the value of attribute merchantPassThruData.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def merchantPassThruData @merchantPassThruData end |
#merchantTransactionId ⇒ Object
Returns the value of attribute merchantTransactionId.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def merchantTransactionId @merchantTransactionId end |
#payment ⇒ Object
Returns the value of attribute payment.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def payment @payment end |
#phoneverification ⇒ Object
Returns the value of attribute phoneverification.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def phoneverification @phoneverification end |
#preauthorization ⇒ Object
Returns the value of attribute preauthorization.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def @preauthorization end |
#redirectUrl ⇒ Object
Returns the value of attribute redirectUrl.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def redirectUrl @redirectUrl end |
#redirectUrls ⇒ Object
Returns the value of attribute redirectUrls.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def redirectUrls @redirectUrls end |
#status ⇒ Object
Returns the value of attribute status.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def status @status end |
#token ⇒ Object
Returns the value of attribute token.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def token @token end |
Class Method Details
.list_members ⇒ Object
93 94 95 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 93 def self.list_members :transactions end |
.refund(reason = '', transaction_id = self.id) ⇒ Object
73 74 75 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 73 def self.refund(reason='', transaction_id=self.id) Refund.create({:reason => reason}, "#{self.url}/#{transaction_id}") end |
.refunds(transaction_id = self.id) ⇒ Object
81 82 83 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 81 def self.refunds(transaction_id=self.id) Refund.all({}, "#{self.url}/#{transaction_id}") end |
.retrieve_refund(refund_id = nil, transaction_id = self.id) ⇒ Object
65 66 67 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 65 def self.retrieve_refund(refund_id=nil, transaction_id=self.id) Refund.retrieve(refund_id, {}, "#{self.url}/#{transaction_id}") end |
.retrieve_void(void_id = nil, transaction_id = self.id) ⇒ Object
41 42 43 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 41 def self.retrieve_void(void_id=nil, transaction_id=self.id) Void.retrieve(void_id, {}, "#{self.url}/#{transaction_id}") end |
.url ⇒ Object
89 90 91 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 89 def self.url '/transactions' end |
.void(reason = '', transaction_id = self.id) ⇒ Object
49 50 51 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 49 def self.void(reason='', transaction_id=self.id) Void.create({:reason => reason}, "#{self.url}/#{transaction_id}") end |
.voids(transaction_id = self.id) ⇒ Object
57 58 59 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 57 def self.voids(transaction_id=self.id) Void.all({}, "#{self.url}/#{transaction_id}") end |
Instance Method Details
#refund(reason = '', transaction_id = self.id) ⇒ Object
77 78 79 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 77 def refund(reason='', transaction_id=self.id) self.class.refund(reason, transaction_id) end |
#refunds(transaction_id = self.id) ⇒ Object
85 86 87 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 85 def refunds(transaction_id=self.id) self.class.refunds(transaction_id) end |
#retrieve_refund(refund_id = nil, transaction_id = self.id) ⇒ Object
69 70 71 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 69 def retrieve_refund(refund_id=nil, transaction_id=self.id) self.class.retrieve_refund(refund_id, transaction_id) end |
#retrieve_void(void_id = nil, transaction_id = self.id) ⇒ Object
45 46 47 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 45 def retrieve_void(void_id=nil, transaction_id=self.id) self.class.retrieve_void(void_id, transaction_id) end |
#void(reason = '', transaction_id = self.id) ⇒ Object
53 54 55 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 53 def void(reason='', transaction_id=self.id) self.class.void(reason, transaction_id) end |
#voids(transaction_id = self.id) ⇒ Object
61 62 63 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 61 def voids(transaction_id=self.id) self.class.voids(transaction_id) end |