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.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +82 -33
  3. data/docs/Body.md +3 -11
  4. data/docs/Body1.md +3 -11
  5. data/docs/Body10.md +11 -0
  6. data/docs/Body11.md +8 -0
  7. data/docs/Body12.md +11 -0
  8. data/docs/Body2.md +11 -0
  9. data/docs/Body3.md +9 -0
  10. data/docs/Body4.md +9 -0
  11. data/docs/Body5.md +11 -0
  12. data/docs/Body6.md +18 -0
  13. data/docs/Body7.md +17 -0
  14. data/docs/Body8.md +13 -0
  15. data/docs/Body9.md +8 -0
  16. data/docs/CompaniesApi.md +425 -0
  17. data/docs/CompaniesList.md +8 -0
  18. data/docs/Company.md +11 -0
  19. data/docs/CompanyAttributes.md +7 -0
  20. data/docs/CompanyAttributesInner.md +12 -0
  21. data/docs/ContactsApi.md +8 -2
  22. data/docs/{ListsApi.md → ConversationsApi.md} +115 -133
  23. data/docs/ConversationsMessage.md +17 -0
  24. data/docs/ConversationsMessageFile.md +12 -0
  25. data/docs/ConversationsMessageFileImageInfo.md +10 -0
  26. data/docs/CreateContact.md +1 -1
  27. data/docs/CreateEmailCampaign.md +2 -0
  28. data/docs/CreateEmailCampaignRecipients.md +1 -0
  29. data/docs/CreateSubAccount.md +3 -3
  30. data/docs/CreateSubAccountResponse.md +8 -0
  31. data/docs/Deal.md +11 -0
  32. data/docs/DealAttributes.md +7 -0
  33. data/docs/DealAttributesInner.md +12 -0
  34. data/docs/DealsApi.md +476 -0
  35. data/docs/DealsList.md +8 -0
  36. data/docs/EmailCampaignsApi.md +6 -5
  37. data/docs/FileData.md +3 -6
  38. data/docs/FileDownloadableLink.md +8 -0
  39. data/docs/FileList.md +7 -0
  40. data/docs/FilesApi.md +318 -0
  41. data/docs/GetCampaignStats.md +2 -0
  42. data/docs/GetScheduledEmailByBatchId.md +9 -0
  43. data/docs/GetScheduledEmailByBatchIdBatches.md +10 -0
  44. data/docs/GetScheduledEmailByMessageId.md +10 -0
  45. data/docs/GetSsoToken.md +1 -1
  46. data/docs/InboundParsingApi.md +60 -0
  47. data/docs/InlineResponse200.md +8 -0
  48. data/docs/InlineResponse201.md +8 -0
  49. data/docs/InlineResponse2011.md +8 -0
  50. data/docs/MasterAccountApi.md +6 -6
  51. data/docs/NoteData.md +1 -0
  52. data/docs/NoteId.md +8 -0
  53. data/docs/NoteList.md +7 -0
  54. data/docs/NotesApi.md +312 -0
  55. data/docs/Pipeline.md +8 -0
  56. data/docs/PipelineStage.md +9 -0
  57. data/docs/ScheduleSmtpEmail.md +10 -0
  58. data/docs/SendSmtpEmail.md +3 -1
  59. data/docs/SubAccountDetailsResponsePlanInfoCredits.md +1 -1
  60. data/docs/SubAccountsResponseSubAccounts.md +4 -4
  61. data/docs/Task.md +0 -11
  62. data/docs/TaskList.md +8 -0
  63. data/docs/TaskReminder.md +1 -1
  64. data/docs/TaskTypes.md +0 -1
  65. data/docs/{FoldersApi.md → TasksApi.md} +95 -91
  66. data/docs/TransactionalEmailsApi.md +201 -2
  67. data/docs/UpdateContact.md +1 -1
  68. data/docs/UpdateEmailCampaign.md +3 -1
  69. data/docs/UpdateEmailCampaignRecipients.md +2 -1
  70. data/docs/UpdateSmtpTemplate.md +1 -1
  71. data/docs/UploadImageModel.md +8 -0
  72. data/lib/sib-api-v3-sdk/api/companies_api.rb +409 -0
  73. data/lib/sib-api-v3-sdk/api/contacts_api.rb +26 -0
  74. data/lib/sib-api-v3-sdk/api/conversations_api.rb +504 -0
  75. data/lib/sib-api-v3-sdk/api/deals_api.rb +454 -0
  76. data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +13 -8
  77. data/lib/sib-api-v3-sdk/api/files_api.rb +313 -0
  78. data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +57 -1
  79. data/lib/sib-api-v3-sdk/api/master_account_api.rb +9 -9
  80. data/lib/sib-api-v3-sdk/api/notes_api.rb +308 -0
  81. data/lib/sib-api-v3-sdk/api/process_api.rb +4 -0
  82. data/lib/sib-api-v3-sdk/api/reseller_api.rb +4 -0
  83. data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +4 -0
  84. data/lib/sib-api-v3-sdk/api/tasks_api.rb +375 -0
  85. data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +222 -3
  86. data/lib/sib-api-v3-sdk/models/body.rb +16 -111
  87. data/lib/sib-api-v3-sdk/models/body_1.rb +16 -116
  88. data/lib/sib-api-v3-sdk/models/body_10.rb +225 -0
  89. data/lib/sib-api-v3-sdk/models/body_11.rb +190 -0
  90. data/lib/sib-api-v3-sdk/models/body_12.rb +215 -0
  91. data/lib/sib-api-v3-sdk/models/body_2.rb +223 -0
  92. data/lib/sib-api-v3-sdk/models/body_3.rb +200 -0
  93. data/lib/sib-api-v3-sdk/models/body_4.rb +195 -0
  94. data/lib/sib-api-v3-sdk/models/body_5.rb +223 -0
  95. data/lib/sib-api-v3-sdk/models/body_6.rb +320 -0
  96. data/lib/sib-api-v3-sdk/models/body_7.rb +281 -0
  97. data/lib/sib-api-v3-sdk/models/body_8.rb +245 -0
  98. data/lib/sib-api-v3-sdk/models/body_9.rb +190 -0
  99. data/lib/sib-api-v3-sdk/models/companies_list.rb +188 -0
  100. data/lib/sib-api-v3-sdk/models/company.rb +220 -0
  101. data/lib/sib-api-v3-sdk/models/company_attributes.rb +176 -0
  102. data/lib/sib-api-v3-sdk/models/company_attributes_inner.rb +223 -0
  103. data/lib/sib-api-v3-sdk/models/conversations_message.rb +324 -0
  104. data/lib/sib-api-v3-sdk/models/conversations_message_file.rb +239 -0
  105. data/lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb +236 -0
  106. data/lib/sib-api-v3-sdk/models/create_contact.rb +1 -1
  107. data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +24 -4
  108. data/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +17 -5
  109. data/lib/sib-api-v3-sdk/models/create_sub_account.rb +3 -3
  110. data/lib/sib-api-v3-sdk/models/create_sub_account_response.rb +190 -0
  111. data/lib/sib-api-v3-sdk/models/deal.rb +220 -0
  112. data/lib/sib-api-v3-sdk/models/deal_attributes.rb +176 -0
  113. data/lib/sib-api-v3-sdk/models/deal_attributes_inner.rb +223 -0
  114. data/lib/sib-api-v3-sdk/models/deals_list.rb +188 -0
  115. data/lib/sib-api-v3-sdk/models/file_data.rb +22 -54
  116. data/lib/sib-api-v3-sdk/models/file_downloadable_link.rb +190 -0
  117. data/lib/sib-api-v3-sdk/models/file_list.rb +176 -0
  118. data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +21 -1
  119. data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb +196 -0
  120. data/lib/sib-api-v3-sdk/models/{contact.rb → get_scheduled_email_by_batch_id_batches.rb} +62 -74
  121. data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb +254 -0
  122. data/lib/sib-api-v3-sdk/models/get_sso_token.rb +1 -1
  123. data/lib/sib-api-v3-sdk/models/inline_response_200.rb +191 -0
  124. data/lib/sib-api-v3-sdk/models/inline_response_201.rb +191 -0
  125. data/lib/sib-api-v3-sdk/models/inline_response_201_1.rb +191 -0
  126. data/lib/sib-api-v3-sdk/models/note_data.rb +16 -4
  127. data/lib/sib-api-v3-sdk/models/note_id.rb +186 -0
  128. data/lib/sib-api-v3-sdk/models/note_list.rb +176 -0
  129. data/lib/sib-api-v3-sdk/models/pipeline.rb +188 -0
  130. data/lib/sib-api-v3-sdk/models/pipeline_stage.rb +196 -0
  131. data/lib/sib-api-v3-sdk/models/schedule_smtp_email.rb +206 -0
  132. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +24 -4
  133. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +2 -2
  134. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +1 -1
  135. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +1 -1
  136. data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +4 -4
  137. data/lib/sib-api-v3-sdk/models/task.rb +4 -119
  138. data/lib/sib-api-v3-sdk/models/task_list.rb +188 -0
  139. data/lib/sib-api-v3-sdk/models/task_reminder.rb +1 -1
  140. data/lib/sib-api-v3-sdk/models/task_types.rb +1 -11
  141. data/lib/sib-api-v3-sdk/models/update_contact.rb +1 -1
  142. data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +25 -5
  143. data/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +18 -6
  144. data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +1 -1
  145. data/lib/sib-api-v3-sdk/models/upload_image_model.rb +190 -0
  146. data/lib/sib-api-v3-sdk/version.rb +1 -1
  147. data/lib/sib-api-v3-sdk.rb +44 -5
  148. data/spec/api/companies_api_spec.rb +119 -0
  149. data/spec/api/contacts_api_spec.rb +2 -0
  150. data/spec/api/{crm_api_spec.rb → conversations_api_spec.rb} +54 -94
  151. data/spec/api/{lists_api_spec.rb → deals_api_spec.rb} +51 -68
  152. data/spec/api/email_campaigns_api_spec.rb +1 -1
  153. data/spec/api/files_api_spec.rb +99 -0
  154. data/spec/api/inbound_parsing_api_spec.rb +12 -0
  155. data/spec/api/master_account_api_spec.rb +4 -4
  156. data/spec/api/notes_api_spec.rb +97 -0
  157. data/spec/api/{folders_api_spec.rb → tasks_api_spec.rb} +47 -41
  158. data/spec/api/transactional_emails_api_spec.rb +44 -0
  159. data/spec/models/body_10_spec.rb +59 -0
  160. data/spec/models/body_11_spec.rb +41 -0
  161. data/spec/models/body_12_spec.rb +59 -0
  162. data/spec/models/body_1_spec.rb +2 -50
  163. data/spec/models/body_2_spec.rb +59 -0
  164. data/spec/models/body_3_spec.rb +47 -0
  165. data/spec/models/body_4_spec.rb +47 -0
  166. data/spec/models/body_5_spec.rb +59 -0
  167. data/spec/models/body_6_spec.rb +101 -0
  168. data/spec/models/{contact_spec.rb → body_7_spec.rb} +26 -14
  169. data/spec/{api/attributes_api_spec.rb → models/body_8_spec.rb} +22 -34
  170. data/spec/models/body_9_spec.rb +41 -0
  171. data/spec/models/body_spec.rb +2 -50
  172. data/spec/models/companies_list_spec.rb +41 -0
  173. data/spec/models/company_attributes_inner_spec.rb +65 -0
  174. data/spec/models/company_attributes_spec.rb +35 -0
  175. data/spec/models/company_spec.rb +59 -0
  176. data/spec/models/conversations_message_file_image_info_spec.rb +53 -0
  177. data/spec/models/conversations_message_file_spec.rb +65 -0
  178. data/spec/models/conversations_message_spec.rb +99 -0
  179. data/spec/models/create_email_campaign_recipients_spec.rb +6 -0
  180. data/spec/models/create_email_campaign_spec.rb +12 -0
  181. data/spec/models/create_sub_account_response_spec.rb +41 -0
  182. data/spec/models/deal_attributes_inner_spec.rb +65 -0
  183. data/spec/models/deal_attributes_spec.rb +35 -0
  184. data/spec/models/deal_spec.rb +59 -0
  185. data/spec/models/deals_list_spec.rb +41 -0
  186. data/spec/models/file_data_spec.rb +3 -21
  187. data/spec/models/file_downloadable_link_spec.rb +41 -0
  188. data/spec/models/file_list_spec.rb +35 -0
  189. data/spec/models/get_campaign_stats_spec.rb +12 -0
  190. data/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb +57 -0
  191. data/spec/models/get_scheduled_email_by_batch_id_spec.rb +47 -0
  192. data/spec/models/get_scheduled_email_by_message_id_spec.rb +57 -0
  193. data/spec/models/inline_response_200_spec.rb +41 -0
  194. data/spec/models/inline_response_201_1_spec.rb +41 -0
  195. data/spec/models/inline_response_201_spec.rb +41 -0
  196. data/spec/models/note_data_spec.rb +6 -0
  197. data/spec/models/note_id_spec.rb +41 -0
  198. data/spec/models/note_list_spec.rb +35 -0
  199. data/spec/models/pipeline_spec.rb +41 -0
  200. data/spec/models/pipeline_stage_spec.rb +47 -0
  201. data/spec/models/schedule_smtp_email_spec.rb +53 -0
  202. data/spec/models/send_smtp_email_spec.rb +12 -0
  203. data/spec/models/task_list_spec.rb +41 -0
  204. data/spec/models/task_spec.rb +0 -66
  205. data/spec/models/task_types_spec.rb +0 -6
  206. data/spec/models/update_email_campaign_recipients_spec.rb +6 -0
  207. data/spec/models/update_email_campaign_spec.rb +12 -0
  208. data/spec/models/upload_image_model_spec.rb +41 -0
  209. metadata +179 -23
  210. data/docs/AttributesApi.md +0 -246
  211. data/docs/CRMApi.md +0 -762
  212. data/docs/Contact.md +0 -15
  213. data/lib/sib-api-v3-sdk/api/attributes_api.rb +0 -274
  214. data/lib/sib-api-v3-sdk/api/crm_api.rb +0 -716
  215. data/lib/sib-api-v3-sdk/api/folders_api.rb +0 -383
  216. data/lib/sib-api-v3-sdk/api/lists_api.rb +0 -562
@@ -14,16 +14,16 @@ require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
16
  class SubAccountsResponseSubAccounts
17
- # client id of sub-account organization
17
+ # id of the sub-account
18
18
  attr_accessor :id
19
19
 
20
- # Name of sub-account organization
20
+ # Name of the sub-account company
21
21
  attr_accessor :company_name
22
22
 
23
- # Whether organization is active or not
23
+ # Whether the sub-account is active or not
24
24
  attr_accessor :active
25
25
 
26
- # timestamp when the organization was created
26
+ # Timestamp when the sub-account was created
27
27
  attr_accessor :created_at
28
28
 
29
29
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -15,8 +15,6 @@ require 'date'
15
15
  module SibApiV3Sdk
16
16
  # Task Details
17
17
  class Task
18
- attr_accessor :first_contact
19
-
20
18
  # Unique task id
21
19
  attr_accessor :id
22
20
 
@@ -29,84 +27,33 @@ module SibApiV3Sdk
29
27
  # Contact ids for contacts linked to this task
30
28
  attr_accessor :contacts_ids
31
29
 
32
- # Contact details for contacts linked to this task
33
- attr_accessor :contacts
34
-
35
30
  # Deal ids for deals a task is linked to
36
31
  attr_accessor :deals_ids
37
32
 
38
33
  # Companies ids for companies a task is linked to
39
34
  attr_accessor :companies_ids
40
35
 
41
- # User id to whom task is assigned
42
- attr_accessor :assign_to_id
43
-
44
- # Task date/time
45
- attr_accessor :date
46
-
47
- # Duration of task
48
- attr_accessor :duration
49
-
50
- # Notes added to a task
51
- attr_accessor :notes
52
-
53
- # Task marked as done
54
- attr_accessor :done
55
-
56
- # Task reminder date/time for a task
57
- attr_accessor :reminder
58
-
59
- # Task created date/time
60
- attr_accessor :created_at
61
-
62
- # Task update date/time
63
- attr_accessor :updated_at
64
-
65
- attr_accessor :refs
66
-
67
36
  # Attribute mapping from ruby-style variable name to JSON key.
68
37
  def self.attribute_map
69
38
  {
70
- :'first_contact' => :'firstContact',
71
39
  :'id' => :'id',
72
40
  :'task_type_id' => :'taskTypeId',
73
41
  :'name' => :'name',
74
42
  :'contacts_ids' => :'contactsIds',
75
- :'contacts' => :'contacts',
76
43
  :'deals_ids' => :'dealsIds',
77
- :'companies_ids' => :'companiesIds',
78
- :'assign_to_id' => :'assignToId',
79
- :'date' => :'date',
80
- :'duration' => :'duration',
81
- :'notes' => :'notes',
82
- :'done' => :'done',
83
- :'reminder' => :'reminder',
84
- :'created_at' => :'createdAt',
85
- :'updated_at' => :'updatedAt',
86
- :'refs' => :'refs'
44
+ :'companies_ids' => :'companiesIds'
87
45
  }
88
46
  end
89
47
 
90
48
  # Attribute type mapping.
91
49
  def self.swagger_types
92
50
  {
93
- :'first_contact' => :'Contact',
94
51
  :'id' => :'String',
95
52
  :'task_type_id' => :'String',
96
53
  :'name' => :'String',
97
54
  :'contacts_ids' => :'Array<Integer>',
98
- :'contacts' => :'Array<Contact>',
99
55
  :'deals_ids' => :'Array<String>',
100
- :'companies_ids' => :'Array<String>',
101
- :'assign_to_id' => :'String',
102
- :'date' => :'DateTime',
103
- :'duration' => :'Integer',
104
- :'notes' => :'String',
105
- :'done' => :'BOOLEAN',
106
- :'reminder' => :'TaskReminder',
107
- :'created_at' => :'DateTime',
108
- :'updated_at' => :'DateTime',
109
- :'refs' => :'Object'
56
+ :'companies_ids' => :'Array<String>'
110
57
  }
111
58
  end
112
59
 
@@ -118,10 +65,6 @@ module SibApiV3Sdk
118
65
  # convert string to symbol for hash key
119
66
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
120
67
 
121
- if attributes.has_key?(:'firstContact')
122
- self.first_contact = attributes[:'firstContact']
123
- end
124
-
125
68
  if attributes.has_key?(:'id')
126
69
  self.id = attributes[:'id']
127
70
  end
@@ -140,12 +83,6 @@ module SibApiV3Sdk
140
83
  end
141
84
  end
142
85
 
143
- if attributes.has_key?(:'contacts')
144
- if (value = attributes[:'contacts']).is_a?(Array)
145
- self.contacts = value
146
- end
147
- end
148
-
149
86
  if attributes.has_key?(:'dealsIds')
150
87
  if (value = attributes[:'dealsIds']).is_a?(Array)
151
88
  self.deals_ids = value
@@ -157,42 +94,6 @@ module SibApiV3Sdk
157
94
  self.companies_ids = value
158
95
  end
159
96
  end
160
-
161
- if attributes.has_key?(:'assignToId')
162
- self.assign_to_id = attributes[:'assignToId']
163
- end
164
-
165
- if attributes.has_key?(:'date')
166
- self.date = attributes[:'date']
167
- end
168
-
169
- if attributes.has_key?(:'duration')
170
- self.duration = attributes[:'duration']
171
- end
172
-
173
- if attributes.has_key?(:'notes')
174
- self.notes = attributes[:'notes']
175
- end
176
-
177
- if attributes.has_key?(:'done')
178
- self.done = attributes[:'done']
179
- end
180
-
181
- if attributes.has_key?(:'reminder')
182
- self.reminder = attributes[:'reminder']
183
- end
184
-
185
- if attributes.has_key?(:'createdAt')
186
- self.created_at = attributes[:'createdAt']
187
- end
188
-
189
- if attributes.has_key?(:'updatedAt')
190
- self.updated_at = attributes[:'updatedAt']
191
- end
192
-
193
- if attributes.has_key?(:'refs')
194
- self.refs = attributes[:'refs']
195
- end
196
97
  end
197
98
 
198
99
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -207,10 +108,6 @@ module SibApiV3Sdk
207
108
  invalid_properties.push('invalid value for "name", name cannot be nil.')
208
109
  end
209
110
 
210
- if @date.nil?
211
- invalid_properties.push('invalid value for "date", date cannot be nil.')
212
- end
213
-
214
111
  invalid_properties
215
112
  end
216
113
 
@@ -219,7 +116,6 @@ module SibApiV3Sdk
219
116
  def valid?
220
117
  return false if @task_type_id.nil?
221
118
  return false if @name.nil?
222
- return false if @date.nil?
223
119
  true
224
120
  end
225
121
 
@@ -228,23 +124,12 @@ module SibApiV3Sdk
228
124
  def ==(o)
229
125
  return true if self.equal?(o)
230
126
  self.class == o.class &&
231
- first_contact == o.first_contact &&
232
127
  id == o.id &&
233
128
  task_type_id == o.task_type_id &&
234
129
  name == o.name &&
235
130
  contacts_ids == o.contacts_ids &&
236
- contacts == o.contacts &&
237
131
  deals_ids == o.deals_ids &&
238
- companies_ids == o.companies_ids &&
239
- assign_to_id == o.assign_to_id &&
240
- date == o.date &&
241
- duration == o.duration &&
242
- notes == o.notes &&
243
- done == o.done &&
244
- reminder == o.reminder &&
245
- created_at == o.created_at &&
246
- updated_at == o.updated_at &&
247
- refs == o.refs
132
+ companies_ids == o.companies_ids
248
133
  end
249
134
 
250
135
  # @see the `==` method
@@ -256,7 +141,7 @@ module SibApiV3Sdk
256
141
  # Calculates hash code according to all attributes.
257
142
  # @return [Fixnum] Hash code
258
143
  def hash
259
- [first_contact, id, task_type_id, name, contacts_ids, contacts, deals_ids, companies_ids, assign_to_id, date, duration, notes, done, reminder, created_at, updated_at, refs].hash
144
+ [id, task_type_id, name, contacts_ids, deals_ids, companies_ids].hash
260
145
  end
261
146
 
262
147
  # Builds the object from hash
@@ -0,0 +1,188 @@
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
+ # List of tasks
17
+ class TaskList
18
+ # List of tasks
19
+ attr_accessor :items
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'items' => :'items'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.swagger_types
30
+ {
31
+ :'items' => :'Array<Task>'
32
+ }
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ return unless attributes.is_a?(Hash)
39
+
40
+ # convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
42
+
43
+ if attributes.has_key?(:'items')
44
+ if (value = attributes[:'items']).is_a?(Array)
45
+ self.items = value
46
+ end
47
+ end
48
+ end
49
+
50
+ # Show invalid properties with the reasons. Usually used together with valid?
51
+ # @return Array for valid properties with the reasons
52
+ def list_invalid_properties
53
+ invalid_properties = Array.new
54
+ invalid_properties
55
+ end
56
+
57
+ # Check to see if the all the properties in the model are valid
58
+ # @return true if the model is valid
59
+ def valid?
60
+ true
61
+ end
62
+
63
+ # Checks equality by comparing each attribute.
64
+ # @param [Object] Object to be compared
65
+ def ==(o)
66
+ return true if self.equal?(o)
67
+ self.class == o.class &&
68
+ items == o.items
69
+ end
70
+
71
+ # @see the `==` method
72
+ # @param [Object] Object to be compared
73
+ def eql?(o)
74
+ self == o
75
+ end
76
+
77
+ # Calculates hash code according to all attributes.
78
+ # @return [Fixnum] Hash code
79
+ def hash
80
+ [items].hash
81
+ end
82
+
83
+ # Builds the object from hash
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ # @return [Object] Returns the model itself
86
+ def build_from_hash(attributes)
87
+ return nil unless attributes.is_a?(Hash)
88
+ self.class.swagger_types.each_pair do |key, type|
89
+ if type =~ /\AArray<(.*)>/i
90
+ # check to ensure the input is an array given that the attribute
91
+ # is documented as an array but the input is not
92
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
93
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
94
+ end
95
+ elsif !attributes[self.class.attribute_map[key]].nil?
96
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
97
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
98
+ end
99
+
100
+ self
101
+ end
102
+
103
+ # Deserializes the data based on type
104
+ # @param string type Data type
105
+ # @param string value Value to be deserialized
106
+ # @return [Object] Deserialized data
107
+ def _deserialize(type, value)
108
+ case type.to_sym
109
+ when :DateTime
110
+ DateTime.parse(value)
111
+ when :Date
112
+ Date.parse(value)
113
+ when :String
114
+ value.to_s
115
+ when :Integer
116
+ value.to_i
117
+ when :Float
118
+ value.to_f
119
+ when :BOOLEAN
120
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
121
+ true
122
+ else
123
+ false
124
+ end
125
+ when :Object
126
+ # generic object (usually a Hash), return directly
127
+ value
128
+ when /\AArray<(?<inner_type>.+)>\z/
129
+ inner_type = Regexp.last_match[:inner_type]
130
+ value.map { |v| _deserialize(inner_type, v) }
131
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
132
+ k_type = Regexp.last_match[:k_type]
133
+ v_type = Regexp.last_match[:v_type]
134
+ {}.tap do |hash|
135
+ value.each do |k, v|
136
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
137
+ end
138
+ end
139
+ else # model
140
+ temp_model = SibApiV3Sdk.const_get(type).new
141
+ temp_model.build_from_hash(value)
142
+ end
143
+ end
144
+
145
+ # Returns the string representation of the object
146
+ # @return [String] String presentation of the object
147
+ def to_s
148
+ to_hash.to_s
149
+ end
150
+
151
+ # to_body is an alias to to_hash (backward compatibility)
152
+ # @return [Hash] Returns the object in the form of hash
153
+ def to_body
154
+ to_hash
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ next if value.nil?
164
+ hash[param] = _to_hash(value)
165
+ end
166
+ hash
167
+ end
168
+
169
+ # Outputs non-array value in the form of hash
170
+ # For object, use to_hash. Otherwise, just return the value
171
+ # @param [Object] value Any valid value
172
+ # @return [Hash] Returns the value in the form of hash
173
+ def _to_hash(value)
174
+ if value.is_a?(Array)
175
+ value.compact.map { |v| _to_hash(v) }
176
+ elsif value.is_a?(Hash)
177
+ {}.tap do |hash|
178
+ value.each { |k, v| hash[k] = _to_hash(v) }
179
+ end
180
+ elsif value.respond_to? :to_hash
181
+ value.to_hash
182
+ else
183
+ value
184
+ end
185
+ end
186
+
187
+ end
188
+ end
@@ -21,7 +21,7 @@ module SibApiV3Sdk
21
21
  # Unit of time before reminder is to be sent
22
22
  attr_accessor :unit
23
23
 
24
- # Type of task reminder
24
+ # Type of task reminder e.g email, push
25
25
  attr_accessor :types
26
26
 
27
27
  class EnumAttributeValidator
@@ -18,9 +18,6 @@ module SibApiV3Sdk
18
18
  # Id of task type
19
19
  attr_accessor :id
20
20
 
21
- # Icon of task type
22
- attr_accessor :icon
23
-
24
21
  # Title of task type
25
22
  attr_accessor :title
26
23
 
@@ -28,7 +25,6 @@ module SibApiV3Sdk
28
25
  def self.attribute_map
29
26
  {
30
27
  :'id' => :'id',
31
- :'icon' => :'icon',
32
28
  :'title' => :'title'
33
29
  }
34
30
  end
@@ -37,7 +33,6 @@ module SibApiV3Sdk
37
33
  def self.swagger_types
38
34
  {
39
35
  :'id' => :'String',
40
- :'icon' => :'String',
41
36
  :'title' => :'String'
42
37
  }
43
38
  end
@@ -54,10 +49,6 @@ module SibApiV3Sdk
54
49
  self.id = attributes[:'id']
55
50
  end
56
51
 
57
- if attributes.has_key?(:'icon')
58
- self.icon = attributes[:'icon']
59
- end
60
-
61
52
  if attributes.has_key?(:'title')
62
53
  self.title = attributes[:'title']
63
54
  end
@@ -82,7 +73,6 @@ module SibApiV3Sdk
82
73
  return true if self.equal?(o)
83
74
  self.class == o.class &&
84
75
  id == o.id &&
85
- icon == o.icon &&
86
76
  title == o.title
87
77
  end
88
78
 
@@ -95,7 +85,7 @@ module SibApiV3Sdk
95
85
  # Calculates hash code according to all attributes.
96
86
  # @return [Fixnum] Hash code
97
87
  def hash
98
- [id, icon, title].hash
88
+ [id, title].hash
99
89
  end
100
90
 
101
91
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
16
  class UpdateContact
17
- # Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}
17
+ # Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}
18
18
  attr_accessor :attributes
19
19
 
20
20
  # Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)
@@ -22,7 +22,7 @@ module SibApiV3Sdk
22
22
  # Name of the campaign
23
23
  attr_accessor :name
24
24
 
25
- # Body of the message (HTML version). REQUIRED if htmlUrl is empty
25
+ # Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl is empty
26
26
  attr_accessor :html_content
27
27
 
28
28
  # Url which contents the body of the email message. REQUIRED if htmlContent is empty
@@ -96,6 +96,12 @@ module SibApiV3Sdk
96
96
  # Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.
97
97
  attr_accessor :increase_rate
98
98
 
99
+ # Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page.
100
+ attr_accessor :unsubscription_page_id
101
+
102
+ # Mandatory if templateId is used containing the {{ update_profile }} tag. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form.
103
+ attr_accessor :update_form_id
104
+
99
105
  class EnumAttributeValidator
100
106
  attr_reader :datatype
101
107
  attr_reader :allowable_values
@@ -148,7 +154,9 @@ module SibApiV3Sdk
148
154
  :'winner_delay' => :'winnerDelay',
149
155
  :'ip_warmup_enable' => :'ipWarmupEnable',
150
156
  :'initial_quota' => :'initialQuota',
151
- :'increase_rate' => :'increaseRate'
157
+ :'increase_rate' => :'increaseRate',
158
+ :'unsubscription_page_id' => :'unsubscriptionPageId',
159
+ :'update_form_id' => :'updateFormId'
152
160
  }
153
161
  end
154
162
 
@@ -182,7 +190,9 @@ module SibApiV3Sdk
182
190
  :'winner_delay' => :'Integer',
183
191
  :'ip_warmup_enable' => :'BOOLEAN',
184
192
  :'initial_quota' => :'Integer',
185
- :'increase_rate' => :'Integer'
193
+ :'increase_rate' => :'Integer',
194
+ :'unsubscription_page_id' => :'String',
195
+ :'update_form_id' => :'String'
186
196
  }
187
197
  end
188
198
 
@@ -313,6 +323,14 @@ module SibApiV3Sdk
313
323
  if attributes.has_key?(:'increaseRate')
314
324
  self.increase_rate = attributes[:'increaseRate']
315
325
  end
326
+
327
+ if attributes.has_key?(:'unsubscriptionPageId')
328
+ self.unsubscription_page_id = attributes[:'unsubscriptionPageId']
329
+ end
330
+
331
+ if attributes.has_key?(:'updateFormId')
332
+ self.update_form_id = attributes[:'updateFormId']
333
+ end
316
334
  end
317
335
 
318
336
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -444,7 +462,9 @@ module SibApiV3Sdk
444
462
  winner_delay == o.winner_delay &&
445
463
  ip_warmup_enable == o.ip_warmup_enable &&
446
464
  initial_quota == o.initial_quota &&
447
- increase_rate == o.increase_rate
465
+ increase_rate == o.increase_rate &&
466
+ unsubscription_page_id == o.unsubscription_page_id &&
467
+ update_form_id == o.update_form_id
448
468
  end
449
469
 
450
470
  # @see the `==` method
@@ -456,7 +476,7 @@ module SibApiV3Sdk
456
476
  # Calculates hash code according to all attributes.
457
477
  # @return [Fixnum] Hash code
458
478
  def hash
459
- [tag, sender, name, html_content, html_url, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, recurring, footer, header, utm_campaign, params, send_at_best_time, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay, ip_warmup_enable, initial_quota, increase_rate].hash
479
+ [tag, sender, name, html_content, html_url, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, recurring, footer, header, utm_campaign, params, send_at_best_time, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay, ip_warmup_enable, initial_quota, increase_rate, unsubscription_page_id, update_form_id].hash
460
480
  end
461
481
 
462
482
  # Builds the object from hash
@@ -13,19 +13,23 @@ Swagger Codegen version: 2.4.19
13
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
- # List ids to include/exclude from campaign
16
+ # Segment ids and List ids to include/exclude from campaign
17
17
  class UpdateEmailCampaignRecipients
18
18
  # List ids which have to be excluded from a campaign
19
19
  attr_accessor :exclusion_list_ids
20
20
 
21
- # Lists Ids to send the campaign to. REQUIRED if already not present in campaign and scheduledAt is not empty
21
+ # Lists Ids to send the campaign to. Campaign should only be updated with listIds if listIds were used to create it. REQUIRED if already not present in campaign and scheduledAt is not empty
22
22
  attr_accessor :list_ids
23
23
 
24
+ # Mandatory if listIds are not used. Campaign should only be updated with segmentIds if segmentIds were used to create it. Segment ids to send the campaign to.
25
+ attr_accessor :segment_ids
26
+
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
25
28
  def self.attribute_map
26
29
  {
27
30
  :'exclusion_list_ids' => :'exclusionListIds',
28
- :'list_ids' => :'listIds'
31
+ :'list_ids' => :'listIds',
32
+ :'segment_ids' => :'segmentIds'
29
33
  }
30
34
  end
31
35
 
@@ -33,7 +37,8 @@ module SibApiV3Sdk
33
37
  def self.swagger_types
34
38
  {
35
39
  :'exclusion_list_ids' => :'Array<Integer>',
36
- :'list_ids' => :'Array<Integer>'
40
+ :'list_ids' => :'Array<Integer>',
41
+ :'segment_ids' => :'Array<Integer>'
37
42
  }
38
43
  end
39
44
 
@@ -56,6 +61,12 @@ module SibApiV3Sdk
56
61
  self.list_ids = value
57
62
  end
58
63
  end
64
+
65
+ if attributes.has_key?(:'segmentIds')
66
+ if (value = attributes[:'segmentIds']).is_a?(Array)
67
+ self.segment_ids = value
68
+ end
69
+ end
59
70
  end
60
71
 
61
72
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -77,7 +88,8 @@ module SibApiV3Sdk
77
88
  return true if self.equal?(o)
78
89
  self.class == o.class &&
79
90
  exclusion_list_ids == o.exclusion_list_ids &&
80
- list_ids == o.list_ids
91
+ list_ids == o.list_ids &&
92
+ segment_ids == o.segment_ids
81
93
  end
82
94
 
83
95
  # @see the `==` method
@@ -89,7 +101,7 @@ module SibApiV3Sdk
89
101
  # Calculates hash code according to all attributes.
90
102
  # @return [Fixnum] Hash code
91
103
  def hash
92
- [exclusion_list_ids, list_ids].hash
104
+ [exclusion_list_ids, list_ids, segment_ids].hash
93
105
  end
94
106
 
95
107
  # Builds the object from hash
@@ -22,7 +22,7 @@ module SibApiV3Sdk
22
22
  # Name of the template
23
23
  attr_accessor :template_name
24
24
 
25
- # Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters)
25
+ # Required if htmlUrl is empty. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters)
26
26
  attr_accessor :html_content
27
27
 
28
28
  # Required if htmlContent is empty. URL to the body of the email (HTML)