Class: Mailchimp::Users

Inherits:
Object
  • Object
show all
Defined in:
lib/mailchimp/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(master) ⇒ Users



166
167
168
# File 'lib/mailchimp/api.rb', line 166

def initialize(master)
    @master = master
end

Instance Attribute Details

#masterObject

Returns the value of attribute master.



164
165
166
# File 'lib/mailchimp/api.rb', line 164

def master
  @master
end

Instance Method Details

#invite(email, role = 'viewer', msg = '') ⇒ Hash

Invite a user to your account



176
177
178
179
# File 'lib/mailchimp/api.rb', line 176

def invite(email, role='viewer', msg='')
    _params = {:email => email, :role => role, :msg => msg}
    return @master.call 'users/invite', _params
end

#invite_resend(email) ⇒ Hash

Resend an invite a user to your account. Note, if the same address has been invited multiple times, this will simpy re-send the most recent invite



185
186
187
188
# File 'lib/mailchimp/api.rb', line 185

def invite_resend(email)
    _params = {:email => email}
    return @master.call 'users/invite-resend', _params
end

#invite_revoke(email) ⇒ Hash

Revoke an invitation sent to a user to your account. Note, if the same address has been invited multiple times, this will simpy revoke the most recent invite



194
195
196
197
# File 'lib/mailchimp/api.rb', line 194

def invite_revoke(email)
    _params = {:email => email}
    return @master.call 'users/invite-revoke', _params
end

#invitesArray

Retrieve the list of pending users invitations have been sent for.



206
207
208
209
# File 'lib/mailchimp/api.rb', line 206

def invites()
    _params = {}
    return @master.call 'users/invites', _params
end

#login_revoke(username) ⇒ Hash

Revoke access for a specified login



215
216
217
218
# File 'lib/mailchimp/api.rb', line 215

def (username)
    _params = {:username => username}
    return @master.call 'users/login-revoke', _params
end

#loginsArray

Retrieve the list of active logins.



228
229
230
231
# File 'lib/mailchimp/api.rb', line 228

def logins()
    _params = {}
    return @master.call 'users/logins', _params
end

#profileHash

Retrieve the profile for the login owning the provided API Key



241
242
243
244
# File 'lib/mailchimp/api.rb', line 241

def profile()
    _params = {}
    return @master.call 'users/profile', _params
end