sib-api-v3-sdk 7.5.0 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +59 -4
  3. data/docs/Body.md +18 -0
  4. data/docs/Body1.md +18 -0
  5. data/docs/CRMApi.md +710 -0
  6. data/docs/Contact.md +15 -0
  7. data/docs/ContactsApi.md +61 -2
  8. data/docs/CreateSmsCampaign.md +1 -0
  9. data/docs/CreateSubAccount.md +10 -0
  10. data/docs/CreateWebhook.md +2 -1
  11. data/docs/FileData.md +17 -0
  12. data/docs/GetCampaignStats.md +1 -0
  13. data/docs/GetContactCampaignStats.md +1 -0
  14. data/docs/GetExtendedContactDetailsStatistics.md +1 -0
  15. data/docs/GetExtendedContactDetailsStatisticsDelivered.md +9 -0
  16. data/docs/GetInboundEmailEvents.md +8 -0
  17. data/docs/GetInboundEmailEventsByUuid.md +15 -0
  18. data/docs/GetInboundEmailEventsByUuidAttachments.md +11 -0
  19. data/docs/GetInboundEmailEventsByUuidLogs.md +9 -0
  20. data/docs/GetInboundEmailEventsEvents.md +11 -0
  21. data/docs/InboundParsingApi.md +139 -0
  22. data/docs/MasterAccountApi.md +367 -0
  23. data/docs/MasterDetailsResponse.md +14 -0
  24. data/docs/MasterDetailsResponseBillingInfo.md +11 -0
  25. data/docs/MasterDetailsResponseBillingInfoAddress.md +12 -0
  26. data/docs/MasterDetailsResponseBillingInfoName.md +9 -0
  27. data/docs/MasterDetailsResponsePlanInfo.md +13 -0
  28. data/docs/MasterDetailsResponsePlanInfoFeatures.md +12 -0
  29. data/docs/Note.md +14 -0
  30. data/docs/NoteData.md +10 -0
  31. data/docs/RequestContactExport.md +1 -2
  32. data/docs/SendSmtpEmail.md +3 -3
  33. data/docs/SendTransacSms.md +1 -0
  34. data/docs/SsoTokenRequest.md +9 -0
  35. data/docs/SubAccountDetailsResponse.md +11 -0
  36. data/docs/SubAccountDetailsResponsePlanInfo.md +10 -0
  37. data/docs/SubAccountDetailsResponsePlanInfoCredits.md +9 -0
  38. data/docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md +9 -0
  39. data/docs/SubAccountDetailsResponsePlanInfoFeatures.md +10 -0
  40. data/docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md +9 -0
  41. data/docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md +9 -0
  42. data/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md +9 -0
  43. data/docs/SubAccountUpdatePlanRequest.md +9 -0
  44. data/docs/SubAccountUpdatePlanRequestCredits.md +8 -0
  45. data/docs/SubAccountUpdatePlanRequestFeatures.md +10 -0
  46. data/docs/SubAccountsResponse.md +9 -0
  47. data/docs/SubAccountsResponseSubAccounts.md +11 -0
  48. data/docs/Task.md +24 -0
  49. data/docs/TaskReminder.md +10 -0
  50. data/docs/TransactionalEmailsApi.md +4 -63
  51. data/docs/UpdateBatchContacts.md +8 -0
  52. data/docs/UpdateBatchContactsContacts.md +16 -0
  53. data/docs/UpdateBatchContactsModel.md +9 -0
  54. data/docs/UpdateSmsCampaign.md +1 -0
  55. data/docs/UpdateWebhook.md +2 -1
  56. data/lib/sib-api-v3-sdk/api/contacts_api.rb +55 -2
  57. data/lib/sib-api-v3-sdk/api/crm_api.rb +670 -0
  58. data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +161 -0
  59. data/lib/sib-api-v3-sdk/api/master_account_api.rb +365 -0
  60. data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +4 -60
  61. data/lib/sib-api-v3-sdk/api/webhooks_api.rb +2 -2
  62. data/lib/sib-api-v3-sdk/models/body.rb +305 -0
  63. data/lib/sib-api-v3-sdk/models/body_1.rb +305 -0
  64. data/lib/sib-api-v3-sdk/models/{send_email.rb → contact.rb} +64 -78
  65. data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +16 -4
  66. data/lib/sib-api-v3-sdk/models/create_sub_account.rb +244 -0
  67. data/lib/sib-api-v3-sdk/models/create_webhook.rb +17 -7
  68. data/lib/sib-api-v3-sdk/models/file_data.rb +278 -0
  69. data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +16 -1
  70. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +15 -4
  71. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics.rb +16 -4
  72. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_delivered.rb +205 -0
  73. data/lib/sib-api-v3-sdk/models/{send_template_email.rb → get_inbound_email_events.rb} +10 -14
  74. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid.rb +259 -0
  75. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_attachments.rb +215 -0
  76. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_logs.rb +229 -0
  77. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_events.rb +235 -0
  78. data/lib/sib-api-v3-sdk/models/master_details_response.rb +243 -0
  79. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info.rb +214 -0
  80. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_address.rb +226 -0
  81. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_name.rb +196 -0
  82. data/lib/sib-api-v3-sdk/models/master_details_response_plan_info.rb +272 -0
  83. data/lib/sib-api-v3-sdk/models/{send_email_attachment.rb → master_details_response_plan_info_features.rb} +45 -44
  84. data/lib/sib-api-v3-sdk/models/note.rb +283 -0
  85. data/lib/sib-api-v3-sdk/models/note_data.rb +243 -0
  86. data/lib/sib-api-v3-sdk/models/request_contact_export.rb +6 -11
  87. data/lib/sib-api-v3-sdk/models/request_contact_export_custom_contact_filter.rb +1 -1
  88. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +3 -3
  89. data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +16 -4
  90. data/lib/sib-api-v3-sdk/models/sso_token_request.rb +200 -0
  91. data/lib/sib-api-v3-sdk/models/sub_account_details_response.rb +214 -0
  92. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info.rb +204 -0
  93. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +195 -0
  94. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +196 -0
  95. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +203 -0
  96. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_inbox.rb +196 -0
  97. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_landing_page.rb +196 -0
  98. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_users.rb +196 -0
  99. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request.rb +194 -0
  100. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_credits.rb +186 -0
  101. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_features.rb +206 -0
  102. data/lib/sib-api-v3-sdk/models/sub_accounts_response.rb +196 -0
  103. data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +235 -0
  104. data/lib/sib-api-v3-sdk/models/task.rb +367 -0
  105. data/lib/sib-api-v3-sdk/models/task_reminder.rb +257 -0
  106. data/lib/sib-api-v3-sdk/models/update_batch_contacts.rb +187 -0
  107. data/lib/sib-api-v3-sdk/models/update_batch_contacts_contacts.rb +273 -0
  108. data/lib/sib-api-v3-sdk/models/update_batch_contacts_model.rb +197 -0
  109. data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +16 -4
  110. data/lib/sib-api-v3-sdk/models/update_webhook.rb +15 -5
  111. data/lib/sib-api-v3-sdk/version.rb +1 -1
  112. data/lib/sib-api-v3-sdk.rb +41 -3
  113. data/sib-api-v3-sdk.gemspec +2 -1
  114. data/spec/api/contacts_api_spec.rb +13 -1
  115. data/spec/api/crm_api_spec.rb +170 -0
  116. data/spec/api/inbound_parsing_api_spec.rb +64 -0
  117. data/spec/api/master_account_api_spec.rb +108 -0
  118. data/spec/api/transactional_emails_api_spec.rb +2 -13
  119. data/spec/models/body_1_spec.rb +101 -0
  120. data/spec/models/body_spec.rb +101 -0
  121. data/spec/models/contact_spec.rb +83 -0
  122. data/spec/models/create_sms_campaign_spec.rb +6 -0
  123. data/spec/models/create_sub_account_spec.rb +57 -0
  124. data/spec/models/create_webhook_spec.rb +8 -2
  125. data/spec/models/file_data_spec.rb +95 -0
  126. data/spec/models/get_campaign_stats_spec.rb +6 -0
  127. data/spec/models/get_contact_campaign_stats_spec.rb +6 -0
  128. data/spec/models/get_extended_contact_details_statistics_delivered_spec.rb +47 -0
  129. data/spec/models/get_extended_contact_details_statistics_spec.rb +6 -0
  130. data/spec/models/get_inbound_email_events_by_uuid_attachments_spec.rb +59 -0
  131. data/spec/models/get_inbound_email_events_by_uuid_logs_spec.rb +51 -0
  132. data/spec/models/get_inbound_email_events_by_uuid_spec.rb +83 -0
  133. data/spec/models/get_inbound_email_events_events_spec.rb +59 -0
  134. data/spec/models/get_inbound_email_events_spec.rb +41 -0
  135. data/spec/models/master_details_response_billing_info_address_spec.rb +65 -0
  136. data/spec/models/master_details_response_billing_info_name_spec.rb +47 -0
  137. data/spec/models/master_details_response_billing_info_spec.rb +59 -0
  138. data/spec/models/master_details_response_plan_info_features_spec.rb +65 -0
  139. data/spec/models/master_details_response_plan_info_spec.rb +75 -0
  140. data/spec/models/master_details_response_spec.rb +77 -0
  141. data/spec/models/note_data_spec.rb +53 -0
  142. data/spec/models/note_spec.rb +77 -0
  143. data/spec/models/request_contact_export_spec.rb +0 -6
  144. data/spec/models/send_transac_sms_spec.rb +6 -0
  145. data/spec/models/{send_email_attachment_spec.rb → sso_token_request_spec.rb} +8 -8
  146. data/spec/models/sub_account_details_response_plan_info_credits_emails_spec.rb +47 -0
  147. data/spec/models/sub_account_details_response_plan_info_credits_spec.rb +47 -0
  148. data/spec/models/sub_account_details_response_plan_info_features_inbox_spec.rb +47 -0
  149. data/spec/models/sub_account_details_response_plan_info_features_landing_page_spec.rb +47 -0
  150. data/spec/models/sub_account_details_response_plan_info_features_spec.rb +53 -0
  151. data/spec/models/sub_account_details_response_plan_info_features_users_spec.rb +47 -0
  152. data/spec/models/sub_account_details_response_plan_info_spec.rb +53 -0
  153. data/spec/models/sub_account_details_response_spec.rb +59 -0
  154. data/spec/models/sub_account_update_plan_request_credits_spec.rb +41 -0
  155. data/spec/models/sub_account_update_plan_request_features_spec.rb +53 -0
  156. data/spec/models/sub_account_update_plan_request_spec.rb +47 -0
  157. data/spec/models/sub_accounts_response_spec.rb +47 -0
  158. data/spec/models/sub_accounts_response_sub_accounts_spec.rb +59 -0
  159. data/spec/models/task_reminder_spec.rb +57 -0
  160. data/spec/models/task_spec.rb +137 -0
  161. data/spec/models/{send_email_spec.rb → update_batch_contacts_contacts_spec.rb} +15 -15
  162. data/spec/models/update_batch_contacts_model_spec.rb +47 -0
  163. data/spec/models/{send_template_email_spec.rb → update_batch_contacts_spec.rb} +7 -7
  164. data/spec/models/update_sms_campaign_spec.rb +6 -0
  165. data/spec/models/update_webhook_spec.rb +7 -1
  166. metadata +186 -14
  167. data/docs/SendEmail.md +0 -16
  168. data/docs/SendEmailAttachment.md +0 -9
  169. data/docs/SendTemplateEmail.md +0 -8
@@ -13,61 +13,57 @@ Swagger Codegen version: 2.4.19
13
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
- class SendEmail
17
- # List of the email addresses of the recipients. For example, ['abc@example.com', 'asd@example.com'].
18
- attr_accessor :email_to
16
+ # Contact Details
17
+ class Contact
18
+ # Next incomplete task of contact
19
+ attr_accessor :virtual_next_task
19
20
 
20
- # List of the email addresses of the recipients in bcc
21
- attr_accessor :email_bcc
21
+ # Contact email
22
+ attr_accessor :email
22
23
 
23
- # List of the email addresses of the recipients in cc
24
- attr_accessor :email_cc
24
+ # User id to whom contact is assigned
25
+ attr_accessor :assign_to_id
25
26
 
26
- # Email address which shall be used by campaign recipients to reply back
27
- attr_accessor :reply_to
27
+ # Contact id
28
+ attr_accessor :contacts_id
28
29
 
29
- # Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps
30
- attr_accessor :attachment_url
30
+ # CRM lists in which contact is added
31
+ attr_accessor :crm_lists
31
32
 
32
- # Pass the list of content (base64 encoded) and name of the attachment. For example, [{\"content\":\"base64 encoded content 1\", \"name\":\"attcahment1\"}, {\"content\":\"base64 encoded content 2\", \"name\":\"attcahment2\"}].
33
- attr_accessor :attachment
34
-
35
- # Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, {\"Content-Type\":\"text/html\", \"charset\":\"iso-8859-1\", \"sender.ip\":\"1.2.3.4\"}
36
- attr_accessor :headers
37
-
38
- # Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}
33
+ # Contact attributes e.g firstname / lastname / SMS etc.
39
34
  attr_accessor :attributes
40
35
 
41
- # Tag your emails to find them more easily
42
- attr_accessor :tags
36
+ # Contact created date/time
37
+ attr_accessor :created_at
38
+
39
+ # Contact updated date/time
40
+ attr_accessor :updated_at
43
41
 
44
42
  # Attribute mapping from ruby-style variable name to JSON key.
45
43
  def self.attribute_map
46
44
  {
47
- :'email_to' => :'emailTo',
48
- :'email_bcc' => :'emailBcc',
49
- :'email_cc' => :'emailCc',
50
- :'reply_to' => :'replyTo',
51
- :'attachment_url' => :'attachmentUrl',
52
- :'attachment' => :'attachment',
53
- :'headers' => :'headers',
45
+ :'virtual_next_task' => :'virtualNextTask',
46
+ :'email' => :'email',
47
+ :'assign_to_id' => :'assignToId',
48
+ :'contacts_id' => :'contactsId',
49
+ :'crm_lists' => :'crmLists',
54
50
  :'attributes' => :'attributes',
55
- :'tags' => :'tags'
51
+ :'created_at' => :'createdAt',
52
+ :'updated_at' => :'updatedAt'
56
53
  }
57
54
  end
58
55
 
59
56
  # Attribute type mapping.
60
57
  def self.swagger_types
61
58
  {
62
- :'email_to' => :'Array<String>',
63
- :'email_bcc' => :'Array<String>',
64
- :'email_cc' => :'Array<String>',
65
- :'reply_to' => :'String',
66
- :'attachment_url' => :'String',
67
- :'attachment' => :'Array<SendEmailAttachment>',
68
- :'headers' => :'Object',
59
+ :'virtual_next_task' => :'Object',
60
+ :'email' => :'String',
61
+ :'assign_to_id' => :'String',
62
+ :'contacts_id' => :'Integer',
63
+ :'crm_lists' => :'Object',
69
64
  :'attributes' => :'Object',
70
- :'tags' => :'Array<String>'
65
+ :'created_at' => :'DateTime',
66
+ :'updated_at' => :'DateTime'
71
67
  }
72
68
  end
73
69
 
@@ -79,50 +75,36 @@ module SibApiV3Sdk
79
75
  # convert string to symbol for hash key
80
76
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
81
77
 
82
- if attributes.has_key?(:'emailTo')
83
- if (value = attributes[:'emailTo']).is_a?(Array)
84
- self.email_to = value
85
- end
86
- end
87
-
88
- if attributes.has_key?(:'emailBcc')
89
- if (value = attributes[:'emailBcc']).is_a?(Array)
90
- self.email_bcc = value
91
- end
92
- end
93
-
94
- if attributes.has_key?(:'emailCc')
95
- if (value = attributes[:'emailCc']).is_a?(Array)
96
- self.email_cc = value
97
- end
78
+ if attributes.has_key?(:'virtualNextTask')
79
+ self.virtual_next_task = attributes[:'virtualNextTask']
98
80
  end
99
81
 
100
- if attributes.has_key?(:'replyTo')
101
- self.reply_to = attributes[:'replyTo']
82
+ if attributes.has_key?(:'email')
83
+ self.email = attributes[:'email']
102
84
  end
103
85
 
104
- if attributes.has_key?(:'attachmentUrl')
105
- self.attachment_url = attributes[:'attachmentUrl']
86
+ if attributes.has_key?(:'assignToId')
87
+ self.assign_to_id = attributes[:'assignToId']
106
88
  end
107
89
 
108
- if attributes.has_key?(:'attachment')
109
- if (value = attributes[:'attachment']).is_a?(Array)
110
- self.attachment = value
111
- end
90
+ if attributes.has_key?(:'contactsId')
91
+ self.contacts_id = attributes[:'contactsId']
112
92
  end
113
93
 
114
- if attributes.has_key?(:'headers')
115
- self.headers = attributes[:'headers']
94
+ if attributes.has_key?(:'crmLists')
95
+ self.crm_lists = attributes[:'crmLists']
116
96
  end
117
97
 
118
98
  if attributes.has_key?(:'attributes')
119
99
  self.attributes = attributes[:'attributes']
120
100
  end
121
101
 
122
- if attributes.has_key?(:'tags')
123
- if (value = attributes[:'tags']).is_a?(Array)
124
- self.tags = value
125
- end
102
+ if attributes.has_key?(:'createdAt')
103
+ self.created_at = attributes[:'createdAt']
104
+ end
105
+
106
+ if attributes.has_key?(:'updatedAt')
107
+ self.updated_at = attributes[:'updatedAt']
126
108
  end
127
109
  end
128
110
 
@@ -130,8 +112,12 @@ module SibApiV3Sdk
130
112
  # @return Array for valid properties with the reasons
131
113
  def list_invalid_properties
132
114
  invalid_properties = Array.new
133
- if @email_to.nil?
134
- invalid_properties.push('invalid value for "email_to", email_to cannot be nil.')
115
+ if @email.nil?
116
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
117
+ end
118
+
119
+ if @crm_lists.nil?
120
+ invalid_properties.push('invalid value for "crm_lists", crm_lists cannot be nil.')
135
121
  end
136
122
 
137
123
  invalid_properties
@@ -140,7 +126,8 @@ module SibApiV3Sdk
140
126
  # Check to see if the all the properties in the model are valid
141
127
  # @return true if the model is valid
142
128
  def valid?
143
- return false if @email_to.nil?
129
+ return false if @email.nil?
130
+ return false if @crm_lists.nil?
144
131
  true
145
132
  end
146
133
 
@@ -149,15 +136,14 @@ module SibApiV3Sdk
149
136
  def ==(o)
150
137
  return true if self.equal?(o)
151
138
  self.class == o.class &&
152
- email_to == o.email_to &&
153
- email_bcc == o.email_bcc &&
154
- email_cc == o.email_cc &&
155
- reply_to == o.reply_to &&
156
- attachment_url == o.attachment_url &&
157
- attachment == o.attachment &&
158
- headers == o.headers &&
139
+ virtual_next_task == o.virtual_next_task &&
140
+ email == o.email &&
141
+ assign_to_id == o.assign_to_id &&
142
+ contacts_id == o.contacts_id &&
143
+ crm_lists == o.crm_lists &&
159
144
  attributes == o.attributes &&
160
- tags == o.tags
145
+ created_at == o.created_at &&
146
+ updated_at == o.updated_at
161
147
  end
162
148
 
163
149
  # @see the `==` method
@@ -169,7 +155,7 @@ module SibApiV3Sdk
169
155
  # Calculates hash code according to all attributes.
170
156
  # @return [Fixnum] Hash code
171
157
  def hash
172
- [email_to, email_bcc, email_cc, reply_to, attachment_url, attachment, headers, attributes, tags].hash
158
+ [virtual_next_task, email, assign_to_id, contacts_id, crm_lists, attributes, created_at, updated_at].hash
173
159
  end
174
160
 
175
161
  # Builds the object from hash
@@ -28,6 +28,9 @@ module SibApiV3Sdk
28
28
  # UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
29
29
  attr_accessor :scheduled_at
30
30
 
31
+ # Format of the message. It indicates whether the content should be treated as unicode or not.
32
+ attr_accessor :unicode_enabled
33
+
31
34
  # Attribute mapping from ruby-style variable name to JSON key.
32
35
  def self.attribute_map
33
36
  {
@@ -35,7 +38,8 @@ module SibApiV3Sdk
35
38
  :'sender' => :'sender',
36
39
  :'content' => :'content',
37
40
  :'recipients' => :'recipients',
38
- :'scheduled_at' => :'scheduledAt'
41
+ :'scheduled_at' => :'scheduledAt',
42
+ :'unicode_enabled' => :'unicodeEnabled'
39
43
  }
40
44
  end
41
45
 
@@ -46,7 +50,8 @@ module SibApiV3Sdk
46
50
  :'sender' => :'String',
47
51
  :'content' => :'String',
48
52
  :'recipients' => :'CreateSmsCampaignRecipients',
49
- :'scheduled_at' => :'String'
53
+ :'scheduled_at' => :'String',
54
+ :'unicode_enabled' => :'BOOLEAN'
50
55
  }
51
56
  end
52
57
 
@@ -77,6 +82,12 @@ module SibApiV3Sdk
77
82
  if attributes.has_key?(:'scheduledAt')
78
83
  self.scheduled_at = attributes[:'scheduledAt']
79
84
  end
85
+
86
+ if attributes.has_key?(:'unicodeEnabled')
87
+ self.unicode_enabled = attributes[:'unicodeEnabled']
88
+ else
89
+ self.unicode_enabled = false
90
+ end
80
91
  end
81
92
 
82
93
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -135,7 +146,8 @@ module SibApiV3Sdk
135
146
  sender == o.sender &&
136
147
  content == o.content &&
137
148
  recipients == o.recipients &&
138
- scheduled_at == o.scheduled_at
149
+ scheduled_at == o.scheduled_at &&
150
+ unicode_enabled == o.unicode_enabled
139
151
  end
140
152
 
141
153
  # @see the `==` method
@@ -147,7 +159,7 @@ module SibApiV3Sdk
147
159
  # Calculates hash code according to all attributes.
148
160
  # @return [Fixnum] Hash code
149
161
  def hash
150
- [name, sender, content, recipients, scheduled_at].hash
162
+ [name, sender, content, recipients, scheduled_at, unicode_enabled].hash
151
163
  end
152
164
 
153
165
  # Builds the object from hash
@@ -0,0 +1,244 @@
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 CreateSubAccount
17
+ # Name of the organization
18
+ attr_accessor :company_name
19
+
20
+ # Language for identifying localization information
21
+ attr_accessor :language
22
+
23
+ # Request timezone of the client
24
+ attr_accessor :timezone
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'company_name' => :'companyName',
52
+ :'language' => :'language',
53
+ :'timezone' => :'timezone'
54
+ }
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.swagger_types
59
+ {
60
+ :'company_name' => :'String',
61
+ :'language' => :'String',
62
+ :'timezone' => :'String'
63
+ }
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ return unless attributes.is_a?(Hash)
70
+
71
+ # convert string to symbol for hash key
72
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
73
+
74
+ if attributes.has_key?(:'companyName')
75
+ self.company_name = attributes[:'companyName']
76
+ end
77
+
78
+ if attributes.has_key?(:'language')
79
+ self.language = attributes[:'language']
80
+ end
81
+
82
+ if attributes.has_key?(:'timezone')
83
+ self.timezone = attributes[:'timezone']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ invalid_properties = Array.new
91
+ if @company_name.nil?
92
+ invalid_properties.push('invalid value for "company_name", company_name cannot be nil.')
93
+ end
94
+
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ return false if @company_name.nil?
102
+ language_validator = EnumAttributeValidator.new('String', ['en', 'fr', 'it', 'es', 'pt', 'de'])
103
+ return false unless language_validator.valid?(@language)
104
+ true
105
+ end
106
+
107
+ # Custom attribute writer method checking allowed values (enum).
108
+ # @param [Object] language Object to be assigned
109
+ def language=(language)
110
+ validator = EnumAttributeValidator.new('String', ['en', 'fr', 'it', 'es', 'pt', 'de'])
111
+ unless validator.valid?(language)
112
+ fail ArgumentError, 'invalid value for "language", must be one of #{validator.allowable_values}.'
113
+ end
114
+ @language = language
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ company_name == o.company_name &&
123
+ language == o.language &&
124
+ timezone == o.timezone
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Fixnum] Hash code
135
+ def hash
136
+ [company_name, language, timezone].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ self.class.swagger_types.each_pair do |key, type|
145
+ if type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
149
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
150
+ end
151
+ elsif !attributes[self.class.attribute_map[key]].nil?
152
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
154
+ end
155
+
156
+ self
157
+ end
158
+
159
+ # Deserializes the data based on type
160
+ # @param string type Data type
161
+ # @param string value Value to be deserialized
162
+ # @return [Object] Deserialized data
163
+ def _deserialize(type, value)
164
+ case type.to_sym
165
+ when :DateTime
166
+ DateTime.parse(value)
167
+ when :Date
168
+ Date.parse(value)
169
+ when :String
170
+ value.to_s
171
+ when :Integer
172
+ value.to_i
173
+ when :Float
174
+ value.to_f
175
+ when :BOOLEAN
176
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
177
+ true
178
+ else
179
+ false
180
+ end
181
+ when :Object
182
+ # generic object (usually a Hash), return directly
183
+ value
184
+ when /\AArray<(?<inner_type>.+)>\z/
185
+ inner_type = Regexp.last_match[:inner_type]
186
+ value.map { |v| _deserialize(inner_type, v) }
187
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
188
+ k_type = Regexp.last_match[:k_type]
189
+ v_type = Regexp.last_match[:v_type]
190
+ {}.tap do |hash|
191
+ value.each do |k, v|
192
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
+ end
194
+ end
195
+ else # model
196
+ temp_model = SibApiV3Sdk.const_get(type).new
197
+ temp_model.build_from_hash(value)
198
+ end
199
+ end
200
+
201
+ # Returns the string representation of the object
202
+ # @return [String] String presentation of the object
203
+ def to_s
204
+ to_hash.to_s
205
+ end
206
+
207
+ # to_body is an alias to to_hash (backward compatibility)
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_body
210
+ to_hash
211
+ end
212
+
213
+ # Returns the object in the form of hash
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_hash
216
+ hash = {}
217
+ self.class.attribute_map.each_pair do |attr, param|
218
+ value = self.send(attr)
219
+ next if value.nil?
220
+ hash[param] = _to_hash(value)
221
+ end
222
+ hash
223
+ end
224
+
225
+ # Outputs non-array value in the form of hash
226
+ # For object, use to_hash. Otherwise, just return the value
227
+ # @param [Object] value Any valid value
228
+ # @return [Hash] Returns the value in the form of hash
229
+ def _to_hash(value)
230
+ if value.is_a?(Array)
231
+ value.compact.map { |v| _to_hash(v) }
232
+ elsif value.is_a?(Hash)
233
+ {}.tap do |hash|
234
+ value.each { |k, v| hash[k] = _to_hash(v) }
235
+ end
236
+ elsif value.respond_to? :to_hash
237
+ value.to_hash
238
+ else
239
+ value
240
+ end
241
+ end
242
+
243
+ end
244
+ end
@@ -20,12 +20,15 @@ module SibApiV3Sdk
20
20
  # Description of the webhook
21
21
  attr_accessor :description
22
22
 
23
- # Events triggering the webhook. Possible values for Transactional type webhook `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` and possible values for Marketing type webhook `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered`
23
+ # - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed`
24
24
  attr_accessor :events
25
25
 
26
26
  # Type of the webhook
27
27
  attr_accessor :type
28
28
 
29
+ # Inbound domain of webhook, required in case of event type `inbound`
30
+ attr_accessor :domain
31
+
29
32
  class EnumAttributeValidator
30
33
  attr_reader :datatype
31
34
  attr_reader :allowable_values
@@ -54,7 +57,8 @@ module SibApiV3Sdk
54
57
  :'url' => :'url',
55
58
  :'description' => :'description',
56
59
  :'events' => :'events',
57
- :'type' => :'type'
60
+ :'type' => :'type',
61
+ :'domain' => :'domain'
58
62
  }
59
63
  end
60
64
 
@@ -64,7 +68,8 @@ module SibApiV3Sdk
64
68
  :'url' => :'String',
65
69
  :'description' => :'String',
66
70
  :'events' => :'Array<String>',
67
- :'type' => :'String'
71
+ :'type' => :'String',
72
+ :'domain' => :'String'
68
73
  }
69
74
  end
70
75
 
@@ -95,6 +100,10 @@ module SibApiV3Sdk
95
100
  else
96
101
  self.type = 'transactional'
97
102
  end
103
+
104
+ if attributes.has_key?(:'domain')
105
+ self.domain = attributes[:'domain']
106
+ end
98
107
  end
99
108
 
100
109
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -117,7 +126,7 @@ module SibApiV3Sdk
117
126
  def valid?
118
127
  return false if @url.nil?
119
128
  return false if @events.nil?
120
- type_validator = EnumAttributeValidator.new('String', ['transactional', 'marketing'])
129
+ type_validator = EnumAttributeValidator.new('String', ['transactional', 'marketing', 'inbound'])
121
130
  return false unless type_validator.valid?(@type)
122
131
  true
123
132
  end
@@ -125,7 +134,7 @@ module SibApiV3Sdk
125
134
  # Custom attribute writer method checking allowed values (enum).
126
135
  # @param [Object] type Object to be assigned
127
136
  def type=(type)
128
- validator = EnumAttributeValidator.new('String', ['transactional', 'marketing'])
137
+ validator = EnumAttributeValidator.new('String', ['transactional', 'marketing', 'inbound'])
129
138
  unless validator.valid?(type)
130
139
  fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
131
140
  end
@@ -140,7 +149,8 @@ module SibApiV3Sdk
140
149
  url == o.url &&
141
150
  description == o.description &&
142
151
  events == o.events &&
143
- type == o.type
152
+ type == o.type &&
153
+ domain == o.domain
144
154
  end
145
155
 
146
156
  # @see the `==` method
@@ -152,7 +162,7 @@ module SibApiV3Sdk
152
162
  # Calculates hash code according to all attributes.
153
163
  # @return [Fixnum] Hash code
154
164
  def hash
155
- [url, description, events, type].hash
165
+ [url, description, events, type, domain].hash
156
166
  end
157
167
 
158
168
  # Builds the object from hash