sib-api-v3-sdk 5.3.0 → 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +66 -62
  3. data/docs/AccountApi.md +3 -3
  4. data/docs/AddContactToList.md +1 -1
  5. data/docs/AttributesApi.md +12 -12
  6. data/docs/ContactsApi.md +110 -47
  7. data/docs/CreateAttribute.md +1 -1
  8. data/docs/CreateContact.md +2 -2
  9. data/docs/CreateDoiContact.md +13 -0
  10. data/docs/CreateEmailCampaign.md +1 -1
  11. data/docs/EmailCampaignsApi.md +78 -21
  12. data/docs/FoldersApi.md +12 -12
  13. data/docs/GetEmailCampaign.md +1 -0
  14. data/docs/GetExtendedCampaignOverview.md +1 -0
  15. data/docs/GetTransacBlockedContactsContacts.md +1 -1
  16. data/docs/GetTransacEmailsListTransactionalEmails.md +2 -0
  17. data/docs/ListsApi.md +12 -12
  18. data/docs/RemainingCreditModelChild.md +2 -2
  19. data/docs/RemainingCreditModelReseller.md +2 -2
  20. data/docs/RemoveContactFromList.md +1 -1
  21. data/docs/RequestContactExport.md +1 -1
  22. data/docs/RequestContactImport.md +1 -1
  23. data/docs/ResellerApi.md +30 -30
  24. data/docs/SMSCampaignsApi.md +21 -21
  25. data/docs/SMTPApi.md +17 -17
  26. data/docs/SendEmail.md +3 -3
  27. data/docs/SendSmtpEmail.md +3 -3
  28. data/docs/SendersApi.md +6 -6
  29. data/docs/TransactionalSMSApi.md +6 -6
  30. data/docs/UpdateAttribute.md +1 -1
  31. data/docs/UpdateContact.md +1 -1
  32. data/docs/UpdateEmailCampaign.md +1 -1
  33. data/docs/UploadImageToGallery.md +9 -0
  34. data/lib/sib-api-v3-sdk.rb +2 -0
  35. data/lib/sib-api-v3-sdk/api/account_api.rb +2 -2
  36. data/lib/sib-api-v3-sdk/api/attributes_api.rb +8 -8
  37. data/lib/sib-api-v3-sdk/api/contacts_api.rb +87 -30
  38. data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +65 -14
  39. data/lib/sib-api-v3-sdk/api/folders_api.rb +8 -8
  40. data/lib/sib-api-v3-sdk/api/lists_api.rb +8 -8
  41. data/lib/sib-api-v3-sdk/api/reseller_api.rb +20 -20
  42. data/lib/sib-api-v3-sdk/api/senders_api.rb +4 -4
  43. data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +14 -14
  44. data/lib/sib-api-v3-sdk/api/smtp_api.rb +12 -12
  45. data/lib/sib-api-v3-sdk/api/transactional_sms_api.rb +4 -4
  46. data/lib/sib-api-v3-sdk/models/add_contact_to_list.rb +1 -1
  47. data/lib/sib-api-v3-sdk/models/create_attribute.rb +1 -1
  48. data/lib/sib-api-v3-sdk/models/create_contact.rb +2 -2
  49. data/lib/sib-api-v3-sdk/models/create_doi_contact.rb +253 -0
  50. data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +1 -1
  51. data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +11 -1
  52. data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +14 -4
  53. data/lib/sib-api-v3-sdk/models/get_transac_blocked_contacts_contacts.rb +1 -1
  54. data/lib/sib-api-v3-sdk/models/get_transac_emails_list_transactional_emails.rb +26 -4
  55. data/lib/sib-api-v3-sdk/models/remaining_credit_model_child.rb +2 -2
  56. data/lib/sib-api-v3-sdk/models/remaining_credit_model_reseller.rb +2 -2
  57. data/lib/sib-api-v3-sdk/models/remove_contact_from_list.rb +1 -1
  58. data/lib/sib-api-v3-sdk/models/request_contact_export.rb +1 -1
  59. data/lib/sib-api-v3-sdk/models/request_contact_import.rb +1 -1
  60. data/lib/sib-api-v3-sdk/models/send_email.rb +3 -3
  61. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +3 -3
  62. data/lib/sib-api-v3-sdk/models/send_smtp_email_reply_to.rb +1 -1
  63. data/lib/sib-api-v3-sdk/models/send_smtp_email_sender.rb +1 -1
  64. data/lib/sib-api-v3-sdk/models/update_attribute.rb +1 -1
  65. data/lib/sib-api-v3-sdk/models/update_contact.rb +1 -1
  66. data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +1 -1
  67. data/lib/sib-api-v3-sdk/models/upload_image_to_gallery.rb +199 -0
  68. data/lib/sib-api-v3-sdk/version.rb +1 -1
  69. data/sib-api-v3-sdk.gemspec +5 -5
  70. data/spec/api/account_api_spec.rb +1 -1
  71. data/spec/api/attributes_api_spec.rb +4 -4
  72. data/spec/api/contacts_api_spec.rb +28 -15
  73. data/spec/api/email_campaigns_api_spec.rb +18 -7
  74. data/spec/api/folders_api_spec.rb +4 -4
  75. data/spec/api/lists_api_spec.rb +4 -4
  76. data/spec/api/reseller_api_spec.rb +10 -10
  77. data/spec/api/senders_api_spec.rb +2 -2
  78. data/spec/api/sms_campaigns_api_spec.rb +7 -7
  79. data/spec/api/smtp_api_spec.rb +6 -6
  80. data/spec/api/transactional_sms_api_spec.rb +2 -2
  81. data/spec/models/create_doi_contact_spec.rb +71 -0
  82. data/spec/models/get_email_campaign_spec.rb +6 -0
  83. data/spec/models/get_extended_campaign_overview_spec.rb +6 -0
  84. data/spec/models/get_transac_emails_list_transactional_emails_spec.rb +12 -0
  85. data/spec/models/upload_image_to_gallery_spec.rb +47 -0
  86. metadata +10 -2
@@ -63,7 +63,7 @@ module SibApiV3Sdk
63
63
  # Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed
64
64
  attr_accessor :utm_campaign
65
65
 
66
- # Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'
66
+ # Pass the set of attributes to customize the type classic campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'
67
67
  attr_accessor :params
68
68
 
69
69
  # Set this to true if you want to send your campaign at best time.
@@ -97,6 +97,9 @@ module SibApiV3Sdk
97
97
  # Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'
98
98
  attr_accessor :sent_date
99
99
 
100
+ # Total number of non-delivered campaigns for a particular campaign id.
101
+ attr_accessor :return_bounce
102
+
100
103
  attr_accessor :recipients
101
104
 
102
105
  attr_accessor :statistics
@@ -154,6 +157,7 @@ module SibApiV3Sdk
154
157
  :'mirror_active' => :'mirrorActive',
155
158
  :'recurring' => :'recurring',
156
159
  :'sent_date' => :'sentDate',
160
+ :'return_bounce' => :'returnBounce',
157
161
  :'recipients' => :'recipients',
158
162
  :'statistics' => :'statistics'
159
163
  }
@@ -190,6 +194,7 @@ module SibApiV3Sdk
190
194
  :'mirror_active' => :'BOOLEAN',
191
195
  :'recurring' => :'BOOLEAN',
192
196
  :'sent_date' => :'DateTime',
197
+ :'return_bounce' => :'Integer',
193
198
  :'recipients' => :'Object',
194
199
  :'statistics' => :'Object'
195
200
  }
@@ -315,6 +320,10 @@ module SibApiV3Sdk
315
320
  self.sent_date = attributes[:'sentDate']
316
321
  end
317
322
 
323
+ if attributes.has_key?(:'returnBounce')
324
+ self.return_bounce = attributes[:'returnBounce']
325
+ end
326
+
318
327
  if attributes.has_key?(:'recipients')
319
328
  self.recipients = attributes[:'recipients']
320
329
  end
@@ -474,6 +483,7 @@ module SibApiV3Sdk
474
483
  mirror_active == o.mirror_active &&
475
484
  recurring == o.recurring &&
476
485
  sent_date == o.sent_date &&
486
+ return_bounce == o.return_bounce &&
477
487
  recipients == o.recipients &&
478
488
  statistics == o.statistics
479
489
  end
@@ -487,7 +497,7 @@ module SibApiV3Sdk
487
497
  # Calculates hash code according to all attributes.
488
498
  # @return [Fixnum] Hash code
489
499
  def hash
490
- [id, name, subject, type, status, scheduled_at, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay, send_at_best_time, test_sent, header, footer, sender, reply_to, to_field, html_content, share_link, tag, created_at, modified_at, inline_image_activation, mirror_active, recurring, sent_date, recipients, statistics].hash
500
+ [id, name, subject, type, status, scheduled_at, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay, send_at_best_time, test_sent, header, footer, sender, reply_to, to_field, html_content, share_link, tag, created_at, modified_at, inline_image_activation, mirror_active, recurring, sent_date, return_bounce, recipients, statistics].hash
491
501
  end
492
502
 
493
503
  # Builds the object from hash
@@ -97,6 +97,9 @@ module SibApiV3Sdk
97
97
  # Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'
98
98
  attr_accessor :sent_date
99
99
 
100
+ # Total number of non-delivered campaigns for a particular campaign id.
101
+ attr_accessor :return_bounce
102
+
100
103
  class EnumAttributeValidator
101
104
  attr_reader :datatype
102
105
  attr_reader :allowable_values
@@ -149,7 +152,8 @@ module SibApiV3Sdk
149
152
  :'inline_image_activation' => :'inlineImageActivation',
150
153
  :'mirror_active' => :'mirrorActive',
151
154
  :'recurring' => :'recurring',
152
- :'sent_date' => :'sentDate'
155
+ :'sent_date' => :'sentDate',
156
+ :'return_bounce' => :'returnBounce'
153
157
  }
154
158
  end
155
159
 
@@ -183,7 +187,8 @@ module SibApiV3Sdk
183
187
  :'inline_image_activation' => :'BOOLEAN',
184
188
  :'mirror_active' => :'BOOLEAN',
185
189
  :'recurring' => :'BOOLEAN',
186
- :'sent_date' => :'DateTime'
190
+ :'sent_date' => :'DateTime',
191
+ :'return_bounce' => :'Integer'
187
192
  }
188
193
  end
189
194
 
@@ -306,6 +311,10 @@ module SibApiV3Sdk
306
311
  if attributes.has_key?(:'sentDate')
307
312
  self.sent_date = attributes[:'sentDate']
308
313
  end
314
+
315
+ if attributes.has_key?(:'returnBounce')
316
+ self.return_bounce = attributes[:'returnBounce']
317
+ end
309
318
  end
310
319
 
311
320
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -447,7 +456,8 @@ module SibApiV3Sdk
447
456
  inline_image_activation == o.inline_image_activation &&
448
457
  mirror_active == o.mirror_active &&
449
458
  recurring == o.recurring &&
450
- sent_date == o.sent_date
459
+ sent_date == o.sent_date &&
460
+ return_bounce == o.return_bounce
451
461
  end
452
462
 
453
463
  # @see the `==` method
@@ -459,7 +469,7 @@ module SibApiV3Sdk
459
469
  # Calculates hash code according to all attributes.
460
470
  # @return [Fixnum] Hash code
461
471
  def hash
462
- [id, name, subject, type, status, scheduled_at, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay, send_at_best_time, test_sent, header, footer, sender, reply_to, to_field, html_content, share_link, tag, created_at, modified_at, inline_image_activation, mirror_active, recurring, sent_date].hash
472
+ [id, name, subject, type, status, scheduled_at, ab_testing, subject_a, subject_b, split_rule, winner_criteria, winner_delay, send_at_best_time, test_sent, header, footer, sender, reply_to, to_field, html_content, share_link, tag, created_at, modified_at, inline_image_activation, mirror_active, recurring, sent_date, return_bounce].hash
463
473
  end
464
474
 
465
475
  # Builds the object from hash
@@ -41,7 +41,7 @@ module SibApiV3Sdk
41
41
  :'email' => :'String',
42
42
  :'sender_email' => :'String',
43
43
  :'reason' => :'GetTransacBlockedContactsReason',
44
- :'blocked_at' => :'Date'
44
+ :'blocked_at' => :'DateTime'
45
45
  }
46
46
  end
47
47
 
@@ -32,6 +32,12 @@ module SibApiV3Sdk
32
32
  # Date on which transactional email was sent
33
33
  attr_accessor :date
34
34
 
35
+ # Email address of the sender from which the email was sent
36
+ attr_accessor :from
37
+
38
+ # Tags used for your email
39
+ attr_accessor :tags
40
+
35
41
  # Attribute mapping from ruby-style variable name to JSON key.
36
42
  def self.attribute_map
37
43
  {
@@ -40,7 +46,9 @@ module SibApiV3Sdk
40
46
  :'template_id' => :'templateId',
41
47
  :'message_id' => :'messageId',
42
48
  :'uuid' => :'uuid',
43
- :'date' => :'date'
49
+ :'date' => :'date',
50
+ :'from' => :'from',
51
+ :'tags' => :'tags'
44
52
  }
45
53
  end
46
54
 
@@ -52,7 +60,9 @@ module SibApiV3Sdk
52
60
  :'template_id' => :'Integer',
53
61
  :'message_id' => :'String',
54
62
  :'uuid' => :'String',
55
- :'date' => :'DateTime'
63
+ :'date' => :'DateTime',
64
+ :'from' => :'String',
65
+ :'tags' => :'Array<String>'
56
66
  }
57
67
  end
58
68
 
@@ -87,6 +97,16 @@ module SibApiV3Sdk
87
97
  if attributes.has_key?(:'date')
88
98
  self.date = attributes[:'date']
89
99
  end
100
+
101
+ if attributes.has_key?(:'from')
102
+ self.from = attributes[:'from']
103
+ end
104
+
105
+ if attributes.has_key?(:'tags')
106
+ if (value = attributes[:'tags']).is_a?(Array)
107
+ self.tags = value
108
+ end
109
+ end
90
110
  end
91
111
 
92
112
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -137,7 +157,9 @@ module SibApiV3Sdk
137
157
  template_id == o.template_id &&
138
158
  message_id == o.message_id &&
139
159
  uuid == o.uuid &&
140
- date == o.date
160
+ date == o.date &&
161
+ from == o.from &&
162
+ tags == o.tags
141
163
  end
142
164
 
143
165
  # @see the `==` method
@@ -149,7 +171,7 @@ module SibApiV3Sdk
149
171
  # Calculates hash code according to all attributes.
150
172
  # @return [Fixnum] Hash code
151
173
  def hash
152
- [email, subject, template_id, message_id, uuid, date].hash
174
+ [email, subject, template_id, message_id, uuid, date, from, tags].hash
153
175
  end
154
176
 
155
177
  # Builds the object from hash
@@ -32,8 +32,8 @@ module SibApiV3Sdk
32
32
  # Attribute type mapping.
33
33
  def self.swagger_types
34
34
  {
35
- :'sms' => :'Integer',
36
- :'email' => :'Integer'
35
+ :'sms' => :'Float',
36
+ :'email' => :'Float'
37
37
  }
38
38
  end
39
39
 
@@ -31,8 +31,8 @@ module SibApiV3Sdk
31
31
  # Attribute type mapping.
32
32
  def self.swagger_types
33
33
  {
34
- :'sms' => :'Integer',
35
- :'email' => :'Integer'
34
+ :'sms' => :'Float',
35
+ :'email' => :'Float'
36
36
  }
37
37
  end
38
38
 
@@ -14,7 +14,7 @@ require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
16
  class RemoveContactFromList
17
- # Required if 'all' is false. Emails to remove from a list
17
+ # Required if 'all' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request.
18
18
  attr_accessor :emails
19
19
 
20
20
  # Required if 'emails' is empty. Remove all existing contacts from a list
@@ -17,7 +17,7 @@ module SibApiV3Sdk
17
17
  # List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email'].
18
18
  attr_accessor :export_attributes
19
19
 
20
- # This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. For example, {'blacklisted':true} will export all the blacklisted contacts.
20
+ # This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. For example, {\"blacklisted\":true} will export all the blacklisted contacts.
21
21
  attr_accessor :contact_filter
22
22
 
23
23
  attr_accessor :custom_contact_filter
@@ -17,7 +17,7 @@ module SibApiV3Sdk
17
17
  # Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv
18
18
  attr_accessor :file_url
19
19
 
20
- # Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes
20
+ # Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files.
21
21
  attr_accessor :file_body
22
22
 
23
23
  # Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7].
@@ -29,13 +29,13 @@ module SibApiV3Sdk
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
30
  attr_accessor :attachment_url
31
31
 
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'}].
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
33
  attr_accessor :attachment
34
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. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'sender.ip':'1.2.3.4'}
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
36
  attr_accessor :headers
37
37
 
38
- # Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'}
38
+ # Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}
39
39
  attr_accessor :attributes
40
40
 
41
41
  # Tag your emails to find them more easily
@@ -16,7 +16,7 @@ module SibApiV3Sdk
16
16
  class SendSmtpEmail
17
17
  attr_accessor :sender
18
18
 
19
- # List of email addresses and names (optional) of the recipients. For example, [{'name':'Jimmy', 'email':'jimmy98@example.com'}, {'name':'Joe', 'email':'joe@example.com'}]
19
+ # List of email addresses and names (optional) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}]
20
20
  attr_accessor :to
21
21
 
22
22
  # List of email addresses and names (optional) of the recipients in bcc
@@ -39,13 +39,13 @@ module SibApiV3Sdk
39
39
  # Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"My attachment 1\"}, {\"content\":\"base64 exmaple content\", \"name\":\"My attachment 2\"}]`. Allowed extensions for attachment file: 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, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored )
40
40
  attr_accessor :attachment
41
41
 
42
- # Pass the set of custom headers (not the standard 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. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\"}`.
42
+ # Pass the set of custom headers (not the standard 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, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\"}`.
43
43
  attr_accessor :headers
44
44
 
45
45
  # Id of the template
46
46
  attr_accessor :template_id
47
47
 
48
- # Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. It's considered only if template is in New Template Language format.
48
+ # Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format.
49
49
  attr_accessor :params
50
50
 
51
51
  # Tag your emails to find them more easily
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.4.12
13
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
- # Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {'email':'ann6533@example.com', 'name':'Ann'}.
16
+ # Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}.
17
17
  class SendSmtpEmailReplyTo
18
18
  # Email address in reply to
19
19
  attr_accessor :email
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.4.12
13
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
- # Mandatory if 'templateId' is not passed. Pass name (optional) and email of sender from which emails will be sent. For example, {'name':'Mary from MyShop', 'email':'no-reply@myshop.com'}
16
+ # Mandatory if 'templateId' is not passed. Pass name (optional) and email of sender from which emails will be sent. For example, {\"name\":\"Mary from MyShop\", \"email\":\"no-reply@myshop.com\"}
17
17
  class SendSmtpEmailSender
18
18
  # Name of the sender from which the emails will be sent. Maximum allowed characters are 70.
19
19
  attr_accessor :name
@@ -17,7 +17,7 @@ module SibApiV3Sdk
17
17
  # Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global'
18
18
  attr_accessor :value
19
19
 
20
- # List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}]
20
+ # List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]
21
21
  attr_accessor :enumeration
22
22
 
23
23
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -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'} `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. Keep in mind transactional attributes can be updated the same way as normal attributes.
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\"}
18
18
  attr_accessor :attributes
19
19
 
20
20
  # Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true)
@@ -63,7 +63,7 @@ module SibApiV3Sdk
63
63
  # Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed
64
64
  attr_accessor :utm_campaign
65
65
 
66
- # Pass the set of attributes to customize the type 'classic' campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'
66
+ # Pass the set of attributes to customize the type 'classic' campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'
67
67
  attr_accessor :params
68
68
 
69
69
  # Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled.
@@ -0,0 +1,199 @@
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.12
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module SibApiV3Sdk
16
+ class UploadImageToGallery
17
+ # The absolute url of the image (no local file). Maximum allowed size for image is 2MB. Allowed extensions for images are - jpeg, jpg, png, bmp, gif.
18
+ attr_accessor :image_url
19
+
20
+ # Name of the image.
21
+ attr_accessor :name
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'image_url' => :'imageUrl',
27
+ :'name' => :'name'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'image_url' => :'String',
35
+ :'name' => :'String'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ if attributes.has_key?(:'imageUrl')
48
+ self.image_url = attributes[:'imageUrl']
49
+ end
50
+
51
+ if attributes.has_key?(:'name')
52
+ self.name = attributes[:'name']
53
+ end
54
+ end
55
+
56
+ # Show invalid properties with the reasons. Usually used together with valid?
57
+ # @return Array for valid properties with the reasons
58
+ def list_invalid_properties
59
+ invalid_properties = Array.new
60
+ if @image_url.nil?
61
+ invalid_properties.push('invalid value for "image_url", image_url cannot be nil.')
62
+ end
63
+
64
+ invalid_properties
65
+ end
66
+
67
+ # Check to see if the all the properties in the model are valid
68
+ # @return true if the model is valid
69
+ def valid?
70
+ return false if @image_url.nil?
71
+ true
72
+ end
73
+
74
+ # Checks equality by comparing each attribute.
75
+ # @param [Object] Object to be compared
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ image_url == o.image_url &&
80
+ name == o.name
81
+ end
82
+
83
+ # @see the `==` method
84
+ # @param [Object] Object to be compared
85
+ def eql?(o)
86
+ self == o
87
+ end
88
+
89
+ # Calculates hash code according to all attributes.
90
+ # @return [Fixnum] Hash code
91
+ def hash
92
+ [image_url, name].hash
93
+ end
94
+
95
+ # Builds the object from hash
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ # @return [Object] Returns the model itself
98
+ def build_from_hash(attributes)
99
+ return nil unless attributes.is_a?(Hash)
100
+ self.class.swagger_types.each_pair do |key, type|
101
+ if type =~ /\AArray<(.*)>/i
102
+ # check to ensure the input is an array given that the the attribute
103
+ # is documented as an array but the input is not
104
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
105
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
106
+ end
107
+ elsif !attributes[self.class.attribute_map[key]].nil?
108
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
109
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
110
+ end
111
+
112
+ self
113
+ end
114
+
115
+ # Deserializes the data based on type
116
+ # @param string type Data type
117
+ # @param string value Value to be deserialized
118
+ # @return [Object] Deserialized data
119
+ def _deserialize(type, value)
120
+ case type.to_sym
121
+ when :DateTime
122
+ DateTime.parse(value)
123
+ when :Date
124
+ Date.parse(value)
125
+ when :String
126
+ value.to_s
127
+ when :Integer
128
+ value.to_i
129
+ when :Float
130
+ value.to_f
131
+ when :BOOLEAN
132
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
133
+ true
134
+ else
135
+ false
136
+ end
137
+ when :Object
138
+ # generic object (usually a Hash), return directly
139
+ value
140
+ when /\AArray<(?<inner_type>.+)>\z/
141
+ inner_type = Regexp.last_match[:inner_type]
142
+ value.map { |v| _deserialize(inner_type, v) }
143
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
144
+ k_type = Regexp.last_match[:k_type]
145
+ v_type = Regexp.last_match[:v_type]
146
+ {}.tap do |hash|
147
+ value.each do |k, v|
148
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
149
+ end
150
+ end
151
+ else # model
152
+ temp_model = SibApiV3Sdk.const_get(type).new
153
+ temp_model.build_from_hash(value)
154
+ end
155
+ end
156
+
157
+ # Returns the string representation of the object
158
+ # @return [String] String presentation of the object
159
+ def to_s
160
+ to_hash.to_s
161
+ end
162
+
163
+ # to_body is an alias to to_hash (backward compatibility)
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_body
166
+ to_hash
167
+ end
168
+
169
+ # Returns the object in the form of hash
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_hash
172
+ hash = {}
173
+ self.class.attribute_map.each_pair do |attr, param|
174
+ value = self.send(attr)
175
+ next if value.nil?
176
+ hash[param] = _to_hash(value)
177
+ end
178
+ hash
179
+ end
180
+
181
+ # Outputs non-array value in the form of hash
182
+ # For object, use to_hash. Otherwise, just return the value
183
+ # @param [Object] value Any valid value
184
+ # @return [Hash] Returns the value in the form of hash
185
+ def _to_hash(value)
186
+ if value.is_a?(Array)
187
+ value.compact.map { |v| _to_hash(v) }
188
+ elsif value.is_a?(Hash)
189
+ {}.tap do |hash|
190
+ value.each { |k, v| hash[k] = _to_hash(v) }
191
+ end
192
+ elsif value.respond_to? :to_hash
193
+ value.to_hash
194
+ else
195
+ value
196
+ end
197
+ end
198
+ end
199
+ end