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.
-
#paymentId ⇒ Object
Returns the value of attribute paymentId.
-
#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 |
#paymentId ⇒ Object
Returns the value of attribute paymentId.
7 8 9 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 7 def paymentId @paymentId 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 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
94 95 96 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 94 def self.list_members :transactions end |
.refund(reason = '', transaction_id = self.id) ⇒ Object
74 75 76 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 74 def self.refund(reason='', transaction_id=self.id) Refund.create({:reason => reason}, "#{self.url}/#{transaction_id}") end |
.refunds(transaction_id = self.id) ⇒ Object
82 83 84 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 82 def self.refunds(transaction_id=self.id) Refund.all({}, "#{self.url}/#{transaction_id}") end |
.retrieve_refund(refund_id = nil, transaction_id = self.id) ⇒ Object
66 67 68 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 66 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
42 43 44 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 42 def self.retrieve_void(void_id=nil, transaction_id=self.id) Void.retrieve(void_id, {}, "#{self.url}/#{transaction_id}") end |
.url ⇒ Object
90 91 92 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 90 def self.url '/transactions' end |
.void(reason = '', transaction_id = self.id) ⇒ Object
50 51 52 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 50 def self.void(reason='', transaction_id=self.id) Void.create({:reason => reason}, "#{self.url}/#{transaction_id}") end |
.voids(transaction_id = self.id) ⇒ Object
58 59 60 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 58 def self.voids(transaction_id=self.id) Void.all({}, "#{self.url}/#{transaction_id}") end |
Instance Method Details
#refund(reason = '', transaction_id = self.id) ⇒ Object
78 79 80 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 78 def refund(reason='', transaction_id=self.id) self.class.refund(reason, transaction_id) end |
#refunds(transaction_id = self.id) ⇒ Object
86 87 88 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 86 def refunds(transaction_id=self.id) self.class.refunds(transaction_id) end |
#retrieve_refund(refund_id = nil, transaction_id = self.id) ⇒ Object
70 71 72 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 70 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
46 47 48 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 46 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
54 55 56 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 54 def void(reason='', transaction_id=self.id) self.class.void(reason, transaction_id) end |
#voids(transaction_id = self.id) ⇒ Object
62 63 64 |
# File 'lib/ap_ruby_sdk/transaction.rb', line 62 def voids(transaction_id=self.id) self.class.voids(transaction_id) end |