sib-api-v3-sdk 5.0.0 → 5.1.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
- SHA1:
3
- metadata.gz: f37c5e31f9484352992cf53852c93f30651b77e8
4
- data.tar.gz: 731e71d522e04ba7f1689773ed35047df678214b
2
+ SHA256:
3
+ metadata.gz: fceccc7da6011702d08b070dc5583b2e11baba4a091b4ec5231edc2ba0534fc2
4
+ data.tar.gz: 7307b04667b740f799b1b73ec6dfce0c06dc2415dd65439c758c891369017549
5
5
  SHA512:
6
- metadata.gz: 6fe418830072aed1ba951e3e2bd87d0fb62eba03a05e81a0be44ca511fd1cfa5dda8acd2f1f67a592fd0155d0424cd3fc8f7677d3c7d6eb133bfd5c0ec0cdb38
7
- data.tar.gz: 76688ffbf34debac50b8758651465d24a48ed0a3b4f84ab4cff79adc88188461e215c1ecbedc0a624696bfeda5a4f4c1619d994ed0bc55b8c05ace8dfc27c55f
6
+ metadata.gz: 9e1e8ef2ca75dc7064443be2ba9520261318cd3336cf085975e2fd3c311374cc634246dfce2d17239ab1b9a4680f138b7dfe59c8d8311605cc4bc81b47161298
7
+ data.tar.gz: 0f47ba62c91e0df549bcfc69ba3e8da32ac6095b7a4d0474cd3107057b04b493cb1501ee74bdfee4fda9ee4fcf348c61804a2116787a234c76f9bd034a141d40
@@ -5,6 +5,6 @@ Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **value** | **String** | Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional]
7
7
  **enumeration** | [**Array<CreateAttributeEnumeration>**](CreateAttributeEnumeration.md) | List of 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'}] | [optional]
8
- **type** | **String** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) | [optional]
8
+ **type** | **String** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) | [optional]
9
9
 
10
10
 
@@ -249,6 +249,8 @@ api_instance = SibApiV3Sdk::EmailCampaignsApi.new
249
249
  opts = {
250
250
  type: "type_example", # String | Filter on the type of the campaigns
251
251
  status: "status_example", # String | Filter on the status of the campaign
252
+ start_date: DateTime.parse("2013-10-20T19:20:30+01:00"), # DateTime | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
253
+ end_date: DateTime.parse("2013-10-20T19:20:30+01:00"), # DateTime | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
252
254
  limit: 500, # Integer | Number of documents per page
253
255
  offset: 0 # Integer | Index of the first document in the page
254
256
  }
@@ -268,6 +270,8 @@ Name | Type | Description | Notes
268
270
  ------------- | ------------- | ------------- | -------------
269
271
  **type** | **String**| Filter on the type of the campaigns | [optional]
270
272
  **status** | **String**| Filter on the status of the campaign | [optional]
273
+ **start_date** | **DateTime**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional]
274
+ **end_date** | **DateTime**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional]
271
275
  **limit** | **Integer**| Number of documents per page | [optional] [default to 500]
272
276
  **offset** | **Integer**| Index of the first document in the page | [optional] [default to 0]
273
277
 
@@ -23,6 +23,7 @@ Name | Type | Description | Notes
23
23
  **inline_image_activation** | **BOOLEAN** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional]
24
24
  **mirror_active** | **BOOLEAN** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional]
25
25
  **recurring** | **BOOLEAN** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional]
26
+ **sent_date** | **DateTime** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional]
26
27
  **recipients** | **Object** | |
27
28
  **statistics** | **Object** | |
28
29
 
@@ -23,5 +23,6 @@ Name | Type | Description | Notes
23
23
  **inline_image_activation** | **BOOLEAN** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional]
24
24
  **mirror_active** | **BOOLEAN** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional]
25
25
  **recurring** | **BOOLEAN** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional]
26
+ **sent_date** | **DateTime** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional]
26
27
 
27
28
 
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **sender** | **String** | Name of the sender. Only alphanumeric characters. No more than 11 characters |
7
7
  **recipient** | **String** | Mobile number to send SMS with the country code |
8
- **content** | **String** | Content of the message. If more than 160 characters long, multiple text messages will be sent |
8
+ **content** | **String** | Content of the message. If more than 160 characters long, will be sent as multiple text messages |
9
9
  **type** | **String** | Type of the SMS | [optional] [default to "transactional"]
10
10
  **tag** | **String** | Tag of the message | [optional]
11
11
  **web_url** | **String** | Webhook to call for each event triggered by the message (delivered etc.) | [optional]
@@ -246,6 +246,8 @@ module SibApiV3Sdk
246
246
  # @param [Hash] opts the optional parameters
247
247
  # @option opts [String] :type Filter on the type of the campaigns
248
248
  # @option opts [String] :status Filter on the status of the campaign
249
+ # @option opts [DateTime] :start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
250
+ # @option opts [DateTime] :end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
249
251
  # @option opts [Integer] :limit Number of documents per page (default to 500)
250
252
  # @option opts [Integer] :offset Index of the first document in the page (default to 0)
251
253
  # @return [GetEmailCampaigns]
@@ -259,6 +261,8 @@ module SibApiV3Sdk
259
261
  # @param [Hash] opts the optional parameters
260
262
  # @option opts [String] :type Filter on the type of the campaigns
261
263
  # @option opts [String] :status Filter on the status of the campaign
264
+ # @option opts [DateTime] :start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
265
+ # @option opts [DateTime] :end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
262
266
  # @option opts [Integer] :limit Number of documents per page
263
267
  # @option opts [Integer] :offset Index of the first document in the page
264
268
  # @return [Array<(GetEmailCampaigns, Fixnum, Hash)>] GetEmailCampaigns data, response status code and response headers
@@ -283,6 +287,8 @@ module SibApiV3Sdk
283
287
  query_params = {}
284
288
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
285
289
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
290
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
291
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
286
292
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
287
293
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
288
294
 
@@ -21,7 +21,7 @@ module SibApiV3Sdk
21
21
  # List of 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'}]
22
22
  attr_accessor :enumeration
23
23
 
24
- # Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute )
24
+ # Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute )
25
25
  attr_accessor :type
26
26
 
27
27
  class EnumAttributeValidator
@@ -98,7 +98,7 @@ module SibApiV3Sdk
98
98
  # Check to see if the all the properties in the model are valid
99
99
  # @return true if the model is valid
100
100
  def valid?
101
- type_validator = EnumAttributeValidator.new('String', ["text", "date", "float", "id", "category"])
101
+ type_validator = EnumAttributeValidator.new('String', ["text", "date", "float", "boolean", "id", "category"])
102
102
  return false unless type_validator.valid?(@type)
103
103
  return true
104
104
  end
@@ -106,7 +106,7 @@ module SibApiV3Sdk
106
106
  # Custom attribute writer method checking allowed values (enum).
107
107
  # @param [Object] type Object to be assigned
108
108
  def type=(type)
109
- validator = EnumAttributeValidator.new('String', ["text", "date", "float", "id", "category"])
109
+ validator = EnumAttributeValidator.new('String', ["text", "date", "float", "boolean", "id", "category"])
110
110
  unless validator.valid?(type)
111
111
  fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
112
112
  end
@@ -74,6 +74,9 @@ module SibApiV3Sdk
74
74
  # FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times
75
75
  attr_accessor :recurring
76
76
 
77
+ # Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'
78
+ attr_accessor :sent_date
79
+
77
80
  attr_accessor :recipients
78
81
 
79
82
  attr_accessor :statistics
@@ -123,6 +126,7 @@ module SibApiV3Sdk
123
126
  :'inline_image_activation' => :'inlineImageActivation',
124
127
  :'mirror_active' => :'mirrorActive',
125
128
  :'recurring' => :'recurring',
129
+ :'sent_date' => :'sentDate',
126
130
  :'recipients' => :'recipients',
127
131
  :'statistics' => :'statistics'
128
132
  }
@@ -151,6 +155,7 @@ module SibApiV3Sdk
151
155
  :'inline_image_activation' => :'BOOLEAN',
152
156
  :'mirror_active' => :'BOOLEAN',
153
157
  :'recurring' => :'BOOLEAN',
158
+ :'sent_date' => :'DateTime',
154
159
  :'recipients' => :'Object',
155
160
  :'statistics' => :'Object'
156
161
  }
@@ -244,6 +249,10 @@ module SibApiV3Sdk
244
249
  self.recurring = attributes[:'recurring']
245
250
  end
246
251
 
252
+ if attributes.has_key?(:'sentDate')
253
+ self.sent_date = attributes[:'sentDate']
254
+ end
255
+
247
256
  if attributes.has_key?(:'recipients')
248
257
  self.recipients = attributes[:'recipients']
249
258
  end
@@ -401,6 +410,7 @@ module SibApiV3Sdk
401
410
  inline_image_activation == o.inline_image_activation &&
402
411
  mirror_active == o.mirror_active &&
403
412
  recurring == o.recurring &&
413
+ sent_date == o.sent_date &&
404
414
  recipients == o.recipients &&
405
415
  statistics == o.statistics
406
416
  end
@@ -414,7 +424,7 @@ module SibApiV3Sdk
414
424
  # Calculates hash code according to all attributes.
415
425
  # @return [Fixnum] Hash code
416
426
  def hash
417
- [id, name, subject, type, status, scheduled_at, test_sent, header, footer, sender, reply_to, to_field, html_content, share_link, tag, created_at, modified_at, inline_image_activation, mirror_active, recurring, recipients, statistics].hash
427
+ [id, name, subject, type, status, scheduled_at, 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
418
428
  end
419
429
 
420
430
  # Builds the object from hash
@@ -74,6 +74,9 @@ module SibApiV3Sdk
74
74
  # FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times
75
75
  attr_accessor :recurring
76
76
 
77
+ # Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'
78
+ attr_accessor :sent_date
79
+
77
80
  class EnumAttributeValidator
78
81
  attr_reader :datatype
79
82
  attr_reader :allowable_values
@@ -118,7 +121,8 @@ module SibApiV3Sdk
118
121
  :'modified_at' => :'modifiedAt',
119
122
  :'inline_image_activation' => :'inlineImageActivation',
120
123
  :'mirror_active' => :'mirrorActive',
121
- :'recurring' => :'recurring'
124
+ :'recurring' => :'recurring',
125
+ :'sent_date' => :'sentDate'
122
126
  }
123
127
  end
124
128
 
@@ -144,7 +148,8 @@ module SibApiV3Sdk
144
148
  :'modified_at' => :'DateTime',
145
149
  :'inline_image_activation' => :'BOOLEAN',
146
150
  :'mirror_active' => :'BOOLEAN',
147
- :'recurring' => :'BOOLEAN'
151
+ :'recurring' => :'BOOLEAN',
152
+ :'sent_date' => :'DateTime'
148
153
  }
149
154
  end
150
155
 
@@ -236,6 +241,10 @@ module SibApiV3Sdk
236
241
  self.recurring = attributes[:'recurring']
237
242
  end
238
243
 
244
+ if attributes.has_key?(:'sentDate')
245
+ self.sent_date = attributes[:'sentDate']
246
+ end
247
+
239
248
  end
240
249
 
241
250
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -374,7 +383,8 @@ module SibApiV3Sdk
374
383
  modified_at == o.modified_at &&
375
384
  inline_image_activation == o.inline_image_activation &&
376
385
  mirror_active == o.mirror_active &&
377
- recurring == o.recurring
386
+ recurring == o.recurring &&
387
+ sent_date == o.sent_date
378
388
  end
379
389
 
380
390
  # @see the `==` method
@@ -386,7 +396,7 @@ module SibApiV3Sdk
386
396
  # Calculates hash code according to all attributes.
387
397
  # @return [Fixnum] Hash code
388
398
  def hash
389
- [id, name, subject, type, status, scheduled_at, test_sent, header, footer, sender, reply_to, to_field, html_content, share_link, tag, created_at, modified_at, inline_image_activation, mirror_active, recurring].hash
399
+ [id, name, subject, type, status, scheduled_at, 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
390
400
  end
391
401
 
392
402
  # Builds the object from hash
@@ -21,7 +21,7 @@ module SibApiV3Sdk
21
21
  # Mobile number to send SMS with the country code
22
22
  attr_accessor :recipient
23
23
 
24
- # Content of the message. If more than 160 characters long, multiple text messages will be sent
24
+ # Content of the message. If more than 160 characters long, will be sent as multiple text messages
25
25
  attr_accessor :content
26
26
 
27
27
  # Type of the SMS
@@ -135,10 +135,6 @@ module SibApiV3Sdk
135
135
  invalid_properties.push("invalid value for 'content', content cannot be nil.")
136
136
  end
137
137
 
138
- if @content.to_s.length > 160
139
- invalid_properties.push("invalid value for 'content', the character length must be smaller than or equal to 160.")
140
- end
141
-
142
138
  return invalid_properties
143
139
  end
144
140
 
@@ -149,7 +145,6 @@ module SibApiV3Sdk
149
145
  return false if @sender.to_s.length > 11
150
146
  return false if @recipient.nil?
151
147
  return false if @content.nil?
152
- return false if @content.to_s.length > 160
153
148
  type_validator = EnumAttributeValidator.new('String', ["transactional", "marketing"])
154
149
  return false unless type_validator.valid?(@type)
155
150
  return true
@@ -169,20 +164,6 @@ module SibApiV3Sdk
169
164
  @sender = sender
170
165
  end
171
166
 
172
- # Custom attribute writer method with validation
173
- # @param [Object] content Value to be assigned
174
- def content=(content)
175
- if content.nil?
176
- fail ArgumentError, "content cannot be nil"
177
- end
178
-
179
- if content.to_s.length > 160
180
- fail ArgumentError, "invalid value for 'content', the character length must be smaller than or equal to 160."
181
- end
182
-
183
- @content = content
184
- end
185
-
186
167
  # Custom attribute writer method checking allowed values (enum).
187
168
  # @param [Object] type Object to be assigned
188
169
  def type=(type)
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.3.1
11
11
  =end
12
12
 
13
13
  module SibApiV3Sdk
14
- VERSION = "5.0.0"
14
+ VERSION = "5.1.0"
15
15
  end
@@ -87,6 +87,8 @@ describe 'EmailCampaignsApi' do
87
87
  # @param [Hash] opts the optional parameters
88
88
  # @option opts [String] :type Filter on the type of the campaigns
89
89
  # @option opts [String] :status Filter on the status of the campaign
90
+ # @option opts [DateTime] :start_date Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either &#39;status&#39; not passed and if passed is set to &#39;sent&#39; )
91
+ # @option opts [DateTime] :end_date Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either &#39;status&#39; not passed and if passed is set to &#39;sent&#39; )
90
92
  # @option opts [Integer] :limit Number of documents per page
91
93
  # @option opts [Integer] :offset Index of the first document in the page
92
94
  # @return [GetEmailCampaigns]
@@ -47,7 +47,7 @@ describe 'CreateAttribute' do
47
47
  describe 'test attribute "type"' do
48
48
  it 'should work' do
49
49
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- #validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["text", "date", "float", "id", "category"])
50
+ #validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["text", "date", "float", "boolean", "id", "category"])
51
51
  #validator.allowable_values.each do |value|
52
52
  # expect { @instance.type = value }.not_to raise_error
53
53
  #end
@@ -160,6 +160,12 @@ describe 'GetEmailCampaign' do
160
160
  end
161
161
  end
162
162
 
163
+ describe 'test attribute "sent_date"' do
164
+ it 'should work' do
165
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
166
+ end
167
+ end
168
+
163
169
  describe 'test attribute "recipients"' do
164
170
  it 'should work' do
165
171
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -160,5 +160,11 @@ describe 'GetExtendedCampaignOverview' do
160
160
  end
161
161
  end
162
162
 
163
+ describe 'test attribute "sent_date"' do
164
+ it 'should work' do
165
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
166
+ end
167
+ end
168
+
163
169
  end
164
170
 
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.0.0
4
+ version: 5.1.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: 2018-05-15 00:00:00.000000000 Z
11
+ date: 2018-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -713,7 +713,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
713
713
  version: '0'
714
714
  requirements: []
715
715
  rubyforge_project:
716
- rubygems_version: 2.0.14.1
716
+ rubygems_version: 2.7.7
717
717
  signing_key:
718
718
  specification_version: 4
719
719
  summary: SendinBlue API V3 Ruby Gem