sib-api-v3-sdk 8.1.0 → 9.1.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 +82 -33
- data/docs/Body.md +3 -11
- data/docs/Body1.md +3 -11
- data/docs/Body10.md +11 -0
- data/docs/Body11.md +8 -0
- data/docs/Body12.md +11 -0
- data/docs/Body2.md +11 -0
- data/docs/Body3.md +9 -0
- data/docs/Body4.md +9 -0
- data/docs/Body5.md +11 -0
- data/docs/Body6.md +18 -0
- data/docs/Body7.md +17 -0
- data/docs/Body8.md +13 -0
- data/docs/Body9.md +8 -0
- data/docs/CompaniesApi.md +425 -0
- data/docs/CompaniesList.md +8 -0
- data/docs/Company.md +11 -0
- data/docs/CompanyAttributes.md +7 -0
- data/docs/CompanyAttributesInner.md +12 -0
- data/docs/ContactsApi.md +8 -2
- data/docs/{ListsApi.md → ConversationsApi.md} +115 -133
- data/docs/ConversationsMessage.md +17 -0
- data/docs/ConversationsMessageFile.md +12 -0
- data/docs/ConversationsMessageFileImageInfo.md +10 -0
- data/docs/CreateContact.md +1 -1
- data/docs/CreateEmailCampaign.md +2 -0
- data/docs/CreateEmailCampaignRecipients.md +1 -0
- data/docs/CreateSubAccount.md +3 -3
- data/docs/CreateSubAccountResponse.md +8 -0
- data/docs/Deal.md +11 -0
- data/docs/DealAttributes.md +7 -0
- data/docs/DealAttributesInner.md +12 -0
- data/docs/DealsApi.md +476 -0
- data/docs/DealsList.md +8 -0
- data/docs/EmailCampaignsApi.md +6 -5
- data/docs/FileData.md +3 -6
- data/docs/FileDownloadableLink.md +8 -0
- data/docs/FileList.md +7 -0
- data/docs/FilesApi.md +318 -0
- data/docs/GetCampaignStats.md +2 -0
- data/docs/GetScheduledEmailByBatchId.md +9 -0
- data/docs/GetScheduledEmailByBatchIdBatches.md +10 -0
- data/docs/GetScheduledEmailByMessageId.md +10 -0
- data/docs/GetSsoToken.md +1 -1
- data/docs/InboundParsingApi.md +60 -0
- data/docs/InlineResponse200.md +8 -0
- data/docs/InlineResponse201.md +8 -0
- data/docs/InlineResponse2011.md +8 -0
- data/docs/MasterAccountApi.md +6 -6
- data/docs/NoteData.md +1 -0
- data/docs/NoteId.md +8 -0
- data/docs/NoteList.md +7 -0
- data/docs/NotesApi.md +312 -0
- data/docs/Pipeline.md +8 -0
- data/docs/PipelineStage.md +9 -0
- data/docs/ScheduleSmtpEmail.md +10 -0
- data/docs/SendSmtpEmail.md +3 -1
- data/docs/SubAccountDetailsResponsePlanInfoCredits.md +1 -1
- data/docs/SubAccountsResponseSubAccounts.md +4 -4
- data/docs/Task.md +0 -11
- data/docs/TaskList.md +8 -0
- data/docs/TaskReminder.md +1 -1
- data/docs/TaskTypes.md +0 -1
- data/docs/{FoldersApi.md → TasksApi.md} +95 -91
- data/docs/TransactionalEmailsApi.md +201 -2
- data/docs/UpdateContact.md +1 -1
- data/docs/UpdateEmailCampaign.md +3 -1
- data/docs/UpdateEmailCampaignRecipients.md +2 -1
- data/docs/UpdateSmtpTemplate.md +1 -1
- data/docs/UploadImageModel.md +8 -0
- data/lib/sib-api-v3-sdk/api/companies_api.rb +409 -0
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +26 -0
- data/lib/sib-api-v3-sdk/api/conversations_api.rb +504 -0
- data/lib/sib-api-v3-sdk/api/deals_api.rb +454 -0
- data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +13 -8
- data/lib/sib-api-v3-sdk/api/files_api.rb +313 -0
- data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +57 -1
- data/lib/sib-api-v3-sdk/api/master_account_api.rb +9 -9
- data/lib/sib-api-v3-sdk/api/notes_api.rb +308 -0
- data/lib/sib-api-v3-sdk/api/process_api.rb +4 -0
- data/lib/sib-api-v3-sdk/api/reseller_api.rb +4 -0
- data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +4 -0
- data/lib/sib-api-v3-sdk/api/tasks_api.rb +375 -0
- data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +222 -3
- data/lib/sib-api-v3-sdk/models/body.rb +16 -111
- data/lib/sib-api-v3-sdk/models/body_1.rb +16 -116
- data/lib/sib-api-v3-sdk/models/body_10.rb +225 -0
- data/lib/sib-api-v3-sdk/models/body_11.rb +190 -0
- data/lib/sib-api-v3-sdk/models/body_12.rb +215 -0
- data/lib/sib-api-v3-sdk/models/body_2.rb +223 -0
- data/lib/sib-api-v3-sdk/models/body_3.rb +200 -0
- data/lib/sib-api-v3-sdk/models/body_4.rb +195 -0
- data/lib/sib-api-v3-sdk/models/body_5.rb +223 -0
- data/lib/sib-api-v3-sdk/models/body_6.rb +320 -0
- data/lib/sib-api-v3-sdk/models/body_7.rb +281 -0
- data/lib/sib-api-v3-sdk/models/body_8.rb +245 -0
- data/lib/sib-api-v3-sdk/models/body_9.rb +190 -0
- data/lib/sib-api-v3-sdk/models/companies_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/company.rb +220 -0
- data/lib/sib-api-v3-sdk/models/company_attributes.rb +176 -0
- data/lib/sib-api-v3-sdk/models/company_attributes_inner.rb +223 -0
- data/lib/sib-api-v3-sdk/models/conversations_message.rb +324 -0
- data/lib/sib-api-v3-sdk/models/conversations_message_file.rb +239 -0
- data/lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb +236 -0
- data/lib/sib-api-v3-sdk/models/create_contact.rb +1 -1
- data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +24 -4
- data/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +17 -5
- data/lib/sib-api-v3-sdk/models/create_sub_account.rb +3 -3
- data/lib/sib-api-v3-sdk/models/create_sub_account_response.rb +190 -0
- data/lib/sib-api-v3-sdk/models/deal.rb +220 -0
- data/lib/sib-api-v3-sdk/models/deal_attributes.rb +176 -0
- data/lib/sib-api-v3-sdk/models/deal_attributes_inner.rb +223 -0
- data/lib/sib-api-v3-sdk/models/deals_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/file_data.rb +22 -54
- data/lib/sib-api-v3-sdk/models/file_downloadable_link.rb +190 -0
- data/lib/sib-api-v3-sdk/models/file_list.rb +176 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +21 -1
- data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb +196 -0
- data/lib/sib-api-v3-sdk/models/{contact.rb → get_scheduled_email_by_batch_id_batches.rb} +62 -74
- data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb +254 -0
- data/lib/sib-api-v3-sdk/models/get_sso_token.rb +1 -1
- data/lib/sib-api-v3-sdk/models/inline_response_200.rb +191 -0
- data/lib/sib-api-v3-sdk/models/inline_response_201.rb +191 -0
- data/lib/sib-api-v3-sdk/models/inline_response_201_1.rb +191 -0
- data/lib/sib-api-v3-sdk/models/note_data.rb +16 -4
- data/lib/sib-api-v3-sdk/models/note_id.rb +186 -0
- data/lib/sib-api-v3-sdk/models/note_list.rb +176 -0
- data/lib/sib-api-v3-sdk/models/pipeline.rb +188 -0
- data/lib/sib-api-v3-sdk/models/pipeline_stage.rb +196 -0
- data/lib/sib-api-v3-sdk/models/schedule_smtp_email.rb +206 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +24 -4
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +2 -2
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +1 -1
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +1 -1
- data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +4 -4
- data/lib/sib-api-v3-sdk/models/task.rb +4 -119
- data/lib/sib-api-v3-sdk/models/task_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/task_reminder.rb +1 -1
- data/lib/sib-api-v3-sdk/models/task_types.rb +1 -11
- data/lib/sib-api-v3-sdk/models/update_contact.rb +1 -1
- data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +25 -5
- data/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +18 -6
- data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +1 -1
- data/lib/sib-api-v3-sdk/models/upload_image_model.rb +190 -0
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/lib/sib-api-v3-sdk.rb +44 -5
- data/spec/api/companies_api_spec.rb +119 -0
- data/spec/api/contacts_api_spec.rb +2 -0
- data/spec/api/{crm_api_spec.rb → conversations_api_spec.rb} +54 -94
- data/spec/api/{lists_api_spec.rb → deals_api_spec.rb} +51 -68
- data/spec/api/email_campaigns_api_spec.rb +1 -1
- data/spec/api/files_api_spec.rb +99 -0
- data/spec/api/inbound_parsing_api_spec.rb +12 -0
- data/spec/api/master_account_api_spec.rb +4 -4
- data/spec/api/notes_api_spec.rb +97 -0
- data/spec/api/{folders_api_spec.rb → tasks_api_spec.rb} +47 -41
- data/spec/api/transactional_emails_api_spec.rb +44 -0
- data/spec/models/body_10_spec.rb +59 -0
- data/spec/models/body_11_spec.rb +41 -0
- data/spec/models/body_12_spec.rb +59 -0
- data/spec/models/body_1_spec.rb +2 -50
- data/spec/models/body_2_spec.rb +59 -0
- data/spec/models/body_3_spec.rb +47 -0
- data/spec/models/body_4_spec.rb +47 -0
- data/spec/models/body_5_spec.rb +59 -0
- data/spec/models/body_6_spec.rb +101 -0
- data/spec/models/{contact_spec.rb → body_7_spec.rb} +26 -14
- data/spec/{api/attributes_api_spec.rb → models/body_8_spec.rb} +22 -34
- data/spec/models/body_9_spec.rb +41 -0
- data/spec/models/body_spec.rb +2 -50
- data/spec/models/companies_list_spec.rb +41 -0
- data/spec/models/company_attributes_inner_spec.rb +65 -0
- data/spec/models/company_attributes_spec.rb +35 -0
- data/spec/models/company_spec.rb +59 -0
- data/spec/models/conversations_message_file_image_info_spec.rb +53 -0
- data/spec/models/conversations_message_file_spec.rb +65 -0
- data/spec/models/conversations_message_spec.rb +99 -0
- data/spec/models/create_email_campaign_recipients_spec.rb +6 -0
- data/spec/models/create_email_campaign_spec.rb +12 -0
- data/spec/models/create_sub_account_response_spec.rb +41 -0
- data/spec/models/deal_attributes_inner_spec.rb +65 -0
- data/spec/models/deal_attributes_spec.rb +35 -0
- data/spec/models/deal_spec.rb +59 -0
- data/spec/models/deals_list_spec.rb +41 -0
- data/spec/models/file_data_spec.rb +3 -21
- data/spec/models/file_downloadable_link_spec.rb +41 -0
- data/spec/models/file_list_spec.rb +35 -0
- data/spec/models/get_campaign_stats_spec.rb +12 -0
- data/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb +57 -0
- data/spec/models/get_scheduled_email_by_batch_id_spec.rb +47 -0
- data/spec/models/get_scheduled_email_by_message_id_spec.rb +57 -0
- data/spec/models/inline_response_200_spec.rb +41 -0
- data/spec/models/inline_response_201_1_spec.rb +41 -0
- data/spec/models/inline_response_201_spec.rb +41 -0
- data/spec/models/note_data_spec.rb +6 -0
- data/spec/models/note_id_spec.rb +41 -0
- data/spec/models/note_list_spec.rb +35 -0
- data/spec/models/pipeline_spec.rb +41 -0
- data/spec/models/pipeline_stage_spec.rb +47 -0
- data/spec/models/schedule_smtp_email_spec.rb +53 -0
- data/spec/models/send_smtp_email_spec.rb +12 -0
- data/spec/models/task_list_spec.rb +41 -0
- data/spec/models/task_spec.rb +0 -66
- data/spec/models/task_types_spec.rb +0 -6
- data/spec/models/update_email_campaign_recipients_spec.rb +6 -0
- data/spec/models/update_email_campaign_spec.rb +12 -0
- data/spec/models/upload_image_model_spec.rb +41 -0
- metadata +179 -23
- data/docs/AttributesApi.md +0 -246
- data/docs/CRMApi.md +0 -762
- data/docs/Contact.md +0 -15
- data/lib/sib-api-v3-sdk/api/attributes_api.rb +0 -274
- data/lib/sib-api-v3-sdk/api/crm_api.rb +0 -716
- data/lib/sib-api-v3-sdk/api/folders_api.rb +0 -383
- data/lib/sib-api-v3-sdk/api/lists_api.rb +0 -562
@@ -14,52 +14,21 @@ require 'date'
|
|
14
14
|
|
15
15
|
module SibApiV3Sdk
|
16
16
|
class Body
|
17
|
-
# Name of
|
17
|
+
# Name of company
|
18
18
|
attr_accessor :name
|
19
19
|
|
20
|
-
#
|
21
|
-
attr_accessor :
|
20
|
+
# Attributes for company creation
|
21
|
+
attr_accessor :attributes
|
22
22
|
|
23
|
-
#
|
24
|
-
attr_accessor :
|
25
|
-
|
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
|
-
# User id to whom task is assigned
|
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
|
46
|
-
|
47
|
-
attr_accessor :reminder
|
23
|
+
# Country code if phone_number is passed in attributes.
|
24
|
+
attr_accessor :country_code
|
48
25
|
|
49
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
50
27
|
def self.attribute_map
|
51
28
|
{
|
52
29
|
:'name' => :'name',
|
53
|
-
:'
|
54
|
-
:'
|
55
|
-
:'date' => :'date',
|
56
|
-
:'notes' => :'notes',
|
57
|
-
:'done' => :'done',
|
58
|
-
:'assign_to_id' => :'assignToId',
|
59
|
-
:'contacts_ids' => :'contactsIds',
|
60
|
-
:'deals_ids' => :'dealsIds',
|
61
|
-
:'companies_ids' => :'companiesIds',
|
62
|
-
:'reminder' => :'reminder'
|
30
|
+
:'attributes' => :'attributes',
|
31
|
+
:'country_code' => :'countryCode'
|
63
32
|
}
|
64
33
|
end
|
65
34
|
|
@@ -67,16 +36,8 @@ module SibApiV3Sdk
|
|
67
36
|
def self.swagger_types
|
68
37
|
{
|
69
38
|
:'name' => :'String',
|
70
|
-
:'
|
71
|
-
:'
|
72
|
-
:'date' => :'DateTime',
|
73
|
-
:'notes' => :'String',
|
74
|
-
:'done' => :'BOOLEAN',
|
75
|
-
:'assign_to_id' => :'String',
|
76
|
-
:'contacts_ids' => :'Array<Integer>',
|
77
|
-
:'deals_ids' => :'Array<String>',
|
78
|
-
:'companies_ids' => :'Array<String>',
|
79
|
-
:'reminder' => :'TaskReminder'
|
39
|
+
:'attributes' => :'Object',
|
40
|
+
:'country_code' => :'Integer'
|
80
41
|
}
|
81
42
|
end
|
82
43
|
|
@@ -92,50 +53,12 @@ module SibApiV3Sdk
|
|
92
53
|
self.name = attributes[:'name']
|
93
54
|
end
|
94
55
|
|
95
|
-
if attributes.has_key?(:'
|
96
|
-
self.
|
97
|
-
end
|
98
|
-
|
99
|
-
if attributes.has_key?(:'taskTypeId')
|
100
|
-
self.task_type_id = attributes[:'taskTypeId']
|
101
|
-
end
|
102
|
-
|
103
|
-
if attributes.has_key?(:'date')
|
104
|
-
self.date = attributes[:'date']
|
105
|
-
end
|
106
|
-
|
107
|
-
if attributes.has_key?(:'notes')
|
108
|
-
self.notes = attributes[:'notes']
|
109
|
-
end
|
110
|
-
|
111
|
-
if attributes.has_key?(:'done')
|
112
|
-
self.done = attributes[:'done']
|
56
|
+
if attributes.has_key?(:'attributes')
|
57
|
+
self.attributes = attributes[:'attributes']
|
113
58
|
end
|
114
59
|
|
115
|
-
if attributes.has_key?(:'
|
116
|
-
self.
|
117
|
-
end
|
118
|
-
|
119
|
-
if attributes.has_key?(:'contactsIds')
|
120
|
-
if (value = attributes[:'contactsIds']).is_a?(Array)
|
121
|
-
self.contacts_ids = value
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
if attributes.has_key?(:'dealsIds')
|
126
|
-
if (value = attributes[:'dealsIds']).is_a?(Array)
|
127
|
-
self.deals_ids = value
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
|
-
if attributes.has_key?(:'companiesIds')
|
132
|
-
if (value = attributes[:'companiesIds']).is_a?(Array)
|
133
|
-
self.companies_ids = value
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
if attributes.has_key?(:'reminder')
|
138
|
-
self.reminder = attributes[:'reminder']
|
60
|
+
if attributes.has_key?(:'countryCode')
|
61
|
+
self.country_code = attributes[:'countryCode']
|
139
62
|
end
|
140
63
|
end
|
141
64
|
|
@@ -147,14 +70,6 @@ module SibApiV3Sdk
|
|
147
70
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
148
71
|
end
|
149
72
|
|
150
|
-
if @task_type_id.nil?
|
151
|
-
invalid_properties.push('invalid value for "task_type_id", task_type_id cannot be nil.')
|
152
|
-
end
|
153
|
-
|
154
|
-
if @date.nil?
|
155
|
-
invalid_properties.push('invalid value for "date", date cannot be nil.')
|
156
|
-
end
|
157
|
-
|
158
73
|
invalid_properties
|
159
74
|
end
|
160
75
|
|
@@ -162,8 +77,6 @@ module SibApiV3Sdk
|
|
162
77
|
# @return true if the model is valid
|
163
78
|
def valid?
|
164
79
|
return false if @name.nil?
|
165
|
-
return false if @task_type_id.nil?
|
166
|
-
return false if @date.nil?
|
167
80
|
true
|
168
81
|
end
|
169
82
|
|
@@ -173,16 +86,8 @@ module SibApiV3Sdk
|
|
173
86
|
return true if self.equal?(o)
|
174
87
|
self.class == o.class &&
|
175
88
|
name == o.name &&
|
176
|
-
|
177
|
-
|
178
|
-
date == o.date &&
|
179
|
-
notes == o.notes &&
|
180
|
-
done == o.done &&
|
181
|
-
assign_to_id == o.assign_to_id &&
|
182
|
-
contacts_ids == o.contacts_ids &&
|
183
|
-
deals_ids == o.deals_ids &&
|
184
|
-
companies_ids == o.companies_ids &&
|
185
|
-
reminder == o.reminder
|
89
|
+
attributes == o.attributes &&
|
90
|
+
country_code == o.country_code
|
186
91
|
end
|
187
92
|
|
188
93
|
# @see the `==` method
|
@@ -194,7 +99,7 @@ module SibApiV3Sdk
|
|
194
99
|
# Calculates hash code according to all attributes.
|
195
100
|
# @return [Fixnum] Hash code
|
196
101
|
def hash
|
197
|
-
[name,
|
102
|
+
[name, attributes, country_code].hash
|
198
103
|
end
|
199
104
|
|
200
105
|
# Builds the object from hash
|
@@ -14,52 +14,21 @@ require 'date'
|
|
14
14
|
|
15
15
|
module SibApiV3Sdk
|
16
16
|
class Body1
|
17
|
-
# Name of
|
17
|
+
# Name of company
|
18
18
|
attr_accessor :name
|
19
19
|
|
20
|
-
#
|
21
|
-
attr_accessor :
|
20
|
+
# Attributes for company update
|
21
|
+
attr_accessor :attributes
|
22
22
|
|
23
|
-
#
|
24
|
-
attr_accessor :
|
25
|
-
|
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
|
-
# User id to whom task is assigned
|
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
|
46
|
-
|
47
|
-
attr_accessor :reminder
|
23
|
+
# Country code if phone_number is passed in attributes.
|
24
|
+
attr_accessor :country_code
|
48
25
|
|
49
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
50
27
|
def self.attribute_map
|
51
28
|
{
|
52
29
|
:'name' => :'name',
|
53
|
-
:'
|
54
|
-
:'
|
55
|
-
:'date' => :'date',
|
56
|
-
:'notes' => :'notes',
|
57
|
-
:'done' => :'done',
|
58
|
-
:'assign_to_id' => :'assignToId',
|
59
|
-
:'contacts_ids' => :'contactsIds',
|
60
|
-
:'deals_ids' => :'dealsIds',
|
61
|
-
:'companies_ids' => :'companiesIds',
|
62
|
-
:'reminder' => :'reminder'
|
30
|
+
:'attributes' => :'attributes',
|
31
|
+
:'country_code' => :'countryCode'
|
63
32
|
}
|
64
33
|
end
|
65
34
|
|
@@ -67,16 +36,8 @@ module SibApiV3Sdk
|
|
67
36
|
def self.swagger_types
|
68
37
|
{
|
69
38
|
:'name' => :'String',
|
70
|
-
:'
|
71
|
-
:'
|
72
|
-
:'date' => :'DateTime',
|
73
|
-
:'notes' => :'String',
|
74
|
-
:'done' => :'BOOLEAN',
|
75
|
-
:'assign_to_id' => :'String',
|
76
|
-
:'contacts_ids' => :'Array<Integer>',
|
77
|
-
:'deals_ids' => :'Array<String>',
|
78
|
-
:'companies_ids' => :'Array<String>',
|
79
|
-
:'reminder' => :'TaskReminder'
|
39
|
+
:'attributes' => :'Object',
|
40
|
+
:'country_code' => :'Integer'
|
80
41
|
}
|
81
42
|
end
|
82
43
|
|
@@ -92,50 +53,12 @@ module SibApiV3Sdk
|
|
92
53
|
self.name = attributes[:'name']
|
93
54
|
end
|
94
55
|
|
95
|
-
if attributes.has_key?(:'
|
96
|
-
self.
|
56
|
+
if attributes.has_key?(:'attributes')
|
57
|
+
self.attributes = attributes[:'attributes']
|
97
58
|
end
|
98
59
|
|
99
|
-
if attributes.has_key?(:'
|
100
|
-
self.
|
101
|
-
end
|
102
|
-
|
103
|
-
if attributes.has_key?(:'date')
|
104
|
-
self.date = attributes[:'date']
|
105
|
-
end
|
106
|
-
|
107
|
-
if attributes.has_key?(:'notes')
|
108
|
-
self.notes = attributes[:'notes']
|
109
|
-
end
|
110
|
-
|
111
|
-
if attributes.has_key?(:'done')
|
112
|
-
self.done = attributes[:'done']
|
113
|
-
end
|
114
|
-
|
115
|
-
if attributes.has_key?(:'assignToId')
|
116
|
-
self.assign_to_id = attributes[:'assignToId']
|
117
|
-
end
|
118
|
-
|
119
|
-
if attributes.has_key?(:'contactsIds')
|
120
|
-
if (value = attributes[:'contactsIds']).is_a?(Array)
|
121
|
-
self.contacts_ids = value
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
if attributes.has_key?(:'dealsIds')
|
126
|
-
if (value = attributes[:'dealsIds']).is_a?(Array)
|
127
|
-
self.deals_ids = value
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
|
-
if attributes.has_key?(:'companiesIds')
|
132
|
-
if (value = attributes[:'companiesIds']).is_a?(Array)
|
133
|
-
self.companies_ids = value
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
if attributes.has_key?(:'reminder')
|
138
|
-
self.reminder = attributes[:'reminder']
|
60
|
+
if attributes.has_key?(:'countryCode')
|
61
|
+
self.country_code = attributes[:'countryCode']
|
139
62
|
end
|
140
63
|
end
|
141
64
|
|
@@ -143,27 +66,12 @@ module SibApiV3Sdk
|
|
143
66
|
# @return Array for valid properties with the reasons
|
144
67
|
def list_invalid_properties
|
145
68
|
invalid_properties = Array.new
|
146
|
-
if @name.nil?
|
147
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
148
|
-
end
|
149
|
-
|
150
|
-
if @task_type_id.nil?
|
151
|
-
invalid_properties.push('invalid value for "task_type_id", task_type_id cannot be nil.')
|
152
|
-
end
|
153
|
-
|
154
|
-
if @date.nil?
|
155
|
-
invalid_properties.push('invalid value for "date", date cannot be nil.')
|
156
|
-
end
|
157
|
-
|
158
69
|
invalid_properties
|
159
70
|
end
|
160
71
|
|
161
72
|
# Check to see if the all the properties in the model are valid
|
162
73
|
# @return true if the model is valid
|
163
74
|
def valid?
|
164
|
-
return false if @name.nil?
|
165
|
-
return false if @task_type_id.nil?
|
166
|
-
return false if @date.nil?
|
167
75
|
true
|
168
76
|
end
|
169
77
|
|
@@ -173,16 +81,8 @@ module SibApiV3Sdk
|
|
173
81
|
return true if self.equal?(o)
|
174
82
|
self.class == o.class &&
|
175
83
|
name == o.name &&
|
176
|
-
|
177
|
-
|
178
|
-
date == o.date &&
|
179
|
-
notes == o.notes &&
|
180
|
-
done == o.done &&
|
181
|
-
assign_to_id == o.assign_to_id &&
|
182
|
-
contacts_ids == o.contacts_ids &&
|
183
|
-
deals_ids == o.deals_ids &&
|
184
|
-
companies_ids == o.companies_ids &&
|
185
|
-
reminder == o.reminder
|
84
|
+
attributes == o.attributes &&
|
85
|
+
country_code == o.country_code
|
186
86
|
end
|
187
87
|
|
188
88
|
# @see the `==` method
|
@@ -194,7 +94,7 @@ module SibApiV3Sdk
|
|
194
94
|
# Calculates hash code according to all attributes.
|
195
95
|
# @return [Fixnum] Hash code
|
196
96
|
def hash
|
197
|
-
[name,
|
97
|
+
[name, attributes, country_code].hash
|
198
98
|
end
|
199
99
|
|
200
100
|
# Builds the object from hash
|
@@ -0,0 +1,225 @@
|
|
1
|
+
=begin
|
2
|
+
#SendinBlue API
|
3
|
+
|
4
|
+
#SendinBlue 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/sendinblue **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@sendinblue.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 SibApiV3Sdk
|
16
|
+
class Body10
|
17
|
+
# visitor’s ID received <a href=\"https://developers.sendinblue.com/docs/conversations-webhooks\">from a webhook</a> or generated by you to <a href=\"https://developers.sendinblue.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.sendinblue.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 = SibApiV3Sdk.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
|