sendpost_ruby_sdk 1.0.0 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +155 -1
  3. data/config-ruby.json +2 -2
  4. data/docs/CountStat.md +18 -0
  5. data/docs/DeleteResponse.md +20 -0
  6. data/docs/EventMetadata.md +4 -0
  7. data/docs/RDSuppression.md +18 -0
  8. data/docs/RSuppression.md +24 -0
  9. data/docs/Suppression.md +26 -0
  10. data/docs/SuppressionApi.md +293 -0
  11. data/docs/SuppressionEmail.md +18 -0
  12. data/generate-libs.bash +1 -1
  13. data/git_push.sh +2 -2
  14. data/lib/sendpost_ruby_sdk/api/email_api.rb +1 -1
  15. data/lib/sendpost_ruby_sdk/api/suppression_api.rb +305 -0
  16. data/lib/sendpost_ruby_sdk/api_client.rb +1 -1
  17. data/lib/sendpost_ruby_sdk/api_error.rb +1 -1
  18. data/lib/sendpost_ruby_sdk/configuration.rb +12 -10
  19. data/lib/sendpost_ruby_sdk/models/attachment.rb +13 -18
  20. data/lib/sendpost_ruby_sdk/models/city.rb +13 -18
  21. data/lib/sendpost_ruby_sdk/models/copy_to.rb +13 -18
  22. data/lib/sendpost_ruby_sdk/models/count_stat.rb +214 -0
  23. data/lib/sendpost_ruby_sdk/models/delete_response.rb +223 -0
  24. data/lib/sendpost_ruby_sdk/models/device.rb +13 -18
  25. data/lib/sendpost_ruby_sdk/models/email_message.rb +13 -18
  26. data/lib/sendpost_ruby_sdk/models/email_response.rb +13 -18
  27. data/lib/sendpost_ruby_sdk/models/event_metadata.rb +32 -19
  28. data/lib/sendpost_ruby_sdk/models/from.rb +13 -18
  29. data/lib/sendpost_ruby_sdk/models/os.rb +13 -18
  30. data/lib/sendpost_ruby_sdk/models/q_email_message.rb +13 -18
  31. data/lib/sendpost_ruby_sdk/models/q_event.rb +13 -18
  32. data/lib/sendpost_ruby_sdk/models/r_suppression.rb +249 -0
  33. data/lib/sendpost_ruby_sdk/models/rd_suppression.rb +216 -0
  34. data/lib/sendpost_ruby_sdk/models/reply_to.rb +13 -18
  35. data/lib/sendpost_ruby_sdk/models/suppression.rb +250 -0
  36. data/lib/sendpost_ruby_sdk/models/suppression_email.rb +214 -0
  37. data/lib/sendpost_ruby_sdk/models/to.rb +13 -18
  38. data/lib/sendpost_ruby_sdk/models/user_agent.rb +13 -18
  39. data/lib/sendpost_ruby_sdk/models/webhook_event.rb +13 -18
  40. data/lib/sendpost_ruby_sdk/version.rb +2 -2
  41. data/lib/sendpost_ruby_sdk.rb +8 -1
  42. data/sendpost.yaml +230 -2
  43. data/sendpost_ruby_sdk.gemspec +2 -2
  44. data/spec/api/suppression_api_spec.rb +88 -0
  45. data/spec/api_client_spec.rb +1 -1
  46. data/spec/configuration_spec.rb +1 -1
  47. data/spec/models/count_stat_spec.rb +34 -0
  48. data/spec/models/delete_response_spec.rb +40 -0
  49. data/spec/models/r_suppression_spec.rb +52 -0
  50. data/spec/models/rd_suppression_spec.rb +34 -0
  51. data/spec/models/suppression_email_spec.rb +34 -0
  52. data/spec/models/suppression_spec.rb +58 -0
  53. data/spec/spec_helper.rb +1 -1
  54. metadata +37 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9eb2149c22351f9d17d9847b0033f1bcc4e92af1425143e350f9de9ed0cd2c03
4
- data.tar.gz: 359e1e022b62989d09c73ac780da73aec846ace95cc8029d0b24836d0783053a
3
+ metadata.gz: e454f81043b5693663756f6fc7e51ef326e55ac28a117c965b62d09db98dd432
4
+ data.tar.gz: bb22b794b02c71a78d315bcee4d6dfceca53abff1b821eb6f07736087faed250
5
5
  SHA512:
6
- metadata.gz: e1e71a7501180a3796d5ad29a933adfb0d8278b896e92ce65688022f6ecc1eb1636767af0475833d3b9dfad0ddc2e39b253d40f1e9edde32cc6b58ddc03e3f40
7
- data.tar.gz: 3f1481486c0ecff2636699e4f2c02f2e90f0a2776a110fdf4a3ac32275246a72f0c0f23b3cde6a7cbea1bf28b0c851c167b0b1800685e05f3eadff84ae997cb2
6
+ metadata.gz: 72adb05a860d07149b9d17c7be4dd8ff754d0efae495e9a9d35554df89dce54d01f77b02afbda460cec20666e182e82efcf0e9350945e2dabefae41380cbd5d9
7
+ data.tar.gz: 572e819e7769b08316ecde125c1054eb7313a14e596098d94c9cc5204c495d91a1f72b7271d27af417909d5ee065b92a896c77a6ccc300bcc44b5acc26a8b90e
data/README.md CHANGED
@@ -8,7 +8,7 @@ Email API and SMTP relay to not just send and measure email sending, but also al
8
8
  ## Installation
9
9
 
10
10
  ```shell
11
- gem install sendpost_ruby_sdk-1.0.0.gem
11
+ gem install sendpost_ruby_sdk
12
12
  ```
13
13
 
14
14
  ## Getting Started
@@ -44,6 +44,150 @@ end
44
44
 
45
45
  ```
46
46
 
47
+ Example with cc, bcc and template:
48
+
49
+ ```ruby
50
+ require 'sendpost_ruby_sdk'
51
+
52
+ api_instance = Sendpost::EmailApi.new
53
+ x_sub_account_api_key = 'your_api_key' # String | Sub-Account API Key
54
+ email_message = Sendpost::EmailMessage.new
55
+ email_message.from = {
56
+ email: 'richard@piedpiper.com'
57
+ }
58
+ email_message.to = [{
59
+ email: 'gavin@hooli.com',
60
+ cc: [{ email: 'dinesh@bachmanity.com' }],
61
+ bcc: [{ email: 'jian@bachmanity.com' }]
62
+ }]
63
+
64
+ email_message.subject = 'Hello World'
65
+ email_message.template = 'Welcome Mail'
66
+ email_message.html_body = '<strong>it works!</strong>'
67
+ email_message.ippool = 'PiedPiper'
68
+
69
+ opts = {
70
+ email_message: email_message # EmailMessage | Email message
71
+ }
72
+
73
+ begin
74
+ result = api_instance.send_email_with_template(x_sub_account_api_key, opts)
75
+ p result
76
+ rescue Sendpost::ApiError => e
77
+ puts "Exception when calling EmailApi->send_email: #{e}"
78
+ end
79
+
80
+ ```
81
+
82
+ ## Suppressions
83
+
84
+ Create Suppressions
85
+
86
+ ```ruby
87
+ require 'sendpost_ruby_sdk'
88
+ api_instance = Sendpost::SuppressionApi.new
89
+
90
+ x_sub_account_api_key = 'your_api_key'
91
+
92
+ r_suppression = Sendpost::RSuppression.new
93
+
94
+ r_suppression.hard_bounce = [{ email: 'richard@piedpiper_fake.com' }]
95
+
96
+ # fields are optional, but you have to send at least one of them.
97
+
98
+ # r_suppression.manual = [{ email: 'richard@piedpiper_fake2.com' }]
99
+ # r_suppression.spam_complaint = [{ email: 'richard@piedpiper_fake3.com' }]
100
+ # r_suppression.unsubscribe = [{ email: 'richard@piedpiper_fake4.com' }]
101
+
102
+ opts = {
103
+ r_suppression: r_suppression
104
+ }
105
+
106
+ p opts
107
+
108
+ begin
109
+ result = api_instance.create_suppressions(x_sub_account_api_key, opts)
110
+ p result
111
+ rescue Sendpost::ApiError => e
112
+ puts "Exception when calling SuppressionApi->create_suppressions: #{e}"
113
+ end
114
+ ```
115
+
116
+ Get Suppressions
117
+
118
+ ```ruby
119
+ require 'sendpost_ruby_sdk'
120
+ api_instance = Sendpost::SuppressionApi.new
121
+
122
+ x_sub_account_api_key = 'your_api_key'
123
+
124
+ opts = {
125
+ offset: 0,
126
+ limit: 20,
127
+ search: nil,
128
+ from: '2023-06-07',
129
+ to: '2023-08-04'
130
+ }
131
+
132
+ p opts
133
+
134
+ begin
135
+ result = api_instance.get_suppressions(x_sub_account_api_key, opts)
136
+ p result
137
+ rescue Sendpost::ApiError => e
138
+ puts "Exception when calling SuppressionApi->get_suppressions: #{e}"
139
+ end
140
+ ```
141
+
142
+ Delete Suppression
143
+
144
+ ```ruby
145
+ require 'sendpost_ruby_sdk'
146
+ api_instance = Sendpost::SuppressionApi.new
147
+
148
+ x_sub_account_api_key = 'your_api_key'
149
+
150
+ rd_suppression = Sendpost::RDSuppression.new
151
+
152
+ rd_suppression.suppressions = [{ email: 'richard@piedpiper_fake4.com' }]
153
+
154
+ opts = {
155
+ rd_suppression: rd_suppression
156
+ }
157
+
158
+ p opts
159
+
160
+ begin
161
+ result = api_instance.delete_suppression(x_sub_account_api_key, opts)
162
+ p result
163
+ rescue Sendpost::ApiError => e
164
+ puts "Exception when calling SuppressionApi->delete_suppression: #{e}"
165
+ end
166
+ ```
167
+
168
+ Count Suppression
169
+
170
+ ```ruby
171
+ require 'sendpost_ruby_sdk'
172
+ api_instance = Sendpost::SuppressionApi.new
173
+
174
+ x_sub_account_api_key = 'your_api_key'
175
+
176
+ opts = {
177
+ from: '2023-06-07',
178
+ to: '2023-08-04'
179
+ }
180
+
181
+ p opts
182
+
183
+ begin
184
+ result = api_instance.count(x_sub_account_api_key, opts)
185
+ p result
186
+ rescue Sendpost::ApiError => e
187
+ puts "Exception when calling SuppressionApi->count: #{e}"
188
+ end
189
+ ```
190
+
47
191
  ## Documentation for API Endpoints
48
192
 
49
193
  All URIs are relative to *https://api.sendpost.io/api/v1*
@@ -52,6 +196,10 @@ Class | Method | HTTP request | Description
52
196
  ------------ | ------------- | ------------- | -------------
53
197
  *Sendpost::EmailApi* | [**send_email**](docs/EmailApi.md#send_email) | **POST** /subaccount/email/ |
54
198
  *Sendpost::EmailApi* | [**send_email_with_template**](docs/EmailApi.md#send_email_with_template) | **POST** /subaccount/email/template |
199
+ *Sendpost::SuppressionApi* | [**count**](docs/SuppressionApi.md#count) | **GET** /subaccount/suppression/count |
200
+ *Sendpost::SuppressionApi* | [**create_suppressions**](docs/SuppressionApi.md#create_suppressions) | **POST** /subaccount/suppression/ |
201
+ *Sendpost::SuppressionApi* | [**delete_suppression**](docs/SuppressionApi.md#delete_suppression) | **DELETE** /subaccount/suppression/ |
202
+ *Sendpost::SuppressionApi* | [**get_suppressions**](docs/SuppressionApi.md#get_suppressions) | **GET** /subaccount/suppression/ |
55
203
 
56
204
 
57
205
  ## Documentation for Models
@@ -59,6 +207,8 @@ Class | Method | HTTP request | Description
59
207
  - [Sendpost::Attachment](docs/Attachment.md)
60
208
  - [Sendpost::City](docs/City.md)
61
209
  - [Sendpost::CopyTo](docs/CopyTo.md)
210
+ - [Sendpost::CountStat](docs/CountStat.md)
211
+ - [Sendpost::DeleteResponse](docs/DeleteResponse.md)
62
212
  - [Sendpost::Device](docs/Device.md)
63
213
  - [Sendpost::EmailMessage](docs/EmailMessage.md)
64
214
  - [Sendpost::EmailResponse](docs/EmailResponse.md)
@@ -67,7 +217,11 @@ Class | Method | HTTP request | Description
67
217
  - [Sendpost::Os](docs/Os.md)
68
218
  - [Sendpost::QEmailMessage](docs/QEmailMessage.md)
69
219
  - [Sendpost::QEvent](docs/QEvent.md)
220
+ - [Sendpost::RDSuppression](docs/RDSuppression.md)
221
+ - [Sendpost::RSuppression](docs/RSuppression.md)
70
222
  - [Sendpost::ReplyTo](docs/ReplyTo.md)
223
+ - [Sendpost::Suppression](docs/Suppression.md)
224
+ - [Sendpost::SuppressionEmail](docs/SuppressionEmail.md)
71
225
  - [Sendpost::To](docs/To.md)
72
226
  - [Sendpost::UserAgent](docs/UserAgent.md)
73
227
  - [Sendpost::WebhookEvent](docs/WebhookEvent.md)
data/config-ruby.json CHANGED
@@ -4,8 +4,8 @@
4
4
  "gemAuthor": "Sendpost",
5
5
  "gemAuthorEmail": "dev@sendpost.io",
6
6
  "gemDescription": "Email API and SMTP relay to not just send and measure email sending, but also alert and optimise. We provide you with tools, expertise and support needed to reliably deliver emails to your customers inboxes on time, every time.",
7
- "gemHomepage": "https://sendpost.io/",
7
+ "gemHomepage": "https://github.com/sendpost/sendpost_ruby_sdk",
8
8
  "gemSummary": "SendPost Ruby API",
9
9
  "gemName": "sendpost_ruby_sdk",
10
- "gemVersion": "1.0.0"
10
+ "gemVersion": "1.2.2"
11
11
  }
data/docs/CountStat.md ADDED
@@ -0,0 +1,18 @@
1
+ # Sendpost::CountStat
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **count** | **Integer** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'sendpost_ruby_sdk'
13
+
14
+ instance = Sendpost::CountStat.new(
15
+ count: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # Sendpost::DeleteResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | [optional] |
8
+ | **message** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'sendpost_ruby_sdk'
14
+
15
+ instance = Sendpost::DeleteResponse.new(
16
+ id: null,
17
+ message: null
18
+ )
19
+ ```
20
+
@@ -5,6 +5,8 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **clicked_url** | **String** | | [optional] |
8
+ | **tracked_ip** | **String** | | [optional] |
9
+ | **raw_user_agent** | **String** | | [optional] |
8
10
  | **device** | [**Device**](Device.md) | | [optional] |
9
11
  | **geo** | [**City**](City.md) | | [optional] |
10
12
  | **os** | [**Os**](Os.md) | | [optional] |
@@ -19,6 +21,8 @@ require 'sendpost_ruby_sdk'
19
21
 
20
22
  instance = Sendpost::EventMetadata.new(
21
23
  clicked_url: null,
24
+ tracked_ip: null,
25
+ raw_user_agent: null,
22
26
  device: null,
23
27
  geo: null,
24
28
  os: null,
@@ -0,0 +1,18 @@
1
+ # Sendpost::RDSuppression
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **suppressions** | [**Array&lt;SuppressionEmail&gt;**](SuppressionEmail.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'sendpost_ruby_sdk'
13
+
14
+ instance = Sendpost::RDSuppression.new(
15
+ suppressions: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,24 @@
1
+ # Sendpost::RSuppression
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **hard_bounce** | [**Array&lt;SuppressionEmail&gt;**](SuppressionEmail.md) | | [optional] |
8
+ | **manual** | [**Array&lt;SuppressionEmail&gt;**](SuppressionEmail.md) | | [optional] |
9
+ | **spam_complaint** | [**Array&lt;SuppressionEmail&gt;**](SuppressionEmail.md) | | [optional] |
10
+ | **unsubscribe** | [**Array&lt;SuppressionEmail&gt;**](SuppressionEmail.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'sendpost_ruby_sdk'
16
+
17
+ instance = Sendpost::RSuppression.new(
18
+ hard_bounce: null,
19
+ manual: null,
20
+ spam_complaint: null,
21
+ unsubscribe: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,26 @@
1
+ # Sendpost::Suppression
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **created** | **Integer** | | [optional] |
8
+ | **email** | **String** | | [optional] |
9
+ | **id** | **Integer** | | [optional] |
10
+ | **reason** | **Integer** | | [optional] |
11
+ | **smtp_error** | **String** | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'sendpost_ruby_sdk'
17
+
18
+ instance = Sendpost::Suppression.new(
19
+ created: null,
20
+ email: null,
21
+ id: null,
22
+ reason: null,
23
+ smtp_error: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,293 @@
1
+ # Sendpost::SuppressionApi
2
+
3
+ All URIs are relative to *https://api.sendpost.io/api/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**count**](SuppressionApi.md#count) | **GET** /subaccount/suppression/count | |
8
+ | [**create_suppressions**](SuppressionApi.md#create_suppressions) | **POST** /subaccount/suppression/ | |
9
+ | [**delete_suppression**](SuppressionApi.md#delete_suppression) | **DELETE** /subaccount/suppression/ | |
10
+ | [**get_suppressions**](SuppressionApi.md#get_suppressions) | **GET** /subaccount/suppression/ | |
11
+
12
+
13
+ ## count
14
+
15
+ > <CountStat> count(x_sub_account_api_key, opts)
16
+
17
+
18
+
19
+ Count Total Suppressions
20
+
21
+ ### Examples
22
+
23
+ ```ruby
24
+ require 'time'
25
+ require 'sendpost_ruby_sdk'
26
+
27
+ api_instance = Sendpost::SuppressionApi.new
28
+ x_sub_account_api_key = 'x_sub_account_api_key_example' # String | Sub-Account API Key
29
+ opts = {
30
+ from: 'from_example', # String | from date
31
+ to: 'to_example' # String | to date
32
+ }
33
+
34
+ begin
35
+
36
+ result = api_instance.count(x_sub_account_api_key, opts)
37
+ p result
38
+ rescue Sendpost::ApiError => e
39
+ puts "Error when calling SuppressionApi->count: #{e}"
40
+ end
41
+ ```
42
+
43
+ #### Using the count_with_http_info variant
44
+
45
+ This returns an Array which contains the response data, status code and headers.
46
+
47
+ > <Array(<CountStat>, Integer, Hash)> count_with_http_info(x_sub_account_api_key, opts)
48
+
49
+ ```ruby
50
+ begin
51
+
52
+ data, status_code, headers = api_instance.count_with_http_info(x_sub_account_api_key, opts)
53
+ p status_code # => 2xx
54
+ p headers # => { ... }
55
+ p data # => <CountStat>
56
+ rescue Sendpost::ApiError => e
57
+ puts "Error when calling SuppressionApi->count_with_http_info: #{e}"
58
+ end
59
+ ```
60
+
61
+ ### Parameters
62
+
63
+ | Name | Type | Description | Notes |
64
+ | ---- | ---- | ----------- | ----- |
65
+ | **x_sub_account_api_key** | **String** | Sub-Account API Key | |
66
+ | **from** | **String** | from date | [optional] |
67
+ | **to** | **String** | to date | [optional] |
68
+
69
+ ### Return type
70
+
71
+ [**CountStat**](CountStat.md)
72
+
73
+ ### Authorization
74
+
75
+ No authorization required
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: Not defined
80
+ - **Accept**: application/json
81
+
82
+
83
+ ## create_suppressions
84
+
85
+ > <Array<Suppression>> create_suppressions(x_sub_account_api_key, opts)
86
+
87
+
88
+
89
+ Add Email Addresses To Suppression List
90
+
91
+ ### Examples
92
+
93
+ ```ruby
94
+ require 'time'
95
+ require 'sendpost_ruby_sdk'
96
+
97
+ api_instance = Sendpost::SuppressionApi.new
98
+ x_sub_account_api_key = 'x_sub_account_api_key_example' # String | Sub-Account API Key
99
+ opts = {
100
+ r_suppression: Sendpost::RSuppression.new # RSuppression | Suppression content
101
+ }
102
+
103
+ begin
104
+
105
+ result = api_instance.create_suppressions(x_sub_account_api_key, opts)
106
+ p result
107
+ rescue Sendpost::ApiError => e
108
+ puts "Error when calling SuppressionApi->create_suppressions: #{e}"
109
+ end
110
+ ```
111
+
112
+ #### Using the create_suppressions_with_http_info variant
113
+
114
+ This returns an Array which contains the response data, status code and headers.
115
+
116
+ > <Array(<Array<Suppression>>, Integer, Hash)> create_suppressions_with_http_info(x_sub_account_api_key, opts)
117
+
118
+ ```ruby
119
+ begin
120
+
121
+ data, status_code, headers = api_instance.create_suppressions_with_http_info(x_sub_account_api_key, opts)
122
+ p status_code # => 2xx
123
+ p headers # => { ... }
124
+ p data # => <Array<Suppression>>
125
+ rescue Sendpost::ApiError => e
126
+ puts "Error when calling SuppressionApi->create_suppressions_with_http_info: #{e}"
127
+ end
128
+ ```
129
+
130
+ ### Parameters
131
+
132
+ | Name | Type | Description | Notes |
133
+ | ---- | ---- | ----------- | ----- |
134
+ | **x_sub_account_api_key** | **String** | Sub-Account API Key | |
135
+ | **r_suppression** | [**RSuppression**](RSuppression.md) | Suppression content | [optional] |
136
+
137
+ ### Return type
138
+
139
+ [**Array&lt;Suppression&gt;**](Suppression.md)
140
+
141
+ ### Authorization
142
+
143
+ No authorization required
144
+
145
+ ### HTTP request headers
146
+
147
+ - **Content-Type**: application/json
148
+ - **Accept**: application/json
149
+
150
+
151
+ ## delete_suppression
152
+
153
+ > <Array<DeleteResponse>> delete_suppression(x_sub_account_api_key, opts)
154
+
155
+
156
+
157
+ Delete specific emails which are in suppression list
158
+
159
+ ### Examples
160
+
161
+ ```ruby
162
+ require 'time'
163
+ require 'sendpost_ruby_sdk'
164
+
165
+ api_instance = Sendpost::SuppressionApi.new
166
+ x_sub_account_api_key = 'x_sub_account_api_key_example' # String | Sub-Account API Key
167
+ opts = {
168
+ rd_suppression: Sendpost::RDSuppression.new # RDSuppression | Suppression content
169
+ }
170
+
171
+ begin
172
+
173
+ result = api_instance.delete_suppression(x_sub_account_api_key, opts)
174
+ p result
175
+ rescue Sendpost::ApiError => e
176
+ puts "Error when calling SuppressionApi->delete_suppression: #{e}"
177
+ end
178
+ ```
179
+
180
+ #### Using the delete_suppression_with_http_info variant
181
+
182
+ This returns an Array which contains the response data, status code and headers.
183
+
184
+ > <Array(<Array<DeleteResponse>>, Integer, Hash)> delete_suppression_with_http_info(x_sub_account_api_key, opts)
185
+
186
+ ```ruby
187
+ begin
188
+
189
+ data, status_code, headers = api_instance.delete_suppression_with_http_info(x_sub_account_api_key, opts)
190
+ p status_code # => 2xx
191
+ p headers # => { ... }
192
+ p data # => <Array<DeleteResponse>>
193
+ rescue Sendpost::ApiError => e
194
+ puts "Error when calling SuppressionApi->delete_suppression_with_http_info: #{e}"
195
+ end
196
+ ```
197
+
198
+ ### Parameters
199
+
200
+ | Name | Type | Description | Notes |
201
+ | ---- | ---- | ----------- | ----- |
202
+ | **x_sub_account_api_key** | **String** | Sub-Account API Key | |
203
+ | **rd_suppression** | [**RDSuppression**](RDSuppression.md) | Suppression content | [optional] |
204
+
205
+ ### Return type
206
+
207
+ [**Array&lt;DeleteResponse&gt;**](DeleteResponse.md)
208
+
209
+ ### Authorization
210
+
211
+ No authorization required
212
+
213
+ ### HTTP request headers
214
+
215
+ - **Content-Type**: application/json
216
+ - **Accept**: application/json
217
+
218
+
219
+ ## get_suppressions
220
+
221
+ > <Array<Suppression>> get_suppressions(x_sub_account_api_key, opts)
222
+
223
+
224
+
225
+ Get all suppressions
226
+
227
+ ### Examples
228
+
229
+ ```ruby
230
+ require 'time'
231
+ require 'sendpost_ruby_sdk'
232
+
233
+ api_instance = Sendpost::SuppressionApi.new
234
+ x_sub_account_api_key = 'x_sub_account_api_key_example' # String | Sub-Account API Key
235
+ opts = {
236
+ offset: 789, # Integer | offset
237
+ limit: 789, # Integer | limit
238
+ search: 'search_example', # String | search
239
+ from: 'from_example', # String | from date
240
+ to: 'to_example' # String | to date
241
+ }
242
+
243
+ begin
244
+
245
+ result = api_instance.get_suppressions(x_sub_account_api_key, opts)
246
+ p result
247
+ rescue Sendpost::ApiError => e
248
+ puts "Error when calling SuppressionApi->get_suppressions: #{e}"
249
+ end
250
+ ```
251
+
252
+ #### Using the get_suppressions_with_http_info variant
253
+
254
+ This returns an Array which contains the response data, status code and headers.
255
+
256
+ > <Array(<Array<Suppression>>, Integer, Hash)> get_suppressions_with_http_info(x_sub_account_api_key, opts)
257
+
258
+ ```ruby
259
+ begin
260
+
261
+ data, status_code, headers = api_instance.get_suppressions_with_http_info(x_sub_account_api_key, opts)
262
+ p status_code # => 2xx
263
+ p headers # => { ... }
264
+ p data # => <Array<Suppression>>
265
+ rescue Sendpost::ApiError => e
266
+ puts "Error when calling SuppressionApi->get_suppressions_with_http_info: #{e}"
267
+ end
268
+ ```
269
+
270
+ ### Parameters
271
+
272
+ | Name | Type | Description | Notes |
273
+ | ---- | ---- | ----------- | ----- |
274
+ | **x_sub_account_api_key** | **String** | Sub-Account API Key | |
275
+ | **offset** | **Integer** | offset | [optional] |
276
+ | **limit** | **Integer** | limit | [optional] |
277
+ | **search** | **String** | search | [optional] |
278
+ | **from** | **String** | from date | [optional] |
279
+ | **to** | **String** | to date | [optional] |
280
+
281
+ ### Return type
282
+
283
+ [**Array&lt;Suppression&gt;**](Suppression.md)
284
+
285
+ ### Authorization
286
+
287
+ No authorization required
288
+
289
+ ### HTTP request headers
290
+
291
+ - **Content-Type**: Not defined
292
+ - **Accept**: application/json
293
+
@@ -0,0 +1,18 @@
1
+ # Sendpost::SuppressionEmail
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **email** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'sendpost_ruby_sdk'
13
+
14
+ instance = Sendpost::SuppressionEmail.new(
15
+ email: null
16
+ )
17
+ ```
18
+
data/generate-libs.bash CHANGED
@@ -1 +1 @@
1
- openapi-generator generate -i sendpost.yaml -g ruby -o ./ -c ./config-ruby.json
1
+ openapi-generator generate -i sendpost.yaml -g ruby -o ./ -c ./config-ruby.json --git-repo-id sendpost_go_sdk --git-user-id sendpost
data/git_push.sh CHANGED
@@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then
14
14
  fi
15
15
 
16
16
  if [ "$git_user_id" = "" ]; then
17
- git_user_id="GIT_USER_ID"
17
+ git_user_id="sendpost"
18
18
  echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
19
  fi
20
20
 
21
21
  if [ "$git_repo_id" = "" ]; then
22
- git_repo_id="GIT_REPO_ID"
22
+ git_repo_id="sendpost_go_sdk"
23
23
  echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
24
  fi
25
25
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: hello@sendpost.io
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.6.0
9
+ OpenAPI Generator version: 7.0.1
10
10
 
11
11
  =end
12
12