sib-api-v3-sdk 7.0.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15f9d65e78404fbe6548bcc5f5a91d6794141a01a6a1aa94b794350899f56056
4
- data.tar.gz: 34be33be0e4e1ceae8f6eef3d0fd44f6ef1a6f0de3d05dd767423ec24eb61147
3
+ metadata.gz: 2d5ae9f7677f08c68dd975a99087579f7f9c287ea914ead9c8e0dc334372a8cb
4
+ data.tar.gz: b76d9f5fed3f391630b036afca1ba0b4d2c84c378f9da690dbf5583fb3b81397
5
5
  SHA512:
6
- metadata.gz: f27089097e8b4027f0b76abb03011a3e67da76c4a642afad5089d52782bd3111bb6845e04ec7d3cc5d86695b0d8f8a7cadc4d77363a320920e9def9be8a260bb
7
- data.tar.gz: 7c857139230de0670efb4b4551dba12217a2c10ab73872d1131fca1710129c1d8ea85f191f2687acebe4912ced89644055ffda01af1e3dbe8b6b2b8c4d015df4
6
+ metadata.gz: 6fd7286ebde36f745c46dd47abb461afa013266a304914070dfcff437b47947df11006243072e43eae5c5cf2bebf9243dd427974a0c328d7449f820dab2cfed6
7
+ data.tar.gz: 496d441724ba52e603826505d2959b1c9adcb50f01990543659ae21374f96104f5c52da5ad25c9f2502d5c3a79178120e76e1256857665c351fc0a387e230d63
@@ -4,6 +4,6 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **event_time** | **DateTime** | UTC date-time of the event |
7
- **ip** | **String** | IP from which the user has been unsubscribed |
7
+ **ip** | **String** | IP from which the user has been unsubscribed | [optional]
8
8
 
9
9
 
@@ -5,6 +5,6 @@ Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **campaign_id** | **Integer** | ID of the campaign which generated the event |
7
7
  **event_time** | **DateTime** | UTC date-time of the event |
8
- **ip** | **String** | IP from which the user has unsubscribed |
8
+ **ip** | **String** | IP from which the user has unsubscribed | [optional]
9
9
 
10
10
 
@@ -3,11 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **subject** | **String** | Subject of the email message |
7
6
  **to** | **Array<String>** | Email addresses of the recipients |
8
- **content_type** | **String** | Type of the message body | [optional] [default to 'html']
9
- **bcc** | **Array<String>** | Email addresses of the recipients in bcc | [optional]
10
- **cc** | **Array<String>** | Email addresses of the recipients in cc | [optional]
11
- **body** | **String** | Body of the email message |
7
+ **body** | **String** | Custom text message to be presented in the report email. |
12
8
 
13
9
 
@@ -61,10 +61,6 @@ module SibApiV3Sdk
61
61
  invalid_properties.push('invalid value for "event_time", event_time cannot be nil.')
62
62
  end
63
63
 
64
- if @ip.nil?
65
- invalid_properties.push('invalid value for "ip", ip cannot be nil.')
66
- end
67
-
68
64
  invalid_properties
69
65
  end
70
66
 
@@ -72,7 +68,6 @@ module SibApiV3Sdk
72
68
  # @return true if the model is valid
73
69
  def valid?
74
70
  return false if @event_time.nil?
75
- return false if @ip.nil?
76
71
  true
77
72
  end
78
73
 
@@ -74,10 +74,6 @@ module SibApiV3Sdk
74
74
  invalid_properties.push('invalid value for "event_time", event_time cannot be nil.')
75
75
  end
76
76
 
77
- if @ip.nil?
78
- invalid_properties.push('invalid value for "ip", ip cannot be nil.')
79
- end
80
-
81
77
  invalid_properties
82
78
  end
83
79
 
@@ -86,7 +82,6 @@ module SibApiV3Sdk
86
82
  def valid?
87
83
  return false if @campaign_id.nil?
88
84
  return false if @event_time.nil?
89
- return false if @ip.nil?
90
85
  true
91
86
  end
92
87
 
@@ -13,56 +13,18 @@ Swagger Codegen version: 2.4.12
13
13
  require 'date'
14
14
 
15
15
  module SibApiV3Sdk
16
- # Email sending credentials including subject, body, to, cc etc.
16
+ # Custom attributes for the report email.
17
17
  class SendReportEmail
18
- # Subject of the email message
19
- attr_accessor :subject
20
-
21
18
  # Email addresses of the recipients
22
19
  attr_accessor :to
23
20
 
24
- # Type of the message body
25
- attr_accessor :content_type
26
-
27
- # Email addresses of the recipients in bcc
28
- attr_accessor :bcc
29
-
30
- # Email addresses of the recipients in cc
31
- attr_accessor :cc
32
-
33
- # Body of the email message
21
+ # Custom text message to be presented in the report email.
34
22
  attr_accessor :body
35
23
 
36
- class EnumAttributeValidator
37
- attr_reader :datatype
38
- attr_reader :allowable_values
39
-
40
- def initialize(datatype, allowable_values)
41
- @allowable_values = allowable_values.map do |value|
42
- case datatype.to_s
43
- when /Integer/i
44
- value.to_i
45
- when /Float/i
46
- value.to_f
47
- else
48
- value
49
- end
50
- end
51
- end
52
-
53
- def valid?(value)
54
- !value || allowable_values.include?(value)
55
- end
56
- end
57
-
58
24
  # Attribute mapping from ruby-style variable name to JSON key.
59
25
  def self.attribute_map
60
26
  {
61
- :'subject' => :'subject',
62
27
  :'to' => :'to',
63
- :'content_type' => :'contentType',
64
- :'bcc' => :'bcc',
65
- :'cc' => :'cc',
66
28
  :'body' => :'body'
67
29
  }
68
30
  end
@@ -70,11 +32,7 @@ module SibApiV3Sdk
70
32
  # Attribute type mapping.
71
33
  def self.swagger_types
72
34
  {
73
- :'subject' => :'String',
74
35
  :'to' => :'Array<String>',
75
- :'content_type' => :'String',
76
- :'bcc' => :'Array<String>',
77
- :'cc' => :'Array<String>',
78
36
  :'body' => :'String'
79
37
  }
80
38
  end
@@ -87,34 +45,12 @@ module SibApiV3Sdk
87
45
  # convert string to symbol for hash key
88
46
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
89
47
 
90
- if attributes.has_key?(:'subject')
91
- self.subject = attributes[:'subject']
92
- end
93
-
94
48
  if attributes.has_key?(:'to')
95
49
  if (value = attributes[:'to']).is_a?(Array)
96
50
  self.to = value
97
51
  end
98
52
  end
99
53
 
100
- if attributes.has_key?(:'contentType')
101
- self.content_type = attributes[:'contentType']
102
- else
103
- self.content_type = 'html'
104
- end
105
-
106
- if attributes.has_key?(:'bcc')
107
- if (value = attributes[:'bcc']).is_a?(Array)
108
- self.bcc = value
109
- end
110
- end
111
-
112
- if attributes.has_key?(:'cc')
113
- if (value = attributes[:'cc']).is_a?(Array)
114
- self.cc = value
115
- end
116
- end
117
-
118
54
  if attributes.has_key?(:'body')
119
55
  self.body = attributes[:'body']
120
56
  end
@@ -124,10 +60,6 @@ module SibApiV3Sdk
124
60
  # @return Array for valid properties with the reasons
125
61
  def list_invalid_properties
126
62
  invalid_properties = Array.new
127
- if @subject.nil?
128
- invalid_properties.push('invalid value for "subject", subject cannot be nil.')
129
- end
130
-
131
63
  if @to.nil?
132
64
  invalid_properties.push('invalid value for "to", to cannot be nil.')
133
65
  end
@@ -142,34 +74,17 @@ module SibApiV3Sdk
142
74
  # Check to see if the all the properties in the model are valid
143
75
  # @return true if the model is valid
144
76
  def valid?
145
- return false if @subject.nil?
146
77
  return false if @to.nil?
147
- content_type_validator = EnumAttributeValidator.new('String', ['text', 'html'])
148
- return false unless content_type_validator.valid?(@content_type)
149
78
  return false if @body.nil?
150
79
  true
151
80
  end
152
81
 
153
- # Custom attribute writer method checking allowed values (enum).
154
- # @param [Object] content_type Object to be assigned
155
- def content_type=(content_type)
156
- validator = EnumAttributeValidator.new('String', ['text', 'html'])
157
- unless validator.valid?(content_type)
158
- fail ArgumentError, 'invalid value for "content_type", must be one of #{validator.allowable_values}.'
159
- end
160
- @content_type = content_type
161
- end
162
-
163
82
  # Checks equality by comparing each attribute.
164
83
  # @param [Object] Object to be compared
165
84
  def ==(o)
166
85
  return true if self.equal?(o)
167
86
  self.class == o.class &&
168
- subject == o.subject &&
169
87
  to == o.to &&
170
- content_type == o.content_type &&
171
- bcc == o.bcc &&
172
- cc == o.cc &&
173
88
  body == o.body
174
89
  end
175
90
 
@@ -182,7 +97,7 @@ module SibApiV3Sdk
182
97
  # Calculates hash code according to all attributes.
183
98
  # @return [Fixnum] Hash code
184
99
  def hash
185
- [subject, to, content_type, bcc, cc, body].hash
100
+ [to, body].hash
186
101
  end
187
102
 
188
103
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  module SibApiV3Sdk
14
- VERSION = "7.0.0"
14
+ VERSION = "7.1.0"
15
15
  end
@@ -32,40 +32,12 @@ describe 'SendReportEmail' do
32
32
  expect(@instance).to be_instance_of(SibApiV3Sdk::SendReportEmail)
33
33
  end
34
34
  end
35
- describe 'test attribute "subject"' 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
35
  describe 'test attribute "to"' do
42
36
  it 'should work' do
43
37
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
38
  end
45
39
  end
46
40
 
47
- describe 'test attribute "content_type"' do
48
- it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["text", "html"])
51
- # validator.allowable_values.each do |value|
52
- # expect { @instance.content_type = value }.not_to raise_error
53
- # end
54
- end
55
- end
56
-
57
- describe 'test attribute "bcc"' do
58
- it 'should work' do
59
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
- end
61
- end
62
-
63
- describe 'test attribute "cc"' do
64
- it 'should work' do
65
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
66
- end
67
- end
68
-
69
41
  describe 'test attribute "body"' do
70
42
  it 'should work' do
71
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
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: 7.0.0
4
+ version: 7.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: 2020-09-23 00:00:00.000000000 Z
11
+ date: 2020-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -777,7 +777,6 @@ files:
777
777
  - spec/models/update_webhook_spec.rb
778
778
  - spec/models/upload_image_to_gallery_spec.rb
779
779
  - spec/spec_helper.rb
780
- - testfile.rb
781
780
  homepage: https://www.sendinblue.com/
782
781
  licenses:
783
782
  - MIT
@@ -1,23 +0,0 @@
1
- # load the gem
2
- require 'sib-api-v3-sdk'
3
- # setup authorization
4
- SibApiV3Sdk.configure do |config|
5
- # Configure API key authorization: api-key
6
- config.api_key['api-key'] = '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'
7
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
8
- #config.api_key_prefix['api-key'] = 'Bearer'
9
- # Configure API key authorization: partner-key
10
- # config.api_key['partner-key'] = 'YOUR API KEY'
11
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
12
- #config.api_key_prefix['partner-key'] = 'Bearer'
13
- end
14
-
15
- api_instance = SibApiV3Sdk::TransactionalEmailsApi.new
16
- template_id = 56 # Integer | id of the template
17
- begin
18
- #Returns the template information
19
- result = api_instance.get_smtp_template(template_id)
20
- p result
21
- rescue SibApiV3Sdk::ApiError => e
22
- puts "Exception when calling TransactionalEmailsApi->get_smtp_template: #{e}"
23
- end