Class: Dotpay::CancelRequest
- Inherits:
-
Object
- Object
- Dotpay::CancelRequest
- Defined in:
- lib/dotpay/cancel_request.rb
Constant Summary collapse
- TYPE_FULL =
1- TYPE_PARTIAL =
2
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#control ⇒ Object
readonly
Returns the value of attribute control.
-
#t_id ⇒ Object
readonly
Returns the value of attribute t_id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #checksum ⇒ Object
-
#initialize(t_id, amount, control, options = {}) ⇒ CancelRequest
constructor
A new instance of CancelRequest.
Constructor Details
#initialize(t_id, amount, control, options = {}) ⇒ CancelRequest
Returns a new instance of CancelRequest.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/dotpay/cancel_request.rb', line 10 def initialize(t_id, amount, control, = {}) = { type: TYPE_FULL }.merge() @t_id = t_id @amount = "%0.2f" % amount @control = control @type = [:type] end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
5 6 7 |
# File 'lib/dotpay/cancel_request.rb', line 5 def amount @amount end |
#control ⇒ Object (readonly)
Returns the value of attribute control.
5 6 7 |
# File 'lib/dotpay/cancel_request.rb', line 5 def control @control end |
#t_id ⇒ Object (readonly)
Returns the value of attribute t_id.
5 6 7 |
# File 'lib/dotpay/cancel_request.rb', line 5 def t_id @t_id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/dotpay/cancel_request.rb', line 5 def type @type end |
Instance Method Details
#checksum ⇒ Object
21 22 23 |
# File 'lib/dotpay/cancel_request.rb', line 21 def checksum calculate_checksum end |