Class: Erede::Services::GetTransaction
- Defined in:
- lib/erede/services/get_transaction.rb
Constant Summary
Constants inherited from Base
Base::GET, Base::POST, Base::PUT
Instance Attribute Summary collapse
-
#reference ⇒ Object
Returns the value of attribute reference.
-
#refundId ⇒ Object
Returns the value of attribute refundId.
-
#refunds ⇒ Object
Returns the value of attribute refunds.
-
#tid ⇒ Object
Returns the value of attribute tid.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Erede::Services::Base
Instance Attribute Details
#reference ⇒ Object
Returns the value of attribute reference.
4 5 6 |
# File 'lib/erede/services/get_transaction.rb', line 4 def reference @reference end |
#refundId ⇒ Object
Returns the value of attribute refundId.
4 5 6 |
# File 'lib/erede/services/get_transaction.rb', line 4 def refundId @refundId end |
#refunds ⇒ Object
Returns the value of attribute refunds.
4 5 6 |
# File 'lib/erede/services/get_transaction.rb', line 4 def refunds @refunds end |
#tid ⇒ Object
Returns the value of attribute tid.
4 5 6 |
# File 'lib/erede/services/get_transaction.rb', line 4 def tid @tid end |
Instance Method Details
#execute ⇒ Object
16 17 18 |
# File 'lib/erede/services/get_transaction.rb', line 16 def execute send_request(GET) end |
#url ⇒ Object
9 10 11 12 13 14 |
# File 'lib/erede/services/get_transaction.rb', line 9 def url raise(Erede::Errors::EredeError, 'You need to specify one: the tid or the reference') if !tid && !reference return "#{super}?reference=#{reference}" if reference return "#{super}/#{tid}/refunds#{refundId ? '/' + refundId.to_s : ''}" if refunds "#{super}/#{tid}" end |