class Paymo::Base
Public Class Methods
new(options = {})
click to toggle source
# File lib/paymo.rb, line 35 def initialize(options = {}) @username = options[:username] @password = options[:password] @format = options[:format] || 'json' self.auth end
Public Instance Methods
auth()
click to toggle source
# File lib/paymo.rb, line 42 def auth response = Paymo::API.post :auth, :login, { format: @format, username: @username, password: @password, api_key: Paymo.config.api_key } # add error checking Paymo.config.auth_token = response['token']['_content'] end