class PaysonAPI::V1::Requests::PaymentUpdate

Attributes

action[RW]
token[RW]

Public Class Methods

new(token, action) click to toggle source
# 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

Public Instance Methods

to_hash() click to toggle source
# 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