sib-api-v3-sdk 8.1.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +82 -14
  3. data/docs/Body.md +2 -11
  4. data/docs/Body1.md +2 -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/ConversationsApi.md +542 -0
  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/CreateSubAccount.md +3 -3
  28. data/docs/CreateSubAccountResponse.md +8 -0
  29. data/docs/Deal.md +11 -0
  30. data/docs/DealAttributes.md +7 -0
  31. data/docs/DealAttributesInner.md +12 -0
  32. data/docs/DealsApi.md +476 -0
  33. data/docs/DealsList.md +8 -0
  34. data/docs/EmailCampaignsApi.md +6 -5
  35. data/docs/FileData.md +3 -6
  36. data/docs/FileDownloadableLink.md +8 -0
  37. data/docs/FileList.md +7 -0
  38. data/docs/FilesApi.md +318 -0
  39. data/docs/GetCampaignStats.md +2 -0
  40. data/docs/GetScheduledEmailByBatchId.md +9 -0
  41. data/docs/GetScheduledEmailByBatchIdBatches.md +10 -0
  42. data/docs/GetScheduledEmailByMessageId.md +10 -0
  43. data/docs/GetSsoToken.md +1 -1
  44. data/docs/InboundParsingApi.md +60 -0
  45. data/docs/InlineResponse200.md +8 -0
  46. data/docs/InlineResponse201.md +8 -0
  47. data/docs/InlineResponse2011.md +8 -0
  48. data/docs/MasterAccountApi.md +6 -6
  49. data/docs/NoteId.md +8 -0
  50. data/docs/NoteList.md +7 -0
  51. data/docs/NotesApi.md +312 -0
  52. data/docs/Pipeline.md +8 -0
  53. data/docs/PipelineStage.md +9 -0
  54. data/docs/ScheduleSmtpEmail.md +10 -0
  55. data/docs/SendSmtpEmail.md +3 -1
  56. data/docs/SubAccountDetailsResponsePlanInfoCredits.md +1 -1
  57. data/docs/SubAccountsResponseSubAccounts.md +4 -4
  58. data/docs/Task.md +0 -11
  59. data/docs/TaskList.md +8 -0
  60. data/docs/TaskReminder.md +1 -1
  61. data/docs/TaskTypes.md +0 -1
  62. data/docs/TasksApi.md +376 -0
  63. data/docs/TransactionalEmailsApi.md +199 -0
  64. data/docs/UpdateContact.md +1 -1
  65. data/docs/UpdateEmailCampaign.md +1 -1
  66. data/docs/UpdateSmtpTemplate.md +1 -1
  67. data/docs/UploadImageModel.md +8 -0
  68. data/lib/sib-api-v3-sdk/api/companies_api.rb +409 -0
  69. data/lib/sib-api-v3-sdk/api/contacts_api.rb +6 -0
  70. data/lib/sib-api-v3-sdk/api/conversations_api.rb +504 -0
  71. data/lib/sib-api-v3-sdk/api/deals_api.rb +454 -0
  72. data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +9 -8
  73. data/lib/sib-api-v3-sdk/api/files_api.rb +313 -0
  74. data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +53 -1
  75. data/lib/sib-api-v3-sdk/api/master_account_api.rb +9 -9
  76. data/lib/sib-api-v3-sdk/api/notes_api.rb +308 -0
  77. data/lib/sib-api-v3-sdk/api/tasks_api.rb +375 -0
  78. data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +195 -0
  79. data/lib/sib-api-v3-sdk/models/body.rb +9 -114
  80. data/lib/sib-api-v3-sdk/models/body_1.rb +9 -119
  81. data/lib/sib-api-v3-sdk/models/body_10.rb +225 -0
  82. data/lib/sib-api-v3-sdk/models/body_11.rb +190 -0
  83. data/lib/sib-api-v3-sdk/models/body_12.rb +215 -0
  84. data/lib/sib-api-v3-sdk/models/body_2.rb +223 -0
  85. data/lib/sib-api-v3-sdk/models/body_3.rb +200 -0
  86. data/lib/sib-api-v3-sdk/models/body_4.rb +195 -0
  87. data/lib/sib-api-v3-sdk/models/body_5.rb +223 -0
  88. data/lib/sib-api-v3-sdk/models/body_6.rb +320 -0
  89. data/lib/sib-api-v3-sdk/models/body_7.rb +281 -0
  90. data/lib/sib-api-v3-sdk/models/body_8.rb +245 -0
  91. data/lib/sib-api-v3-sdk/models/body_9.rb +190 -0
  92. data/lib/sib-api-v3-sdk/models/companies_list.rb +188 -0
  93. data/lib/sib-api-v3-sdk/models/company.rb +220 -0
  94. data/lib/sib-api-v3-sdk/models/company_attributes.rb +176 -0
  95. data/lib/sib-api-v3-sdk/models/company_attributes_inner.rb +223 -0
  96. data/lib/sib-api-v3-sdk/models/conversations_message.rb +324 -0
  97. data/lib/sib-api-v3-sdk/models/conversations_message_file.rb +239 -0
  98. data/lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb +236 -0
  99. data/lib/sib-api-v3-sdk/models/create_contact.rb +1 -1
  100. data/lib/sib-api-v3-sdk/models/create_sub_account.rb +3 -3
  101. data/lib/sib-api-v3-sdk/models/create_sub_account_response.rb +190 -0
  102. data/lib/sib-api-v3-sdk/models/deal.rb +220 -0
  103. data/lib/sib-api-v3-sdk/models/deal_attributes.rb +176 -0
  104. data/lib/sib-api-v3-sdk/models/deal_attributes_inner.rb +223 -0
  105. data/lib/sib-api-v3-sdk/models/deals_list.rb +188 -0
  106. data/lib/sib-api-v3-sdk/models/file_data.rb +22 -54
  107. data/lib/sib-api-v3-sdk/models/file_downloadable_link.rb +190 -0
  108. data/lib/sib-api-v3-sdk/models/file_list.rb +176 -0
  109. data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +21 -1
  110. data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb +196 -0
  111. data/lib/sib-api-v3-sdk/models/{contact.rb → get_scheduled_email_by_batch_id_batches.rb} +62 -74
  112. data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb +254 -0
  113. data/lib/sib-api-v3-sdk/models/get_sso_token.rb +1 -1
  114. data/lib/sib-api-v3-sdk/models/inline_response_200.rb +191 -0
  115. data/lib/sib-api-v3-sdk/models/inline_response_201.rb +191 -0
  116. data/lib/sib-api-v3-sdk/models/inline_response_201_1.rb +191 -0
  117. data/lib/sib-api-v3-sdk/models/note_id.rb +186 -0
  118. data/lib/sib-api-v3-sdk/models/note_list.rb +176 -0
  119. data/lib/sib-api-v3-sdk/models/pipeline.rb +188 -0
  120. data/lib/sib-api-v3-sdk/models/pipeline_stage.rb +196 -0
  121. data/lib/sib-api-v3-sdk/models/schedule_smtp_email.rb +206 -0
  122. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +24 -4
  123. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +2 -2
  124. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +1 -1
  125. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +1 -1
  126. data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +4 -4
  127. data/lib/sib-api-v3-sdk/models/task.rb +4 -119
  128. data/lib/sib-api-v3-sdk/models/task_list.rb +188 -0
  129. data/lib/sib-api-v3-sdk/models/task_reminder.rb +1 -1
  130. data/lib/sib-api-v3-sdk/models/task_types.rb +1 -11
  131. data/lib/sib-api-v3-sdk/models/update_contact.rb +1 -1
  132. data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +1 -1
  133. data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +1 -1
  134. data/lib/sib-api-v3-sdk/models/upload_image_model.rb +190 -0
  135. data/lib/sib-api-v3-sdk/version.rb +1 -1
  136. data/lib/sib-api-v3-sdk.rb +44 -2
  137. data/spec/api/companies_api_spec.rb +119 -0
  138. data/spec/api/contacts_api_spec.rb +2 -0
  139. data/spec/api/conversations_api_spec.rb +140 -0
  140. data/spec/api/deals_api_spec.rb +129 -0
  141. data/spec/api/email_campaigns_api_spec.rb +1 -1
  142. data/spec/api/files_api_spec.rb +99 -0
  143. data/spec/api/inbound_parsing_api_spec.rb +12 -0
  144. data/spec/api/master_account_api_spec.rb +4 -4
  145. data/spec/api/notes_api_spec.rb +97 -0
  146. data/spec/api/{crm_api_spec.rb → tasks_api_spec.rb} +25 -92
  147. data/spec/api/transactional_emails_api_spec.rb +44 -0
  148. data/spec/models/body_10_spec.rb +59 -0
  149. data/spec/models/body_11_spec.rb +41 -0
  150. data/spec/models/body_12_spec.rb +59 -0
  151. data/spec/models/body_1_spec.rb +1 -55
  152. data/spec/models/body_2_spec.rb +59 -0
  153. data/spec/models/body_3_spec.rb +47 -0
  154. data/spec/models/body_4_spec.rb +47 -0
  155. data/spec/models/body_5_spec.rb +59 -0
  156. data/spec/models/body_6_spec.rb +101 -0
  157. data/spec/models/{contact_spec.rb → body_7_spec.rb} +26 -14
  158. data/spec/models/body_8_spec.rb +71 -0
  159. data/spec/models/body_9_spec.rb +41 -0
  160. data/spec/models/body_spec.rb +1 -55
  161. data/spec/models/companies_list_spec.rb +41 -0
  162. data/spec/models/company_attributes_inner_spec.rb +65 -0
  163. data/spec/models/company_attributes_spec.rb +35 -0
  164. data/spec/models/company_spec.rb +59 -0
  165. data/spec/models/conversations_message_file_image_info_spec.rb +53 -0
  166. data/spec/models/conversations_message_file_spec.rb +65 -0
  167. data/spec/models/conversations_message_spec.rb +99 -0
  168. data/spec/models/create_sub_account_response_spec.rb +41 -0
  169. data/spec/models/deal_attributes_inner_spec.rb +65 -0
  170. data/spec/models/deal_attributes_spec.rb +35 -0
  171. data/spec/models/deal_spec.rb +59 -0
  172. data/spec/models/deals_list_spec.rb +41 -0
  173. data/spec/models/file_data_spec.rb +3 -21
  174. data/spec/models/file_downloadable_link_spec.rb +41 -0
  175. data/spec/models/file_list_spec.rb +35 -0
  176. data/spec/models/get_campaign_stats_spec.rb +12 -0
  177. data/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb +57 -0
  178. data/spec/models/get_scheduled_email_by_batch_id_spec.rb +47 -0
  179. data/spec/models/get_scheduled_email_by_message_id_spec.rb +57 -0
  180. data/spec/models/inline_response_200_spec.rb +41 -0
  181. data/spec/models/inline_response_201_1_spec.rb +41 -0
  182. data/spec/models/inline_response_201_spec.rb +41 -0
  183. data/spec/models/note_id_spec.rb +41 -0
  184. data/spec/models/note_list_spec.rb +35 -0
  185. data/spec/models/pipeline_spec.rb +41 -0
  186. data/spec/models/pipeline_stage_spec.rb +47 -0
  187. data/spec/models/schedule_smtp_email_spec.rb +53 -0
  188. data/spec/models/send_smtp_email_spec.rb +12 -0
  189. data/spec/models/task_list_spec.rb +41 -0
  190. data/spec/models/task_spec.rb +0 -66
  191. data/spec/models/task_types_spec.rb +0 -6
  192. data/spec/models/upload_image_model_spec.rb +41 -0
  193. metadata +179 -11
  194. data/docs/CRMApi.md +0 -762
  195. data/docs/Contact.md +0 -15
  196. data/lib/sib-api-v3-sdk/api/crm_api.rb +0 -716
@@ -0,0 +1,196 @@
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 stages
17
+ class PipelineStage
18
+ # Stage id
19
+ attr_accessor :id
20
+
21
+ # Stage name
22
+ attr_accessor :name
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'id' => :'id',
28
+ :'name' => :'name'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'id' => :'String',
36
+ :'name' => :'String'
37
+ }
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
+
48
+ if attributes.has_key?(:'id')
49
+ self.id = attributes[:'id']
50
+ end
51
+
52
+ if attributes.has_key?(:'name')
53
+ self.name = attributes[:'name']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ invalid_properties
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ def valid?
67
+ true
68
+ end
69
+
70
+ # Checks equality by comparing each attribute.
71
+ # @param [Object] Object to be compared
72
+ def ==(o)
73
+ return true if self.equal?(o)
74
+ self.class == o.class &&
75
+ id == o.id &&
76
+ name == o.name
77
+ end
78
+
79
+ # @see the `==` method
80
+ # @param [Object] Object to be compared
81
+ def eql?(o)
82
+ self == o
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Fixnum] Hash code
87
+ def hash
88
+ [id, name].hash
89
+ end
90
+
91
+ # Builds the object from hash
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ # @return [Object] Returns the model itself
94
+ def build_from_hash(attributes)
95
+ return nil unless attributes.is_a?(Hash)
96
+ self.class.swagger_types.each_pair do |key, type|
97
+ if type =~ /\AArray<(.*)>/i
98
+ # check to ensure the input is an array given that the attribute
99
+ # is documented as an array but the input is not
100
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
101
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
102
+ end
103
+ elsif !attributes[self.class.attribute_map[key]].nil?
104
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
105
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
106
+ end
107
+
108
+ self
109
+ end
110
+
111
+ # Deserializes the data based on type
112
+ # @param string type Data type
113
+ # @param string value Value to be deserialized
114
+ # @return [Object] Deserialized data
115
+ def _deserialize(type, value)
116
+ case type.to_sym
117
+ when :DateTime
118
+ DateTime.parse(value)
119
+ when :Date
120
+ Date.parse(value)
121
+ when :String
122
+ value.to_s
123
+ when :Integer
124
+ value.to_i
125
+ when :Float
126
+ value.to_f
127
+ when :BOOLEAN
128
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
129
+ true
130
+ else
131
+ false
132
+ end
133
+ when :Object
134
+ # generic object (usually a Hash), return directly
135
+ value
136
+ when /\AArray<(?<inner_type>.+)>\z/
137
+ inner_type = Regexp.last_match[:inner_type]
138
+ value.map { |v| _deserialize(inner_type, v) }
139
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
140
+ k_type = Regexp.last_match[:k_type]
141
+ v_type = Regexp.last_match[:v_type]
142
+ {}.tap do |hash|
143
+ value.each do |k, v|
144
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
145
+ end
146
+ end
147
+ else # model
148
+ temp_model = SibApiV3Sdk.const_get(type).new
149
+ temp_model.build_from_hash(value)
150
+ end
151
+ end
152
+
153
+ # Returns the string representation of the object
154
+ # @return [String] String presentation of the object
155
+ def to_s
156
+ to_hash.to_s
157
+ end
158
+
159
+ # to_body is an alias to to_hash (backward compatibility)
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_body
162
+ to_hash
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ next if value.nil?
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ hash
175
+ end
176
+
177
+ # Outputs non-array value in the form of hash
178
+ # For object, use to_hash. Otherwise, just return the value
179
+ # @param [Object] value Any valid value
180
+ # @return [Hash] Returns the value in the form of hash
181
+ def _to_hash(value)
182
+ if value.is_a?(Array)
183
+ value.compact.map { |v| _to_hash(v) }
184
+ elsif value.is_a?(Hash)
185
+ {}.tap do |hash|
186
+ value.each { |k, v| hash[k] = _to_hash(v) }
187
+ end
188
+ elsif value.respond_to? :to_hash
189
+ value.to_hash
190
+ else
191
+ value
192
+ end
193
+ end
194
+
195
+ end
196
+ end
@@ -0,0 +1,206 @@
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 ScheduleSmtpEmail
17
+ # Message ID of the transactional email scheduled
18
+ attr_accessor :message_id
19
+
20
+ attr_accessor :message_ids
21
+
22
+ # Batch ID of the batch transactional email scheduled
23
+ attr_accessor :batch_id
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'message_id' => :'messageId',
29
+ :'message_ids' => :'messageIds',
30
+ :'batch_id' => :'batchId'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.swagger_types
36
+ {
37
+ :'message_id' => :'String',
38
+ :'message_ids' => :'Array<String>',
39
+ :'batch_id' => :'String'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
+
51
+ if attributes.has_key?(:'messageId')
52
+ self.message_id = attributes[:'messageId']
53
+ end
54
+
55
+ if attributes.has_key?(:'messageIds')
56
+ if (value = attributes[:'messageIds']).is_a?(Array)
57
+ self.message_ids = value
58
+ end
59
+ end
60
+
61
+ if attributes.has_key?(:'batchId')
62
+ self.batch_id = attributes[:'batchId']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ message_id == o.message_id &&
85
+ message_ids == o.message_ids &&
86
+ batch_id == o.batch_id
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Fixnum] Hash code
97
+ def hash
98
+ [message_id, message_ids, batch_id].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ self.class.swagger_types.each_pair do |key, type|
107
+ if type =~ /\AArray<(.*)>/i
108
+ # check to ensure the input is an array given that the attribute
109
+ # is documented as an array but the input is not
110
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
112
+ end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
116
+ end
117
+
118
+ self
119
+ end
120
+
121
+ # Deserializes the data based on type
122
+ # @param string type Data type
123
+ # @param string value Value to be deserialized
124
+ # @return [Object] Deserialized data
125
+ def _deserialize(type, value)
126
+ case type.to_sym
127
+ when :DateTime
128
+ DateTime.parse(value)
129
+ when :Date
130
+ Date.parse(value)
131
+ when :String
132
+ value.to_s
133
+ when :Integer
134
+ value.to_i
135
+ when :Float
136
+ value.to_f
137
+ when :BOOLEAN
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
+ true
140
+ else
141
+ false
142
+ end
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ else # model
158
+ temp_model = SibApiV3Sdk.const_get(type).new
159
+ temp_model.build_from_hash(value)
160
+ end
161
+ end
162
+
163
+ # Returns the string representation of the object
164
+ # @return [String] String presentation of the object
165
+ def to_s
166
+ to_hash.to_s
167
+ end
168
+
169
+ # to_body is an alias to to_hash (backward compatibility)
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_body
172
+ to_hash
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ next if value.nil?
182
+ hash[param] = _to_hash(value)
183
+ end
184
+ hash
185
+ end
186
+
187
+ # Outputs non-array value in the form of hash
188
+ # For object, use to_hash. Otherwise, just return the value
189
+ # @param [Object] value Any valid value
190
+ # @return [Hash] Returns the value in the form of hash
191
+ def _to_hash(value)
192
+ if value.is_a?(Array)
193
+ value.compact.map { |v| _to_hash(v) }
194
+ elsif value.is_a?(Hash)
195
+ {}.tap do |hash|
196
+ value.each { |k, v| hash[k] = _to_hash(v) }
197
+ end
198
+ elsif value.respond_to? :to_hash
199
+ value.to_hash
200
+ else
201
+ value
202
+ end
203
+ end
204
+
205
+ end
206
+ end
@@ -54,6 +54,12 @@ module SibApiV3Sdk
54
54
  # Tag your emails to find them more easily
55
55
  attr_accessor :tags
56
56
 
57
+ # UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery. **Please note this feature is currently a public beta**.
58
+ attr_accessor :scheduled_at
59
+
60
+ # Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end.
61
+ attr_accessor :batch_id
62
+
57
63
  # Attribute mapping from ruby-style variable name to JSON key.
58
64
  def self.attribute_map
59
65
  {
@@ -70,7 +76,9 @@ module SibApiV3Sdk
70
76
  :'template_id' => :'templateId',
71
77
  :'params' => :'params',
72
78
  :'message_versions' => :'messageVersions',
73
- :'tags' => :'tags'
79
+ :'tags' => :'tags',
80
+ :'scheduled_at' => :'scheduledAt',
81
+ :'batch_id' => :'batchId'
74
82
  }
75
83
  end
76
84
 
@@ -90,7 +98,9 @@ module SibApiV3Sdk
90
98
  :'template_id' => :'Integer',
91
99
  :'params' => :'Object',
92
100
  :'message_versions' => :'Array<SendSmtpEmailMessageVersions>',
93
- :'tags' => :'Array<String>'
101
+ :'tags' => :'Array<String>',
102
+ :'scheduled_at' => :'DateTime',
103
+ :'batch_id' => :'String'
94
104
  }
95
105
  end
96
106
 
@@ -169,6 +179,14 @@ module SibApiV3Sdk
169
179
  self.tags = value
170
180
  end
171
181
  end
182
+
183
+ if attributes.has_key?(:'scheduledAt')
184
+ self.scheduled_at = attributes[:'scheduledAt']
185
+ end
186
+
187
+ if attributes.has_key?(:'batchId')
188
+ self.batch_id = attributes[:'batchId']
189
+ end
172
190
  end
173
191
 
174
192
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -202,7 +220,9 @@ module SibApiV3Sdk
202
220
  template_id == o.template_id &&
203
221
  params == o.params &&
204
222
  message_versions == o.message_versions &&
205
- tags == o.tags
223
+ tags == o.tags &&
224
+ scheduled_at == o.scheduled_at &&
225
+ batch_id == o.batch_id
206
226
  end
207
227
 
208
228
  # @see the `==` method
@@ -214,7 +234,7 @@ module SibApiV3Sdk
214
234
  # Calculates hash code according to all attributes.
215
235
  # @return [Fixnum] Hash code
216
236
  def hash
217
- [sender, to, bcc, cc, html_content, text_content, subject, reply_to, attachment, headers, template_id, params, message_versions, tags].hash
237
+ [sender, to, bcc, cc, html_content, text_content, subject, reply_to, attachment, headers, template_id, params, message_versions, tags, scheduled_at, batch_id].hash
218
238
  end
219
239
 
220
240
  # Builds the object from hash
@@ -13,9 +13,9 @@ Swagger Codegen version: 2.4.19
13
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
- # Sub-account messaging quota details
16
+ # Credits quota and remaining credits on the sub-account
17
17
  class SubAccountDetailsResponsePlanInfoCredits
18
- # Sms quota of the sub-account
18
+ # SMS credits remaining on the sub-account
19
19
  attr_accessor :sms
20
20
 
21
21
  attr_accessor :emails
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.4.19
13
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
- # Email quota details of the sub-account
16
+ # Email credits remaining on the sub-account
17
17
  class SubAccountDetailsResponsePlanInfoCreditsEmails
18
18
  # Quantity of email messaging limits provided
19
19
  attr_accessor :quantity
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.4.19
13
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
- # Sub-account features and addons quota details
16
+ # Features available on the sub-account
17
17
  class SubAccountDetailsResponsePlanInfoFeatures
18
18
  attr_accessor :inbox
19
19
 
@@ -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.