sib-api-v3-sdk 2.1.0 → 2.1.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 973ba202b9197a44a95a6e80d9171c9c2d0bd421
|
4
|
+
data.tar.gz: ba778c105779cffdc8a4be846aa41d90e99c0986
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49937db53f14ef81b0ac9c45c9e4bf8d723aa0e3266c5fa62f5ca19cc940527fbd24745c7bd6c95acfe5a6149e3f14b6d86576c63a638c69155280e26869f10a
|
7
|
+
data.tar.gz: 5a94b714a5d542f440501805865f1c95a6d0864fbdb1a892cdcd43e17a95ebc63a1b67a82e4df1332a8a6b7496539aaa2405d2e663fc52f2ba156b989d10de1b
|
@@ -24,6 +24,27 @@ module SibApiV3Sdk
|
|
24
24
|
# Events triggering the webhook. Possible values for Transactional type webhook – 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 and delivered
|
25
25
|
attr_accessor :events
|
26
26
|
|
27
|
+
class EnumAttributeValidator
|
28
|
+
attr_reader :datatype
|
29
|
+
attr_reader :allowable_values
|
30
|
+
|
31
|
+
def initialize(datatype, allowable_values)
|
32
|
+
@allowable_values = allowable_values.map do |value|
|
33
|
+
case datatype.to_s
|
34
|
+
when /Integer/i
|
35
|
+
value.to_i
|
36
|
+
when /Float/i
|
37
|
+
value.to_f
|
38
|
+
else
|
39
|
+
value
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def valid?(value)
|
45
|
+
!value || allowable_values.include?(value)
|
46
|
+
end
|
47
|
+
end
|
27
48
|
|
28
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
29
50
|
def self.attribute_map
|
@@ -47,6 +47,10 @@ describe 'CreateWebhook' do
|
|
47
47
|
describe 'test attribute "events"' 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('Array<String>', ["hardBounce", "softBounce", "blocked", "spam", "delivered", "request", "click", "invalid", "deferred", "opened", "uniqueOpened", "unsubscribed", "listAddition"])
|
51
|
+
#validator.allowable_values.each do |value|
|
52
|
+
# expect { @instance.events = value }.not_to raise_error
|
53
|
+
#end
|
50
54
|
end
|
51
55
|
end
|
52
56
|
|
@@ -47,6 +47,10 @@ describe 'UpdateWebhook' do
|
|
47
47
|
describe 'test attribute "events"' 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('Array<String>', ["hardBounce", "softBounce", "blocked", "spam", "delivered", "request", "click", "invalid", "deferred", "opened", "uniqueOpened", "unsubscribed", "listAddition"])
|
51
|
+
#validator.allowable_values.each do |value|
|
52
|
+
# expect { @instance.events = value }.not_to raise_error
|
53
|
+
#end
|
50
54
|
end
|
51
55
|
end
|
52
56
|
|
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: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SendinBlue Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|