Class: PaysonAPI::V1::Requests::PaymentUpdate
- Inherits:
-
Object
- Object
- PaysonAPI::V1::Requests::PaymentUpdate
- Defined in:
- lib/payson_api/v1/requests/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.
9 10 11 12 13 14 15 16 |
# File 'lib/payson_api/v1/requests/payment_update.rb', line 9 def initialize(token, action) unless PaysonAPI::V1::PAYMENT_ACTIONS.include?(action) raise PaysonAPI::V1::Errors::UnknownPaymentActionError(action) end @token = token @action = action end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
7 8 9 |
# File 'lib/payson_api/v1/requests/payment_update.rb', line 7 def action @action end |
#token ⇒ Object
Returns the value of attribute token.
7 8 9 |
# File 'lib/payson_api/v1/requests/payment_update.rb', line 7 def token @token end |
Instance Method Details
#to_hash ⇒ Object
18 19 20 21 22 23 |
# File 'lib/payson_api/v1/requests/payment_update.rb', line 18 def to_hash {}.tap do |hash| hash['token'] = @token hash['action'] = @action end end |