sendpost_ruby_sdk 2.0.0 → 3.0.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.
Files changed (354) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +613 -529
  3. data/docs/AccountCycleUsage.md +18 -0
  4. data/docs/AccountStats.md +3 -3
  5. data/docs/AccountWebhookWithStats.md +58 -0
  6. data/docs/AggregateStat.md +14 -14
  7. data/docs/AggregateStats.md +22 -22
  8. data/docs/Attachment.md +4 -4
  9. data/docs/BlacklistLinks.md +20 -0
  10. data/docs/BlacklistResource.md +38 -0
  11. data/docs/BlacklistedOn.md +20 -0
  12. data/docs/CopyTo.md +6 -6
  13. data/docs/CreateDomainRequest.md +2 -2
  14. data/docs/CreateSuppressionRequest.md +4 -4
  15. data/docs/CreateSuppressionRequestHardBounceInner.md +1 -1
  16. data/docs/CreateSuppressionRequestManualInner.md +1 -1
  17. data/docs/CreateSuppressionRequestSpamComplaintInner.md +1 -1
  18. data/docs/CreateSuppressionRequestUnsubscribeInner.md +1 -1
  19. data/docs/DailyStatistics.md +38 -0
  20. data/docs/DateStat.md +40 -0
  21. data/docs/DeleteResponse.md +4 -4
  22. data/docs/DeleteSubAccountResponse.md +4 -4
  23. data/docs/{DeleteSuppression200ResponseInner.md → DeleteSuppression200Response.md} +2 -4
  24. data/docs/DeleteSuppressionRequest.md +1 -1
  25. data/docs/{EmailMessageReplyTo.md → DeleteSuppressionRequestSuppressionsInner.md} +3 -5
  26. data/docs/DeleteWebhookResponse.md +3 -3
  27. data/docs/Device.md +2 -2
  28. data/docs/DnsRecord.md +22 -0
  29. data/docs/Domain.md +24 -28
  30. data/docs/DomainApi.md +66 -66
  31. data/docs/DomainStat.md +46 -0
  32. data/docs/EIP.md +1 -1
  33. data/docs/EmailAddress.md +4 -4
  34. data/docs/EmailApi.md +4 -4
  35. data/docs/EmailMessage.md +30 -30
  36. data/docs/EmailMessageObject.md +33 -26
  37. data/docs/EmailMessageWithTemplate.md +32 -27
  38. data/docs/EmailResponse.md +10 -10
  39. data/docs/EmailTypeStat.md +40 -0
  40. data/docs/ErrorResponse.md +18 -0
  41. data/docs/ErrorResponseError.md +26 -0
  42. data/docs/ErrorResponseErrorDetailsInner.md +20 -0
  43. data/docs/Event.md +18 -36
  44. data/docs/EventMetadata.md +14 -14
  45. data/docs/GeoLocation.md +8 -8
  46. data/docs/GroupStat.md +40 -0
  47. data/docs/IP.md +13 -43
  48. data/docs/IPAllocationRequest.md +4 -4
  49. data/docs/IPApi.md +19 -19
  50. data/docs/IPDeletionResponse.md +2 -2
  51. data/docs/IPPool.md +13 -21
  52. data/docs/IPPoolCreateRequest.md +10 -8
  53. data/docs/IPPoolDeleteResponse.md +2 -2
  54. data/docs/IPPoolStat.md +44 -0
  55. data/docs/IPPoolUpdateRequest.md +13 -7
  56. data/docs/IPPoolsApi.md +26 -19
  57. data/docs/IPStat.md +46 -0
  58. data/docs/IPUpdateRequest.md +2 -2
  59. data/docs/Label.md +10 -6
  60. data/docs/Member.md +15 -21
  61. data/docs/Message.md +37 -53
  62. data/docs/MessageApi.md +83 -3
  63. data/docs/NewSubAccount.md +18 -0
  64. data/docs/NewWebhook.md +46 -0
  65. data/docs/Os.md +26 -0
  66. data/docs/PostmasterDomainStat.md +30 -0
  67. data/docs/ProviderStat.md +40 -0
  68. data/docs/RAIPPoolStat.md +20 -0
  69. data/docs/RDStat.md +20 -0
  70. data/docs/RIPStat.md +20 -0
  71. data/docs/RStat.md +20 -0
  72. data/docs/Recipient.md +8 -8
  73. data/docs/SDStat.md +42 -0
  74. data/docs/SMTPAuth.md +5 -9
  75. data/docs/SeedContactStats.md +28 -0
  76. data/docs/Stat.md +22 -4
  77. data/docs/StatsAApi.md +24 -24
  78. data/docs/StatsApi.md +19 -19
  79. data/docs/SubAccount.md +13 -27
  80. data/docs/SubAccountApi.md +23 -23
  81. data/docs/SubAccountStat.md +44 -0
  82. data/docs/SubAccountStatForPool.md +42 -0
  83. data/docs/Suppression.md +14 -10
  84. data/docs/SuppressionApi.md +19 -19
  85. data/docs/TPSPStat.md +42 -0
  86. data/docs/UpdateSubAccount.md +2 -2
  87. data/docs/UpdateWebhook.md +23 -23
  88. data/docs/UserAgent.md +7 -7
  89. data/docs/ValidationStat.md +32 -0
  90. data/docs/Webhook.md +31 -29
  91. data/docs/WebhookApi.md +28 -28
  92. data/docs/WebhookObject.md +20 -0
  93. data/docs/WebhookReferenceApi.md +71 -0
  94. data/lib/sendpost_ruby_sdk/api/domain_api.rb +84 -84
  95. data/lib/sendpost_ruby_sdk/api/email_api.rb +6 -6
  96. data/lib/sendpost_ruby_sdk/api/ip_api.rb +24 -24
  97. data/lib/sendpost_ruby_sdk/api/ip_pools_api.rb +25 -25
  98. data/lib/sendpost_ruby_sdk/api/message_api.rb +83 -6
  99. data/lib/sendpost_ruby_sdk/api/stats_a_api.rb +30 -30
  100. data/lib/sendpost_ruby_sdk/api/stats_api.rb +24 -24
  101. data/lib/sendpost_ruby_sdk/api/sub_account_api.rb +33 -33
  102. data/lib/sendpost_ruby_sdk/api/suppression_api.rb +23 -23
  103. data/lib/sendpost_ruby_sdk/api/webhook_api.rb +36 -36
  104. data/lib/sendpost_ruby_sdk/api/webhook_reference_api.rb +82 -0
  105. data/lib/sendpost_ruby_sdk/api_client.rb +2 -2
  106. data/lib/sendpost_ruby_sdk/api_error.rb +2 -2
  107. data/lib/sendpost_ruby_sdk/configuration.rb +2 -2
  108. data/lib/sendpost_ruby_sdk/models/account_cycle_usage.rb +222 -0
  109. data/lib/sendpost_ruby_sdk/models/account_stats.rb +5 -3
  110. data/lib/sendpost_ruby_sdk/models/account_webhook_with_stats.rb +463 -0
  111. data/lib/sendpost_ruby_sdk/models/aggregate_stat.rb +37 -29
  112. data/lib/sendpost_ruby_sdk/models/aggregate_stats.rb +43 -24
  113. data/lib/sendpost_ruby_sdk/models/attachment.rb +48 -4
  114. data/lib/sendpost_ruby_sdk/models/blacklist_links.rb +232 -0
  115. data/lib/sendpost_ruby_sdk/models/blacklist_resource.rb +323 -0
  116. data/lib/sendpost_ruby_sdk/models/blacklisted_on.rb +232 -0
  117. data/lib/sendpost_ruby_sdk/models/copy_to.rb +42 -3
  118. data/lib/sendpost_ruby_sdk/models/create_domain_request.rb +32 -3
  119. data/lib/sendpost_ruby_sdk/models/create_suppression_request.rb +6 -6
  120. data/lib/sendpost_ruby_sdk/models/create_suppression_request_hard_bounce_inner.rb +2 -2
  121. data/lib/sendpost_ruby_sdk/models/create_suppression_request_manual_inner.rb +2 -2
  122. data/lib/sendpost_ruby_sdk/models/create_suppression_request_spam_complaint_inner.rb +2 -2
  123. data/lib/sendpost_ruby_sdk/models/create_suppression_request_unsubscribe_inner.rb +2 -2
  124. data/lib/sendpost_ruby_sdk/models/daily_statistics.rb +322 -0
  125. data/lib/sendpost_ruby_sdk/models/date_stat.rb +339 -0
  126. data/lib/sendpost_ruby_sdk/models/delete_response.rb +5 -4
  127. data/lib/sendpost_ruby_sdk/models/delete_sub_account_response.rb +5 -4
  128. data/lib/sendpost_ruby_sdk/models/delete_suppression200_response.rb +221 -0
  129. data/lib/sendpost_ruby_sdk/models/delete_suppression_request.rb +4 -3
  130. data/lib/sendpost_ruby_sdk/models/delete_suppression_request_suppressions_inner.rb +220 -0
  131. data/lib/sendpost_ruby_sdk/models/delete_webhook_response.rb +5 -4
  132. data/lib/sendpost_ruby_sdk/models/device.rb +5 -3
  133. data/lib/sendpost_ruby_sdk/models/dns_record.rb +276 -0
  134. data/lib/sendpost_ruby_sdk/models/domain.rb +42 -56
  135. data/lib/sendpost_ruby_sdk/models/domain_stat.rb +369 -0
  136. data/lib/sendpost_ruby_sdk/models/eip.rb +4 -3
  137. data/lib/sendpost_ruby_sdk/models/email_address.rb +41 -2
  138. data/lib/sendpost_ruby_sdk/models/email_message.rb +26 -9
  139. data/lib/sendpost_ruby_sdk/models/email_message_object.rb +123 -3
  140. data/lib/sendpost_ruby_sdk/models/email_message_with_template.rb +121 -12
  141. data/lib/sendpost_ruby_sdk/models/email_response.rb +8 -4
  142. data/lib/sendpost_ruby_sdk/models/email_type_stat.rb +339 -0
  143. data/lib/sendpost_ruby_sdk/models/error_response.rb +221 -0
  144. data/lib/sendpost_ruby_sdk/models/error_response_error.rb +297 -0
  145. data/lib/sendpost_ruby_sdk/models/error_response_error_details_inner.rb +231 -0
  146. data/lib/sendpost_ruby_sdk/models/event.rb +94 -118
  147. data/lib/sendpost_ruby_sdk/models/event_metadata.rb +15 -5
  148. data/lib/sendpost_ruby_sdk/models/geo_location.rb +20 -14
  149. data/lib/sendpost_ruby_sdk/models/group_stat.rb +339 -0
  150. data/lib/sendpost_ruby_sdk/models/ip.rb +72 -223
  151. data/lib/sendpost_ruby_sdk/models/ip_allocation_request.rb +29 -33
  152. data/lib/sendpost_ruby_sdk/models/ip_deletion_response.rb +5 -4
  153. data/lib/sendpost_ruby_sdk/models/ip_pool.rb +100 -66
  154. data/lib/sendpost_ruby_sdk/models/ip_pool_create_request.rb +101 -9
  155. data/lib/sendpost_ruby_sdk/models/ip_pool_delete_response.rb +5 -2
  156. data/lib/sendpost_ruby_sdk/models/ip_pool_stat.rb +359 -0
  157. data/lib/sendpost_ruby_sdk/models/ip_pool_update_request.rb +97 -7
  158. data/lib/sendpost_ruby_sdk/models/ip_stat.rb +369 -0
  159. data/lib/sendpost_ruby_sdk/models/ip_update_request.rb +4 -20
  160. data/lib/sendpost_ruby_sdk/models/label.rb +101 -6
  161. data/lib/sendpost_ruby_sdk/models/member.rb +49 -57
  162. data/lib/sendpost_ruby_sdk/models/message.rb +39 -120
  163. data/lib/sendpost_ruby_sdk/models/new_sub_account.rb +257 -0
  164. data/lib/sendpost_ruby_sdk/models/new_webhook.rb +407 -0
  165. data/lib/sendpost_ruby_sdk/models/os.rb +262 -0
  166. data/lib/sendpost_ruby_sdk/models/postmaster_domain_stat.rb +282 -0
  167. data/lib/sendpost_ruby_sdk/models/provider_stat.rb +339 -0
  168. data/lib/sendpost_ruby_sdk/models/r_stat.rb +231 -0
  169. data/lib/sendpost_ruby_sdk/models/raip_pool_stat.rb +231 -0
  170. data/lib/sendpost_ruby_sdk/models/rd_stat.rb +231 -0
  171. data/lib/sendpost_ruby_sdk/models/recipient.rb +82 -3
  172. data/lib/sendpost_ruby_sdk/models/rip_stat.rb +231 -0
  173. data/lib/sendpost_ruby_sdk/models/sd_stat.rb +349 -0
  174. data/lib/sendpost_ruby_sdk/models/seed_contact_stats.rb +281 -0
  175. data/lib/sendpost_ruby_sdk/models/smtp_auth.rb +10 -29
  176. data/lib/sendpost_ruby_sdk/models/stat.rb +108 -16
  177. data/lib/sendpost_ruby_sdk/models/sub_account.rb +57 -115
  178. data/lib/sendpost_ruby_sdk/models/sub_account_stat.rb +359 -0
  179. data/lib/sendpost_ruby_sdk/models/sub_account_stat_for_pool.rb +349 -0
  180. data/lib/sendpost_ruby_sdk/models/suppression.rb +82 -15
  181. data/lib/sendpost_ruby_sdk/models/tpsp_stat.rb +349 -0
  182. data/lib/sendpost_ruby_sdk/models/update_sub_account.rb +32 -3
  183. data/lib/sendpost_ruby_sdk/models/update_webhook.rb +83 -37
  184. data/lib/sendpost_ruby_sdk/models/user_agent.rb +11 -6
  185. data/lib/sendpost_ruby_sdk/models/validation_stat.rb +292 -0
  186. data/lib/sendpost_ruby_sdk/models/webhook.rb +108 -67
  187. data/lib/sendpost_ruby_sdk/models/webhook_object.rb +232 -0
  188. data/lib/sendpost_ruby_sdk/version.rb +3 -3
  189. data/lib/sendpost_ruby_sdk.rb +36 -26
  190. data/sendpost_ruby_sdk.gemspec +39 -0
  191. data/spec/api/webhook_reference_api_spec.rb +46 -0
  192. data/spec/models/account_cycle_usage_spec.rb +36 -0
  193. data/spec/models/account_webhook_with_stats_spec.rb +160 -0
  194. data/spec/models/blacklist_links_spec.rb +42 -0
  195. data/spec/models/blacklist_resource_spec.rb +96 -0
  196. data/spec/models/blacklisted_on_spec.rb +42 -0
  197. data/spec/models/daily_statistics_spec.rb +96 -0
  198. data/spec/models/date_stat_spec.rb +102 -0
  199. data/spec/models/delete_suppression200_response_spec.rb +36 -0
  200. data/spec/models/delete_suppression_request_suppressions_inner_spec.rb +36 -0
  201. data/spec/models/dns_record_spec.rb +52 -0
  202. data/spec/models/domain_stat_spec.rb +120 -0
  203. data/spec/models/email_type_stat_spec.rb +102 -0
  204. data/spec/models/error_response_error_details_inner_spec.rb +42 -0
  205. data/spec/models/error_response_error_spec.rb +64 -0
  206. data/spec/models/error_response_spec.rb +36 -0
  207. data/spec/models/group_stat_spec.rb +102 -0
  208. data/spec/models/ip_pool_stat_spec.rb +114 -0
  209. data/spec/models/ip_stat_spec.rb +120 -0
  210. data/spec/models/new_sub_account_spec.rb +36 -0
  211. data/spec/models/new_webhook_spec.rb +120 -0
  212. data/spec/models/os_spec.rb +60 -0
  213. data/spec/models/postmaster_domain_stat_spec.rb +72 -0
  214. data/spec/models/provider_stat_spec.rb +102 -0
  215. data/spec/models/r_stat_spec.rb +42 -0
  216. data/spec/models/raip_pool_stat_spec.rb +42 -0
  217. data/spec/models/rd_stat_spec.rb +42 -0
  218. data/spec/models/rip_stat_spec.rb +42 -0
  219. data/spec/models/sd_stat_spec.rb +108 -0
  220. data/spec/models/seed_contact_stats_spec.rb +66 -0
  221. data/spec/models/sub_account_stat_for_pool_spec.rb +108 -0
  222. data/spec/models/sub_account_stat_spec.rb +114 -0
  223. data/spec/models/tpsp_stat_spec.rb +108 -0
  224. data/spec/models/validation_stat_spec.rb +78 -0
  225. data/spec/models/webhook_object_spec.rb +42 -0
  226. data/spec/spec_helper.rb +2 -2
  227. metadata +144 -212
  228. data/LICENSE +0 -21
  229. data/docs/AccountStatsStat.md +0 -38
  230. data/docs/AggregatedEmailStats.md +0 -38
  231. data/docs/AutoWarmupPlan.md +0 -80
  232. data/docs/CreateSubAccountRequest.md +0 -18
  233. data/docs/CreateWebhookRequest.md +0 -46
  234. data/docs/DomainDkim.md +0 -22
  235. data/docs/DomainDmarc.md +0 -22
  236. data/docs/DomainGpt.md +0 -22
  237. data/docs/DomainReturnPath.md +0 -22
  238. data/docs/DomainTrack.md +0 -22
  239. data/docs/EmailMessageFrom.md +0 -20
  240. data/docs/EmailMessageToInner.md +0 -26
  241. data/docs/EmailMessageToInnerBccInner.md +0 -22
  242. data/docs/EmailMessageToInnerCcInner.md +0 -22
  243. data/docs/EmailStats.md +0 -20
  244. data/docs/EmailStatsStats.md +0 -38
  245. data/docs/MessageHeaderTo.md +0 -26
  246. data/docs/MessageTo.md +0 -26
  247. data/docs/OperatingSystem.md +0 -26
  248. data/docs/Person.md +0 -20
  249. data/docs/StatStats.md +0 -38
  250. data/docs/ThirdPartySendingProvider.md +0 -38
  251. data/lib/sendpost_ruby_sdk/models/account_stats_stat.rb +0 -310
  252. data/lib/sendpost_ruby_sdk/models/aggregated_email_stats.rb +0 -321
  253. data/lib/sendpost_ruby_sdk/models/auto_warmup_plan.rb +0 -531
  254. data/lib/sendpost_ruby_sdk/models/create_sub_account_request.rb +0 -221
  255. data/lib/sendpost_ruby_sdk/models/create_webhook_request.rb +0 -361
  256. data/lib/sendpost_ruby_sdk/models/delete_suppression200_response_inner.rb +0 -231
  257. data/lib/sendpost_ruby_sdk/models/domain_dkim.rb +0 -239
  258. data/lib/sendpost_ruby_sdk/models/domain_dmarc.rb +0 -239
  259. data/lib/sendpost_ruby_sdk/models/domain_gpt.rb +0 -239
  260. data/lib/sendpost_ruby_sdk/models/domain_return_path.rb +0 -239
  261. data/lib/sendpost_ruby_sdk/models/domain_track.rb +0 -239
  262. data/lib/sendpost_ruby_sdk/models/email_message_from.rb +0 -229
  263. data/lib/sendpost_ruby_sdk/models/email_message_reply_to.rb +0 -229
  264. data/lib/sendpost_ruby_sdk/models/email_message_to_inner.rb +0 -262
  265. data/lib/sendpost_ruby_sdk/models/email_message_to_inner_bcc_inner.rb +0 -240
  266. data/lib/sendpost_ruby_sdk/models/email_message_to_inner_cc_inner.rb +0 -240
  267. data/lib/sendpost_ruby_sdk/models/email_stats.rb +0 -230
  268. data/lib/sendpost_ruby_sdk/models/email_stats_stats.rb +0 -321
  269. data/lib/sendpost_ruby_sdk/models/message_header_to.rb +0 -268
  270. data/lib/sendpost_ruby_sdk/models/message_to.rb +0 -268
  271. data/lib/sendpost_ruby_sdk/models/operating_system.rb +0 -256
  272. data/lib/sendpost_ruby_sdk/models/person.rb +0 -231
  273. data/lib/sendpost_ruby_sdk/models/stat_stats.rb +0 -321
  274. data/lib/sendpost_ruby_sdk/models/third_party_sending_provider.rb +0 -310
  275. data/spec/api/domain_api_spec.rb +0 -85
  276. data/spec/api/email_api_spec.rb +0 -59
  277. data/spec/api/ip_api_spec.rb +0 -98
  278. data/spec/api/ip_pools_api_spec.rb +0 -98
  279. data/spec/api/message_api_spec.rb +0 -47
  280. data/spec/api/stats_a_api_spec.rb +0 -89
  281. data/spec/api/stats_api_spec.rb +0 -78
  282. data/spec/api/sub_account_api_spec.rb +0 -98
  283. data/spec/api/suppression_api_spec.rb +0 -76
  284. data/spec/api/webhook_api_spec.rb +0 -98
  285. data/spec/models/account_stats_spec.rb +0 -42
  286. data/spec/models/account_stats_stat_spec.rb +0 -96
  287. data/spec/models/aggregate_stat_spec.rb +0 -96
  288. data/spec/models/aggregate_stats_spec.rb +0 -96
  289. data/spec/models/aggregated_email_stats_spec.rb +0 -96
  290. data/spec/models/attachment_spec.rb +0 -42
  291. data/spec/models/auto_warmup_plan_spec.rb +0 -222
  292. data/spec/models/copy_to_spec.rb +0 -48
  293. data/spec/models/create_domain_request_spec.rb +0 -36
  294. data/spec/models/create_sub_account_request_spec.rb +0 -36
  295. data/spec/models/create_suppression_request_hard_bounce_inner_spec.rb +0 -36
  296. data/spec/models/create_suppression_request_manual_inner_spec.rb +0 -36
  297. data/spec/models/create_suppression_request_spam_complaint_inner_spec.rb +0 -36
  298. data/spec/models/create_suppression_request_spec.rb +0 -54
  299. data/spec/models/create_suppression_request_unsubscribe_inner_spec.rb +0 -36
  300. data/spec/models/create_webhook_request_spec.rb +0 -120
  301. data/spec/models/delete_response_spec.rb +0 -42
  302. data/spec/models/delete_sub_account_response_spec.rb +0 -42
  303. data/spec/models/delete_suppression200_response_inner_spec.rb +0 -42
  304. data/spec/models/delete_suppression_request_spec.rb +0 -36
  305. data/spec/models/delete_webhook_response_spec.rb +0 -42
  306. data/spec/models/device_spec.rb +0 -36
  307. data/spec/models/domain_dkim_spec.rb +0 -48
  308. data/spec/models/domain_dmarc_spec.rb +0 -48
  309. data/spec/models/domain_gpt_spec.rb +0 -48
  310. data/spec/models/domain_return_path_spec.rb +0 -48
  311. data/spec/models/domain_spec.rb +0 -150
  312. data/spec/models/domain_track_spec.rb +0 -48
  313. data/spec/models/eip_spec.rb +0 -36
  314. data/spec/models/email_address_spec.rb +0 -42
  315. data/spec/models/email_message_from_spec.rb +0 -42
  316. data/spec/models/email_message_object_spec.rb +0 -120
  317. data/spec/models/email_message_reply_to_spec.rb +0 -42
  318. data/spec/models/email_message_spec.rb +0 -138
  319. data/spec/models/email_message_to_inner_bcc_inner_spec.rb +0 -48
  320. data/spec/models/email_message_to_inner_cc_inner_spec.rb +0 -48
  321. data/spec/models/email_message_to_inner_spec.rb +0 -60
  322. data/spec/models/email_message_with_template_spec.rb +0 -138
  323. data/spec/models/email_response_spec.rb +0 -60
  324. data/spec/models/email_stats_spec.rb +0 -42
  325. data/spec/models/email_stats_stats_spec.rb +0 -96
  326. data/spec/models/event_metadata_spec.rb +0 -84
  327. data/spec/models/event_spec.rb +0 -150
  328. data/spec/models/geo_location_spec.rb +0 -60
  329. data/spec/models/ip_allocation_request_spec.rb +0 -42
  330. data/spec/models/ip_deletion_response_spec.rb +0 -42
  331. data/spec/models/ip_pool_create_request_spec.rb +0 -66
  332. data/spec/models/ip_pool_delete_response_spec.rb +0 -42
  333. data/spec/models/ip_pool_spec.rb +0 -108
  334. data/spec/models/ip_pool_update_request_spec.rb +0 -54
  335. data/spec/models/ip_spec.rb +0 -168
  336. data/spec/models/ip_update_request_spec.rb +0 -36
  337. data/spec/models/label_spec.rb +0 -48
  338. data/spec/models/member_spec.rb +0 -102
  339. data/spec/models/message_header_to_spec.rb +0 -60
  340. data/spec/models/message_spec.rb +0 -210
  341. data/spec/models/message_to_spec.rb +0 -60
  342. data/spec/models/operating_system_spec.rb +0 -60
  343. data/spec/models/person_spec.rb +0 -42
  344. data/spec/models/recipient_spec.rb +0 -60
  345. data/spec/models/smtp_auth_spec.rb +0 -60
  346. data/spec/models/stat_spec.rb +0 -42
  347. data/spec/models/stat_stats_spec.rb +0 -96
  348. data/spec/models/sub_account_spec.rb +0 -130
  349. data/spec/models/suppression_spec.rb +0 -60
  350. data/spec/models/third_party_sending_provider_spec.rb +0 -96
  351. data/spec/models/update_sub_account_spec.rb +0 -36
  352. data/spec/models/update_webhook_spec.rb +0 -120
  353. data/spec/models/user_agent_spec.rb +0 -54
  354. data/spec/models/webhook_spec.rb +0 -144
data/docs/Suppression.md CHANGED
@@ -4,11 +4,13 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **Integer** | The ID of the suppression | [optional] |
8
- | **reason** | **Integer** | The reason for the suppression (0 = manual, 1 = unsubscribe, 2 = hard bounce, 3 = spam complaint) | [optional] |
9
- | **smtp_error** | **String** | SMTP error code in case of hard bounce suppression | [optional] |
10
- | **email** | **String** | The email address for the suppression | [optional] |
11
- | **created** | **Integer** | UNIX epoch nano timestamp when the suppression was created | [optional] |
7
+ | **id** | **Integer** | Unique identifier for the suppression record | [optional] |
8
+ | **email** | **String** | The suppressed email address | [optional] |
9
+ | **reason** | **Integer** | Reason code for the suppression: - `0` = Manual (added via API or dashboard) - `1` = Unsubscribe (recipient clicked unsubscribe link) - `2` = Hard Bounce (permanent delivery failure) - `3` = Spam Complaint (recipient marked as spam) - `4` = Hard Bounce (detected by post-send validation) | [optional] |
10
+ | **reason_text** | **String** | Human-readable suppression reason | [optional] |
11
+ | **smtp_error** | **String** | SMTP error message from the receiving server (only for hard bounce suppressions). Useful for diagnosing delivery issues. | [optional] |
12
+ | **message_uuid** | **String** | UUID of the message whose bounce/complaint caused this suppression. Empty for manually added suppressions. Useful for tracing the origin. | [optional] |
13
+ | **created** | **Integer** | UNIX epoch timestamp in nanoseconds when the suppression was added | [optional] |
12
14
 
13
15
  ## Example
14
16
 
@@ -16,11 +18,13 @@
16
18
  require 'sendpost_ruby_sdk'
17
19
 
18
20
  instance = Sendpost::Suppression.new(
19
- id: null,
20
- reason: null,
21
- smtp_error: null,
22
- email: null,
23
- created: null
21
+ id: 35,
22
+ email: bounced@example.com,
23
+ reason: 2,
24
+ reason_text: hardBounce,
25
+ smtp_error: 550 5.1.1 The email account that you tried to reach does not exist,
26
+ message_uuid: 3f2504e0-4f89-41d3-9a0c-0305e82c3301,
27
+ created: 1704067200000000000
24
28
  )
25
29
  ```
26
30
 
@@ -15,7 +15,7 @@ All URIs are relative to *https://api.sendpost.io/api/v1*
15
15
 
16
16
  Create Suppressions
17
17
 
18
- Creates new suppressions by posting to the suppression resource. You can specify different types of suppressions including `hardBounce`, `manual`, `unsubscribe`, and `spamComplaint`.
18
+ Add email addresses to your suppression list to prevent future emails from being sent. This is essential for maintaining sender reputation and compliance. **When to Use Each Type:** | Type | Use When | |------|----------| | `hardBounce` | You know an address is permanently invalid | | `manual` | Processing do-not-contact requests from support | | `unsubscribe` | Syncing unsubscribes from external systems | | `spamComplaint` | Importing complaints from other providers | **Common Use Cases:** - **Migration:** Import suppression list from previous email provider - **CRM Sync:** Add unsubscribes from your marketing platform - **Bulk Cleanup:** Add known invalid addresses from data cleaning - **Support Tickets:** Honor do-not-contact requests **Best Practices:** - Import historical bounce data when migrating providers - Sync unsubscribes immediately when received from external sources - Process support-requested suppressions within 24 hours - Use `manual` for addresses you want to suppress without categorization
19
19
 
20
20
  ### Examples
21
21
 
@@ -82,11 +82,11 @@ end
82
82
 
83
83
  ## delete_suppression
84
84
 
85
- > <Array<DeleteSuppression200ResponseInner>> delete_suppression(delete_suppression_request)
85
+ > <DeleteSuppression200Response> delete_suppression(delete_suppression_request)
86
86
 
87
87
  Delete Suppressions
88
88
 
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.
89
+ Remove email addresses from your suppression list, allowing them to receive emails again. **⚠️ Important: Use with caution!** Re-enabling sending to previously suppressed addresses can harm your sender reputation if used incorrectly. **Valid Use Cases:** - User confirms their valid email was incorrectly bounced - Manual suppression was added by mistake - User explicitly requests re-subscription after unsubscribing - Testing/development addresses that were suppressed **Not Recommended:** - Bulk removing hard bounces without individual verification - Removing spam complaints (users rarely want to receive emails again) - Attempting to re-engage addresses that bounced **Best Practice:** Before removing a suppression, verify with the recipient that they want to receive emails and that their address is valid.
90
90
 
91
91
  ### Examples
92
92
 
@@ -117,7 +117,7 @@ end
117
117
 
118
118
  This returns an Array which contains the response data, status code and headers.
119
119
 
120
- > <Array(<Array<DeleteSuppression200ResponseInner>>, Integer, Hash)> delete_suppression_with_http_info(delete_suppression_request)
120
+ > <Array(<DeleteSuppression200Response>, Integer, Hash)> delete_suppression_with_http_info(delete_suppression_request)
121
121
 
122
122
  ```ruby
123
123
  begin
@@ -125,7 +125,7 @@ begin
125
125
  data, status_code, headers = api_instance.delete_suppression_with_http_info(delete_suppression_request)
126
126
  p status_code # => 2xx
127
127
  p headers # => { ... }
128
- p data # => <Array<DeleteSuppression200ResponseInner>>
128
+ p data # => <DeleteSuppression200Response>
129
129
  rescue Sendpost::ApiError => e
130
130
  puts "Error when calling SuppressionApi->delete_suppression_with_http_info: #{e}"
131
131
  end
@@ -139,7 +139,7 @@ end
139
139
 
140
140
  ### Return type
141
141
 
142
- [**Array&lt;DeleteSuppression200ResponseInner&gt;**](DeleteSuppression200ResponseInner.md)
142
+ [**DeleteSuppression200Response**](DeleteSuppression200Response.md)
143
143
 
144
144
  ### Authorization
145
145
 
@@ -157,7 +157,7 @@ end
157
157
 
158
158
  List Suppressions
159
159
 
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.
160
+ Retrieve the suppression list for your sub-account. Suppressions are email addresses that should not receive emails to protect your sender reputation and ensure compliance. **Suppression Types:** | Type | Reason Code | Description | |------|-------------|-------------| | `manual` | 0 | Manually added by your team | | `unsubscribe` | 1 | User clicked unsubscribe link | | `hardBounce` | 2 | Permanent delivery failure (invalid address) | | `spamComplaint` | 3 | User marked email as spam | **Why Suppressions Matter:** - **Reputation Protection:** Repeatedly sending to bounced addresses damages sender reputation - **Compliance:** Required for CAN-SPAM, GDPR, and other regulations - **Cost Savings:** Avoid paying to send undeliverable emails - **Deliverability:** ISPs penalize senders with high bounce/complaint rates **Use Cases:** - Export suppression list for compliance audits - Sync suppressions with your CRM or marketing platform - Review recent bounces to identify data quality issues - Monitor spam complaints for content/targeting problems **Pagination:** Use `limit` and `offset` for large suppression lists. **Note:** Maximum date range is 60 days.
161
161
 
162
162
  ### Examples
163
163
 
@@ -173,13 +173,13 @@ Sendpost.configure do |config|
173
173
  end
174
174
 
175
175
  api_instance = Sendpost::SuppressionApi.new
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)
176
+ from = Date.parse('2024-01-01') # Date | Start date for suppression records (inclusive). Format YYYY-MM-DD.
177
+ to = Date.parse('2024-01-31') # Date | End date for suppression records (inclusive). Max 60 days from `from` date.
178
178
  opts = {
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`
179
+ limit: 50, # Integer | Number of records to return per request. Default 20, max 100.
180
+ offset: 0, # Integer | Number of initial records to skip for pagination.
181
+ search: '@example.com', # String | Case-insensitive search against suppression email addresses.
182
+ type: 'hardBounce' # String | Filter by suppression type. Omit to return all types.
183
183
  }
184
184
 
185
185
  begin
@@ -213,12 +213,12 @@ end
213
213
 
214
214
  | Name | Type | Description | Notes |
215
215
  | ---- | ---- | ----------- | ----- |
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] |
216
+ | **from** | **Date** | Start date for suppression records (inclusive). Format YYYY-MM-DD. | |
217
+ | **to** | **Date** | End date for suppression records (inclusive). Max 60 days from &#x60;from&#x60; date. | |
218
+ | **limit** | **Integer** | Number of records to return per request. Default 20, max 100. | [optional][default to 20] |
219
+ | **offset** | **Integer** | Number of initial records to skip for pagination. | [optional][default to 0] |
220
+ | **search** | **String** | Case-insensitive search against suppression email addresses. | [optional] |
221
+ | **type** | **String** | Filter by suppression type. Omit to return all types. | [optional] |
222
222
 
223
223
  ### Return type
224
224
 
data/docs/TPSPStat.md ADDED
@@ -0,0 +1,42 @@
1
+ # Sendpost::TPSPStat
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **processed** | **Integer** | Total number of emails accepted by SendPost API for processing. This is the starting point - all emails submitted through the API. | [optional] |
8
+ | **sent** | **Integer** | Number of emails sent to recipient mail servers. sent &#x3D; processed - dropped - smtpDropped | [optional] |
9
+ | **dropped** | **Integer** | Number of emails dropped before sending. Common reasons: - Recipient email in suppression list (hard bounce, spam complaint, unsubscribe) - Invalid recipient email format - Sender domain not verified | [optional] |
10
+ | **smtp_dropped** | **Integer** | Number of emails dropped at SMTP level due to policy violations or rate limiting by the receiving server before delivery attempt completed. | [optional] |
11
+ | **delivered** | **Integer** | Number of emails successfully delivered to recipient mail servers. Note: Delivered means accepted by the server, not necessarily in inbox. | [optional] |
12
+ | **soft_bounced** | **Integer** | Number of temporary delivery failures (soft bounces). Common causes: - Recipient mailbox full - Server temporarily unavailable - Message too large SendPost automatically retries soft bounces. | [optional] |
13
+ | **hard_bounced** | **Integer** | Number of permanent delivery failures (hard bounces). Common causes: - Recipient email doesn&#39;t exist - Domain doesn&#39;t exist - Recipient has blocked sender Hard bounced addresses are automatically added to suppression list. | [optional] |
14
+ | **opened** | **Integer** | Number of emails opened (tracking pixel loaded). Requires trackOpens&#x3D;true. Note: Some email clients block tracking pixels. | [optional] |
15
+ | **clicked** | **Integer** | Number of emails with at least one link clicked. Requires trackClicks&#x3D;true. | [optional] |
16
+ | **unsubscribed** | **Integer** | Number of recipients who clicked the unsubscribe link. Unsubscribed addresses are automatically added to suppression list. | [optional] |
17
+ | **spam** | **Integer** | Number of spam complaints (recipient marked email as spam). High spam rates can severely impact your sender reputation. Target: Keep spam rate below 0.1%. | [optional] |
18
+ | **tpsp_id** | **Integer** | Unique identifier of the third-party sending provider. | [optional] |
19
+ | **name** | **String** | Human-readable name of the third-party sending provider. | [optional] |
20
+
21
+ ## Example
22
+
23
+ ```ruby
24
+ require 'sendpost_ruby_sdk'
25
+
26
+ instance = Sendpost::TPSPStat.new(
27
+ processed: 225,
28
+ sent: 220,
29
+ dropped: 10,
30
+ smtp_dropped: 5,
31
+ delivered: 200,
32
+ soft_bounced: 5,
33
+ hard_bounced: 10,
34
+ opened: 150,
35
+ clicked: 50,
36
+ unsubscribed: 6,
37
+ spam: 2,
38
+ tpsp_id: 7,
39
+ name: SendGrid
40
+ )
41
+ ```
42
+
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **name** | **String** | New name for the sub-account. | [optional] |
7
+ | **name** | **String** | New display name for the sub-account | [optional] |
8
8
 
9
9
  ## Example
10
10
 
@@ -12,7 +12,7 @@
12
12
  require 'sendpost_ruby_sdk'
13
13
 
14
14
  instance = Sendpost::UpdateSubAccount.new(
15
- name: FoxHole V1
15
+ name: Marketing - Production v2
16
16
  )
17
17
  ```
18
18
 
@@ -4,21 +4,21 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
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] |
7
+ | **enabled** | **Boolean** | Whether the webhook is active immediately after creation. Set to false to configure and test before activating. | [optional][default to true] |
8
+ | **url** | **String** | HTTPS URL endpoint to receive webhook POST requests. Must: - Use HTTPS (HTTP not allowed for security) - Be publicly accessible - Return 2xx status within 10 seconds - Handle duplicate deliveries (use eventId for idempotency) | |
9
+ | **processed** | **Boolean** | Fire when email is accepted by SendPost API | [optional][default to false] |
10
+ | **sent** | **Boolean** | Fire when email is sent to recipient&#39;s mail server | [optional][default to false] |
11
+ | **delivered** | **Boolean** | Fire when email is accepted by recipient&#39;s mail server | [optional][default to true] |
12
+ | **dropped** | **Boolean** | Fire when email is not sent (suppression, invalid, etc.) | [optional][default to true] |
13
+ | **smtp_dropped** | **Boolean** | Fire when email is rejected at SMTP level | [optional][default to false] |
14
+ | **soft_bounced** | **Boolean** | Fire on temporary delivery failure (will retry) | [optional][default to true] |
15
+ | **hard_bounced** | **Boolean** | Fire on permanent delivery failure | [optional][default to true] |
16
+ | **opened** | **Boolean** | Fire when email is opened. Fires on EVERY open. Consider using &#x60;uniqueOpen&#x60; instead to reduce volume. | [optional][default to true] |
17
+ | **clicked** | **Boolean** | Fire when a link is clicked. Fires on EVERY click. Consider using &#x60;uniqueClick&#x60; instead to reduce volume. | [optional][default to true] |
18
+ | **unsubscribed** | **Boolean** | Fire when recipient clicks unsubscribe link | [optional][default to true] |
19
+ | **spam** | **Boolean** | Fire when recipient marks email as spam | [optional][default to true] |
20
+ | **unique_open** | **Boolean** | Fire only on FIRST open of each email (unique opens). More efficient than &#x60;opened&#x60; if you only need engagement metrics. | [optional][default to false] |
21
+ | **unique_click** | **Boolean** | Fire only on FIRST click of each email (unique clicks). More efficient than &#x60;clicked&#x60; if you only need engagement metrics. | [optional][default to false] |
22
22
 
23
23
  ## Example
24
24
 
@@ -27,20 +27,20 @@ require 'sendpost_ruby_sdk'
27
27
 
28
28
  instance = Sendpost::UpdateWebhook.new(
29
29
  enabled: true,
30
- url: https://app.hooli.com/email/webhook,
31
- processed: true,
30
+ url: https://app.hooli.com/api/webhooks/sendpost,
31
+ processed: false,
32
+ sent: false,
32
33
  delivered: true,
33
- dropped: false,
34
- soft_bounced: false,
34
+ dropped: true,
35
+ smtp_dropped: false,
36
+ soft_bounced: true,
35
37
  hard_bounced: true,
36
38
  opened: true,
37
39
  clicked: true,
38
40
  unsubscribed: true,
39
41
  spam: true,
40
- sent: true,
41
- smtp_dropped: false,
42
- unique_open: true,
43
- unique_click: true
42
+ unique_open: false,
43
+ unique_click: false
44
44
  )
45
45
  ```
46
46
 
data/docs/UserAgent.md CHANGED
@@ -4,10 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **family** | **String** | | [optional] |
8
- | **major** | **String** | | [optional] |
9
- | **minor** | **String** | | [optional] |
10
- | **patch** | **String** | | [optional] |
7
+ | **family** | **String** | Browser or email client family name. Common values: Chrome, Safari, Firefox, Outlook, Apple Mail, Gmail | [optional] |
8
+ | **major** | **String** | Major version number | [optional] |
9
+ | **minor** | **String** | Minor version number | [optional] |
10
+ | **patch** | **String** | Patch version number | [optional] |
11
11
 
12
12
  ## Example
13
13
 
@@ -15,10 +15,10 @@
15
15
  require 'sendpost_ruby_sdk'
16
16
 
17
17
  instance = Sendpost::UserAgent.new(
18
- family: Mozilla,
19
- major: 5.0,
18
+ family: Chrome,
19
+ major: 120,
20
20
  minor: 0,
21
- patch: 0
21
+ patch: 6099
22
22
  )
23
23
  ```
24
24
 
@@ -0,0 +1,32 @@
1
+ # Sendpost::ValidationStat
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **initiated** | **Integer** | Number of validation requests initiated. | [optional] |
8
+ | **processed** | **Integer** | Number of validation requests fully processed. | [optional] |
9
+ | **valid** | **Integer** | Number of addresses determined to be valid/deliverable. | [optional] |
10
+ | **invalid** | **Integer** | Number of addresses determined to be invalid/undeliverable. | [optional] |
11
+ | **soft_bounced** | **Integer** | Number of addresses that soft-bounced during validation. | [optional] |
12
+ | **hard_bounced** | **Integer** | Number of addresses that hard-bounced during validation. | [optional] |
13
+ | **catch_all** | **Integer** | Number of addresses on catch-all (accept-all) domains. | [optional] |
14
+ | **unknown** | **Integer** | Number of addresses whose deliverability could not be determined. | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'sendpost_ruby_sdk'
20
+
21
+ instance = Sendpost::ValidationStat.new(
22
+ initiated: 1000,
23
+ processed: 980,
24
+ valid: 820,
25
+ invalid: 90,
26
+ soft_bounced: 20,
27
+ hard_bounced: 15,
28
+ catch_all: 25,
29
+ unknown: 10
30
+ )
31
+ ```
32
+
data/docs/Webhook.md CHANGED
@@ -4,25 +4,26 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
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] |
7
+ | **id** | **Integer** | Unique identifier for the webhook configuration | [optional] |
8
+ | **enabled** | **Boolean** | Whether the webhook is active. When false, no events will be sent to this webhook. Useful for temporarily pausing notifications during maintenance. | [optional] |
9
+ | **url** | **String** | HTTPS endpoint URL to receive webhook POST requests. Must be publicly accessible and return 2xx status code. | [optional] |
10
+ | **processed** | **Boolean** | Trigger webhook when an email is accepted for processing. Fires immediately when API call is successful. | [optional] |
11
+ | **sent** | **Boolean** | Trigger webhook when an email is sent to the recipient&#39;s mail server. Indicates the email left SendPost&#39;s infrastructure. | [optional] |
12
+ | **dropped** | **Boolean** | Trigger webhook when an email is dropped before sending. Common reasons: suppressed address, invalid email, unverified domain. | [optional] |
13
+ | **smtp_dropped** | **Boolean** | Trigger webhook when an email is dropped at SMTP level. Usually due to policy rejection by receiving server. | [optional] |
14
+ | **delivered** | **Boolean** | Trigger webhook when an email is successfully delivered. Note: \&quot;Delivered\&quot; means accepted by mail server, not inbox placement. | [optional] |
15
+ | **soft_bounced** | **Boolean** | Trigger webhook on temporary delivery failure (soft bounce). SendPost will retry delivery automatically. | [optional] |
16
+ | **hard_bounced** | **Boolean** | Trigger webhook on permanent delivery failure (hard bounce). The recipient is automatically added to suppression list. | [optional] |
17
+ | **opened** | **Boolean** | Trigger webhook when recipient opens the email. Fires on every open (can fire multiple times per email). | [optional] |
18
+ | **clicked** | **Boolean** | Trigger webhook when recipient clicks a link. Fires on every click (can fire multiple times per email). | [optional] |
19
+ | **unsubscribed** | **Boolean** | Trigger webhook when recipient clicks the unsubscribe link. The recipient is automatically added to suppression list. | [optional] |
20
+ | **spam** | **Boolean** | Trigger webhook when recipient marks email as spam. The recipient is automatically added to suppression list. Monitor this closely - high spam rates damage sender reputation. | [optional] |
21
+ | **unique_open** | **Boolean** | Trigger webhook only on the first open of an email (unique opens). Use this instead of &#39;opened&#39; if you only care about unique engagement. | [optional] |
22
+ | **unique_click** | **Boolean** | Trigger webhook only on the first click of an email (unique clicks). Use this instead of &#39;clicked&#39; if you only care about unique engagement. | [optional] |
23
+ | **status** | **String** | Health status of the webhook (read-only): - &#x60;active&#x60; - delivering normally - &#x60;degraded&#x60; - recent delivery failures - &#x60;disabled&#x60; - auto-disabled after repeated consecutive failures | [optional] |
24
+ | **disabled_at** | **Integer** | UNIX epoch timestamp in nanoseconds when the webhook was auto-disabled (0 if never). Read-only. | [optional] |
25
+ | **disabled_reason** | **String** | Human-readable reason the webhook was auto-disabled (empty if active). Read-only. | [optional] |
26
+ | **created** | **Integer** | UNIX epoch timestamp in nanoseconds when the webhook was created | [optional] |
26
27
 
27
28
  ## Example
28
29
 
@@ -32,23 +33,24 @@ require 'sendpost_ruby_sdk'
32
33
  instance = Sendpost::Webhook.new(
33
34
  id: 117,
34
35
  enabled: true,
35
- url: https://app.hooli.com/email/webhook,
36
+ url: https://app.hooli.com/api/webhooks/sendpost,
36
37
  processed: true,
38
+ sent: true,
39
+ dropped: true,
40
+ smtp_dropped: false,
37
41
  delivered: true,
38
- dropped: false,
39
- soft_bounced: false,
42
+ soft_bounced: true,
40
43
  hard_bounced: true,
41
44
  opened: true,
42
45
  clicked: true,
43
46
  unsubscribed: true,
44
47
  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
48
+ unique_open: false,
49
+ unique_click: false,
50
+ status: active,
51
+ disabled_at: 0,
52
+ disabled_reason: ,
53
+ created: 1704067200000000000
52
54
  )
53
55
  ```
54
56
 
data/docs/WebhookApi.md CHANGED
@@ -13,11 +13,11 @@ All URIs are relative to *https://api.sendpost.io/api/v1*
13
13
 
14
14
  ## create_webhook
15
15
 
16
- > <Webhook> create_webhook(create_webhook_request)
16
+ > <Webhook> create_webhook(new_webhook)
17
17
 
18
18
  Create Webhook
19
19
 
20
- Create a new webhook by specifying its properties.
20
+ Create a new webhook to receive real-time notifications for email events. Your endpoint will receive HTTP POST requests with event data as they occur. **Endpoint Requirements:** - Must be publicly accessible HTTPS URL - Should return 2xx status within 30 seconds - Handle potential duplicate events (use event ID for deduplication) - Implement retry/queue logic for reliability **Choosing Events:** - **Engagement Tracking:** `uniqueOpened`, `uniqueClicked` for metrics - **Full History:** `opened`, `clicked` for complete event logs - **Delivery Monitoring:** `delivered`, `hardBounced`, `softBounced` - **Compliance:** `unsubscribed`, `spam` **Best Practices:** - Only enable events you actually need - Store events before processing (async processing) - Implement idempotency using event IDs - Set up monitoring for webhook failures **Webhook Payload Example:** ```json { \"eventId\": \"evt_123\", \"event\": \"delivered\", \"messageId\": \"msg_456\", \"recipient\": \"user@example.com\", \"timestamp\": \"2024-01-15T10:30:00Z\" } ```
21
21
 
22
22
  ### Examples
23
23
 
@@ -33,11 +33,11 @@ Sendpost.configure do |config|
33
33
  end
34
34
 
35
35
  api_instance = Sendpost::WebhookApi.new
36
- create_webhook_request = Sendpost::CreateWebhookRequest.new # CreateWebhookRequest |
36
+ new_webhook = Sendpost::NewWebhook.new({url: 'https://app.hooli.com/api/webhooks/sendpost'}) # NewWebhook |
37
37
 
38
38
  begin
39
39
  # Create Webhook
40
- result = api_instance.create_webhook(create_webhook_request)
40
+ result = api_instance.create_webhook(new_webhook)
41
41
  p result
42
42
  rescue Sendpost::ApiError => e
43
43
  puts "Error when calling WebhookApi->create_webhook: #{e}"
@@ -48,12 +48,12 @@ end
48
48
 
49
49
  This returns an Array which contains the response data, status code and headers.
50
50
 
51
- > <Array(<Webhook>, Integer, Hash)> create_webhook_with_http_info(create_webhook_request)
51
+ > <Array(<Webhook>, Integer, Hash)> create_webhook_with_http_info(new_webhook)
52
52
 
53
53
  ```ruby
54
54
  begin
55
55
  # Create Webhook
56
- data, status_code, headers = api_instance.create_webhook_with_http_info(create_webhook_request)
56
+ data, status_code, headers = api_instance.create_webhook_with_http_info(new_webhook)
57
57
  p status_code # => 2xx
58
58
  p headers # => { ... }
59
59
  p data # => <Webhook>
@@ -66,7 +66,7 @@ end
66
66
 
67
67
  | Name | Type | Description | Notes |
68
68
  | ---- | ---- | ----------- | ----- |
69
- | **create_webhook_request** | [**CreateWebhookRequest**](CreateWebhookRequest.md) | | |
69
+ | **new_webhook** | [**NewWebhook**](NewWebhook.md) | | |
70
70
 
71
71
  ### Return type
72
72
 
@@ -88,7 +88,7 @@ end
88
88
 
89
89
  Delete Webhook
90
90
 
91
- Delete a webhook by its ID.
91
+ Remove a webhook from your account. After deletion, no further events will be sent to that endpoint. **Before Deleting:** - Ensure your application doesn't rely on these events - Consider updating to a new webhook instead if you're migrating **Note:** Events that occurred before deletion are not affected. Historical data remains intact.
92
92
 
93
93
  ### Examples
94
94
 
@@ -104,7 +104,7 @@ Sendpost.configure do |config|
104
104
  end
105
105
 
106
106
  api_instance = Sendpost::WebhookApi.new
107
- webhook_id = 117 # Integer | ID of the webhook to delete.
107
+ webhook_id = 117 # Integer | The unique ID of the webhook to delete.
108
108
 
109
109
  begin
110
110
  # Delete Webhook
@@ -137,7 +137,7 @@ end
137
137
 
138
138
  | Name | Type | Description | Notes |
139
139
  | ---- | ---- | ----------- | ----- |
140
- | **webhook_id** | **Integer** | ID of the webhook to delete. | |
140
+ | **webhook_id** | **Integer** | The unique ID of the webhook to delete. | |
141
141
 
142
142
  ### Return type
143
143
 
@@ -155,11 +155,11 @@ end
155
155
 
156
156
  ## get_all_webhooks
157
157
 
158
- > <Array<Webhook>> get_all_webhooks(opts)
158
+ > <Array<AccountWebhookWithStats>> get_all_webhooks(opts)
159
159
 
160
160
  List Webhooks
161
161
 
162
- Retrieves a list of all webhooks, their endpoints, and the events for which they are active.
162
+ Retrieve all configured webhooks for your account. Webhooks enable real-time notifications when email events occur, allowing you to build reactive applications. **Supported Events:** | Event | Description | |-------|-------------| | `processed` | Email accepted and queued for delivery | | `dropped` | Email blocked (suppressed, invalid, policy) | | `delivered` | Email successfully delivered to recipient | | `hardBounced` | Permanent delivery failure | | `softBounced` | Temporary delivery failure | | `opened` | Recipient opened the email (all opens) | | `uniqueOpened` | First open per recipient only | | `clicked` | Recipient clicked a link (all clicks) | | `uniqueClicked` | First click per recipient only | | `unsubscribed` | Recipient unsubscribed | | `spam` | Recipient marked email as spam | **Use Cases:** - Audit configured webhook endpoints - Verify webhook URLs are correct - Review enabled events per webhook - Debug webhook delivery issues
163
163
 
164
164
  ### Examples
165
165
 
@@ -176,9 +176,9 @@ end
176
176
 
177
177
  api_instance = Sendpost::WebhookApi.new
178
178
  opts = {
179
- limit: 10, # Integer | Number of records to return per request.
180
- offset: 0, # Integer | Number of initial records to skip.
181
- search: 'hooli' # String | Case insensitive search against webhook URL.
179
+ limit: 10, # Integer | Number of records to return per request. Default 20.
180
+ offset: 0, # Integer | Number of initial records to skip for pagination.
181
+ search: 'api.yoursite.com' # String | Case insensitive search against webhook URLs.
182
182
  }
183
183
 
184
184
  begin
@@ -194,7 +194,7 @@ end
194
194
 
195
195
  This returns an Array which contains the response data, status code and headers.
196
196
 
197
- > <Array(<Array<Webhook>>, Integer, Hash)> get_all_webhooks_with_http_info(opts)
197
+ > <Array(<Array<AccountWebhookWithStats>>, Integer, Hash)> get_all_webhooks_with_http_info(opts)
198
198
 
199
199
  ```ruby
200
200
  begin
@@ -202,7 +202,7 @@ begin
202
202
  data, status_code, headers = api_instance.get_all_webhooks_with_http_info(opts)
203
203
  p status_code # => 2xx
204
204
  p headers # => { ... }
205
- p data # => <Array<Webhook>>
205
+ p data # => <Array<AccountWebhookWithStats>>
206
206
  rescue Sendpost::ApiError => e
207
207
  puts "Error when calling WebhookApi->get_all_webhooks_with_http_info: #{e}"
208
208
  end
@@ -212,13 +212,13 @@ end
212
212
 
213
213
  | Name | Type | Description | Notes |
214
214
  | ---- | ---- | ----------- | ----- |
215
- | **limit** | **Integer** | Number of records to return per request. | [optional] |
216
- | **offset** | **Integer** | Number of initial records to skip. | [optional] |
217
- | **search** | **String** | Case insensitive search against webhook URL. | [optional] |
215
+ | **limit** | **Integer** | Number of records to return per request. Default 20. | [optional][default to 20] |
216
+ | **offset** | **Integer** | Number of initial records to skip for pagination. | [optional][default to 0] |
217
+ | **search** | **String** | Case insensitive search against webhook URLs. | [optional] |
218
218
 
219
219
  ### Return type
220
220
 
221
- [**Array&lt;Webhook&gt;**](Webhook.md)
221
+ [**Array&lt;AccountWebhookWithStats&gt;**](AccountWebhookWithStats.md)
222
222
 
223
223
  ### Authorization
224
224
 
@@ -236,7 +236,7 @@ end
236
236
 
237
237
  Get Webhook
238
238
 
239
- Retrieves a specific webhook based on its ID.
239
+ Retrieve detailed information about a specific webhook, including its endpoint URL and enabled events. **Use Cases:** - Verify webhook configuration - Debug event delivery issues - Check enabled events for a webhook - Audit webhook settings
240
240
 
241
241
  ### Examples
242
242
 
@@ -252,7 +252,7 @@ Sendpost.configure do |config|
252
252
  end
253
253
 
254
254
  api_instance = Sendpost::WebhookApi.new
255
- webhook_id = 117 # Integer | The ID of the webhook to retrieve.
255
+ webhook_id = 117 # Integer | The unique ID of the webhook to retrieve.
256
256
 
257
257
  begin
258
258
  # Get Webhook
@@ -285,7 +285,7 @@ end
285
285
 
286
286
  | Name | Type | Description | Notes |
287
287
  | ---- | ---- | ----------- | ----- |
288
- | **webhook_id** | **Integer** | The ID of the webhook to retrieve. | |
288
+ | **webhook_id** | **Integer** | The unique ID of the webhook to retrieve. | |
289
289
 
290
290
  ### Return type
291
291
 
@@ -307,7 +307,7 @@ end
307
307
 
308
308
  Update Webhook
309
309
 
310
- Update the properties of an existing webhook.
310
+ Modify an existing webhook's configuration. Use this to change the endpoint URL or update which events trigger notifications. **What Can Be Updated:** - Webhook endpoint URL - Enabled/disabled events - Event-specific settings **Use Cases:** - Migrate to a new endpoint URL - Enable additional events as needs grow - Disable events to reduce traffic - Update after infrastructure changes
311
311
 
312
312
  ### Examples
313
313
 
@@ -323,8 +323,8 @@ Sendpost.configure do |config|
323
323
  end
324
324
 
325
325
  api_instance = Sendpost::WebhookApi.new
326
- update_webhook = Sendpost::UpdateWebhook.new # UpdateWebhook |
327
- webhook_id = 117 # Integer | ID of the webhook to update.
326
+ update_webhook = Sendpost::UpdateWebhook.new({url: 'https://app.hooli.com/api/webhooks/sendpost'}) # UpdateWebhook |
327
+ webhook_id = 117 # Integer | The unique ID of the webhook to update.
328
328
 
329
329
  begin
330
330
  # Update Webhook
@@ -358,7 +358,7 @@ end
358
358
  | Name | Type | Description | Notes |
359
359
  | ---- | ---- | ----------- | ----- |
360
360
  | **update_webhook** | [**UpdateWebhook**](UpdateWebhook.md) | | |
361
- | **webhook_id** | **Integer** | ID of the webhook to update. | |
361
+ | **webhook_id** | **Integer** | The unique ID of the webhook to update. | |
362
362
 
363
363
  ### Return type
364
364
 
@@ -0,0 +1,20 @@
1
+ # Sendpost::WebhookObject
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **event** | [**Event**](Event.md) | Details about the email event that triggered this webhook | [optional] |
8
+ | **email_message** | [**EmailMessage**](EmailMessage.md) | The original email message associated with this event | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'sendpost_ruby_sdk'
14
+
15
+ instance = Sendpost::WebhookObject.new(
16
+ event: null,
17
+ email_message: null
18
+ )
19
+ ```
20
+