class JustGiving::Account
Public Class Methods
new(email=nil)
click to toggle source
# File lib/just_giving/account.rb, line 3 def initialize(email=nil) @email = email end
Public Instance Methods
available?()
click to toggle source
Confirm if an email is available or not
# File lib/just_giving/account.rb, line 23 def available? begin head("v1/account/#{@email}") return false rescue JustGiving::NotFound return true end end
change_password(params)
click to toggle source
Update password
# File lib/just_giving/account.rb, line 33 def change_password(params) post('v1/account/changePassword', params) end
create(params)
click to toggle source
This creates an user account with Just Giving
# File lib/just_giving/account.rb, line 13 def create(params) put('v1/account', params) end
pages()
click to toggle source
This lists all the fundraising pages for the supplied email
# File lib/just_giving/account.rb, line 8 def pages get("v1/account/#{@email}/pages") end
password_reminder()
click to toggle source
Send password reminder
# File lib/just_giving/account.rb, line 38 def password_reminder response = get("v1/account/#{@email}/requestpasswordreminder") (response && response[:errors]) ? response : true end
validate(params)
click to toggle source
This validates a username/password
# File lib/just_giving/account.rb, line 18 def validate(params) post('v1/account/validate', params) end