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
data/lib/brevo/api/tasks_api.rb
CHANGED
|
@@ -34,7 +34,7 @@ module Brevo
|
|
|
34
34
|
# @option opts [String] :filter_type Filter by task type (ID)
|
|
35
35
|
# @option opts [String] :filter_status Filter by task status
|
|
36
36
|
# @option opts [String] :filter_date Filter by date
|
|
37
|
-
# @option opts [String] :filter_assign_to Filter by assignTo
|
|
37
|
+
# @option opts [String] :filter_assign_to Filter by the \"assignTo\" ID. You can utilize account emails for the \"assignTo\" attribute.
|
|
38
38
|
# @option opts [String] :filter_contacts Filter by contact ids
|
|
39
39
|
# @option opts [String] :filter_deals Filter by deals ids
|
|
40
40
|
# @option opts [String] :filter_companies Filter by companies ids
|
|
@@ -55,7 +55,7 @@ module Brevo
|
|
|
55
55
|
# @option opts [String] :filter_type Filter by task type (ID)
|
|
56
56
|
# @option opts [String] :filter_status Filter by task status
|
|
57
57
|
# @option opts [String] :filter_date Filter by date
|
|
58
|
-
# @option opts [String] :filter_assign_to Filter by assignTo
|
|
58
|
+
# @option opts [String] :filter_assign_to Filter by the \"assignTo\" ID. You can utilize account emails for the \"assignTo\" attribute.
|
|
59
59
|
# @option opts [String] :filter_contacts Filter by contact ids
|
|
60
60
|
# @option opts [String] :filter_deals Filter by deals ids
|
|
61
61
|
# @option opts [String] :filter_companies Filter by companies ids
|
|
@@ -286,7 +286,7 @@ module Brevo
|
|
|
286
286
|
# Create a task
|
|
287
287
|
# @param body Task name.
|
|
288
288
|
# @param [Hash] opts the optional parameters
|
|
289
|
-
# @return [
|
|
289
|
+
# @return [InlineResponse2012]
|
|
290
290
|
def crm_tasks_post(body, opts = {})
|
|
291
291
|
data, _status_code, _headers = crm_tasks_post_with_http_info(body, opts)
|
|
292
292
|
data
|
|
@@ -295,7 +295,7 @@ module Brevo
|
|
|
295
295
|
# Create a task
|
|
296
296
|
# @param body Task name.
|
|
297
297
|
# @param [Hash] opts the optional parameters
|
|
298
|
-
# @return [Array<(
|
|
298
|
+
# @return [Array<(InlineResponse2012, Fixnum, Hash)>] InlineResponse2012 data, response status code and response headers
|
|
299
299
|
def crm_tasks_post_with_http_info(body, opts = {})
|
|
300
300
|
if @api_client.config.debugging
|
|
301
301
|
@api_client.config.logger.debug 'Calling API: TasksApi.crm_tasks_post ...'
|
|
@@ -329,7 +329,7 @@ module Brevo
|
|
|
329
329
|
:form_params => form_params,
|
|
330
330
|
:body => post_body,
|
|
331
331
|
:auth_names => auth_names,
|
|
332
|
-
:return_type => '
|
|
332
|
+
:return_type => 'InlineResponse2012')
|
|
333
333
|
if @api_client.config.debugging
|
|
334
334
|
@api_client.config.logger.debug "API called: TasksApi#crm_tasks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
335
335
|
end
|
|
@@ -1259,28 +1259,28 @@ module Brevo
|
|
|
1259
1259
|
return data, status_code, headers
|
|
1260
1260
|
end
|
|
1261
1261
|
# Delete an SMTP transactional log
|
|
1262
|
-
# @param
|
|
1262
|
+
# @param identifier MessageId or Email of the transactional log(s) to delete
|
|
1263
1263
|
# @param [Hash] opts the optional parameters
|
|
1264
1264
|
# @return [nil]
|
|
1265
|
-
def
|
|
1266
|
-
|
|
1265
|
+
def smtp_log_identifier_delete(identifier, opts = {})
|
|
1266
|
+
smtp_log_identifier_delete_with_http_info(identifier, opts)
|
|
1267
1267
|
nil
|
|
1268
1268
|
end
|
|
1269
1269
|
|
|
1270
1270
|
# Delete an SMTP transactional log
|
|
1271
|
-
# @param
|
|
1271
|
+
# @param identifier MessageId or Email of the transactional log(s) to delete
|
|
1272
1272
|
# @param [Hash] opts the optional parameters
|
|
1273
1273
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
1274
|
-
def
|
|
1274
|
+
def smtp_log_identifier_delete_with_http_info(identifier, opts = {})
|
|
1275
1275
|
if @api_client.config.debugging
|
|
1276
|
-
@api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.
|
|
1276
|
+
@api_client.config.logger.debug 'Calling API: TransactionalEmailsApi.smtp_log_identifier_delete ...'
|
|
1277
1277
|
end
|
|
1278
|
-
# verify the required parameter '
|
|
1279
|
-
if @api_client.config.client_side_validation &&
|
|
1280
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1278
|
+
# verify the required parameter 'identifier' is set
|
|
1279
|
+
if @api_client.config.client_side_validation && identifier.nil?
|
|
1280
|
+
fail ArgumentError, "Missing the required parameter 'identifier' when calling TransactionalEmailsApi.smtp_log_identifier_delete"
|
|
1281
1281
|
end
|
|
1282
1282
|
# resource path
|
|
1283
|
-
local_var_path = '/smtp/log/{
|
|
1283
|
+
local_var_path = '/smtp/log/{identifier}'.sub('{' + 'identifier' + '}', identifier.to_s)
|
|
1284
1284
|
|
|
1285
1285
|
# query parameters
|
|
1286
1286
|
query_params = {}
|
|
@@ -1305,7 +1305,7 @@ module Brevo
|
|
|
1305
1305
|
:body => post_body,
|
|
1306
1306
|
:auth_names => auth_names)
|
|
1307
1307
|
if @api_client.config.debugging
|
|
1308
|
-
@api_client.config.logger.debug "API called: TransactionalEmailsApi#
|
|
1308
|
+
@api_client.config.logger.debug "API called: TransactionalEmailsApi#smtp_log_identifier_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1309
1309
|
end
|
|
1310
1310
|
return data, status_code, headers
|
|
1311
1311
|
end
|
|
@@ -119,7 +119,7 @@ module Brevo
|
|
|
119
119
|
# This endpoint is used to send a WhatsApp message. <br/>(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**)
|
|
120
120
|
# @param send_whatsapp_message Values to send WhatsApp message
|
|
121
121
|
# @param [Hash] opts the optional parameters
|
|
122
|
-
# @return [
|
|
122
|
+
# @return [InlineResponse2014]
|
|
123
123
|
def send_whatsapp_message(send_whatsapp_message, opts = {})
|
|
124
124
|
data, _status_code, _headers = send_whatsapp_message_with_http_info(send_whatsapp_message, opts)
|
|
125
125
|
data
|
|
@@ -129,7 +129,7 @@ module Brevo
|
|
|
129
129
|
# This endpoint is used to send a WhatsApp message. <br/>(**The first message you send using the API must contain a Template ID. You must create a template on WhatsApp on the Brevo platform to fetch the Template ID.**)
|
|
130
130
|
# @param send_whatsapp_message Values to send WhatsApp message
|
|
131
131
|
# @param [Hash] opts the optional parameters
|
|
132
|
-
# @return [Array<(
|
|
132
|
+
# @return [Array<(InlineResponse2014, Fixnum, Hash)>] InlineResponse2014 data, response status code and response headers
|
|
133
133
|
def send_whatsapp_message_with_http_info(send_whatsapp_message, opts = {})
|
|
134
134
|
if @api_client.config.debugging
|
|
135
135
|
@api_client.config.logger.debug 'Calling API: TransactionalWhatsAppApi.send_whatsapp_message ...'
|
|
@@ -163,7 +163,7 @@ module Brevo
|
|
|
163
163
|
:form_params => form_params,
|
|
164
164
|
:body => post_body,
|
|
165
165
|
:auth_names => auth_names,
|
|
166
|
-
:return_type => '
|
|
166
|
+
:return_type => 'InlineResponse2014')
|
|
167
167
|
if @api_client.config.debugging
|
|
168
168
|
@api_client.config.logger.debug "API called: TransactionalWhatsAppApi#send_whatsapp_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
169
169
|
end
|
data/lib/brevo/api/user_api.rb
CHANGED
|
@@ -29,6 +29,60 @@ module Brevo
|
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
# Update permission for a user
|
|
33
|
+
# `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.
|
|
34
|
+
# @param update_permissions Values to update permissions for an invited user
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Inviteuser]
|
|
37
|
+
def edit_user_permission(update_permissions, opts = {})
|
|
38
|
+
data, _status_code, _headers = edit_user_permission_with_http_info(update_permissions, opts)
|
|
39
|
+
data
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Update permission for a user
|
|
43
|
+
# `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.
|
|
44
|
+
# @param update_permissions Values to update permissions for an invited user
|
|
45
|
+
# @param [Hash] opts the optional parameters
|
|
46
|
+
# @return [Array<(Inviteuser, Fixnum, Hash)>] Inviteuser data, response status code and response headers
|
|
47
|
+
def edit_user_permission_with_http_info(update_permissions, opts = {})
|
|
48
|
+
if @api_client.config.debugging
|
|
49
|
+
@api_client.config.logger.debug 'Calling API: UserApi.edit_user_permission ...'
|
|
50
|
+
end
|
|
51
|
+
# verify the required parameter 'update_permissions' is set
|
|
52
|
+
if @api_client.config.client_side_validation && update_permissions.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'update_permissions' when calling UserApi.edit_user_permission"
|
|
54
|
+
end
|
|
55
|
+
# resource path
|
|
56
|
+
local_var_path = '/organization/user/update/permissions'
|
|
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 = @api_client.object_to_http_body(update_permissions)
|
|
73
|
+
auth_names = ['api-key', 'partner-key']
|
|
74
|
+
data, status_code, headers = @api_client.call_api(:POST, 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
|
+
:return_type => 'Inviteuser')
|
|
81
|
+
if @api_client.config.debugging
|
|
82
|
+
@api_client.config.logger.debug "API called: UserApi#edit_user_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
83
|
+
end
|
|
84
|
+
return data, status_code, headers
|
|
85
|
+
end
|
|
32
86
|
# Get the list of all your users
|
|
33
87
|
# @param [Hash] opts the optional parameters
|
|
34
88
|
# @return [GetInvitedUsersList]
|
|
@@ -127,5 +181,173 @@ module Brevo
|
|
|
127
181
|
end
|
|
128
182
|
return data, status_code, headers
|
|
129
183
|
end
|
|
184
|
+
# Send invitation to user
|
|
185
|
+
# `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.
|
|
186
|
+
# @param send_invitation Values to create an invitation
|
|
187
|
+
# @param [Hash] opts the optional parameters
|
|
188
|
+
# @return [Inviteuser]
|
|
189
|
+
def inviteuser(send_invitation, opts = {})
|
|
190
|
+
data, _status_code, _headers = inviteuser_with_http_info(send_invitation, opts)
|
|
191
|
+
data
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Send invitation to user
|
|
195
|
+
# `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.
|
|
196
|
+
# @param send_invitation Values to create an invitation
|
|
197
|
+
# @param [Hash] opts the optional parameters
|
|
198
|
+
# @return [Array<(Inviteuser, Fixnum, Hash)>] Inviteuser data, response status code and response headers
|
|
199
|
+
def inviteuser_with_http_info(send_invitation, opts = {})
|
|
200
|
+
if @api_client.config.debugging
|
|
201
|
+
@api_client.config.logger.debug 'Calling API: UserApi.inviteuser ...'
|
|
202
|
+
end
|
|
203
|
+
# verify the required parameter 'send_invitation' is set
|
|
204
|
+
if @api_client.config.client_side_validation && send_invitation.nil?
|
|
205
|
+
fail ArgumentError, "Missing the required parameter 'send_invitation' when calling UserApi.inviteuser"
|
|
206
|
+
end
|
|
207
|
+
# resource path
|
|
208
|
+
local_var_path = '/organization/user/invitation/send'
|
|
209
|
+
|
|
210
|
+
# query parameters
|
|
211
|
+
query_params = {}
|
|
212
|
+
|
|
213
|
+
# header parameters
|
|
214
|
+
header_params = {}
|
|
215
|
+
# HTTP header 'Accept' (if needed)
|
|
216
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
217
|
+
# HTTP header 'Content-Type'
|
|
218
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
219
|
+
|
|
220
|
+
# form parameters
|
|
221
|
+
form_params = {}
|
|
222
|
+
|
|
223
|
+
# http body (model)
|
|
224
|
+
post_body = @api_client.object_to_http_body(send_invitation)
|
|
225
|
+
auth_names = ['api-key', 'partner-key']
|
|
226
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
227
|
+
:header_params => header_params,
|
|
228
|
+
:query_params => query_params,
|
|
229
|
+
:form_params => form_params,
|
|
230
|
+
:body => post_body,
|
|
231
|
+
:auth_names => auth_names,
|
|
232
|
+
:return_type => 'Inviteuser')
|
|
233
|
+
if @api_client.config.debugging
|
|
234
|
+
@api_client.config.logger.debug "API called: UserApi#inviteuser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
235
|
+
end
|
|
236
|
+
return data, status_code, headers
|
|
237
|
+
end
|
|
238
|
+
# Revoke user permission
|
|
239
|
+
# @param email Email of the invited user.
|
|
240
|
+
# @param [Hash] opts the optional parameters
|
|
241
|
+
# @return [PutRevokeUserPermission]
|
|
242
|
+
def put_revoke_user_permission(email, opts = {})
|
|
243
|
+
data, _status_code, _headers = put_revoke_user_permission_with_http_info(email, opts)
|
|
244
|
+
data
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Revoke user permission
|
|
248
|
+
# @param email Email of the invited user.
|
|
249
|
+
# @param [Hash] opts the optional parameters
|
|
250
|
+
# @return [Array<(PutRevokeUserPermission, Fixnum, Hash)>] PutRevokeUserPermission data, response status code and response headers
|
|
251
|
+
def put_revoke_user_permission_with_http_info(email, opts = {})
|
|
252
|
+
if @api_client.config.debugging
|
|
253
|
+
@api_client.config.logger.debug 'Calling API: UserApi.put_revoke_user_permission ...'
|
|
254
|
+
end
|
|
255
|
+
# verify the required parameter 'email' is set
|
|
256
|
+
if @api_client.config.client_side_validation && email.nil?
|
|
257
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling UserApi.put_revoke_user_permission"
|
|
258
|
+
end
|
|
259
|
+
# resource path
|
|
260
|
+
local_var_path = '/organization/user/invitation/revoke/{email}'.sub('{' + 'email' + '}', email.to_s)
|
|
261
|
+
|
|
262
|
+
# query parameters
|
|
263
|
+
query_params = {}
|
|
264
|
+
|
|
265
|
+
# header parameters
|
|
266
|
+
header_params = {}
|
|
267
|
+
# HTTP header 'Accept' (if needed)
|
|
268
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
269
|
+
# HTTP header 'Content-Type'
|
|
270
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
271
|
+
|
|
272
|
+
# form parameters
|
|
273
|
+
form_params = {}
|
|
274
|
+
|
|
275
|
+
# http body (model)
|
|
276
|
+
post_body = nil
|
|
277
|
+
auth_names = ['api-key', 'partner-key']
|
|
278
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
279
|
+
:header_params => header_params,
|
|
280
|
+
:query_params => query_params,
|
|
281
|
+
:form_params => form_params,
|
|
282
|
+
:body => post_body,
|
|
283
|
+
:auth_names => auth_names,
|
|
284
|
+
:return_type => 'PutRevokeUserPermission')
|
|
285
|
+
if @api_client.config.debugging
|
|
286
|
+
@api_client.config.logger.debug "API called: UserApi#put_revoke_user_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
287
|
+
end
|
|
288
|
+
return data, status_code, headers
|
|
289
|
+
end
|
|
290
|
+
# Resend / Cancel invitation
|
|
291
|
+
# @param action action
|
|
292
|
+
# @param email Email of the invited user.
|
|
293
|
+
# @param [Hash] opts the optional parameters
|
|
294
|
+
# @return [Putresendcancelinvitation]
|
|
295
|
+
def putresendcancelinvitation(action, email, opts = {})
|
|
296
|
+
data, _status_code, _headers = putresendcancelinvitation_with_http_info(action, email, opts)
|
|
297
|
+
data
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Resend / Cancel invitation
|
|
301
|
+
# @param action action
|
|
302
|
+
# @param email Email of the invited user.
|
|
303
|
+
# @param [Hash] opts the optional parameters
|
|
304
|
+
# @return [Array<(Putresendcancelinvitation, Fixnum, Hash)>] Putresendcancelinvitation data, response status code and response headers
|
|
305
|
+
def putresendcancelinvitation_with_http_info(action, email, opts = {})
|
|
306
|
+
if @api_client.config.debugging
|
|
307
|
+
@api_client.config.logger.debug 'Calling API: UserApi.putresendcancelinvitation ...'
|
|
308
|
+
end
|
|
309
|
+
# verify the required parameter 'action' is set
|
|
310
|
+
if @api_client.config.client_side_validation && action.nil?
|
|
311
|
+
fail ArgumentError, "Missing the required parameter 'action' when calling UserApi.putresendcancelinvitation"
|
|
312
|
+
end
|
|
313
|
+
# verify enum value
|
|
314
|
+
if @api_client.config.client_side_validation && !['resend', 'cancel'].include?(action)
|
|
315
|
+
fail ArgumentError, "invalid value for 'action', must be one of resend, cancel"
|
|
316
|
+
end
|
|
317
|
+
# verify the required parameter 'email' is set
|
|
318
|
+
if @api_client.config.client_side_validation && email.nil?
|
|
319
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling UserApi.putresendcancelinvitation"
|
|
320
|
+
end
|
|
321
|
+
# resource path
|
|
322
|
+
local_var_path = '/organization/user/invitation/{action}/{email}'.sub('{' + 'action' + '}', action.to_s).sub('{' + 'email' + '}', email.to_s)
|
|
323
|
+
|
|
324
|
+
# query parameters
|
|
325
|
+
query_params = {}
|
|
326
|
+
|
|
327
|
+
# header parameters
|
|
328
|
+
header_params = {}
|
|
329
|
+
# HTTP header 'Accept' (if needed)
|
|
330
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
331
|
+
# HTTP header 'Content-Type'
|
|
332
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
333
|
+
|
|
334
|
+
# form parameters
|
|
335
|
+
form_params = {}
|
|
336
|
+
|
|
337
|
+
# http body (model)
|
|
338
|
+
post_body = nil
|
|
339
|
+
auth_names = ['api-key', 'partner-key']
|
|
340
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
341
|
+
:header_params => header_params,
|
|
342
|
+
:query_params => query_params,
|
|
343
|
+
:form_params => form_params,
|
|
344
|
+
:body => post_body,
|
|
345
|
+
:auth_names => auth_names,
|
|
346
|
+
:return_type => 'Putresendcancelinvitation')
|
|
347
|
+
if @api_client.config.debugging
|
|
348
|
+
@api_client.config.logger.debug "API called: UserApi#putresendcancelinvitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
349
|
+
end
|
|
350
|
+
return data, status_code, headers
|
|
351
|
+
end
|
|
130
352
|
end
|
|
131
353
|
end
|
|
@@ -132,8 +132,8 @@ module Brevo
|
|
|
132
132
|
end
|
|
133
133
|
return data, status_code, headers
|
|
134
134
|
end
|
|
135
|
-
# Export all
|
|
136
|
-
# This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download
|
|
135
|
+
# Export all webhook events
|
|
136
|
+
# This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download the CSV file will be sent to the webhook that was provided in the notifyURL.
|
|
137
137
|
# @param export_webhook_history Values to submit for webhooks history
|
|
138
138
|
# @param [Hash] opts the optional parameters
|
|
139
139
|
# @return [CreatedProcessId]
|
|
@@ -142,8 +142,8 @@ module Brevo
|
|
|
142
142
|
data
|
|
143
143
|
end
|
|
144
144
|
|
|
145
|
-
# Export all
|
|
146
|
-
# This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download
|
|
145
|
+
# Export all webhook events
|
|
146
|
+
# This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download the CSV file will be sent to the webhook that was provided in the notifyURL.
|
|
147
147
|
# @param export_webhook_history Values to submit for webhooks history
|
|
148
148
|
# @param [Hash] opts the optional parameters
|
|
149
149
|
# @return [Array<(CreatedProcessId, Fixnum, Hash)>] CreatedProcessId data, response status code and response headers
|
|
@@ -361,6 +361,7 @@ module Brevo
|
|
|
361
361
|
# @option opts [Integer] :limit Number of documents per page (default to 50)
|
|
362
362
|
# @option opts [Integer] :offset Index of the first document in the page (default to 0)
|
|
363
363
|
# @option opts [String] :sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed (default to desc)
|
|
364
|
+
# @option opts [String] :source source of the template
|
|
364
365
|
# @return [GetWATemplates]
|
|
365
366
|
def get_whats_app_templates(opts = {})
|
|
366
367
|
data, _status_code, _headers = get_whats_app_templates_with_http_info(opts)
|
|
@@ -374,6 +375,7 @@ module Brevo
|
|
|
374
375
|
# @option opts [Integer] :limit Number of documents per page
|
|
375
376
|
# @option opts [Integer] :offset Index of the first document in the page
|
|
376
377
|
# @option opts [String] :sort Sort the results in the ascending/descending order of record modification. Default order is **descending** if `sort` is not passed
|
|
378
|
+
# @option opts [String] :source source of the template
|
|
377
379
|
# @return [Array<(GetWATemplates, Fixnum, Hash)>] GetWATemplates data, response status code and response headers
|
|
378
380
|
def get_whats_app_templates_with_http_info(opts = {})
|
|
379
381
|
if @api_client.config.debugging
|
|
@@ -390,6 +392,9 @@ module Brevo
|
|
|
390
392
|
if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort'])
|
|
391
393
|
fail ArgumentError, 'invalid value for "sort", must be one of asc, desc'
|
|
392
394
|
end
|
|
395
|
+
if @api_client.config.client_side_validation && opts[:'source'] && !['Automation', 'Conversations'].include?(opts[:'source'])
|
|
396
|
+
fail ArgumentError, 'invalid value for "source", must be one of Automation, Conversations'
|
|
397
|
+
end
|
|
393
398
|
# resource path
|
|
394
399
|
local_var_path = '/whatsappCampaigns/template-list'
|
|
395
400
|
|
|
@@ -400,6 +405,7 @@ module Brevo
|
|
|
400
405
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
401
406
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
402
407
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
408
|
+
query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil?
|
|
403
409
|
|
|
404
410
|
# header parameters
|
|
405
411
|
header_params = {}
|
data/lib/brevo/models/body.rb
CHANGED
|
@@ -14,30 +14,25 @@ require 'date'
|
|
|
14
14
|
|
|
15
15
|
module Brevo
|
|
16
16
|
class Body
|
|
17
|
-
#
|
|
18
|
-
attr_accessor :
|
|
17
|
+
# The name of the group of sub-accounts
|
|
18
|
+
attr_accessor :group_name
|
|
19
19
|
|
|
20
|
-
#
|
|
21
|
-
attr_accessor :
|
|
22
|
-
|
|
23
|
-
# Country code if phone_number is passed in attributes.
|
|
24
|
-
attr_accessor :country_code
|
|
20
|
+
# Pass the list of sub-account Ids to be included in the group
|
|
21
|
+
attr_accessor :sub_account_ids
|
|
25
22
|
|
|
26
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
24
|
def self.attribute_map
|
|
28
25
|
{
|
|
29
|
-
:'
|
|
30
|
-
:'
|
|
31
|
-
:'country_code' => :'countryCode'
|
|
26
|
+
:'group_name' => :'groupName',
|
|
27
|
+
:'sub_account_ids' => :'subAccountIds'
|
|
32
28
|
}
|
|
33
29
|
end
|
|
34
30
|
|
|
35
31
|
# Attribute type mapping.
|
|
36
32
|
def self.swagger_types
|
|
37
33
|
{
|
|
38
|
-
:'
|
|
39
|
-
:'
|
|
40
|
-
:'country_code' => :'Integer'
|
|
34
|
+
:'group_name' => :'String',
|
|
35
|
+
:'sub_account_ids' => :'Array<Integer>'
|
|
41
36
|
}
|
|
42
37
|
end
|
|
43
38
|
|
|
@@ -49,16 +44,14 @@ module Brevo
|
|
|
49
44
|
# convert string to symbol for hash key
|
|
50
45
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
51
46
|
|
|
52
|
-
if attributes.has_key?(:'
|
|
53
|
-
self.
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
if attributes.has_key?(:'attributes')
|
|
57
|
-
self.attributes = attributes[:'attributes']
|
|
47
|
+
if attributes.has_key?(:'groupName')
|
|
48
|
+
self.group_name = attributes[:'groupName']
|
|
58
49
|
end
|
|
59
50
|
|
|
60
|
-
if attributes.has_key?(:'
|
|
61
|
-
|
|
51
|
+
if attributes.has_key?(:'subAccountIds')
|
|
52
|
+
if (value = attributes[:'subAccountIds']).is_a?(Array)
|
|
53
|
+
self.sub_account_ids = value
|
|
54
|
+
end
|
|
62
55
|
end
|
|
63
56
|
end
|
|
64
57
|
|
|
@@ -66,8 +59,8 @@ module Brevo
|
|
|
66
59
|
# @return Array for valid properties with the reasons
|
|
67
60
|
def list_invalid_properties
|
|
68
61
|
invalid_properties = Array.new
|
|
69
|
-
if @
|
|
70
|
-
invalid_properties.push('invalid value for "
|
|
62
|
+
if @group_name.nil?
|
|
63
|
+
invalid_properties.push('invalid value for "group_name", group_name cannot be nil.')
|
|
71
64
|
end
|
|
72
65
|
|
|
73
66
|
invalid_properties
|
|
@@ -76,7 +69,7 @@ module Brevo
|
|
|
76
69
|
# Check to see if the all the properties in the model are valid
|
|
77
70
|
# @return true if the model is valid
|
|
78
71
|
def valid?
|
|
79
|
-
return false if @
|
|
72
|
+
return false if @group_name.nil?
|
|
80
73
|
true
|
|
81
74
|
end
|
|
82
75
|
|
|
@@ -85,9 +78,8 @@ module Brevo
|
|
|
85
78
|
def ==(o)
|
|
86
79
|
return true if self.equal?(o)
|
|
87
80
|
self.class == o.class &&
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
country_code == o.country_code
|
|
81
|
+
group_name == o.group_name &&
|
|
82
|
+
sub_account_ids == o.sub_account_ids
|
|
91
83
|
end
|
|
92
84
|
|
|
93
85
|
# @see the `==` method
|
|
@@ -99,7 +91,7 @@ module Brevo
|
|
|
99
91
|
# Calculates hash code according to all attributes.
|
|
100
92
|
# @return [Fixnum] Hash code
|
|
101
93
|
def hash
|
|
102
|
-
[
|
|
94
|
+
[group_name, sub_account_ids].hash
|
|
103
95
|
end
|
|
104
96
|
|
|
105
97
|
# Builds the object from hash
|
data/lib/brevo/models/body_1.rb
CHANGED
|
@@ -14,30 +14,25 @@ require 'date'
|
|
|
14
14
|
|
|
15
15
|
module Brevo
|
|
16
16
|
class Body1
|
|
17
|
-
#
|
|
18
|
-
attr_accessor :
|
|
17
|
+
# The name of the group of sub-accounts
|
|
18
|
+
attr_accessor :group_name
|
|
19
19
|
|
|
20
|
-
#
|
|
21
|
-
attr_accessor :
|
|
22
|
-
|
|
23
|
-
# Country code if phone_number is passed in attributes.
|
|
24
|
-
attr_accessor :country_code
|
|
20
|
+
# Pass the list of sub-account Ids to be included in the group
|
|
21
|
+
attr_accessor :sub_account_ids
|
|
25
22
|
|
|
26
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
24
|
def self.attribute_map
|
|
28
25
|
{
|
|
29
|
-
:'
|
|
30
|
-
:'
|
|
31
|
-
:'country_code' => :'countryCode'
|
|
26
|
+
:'group_name' => :'groupName',
|
|
27
|
+
:'sub_account_ids' => :'subAccountIds'
|
|
32
28
|
}
|
|
33
29
|
end
|
|
34
30
|
|
|
35
31
|
# Attribute type mapping.
|
|
36
32
|
def self.swagger_types
|
|
37
33
|
{
|
|
38
|
-
:'
|
|
39
|
-
:'
|
|
40
|
-
:'country_code' => :'Integer'
|
|
34
|
+
:'group_name' => :'String',
|
|
35
|
+
:'sub_account_ids' => :'Array<Integer>'
|
|
41
36
|
}
|
|
42
37
|
end
|
|
43
38
|
|
|
@@ -49,16 +44,14 @@ module Brevo
|
|
|
49
44
|
# convert string to symbol for hash key
|
|
50
45
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
51
46
|
|
|
52
|
-
if attributes.has_key?(:'
|
|
53
|
-
self.
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
if attributes.has_key?(:'attributes')
|
|
57
|
-
self.attributes = attributes[:'attributes']
|
|
47
|
+
if attributes.has_key?(:'groupName')
|
|
48
|
+
self.group_name = attributes[:'groupName']
|
|
58
49
|
end
|
|
59
50
|
|
|
60
|
-
if attributes.has_key?(:'
|
|
61
|
-
|
|
51
|
+
if attributes.has_key?(:'subAccountIds')
|
|
52
|
+
if (value = attributes[:'subAccountIds']).is_a?(Array)
|
|
53
|
+
self.sub_account_ids = value
|
|
54
|
+
end
|
|
62
55
|
end
|
|
63
56
|
end
|
|
64
57
|
|
|
@@ -66,12 +59,17 @@ module Brevo
|
|
|
66
59
|
# @return Array for valid properties with the reasons
|
|
67
60
|
def list_invalid_properties
|
|
68
61
|
invalid_properties = Array.new
|
|
62
|
+
if @group_name.nil?
|
|
63
|
+
invalid_properties.push('invalid value for "group_name", group_name cannot be nil.')
|
|
64
|
+
end
|
|
65
|
+
|
|
69
66
|
invalid_properties
|
|
70
67
|
end
|
|
71
68
|
|
|
72
69
|
# Check to see if the all the properties in the model are valid
|
|
73
70
|
# @return true if the model is valid
|
|
74
71
|
def valid?
|
|
72
|
+
return false if @group_name.nil?
|
|
75
73
|
true
|
|
76
74
|
end
|
|
77
75
|
|
|
@@ -80,9 +78,8 @@ module Brevo
|
|
|
80
78
|
def ==(o)
|
|
81
79
|
return true if self.equal?(o)
|
|
82
80
|
self.class == o.class &&
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
country_code == o.country_code
|
|
81
|
+
group_name == o.group_name &&
|
|
82
|
+
sub_account_ids == o.sub_account_ids
|
|
86
83
|
end
|
|
87
84
|
|
|
88
85
|
# @see the `==` method
|
|
@@ -94,7 +91,7 @@ module Brevo
|
|
|
94
91
|
# Calculates hash code according to all attributes.
|
|
95
92
|
# @return [Fixnum] Hash code
|
|
96
93
|
def hash
|
|
97
|
-
[
|
|
94
|
+
[group_name, sub_account_ids].hash
|
|
98
95
|
end
|
|
99
96
|
|
|
100
97
|
# Builds the object from hash
|