Class: Brevo::UserApi
- Inherits:
-
Object
- Object
- Brevo::UserApi
- Defined in:
- lib/brevo/api/user_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#edit_user_permission(update_permissions, opts = {}) ⇒ Inviteuser
Update permission for a user ‘Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc.
-
#edit_user_permission_with_http_info(update_permissions, opts = {}) ⇒ Array<(Inviteuser, Fixnum, Hash)>
Update permission for a user `Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc.
-
#get_invited_users_list(opts = {}) ⇒ GetInvitedUsersList
Get the list of all your users.
-
#get_invited_users_list_with_http_info(opts = {}) ⇒ Array<(GetInvitedUsersList, Fixnum, Hash)>
Get the list of all your users.
-
#get_user_permission(email, opts = {}) ⇒ GetUserPermission
Check user permission.
-
#get_user_permission_with_http_info(email, opts = {}) ⇒ Array<(GetUserPermission, Fixnum, Hash)>
Check user permission.
-
#initialize(api_client = ApiClient.default) ⇒ UserApi
constructor
A new instance of UserApi.
-
#inviteuser(send_invitation, opts = {}) ⇒ Inviteuser
Send invitation to user ‘Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc.
-
#inviteuser_with_http_info(send_invitation, opts = {}) ⇒ Array<(Inviteuser, Fixnum, Hash)>
Send invitation to user `Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc.
-
#put_revoke_user_permission(email, opts = {}) ⇒ PutRevokeUserPermission
Revoke user permission.
-
#put_revoke_user_permission_with_http_info(email, opts = {}) ⇒ Array<(PutRevokeUserPermission, Fixnum, Hash)>
Revoke user permission.
-
#putresendcancelinvitation(action, email, opts = {}) ⇒ Putresendcancelinvitation
Resend / Cancel invitation.
-
#putresendcancelinvitation_with_http_info(action, email, opts = {}) ⇒ Array<(Putresendcancelinvitation, Fixnum, Hash)>
Resend / Cancel invitation.
-
#setUserAgent(user_agent) ⇒ Object
Set custom user_agent if explicitly passed in api default will still remain Swagger-Codegen/#VERSION/ruby.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/brevo/api/user_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#edit_user_permission(update_permissions, opts = {}) ⇒ Inviteuser
Update permission for a user ‘Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `sms_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `contacts`: - "view" - "create_edit_delete" - "import" - "export" - "list_and_attributes" - "forms" - `templates`: - "create_edit_delete" - "activate_deactivate" - `workflows`: - "create_edit_delete" - "activate_deactivate_pause" - "settings" - `facebook_ads`: - "create_edit_delete" - "schedule_pause" - `landing_pages`: - "all" - `transactional_emails`: - "settings" - "logs" - `smtp_api`: - "smtp" - "api_keys" - "authorized_ips" - `user_management`: - "all" - `sales_platform`: - "manage_owned_deals_tasks_companies" - "manage_others_deals_tasks_companies" - "reports" - "settings" - `phone`: - "all" - `conversations`: - "access" - "assign" - "configure" - `senders_domains_dedicated_ips`: - "senders_management" - "domains_management" - "dedicated_ips_management" - `push_notifications`: - "view" - "create_edit_delete" - "send" - "settings" Note: - The privileges array remains the same as in the send invitation; the user simply needs to provide the permissions that need to be updated. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly.
37 38 39 40 |
# File 'lib/brevo/api/user_api.rb', line 37 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#edit_user_permission_with_http_info(update_permissions, opts = {}) ⇒ Array<(Inviteuser, Fixnum, Hash)>
Update permission for a user `Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `sms_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `contacts`: - "view" - "create_edit_delete" - "import" - "export" - "list_and_attributes" - "forms" - `templates`: - "create_edit_delete" - "activate_deactivate" - `workflows`: - "create_edit_delete" - "activate_deactivate_pause" - "settings" - `facebook_ads`: - "create_edit_delete" - "schedule_pause" - `landing_pages`: - "all" - `transactional_emails`: - "settings" - "logs" - `smtp_api`: - "smtp" - "api_keys" - "authorized_ips" - `user_management`: - "all" - `sales_platform`: - "manage_owned_deals_tasks_companies" - "manage_others_deals_tasks_companies" - "reports" - "settings" - `phone`: - "all" - `conversations`: - "access" - "assign" - "configure" - `senders_domains_dedicated_ips`: - "senders_management" - "domains_management" - "dedicated_ips_management" - `push_notifications`: - "view" - "create_edit_delete" - "send" - "settings" Note: - The privileges array remains the same as in the send invitation; the user simply needs to provide the permissions that need to be updated. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/brevo/api/user_api.rb', line 47 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.edit_user_permission ...' end # verify the required parameter 'update_permissions' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'update_permissions' when calling UserApi.edit_user_permission" end # resource path local_var_path = '/organization/user/update/permissions' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Inviteuser') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#edit_user_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_invited_users_list(opts = {}) ⇒ GetInvitedUsersList
Get the list of all your users
89 90 91 92 |
# File 'lib/brevo/api/user_api.rb', line 89 def get_invited_users_list(opts = {}) data, _status_code, _headers = get_invited_users_list_with_http_info(opts) data end |
#get_invited_users_list_with_http_info(opts = {}) ⇒ Array<(GetInvitedUsersList, Fixnum, Hash)>
Get the list of all your users
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/brevo/api/user_api.rb', line 97 def get_invited_users_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.get_invited_users_list ...' end # resource path local_var_path = '/organization/invited/users' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetInvitedUsersList') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#get_invited_users_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_permission(email, opts = {}) ⇒ GetUserPermission
Check user permission
136 137 138 139 |
# File 'lib/brevo/api/user_api.rb', line 136 def (email, opts = {}) data, _status_code, _headers = (email, opts) data end |
#get_user_permission_with_http_info(email, opts = {}) ⇒ Array<(GetUserPermission, Fixnum, Hash)>
Check user permission
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/brevo/api/user_api.rb', line 145 def (email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.get_user_permission ...' end # verify the required parameter 'email' is set if @api_client.config.client_side_validation && email.nil? fail ArgumentError, "Missing the required parameter 'email' when calling UserApi.get_user_permission" end # resource path local_var_path = '/organization/user/{email}/permissions'.sub('{' + 'email' + '}', email.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetUserPermission') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#get_user_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#inviteuser(send_invitation, opts = {}) ⇒ Inviteuser
Send invitation to user ‘Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `sms_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `contacts`: - "view" - "create_edit_delete" - "import" - "export" - "list_and_attributes" - "forms" - `templates`: - "create_edit_delete" - "activate_deactivate" - `workflows`: - "create_edit_delete" - "activate_deactivate_pause" - "settings" - `facebook_ads`: - "create_edit_delete" - "schedule_pause" - `landing_pages`: - "all" - `transactional_emails`: - "settings" - "logs" - `smtp_api`: - "smtp" - "api_keys" - "authorized_ips" - `user_management`: - "all" - `sales_platform`: - "manage_owned_deals_tasks_companies" - "manage_others_deals_tasks_companies" - "reports" - "settings" - `phone`: - "all" - `conversations`: - "access" - "assign" - "configure" - `senders_domains_dedicated_ips`: - "senders_management" - "domains_management" - "dedicated_ips_management" - `push_notifications`: - "view" - "create_edit_delete" - "send" - "settings" Note: - If `all_features_access: false` then only privileges are required otherwise if `true` then it’s assumed that all permissions will be there for the invited user. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly.
189 190 191 192 |
# File 'lib/brevo/api/user_api.rb', line 189 def inviteuser(send_invitation, opts = {}) data, _status_code, _headers = inviteuser_with_http_info(send_invitation, opts) data end |
#inviteuser_with_http_info(send_invitation, opts = {}) ⇒ Array<(Inviteuser, Fixnum, Hash)>
Send invitation to user `Feature` - A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. `Permission` - A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - `email_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `sms_campaigns`: - "create_edit_delete" - "send_schedule_suspend" - `contacts`: - "view" - "create_edit_delete" - "import" - "export" - "list_and_attributes" - "forms" - `templates`: - "create_edit_delete" - "activate_deactivate" - `workflows`: - "create_edit_delete" - "activate_deactivate_pause" - "settings" - `facebook_ads`: - "create_edit_delete" - "schedule_pause" - `landing_pages`: - "all" - `transactional_emails`: - "settings" - "logs" - `smtp_api`: - "smtp" - "api_keys" - "authorized_ips" - `user_management`: - "all" - `sales_platform`: - "manage_owned_deals_tasks_companies" - "manage_others_deals_tasks_companies" - "reports" - "settings" - `phone`: - "all" - `conversations`: - "access" - "assign" - "configure" - `senders_domains_dedicated_ips`: - "senders_management" - "domains_management" - "dedicated_ips_management" - `push_notifications`: - "view" - "create_edit_delete" - "send" - "settings" Note: - If `all_features_access: false` then only privileges are required otherwise if `true` then it's assumed that all permissions will be there for the invited user. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly.
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/brevo/api/user_api.rb', line 199 def inviteuser_with_http_info(send_invitation, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.inviteuser ...' end # verify the required parameter 'send_invitation' is set if @api_client.config.client_side_validation && send_invitation.nil? fail ArgumentError, "Missing the required parameter 'send_invitation' when calling UserApi.inviteuser" end # resource path local_var_path = '/organization/user/invitation/send' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(send_invitation) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Inviteuser') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#inviteuser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_revoke_user_permission(email, opts = {}) ⇒ PutRevokeUserPermission
Revoke user permission
242 243 244 245 |
# File 'lib/brevo/api/user_api.rb', line 242 def (email, opts = {}) data, _status_code, _headers = (email, opts) data end |
#put_revoke_user_permission_with_http_info(email, opts = {}) ⇒ Array<(PutRevokeUserPermission, Fixnum, Hash)>
Revoke user permission
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/brevo/api/user_api.rb', line 251 def (email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.put_revoke_user_permission ...' end # verify the required parameter 'email' is set if @api_client.config.client_side_validation && email.nil? fail ArgumentError, "Missing the required parameter 'email' when calling UserApi.put_revoke_user_permission" end # resource path local_var_path = '/organization/user/invitation/revoke/{email}'.sub('{' + 'email' + '}', email.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PutRevokeUserPermission') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#put_revoke_user_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#putresendcancelinvitation(action, email, opts = {}) ⇒ Putresendcancelinvitation
Resend / Cancel invitation
295 296 297 298 |
# File 'lib/brevo/api/user_api.rb', line 295 def putresendcancelinvitation(action, email, opts = {}) data, _status_code, _headers = putresendcancelinvitation_with_http_info(action, email, opts) data end |
#putresendcancelinvitation_with_http_info(action, email, opts = {}) ⇒ Array<(Putresendcancelinvitation, Fixnum, Hash)>
Resend / Cancel invitation
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/brevo/api/user_api.rb', line 305 def putresendcancelinvitation_with_http_info(action, email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.putresendcancelinvitation ...' end # verify the required parameter 'action' is set if @api_client.config.client_side_validation && action.nil? fail ArgumentError, "Missing the required parameter 'action' when calling UserApi.putresendcancelinvitation" end # verify enum value if @api_client.config.client_side_validation && !['resend', 'cancel'].include?(action) fail ArgumentError, "invalid value for 'action', must be one of resend, cancel" end # verify the required parameter 'email' is set if @api_client.config.client_side_validation && email.nil? fail ArgumentError, "Missing the required parameter 'email' when calling UserApi.putresendcancelinvitation" end # resource path local_var_path = '/organization/user/invitation/{action}/{email}'.sub('{' + 'action' + '}', action.to_s).sub('{' + 'email' + '}', email.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Putresendcancelinvitation') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#putresendcancelinvitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#setUserAgent(user_agent) ⇒ Object
Set custom user_agent if explicitly passed in api default will still remain Swagger-Codegen/#VERSION/ruby
25 26 27 28 29 30 |
# File 'lib/brevo/api/user_api.rb', line 25 def setUserAgent(user_agent) @user_agent = user_agent if user_agent.is_a?(String) && user_agent.downcase.start_with?('brevo_') @api_client.default_headers['User-Agent'] = @user_agent end end |