sib-api-v3-sdk 8.0.0 → 8.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.
@@ -0,0 +1,206 @@
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 | | 406 | Error. Not Acceptable |
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.4.19
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module SibApiV3Sdk
16
+ # Task types details
17
+ class TaskTypes
18
+ # Id of task type
19
+ attr_accessor :id
20
+
21
+ # Icon of task type
22
+ attr_accessor :icon
23
+
24
+ # Title of task type
25
+ attr_accessor :title
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'id' => :'id',
31
+ :'icon' => :'icon',
32
+ :'title' => :'title'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.swagger_types
38
+ {
39
+ :'id' => :'String',
40
+ :'icon' => :'String',
41
+ :'title' => :'String'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
+
53
+ if attributes.has_key?(:'id')
54
+ self.id = attributes[:'id']
55
+ end
56
+
57
+ if attributes.has_key?(:'icon')
58
+ self.icon = attributes[:'icon']
59
+ end
60
+
61
+ if attributes.has_key?(:'title')
62
+ self.title = attributes[:'title']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ id == o.id &&
85
+ icon == o.icon &&
86
+ title == o.title
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Fixnum] Hash code
97
+ def hash
98
+ [id, icon, title].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ self.class.swagger_types.each_pair do |key, type|
107
+ if type =~ /\AArray<(.*)>/i
108
+ # check to ensure the input is an array given that the attribute
109
+ # is documented as an array but the input is not
110
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
112
+ end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
116
+ end
117
+
118
+ self
119
+ end
120
+
121
+ # Deserializes the data based on type
122
+ # @param string type Data type
123
+ # @param string value Value to be deserialized
124
+ # @return [Object] Deserialized data
125
+ def _deserialize(type, value)
126
+ case type.to_sym
127
+ when :DateTime
128
+ DateTime.parse(value)
129
+ when :Date
130
+ Date.parse(value)
131
+ when :String
132
+ value.to_s
133
+ when :Integer
134
+ value.to_i
135
+ when :Float
136
+ value.to_f
137
+ when :BOOLEAN
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
+ true
140
+ else
141
+ false
142
+ end
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ else # model
158
+ temp_model = SibApiV3Sdk.const_get(type).new
159
+ temp_model.build_from_hash(value)
160
+ end
161
+ end
162
+
163
+ # Returns the string representation of the object
164
+ # @return [String] String presentation of the object
165
+ def to_s
166
+ to_hash.to_s
167
+ end
168
+
169
+ # to_body is an alias to to_hash (backward compatibility)
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_body
172
+ to_hash
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ next if value.nil?
182
+ hash[param] = _to_hash(value)
183
+ end
184
+ hash
185
+ end
186
+
187
+ # Outputs non-array value in the form of hash
188
+ # For object, use to_hash. Otherwise, just return the value
189
+ # @param [Object] value Any valid value
190
+ # @return [Hash] Returns the value in the form of hash
191
+ def _to_hash(value)
192
+ if value.is_a?(Array)
193
+ value.compact.map { |v| _to_hash(v) }
194
+ elsif value.is_a?(Hash)
195
+ {}.tap do |hash|
196
+ value.each { |k, v| hash[k] = _to_hash(v) }
197
+ end
198
+ elsif value.respond_to? :to_hash
199
+ value.to_hash
200
+ else
201
+ value
202
+ end
203
+ end
204
+
205
+ end
206
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.19
11
11
  =end
12
12
 
13
13
  module SibApiV3Sdk
14
- VERSION = "8.0.0"
14
+ VERSION = "8.1.0"
15
15
  end
@@ -215,6 +215,7 @@ require 'sib-api-v3-sdk/models/sub_accounts_response'
215
215
  require 'sib-api-v3-sdk/models/sub_accounts_response_sub_accounts'
216
216
  require 'sib-api-v3-sdk/models/task'
217
217
  require 'sib-api-v3-sdk/models/task_reminder'
218
+ require 'sib-api-v3-sdk/models/task_types'
218
219
  require 'sib-api-v3-sdk/models/update_attribute'
219
220
  require 'sib-api-v3-sdk/models/update_attribute_enumeration'
220
221
  require 'sib-api-v3-sdk/models/update_batch_contacts'
@@ -33,7 +33,7 @@ describe 'CRMApi' do
33
33
  end
34
34
 
35
35
  # unit tests for crm_files_id_data_get
36
- # Get file data by id.
36
+ # Get file details
37
37
  # @param id File id to get file data.
38
38
  # @param [Hash] opts the optional parameters
39
39
  # @return [FileData]
@@ -44,7 +44,7 @@ describe 'CRMApi' do
44
44
  end
45
45
 
46
46
  # unit tests for crm_files_id_delete
47
- # Delete file.
47
+ # Delete a file
48
48
  # @param id File id to delete.
49
49
  # @param [Hash] opts the optional parameters
50
50
  # @return [nil]
@@ -55,7 +55,7 @@ describe 'CRMApi' do
55
55
  end
56
56
 
57
57
  # unit tests for crm_files_id_get
58
- # Download file by id.
58
+ # Download a file
59
59
  # @param id File id to download.
60
60
  # @param [Hash] opts the optional parameters
61
61
  # @return [nil]
@@ -66,7 +66,7 @@ describe 'CRMApi' do
66
66
  end
67
67
 
68
68
  # unit tests for crm_files_post
69
- # Upload and create file.
69
+ # Upload a file
70
70
  # @param file File data to create a file.
71
71
  # @param [Hash] opts the optional parameters
72
72
  # @option opts [Array<String>] :deals_ids Deal ids linked to a file
@@ -78,7 +78,7 @@ describe 'CRMApi' do
78
78
  end
79
79
 
80
80
  # unit tests for crm_notes_id_delete
81
- # Delete Note by ID
81
+ # Delete a note
82
82
  # @param id Note ID to delete
83
83
  # @param [Hash] opts the optional parameters
84
84
  # @return [nil]
@@ -89,7 +89,7 @@ describe 'CRMApi' do
89
89
  end
90
90
 
91
91
  # unit tests for crm_notes_id_get
92
- # Get one Note by ID
92
+ # Get a note
93
93
  # @param id Note ID to get
94
94
  # @param [Hash] opts the optional parameters
95
95
  # @return [Note]
@@ -112,7 +112,7 @@ describe 'CRMApi' do
112
112
  end
113
113
 
114
114
  # unit tests for crm_notes_post
115
- # Create a new Note
115
+ # Create a note
116
116
  # @param body Note data to create a note.
117
117
  # @param [Hash] opts the optional parameters
118
118
  # @return [Note]
@@ -123,7 +123,7 @@ describe 'CRMApi' do
123
123
  end
124
124
 
125
125
  # unit tests for crm_tasks_id_delete
126
- # Delete Task by id
126
+ # Delete a task
127
127
  # @param id
128
128
  # @param [Hash] opts the optional parameters
129
129
  # @return [nil]
@@ -134,7 +134,7 @@ describe 'CRMApi' do
134
134
  end
135
135
 
136
136
  # unit tests for crm_tasks_id_get
137
- # Get one Task by ID
137
+ # Get a task
138
138
  # @param id
139
139
  # @param [Hash] opts the optional parameters
140
140
  # @return [Task]
@@ -145,7 +145,7 @@ describe 'CRMApi' do
145
145
  end
146
146
 
147
147
  # unit tests for crm_tasks_id_patch
148
- # Update partial existing task
148
+ # Update a task
149
149
  # @param id
150
150
  # @param body Updated task details.
151
151
  # @param [Hash] opts the optional parameters
@@ -157,7 +157,7 @@ describe 'CRMApi' do
157
157
  end
158
158
 
159
159
  # unit tests for crm_tasks_post
160
- # Create a new Task
160
+ # Create a task
161
161
  # @param body Task name.
162
162
  # @param [Hash] opts the optional parameters
163
163
  # @return [Task]
@@ -167,4 +167,14 @@ describe 'CRMApi' do
167
167
  end
168
168
  end
169
169
 
170
+ # unit tests for crm_tasktypes_get
171
+ # Get all task types
172
+ # @param [Hash] opts the optional parameters
173
+ # @return [TaskTypes]
174
+ describe 'crm_tasktypes_get test' do
175
+ it 'should work' do
176
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
177
+ end
178
+ end
179
+
170
180
  end
@@ -56,6 +56,17 @@ describe 'MasterAccountApi' do
56
56
  end
57
57
  end
58
58
 
59
+ # unit tests for corporate_sub_account_id_delete
60
+ # Delete a sub-account
61
+ # @param id Id of the sub-account organization to be deleted
62
+ # @param [Hash] opts the optional parameters
63
+ # @return [nil]
64
+ describe 'corporate_sub_account_id_delete test' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
59
70
  # unit tests for corporate_sub_account_id_get
60
71
  # Get sub-account details
61
72
  # This endpoint will provide the details of specified sub-account organization
@@ -38,6 +38,12 @@ describe 'CreateSubAccount' do
38
38
  end
39
39
  end
40
40
 
41
+ describe 'test attribute "email"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
41
47
  describe 'test attribute "language"' do
42
48
  it 'should work' do
43
49
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -59,7 +59,7 @@ describe 'GetEmailEventReportEvents' do
59
59
  describe 'test attribute "event"' do
60
60
  it 'should work' do
61
61
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bounces", "hardBounces", "softBounces", "delivered", "spam", "requests", "opened", "clicks", "invalid", "deferred", "blocked", "unsubscribed", "error"])
62
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bounces", "hardBounces", "softBounces", "delivered", "spam", "requests", "opened", "clicks", "invalid", "deferred", "blocked", "unsubscribed", "error", "loadedByProxy"])
63
63
  # validator.allowable_values.each do |value|
64
64
  # expect { @instance.event = value }.not_to raise_error
65
65
  # end
@@ -44,6 +44,12 @@ describe 'RequestContactImport' do
44
44
  end
45
45
  end
46
46
 
47
+ describe 'test attribute "json_body"' 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
  describe 'test attribute "list_ids"' do
48
54
  it 'should work' do
49
55
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -0,0 +1,53 @@
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 | | 406 | Error. Not Acceptable |
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.4.19
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for SibApiV3Sdk::TaskTypes
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'TaskTypes' do
21
+ before do
22
+ # run before each test
23
+ @instance = SibApiV3Sdk::TaskTypes.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of TaskTypes' do
31
+ it 'should create an instance of TaskTypes' do
32
+ expect(@instance).to be_instance_of(SibApiV3Sdk::TaskTypes)
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
+ describe 'test attribute "icon"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "title"' 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
+
53
+ end
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: 8.0.0
4
+ version: 8.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: 2022-01-05 00:00:00.000000000 Z
11
+ date: 2022-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -432,6 +432,7 @@ files:
432
432
  - docs/SubAccountsResponseSubAccounts.md
433
433
  - docs/Task.md
434
434
  - docs/TaskReminder.md
435
+ - docs/TaskTypes.md
435
436
  - docs/TransactionalEmailsApi.md
436
437
  - docs/TransactionalSMSApi.md
437
438
  - docs/UpdateAttribute.md
@@ -673,6 +674,7 @@ files:
673
674
  - lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb
674
675
  - lib/sib-api-v3-sdk/models/task.rb
675
676
  - lib/sib-api-v3-sdk/models/task_reminder.rb
677
+ - lib/sib-api-v3-sdk/models/task_types.rb
676
678
  - lib/sib-api-v3-sdk/models/update_attribute.rb
677
679
  - lib/sib-api-v3-sdk/models/update_attribute_enumeration.rb
678
680
  - lib/sib-api-v3-sdk/models/update_batch_contacts.rb
@@ -911,6 +913,7 @@ files:
911
913
  - spec/models/sub_accounts_response_sub_accounts_spec.rb
912
914
  - spec/models/task_reminder_spec.rb
913
915
  - spec/models/task_spec.rb
916
+ - spec/models/task_types_spec.rb
914
917
  - spec/models/update_attribute_enumeration_spec.rb
915
918
  - spec/models/update_attribute_spec.rb
916
919
  - spec/models/update_batch_contacts_contacts_spec.rb
@@ -1106,6 +1109,7 @@ test_files:
1106
1109
  - spec/models/get_transac_blocked_contacts_spec.rb
1107
1110
  - spec/models/create_contact_spec.rb
1108
1111
  - spec/models/get_contact_campaign_stats_unsubscriptions_spec.rb
1112
+ - spec/models/task_types_spec.rb
1109
1113
  - spec/models/get_senders_list_senders_spec.rb
1110
1114
  - spec/models/update_attribute_enumeration_spec.rb
1111
1115
  - spec/models/body_spec.rb