brevo 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/models/body_10.rb
CHANGED
@@ -14,35 +14,65 @@ require 'date'
|
|
14
14
|
|
15
15
|
module Brevo
|
16
16
|
class Body10
|
17
|
-
#
|
18
|
-
attr_accessor :
|
17
|
+
# Name of task
|
18
|
+
attr_accessor :name
|
19
19
|
|
20
|
-
#
|
21
|
-
attr_accessor :
|
20
|
+
# Duration of task in milliseconds [1 minute = 60000 ms]
|
21
|
+
attr_accessor :duration
|
22
22
|
|
23
|
-
#
|
24
|
-
attr_accessor :
|
23
|
+
# Id for type of task e.g Call / Email / Meeting etc.
|
24
|
+
attr_accessor :task_type_id
|
25
25
|
|
26
|
-
#
|
27
|
-
attr_accessor :
|
26
|
+
# Task date/time
|
27
|
+
attr_accessor :date
|
28
|
+
|
29
|
+
# Notes added to a task
|
30
|
+
attr_accessor :notes
|
31
|
+
|
32
|
+
# Task marked as done
|
33
|
+
attr_accessor :done
|
34
|
+
|
35
|
+
# To assign a task to a user you can use either the account email or ID.
|
36
|
+
attr_accessor :assign_to_id
|
37
|
+
|
38
|
+
# Contact ids for contacts linked to this task
|
39
|
+
attr_accessor :contacts_ids
|
40
|
+
|
41
|
+
# Deal ids for deals a task is linked to
|
42
|
+
attr_accessor :deals_ids
|
43
|
+
|
44
|
+
# Companies ids for companies a task is linked to
|
45
|
+
attr_accessor :companies_ids
|
28
46
|
|
29
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
48
|
def self.attribute_map
|
31
49
|
{
|
32
|
-
:'
|
33
|
-
:'
|
34
|
-
:'
|
35
|
-
:'
|
50
|
+
:'name' => :'name',
|
51
|
+
:'duration' => :'duration',
|
52
|
+
:'task_type_id' => :'taskTypeId',
|
53
|
+
:'date' => :'date',
|
54
|
+
:'notes' => :'notes',
|
55
|
+
:'done' => :'done',
|
56
|
+
:'assign_to_id' => :'assignToId',
|
57
|
+
:'contacts_ids' => :'contactsIds',
|
58
|
+
:'deals_ids' => :'dealsIds',
|
59
|
+
:'companies_ids' => :'companiesIds'
|
36
60
|
}
|
37
61
|
end
|
38
62
|
|
39
63
|
# Attribute type mapping.
|
40
64
|
def self.swagger_types
|
41
65
|
{
|
42
|
-
:'
|
43
|
-
:'
|
44
|
-
:'
|
45
|
-
:'
|
66
|
+
:'name' => :'String',
|
67
|
+
:'duration' => :'Integer',
|
68
|
+
:'task_type_id' => :'String',
|
69
|
+
:'date' => :'DateTime',
|
70
|
+
:'notes' => :'String',
|
71
|
+
:'done' => :'BOOLEAN',
|
72
|
+
:'assign_to_id' => :'String',
|
73
|
+
:'contacts_ids' => :'Array<Integer>',
|
74
|
+
:'deals_ids' => :'Array<String>',
|
75
|
+
:'companies_ids' => :'Array<String>'
|
46
76
|
}
|
47
77
|
end
|
48
78
|
|
@@ -54,20 +84,50 @@ module Brevo
|
|
54
84
|
# convert string to symbol for hash key
|
55
85
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
86
|
|
57
|
-
if attributes.has_key?(:'
|
58
|
-
self.
|
87
|
+
if attributes.has_key?(:'name')
|
88
|
+
self.name = attributes[:'name']
|
59
89
|
end
|
60
90
|
|
61
|
-
if attributes.has_key?(:'
|
62
|
-
self.
|
91
|
+
if attributes.has_key?(:'duration')
|
92
|
+
self.duration = attributes[:'duration']
|
63
93
|
end
|
64
94
|
|
65
|
-
if attributes.has_key?(:'
|
66
|
-
self.
|
95
|
+
if attributes.has_key?(:'taskTypeId')
|
96
|
+
self.task_type_id = attributes[:'taskTypeId']
|
67
97
|
end
|
68
98
|
|
69
|
-
if attributes.has_key?(:'
|
70
|
-
self.
|
99
|
+
if attributes.has_key?(:'date')
|
100
|
+
self.date = attributes[:'date']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.has_key?(:'notes')
|
104
|
+
self.notes = attributes[:'notes']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.has_key?(:'done')
|
108
|
+
self.done = attributes[:'done']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.has_key?(:'assignToId')
|
112
|
+
self.assign_to_id = attributes[:'assignToId']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.has_key?(:'contactsIds')
|
116
|
+
if (value = attributes[:'contactsIds']).is_a?(Array)
|
117
|
+
self.contacts_ids = value
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.has_key?(:'dealsIds')
|
122
|
+
if (value = attributes[:'dealsIds']).is_a?(Array)
|
123
|
+
self.deals_ids = value
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.has_key?(:'companiesIds')
|
128
|
+
if (value = attributes[:'companiesIds']).is_a?(Array)
|
129
|
+
self.companies_ids = value
|
130
|
+
end
|
71
131
|
end
|
72
132
|
end
|
73
133
|
|
@@ -75,22 +135,12 @@ module Brevo
|
|
75
135
|
# @return Array for valid properties with the reasons
|
76
136
|
def list_invalid_properties
|
77
137
|
invalid_properties = Array.new
|
78
|
-
if @visitor_id.nil?
|
79
|
-
invalid_properties.push('invalid value for "visitor_id", visitor_id cannot be nil.')
|
80
|
-
end
|
81
|
-
|
82
|
-
if @text.nil?
|
83
|
-
invalid_properties.push('invalid value for "text", text cannot be nil.')
|
84
|
-
end
|
85
|
-
|
86
138
|
invalid_properties
|
87
139
|
end
|
88
140
|
|
89
141
|
# Check to see if the all the properties in the model are valid
|
90
142
|
# @return true if the model is valid
|
91
143
|
def valid?
|
92
|
-
return false if @visitor_id.nil?
|
93
|
-
return false if @text.nil?
|
94
144
|
true
|
95
145
|
end
|
96
146
|
|
@@ -99,10 +149,16 @@ module Brevo
|
|
99
149
|
def ==(o)
|
100
150
|
return true if self.equal?(o)
|
101
151
|
self.class == o.class &&
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
152
|
+
name == o.name &&
|
153
|
+
duration == o.duration &&
|
154
|
+
task_type_id == o.task_type_id &&
|
155
|
+
date == o.date &&
|
156
|
+
notes == o.notes &&
|
157
|
+
done == o.done &&
|
158
|
+
assign_to_id == o.assign_to_id &&
|
159
|
+
contacts_ids == o.contacts_ids &&
|
160
|
+
deals_ids == o.deals_ids &&
|
161
|
+
companies_ids == o.companies_ids
|
106
162
|
end
|
107
163
|
|
108
164
|
# @see the `==` method
|
@@ -114,7 +170,7 @@ module Brevo
|
|
114
170
|
# Calculates hash code according to all attributes.
|
115
171
|
# @return [Fixnum] Hash code
|
116
172
|
def hash
|
117
|
-
[
|
173
|
+
[name, duration, task_type_id, date, notes, done, assign_to_id, contacts_ids, deals_ids, companies_ids].hash
|
118
174
|
end
|
119
175
|
|
120
176
|
# Builds the object from hash
|
data/lib/brevo/models/body_11.rb
CHANGED
@@ -14,20 +14,45 @@ require 'date'
|
|
14
14
|
|
15
15
|
module Brevo
|
16
16
|
class Body11
|
17
|
-
#
|
17
|
+
# visitor’s ID received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a>
|
18
|
+
attr_accessor :visitor_id
|
19
|
+
|
20
|
+
# message text
|
18
21
|
attr_accessor :text
|
19
22
|
|
23
|
+
# agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Alternatively, you can use `agentEmail` + `agentName` + `receivedFrom` instead (all 3 fields required).
|
24
|
+
attr_accessor :agent_id
|
25
|
+
|
26
|
+
# mark your messages to distinguish messages created by you from the others.
|
27
|
+
attr_accessor :received_from
|
28
|
+
|
29
|
+
# agent email. When sending messages from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address.
|
30
|
+
attr_accessor :agent_email
|
31
|
+
|
32
|
+
# agent name
|
33
|
+
attr_accessor :agent_name
|
34
|
+
|
20
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
36
|
def self.attribute_map
|
22
37
|
{
|
23
|
-
:'
|
38
|
+
:'visitor_id' => :'visitorId',
|
39
|
+
:'text' => :'text',
|
40
|
+
:'agent_id' => :'agentId',
|
41
|
+
:'received_from' => :'receivedFrom',
|
42
|
+
:'agent_email' => :'agentEmail',
|
43
|
+
:'agent_name' => :'agentName'
|
24
44
|
}
|
25
45
|
end
|
26
46
|
|
27
47
|
# Attribute type mapping.
|
28
48
|
def self.swagger_types
|
29
49
|
{
|
30
|
-
:'
|
50
|
+
:'visitor_id' => :'String',
|
51
|
+
:'text' => :'String',
|
52
|
+
:'agent_id' => :'String',
|
53
|
+
:'received_from' => :'String',
|
54
|
+
:'agent_email' => :'String',
|
55
|
+
:'agent_name' => :'String'
|
31
56
|
}
|
32
57
|
end
|
33
58
|
|
@@ -39,15 +64,39 @@ module Brevo
|
|
39
64
|
# convert string to symbol for hash key
|
40
65
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
41
66
|
|
67
|
+
if attributes.has_key?(:'visitorId')
|
68
|
+
self.visitor_id = attributes[:'visitorId']
|
69
|
+
end
|
70
|
+
|
42
71
|
if attributes.has_key?(:'text')
|
43
72
|
self.text = attributes[:'text']
|
44
73
|
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'agentId')
|
76
|
+
self.agent_id = attributes[:'agentId']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.has_key?(:'receivedFrom')
|
80
|
+
self.received_from = attributes[:'receivedFrom']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.has_key?(:'agentEmail')
|
84
|
+
self.agent_email = attributes[:'agentEmail']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.has_key?(:'agentName')
|
88
|
+
self.agent_name = attributes[:'agentName']
|
89
|
+
end
|
45
90
|
end
|
46
91
|
|
47
92
|
# Show invalid properties with the reasons. Usually used together with valid?
|
48
93
|
# @return Array for valid properties with the reasons
|
49
94
|
def list_invalid_properties
|
50
95
|
invalid_properties = Array.new
|
96
|
+
if @visitor_id.nil?
|
97
|
+
invalid_properties.push('invalid value for "visitor_id", visitor_id cannot be nil.')
|
98
|
+
end
|
99
|
+
|
51
100
|
if @text.nil?
|
52
101
|
invalid_properties.push('invalid value for "text", text cannot be nil.')
|
53
102
|
end
|
@@ -58,6 +107,7 @@ module Brevo
|
|
58
107
|
# Check to see if the all the properties in the model are valid
|
59
108
|
# @return true if the model is valid
|
60
109
|
def valid?
|
110
|
+
return false if @visitor_id.nil?
|
61
111
|
return false if @text.nil?
|
62
112
|
true
|
63
113
|
end
|
@@ -67,7 +117,12 @@ module Brevo
|
|
67
117
|
def ==(o)
|
68
118
|
return true if self.equal?(o)
|
69
119
|
self.class == o.class &&
|
70
|
-
|
120
|
+
visitor_id == o.visitor_id &&
|
121
|
+
text == o.text &&
|
122
|
+
agent_id == o.agent_id &&
|
123
|
+
received_from == o.received_from &&
|
124
|
+
agent_email == o.agent_email &&
|
125
|
+
agent_name == o.agent_name
|
71
126
|
end
|
72
127
|
|
73
128
|
# @see the `==` method
|
@@ -79,7 +134,7 @@ module Brevo
|
|
79
134
|
# Calculates hash code according to all attributes.
|
80
135
|
# @return [Fixnum] Hash code
|
81
136
|
def hash
|
82
|
-
[text].hash
|
137
|
+
[visitor_id, text, agent_id, received_from, agent_email, agent_name].hash
|
83
138
|
end
|
84
139
|
|
85
140
|
# Builds the object from hash
|
data/lib/brevo/models/body_12.rb
CHANGED
@@ -14,35 +14,20 @@ require 'date'
|
|
14
14
|
|
15
15
|
module Brevo
|
16
16
|
class Body12
|
17
|
-
#
|
18
|
-
attr_accessor :
|
19
|
-
|
20
|
-
# mark your messages to distinguish messages created by you from the others.
|
21
|
-
attr_accessor :received_from
|
22
|
-
|
23
|
-
# agent email. When sending online pings from a standalone system, it’s hard to maintain a 1-to-1 relationship between the users of both systems. In this case, an agent can be specified by their email address. If there’s no agent with the specified email address in your Brevo organization, a dummy agent will be created automatically.
|
24
|
-
attr_accessor :agent_email
|
25
|
-
|
26
|
-
# agent name.
|
27
|
-
attr_accessor :agent_name
|
17
|
+
# edited message text
|
18
|
+
attr_accessor :text
|
28
19
|
|
29
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
21
|
def self.attribute_map
|
31
22
|
{
|
32
|
-
:'
|
33
|
-
:'received_from' => :'receivedFrom',
|
34
|
-
:'agent_email' => :'agentEmail',
|
35
|
-
:'agent_name' => :'agentName'
|
23
|
+
:'text' => :'text'
|
36
24
|
}
|
37
25
|
end
|
38
26
|
|
39
27
|
# Attribute type mapping.
|
40
28
|
def self.swagger_types
|
41
29
|
{
|
42
|
-
:'
|
43
|
-
:'received_from' => :'String',
|
44
|
-
:'agent_email' => :'String',
|
45
|
-
:'agent_name' => :'String'
|
30
|
+
:'text' => :'String'
|
46
31
|
}
|
47
32
|
end
|
48
33
|
|
@@ -54,20 +39,8 @@ module Brevo
|
|
54
39
|
# convert string to symbol for hash key
|
55
40
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
41
|
|
57
|
-
if attributes.has_key?(:'
|
58
|
-
self.
|
59
|
-
end
|
60
|
-
|
61
|
-
if attributes.has_key?(:'receivedFrom')
|
62
|
-
self.received_from = attributes[:'receivedFrom']
|
63
|
-
end
|
64
|
-
|
65
|
-
if attributes.has_key?(:'agentEmail')
|
66
|
-
self.agent_email = attributes[:'agentEmail']
|
67
|
-
end
|
68
|
-
|
69
|
-
if attributes.has_key?(:'agentName')
|
70
|
-
self.agent_name = attributes[:'agentName']
|
42
|
+
if attributes.has_key?(:'text')
|
43
|
+
self.text = attributes[:'text']
|
71
44
|
end
|
72
45
|
end
|
73
46
|
|
@@ -75,12 +48,17 @@ module Brevo
|
|
75
48
|
# @return Array for valid properties with the reasons
|
76
49
|
def list_invalid_properties
|
77
50
|
invalid_properties = Array.new
|
51
|
+
if @text.nil?
|
52
|
+
invalid_properties.push('invalid value for "text", text cannot be nil.')
|
53
|
+
end
|
54
|
+
|
78
55
|
invalid_properties
|
79
56
|
end
|
80
57
|
|
81
58
|
# Check to see if the all the properties in the model are valid
|
82
59
|
# @return true if the model is valid
|
83
60
|
def valid?
|
61
|
+
return false if @text.nil?
|
84
62
|
true
|
85
63
|
end
|
86
64
|
|
@@ -89,10 +67,7 @@ module Brevo
|
|
89
67
|
def ==(o)
|
90
68
|
return true if self.equal?(o)
|
91
69
|
self.class == o.class &&
|
92
|
-
|
93
|
-
received_from == o.received_from &&
|
94
|
-
agent_email == o.agent_email &&
|
95
|
-
agent_name == o.agent_name
|
70
|
+
text == o.text
|
96
71
|
end
|
97
72
|
|
98
73
|
# @see the `==` method
|
@@ -104,7 +79,7 @@ module Brevo
|
|
104
79
|
# Calculates hash code according to all attributes.
|
105
80
|
# @return [Fixnum] Hash code
|
106
81
|
def hash
|
107
|
-
[
|
82
|
+
[text].hash
|
108
83
|
end
|
109
84
|
|
110
85
|
# Builds the object from hash
|
@@ -0,0 +1,225 @@
|
|
1
|
+
=begin
|
2
|
+
#Brevo API
|
3
|
+
|
4
|
+
#Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable |
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.0
|
7
|
+
Contact: contact@brevo.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.19
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Brevo
|
16
|
+
class Body13
|
17
|
+
# visitor’s ID received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.brevo.com/docs/customize-the-widget#identifying-existing-users\">bind existing user account to Conversations</a>
|
18
|
+
attr_accessor :visitor_id
|
19
|
+
|
20
|
+
# message text
|
21
|
+
attr_accessor :text
|
22
|
+
|
23
|
+
# agent ID. It can be found on agent’s page or received <a href=\"https://developers.brevo.com/docs/conversations-webhooks\">from a webhook</a>. Optional if `groupId` is set.
|
24
|
+
attr_accessor :agent_id
|
25
|
+
|
26
|
+
# group ID. It can be found on group’s page. Optional if `agentId` is set.
|
27
|
+
attr_accessor :group_id
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'visitor_id' => :'visitorId',
|
33
|
+
:'text' => :'text',
|
34
|
+
:'agent_id' => :'agentId',
|
35
|
+
:'group_id' => :'groupId'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'visitor_id' => :'String',
|
43
|
+
:'text' => :'String',
|
44
|
+
:'agent_id' => :'String',
|
45
|
+
:'group_id' => :'String'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
|
+
|
57
|
+
if attributes.has_key?(:'visitorId')
|
58
|
+
self.visitor_id = attributes[:'visitorId']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'text')
|
62
|
+
self.text = attributes[:'text']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'agentId')
|
66
|
+
self.agent_id = attributes[:'agentId']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'groupId')
|
70
|
+
self.group_id = attributes[:'groupId']
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
75
|
+
# @return Array for valid properties with the reasons
|
76
|
+
def list_invalid_properties
|
77
|
+
invalid_properties = Array.new
|
78
|
+
if @visitor_id.nil?
|
79
|
+
invalid_properties.push('invalid value for "visitor_id", visitor_id cannot be nil.')
|
80
|
+
end
|
81
|
+
|
82
|
+
if @text.nil?
|
83
|
+
invalid_properties.push('invalid value for "text", text cannot be nil.')
|
84
|
+
end
|
85
|
+
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
return false if @visitor_id.nil?
|
93
|
+
return false if @text.nil?
|
94
|
+
true
|
95
|
+
end
|
96
|
+
|
97
|
+
# Checks equality by comparing each attribute.
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def ==(o)
|
100
|
+
return true if self.equal?(o)
|
101
|
+
self.class == o.class &&
|
102
|
+
visitor_id == o.visitor_id &&
|
103
|
+
text == o.text &&
|
104
|
+
agent_id == o.agent_id &&
|
105
|
+
group_id == o.group_id
|
106
|
+
end
|
107
|
+
|
108
|
+
# @see the `==` method
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def eql?(o)
|
111
|
+
self == o
|
112
|
+
end
|
113
|
+
|
114
|
+
# Calculates hash code according to all attributes.
|
115
|
+
# @return [Fixnum] Hash code
|
116
|
+
def hash
|
117
|
+
[visitor_id, text, agent_id, group_id].hash
|
118
|
+
end
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def build_from_hash(attributes)
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
125
|
+
self.class.swagger_types.each_pair do |key, type|
|
126
|
+
if type =~ /\AArray<(.*)>/i
|
127
|
+
# check to ensure the input is an array given that the attribute
|
128
|
+
# is documented as an array but the input is not
|
129
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
130
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
135
|
+
end
|
136
|
+
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
# Deserializes the data based on type
|
141
|
+
# @param string type Data type
|
142
|
+
# @param string value Value to be deserialized
|
143
|
+
# @return [Object] Deserialized data
|
144
|
+
def _deserialize(type, value)
|
145
|
+
case type.to_sym
|
146
|
+
when :DateTime
|
147
|
+
DateTime.parse(value)
|
148
|
+
when :Date
|
149
|
+
Date.parse(value)
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :BOOLEAN
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
temp_model = Brevo.const_get(type).new
|
178
|
+
temp_model.build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
next if value.nil?
|
201
|
+
hash[param] = _to_hash(value)
|
202
|
+
end
|
203
|
+
hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Outputs non-array value in the form of hash
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
208
|
+
# @param [Object] value Any valid value
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map { |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to? :to_hash
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
end
|