class Learndot::TrainingCredits
Public Class Methods
new(api)
click to toggle source
# File lib/learndot/training_credits.rb, line 2 def initialize(api) @api = api end
Public Instance Methods
adjust(tc_account_id, conditions)
click to toggle source
# File lib/learndot/training_credits.rb, line 14 def adjust(tc_account_id, conditions) api_post("credit/#{tc_account_id}/adjust", conditions) end
create_account(conditions)
click to toggle source
# File lib/learndot/training_credits.rb, line 10 def create_account(conditions) api_post('/credit', conditions) end
find_accounts(email)
click to toggle source
# File lib/learndot/training_credits.rb, line 6 def find_accounts(email) api_get('/credit', {email: email}) end
history(tc_account_id)
click to toggle source
# File lib/learndot/training_credits.rb, line 18 def history(tc_account_id) endpoint = "/credit/#{tc_account_id}/transactions" page do |count| api_get(endpoint, {page: count}) end end