sib-api-v3-sdk 5.1.3 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c740d75fcc3c4eddc9f7c811299b05858b4be67508136249c2b5b2ae79ed2f3a
4
- data.tar.gz: 3a8a42376fe2657b7085fe622f8f4244bd5dc9349dfec9d9397586dd22b416ab
3
+ metadata.gz: bbd87949ff5293713c433c44b7e71fe3a8d37530e11a2325fcb3099fb2bcda70
4
+ data.tar.gz: 5b51b71b997fbe73a69dc5fa35d1cfef73c75df97d99466c8df0725b44be3d50
5
5
  SHA512:
6
- metadata.gz: 6870ea49833b4c8b6f06a4bb43b51d80e3cec454e4d10dcae173acbdaae7c23ac858586e6a8e0cf264da6a6de6ac0580ce4858bb9f313872b54fbf5ccf73433e
7
- data.tar.gz: 3dd8d0c1179cd5506ea04f5c5644a15ba271a99d8117a90c2591f151730610d7b85a8ca6b190e2469d050ce5f71bfe8be08b4014872b1e10658807b46817495f
6
+ metadata.gz: 33f806c87d798114e6c4223878d0f270fcd1989382e98bf9c8eb00fdedc3440797c88c0e036673c05d329891ff5c2f0993717f23f57e4f078331bf5f5f22b4cb
7
+ data.tar.gz: 0e85ea08f25fdd18946cb2912d3f8252b5043b7943bde7d9442034660c0bd7acc8cf85ee5356d58e8fb2096311e826d94d54cad27a217630f71b8ed5df54adbc
data/README.md CHANGED
@@ -207,6 +207,7 @@ Class | Method | HTTP request | Description
207
207
  - [SibApiV3Sdk::CreateSmtpEmail](docs/CreateSmtpEmail.md)
208
208
  - [SibApiV3Sdk::CreateSmtpTemplate](docs/CreateSmtpTemplate.md)
209
209
  - [SibApiV3Sdk::CreateSmtpTemplateSender](docs/CreateSmtpTemplateSender.md)
210
+ - [SibApiV3Sdk::CreateUpdateContactModel](docs/CreateUpdateContactModel.md)
210
211
  - [SibApiV3Sdk::CreateUpdateFolder](docs/CreateUpdateFolder.md)
211
212
  - [SibApiV3Sdk::CreateWebhook](docs/CreateWebhook.md)
212
213
  - [SibApiV3Sdk::CreatedProcessId](docs/CreatedProcessId.md)
@@ -145,7 +145,7 @@ nil (empty response body)
145
145
 
146
146
 
147
147
  # **create_contact**
148
- > CreateModel create_contact(create_contact)
148
+ > CreateUpdateContactModel create_contact(create_contact)
149
149
 
150
150
  Create a contact
151
151
 
@@ -183,7 +183,7 @@ Name | Type | Description | Notes
183
183
 
184
184
  ### Return type
185
185
 
186
- [**CreateModel**](CreateModel.md)
186
+ [**CreateUpdateContactModel**](CreateUpdateContactModel.md)
187
187
 
188
188
  ### Authorization
189
189
 
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
9
9
  **html_content** | **String** | Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) | [optional]
10
10
  **html_url** | **String** | Mandatory if htmlContent and templateId are empty. Url to the message (HTML) | [optional]
11
11
  **template_id** | **Integer** | Mandatory if htmlContent and htmlUrl are empty. Id of the SMTP template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. | [optional]
12
- **scheduled_at** | **DateTime** | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional]
12
+ **scheduled_at** | **DateTime** | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). | [optional]
13
13
  **subject** | **String** | Subject of the campaign |
14
14
  **reply_to** | **String** | Email on which the campaign recipients will be able to reply to | [optional]
15
15
  **to_field** | **String** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional]
@@ -17,11 +17,10 @@ Name | Type | Description | Notes
17
17
  **attachment_url** | **String** | 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 | [optional]
18
18
  **inline_image_activation** | **BOOLEAN** | Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts | [optional] [default to false]
19
19
  **mirror_active** | **BOOLEAN** | Use true to enable the mirror link | [optional]
20
- **recurring** | **BOOLEAN** | For trigger campagins use false to make sure a contact receives the same campaign only once | [optional] [default to false]
21
- **type** | **String** | Type of the campaign |
22
20
  **footer** | **String** | Footer of the email campaign | [optional]
23
21
  **header** | **String** | Header of the email campaign | [optional]
24
22
  **utm_campaign** | **String** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional]
25
23
  **params** | **Object** | 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' | [optional]
24
+ **send_at_best_time** | **BOOLEAN** | Set this to true if you want to send your campaign at best time. | [optional] [default to false]
26
25
 
27
26
 
@@ -0,0 +1,8 @@
1
+ # SibApiV3Sdk::CreateUpdateContactModel
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | ID of the contact when a new contact is created | [optional]
7
+
8
+
@@ -3,7 +3,8 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **success** | **Array<String>** | |
6
+ **success** | **Array<String>** | | [optional]
7
7
  **failure** | **Array<String>** | | [optional]
8
+ **total** | **Integer** | Displays the count of total number of contacts removed from list when user opts for \"all\" option. | [optional]
8
9
 
9
10
 
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
8
8
  **name** | **String** | Name of the campaign | [optional]
9
9
  **html_content** | **String** | Body of the message (HTML version). REQUIRED if htmlUrl is empty | [optional]
10
10
  **html_url** | **String** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional]
11
- **scheduled_at** | **DateTime** | 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. | [optional]
11
+ **scheduled_at** | **DateTime** | 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. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). | [optional]
12
12
  **subject** | **String** | Subject of the campaign | [optional]
13
13
  **reply_to** | **String** | Email on which campaign recipients will be able to reply to | [optional]
14
14
  **to_field** | **String** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional]
@@ -21,5 +21,6 @@ Name | Type | Description | Notes
21
21
  **header** | **String** | Header of the email campaign | [optional]
22
22
  **utm_campaign** | **String** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional]
23
23
  **params** | **Object** | 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' | [optional]
24
+ **send_at_best_time** | **BOOLEAN** | Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. | [optional]
24
25
 
25
26
 
@@ -37,6 +37,7 @@ require 'sib-api-v3-sdk/models/create_sms_campaign_recipients'
37
37
  require 'sib-api-v3-sdk/models/create_smtp_email'
38
38
  require 'sib-api-v3-sdk/models/create_smtp_template'
39
39
  require 'sib-api-v3-sdk/models/create_smtp_template_sender'
40
+ require 'sib-api-v3-sdk/models/create_update_contact_model'
40
41
  require 'sib-api-v3-sdk/models/create_update_folder'
41
42
  require 'sib-api-v3-sdk/models/create_webhook'
42
43
  require 'sib-api-v3-sdk/models/created_process_id'
@@ -155,7 +155,7 @@ module SibApiV3Sdk
155
155
  #
156
156
  # @param create_contact Values to create a contact
157
157
  # @param [Hash] opts the optional parameters
158
- # @return [CreateModel]
158
+ # @return [CreateUpdateContactModel]
159
159
  def create_contact(create_contact, opts = {})
160
160
  data, _status_code, _headers = create_contact_with_http_info(create_contact, opts)
161
161
  return data
@@ -165,7 +165,7 @@ module SibApiV3Sdk
165
165
  #
166
166
  # @param create_contact Values to create a contact
167
167
  # @param [Hash] opts the optional parameters
168
- # @return [Array<(CreateModel, Fixnum, Hash)>] CreateModel data, response status code and response headers
168
+ # @return [Array<(CreateUpdateContactModel, Fixnum, Hash)>] CreateUpdateContactModel data, response status code and response headers
169
169
  def create_contact_with_http_info(create_contact, opts = {})
170
170
  if @api_client.config.debugging
171
171
  @api_client.config.logger.debug "Calling API: ContactsApi.create_contact ..."
@@ -199,7 +199,7 @@ module SibApiV3Sdk
199
199
  :form_params => form_params,
200
200
  :body => post_body,
201
201
  :auth_names => auth_names,
202
- :return_type => 'CreateModel')
202
+ :return_type => 'CreateUpdateContactModel')
203
203
  if @api_client.config.debugging
204
204
  @api_client.config.logger.debug "API called: ContactsApi#create_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
205
205
  end
@@ -32,7 +32,7 @@ module SibApiV3Sdk
32
32
  # Mandatory if htmlContent and htmlUrl are empty. Id of the SMTP template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature.
33
33
  attr_accessor :template_id
34
34
 
35
- # Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
35
+ # Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part).
36
36
  attr_accessor :scheduled_at
37
37
 
38
38
  # Subject of the campaign
@@ -55,12 +55,6 @@ module SibApiV3Sdk
55
55
  # Use true to enable the mirror link
56
56
  attr_accessor :mirror_active
57
57
 
58
- # For trigger campagins use false to make sure a contact receives the same campaign only once
59
- attr_accessor :recurring
60
-
61
- # Type of the campaign
62
- attr_accessor :type
63
-
64
58
  # Footer of the email campaign
65
59
  attr_accessor :footer
66
60
 
@@ -73,27 +67,9 @@ module SibApiV3Sdk
73
67
  # 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'
74
68
  attr_accessor :params
75
69
 
76
- class EnumAttributeValidator
77
- attr_reader :datatype
78
- attr_reader :allowable_values
79
-
80
- def initialize(datatype, allowable_values)
81
- @allowable_values = allowable_values.map do |value|
82
- case datatype.to_s
83
- when /Integer/i
84
- value.to_i
85
- when /Float/i
86
- value.to_f
87
- else
88
- value
89
- end
90
- end
91
- end
70
+ # Set this to true if you want to send your campaign at best time.
71
+ attr_accessor :send_at_best_time
92
72
 
93
- def valid?(value)
94
- !value || allowable_values.include?(value)
95
- end
96
- end
97
73
 
98
74
  # Attribute mapping from ruby-style variable name to JSON key.
99
75
  def self.attribute_map
@@ -112,12 +88,11 @@ module SibApiV3Sdk
112
88
  :'attachment_url' => :'attachmentUrl',
113
89
  :'inline_image_activation' => :'inlineImageActivation',
114
90
  :'mirror_active' => :'mirrorActive',
115
- :'recurring' => :'recurring',
116
- :'type' => :'type',
117
91
  :'footer' => :'footer',
118
92
  :'header' => :'header',
119
93
  :'utm_campaign' => :'utmCampaign',
120
- :'params' => :'params'
94
+ :'params' => :'params',
95
+ :'send_at_best_time' => :'sendAtBestTime'
121
96
  }
122
97
  end
123
98
 
@@ -138,12 +113,11 @@ module SibApiV3Sdk
138
113
  :'attachment_url' => :'String',
139
114
  :'inline_image_activation' => :'BOOLEAN',
140
115
  :'mirror_active' => :'BOOLEAN',
141
- :'recurring' => :'BOOLEAN',
142
- :'type' => :'String',
143
116
  :'footer' => :'String',
144
117
  :'header' => :'String',
145
118
  :'utm_campaign' => :'String',
146
- :'params' => :'Object'
119
+ :'params' => :'Object',
120
+ :'send_at_best_time' => :'BOOLEAN'
147
121
  }
148
122
  end
149
123
 
@@ -213,16 +187,6 @@ module SibApiV3Sdk
213
187
  self.mirror_active = attributes[:'mirrorActive']
214
188
  end
215
189
 
216
- if attributes.has_key?(:'recurring')
217
- self.recurring = attributes[:'recurring']
218
- else
219
- self.recurring = false
220
- end
221
-
222
- if attributes.has_key?(:'type')
223
- self.type = attributes[:'type']
224
- end
225
-
226
190
  if attributes.has_key?(:'footer')
227
191
  self.footer = attributes[:'footer']
228
192
  end
@@ -239,6 +203,12 @@ module SibApiV3Sdk
239
203
  self.params = attributes[:'params']
240
204
  end
241
205
 
206
+ if attributes.has_key?(:'sendAtBestTime')
207
+ self.send_at_best_time = attributes[:'sendAtBestTime']
208
+ else
209
+ self.send_at_best_time = false
210
+ end
211
+
242
212
  end
243
213
 
244
214
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -257,10 +227,6 @@ module SibApiV3Sdk
257
227
  invalid_properties.push("invalid value for 'subject', subject cannot be nil.")
258
228
  end
259
229
 
260
- if @type.nil?
261
- invalid_properties.push("invalid value for 'type', type cannot be nil.")
262
- end
263
-
264
230
  return invalid_properties
265
231
  end
266
232
 
@@ -270,22 +236,9 @@ module SibApiV3Sdk
270
236
  return false if @sender.nil?
271
237
  return false if @name.nil?
272
238
  return false if @subject.nil?
273
- return false if @type.nil?
274
- type_validator = EnumAttributeValidator.new('String', ["classic", "trigger"])
275
- return false unless type_validator.valid?(@type)
276
239
  return true
277
240
  end
278
241
 
279
- # Custom attribute writer method checking allowed values (enum).
280
- # @param [Object] type Object to be assigned
281
- def type=(type)
282
- validator = EnumAttributeValidator.new('String', ["classic", "trigger"])
283
- unless validator.valid?(type)
284
- fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
285
- end
286
- @type = type
287
- end
288
-
289
242
  # Checks equality by comparing each attribute.
290
243
  # @param [Object] Object to be compared
291
244
  def ==(o)
@@ -305,12 +258,11 @@ module SibApiV3Sdk
305
258
  attachment_url == o.attachment_url &&
306
259
  inline_image_activation == o.inline_image_activation &&
307
260
  mirror_active == o.mirror_active &&
308
- recurring == o.recurring &&
309
- type == o.type &&
310
261
  footer == o.footer &&
311
262
  header == o.header &&
312
263
  utm_campaign == o.utm_campaign &&
313
- params == o.params
264
+ params == o.params &&
265
+ send_at_best_time == o.send_at_best_time
314
266
  end
315
267
 
316
268
  # @see the `==` method
@@ -322,7 +274,7 @@ module SibApiV3Sdk
322
274
  # Calculates hash code according to all attributes.
323
275
  # @return [Fixnum] Hash code
324
276
  def hash
325
- [tag, sender, name, html_content, html_url, template_id, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, recurring, type, footer, header, utm_campaign, params].hash
277
+ [tag, sender, name, html_content, html_url, template_id, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, footer, header, utm_campaign, params, send_at_best_time].hash
326
278
  end
327
279
 
328
280
  # Builds the object from hash
@@ -0,0 +1,189 @@
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 |
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.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module SibApiV3Sdk
16
+
17
+ class CreateUpdateContactModel
18
+ # ID of the contact when a new contact is created
19
+ attr_accessor :id
20
+
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'id' => :'id'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'id' => :'Integer'
33
+ }
34
+ end
35
+
36
+ # Initializes the object
37
+ # @param [Hash] attributes Model attributes in the form of hash
38
+ def initialize(attributes = {})
39
+ return unless attributes.is_a?(Hash)
40
+
41
+ # convert string to symbol for hash key
42
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
43
+
44
+ if attributes.has_key?(:'id')
45
+ self.id = attributes[:'id']
46
+ end
47
+
48
+ end
49
+
50
+ # Show invalid properties with the reasons. Usually used together with valid?
51
+ # @return Array for valid properties with the reasons
52
+ def list_invalid_properties
53
+ invalid_properties = Array.new
54
+ return invalid_properties
55
+ end
56
+
57
+ # Check to see if the all the properties in the model are valid
58
+ # @return true if the model is valid
59
+ def valid?
60
+ return true
61
+ end
62
+
63
+ # Checks equality by comparing each attribute.
64
+ # @param [Object] Object to be compared
65
+ def ==(o)
66
+ return true if self.equal?(o)
67
+ self.class == o.class &&
68
+ id == o.id
69
+ end
70
+
71
+ # @see the `==` method
72
+ # @param [Object] Object to be compared
73
+ def eql?(o)
74
+ self == o
75
+ end
76
+
77
+ # Calculates hash code according to all attributes.
78
+ # @return [Fixnum] Hash code
79
+ def hash
80
+ [id].hash
81
+ end
82
+
83
+ # Builds the object from hash
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ # @return [Object] Returns the model itself
86
+ def build_from_hash(attributes)
87
+ return nil unless attributes.is_a?(Hash)
88
+ self.class.swagger_types.each_pair do |key, type|
89
+ if type =~ /\AArray<(.*)>/i
90
+ # check to ensure the input is an array given that the the attribute
91
+ # is documented as an array but the input is not
92
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
93
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
94
+ end
95
+ elsif !attributes[self.class.attribute_map[key]].nil?
96
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
97
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
98
+ end
99
+
100
+ self
101
+ end
102
+
103
+ # Deserializes the data based on type
104
+ # @param string type Data type
105
+ # @param string value Value to be deserialized
106
+ # @return [Object] Deserialized data
107
+ def _deserialize(type, value)
108
+ case type.to_sym
109
+ when :DateTime
110
+ DateTime.parse(value)
111
+ when :Date
112
+ Date.parse(value)
113
+ when :String
114
+ value.to_s
115
+ when :Integer
116
+ value.to_i
117
+ when :Float
118
+ value.to_f
119
+ when :BOOLEAN
120
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
121
+ true
122
+ else
123
+ false
124
+ end
125
+ when :Object
126
+ # generic object (usually a Hash), return directly
127
+ value
128
+ when /\AArray<(?<inner_type>.+)>\z/
129
+ inner_type = Regexp.last_match[:inner_type]
130
+ value.map { |v| _deserialize(inner_type, v) }
131
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
132
+ k_type = Regexp.last_match[:k_type]
133
+ v_type = Regexp.last_match[:v_type]
134
+ {}.tap do |hash|
135
+ value.each do |k, v|
136
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
137
+ end
138
+ end
139
+ else # model
140
+ temp_model = SibApiV3Sdk.const_get(type).new
141
+ temp_model.build_from_hash(value)
142
+ end
143
+ end
144
+
145
+ # Returns the string representation of the object
146
+ # @return [String] String presentation of the object
147
+ def to_s
148
+ to_hash.to_s
149
+ end
150
+
151
+ # to_body is an alias to to_hash (backward compatibility)
152
+ # @return [Hash] Returns the object in the form of hash
153
+ def to_body
154
+ to_hash
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ next if value.nil?
164
+ hash[param] = _to_hash(value)
165
+ end
166
+ hash
167
+ end
168
+
169
+ # Outputs non-array value in the form of hash
170
+ # For object, use to_hash. Otherwise, just return the value
171
+ # @param [Object] value Any valid value
172
+ # @return [Hash] Returns the value in the form of hash
173
+ def _to_hash(value)
174
+ if value.is_a?(Array)
175
+ value.compact.map{ |v| _to_hash(v) }
176
+ elsif value.is_a?(Hash)
177
+ {}.tap do |hash|
178
+ value.each { |k, v| hash[k] = _to_hash(v) }
179
+ end
180
+ elsif value.respond_to? :to_hash
181
+ value.to_hash
182
+ else
183
+ value
184
+ end
185
+ end
186
+
187
+ end
188
+
189
+ end
@@ -19,12 +19,16 @@ module SibApiV3Sdk
19
19
 
20
20
  attr_accessor :failure
21
21
 
22
+ # Displays the count of total number of contacts removed from list when user opts for \"all\" option.
23
+ attr_accessor :total
24
+
22
25
 
23
26
  # Attribute mapping from ruby-style variable name to JSON key.
24
27
  def self.attribute_map
25
28
  {
26
29
  :'success' => :'success',
27
- :'failure' => :'failure'
30
+ :'failure' => :'failure',
31
+ :'total' => :'total'
28
32
  }
29
33
  end
30
34
 
@@ -32,7 +36,8 @@ module SibApiV3Sdk
32
36
  def self.swagger_types
33
37
  {
34
38
  :'success' => :'Array<String>',
35
- :'failure' => :'Array<String>'
39
+ :'failure' => :'Array<String>',
40
+ :'total' => :'Integer'
36
41
  }
37
42
  end
38
43
 
@@ -56,23 +61,22 @@ module SibApiV3Sdk
56
61
  end
57
62
  end
58
63
 
64
+ if attributes.has_key?(:'total')
65
+ self.total = attributes[:'total']
66
+ end
67
+
59
68
  end
60
69
 
61
70
  # Show invalid properties with the reasons. Usually used together with valid?
62
71
  # @return Array for valid properties with the reasons
63
72
  def list_invalid_properties
64
73
  invalid_properties = Array.new
65
- if @success.nil?
66
- invalid_properties.push("invalid value for 'success', success cannot be nil.")
67
- end
68
-
69
74
  return invalid_properties
70
75
  end
71
76
 
72
77
  # Check to see if the all the properties in the model are valid
73
78
  # @return true if the model is valid
74
79
  def valid?
75
- return false if @success.nil?
76
80
  return true
77
81
  end
78
82
 
@@ -82,7 +86,8 @@ module SibApiV3Sdk
82
86
  return true if self.equal?(o)
83
87
  self.class == o.class &&
84
88
  success == o.success &&
85
- failure == o.failure
89
+ failure == o.failure &&
90
+ total == o.total
86
91
  end
87
92
 
88
93
  # @see the `==` method
@@ -94,7 +99,7 @@ module SibApiV3Sdk
94
99
  # Calculates hash code according to all attributes.
95
100
  # @return [Fixnum] Hash code
96
101
  def hash
97
- [success, failure].hash
102
+ [success, failure, total].hash
98
103
  end
99
104
 
100
105
  # Builds the object from hash
@@ -29,7 +29,7 @@ module SibApiV3Sdk
29
29
  # Url which contents the body of the email message. REQUIRED if htmlContent is empty
30
30
  attr_accessor :html_url
31
31
 
32
- # 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.
32
+ # 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. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part).
33
33
  attr_accessor :scheduled_at
34
34
 
35
35
  # Subject of the campaign
@@ -67,6 +67,9 @@ module SibApiV3Sdk
67
67
  # 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'
68
68
  attr_accessor :params
69
69
 
70
+ # Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled.
71
+ attr_accessor :send_at_best_time
72
+
70
73
 
71
74
  # Attribute mapping from ruby-style variable name to JSON key.
72
75
  def self.attribute_map
@@ -88,7 +91,8 @@ module SibApiV3Sdk
88
91
  :'footer' => :'footer',
89
92
  :'header' => :'header',
90
93
  :'utm_campaign' => :'utmCampaign',
91
- :'params' => :'params'
94
+ :'params' => :'params',
95
+ :'send_at_best_time' => :'sendAtBestTime'
92
96
  }
93
97
  end
94
98
 
@@ -112,7 +116,8 @@ module SibApiV3Sdk
112
116
  :'footer' => :'String',
113
117
  :'header' => :'String',
114
118
  :'utm_campaign' => :'String',
115
- :'params' => :'Object'
119
+ :'params' => :'Object',
120
+ :'send_at_best_time' => :'BOOLEAN'
116
121
  }
117
122
  end
118
123
 
@@ -200,6 +205,10 @@ module SibApiV3Sdk
200
205
  self.params = attributes[:'params']
201
206
  end
202
207
 
208
+ if attributes.has_key?(:'sendAtBestTime')
209
+ self.send_at_best_time = attributes[:'sendAtBestTime']
210
+ end
211
+
203
212
  end
204
213
 
205
214
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -237,7 +246,8 @@ module SibApiV3Sdk
237
246
  footer == o.footer &&
238
247
  header == o.header &&
239
248
  utm_campaign == o.utm_campaign &&
240
- params == o.params
249
+ params == o.params &&
250
+ send_at_best_time == o.send_at_best_time
241
251
  end
242
252
 
243
253
  # @see the `==` method
@@ -249,7 +259,7 @@ module SibApiV3Sdk
249
259
  # Calculates hash code according to all attributes.
250
260
  # @return [Fixnum] Hash code
251
261
  def hash
252
- [tag, sender, name, html_content, html_url, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, recurring, footer, header, utm_campaign, params].hash
262
+ [tag, sender, name, html_content, html_url, scheduled_at, subject, reply_to, to_field, recipients, attachment_url, inline_image_activation, mirror_active, recurring, footer, header, utm_campaign, params, send_at_best_time].hash
253
263
  end
254
264
 
255
265
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.3.1
11
11
  =end
12
12
 
13
13
  module SibApiV3Sdk
14
- VERSION = "5.1.3"
14
+ VERSION = "5.2.0"
15
15
  end
@@ -64,7 +64,7 @@ describe 'ContactsApi' do
64
64
  #
65
65
  # @param create_contact Values to create a contact
66
66
  # @param [Hash] opts the optional parameters
67
- # @return [CreateModel]
67
+ # @return [CreateUpdateContactModel]
68
68
  describe 'create_contact test' do
69
69
  it "should work" do
70
70
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -116,41 +116,31 @@ describe 'CreateEmailCampaign' do
116
116
  end
117
117
  end
118
118
 
119
- describe 'test attribute "recurring"' do
120
- it 'should work' do
121
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
122
- end
123
- end
124
-
125
- describe 'test attribute "type"' do
119
+ describe 'test attribute "footer"' do
126
120
  it 'should work' do
127
121
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
128
- #validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["classic", "trigger"])
129
- #validator.allowable_values.each do |value|
130
- # expect { @instance.type = value }.not_to raise_error
131
- #end
132
122
  end
133
123
  end
134
124
 
135
- describe 'test attribute "footer"' do
125
+ describe 'test attribute "header"' do
136
126
  it 'should work' do
137
127
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
138
128
  end
139
129
  end
140
130
 
141
- describe 'test attribute "header"' do
131
+ describe 'test attribute "utm_campaign"' do
142
132
  it 'should work' do
143
133
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
144
134
  end
145
135
  end
146
136
 
147
- describe 'test attribute "utm_campaign"' do
137
+ describe 'test attribute "params"' do
148
138
  it 'should work' do
149
139
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
150
140
  end
151
141
  end
152
142
 
153
- describe 'test attribute "params"' do
143
+ describe 'test attribute "send_at_best_time"' do
154
144
  it 'should work' do
155
145
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
156
146
  end
@@ -0,0 +1,42 @@
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 |
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.3.1
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for SibApiV3Sdk::CreateUpdateContactModel
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'CreateUpdateContactModel' do
21
+ before do
22
+ # run before each test
23
+ @instance = SibApiV3Sdk::CreateUpdateContactModel.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of CreateUpdateContactModel' do
31
+ it 'should create an instance of CreateUpdateContactModel' do
32
+ expect(@instance).to be_instance_of(SibApiV3Sdk::CreateUpdateContactModel)
33
+ end
34
+ end
35
+ describe 'test attribute "id"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ end
42
+
@@ -44,5 +44,11 @@ describe 'PostContactInfoContacts' do
44
44
  end
45
45
  end
46
46
 
47
+ describe 'test attribute "total"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
47
53
  end
48
54
 
@@ -140,5 +140,11 @@ describe 'UpdateEmailCampaign' do
140
140
  end
141
141
  end
142
142
 
143
+ describe 'test attribute "send_at_best_time"' do
144
+ it 'should work' do
145
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
146
+ end
147
+ end
148
+
143
149
  end
144
150
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sib-api-v3-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.3
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SendinBlue Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-10 00:00:00.000000000 Z
11
+ date: 2019-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -224,6 +224,7 @@ files:
224
224
  - docs/CreateSmtpEmail.md
225
225
  - docs/CreateSmtpTemplate.md
226
226
  - docs/CreateSmtpTemplateSender.md
227
+ - docs/CreateUpdateContactModel.md
227
228
  - docs/CreateUpdateFolder.md
228
229
  - docs/CreateWebhook.md
229
230
  - docs/CreatedProcessId.md
@@ -399,6 +400,7 @@ files:
399
400
  - lib/sib-api-v3-sdk/models/create_smtp_email.rb
400
401
  - lib/sib-api-v3-sdk/models/create_smtp_template.rb
401
402
  - lib/sib-api-v3-sdk/models/create_smtp_template_sender.rb
403
+ - lib/sib-api-v3-sdk/models/create_update_contact_model.rb
402
404
  - lib/sib-api-v3-sdk/models/create_update_folder.rb
403
405
  - lib/sib-api-v3-sdk/models/create_webhook.rb
404
406
  - lib/sib-api-v3-sdk/models/created_process_id.rb
@@ -564,6 +566,7 @@ files:
564
566
  - spec/models/create_smtp_email_spec.rb
565
567
  - spec/models/create_smtp_template_sender_spec.rb
566
568
  - spec/models/create_smtp_template_spec.rb
569
+ - spec/models/create_update_contact_model_spec.rb
567
570
  - spec/models/create_update_folder_spec.rb
568
571
  - spec/models/create_webhook_spec.rb
569
572
  - spec/models/created_process_id_spec.rb
@@ -753,6 +756,7 @@ test_files:
753
756
  - spec/models/create_smtp_email_spec.rb
754
757
  - spec/models/create_smtp_template_sender_spec.rb
755
758
  - spec/models/create_smtp_template_spec.rb
759
+ - spec/models/create_update_contact_model_spec.rb
756
760
  - spec/models/create_update_folder_spec.rb
757
761
  - spec/models/create_webhook_spec.rb
758
762
  - spec/models/created_process_id_spec.rb