sendpost_ruby_sdk 1.2.2 → 2.0.2

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.
Files changed (293) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -0
  3. data/README.md +583 -145
  4. data/docs/AccountStats.md +20 -0
  5. data/docs/AccountStatsStat.md +38 -0
  6. data/docs/AggregateStat.md +38 -0
  7. data/docs/AggregateStats.md +38 -0
  8. data/docs/AggregatedEmailStats.md +38 -0
  9. data/docs/Attachment.md +4 -4
  10. data/docs/AutoWarmupPlan.md +80 -0
  11. data/docs/CopyTo.md +5 -5
  12. data/docs/CreateDomainRequest.md +18 -0
  13. data/docs/CreateSubAccountRequest.md +18 -0
  14. data/docs/CreateSuppressionRequest.md +24 -0
  15. data/docs/CreateSuppressionRequestHardBounceInner.md +18 -0
  16. data/docs/{SuppressionEmail.md → CreateSuppressionRequestManualInner.md} +3 -3
  17. data/docs/CreateSuppressionRequestSpamComplaintInner.md +18 -0
  18. data/docs/CreateSuppressionRequestUnsubscribeInner.md +18 -0
  19. data/docs/CreateWebhookRequest.md +46 -0
  20. data/docs/DeleteResponse.md +2 -2
  21. data/docs/DeleteSubAccountResponse.md +20 -0
  22. data/docs/DeleteSuppression200ResponseInner.md +20 -0
  23. data/docs/DeleteSuppressionRequest.md +18 -0
  24. data/docs/DeleteWebhookResponse.md +20 -0
  25. data/docs/Device.md +1 -1
  26. data/docs/Domain.md +56 -0
  27. data/docs/DomainApi.md +301 -0
  28. data/docs/DomainDkim.md +22 -0
  29. data/docs/DomainDmarc.md +22 -0
  30. data/docs/DomainGpt.md +22 -0
  31. data/docs/DomainReturnPath.md +22 -0
  32. data/docs/DomainSpf.md +22 -0
  33. data/docs/DomainTrack.md +22 -0
  34. data/docs/EIP.md +18 -0
  35. data/docs/{From.md → EmailAddress.md} +4 -4
  36. data/docs/EmailApi.md +38 -32
  37. data/docs/EmailMessage.md +30 -24
  38. data/docs/EmailMessageFrom.md +20 -0
  39. data/docs/EmailMessageObject.md +46 -0
  40. data/docs/{ReplyTo.md → EmailMessageReplyTo.md} +5 -5
  41. data/docs/EmailMessageToInner.md +26 -0
  42. data/docs/EmailMessageToInnerBccInner.md +22 -0
  43. data/docs/EmailMessageToInnerCcInner.md +22 -0
  44. data/docs/EmailMessageWithTemplate.md +52 -0
  45. data/docs/EmailResponse.md +8 -8
  46. data/docs/EmailStats.md +20 -0
  47. data/docs/EmailStatsStats.md +38 -0
  48. data/docs/Event.md +56 -0
  49. data/docs/EventMetadata.md +13 -13
  50. data/docs/{City.md → GeoLocation.md} +8 -8
  51. data/docs/IP.md +62 -0
  52. data/docs/IPAllocationRequest.md +20 -0
  53. data/docs/IPApi.md +375 -0
  54. data/docs/IPDeletionResponse.md +20 -0
  55. data/docs/IPPool.md +42 -0
  56. data/docs/IPPoolCreateRequest.md +28 -0
  57. data/docs/IPPoolDeleteResponse.md +20 -0
  58. data/docs/IPPoolUpdateRequest.md +24 -0
  59. data/docs/IPPoolsApi.md +361 -0
  60. data/docs/IPUpdateRequest.md +18 -0
  61. data/docs/Label.md +22 -0
  62. data/docs/Member.md +40 -0
  63. data/docs/Message.md +76 -0
  64. data/docs/MessageApi.md +79 -0
  65. data/docs/MessageHeaderTo.md +26 -0
  66. data/docs/MessageTo.md +26 -0
  67. data/docs/{Os.md → OperatingSystem.md} +7 -7
  68. data/docs/Person.md +20 -0
  69. data/docs/{To.md → Recipient.md} +7 -7
  70. data/docs/SMTPAuth.md +26 -0
  71. data/docs/Stat.md +20 -0
  72. data/docs/StatStat.md +38 -0
  73. data/docs/StatStats.md +38 -0
  74. data/docs/StatsAApi.md +307 -0
  75. data/docs/StatsApi.md +237 -0
  76. data/docs/SubAccount.md +48 -0
  77. data/docs/SubAccountApi.md +375 -0
  78. data/docs/Suppression.md +8 -8
  79. data/docs/SuppressionApi.md +76 -134
  80. data/docs/ThirdPartySendingProvider.md +38 -0
  81. data/docs/UpdateSubAccount.md +18 -0
  82. data/docs/UpdateWebhook.md +46 -0
  83. data/docs/UserAgent.md +4 -4
  84. data/docs/Webhook.md +54 -0
  85. data/docs/WebhookApi.md +375 -0
  86. data/git_push.sh +1 -1
  87. data/lib/sendpost_ruby_sdk/api/domain_api.rb +290 -0
  88. data/lib/sendpost_ruby_sdk/api/email_api.rb +33 -35
  89. data/lib/sendpost_ruby_sdk/api/ip_api.rb +356 -0
  90. data/lib/sendpost_ruby_sdk/api/ip_pools_api.rb +356 -0
  91. data/lib/sendpost_ruby_sdk/api/message_api.rb +85 -0
  92. data/lib/sendpost_ruby_sdk/api/stats_a_api.rb +320 -0
  93. data/lib/sendpost_ruby_sdk/api/stats_api.rb +260 -0
  94. data/lib/sendpost_ruby_sdk/api/sub_account_api.rb +356 -0
  95. data/lib/sendpost_ruby_sdk/api/suppression_api.rb +81 -141
  96. data/lib/sendpost_ruby_sdk/api/webhook_api.rb +356 -0
  97. data/lib/sendpost_ruby_sdk/api_client.rb +26 -24
  98. data/lib/sendpost_ruby_sdk/api_error.rb +3 -3
  99. data/lib/sendpost_ruby_sdk/configuration.rb +28 -3
  100. data/lib/sendpost_ruby_sdk/models/account_stats.rb +229 -0
  101. data/lib/sendpost_ruby_sdk/models/account_stats_stat.rb +311 -0
  102. data/lib/sendpost_ruby_sdk/models/aggregate_stat.rb +321 -0
  103. data/lib/sendpost_ruby_sdk/models/aggregate_stats.rb +310 -0
  104. data/lib/sendpost_ruby_sdk/models/aggregated_email_stats.rb +321 -0
  105. data/lib/sendpost_ruby_sdk/models/attachment.rb +15 -7
  106. data/lib/sendpost_ruby_sdk/models/auto_warmup_plan.rb +531 -0
  107. data/lib/sendpost_ruby_sdk/models/copy_to.rb +28 -19
  108. data/lib/sendpost_ruby_sdk/models/create_domain_request.rb +221 -0
  109. data/lib/sendpost_ruby_sdk/models/create_sub_account_request.rb +221 -0
  110. data/lib/sendpost_ruby_sdk/models/create_suppression_request.rb +259 -0
  111. data/lib/sendpost_ruby_sdk/models/create_suppression_request_hard_bounce_inner.rb +220 -0
  112. data/lib/sendpost_ruby_sdk/models/create_suppression_request_manual_inner.rb +220 -0
  113. data/lib/sendpost_ruby_sdk/models/create_suppression_request_spam_complaint_inner.rb +220 -0
  114. data/lib/sendpost_ruby_sdk/models/create_suppression_request_unsubscribe_inner.rb +220 -0
  115. data/lib/sendpost_ruby_sdk/models/create_webhook_request.rb +361 -0
  116. data/lib/sendpost_ruby_sdk/models/delete_response.rb +15 -7
  117. data/lib/sendpost_ruby_sdk/models/delete_sub_account_response.rb +231 -0
  118. data/lib/sendpost_ruby_sdk/models/delete_suppression200_response_inner.rb +231 -0
  119. data/lib/sendpost_ruby_sdk/models/delete_suppression_request.rb +222 -0
  120. data/lib/sendpost_ruby_sdk/models/delete_webhook_response.rb +231 -0
  121. data/lib/sendpost_ruby_sdk/models/device.rb +13 -7
  122. data/lib/sendpost_ruby_sdk/models/domain.rb +435 -0
  123. data/lib/sendpost_ruby_sdk/models/domain_dkim.rb +239 -0
  124. data/lib/sendpost_ruby_sdk/models/domain_dmarc.rb +239 -0
  125. data/lib/sendpost_ruby_sdk/models/domain_gpt.rb +239 -0
  126. data/lib/sendpost_ruby_sdk/models/domain_return_path.rb +239 -0
  127. data/lib/sendpost_ruby_sdk/models/domain_spf.rb +239 -0
  128. data/lib/sendpost_ruby_sdk/models/domain_track.rb +239 -0
  129. data/lib/sendpost_ruby_sdk/models/eip.rb +238 -0
  130. data/lib/sendpost_ruby_sdk/models/email_address.rb +229 -0
  131. data/lib/sendpost_ruby_sdk/models/email_message.rb +121 -86
  132. data/lib/sendpost_ruby_sdk/models/email_message_from.rb +229 -0
  133. data/lib/sendpost_ruby_sdk/models/email_message_object.rb +354 -0
  134. data/lib/sendpost_ruby_sdk/models/email_message_reply_to.rb +229 -0
  135. data/lib/sendpost_ruby_sdk/models/email_message_to_inner.rb +262 -0
  136. data/lib/sendpost_ruby_sdk/models/email_message_to_inner_bcc_inner.rb +240 -0
  137. data/lib/sendpost_ruby_sdk/models/email_message_to_inner_cc_inner.rb +240 -0
  138. data/lib/sendpost_ruby_sdk/models/email_message_with_template.rb +392 -0
  139. data/lib/sendpost_ruby_sdk/models/email_response.rb +40 -32
  140. data/lib/sendpost_ruby_sdk/models/email_stats.rb +230 -0
  141. data/lib/sendpost_ruby_sdk/models/email_stats_stats.rb +321 -0
  142. data/lib/sendpost_ruby_sdk/models/event.rb +393 -0
  143. data/lib/sendpost_ruby_sdk/models/event_metadata.rb +59 -53
  144. data/lib/sendpost_ruby_sdk/models/geo_location.rb +256 -0
  145. data/lib/sendpost_ruby_sdk/models/ip.rb +643 -0
  146. data/lib/sendpost_ruby_sdk/models/ip_allocation_request.rb +266 -0
  147. data/lib/sendpost_ruby_sdk/models/ip_deletion_response.rb +265 -0
  148. data/lib/sendpost_ruby_sdk/models/ip_pool.rb +357 -0
  149. data/lib/sendpost_ruby_sdk/models/ip_pool_create_request.rb +299 -0
  150. data/lib/sendpost_ruby_sdk/models/ip_pool_delete_response.rb +229 -0
  151. data/lib/sendpost_ruby_sdk/models/ip_pool_update_request.rb +249 -0
  152. data/lib/sendpost_ruby_sdk/models/ip_update_request.rb +238 -0
  153. data/lib/sendpost_ruby_sdk/models/label.rb +241 -0
  154. data/lib/sendpost_ruby_sdk/models/member.rb +331 -0
  155. data/lib/sendpost_ruby_sdk/models/message.rb +523 -0
  156. data/lib/sendpost_ruby_sdk/models/message_header_to.rb +268 -0
  157. data/lib/sendpost_ruby_sdk/models/message_to.rb +268 -0
  158. data/lib/sendpost_ruby_sdk/models/operating_system.rb +256 -0
  159. data/lib/sendpost_ruby_sdk/models/person.rb +231 -0
  160. data/lib/sendpost_ruby_sdk/models/recipient.rb +263 -0
  161. data/lib/sendpost_ruby_sdk/models/smtp_auth.rb +261 -0
  162. data/lib/sendpost_ruby_sdk/models/stat.rb +230 -0
  163. data/lib/sendpost_ruby_sdk/models/stat_stat.rb +322 -0
  164. data/lib/sendpost_ruby_sdk/models/stat_stats.rb +321 -0
  165. data/lib/sendpost_ruby_sdk/models/sub_account.rb +415 -0
  166. data/lib/sendpost_ruby_sdk/models/suppression.rb +40 -29
  167. data/lib/sendpost_ruby_sdk/models/third_party_sending_provider.rb +310 -0
  168. data/lib/sendpost_ruby_sdk/models/update_sub_account.rb +221 -0
  169. data/lib/sendpost_ruby_sdk/models/update_webhook.rb +368 -0
  170. data/lib/sendpost_ruby_sdk/models/user_agent.rb +13 -7
  171. data/lib/sendpost_ruby_sdk/models/webhook.rb +405 -0
  172. data/lib/sendpost_ruby_sdk/version.rb +4 -4
  173. data/lib/sendpost_ruby_sdk.rb +73 -15
  174. data/spec/api/domain_api_spec.rb +85 -0
  175. data/spec/api/email_api_spec.rb +9 -9
  176. data/spec/api/ip_api_spec.rb +98 -0
  177. data/spec/api/ip_pools_api_spec.rb +98 -0
  178. data/spec/api/message_api_spec.rb +47 -0
  179. data/spec/api/stats_a_api_spec.rb +89 -0
  180. data/spec/api/stats_api_spec.rb +78 -0
  181. data/spec/api/sub_account_api_spec.rb +98 -0
  182. data/spec/api/suppression_api_spec.rb +22 -34
  183. data/spec/api/webhook_api_spec.rb +98 -0
  184. data/spec/models/account_stats_spec.rb +42 -0
  185. data/spec/models/account_stats_stat_spec.rb +96 -0
  186. data/spec/models/aggregate_stat_spec.rb +96 -0
  187. data/spec/models/aggregate_stats_spec.rb +96 -0
  188. data/spec/models/aggregated_email_stats_spec.rb +96 -0
  189. data/spec/models/attachment_spec.rb +6 -4
  190. data/spec/models/auto_warmup_plan_spec.rb +222 -0
  191. data/spec/models/copy_to_spec.rb +8 -6
  192. data/spec/models/create_domain_request_spec.rb +36 -0
  193. data/spec/models/create_sub_account_request_spec.rb +36 -0
  194. data/spec/models/create_suppression_request_hard_bounce_inner_spec.rb +36 -0
  195. data/spec/models/create_suppression_request_manual_inner_spec.rb +36 -0
  196. data/spec/models/create_suppression_request_spam_complaint_inner_spec.rb +36 -0
  197. data/spec/models/create_suppression_request_spec.rb +54 -0
  198. data/spec/models/create_suppression_request_unsubscribe_inner_spec.rb +36 -0
  199. data/spec/models/create_webhook_request_spec.rb +120 -0
  200. data/spec/models/delete_response_spec.rb +6 -4
  201. data/spec/models/delete_sub_account_response_spec.rb +42 -0
  202. data/spec/models/delete_suppression200_response_inner_spec.rb +42 -0
  203. data/spec/models/delete_suppression_request_spec.rb +36 -0
  204. data/spec/models/delete_webhook_response_spec.rb +42 -0
  205. data/spec/models/device_spec.rb +6 -4
  206. data/spec/models/domain_dkim_spec.rb +48 -0
  207. data/spec/models/domain_dmarc_spec.rb +48 -0
  208. data/spec/models/domain_gpt_spec.rb +48 -0
  209. data/spec/models/domain_return_path_spec.rb +48 -0
  210. data/spec/models/domain_spec.rb +150 -0
  211. data/spec/models/domain_spf_spec.rb +48 -0
  212. data/spec/models/domain_track_spec.rb +48 -0
  213. data/spec/models/eip_spec.rb +36 -0
  214. data/spec/models/email_address_spec.rb +42 -0
  215. data/spec/models/email_message_from_spec.rb +42 -0
  216. data/spec/models/email_message_object_spec.rb +120 -0
  217. data/spec/models/email_message_reply_to_spec.rb +42 -0
  218. data/spec/models/email_message_spec.rb +37 -17
  219. data/spec/models/email_message_to_inner_bcc_inner_spec.rb +48 -0
  220. data/spec/models/email_message_to_inner_cc_inner_spec.rb +48 -0
  221. data/spec/models/email_message_to_inner_spec.rb +60 -0
  222. data/spec/models/email_message_with_template_spec.rb +138 -0
  223. data/spec/models/email_response_spec.rb +10 -8
  224. data/spec/models/email_stats_spec.rb +42 -0
  225. data/spec/models/email_stats_stats_spec.rb +96 -0
  226. data/spec/models/event_metadata_spec.rb +24 -10
  227. data/spec/models/event_spec.rb +150 -0
  228. data/spec/models/geo_location_spec.rb +60 -0
  229. data/spec/models/ip_allocation_request_spec.rb +42 -0
  230. data/spec/models/ip_deletion_response_spec.rb +42 -0
  231. data/spec/models/ip_pool_create_request_spec.rb +66 -0
  232. data/spec/models/ip_pool_delete_response_spec.rb +42 -0
  233. data/spec/models/ip_pool_spec.rb +108 -0
  234. data/spec/models/ip_pool_update_request_spec.rb +54 -0
  235. data/spec/models/ip_spec.rb +168 -0
  236. data/spec/models/ip_update_request_spec.rb +36 -0
  237. data/spec/models/label_spec.rb +48 -0
  238. data/spec/models/member_spec.rb +102 -0
  239. data/spec/models/message_header_to_spec.rb +60 -0
  240. data/spec/models/message_spec.rb +210 -0
  241. data/spec/models/message_to_spec.rb +60 -0
  242. data/spec/models/operating_system_spec.rb +60 -0
  243. data/spec/models/person_spec.rb +42 -0
  244. data/spec/models/recipient_spec.rb +60 -0
  245. data/spec/models/smtp_auth_spec.rb +60 -0
  246. data/spec/models/stat_spec.rb +42 -0
  247. data/spec/models/stat_stat_spec.rb +96 -0
  248. data/spec/models/stat_stats_spec.rb +96 -0
  249. data/spec/models/sub_account_spec.rb +130 -0
  250. data/spec/models/suppression_spec.rb +11 -9
  251. data/spec/models/third_party_sending_provider_spec.rb +96 -0
  252. data/spec/models/update_sub_account_spec.rb +36 -0
  253. data/spec/models/update_webhook_spec.rb +120 -0
  254. data/spec/models/user_agent_spec.rb +6 -4
  255. data/spec/models/webhook_spec.rb +144 -0
  256. data/spec/spec_helper.rb +3 -3
  257. metadata +295 -66
  258. data/config-ruby.json +0 -11
  259. data/docs/CountStat.md +0 -18
  260. data/docs/QEmailMessage.md +0 -70
  261. data/docs/QEvent.md +0 -42
  262. data/docs/RDSuppression.md +0 -18
  263. data/docs/RSuppression.md +0 -24
  264. data/docs/WebhookEvent.md +0 -20
  265. data/generate-libs.bash +0 -1
  266. data/lib/sendpost_ruby_sdk/models/city.rb +0 -250
  267. data/lib/sendpost_ruby_sdk/models/count_stat.rb +0 -214
  268. data/lib/sendpost_ruby_sdk/models/from.rb +0 -223
  269. data/lib/sendpost_ruby_sdk/models/os.rb +0 -250
  270. data/lib/sendpost_ruby_sdk/models/q_email_message.rb +0 -456
  271. data/lib/sendpost_ruby_sdk/models/q_event.rb +0 -324
  272. data/lib/sendpost_ruby_sdk/models/r_suppression.rb +0 -249
  273. data/lib/sendpost_ruby_sdk/models/rd_suppression.rb +0 -216
  274. data/lib/sendpost_ruby_sdk/models/reply_to.rb +0 -223
  275. data/lib/sendpost_ruby_sdk/models/suppression_email.rb +0 -214
  276. data/lib/sendpost_ruby_sdk/models/to.rb +0 -254
  277. data/lib/sendpost_ruby_sdk/models/webhook_event.rb +0 -223
  278. data/sendpost.yaml +0 -666
  279. data/sendpost_ruby_sdk.gemspec +0 -38
  280. data/spec/api_client_spec.rb +0 -228
  281. data/spec/configuration_spec.rb +0 -42
  282. data/spec/models/city_spec.rb +0 -58
  283. data/spec/models/count_stat_spec.rb +0 -34
  284. data/spec/models/from_spec.rb +0 -40
  285. data/spec/models/os_spec.rb +0 -58
  286. data/spec/models/q_email_message_spec.rb +0 -190
  287. data/spec/models/q_event_spec.rb +0 -106
  288. data/spec/models/r_suppression_spec.rb +0 -52
  289. data/spec/models/rd_suppression_spec.rb +0 -34
  290. data/spec/models/reply_to_spec.rb +0 -40
  291. data/spec/models/suppression_email_spec.rb +0 -34
  292. data/spec/models/to_spec.rb +0 -58
  293. data/spec/models/webhook_event_spec.rb +0 -40
@@ -4,126 +4,59 @@ All URIs are relative to *https://api.sendpost.io/api/v1*
4
4
 
5
5
  | Method | HTTP request | Description |
6
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/ | |
7
+ | [**create_suppression**](SuppressionApi.md#create_suppression) | **POST** /subaccount/suppression | Create Suppressions |
8
+ | [**delete_suppression**](SuppressionApi.md#delete_suppression) | **DELETE** /subaccount/suppression | Delete Suppressions |
9
+ | [**get_suppression_list**](SuppressionApi.md#get_suppression_list) | **GET** /subaccount/suppression | List Suppressions |
11
10
 
12
11
 
13
- ## count
12
+ ## create_suppression
14
13
 
15
- > <CountStat> count(x_sub_account_api_key, opts)
14
+ > <Array<Suppression>> create_suppression(create_suppression_request)
16
15
 
16
+ Create Suppressions
17
17
 
18
-
19
- Count Total Suppressions
18
+ Creates new suppressions by posting to the suppression resource. You can specify different types of suppressions including `hardBounce`, `manual`, `unsubscribe`, and `spamComplaint`.
20
19
 
21
20
  ### Examples
22
21
 
23
22
  ```ruby
24
23
  require 'time'
25
24
  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}"
25
+ # setup authorization
26
+ Sendpost.configure do |config|
27
+ # Configure API key authorization: subAccountAuth
28
+ config.api_key['X-SubAccount-ApiKey'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ # config.api_key_prefix['X-SubAccount-ApiKey'] = 'Bearer'
40
31
  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
32
 
97
33
  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
- }
34
+ create_suppression_request = Sendpost::CreateSuppressionRequest.new # CreateSuppressionRequest |
102
35
 
103
36
  begin
104
-
105
- result = api_instance.create_suppressions(x_sub_account_api_key, opts)
37
+ # Create Suppressions
38
+ result = api_instance.create_suppression(create_suppression_request)
106
39
  p result
107
40
  rescue Sendpost::ApiError => e
108
- puts "Error when calling SuppressionApi->create_suppressions: #{e}"
41
+ puts "Error when calling SuppressionApi->create_suppression: #{e}"
109
42
  end
110
43
  ```
111
44
 
112
- #### Using the create_suppressions_with_http_info variant
45
+ #### Using the create_suppression_with_http_info variant
113
46
 
114
47
  This returns an Array which contains the response data, status code and headers.
115
48
 
116
- > <Array(<Array<Suppression>>, Integer, Hash)> create_suppressions_with_http_info(x_sub_account_api_key, opts)
49
+ > <Array(<Array<Suppression>>, Integer, Hash)> create_suppression_with_http_info(create_suppression_request)
117
50
 
118
51
  ```ruby
119
52
  begin
120
-
121
- data, status_code, headers = api_instance.create_suppressions_with_http_info(x_sub_account_api_key, opts)
53
+ # Create Suppressions
54
+ data, status_code, headers = api_instance.create_suppression_with_http_info(create_suppression_request)
122
55
  p status_code # => 2xx
123
56
  p headers # => { ... }
124
57
  p data # => <Array<Suppression>>
125
58
  rescue Sendpost::ApiError => e
126
- puts "Error when calling SuppressionApi->create_suppressions_with_http_info: #{e}"
59
+ puts "Error when calling SuppressionApi->create_suppression_with_http_info: #{e}"
127
60
  end
128
61
  ```
129
62
 
@@ -131,8 +64,7 @@ end
131
64
 
132
65
  | Name | Type | Description | Notes |
133
66
  | ---- | ---- | ----------- | ----- |
134
- | **x_sub_account_api_key** | **String** | Sub-Account API Key | |
135
- | **r_suppression** | [**RSuppression**](RSuppression.md) | Suppression content | [optional] |
67
+ | **create_suppression_request** | [**CreateSuppressionRequest**](CreateSuppressionRequest.md) | | |
136
68
 
137
69
  ### Return type
138
70
 
@@ -140,7 +72,7 @@ end
140
72
 
141
73
  ### Authorization
142
74
 
143
- No authorization required
75
+ [subAccountAuth](../README.md#subAccountAuth)
144
76
 
145
77
  ### HTTP request headers
146
78
 
@@ -150,27 +82,31 @@ No authorization required
150
82
 
151
83
  ## delete_suppression
152
84
 
153
- > <Array<DeleteResponse>> delete_suppression(x_sub_account_api_key, opts)
154
-
85
+ > <Array<DeleteSuppression200ResponseInner>> delete_suppression(delete_suppression_request)
155
86
 
87
+ Delete Suppressions
156
88
 
157
- Delete specific emails which are in suppression list
89
+ Deletes one or more suppressions for a given sub-account. The request can contain a list of emails to delete specific suppressions or delete a single suppression.
158
90
 
159
91
  ### Examples
160
92
 
161
93
  ```ruby
162
94
  require 'time'
163
95
  require 'sendpost_ruby_sdk'
96
+ # setup authorization
97
+ Sendpost.configure do |config|
98
+ # Configure API key authorization: subAccountAuth
99
+ config.api_key['X-SubAccount-ApiKey'] = 'YOUR API KEY'
100
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
101
+ # config.api_key_prefix['X-SubAccount-ApiKey'] = 'Bearer'
102
+ end
164
103
 
165
104
  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
- }
105
+ delete_suppression_request = Sendpost::DeleteSuppressionRequest.new # DeleteSuppressionRequest |
170
106
 
171
107
  begin
172
-
173
- result = api_instance.delete_suppression(x_sub_account_api_key, opts)
108
+ # Delete Suppressions
109
+ result = api_instance.delete_suppression(delete_suppression_request)
174
110
  p result
175
111
  rescue Sendpost::ApiError => e
176
112
  puts "Error when calling SuppressionApi->delete_suppression: #{e}"
@@ -181,15 +117,15 @@ end
181
117
 
182
118
  This returns an Array which contains the response data, status code and headers.
183
119
 
184
- > <Array(<Array<DeleteResponse>>, Integer, Hash)> delete_suppression_with_http_info(x_sub_account_api_key, opts)
120
+ > <Array(<Array<DeleteSuppression200ResponseInner>>, Integer, Hash)> delete_suppression_with_http_info(delete_suppression_request)
185
121
 
186
122
  ```ruby
187
123
  begin
188
-
189
- data, status_code, headers = api_instance.delete_suppression_with_http_info(x_sub_account_api_key, opts)
124
+ # Delete Suppressions
125
+ data, status_code, headers = api_instance.delete_suppression_with_http_info(delete_suppression_request)
190
126
  p status_code # => 2xx
191
127
  p headers # => { ... }
192
- p data # => <Array<DeleteResponse>>
128
+ p data # => <Array<DeleteSuppression200ResponseInner>>
193
129
  rescue Sendpost::ApiError => e
194
130
  puts "Error when calling SuppressionApi->delete_suppression_with_http_info: #{e}"
195
131
  end
@@ -199,16 +135,15 @@ end
199
135
 
200
136
  | Name | Type | Description | Notes |
201
137
  | ---- | ---- | ----------- | ----- |
202
- | **x_sub_account_api_key** | **String** | Sub-Account API Key | |
203
- | **rd_suppression** | [**RDSuppression**](RDSuppression.md) | Suppression content | [optional] |
138
+ | **delete_suppression_request** | [**DeleteSuppressionRequest**](DeleteSuppressionRequest.md) | | |
204
139
 
205
140
  ### Return type
206
141
 
207
- [**Array&lt;DeleteResponse&gt;**](DeleteResponse.md)
142
+ [**Array&lt;DeleteSuppression200ResponseInner&gt;**](DeleteSuppression200ResponseInner.md)
208
143
 
209
144
  ### Authorization
210
145
 
211
- No authorization required
146
+ [subAccountAuth](../README.md#subAccountAuth)
212
147
 
213
148
  ### HTTP request headers
214
149
 
@@ -216,54 +151,61 @@ No authorization required
216
151
  - **Accept**: application/json
217
152
 
218
153
 
219
- ## get_suppressions
220
-
221
- > <Array<Suppression>> get_suppressions(x_sub_account_api_key, opts)
154
+ ## get_suppression_list
222
155
 
156
+ > <Array<Suppression>> get_suppression_list(from, to, opts)
223
157
 
158
+ List Suppressions
224
159
 
225
- Get all suppressions
160
+ Retrieves a list of suppressions associated with a specific sub-account within a given date range. The maximum difference between `from` and `to` dates should not exceed 60 days.
226
161
 
227
162
  ### Examples
228
163
 
229
164
  ```ruby
230
165
  require 'time'
231
166
  require 'sendpost_ruby_sdk'
167
+ # setup authorization
168
+ Sendpost.configure do |config|
169
+ # Configure API key authorization: subAccountAuth
170
+ config.api_key['X-SubAccount-ApiKey'] = 'YOUR API KEY'
171
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
172
+ # config.api_key_prefix['X-SubAccount-ApiKey'] = 'Bearer'
173
+ end
232
174
 
233
175
  api_instance = Sendpost::SuppressionApi.new
234
- x_sub_account_api_key = 'x_sub_account_api_key_example' # String | Sub-Account API Key
176
+ from = Date.parse('2013-10-20') # Date | Start date for the suppression records
177
+ to = Date.parse('2013-10-20') # Date | End date for the suppression records (Note: `from` should be earlier than `to` and the date range should not exceed 60 days)
235
178
  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
179
+ limit: 56, # Integer | Number of records to return per request
180
+ offset: 56, # Integer | Number of initial records to skip
181
+ search: 'search_example', # String | Case-insensitive search against suppression email
182
+ type: 'hardBounce' # String | Type of suppression. Valid values: `hardBounce`, `manual`, `spamComplaint`, `unsubscribe`
241
183
  }
242
184
 
243
185
  begin
244
-
245
- result = api_instance.get_suppressions(x_sub_account_api_key, opts)
186
+ # List Suppressions
187
+ result = api_instance.get_suppression_list(from, to, opts)
246
188
  p result
247
189
  rescue Sendpost::ApiError => e
248
- puts "Error when calling SuppressionApi->get_suppressions: #{e}"
190
+ puts "Error when calling SuppressionApi->get_suppression_list: #{e}"
249
191
  end
250
192
  ```
251
193
 
252
- #### Using the get_suppressions_with_http_info variant
194
+ #### Using the get_suppression_list_with_http_info variant
253
195
 
254
196
  This returns an Array which contains the response data, status code and headers.
255
197
 
256
- > <Array(<Array<Suppression>>, Integer, Hash)> get_suppressions_with_http_info(x_sub_account_api_key, opts)
198
+ > <Array(<Array<Suppression>>, Integer, Hash)> get_suppression_list_with_http_info(from, to, opts)
257
199
 
258
200
  ```ruby
259
201
  begin
260
-
261
- data, status_code, headers = api_instance.get_suppressions_with_http_info(x_sub_account_api_key, opts)
202
+ # List Suppressions
203
+ data, status_code, headers = api_instance.get_suppression_list_with_http_info(from, to, opts)
262
204
  p status_code # => 2xx
263
205
  p headers # => { ... }
264
206
  p data # => <Array<Suppression>>
265
207
  rescue Sendpost::ApiError => e
266
- puts "Error when calling SuppressionApi->get_suppressions_with_http_info: #{e}"
208
+ puts "Error when calling SuppressionApi->get_suppression_list_with_http_info: #{e}"
267
209
  end
268
210
  ```
269
211
 
@@ -271,12 +213,12 @@ end
271
213
 
272
214
  | Name | Type | Description | Notes |
273
215
  | ---- | ---- | ----------- | ----- |
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] |
216
+ | **from** | **Date** | Start date for the suppression records | |
217
+ | **to** | **Date** | End date for the suppression records (Note: &#x60;from&#x60; should be earlier than &#x60;to&#x60; and the date range should not exceed 60 days) | |
218
+ | **limit** | **Integer** | Number of records to return per request | [optional][default to 20] |
219
+ | **offset** | **Integer** | Number of initial records to skip | [optional][default to 0] |
220
+ | **search** | **String** | Case-insensitive search against suppression email | [optional] |
221
+ | **type** | **String** | Type of suppression. Valid values: &#x60;hardBounce&#x60;, &#x60;manual&#x60;, &#x60;spamComplaint&#x60;, &#x60;unsubscribe&#x60; | [optional] |
280
222
 
281
223
  ### Return type
282
224
 
@@ -284,7 +226,7 @@ end
284
226
 
285
227
  ### Authorization
286
228
 
287
- No authorization required
229
+ [subAccountAuth](../README.md#subAccountAuth)
288
230
 
289
231
  ### HTTP request headers
290
232
 
@@ -0,0 +1,38 @@
1
+ # Sendpost::ThirdPartySendingProvider
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+ | **type** | **Integer** | | [optional] |
10
+ | **domain** | **String** | | [optional] |
11
+ | **endpoint** | **String** | | [optional] |
12
+ | **key** | **String** | | [optional] |
13
+ | **secret** | **String** | | [optional] |
14
+ | **port** | **Integer** | | [optional] |
15
+ | **oauth_token** | **String** | | [optional] |
16
+ | **retry_time** | **Integer** | | [optional] |
17
+ | **created** | **Integer** | | [optional] |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'sendpost_ruby_sdk'
23
+
24
+ instance = Sendpost::ThirdPartySendingProvider.new(
25
+ id: 1,
26
+ name: sendgrid,
27
+ type: 1,
28
+ domain: ,
29
+ endpoint: ,
30
+ key: ,
31
+ secret: your_api_key,
32
+ port: 0,
33
+ oauth_token: ,
34
+ retry_time: 0,
35
+ created: 1597511124701000
36
+ )
37
+ ```
38
+
@@ -0,0 +1,18 @@
1
+ # Sendpost::UpdateSubAccount
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | New name for the sub-account. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'sendpost_ruby_sdk'
13
+
14
+ instance = Sendpost::UpdateSubAccount.new(
15
+ name: FoxHole V1
16
+ )
17
+ ```
18
+
@@ -0,0 +1,46 @@
1
+ # Sendpost::UpdateWebhook
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **enabled** | **Boolean** | Is the webhook active or in a paused state? | [optional] |
8
+ | **url** | **String** | URL endpoint to which webhook calls are sent. | [optional] |
9
+ | **processed** | **Boolean** | Trigger webhook on email message being processed. | [optional] |
10
+ | **delivered** | **Boolean** | Trigger webhook on email message being delivered. | [optional] |
11
+ | **dropped** | **Boolean** | Trigger webhook on email message being dropped. | [optional] |
12
+ | **soft_bounced** | **Boolean** | Trigger webhook on email message being soft bounced. | [optional] |
13
+ | **hard_bounced** | **Boolean** | Trigger webhook on email message being hard bounced. | [optional] |
14
+ | **opened** | **Boolean** | Trigger webhook on email message being opened. | [optional] |
15
+ | **clicked** | **Boolean** | Trigger webhook on email message link being clicked. | [optional] |
16
+ | **unsubscribed** | **Boolean** | Trigger webhook on email message being unsubscribed. | [optional] |
17
+ | **spam** | **Boolean** | Trigger webhook on email message being marked as spam. | [optional] |
18
+ | **sent** | **Boolean** | Trigger webhook on email message being sent. | [optional] |
19
+ | **smtp_dropped** | **Boolean** | Trigger webhook on email message being dropped by SMTP. | [optional] |
20
+ | **unique_open** | **Boolean** | Trigger webhook on unique email opens. | [optional] |
21
+ | **unique_click** | **Boolean** | Trigger webhook on unique email clicks. | [optional] |
22
+
23
+ ## Example
24
+
25
+ ```ruby
26
+ require 'sendpost_ruby_sdk'
27
+
28
+ instance = Sendpost::UpdateWebhook.new(
29
+ enabled: true,
30
+ url: https://app.hooli.com/email/webhook,
31
+ processed: true,
32
+ delivered: true,
33
+ dropped: false,
34
+ soft_bounced: false,
35
+ hard_bounced: true,
36
+ opened: true,
37
+ clicked: true,
38
+ unsubscribed: true,
39
+ spam: true,
40
+ sent: true,
41
+ smtp_dropped: false,
42
+ unique_open: true,
43
+ unique_click: true
44
+ )
45
+ ```
46
+
data/docs/UserAgent.md CHANGED
@@ -15,10 +15,10 @@
15
15
  require 'sendpost_ruby_sdk'
16
16
 
17
17
  instance = Sendpost::UserAgent.new(
18
- family: null,
19
- major: null,
20
- minor: null,
21
- patch: null
18
+ family: Mozilla,
19
+ major: 5.0,
20
+ minor: 0,
21
+ patch: 0
22
22
  )
23
23
  ```
24
24
 
data/docs/Webhook.md ADDED
@@ -0,0 +1,54 @@
1
+ # Sendpost::Webhook
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | Unique ID for the webhook. | [optional] |
8
+ | **enabled** | **Boolean** | Indicates if the webhook is active or paused. | [optional] |
9
+ | **url** | **String** | URL endpoint to which webhook calls need to be made. | [optional] |
10
+ | **processed** | **Boolean** | Trigger webhook on email message being processed. | [optional] |
11
+ | **delivered** | **Boolean** | Trigger webhook on email message being delivered. | [optional] |
12
+ | **dropped** | **Boolean** | Trigger webhook on email message being dropped. | [optional] |
13
+ | **soft_bounced** | **Boolean** | Trigger webhook on email message being soft bounced. | [optional] |
14
+ | **hard_bounced** | **Boolean** | Trigger webhook on email message being hard bounced. | [optional] |
15
+ | **opened** | **Boolean** | Trigger webhook on email message being opened. | [optional] |
16
+ | **clicked** | **Boolean** | Trigger webhook on email message link being clicked. | [optional] |
17
+ | **unsubscribed** | **Boolean** | Trigger webhook on email message being unsubscribed. | [optional] |
18
+ | **spam** | **Boolean** | Trigger webhook on email message being marked as spam. | [optional] |
19
+ | **sent** | **Boolean** | Trigger webhook on email message being sent. | [optional] |
20
+ | **smtp_dropped** | **Boolean** | Trigger webhook on email message being dropped by SMTP. | [optional] |
21
+ | **unique_open** | **Boolean** | Trigger webhook on unique email opens. | [optional] |
22
+ | **unique_click** | **Boolean** | Trigger webhook on unique email clicks. | [optional] |
23
+ | **created** | **Integer** | UNIX epoch nano timestamp when the webhook was created. | [optional] |
24
+ | **created_by** | **Hash&lt;String, Object&gt;** | Member who created the webhook | [optional] |
25
+ | **updated_by** | **Hash&lt;String, Object&gt;** | Member who updated the webhook | [optional] |
26
+
27
+ ## Example
28
+
29
+ ```ruby
30
+ require 'sendpost_ruby_sdk'
31
+
32
+ instance = Sendpost::Webhook.new(
33
+ id: 117,
34
+ enabled: true,
35
+ url: https://app.hooli.com/email/webhook,
36
+ processed: true,
37
+ delivered: true,
38
+ dropped: false,
39
+ soft_bounced: false,
40
+ hard_bounced: true,
41
+ opened: true,
42
+ clicked: true,
43
+ unsubscribed: true,
44
+ spam: true,
45
+ sent: true,
46
+ smtp_dropped: false,
47
+ unique_open: true,
48
+ unique_click: true,
49
+ created: 1567512491588004044,
50
+ created_by: null,
51
+ updated_by: null
52
+ )
53
+ ```
54
+