Class: Mailchimp::Users
- Inherits:
-
Object
- Object
- Mailchimp::Users
- Defined in:
- lib/mailchimp/api.rb
Instance Attribute Summary collapse
-
#master ⇒ Object
Returns the value of attribute master.
Instance Method Summary collapse
-
#initialize(master) ⇒ Users
constructor
A new instance of Users.
-
#invite(email, role = 'viewer', msg = '') ⇒ Hash
Invite a user to your account.
-
#invite_resend(email) ⇒ Hash
Resend an invite a user to your account.
-
#invite_revoke(email) ⇒ Hash
Revoke an invitation sent to a user to your account.
-
#invites ⇒ Array
Retrieve the list of pending users invitations have been sent for.
-
#login_revoke(username) ⇒ Hash
Revoke access for a specified login.
-
#logins ⇒ Array
Retrieve the list of active logins.
-
#profile ⇒ Hash
Retrieve the profile for the login owning the provided API Key.
Constructor Details
#initialize(master) ⇒ Users
Returns a new instance of Users.
166 167 168 |
# File 'lib/mailchimp/api.rb', line 166 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
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 |
#invites ⇒ Array
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 login_revoke(username) _params = {:username => username} return @master.call 'users/login-revoke', _params end |
#logins ⇒ Array
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 |
#profile ⇒ Hash
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 |