brevo 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +56 -4
- data/docs/Body.md +2 -3
- data/docs/Body1.md +2 -3
- data/docs/Body10.md +10 -4
- data/docs/Body11.md +6 -1
- data/docs/Body12.md +1 -4
- data/docs/Body13.md +11 -0
- data/docs/Body14.md +8 -0
- data/docs/Body15.md +11 -0
- data/docs/Body2.md +1 -4
- data/docs/Body3.md +3 -2
- data/docs/Body4.md +3 -2
- data/docs/Body5.md +4 -4
- data/docs/Body6.md +2 -11
- data/docs/Body7.md +2 -10
- data/docs/Body8.md +4 -6
- data/docs/Body9.md +11 -1
- data/docs/CompaniesApi.md +8 -8
- data/docs/ContactsApi.md +14 -4
- data/docs/ConversationsApi.md +10 -10
- data/docs/ConversionSourceMetrics.md +12 -0
- data/docs/ConversionSourceProduct.md +15 -0
- data/docs/CorporateGroupDetailsResponse.md +10 -0
- data/docs/CorporateGroupDetailsResponseGroup.md +10 -0
- data/docs/CorporateGroupDetailsResponseSubaccounts.md +10 -0
- data/docs/CorporateGroupDetailsResponseUsers.md +10 -0
- data/docs/CouponsApi.md +12 -9
- data/docs/CreateContact.md +1 -1
- data/docs/CreateCouponCollection.md +5 -2
- data/docs/CreateDomainModel.md +1 -0
- data/docs/CreateDomainModelDnsRecords.md +1 -0
- data/docs/CreateWebhook.md +3 -0
- data/docs/CreateWhatsAppTemplate.md +1 -0
- data/docs/DealsApi.md +10 -10
- data/docs/EcommerceApi.md +261 -2
- data/docs/EmailCampaignsApi.md +1 -3
- data/docs/Event.md +12 -0
- data/docs/EventIdentifiers.md +12 -0
- data/docs/EventsApi.md +67 -0
- data/docs/ExportWebhooksHistory.md +2 -1
- data/docs/ExternalFeedsApi.md +2 -2
- data/docs/GetContactDetails.md +1 -1
- data/docs/GetCorporateInvitedUsersList.md +8 -0
- data/docs/GetCorporateInvitedUsersListFeatureAccess.md +11 -0
- data/docs/GetCorporateInvitedUsersListGroups.md +9 -0
- data/docs/GetCorporateInvitedUsersListUsers.md +12 -0
- data/docs/GetCorporateUserPermission.md +11 -0
- data/docs/GetCorporateUserPermissionFeatureAccess.md +11 -0
- data/docs/GetCorporateUserPermissionGroups.md +9 -0
- data/docs/GetCouponCollection.md +9 -6
- data/docs/GetExtendedContactDetails.md +1 -1
- data/docs/GetOrders.md +9 -0
- data/docs/GetWebhook.md +3 -0
- data/docs/GetWebhookAuth.md +9 -0
- data/docs/GetWebhookHeaders.md +9 -0
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +2 -3
- data/docs/InlineResponse2002.md +8 -0
- data/docs/InlineResponse2003.md +10 -0
- data/docs/InlineResponse201.md +1 -1
- data/docs/InlineResponse2011.md +1 -1
- data/docs/InlineResponse2012.md +1 -1
- data/docs/InlineResponse2013.md +1 -1
- data/docs/InlineResponse2014.md +1 -1
- data/docs/InlineResponse2015.md +8 -0
- data/docs/InviteAdminUser.md +11 -0
- data/docs/InviteAdminUserPrivileges.md +9 -0
- data/docs/Inviteuser.md +10 -0
- data/docs/InviteuserPrivileges.md +9 -0
- data/docs/MasterAccountApi.md +828 -117
- data/docs/MasterDetailsResponsePlanInfoFeatures.md +2 -0
- data/docs/OrderBatch.md +1 -0
- data/docs/PutRevokeUserPermission.md +8 -0
- data/docs/Putresendcancelinvitation.md +8 -0
- data/docs/RequestContactImport.md +1 -0
- data/docs/SendSmtpEmail.md +18 -19
- data/docs/SendSmtpEmailMessageVersions.md +2 -0
- data/docs/SendWhatsappMessage.md +1 -0
- data/docs/SsoTokenRequestCorporate.md +8 -0
- data/docs/SubAccountAppsToggleRequest.md +1 -1
- data/docs/SubAccountUpdatePlanRequestFeatures.md +2 -2
- data/docs/TasksApi.md +8 -8
- data/docs/TransactionalEmailsApi.md +7 -7
- data/docs/TransactionalWhatsAppApi.md +2 -2
- data/docs/UpdateContact.md +1 -1
- data/docs/UpdateCouponCollection.md +4 -1
- data/docs/UpdateWebhook.md +3 -0
- data/docs/UserApi.md +239 -0
- data/docs/WebhooksApi.md +4 -4
- data/docs/WhatsAppCampaignsApi.md +3 -1
- data/lib/brevo/api/companies_api.rb +3 -3
- data/lib/brevo/api/contacts_api.rb +14 -2
- data/lib/brevo/api/conversations_api.rb +2 -2
- data/lib/brevo/api/coupons_api.rb +15 -16
- data/lib/brevo/api/deals_api.rb +5 -5
- data/lib/brevo/api/ecommerce_api.rb +250 -0
- data/lib/brevo/api/email_campaigns_api.rb +0 -3
- data/lib/brevo/api/events_api.rb +86 -0
- data/lib/brevo/api/external_feeds_api.rb +3 -3
- data/lib/brevo/api/master_account_api.rb +652 -4
- data/lib/brevo/api/tasks_api.rb +5 -5
- data/lib/brevo/api/transactional_emails_api.rb +11 -11
- data/lib/brevo/api/transactional_whats_app_api.rb +3 -3
- data/lib/brevo/api/user_api.rb +222 -0
- data/lib/brevo/api/webhooks_api.rb +4 -4
- data/lib/brevo/api/whats_app_campaigns_api.rb +6 -0
- data/lib/brevo/models/body.rb +20 -28
- data/lib/brevo/models/body_1.rb +22 -25
- data/lib/brevo/models/body_10.rb +95 -39
- data/lib/brevo/models/body_11.rb +60 -5
- data/lib/brevo/models/body_12.rb +13 -38
- data/lib/brevo/models/body_13.rb +225 -0
- data/lib/brevo/models/body_14.rb +190 -0
- data/lib/brevo/models/body_15.rb +215 -0
- data/lib/brevo/models/body_2.rb +14 -45
- data/lib/brevo/models/body_3.rb +16 -6
- data/lib/brevo/models/body_4.rb +16 -6
- data/lib/brevo/models/body_5.rb +19 -19
- data/lib/brevo/models/body_6.rb +9 -129
- data/lib/brevo/models/body_7.rb +9 -95
- data/lib/brevo/models/body_8.rb +37 -59
- data/lib/brevo/models/body_9.rb +141 -11
- data/lib/brevo/models/conversion_source_metrics.rb +279 -0
- data/lib/brevo/models/conversion_source_product.rb +252 -0
- data/lib/brevo/models/corporate_group_details_response.rb +206 -0
- data/lib/brevo/models/corporate_group_details_response_group.rb +205 -0
- data/lib/brevo/models/corporate_group_details_response_subaccounts.rb +205 -0
- data/lib/brevo/models/corporate_group_details_response_users.rb +205 -0
- data/lib/brevo/models/create_contact.rb +1 -1
- data/lib/brevo/models/create_coupon_collection.rb +37 -7
- data/lib/brevo/models/create_domain_model.rb +11 -1
- data/lib/brevo/models/create_domain_model_dns_records.rb +13 -4
- data/lib/brevo/models/create_webhook.rb +35 -4
- data/lib/brevo/models/create_whats_app_template.rb +28 -6
- data/lib/brevo/models/event.rb +234 -0
- data/lib/brevo/models/event_identifiers.rb +236 -0
- data/lib/brevo/models/export_webhooks_history.rb +31 -4
- data/lib/brevo/models/get_contact_details.rb +0 -5
- data/lib/brevo/models/get_corporate_invited_users_list.rb +187 -0
- data/lib/brevo/models/get_corporate_invited_users_list_feature_access.rb +224 -0
- data/lib/brevo/models/get_corporate_invited_users_list_groups.rb +196 -0
- data/lib/brevo/models/get_corporate_invited_users_list_users.rb +248 -0
- data/lib/brevo/models/get_corporate_user_permission.rb +236 -0
- data/lib/brevo/models/get_corporate_user_permission_feature_access.rb +224 -0
- data/lib/brevo/models/get_corporate_user_permission_groups.rb +196 -0
- data/lib/brevo/models/get_coupon_collection.rb +40 -10
- data/lib/brevo/models/get_extended_contact_details.rb +0 -5
- data/lib/brevo/models/get_orders.rb +196 -0
- data/lib/brevo/models/get_webhook.rb +35 -4
- data/lib/brevo/models/get_webhook_auth.rb +196 -0
- data/lib/brevo/models/get_webhook_headers.rb +195 -0
- data/lib/brevo/models/inline_response_200.rb +7 -14
- data/lib/brevo/models/inline_response_200_1.rb +9 -34
- data/lib/brevo/models/inline_response_200_2.rb +191 -0
- data/lib/brevo/models/inline_response_200_3.rb +215 -0
- data/lib/brevo/models/inline_response_201.rb +0 -7
- data/lib/brevo/models/inline_response_201_1.rb +2 -2
- data/lib/brevo/models/inline_response_201_2.rb +2 -1
- data/lib/brevo/models/inline_response_201_3.rb +11 -11
- data/lib/brevo/models/inline_response_201_4.rb +11 -11
- data/lib/brevo/models/inline_response_201_5.rb +190 -0
- data/lib/brevo/models/invite_admin_user.rb +233 -0
- data/lib/brevo/models/invite_admin_user_privileges.rb +232 -0
- data/lib/brevo/models/inviteuser.rb +221 -0
- data/lib/brevo/models/inviteuser_privileges.rb +232 -0
- data/lib/brevo/models/master_details_response_plan_info_features.rb +21 -1
- data/lib/brevo/models/order_batch.rb +16 -4
- data/lib/brevo/models/put_revoke_user_permission.rb +191 -0
- data/lib/brevo/models/putresendcancelinvitation.rb +191 -0
- data/lib/brevo/models/request_contact_import.rb +13 -1
- data/lib/brevo/models/send_smtp_email_message_versions.rb +24 -4
- data/lib/brevo/models/send_whatsapp_message.rb +11 -1
- data/lib/brevo/models/sso_token_request_corporate.rb +190 -0
- data/lib/brevo/models/sub_account_apps_toggle_request.rb +1 -1
- data/lib/brevo/models/sub_account_details_response_plan_info_features_inbox.rb +1 -1
- data/lib/brevo/models/sub_account_details_response_plan_info_features_landing_page.rb +1 -1
- data/lib/brevo/models/sub_account_update_plan_request_features.rb +2 -2
- data/lib/brevo/models/update_contact.rb +1 -1
- data/lib/brevo/models/update_coupon_collection.rb +34 -9
- data/lib/brevo/models/update_webhook.rb +35 -4
- data/lib/brevo/version.rb +1 -1
- data/lib/brevo.rb +32 -0
- data/spec/api/companies_api_spec.rb +1 -1
- data/spec/api/contacts_api_spec.rb +5 -1
- data/spec/api/conversations_api_spec.rb +1 -1
- data/spec/api/coupons_api_spec.rb +4 -3
- data/spec/api/deals_api_spec.rb +2 -2
- data/spec/api/ecommerce_api_spec.rb +57 -0
- data/spec/api/email_campaigns_api_spec.rb +0 -1
- data/spec/api/events_api_spec.rb +47 -0
- data/spec/api/external_feeds_api_spec.rb +1 -1
- data/spec/api/master_account_api_spec.rb +145 -1
- data/spec/api/tasks_api_spec.rb +2 -2
- data/spec/api/transactional_emails_api_spec.rb +3 -3
- data/spec/api/transactional_whats_app_api_spec.rb +1 -1
- data/spec/api/user_api_spec.rb +47 -0
- data/spec/api/webhooks_api_spec.rb +2 -2
- data/spec/api/whats_app_campaigns_api_spec.rb +1 -0
- data/spec/models/body_10_spec.rb +40 -4
- data/spec/models/body_11_spec.rb +30 -0
- data/spec/models/body_12_spec.rb +1 -19
- data/spec/models/body_13_spec.rb +59 -0
- data/spec/models/body_14_spec.rb +41 -0
- data/spec/models/body_15_spec.rb +59 -0
- data/spec/models/body_1_spec.rb +2 -8
- data/spec/models/body_2_spec.rb +1 -19
- data/spec/models/body_3_spec.rb +6 -0
- data/spec/models/body_4_spec.rb +6 -0
- data/spec/models/body_5_spec.rb +2 -2
- data/spec/models/body_6_spec.rb +1 -55
- data/spec/models/body_7_spec.rb +1 -49
- data/spec/models/body_8_spec.rb +4 -16
- data/spec/models/body_9_spec.rb +61 -1
- data/spec/models/body_spec.rb +2 -8
- data/spec/models/conversion_source_metrics_spec.rb +69 -0
- data/spec/models/conversion_source_product_spec.rb +83 -0
- data/spec/models/corporate_group_details_response_group_spec.rb +53 -0
- data/spec/models/corporate_group_details_response_spec.rb +53 -0
- data/spec/models/corporate_group_details_response_subaccounts_spec.rb +53 -0
- data/spec/models/corporate_group_details_response_users_spec.rb +53 -0
- data/spec/models/create_coupon_collection_spec.rb +18 -0
- data/spec/models/create_domain_model_dns_records_spec.rb +6 -0
- data/spec/models/create_domain_model_spec.rb +6 -0
- data/spec/models/create_webhook_spec.rb +18 -0
- data/spec/models/create_whats_app_template_spec.rb +11 -1
- data/spec/models/event_identifiers_spec.rb +65 -0
- data/spec/models/event_spec.rb +65 -0
- data/spec/models/export_webhooks_history_spec.rb +11 -1
- data/spec/models/get_corporate_invited_users_list_feature_access_spec.rb +59 -0
- data/spec/models/get_corporate_invited_users_list_groups_spec.rb +47 -0
- data/spec/models/get_corporate_invited_users_list_spec.rb +41 -0
- data/spec/models/get_corporate_invited_users_list_users_spec.rb +65 -0
- data/spec/models/get_corporate_user_permission_feature_access_spec.rb +59 -0
- data/spec/models/get_corporate_user_permission_groups_spec.rb +47 -0
- data/spec/models/get_corporate_user_permission_spec.rb +59 -0
- data/spec/models/get_coupon_collection_spec.rb +18 -0
- data/spec/models/get_orders_spec.rb +47 -0
- data/spec/models/get_webhook_auth_spec.rb +47 -0
- data/spec/models/get_webhook_headers_spec.rb +47 -0
- data/spec/models/get_webhook_spec.rb +18 -0
- data/spec/models/inline_response_200_1_spec.rb +1 -7
- data/spec/models/inline_response_200_2_spec.rb +41 -0
- data/spec/models/inline_response_200_3_spec.rb +53 -0
- data/spec/models/inline_response_200_spec.rb +1 -1
- data/spec/models/inline_response_201_3_spec.rb +1 -1
- data/spec/models/inline_response_201_4_spec.rb +1 -1
- data/spec/models/inline_response_201_5_spec.rb +41 -0
- data/spec/models/invite_admin_user_privileges_spec.rb +55 -0
- data/spec/models/invite_admin_user_spec.rb +59 -0
- data/spec/models/inviteuser_privileges_spec.rb +55 -0
- data/spec/models/inviteuser_spec.rb +53 -0
- data/spec/models/master_details_response_plan_info_features_spec.rb +12 -0
- data/spec/models/order_batch_spec.rb +6 -0
- data/spec/models/put_revoke_user_permission_spec.rb +41 -0
- data/spec/models/putresendcancelinvitation_spec.rb +41 -0
- data/spec/models/request_contact_import_spec.rb +6 -0
- data/spec/models/send_smtp_email_message_versions_spec.rb +12 -0
- data/spec/models/send_whatsapp_message_spec.rb +6 -0
- data/spec/models/sso_token_request_corporate_spec.rb +41 -0
- data/spec/models/update_coupon_collection_spec.rb +18 -0
- data/spec/models/update_webhook_spec.rb +18 -0
- metadata +152 -24
|
@@ -19,7 +19,7 @@ module Brevo
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
# Set custom user_agent if explicitly passed in api
|
|
24
24
|
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
|
25
25
|
def setUserAgent(user_agent)
|
|
@@ -28,7 +28,286 @@ module Brevo
|
|
|
28
28
|
@api_client.default_headers['User-Agent'] = @user_agent
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
|
-
|
|
31
|
+
|
|
32
|
+
# Delete a group
|
|
33
|
+
# This endpoint allows you to delete a group of sub-organizations. When a group is deleted, the sub-organizations are no longer part of this group. The users associated with the group are no longer associated with the group once deleted.
|
|
34
|
+
# @param id Id of the group
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [nil]
|
|
37
|
+
def corporate_group_id_delete(id, opts = {})
|
|
38
|
+
corporate_group_id_delete_with_http_info(id, opts)
|
|
39
|
+
nil
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Delete a group
|
|
43
|
+
# This endpoint allows you to delete a group of sub-organizations. When a group is deleted, the sub-organizations are no longer part of this group. The users associated with the group are no longer associated with the group once deleted.
|
|
44
|
+
# @param id Id of the group
|
|
45
|
+
# @param [Hash] opts the optional parameters
|
|
46
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
47
|
+
def corporate_group_id_delete_with_http_info(id, opts = {})
|
|
48
|
+
if @api_client.config.debugging
|
|
49
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_group_id_delete ...'
|
|
50
|
+
end
|
|
51
|
+
# verify the required parameter 'id' is set
|
|
52
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling MasterAccountApi.corporate_group_id_delete"
|
|
54
|
+
end
|
|
55
|
+
# resource path
|
|
56
|
+
local_var_path = '/corporate/group/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
57
|
+
|
|
58
|
+
# query parameters
|
|
59
|
+
query_params = {}
|
|
60
|
+
|
|
61
|
+
# header parameters
|
|
62
|
+
header_params = {}
|
|
63
|
+
# HTTP header 'Accept' (if needed)
|
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
65
|
+
# HTTP header 'Content-Type'
|
|
66
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
67
|
+
|
|
68
|
+
# form parameters
|
|
69
|
+
form_params = {}
|
|
70
|
+
|
|
71
|
+
# http body (model)
|
|
72
|
+
post_body = nil
|
|
73
|
+
auth_names = ['api-key', 'partner-key']
|
|
74
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names)
|
|
80
|
+
if @api_client.config.debugging
|
|
81
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_group_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
# GET a group details
|
|
86
|
+
# This endpoint allows you to retrieve a specific group’s information such as the list of sub-organizations and the user associated with the group.
|
|
87
|
+
# @param id Id of the group of sub-organization
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [CorporateGroupDetailsResponse]
|
|
90
|
+
def corporate_group_id_get(id, opts = {})
|
|
91
|
+
data, _status_code, _headers = corporate_group_id_get_with_http_info(id, opts)
|
|
92
|
+
data
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# GET a group details
|
|
96
|
+
# This endpoint allows you to retrieve a specific group’s information such as the list of sub-organizations and the user associated with the group.
|
|
97
|
+
# @param id Id of the group of sub-organization
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @return [Array<(CorporateGroupDetailsResponse, Fixnum, Hash)>] CorporateGroupDetailsResponse data, response status code and response headers
|
|
100
|
+
def corporate_group_id_get_with_http_info(id, opts = {})
|
|
101
|
+
if @api_client.config.debugging
|
|
102
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_group_id_get ...'
|
|
103
|
+
end
|
|
104
|
+
# verify the required parameter 'id' is set
|
|
105
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
106
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling MasterAccountApi.corporate_group_id_get"
|
|
107
|
+
end
|
|
108
|
+
# resource path
|
|
109
|
+
local_var_path = '/corporate/group/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
110
|
+
|
|
111
|
+
# query parameters
|
|
112
|
+
query_params = {}
|
|
113
|
+
|
|
114
|
+
# header parameters
|
|
115
|
+
header_params = {}
|
|
116
|
+
# HTTP header 'Accept' (if needed)
|
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
118
|
+
# HTTP header 'Content-Type'
|
|
119
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
120
|
+
|
|
121
|
+
# form parameters
|
|
122
|
+
form_params = {}
|
|
123
|
+
|
|
124
|
+
# http body (model)
|
|
125
|
+
post_body = nil
|
|
126
|
+
auth_names = ['api-key', 'partner-key']
|
|
127
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
128
|
+
:header_params => header_params,
|
|
129
|
+
:query_params => query_params,
|
|
130
|
+
:form_params => form_params,
|
|
131
|
+
:body => post_body,
|
|
132
|
+
:auth_names => auth_names,
|
|
133
|
+
:return_type => 'CorporateGroupDetailsResponse')
|
|
134
|
+
if @api_client.config.debugging
|
|
135
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_group_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
136
|
+
end
|
|
137
|
+
return data, status_code, headers
|
|
138
|
+
end
|
|
139
|
+
# Update a group of sub-accounts
|
|
140
|
+
# This endpoint allows you to update a group of sub-accounts
|
|
141
|
+
# @param id Id of the group
|
|
142
|
+
# @param body Group details to be updated.
|
|
143
|
+
# @param [Hash] opts the optional parameters
|
|
144
|
+
# @return [nil]
|
|
145
|
+
def corporate_group_id_put(id, body, opts = {})
|
|
146
|
+
corporate_group_id_put_with_http_info(id, body, opts)
|
|
147
|
+
nil
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Update a group of sub-accounts
|
|
151
|
+
# This endpoint allows you to update a group of sub-accounts
|
|
152
|
+
# @param id Id of the group
|
|
153
|
+
# @param body Group details to be updated.
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
156
|
+
def corporate_group_id_put_with_http_info(id, body, opts = {})
|
|
157
|
+
if @api_client.config.debugging
|
|
158
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_group_id_put ...'
|
|
159
|
+
end
|
|
160
|
+
# verify the required parameter 'id' is set
|
|
161
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
162
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling MasterAccountApi.corporate_group_id_put"
|
|
163
|
+
end
|
|
164
|
+
# verify the required parameter 'body' is set
|
|
165
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
166
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MasterAccountApi.corporate_group_id_put"
|
|
167
|
+
end
|
|
168
|
+
# resource path
|
|
169
|
+
local_var_path = '/corporate/group/{id}'.sub('{' + 'id' + '}', id.to_s)
|
|
170
|
+
|
|
171
|
+
# query parameters
|
|
172
|
+
query_params = {}
|
|
173
|
+
|
|
174
|
+
# header parameters
|
|
175
|
+
header_params = {}
|
|
176
|
+
# HTTP header 'Accept' (if needed)
|
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
178
|
+
# HTTP header 'Content-Type'
|
|
179
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
180
|
+
|
|
181
|
+
# form parameters
|
|
182
|
+
form_params = {}
|
|
183
|
+
|
|
184
|
+
# http body (model)
|
|
185
|
+
post_body = @api_client.object_to_http_body(body)
|
|
186
|
+
auth_names = ['api-key', 'partner-key']
|
|
187
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
188
|
+
:header_params => header_params,
|
|
189
|
+
:query_params => query_params,
|
|
190
|
+
:form_params => form_params,
|
|
191
|
+
:body => post_body,
|
|
192
|
+
:auth_names => auth_names)
|
|
193
|
+
if @api_client.config.debugging
|
|
194
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_group_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
195
|
+
end
|
|
196
|
+
return data, status_code, headers
|
|
197
|
+
end
|
|
198
|
+
# Create a new group of sub-accounts
|
|
199
|
+
# This endpoint allows to create a group of sub-accounts
|
|
200
|
+
# @param body Group details to be created.
|
|
201
|
+
# @param [Hash] opts the optional parameters
|
|
202
|
+
# @return [InlineResponse201]
|
|
203
|
+
def corporate_group_post(body, opts = {})
|
|
204
|
+
data, _status_code, _headers = corporate_group_post_with_http_info(body, opts)
|
|
205
|
+
data
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Create a new group of sub-accounts
|
|
209
|
+
# This endpoint allows to create a group of sub-accounts
|
|
210
|
+
# @param body Group details to be created.
|
|
211
|
+
# @param [Hash] opts the optional parameters
|
|
212
|
+
# @return [Array<(InlineResponse201, Fixnum, Hash)>] InlineResponse201 data, response status code and response headers
|
|
213
|
+
def corporate_group_post_with_http_info(body, opts = {})
|
|
214
|
+
if @api_client.config.debugging
|
|
215
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_group_post ...'
|
|
216
|
+
end
|
|
217
|
+
# verify the required parameter 'body' is set
|
|
218
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
219
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MasterAccountApi.corporate_group_post"
|
|
220
|
+
end
|
|
221
|
+
# resource path
|
|
222
|
+
local_var_path = '/corporate/group'
|
|
223
|
+
|
|
224
|
+
# query parameters
|
|
225
|
+
query_params = {}
|
|
226
|
+
|
|
227
|
+
# header parameters
|
|
228
|
+
header_params = {}
|
|
229
|
+
# HTTP header 'Accept' (if needed)
|
|
230
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
231
|
+
# HTTP header 'Content-Type'
|
|
232
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
233
|
+
|
|
234
|
+
# form parameters
|
|
235
|
+
form_params = {}
|
|
236
|
+
|
|
237
|
+
# http body (model)
|
|
238
|
+
post_body = @api_client.object_to_http_body(body)
|
|
239
|
+
auth_names = ['api-key', 'partner-key']
|
|
240
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
241
|
+
:header_params => header_params,
|
|
242
|
+
:query_params => query_params,
|
|
243
|
+
:form_params => form_params,
|
|
244
|
+
:body => post_body,
|
|
245
|
+
:auth_names => auth_names,
|
|
246
|
+
:return_type => 'InlineResponse201')
|
|
247
|
+
if @api_client.config.debugging
|
|
248
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_group_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
249
|
+
end
|
|
250
|
+
return data, status_code, headers
|
|
251
|
+
end
|
|
252
|
+
# Delete sub-account from group
|
|
253
|
+
# This endpoint allows you to remove a sub-organization from a group.
|
|
254
|
+
# @param group_id Id of the group
|
|
255
|
+
# @param body List of sub-account ids
|
|
256
|
+
# @param [Hash] opts the optional parameters
|
|
257
|
+
# @return [nil]
|
|
258
|
+
def corporate_group_unlink_group_id_sub_accounts_put(group_id, body, opts = {})
|
|
259
|
+
corporate_group_unlink_group_id_sub_accounts_put_with_http_info(group_id, body, opts)
|
|
260
|
+
nil
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Delete sub-account from group
|
|
264
|
+
# This endpoint allows you to remove a sub-organization from a group.
|
|
265
|
+
# @param group_id Id of the group
|
|
266
|
+
# @param body List of sub-account ids
|
|
267
|
+
# @param [Hash] opts the optional parameters
|
|
268
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
269
|
+
def corporate_group_unlink_group_id_sub_accounts_put_with_http_info(group_id, body, opts = {})
|
|
270
|
+
if @api_client.config.debugging
|
|
271
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_group_unlink_group_id_sub_accounts_put ...'
|
|
272
|
+
end
|
|
273
|
+
# verify the required parameter 'group_id' is set
|
|
274
|
+
if @api_client.config.client_side_validation && group_id.nil?
|
|
275
|
+
fail ArgumentError, "Missing the required parameter 'group_id' when calling MasterAccountApi.corporate_group_unlink_group_id_sub_accounts_put"
|
|
276
|
+
end
|
|
277
|
+
# verify the required parameter 'body' is set
|
|
278
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
279
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MasterAccountApi.corporate_group_unlink_group_id_sub_accounts_put"
|
|
280
|
+
end
|
|
281
|
+
# resource path
|
|
282
|
+
local_var_path = '/corporate/group/unlink/{groupId}/subAccounts'.sub('{' + 'groupId' + '}', group_id.to_s)
|
|
283
|
+
|
|
284
|
+
# query parameters
|
|
285
|
+
query_params = {}
|
|
286
|
+
|
|
287
|
+
# header parameters
|
|
288
|
+
header_params = {}
|
|
289
|
+
# HTTP header 'Accept' (if needed)
|
|
290
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
291
|
+
# HTTP header 'Content-Type'
|
|
292
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
293
|
+
|
|
294
|
+
# form parameters
|
|
295
|
+
form_params = {}
|
|
296
|
+
|
|
297
|
+
# http body (model)
|
|
298
|
+
post_body = @api_client.object_to_http_body(body)
|
|
299
|
+
auth_names = ['api-key', 'partner-key']
|
|
300
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
301
|
+
:header_params => header_params,
|
|
302
|
+
:query_params => query_params,
|
|
303
|
+
:form_params => form_params,
|
|
304
|
+
:body => post_body,
|
|
305
|
+
:auth_names => auth_names)
|
|
306
|
+
if @api_client.config.debugging
|
|
307
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_group_unlink_group_id_sub_accounts_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
308
|
+
end
|
|
309
|
+
return data, status_code, headers
|
|
310
|
+
end
|
|
32
311
|
# Get the details of requested master account
|
|
33
312
|
# This endpoint will provide the details of the master account.
|
|
34
313
|
# @param [Hash] opts the optional parameters
|
|
@@ -77,6 +356,60 @@ module Brevo
|
|
|
77
356
|
end
|
|
78
357
|
return data, status_code, headers
|
|
79
358
|
end
|
|
359
|
+
# Generate SSO token to access admin account
|
|
360
|
+
# This endpoint generates an SSO token to authenticate and access the admin account using the endpoint https://account-app.brevo.com/account/login/corporate/sso/[token], where [token] will be replaced by the actual token.
|
|
361
|
+
# @param sso_token_request_corporate User email of admin account
|
|
362
|
+
# @param [Hash] opts the optional parameters
|
|
363
|
+
# @return [GetSsoToken]
|
|
364
|
+
def corporate_sso_token_post(sso_token_request_corporate, opts = {})
|
|
365
|
+
data, _status_code, _headers = corporate_sso_token_post_with_http_info(sso_token_request_corporate, opts)
|
|
366
|
+
data
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
# Generate SSO token to access admin account
|
|
370
|
+
# This endpoint generates an SSO token to authenticate and access the admin account using the endpoint https://account-app.brevo.com/account/login/corporate/sso/[token], where [token] will be replaced by the actual token.
|
|
371
|
+
# @param sso_token_request_corporate User email of admin account
|
|
372
|
+
# @param [Hash] opts the optional parameters
|
|
373
|
+
# @return [Array<(GetSsoToken, Fixnum, Hash)>] GetSsoToken data, response status code and response headers
|
|
374
|
+
def corporate_sso_token_post_with_http_info(sso_token_request_corporate, opts = {})
|
|
375
|
+
if @api_client.config.debugging
|
|
376
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_sso_token_post ...'
|
|
377
|
+
end
|
|
378
|
+
# verify the required parameter 'sso_token_request_corporate' is set
|
|
379
|
+
if @api_client.config.client_side_validation && sso_token_request_corporate.nil?
|
|
380
|
+
fail ArgumentError, "Missing the required parameter 'sso_token_request_corporate' when calling MasterAccountApi.corporate_sso_token_post"
|
|
381
|
+
end
|
|
382
|
+
# resource path
|
|
383
|
+
local_var_path = '/corporate/ssoToken'
|
|
384
|
+
|
|
385
|
+
# query parameters
|
|
386
|
+
query_params = {}
|
|
387
|
+
|
|
388
|
+
# header parameters
|
|
389
|
+
header_params = {}
|
|
390
|
+
# HTTP header 'Accept' (if needed)
|
|
391
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
392
|
+
# HTTP header 'Content-Type'
|
|
393
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
394
|
+
|
|
395
|
+
# form parameters
|
|
396
|
+
form_params = {}
|
|
397
|
+
|
|
398
|
+
# http body (model)
|
|
399
|
+
post_body = @api_client.object_to_http_body(sso_token_request_corporate)
|
|
400
|
+
auth_names = ['api-key', 'partner-key']
|
|
401
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
402
|
+
:header_params => header_params,
|
|
403
|
+
:query_params => query_params,
|
|
404
|
+
:form_params => form_params,
|
|
405
|
+
:body => post_body,
|
|
406
|
+
:auth_names => auth_names,
|
|
407
|
+
:return_type => 'GetSsoToken')
|
|
408
|
+
if @api_client.config.debugging
|
|
409
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_sso_token_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
410
|
+
end
|
|
411
|
+
return data, status_code, headers
|
|
412
|
+
end
|
|
80
413
|
# Get the list of all the sub-accounts of the master account.
|
|
81
414
|
# This endpoint will provide the list all the sub-accounts of the master account.
|
|
82
415
|
# @param offset Index of the first sub-account in the page
|
|
@@ -470,7 +803,7 @@ module Brevo
|
|
|
470
803
|
end
|
|
471
804
|
return data, status_code, headers
|
|
472
805
|
end
|
|
473
|
-
# Generate SSO token to access
|
|
806
|
+
# Generate SSO token to access sub-account
|
|
474
807
|
# This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.brevo.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token.
|
|
475
808
|
# @param sso_token_request Values to generate SSO token for sub-account
|
|
476
809
|
# @param [Hash] opts the optional parameters
|
|
@@ -480,7 +813,7 @@ module Brevo
|
|
|
480
813
|
data
|
|
481
814
|
end
|
|
482
815
|
|
|
483
|
-
# Generate SSO token to access
|
|
816
|
+
# Generate SSO token to access sub-account
|
|
484
817
|
# This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.brevo.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token.
|
|
485
818
|
# @param sso_token_request Values to generate SSO token for sub-account
|
|
486
819
|
# @param [Hash] opts the optional parameters
|
|
@@ -524,6 +857,119 @@ module Brevo
|
|
|
524
857
|
end
|
|
525
858
|
return data, status_code, headers
|
|
526
859
|
end
|
|
860
|
+
# Resend / cancel admin user invitation
|
|
861
|
+
# This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation
|
|
862
|
+
# @param action Action to be performed (cancel / resend)
|
|
863
|
+
# @param email Email address of the recipient
|
|
864
|
+
# @param [Hash] opts the optional parameters
|
|
865
|
+
# @return [InlineResponse200]
|
|
866
|
+
def corporate_user_invitation_action_email_put(action, email, opts = {})
|
|
867
|
+
data, _status_code, _headers = corporate_user_invitation_action_email_put_with_http_info(action, email, opts)
|
|
868
|
+
data
|
|
869
|
+
end
|
|
870
|
+
|
|
871
|
+
# Resend / cancel admin user invitation
|
|
872
|
+
# This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation
|
|
873
|
+
# @param action Action to be performed (cancel / resend)
|
|
874
|
+
# @param email Email address of the recipient
|
|
875
|
+
# @param [Hash] opts the optional parameters
|
|
876
|
+
# @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers
|
|
877
|
+
def corporate_user_invitation_action_email_put_with_http_info(action, email, opts = {})
|
|
878
|
+
if @api_client.config.debugging
|
|
879
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_user_invitation_action_email_put ...'
|
|
880
|
+
end
|
|
881
|
+
# verify the required parameter 'action' is set
|
|
882
|
+
if @api_client.config.client_side_validation && action.nil?
|
|
883
|
+
fail ArgumentError, "Missing the required parameter 'action' when calling MasterAccountApi.corporate_user_invitation_action_email_put"
|
|
884
|
+
end
|
|
885
|
+
# verify the required parameter 'email' is set
|
|
886
|
+
if @api_client.config.client_side_validation && email.nil?
|
|
887
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MasterAccountApi.corporate_user_invitation_action_email_put"
|
|
888
|
+
end
|
|
889
|
+
# resource path
|
|
890
|
+
local_var_path = '/corporate/user/invitation/{action}/{email}'.sub('{' + 'action' + '}', action.to_s).sub('{' + 'email' + '}', email.to_s)
|
|
891
|
+
|
|
892
|
+
# query parameters
|
|
893
|
+
query_params = {}
|
|
894
|
+
|
|
895
|
+
# header parameters
|
|
896
|
+
header_params = {}
|
|
897
|
+
# HTTP header 'Accept' (if needed)
|
|
898
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
899
|
+
# HTTP header 'Content-Type'
|
|
900
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
901
|
+
|
|
902
|
+
# form parameters
|
|
903
|
+
form_params = {}
|
|
904
|
+
|
|
905
|
+
# http body (model)
|
|
906
|
+
post_body = nil
|
|
907
|
+
auth_names = ['api-key', 'partner-key']
|
|
908
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
909
|
+
:header_params => header_params,
|
|
910
|
+
:query_params => query_params,
|
|
911
|
+
:form_params => form_params,
|
|
912
|
+
:body => post_body,
|
|
913
|
+
:auth_names => auth_names,
|
|
914
|
+
:return_type => 'InlineResponse200')
|
|
915
|
+
if @api_client.config.debugging
|
|
916
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_user_invitation_action_email_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
917
|
+
end
|
|
918
|
+
return data, status_code, headers
|
|
919
|
+
end
|
|
920
|
+
# Revoke an admin user
|
|
921
|
+
# This endpoint allows to revoke/remove an invited member of your Admin account
|
|
922
|
+
# @param email Email of the invited user
|
|
923
|
+
# @param [Hash] opts the optional parameters
|
|
924
|
+
# @return [nil]
|
|
925
|
+
def corporate_user_revoke_email_delete(email, opts = {})
|
|
926
|
+
corporate_user_revoke_email_delete_with_http_info(email, opts)
|
|
927
|
+
nil
|
|
928
|
+
end
|
|
929
|
+
|
|
930
|
+
# Revoke an admin user
|
|
931
|
+
# This endpoint allows to revoke/remove an invited member of your Admin account
|
|
932
|
+
# @param email Email of the invited user
|
|
933
|
+
# @param [Hash] opts the optional parameters
|
|
934
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
935
|
+
def corporate_user_revoke_email_delete_with_http_info(email, opts = {})
|
|
936
|
+
if @api_client.config.debugging
|
|
937
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.corporate_user_revoke_email_delete ...'
|
|
938
|
+
end
|
|
939
|
+
# verify the required parameter 'email' is set
|
|
940
|
+
if @api_client.config.client_side_validation && email.nil?
|
|
941
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MasterAccountApi.corporate_user_revoke_email_delete"
|
|
942
|
+
end
|
|
943
|
+
# resource path
|
|
944
|
+
local_var_path = '/corporate/user/revoke/{email}'.sub('{' + 'email' + '}', email.to_s)
|
|
945
|
+
|
|
946
|
+
# query parameters
|
|
947
|
+
query_params = {}
|
|
948
|
+
|
|
949
|
+
# header parameters
|
|
950
|
+
header_params = {}
|
|
951
|
+
# HTTP header 'Accept' (if needed)
|
|
952
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
953
|
+
# HTTP header 'Content-Type'
|
|
954
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
955
|
+
|
|
956
|
+
# form parameters
|
|
957
|
+
form_params = {}
|
|
958
|
+
|
|
959
|
+
# http body (model)
|
|
960
|
+
post_body = nil
|
|
961
|
+
auth_names = ['api-key', 'partner-key']
|
|
962
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
963
|
+
:header_params => header_params,
|
|
964
|
+
:query_params => query_params,
|
|
965
|
+
:form_params => form_params,
|
|
966
|
+
:body => post_body,
|
|
967
|
+
:auth_names => auth_names)
|
|
968
|
+
if @api_client.config.debugging
|
|
969
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#corporate_user_revoke_email_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
970
|
+
end
|
|
971
|
+
return data, status_code, headers
|
|
972
|
+
end
|
|
527
973
|
# Get user activity logs
|
|
528
974
|
# @param [Hash] opts the optional parameters
|
|
529
975
|
# @option opts [String] :start_date Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search.
|
|
@@ -590,5 +1036,207 @@ module Brevo
|
|
|
590
1036
|
end
|
|
591
1037
|
return data, status_code, headers
|
|
592
1038
|
end
|
|
1039
|
+
# Get the list of all admin users
|
|
1040
|
+
# This endpoint allows you to list all Admin users of your Admin account
|
|
1041
|
+
# @param [Hash] opts the optional parameters
|
|
1042
|
+
# @return [GetCorporateInvitedUsersList]
|
|
1043
|
+
def get_corporate_invited_users_list(opts = {})
|
|
1044
|
+
data, _status_code, _headers = get_corporate_invited_users_list_with_http_info(opts)
|
|
1045
|
+
data
|
|
1046
|
+
end
|
|
1047
|
+
|
|
1048
|
+
# Get the list of all admin users
|
|
1049
|
+
# This endpoint allows you to list all Admin users of your Admin account
|
|
1050
|
+
# @param [Hash] opts the optional parameters
|
|
1051
|
+
# @return [Array<(GetCorporateInvitedUsersList, Fixnum, Hash)>] GetCorporateInvitedUsersList data, response status code and response headers
|
|
1052
|
+
def get_corporate_invited_users_list_with_http_info(opts = {})
|
|
1053
|
+
if @api_client.config.debugging
|
|
1054
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.get_corporate_invited_users_list ...'
|
|
1055
|
+
end
|
|
1056
|
+
# resource path
|
|
1057
|
+
local_var_path = '/corporate/invited/users'
|
|
1058
|
+
|
|
1059
|
+
# query parameters
|
|
1060
|
+
query_params = {}
|
|
1061
|
+
|
|
1062
|
+
# header parameters
|
|
1063
|
+
header_params = {}
|
|
1064
|
+
# HTTP header 'Accept' (if needed)
|
|
1065
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1066
|
+
# HTTP header 'Content-Type'
|
|
1067
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1068
|
+
|
|
1069
|
+
# form parameters
|
|
1070
|
+
form_params = {}
|
|
1071
|
+
|
|
1072
|
+
# http body (model)
|
|
1073
|
+
post_body = nil
|
|
1074
|
+
auth_names = ['api-key', 'partner-key']
|
|
1075
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
1076
|
+
:header_params => header_params,
|
|
1077
|
+
:query_params => query_params,
|
|
1078
|
+
:form_params => form_params,
|
|
1079
|
+
:body => post_body,
|
|
1080
|
+
:auth_names => auth_names,
|
|
1081
|
+
:return_type => 'GetCorporateInvitedUsersList')
|
|
1082
|
+
if @api_client.config.debugging
|
|
1083
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#get_corporate_invited_users_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1084
|
+
end
|
|
1085
|
+
return data, status_code, headers
|
|
1086
|
+
end
|
|
1087
|
+
# Check admin user permissions
|
|
1088
|
+
# @param email Email of the invited user
|
|
1089
|
+
# @param [Hash] opts the optional parameters
|
|
1090
|
+
# @return [GetCorporateUserPermission]
|
|
1091
|
+
def get_corporate_user_permission(email, opts = {})
|
|
1092
|
+
data, _status_code, _headers = get_corporate_user_permission_with_http_info(email, opts)
|
|
1093
|
+
data
|
|
1094
|
+
end
|
|
1095
|
+
|
|
1096
|
+
# Check admin user permissions
|
|
1097
|
+
# @param email Email of the invited user
|
|
1098
|
+
# @param [Hash] opts the optional parameters
|
|
1099
|
+
# @return [Array<(GetCorporateUserPermission, Fixnum, Hash)>] GetCorporateUserPermission data, response status code and response headers
|
|
1100
|
+
def get_corporate_user_permission_with_http_info(email, opts = {})
|
|
1101
|
+
if @api_client.config.debugging
|
|
1102
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.get_corporate_user_permission ...'
|
|
1103
|
+
end
|
|
1104
|
+
# verify the required parameter 'email' is set
|
|
1105
|
+
if @api_client.config.client_side_validation && email.nil?
|
|
1106
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MasterAccountApi.get_corporate_user_permission"
|
|
1107
|
+
end
|
|
1108
|
+
# resource path
|
|
1109
|
+
local_var_path = '/corporate/user/{email}/permissions'.sub('{' + 'email' + '}', email.to_s)
|
|
1110
|
+
|
|
1111
|
+
# query parameters
|
|
1112
|
+
query_params = {}
|
|
1113
|
+
|
|
1114
|
+
# header parameters
|
|
1115
|
+
header_params = {}
|
|
1116
|
+
# HTTP header 'Accept' (if needed)
|
|
1117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1118
|
+
# HTTP header 'Content-Type'
|
|
1119
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1120
|
+
|
|
1121
|
+
# form parameters
|
|
1122
|
+
form_params = {}
|
|
1123
|
+
|
|
1124
|
+
# http body (model)
|
|
1125
|
+
post_body = nil
|
|
1126
|
+
auth_names = ['api-key', 'partner-key']
|
|
1127
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
1128
|
+
:header_params => header_params,
|
|
1129
|
+
:query_params => query_params,
|
|
1130
|
+
:form_params => form_params,
|
|
1131
|
+
:body => post_body,
|
|
1132
|
+
:auth_names => auth_names,
|
|
1133
|
+
:return_type => 'GetCorporateUserPermission')
|
|
1134
|
+
if @api_client.config.debugging
|
|
1135
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#get_corporate_user_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1136
|
+
end
|
|
1137
|
+
return data, status_code, headers
|
|
1138
|
+
end
|
|
1139
|
+
# Get the list of groups
|
|
1140
|
+
# This endpoint allows you to list all groups created on your Admin account.
|
|
1141
|
+
# @param [Hash] opts the optional parameters
|
|
1142
|
+
# @return [Array<InlineResponse2001>]
|
|
1143
|
+
def get_sub_account_groups(opts = {})
|
|
1144
|
+
data, _status_code, _headers = get_sub_account_groups_with_http_info(opts)
|
|
1145
|
+
data
|
|
1146
|
+
end
|
|
1147
|
+
|
|
1148
|
+
# Get the list of groups
|
|
1149
|
+
# This endpoint allows you to list all groups created on your Admin account.
|
|
1150
|
+
# @param [Hash] opts the optional parameters
|
|
1151
|
+
# @return [Array<(Array<InlineResponse2001>, Fixnum, Hash)>] Array<InlineResponse2001> data, response status code and response headers
|
|
1152
|
+
def get_sub_account_groups_with_http_info(opts = {})
|
|
1153
|
+
if @api_client.config.debugging
|
|
1154
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.get_sub_account_groups ...'
|
|
1155
|
+
end
|
|
1156
|
+
# resource path
|
|
1157
|
+
local_var_path = '/corporate/groups'
|
|
1158
|
+
|
|
1159
|
+
# query parameters
|
|
1160
|
+
query_params = {}
|
|
1161
|
+
|
|
1162
|
+
# header parameters
|
|
1163
|
+
header_params = {}
|
|
1164
|
+
# HTTP header 'Accept' (if needed)
|
|
1165
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1166
|
+
# HTTP header 'Content-Type'
|
|
1167
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1168
|
+
|
|
1169
|
+
# form parameters
|
|
1170
|
+
form_params = {}
|
|
1171
|
+
|
|
1172
|
+
# http body (model)
|
|
1173
|
+
post_body = nil
|
|
1174
|
+
auth_names = ['api-key', 'partner-key']
|
|
1175
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
1176
|
+
:header_params => header_params,
|
|
1177
|
+
:query_params => query_params,
|
|
1178
|
+
:form_params => form_params,
|
|
1179
|
+
:body => post_body,
|
|
1180
|
+
:auth_names => auth_names,
|
|
1181
|
+
:return_type => 'Array<InlineResponse2001>')
|
|
1182
|
+
if @api_client.config.debugging
|
|
1183
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#get_sub_account_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1184
|
+
end
|
|
1185
|
+
return data, status_code, headers
|
|
1186
|
+
end
|
|
1187
|
+
# Send invitation to an admin user
|
|
1188
|
+
# `This endpoint allows you to invite a member to manage the Admin account Features and their respective permissions are as below: - `my_plan`: - \"all\" - `api`: - \"none\" - `user_management`: - \"all\" - `app_management` | Not available in ENTv2: - \"all\" **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 admin user.
|
|
1189
|
+
# @param send_invitation Payload to send an invitation
|
|
1190
|
+
# @param [Hash] opts the optional parameters
|
|
1191
|
+
# @return [InviteAdminUser]
|
|
1192
|
+
def invite_admin_user(send_invitation, opts = {})
|
|
1193
|
+
data, _status_code, _headers = invite_admin_user_with_http_info(send_invitation, opts)
|
|
1194
|
+
data
|
|
1195
|
+
end
|
|
1196
|
+
|
|
1197
|
+
# Send invitation to an admin user
|
|
1198
|
+
# `This endpoint allows you to invite a member to manage the Admin account Features and their respective permissions are as below: - `my_plan`: - \"all\" - `api`: - \"none\" - `user_management`: - \"all\" - `app_management` | Not available in ENTv2: - \"all\" **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 admin user.
|
|
1199
|
+
# @param send_invitation Payload to send an invitation
|
|
1200
|
+
# @param [Hash] opts the optional parameters
|
|
1201
|
+
# @return [Array<(InviteAdminUser, Fixnum, Hash)>] InviteAdminUser data, response status code and response headers
|
|
1202
|
+
def invite_admin_user_with_http_info(send_invitation, opts = {})
|
|
1203
|
+
if @api_client.config.debugging
|
|
1204
|
+
@api_client.config.logger.debug 'Calling API: MasterAccountApi.invite_admin_user ...'
|
|
1205
|
+
end
|
|
1206
|
+
# verify the required parameter 'send_invitation' is set
|
|
1207
|
+
if @api_client.config.client_side_validation && send_invitation.nil?
|
|
1208
|
+
fail ArgumentError, "Missing the required parameter 'send_invitation' when calling MasterAccountApi.invite_admin_user"
|
|
1209
|
+
end
|
|
1210
|
+
# resource path
|
|
1211
|
+
local_var_path = '/corporate/user/invitation/send'
|
|
1212
|
+
|
|
1213
|
+
# query parameters
|
|
1214
|
+
query_params = {}
|
|
1215
|
+
|
|
1216
|
+
# header parameters
|
|
1217
|
+
header_params = {}
|
|
1218
|
+
# HTTP header 'Accept' (if needed)
|
|
1219
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1220
|
+
# HTTP header 'Content-Type'
|
|
1221
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1222
|
+
|
|
1223
|
+
# form parameters
|
|
1224
|
+
form_params = {}
|
|
1225
|
+
|
|
1226
|
+
# http body (model)
|
|
1227
|
+
post_body = @api_client.object_to_http_body(send_invitation)
|
|
1228
|
+
auth_names = ['api-key', 'partner-key']
|
|
1229
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
1230
|
+
:header_params => header_params,
|
|
1231
|
+
:query_params => query_params,
|
|
1232
|
+
:form_params => form_params,
|
|
1233
|
+
:body => post_body,
|
|
1234
|
+
:auth_names => auth_names,
|
|
1235
|
+
:return_type => 'InviteAdminUser')
|
|
1236
|
+
if @api_client.config.debugging
|
|
1237
|
+
@api_client.config.logger.debug "API called: MasterAccountApi#invite_admin_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1238
|
+
end
|
|
1239
|
+
return data, status_code, headers
|
|
1240
|
+
end
|
|
593
1241
|
end
|
|
594
1242
|
end
|