Class: PaysonAPI::Request::PaymentUpdate
- Inherits:
-
Object
- Object
- PaysonAPI::Request::PaymentUpdate
- Defined in:
- lib/payson_api/request/payment_update.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token, action) ⇒ PaymentUpdate
constructor
A new instance of PaymentUpdate.
- #to_hash ⇒ Object
Constructor Details
#initialize(token, action) ⇒ PaymentUpdate
Returns a new instance of PaymentUpdate.
6 7 8 9 10 11 12 |
# File 'lib/payson_api/request/payment_update.rb', line 6 def initialize(token, action) @token = token if !PAYMENT_ACTIONS.include?(action) raise "Unknown payment update action: #{action}" end @action = action end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
4 5 6 |
# File 'lib/payson_api/request/payment_update.rb', line 4 def action @action end |
#token ⇒ Object
Returns the value of attribute token.
4 5 6 |
# File 'lib/payson_api/request/payment_update.rb', line 4 def token @token end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 17 18 19 |
# File 'lib/payson_api/request/payment_update.rb', line 14 def to_hash {}.tap do |hash| hash['token'] = @token hash['action'] = @action end end |