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: 24de2aa04d387c34ad71b9b3214e49c1d8cbbf77
4
- data.tar.gz: 82c94392593df1f9c3810b1cf459f74e7e3ea2e3
3
+ metadata.gz: 973ba202b9197a44a95a6e80d9171c9c2d0bd421
4
+ data.tar.gz: ba778c105779cffdc8a4be846aa41d90e99c0986
5
5
  SHA512:
6
- metadata.gz: 0721bbe1879af084ad02d088fc027d348915a277d4ba3ce684bbca214185a5925b2ff42feab4cc359e5d8337fe62e6a4ff92215b9f9c122e2d9bd5723464b408
7
- data.tar.gz: 153185b069137d2bce64335e4216855d2ec0237634ebd09629baebfbe08e49f9f4bb0abe36b771bc11aca2dff5d97d2862afd183b1efdf8cb991b3e8e70d57ad
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
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.2.3
11
11
  =end
12
12
 
13
13
  module SibApiV3Sdk
14
- VERSION = "2.1.0"
14
+ VERSION = "2.1.1"
15
15
  end
@@ -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.0
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-09 00:00:00.000000000 Z
11
+ date: 2017-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus