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/Stat.md CHANGED
@@ -4,8 +4,17 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **date** | **Date** | Date for which stats are retrieved (UTC). | [optional] |
8
- | **stats** | [**StatStats**](StatStats.md) | | [optional] |
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 = 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't exist - Domain doesn'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=true. Note: Some email clients block tracking pixels. | [optional] |
15
+ | **clicked** | **Integer** | Number of emails with at least one link clicked. Requires trackClicks=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] |
9
18
 
10
19
  ## Example
11
20
 
@@ -13,8 +22,17 @@
13
22
  require 'sendpost_ruby_sdk'
14
23
 
15
24
  instance = Sendpost::Stat.new(
16
- date: 2020-03-12,
17
- stats: null
25
+ processed: 225,
26
+ sent: 220,
27
+ dropped: 10,
28
+ smtp_dropped: 5,
29
+ delivered: 200,
30
+ soft_bounced: 5,
31
+ hard_bounced: 10,
32
+ opened: 150,
33
+ clicked: 50,
34
+ unsubscribed: 6,
35
+ spam: 2
18
36
  )
19
37
  ```
20
38
 
data/docs/StatsAApi.md CHANGED
@@ -16,7 +16,7 @@ All URIs are relative to *https://api.sendpost.io/api/v1*
16
16
 
17
17
  Get Account Aggregate Stats
18
18
 
19
- Retrieve aggregated email statistics for all sub-accounts of a specific account for a given date range.
19
+ Retrieve summarized email statistics across all sub-accounts for a date range. Returns a single aggregated record—perfect for high-level reporting and dashboards. **Use Cases:** - Annual email program review - Quarterly business reports - Month-over-month comparison - Board-level metrics - ROI calculations for email program **Example:** Get full year stats for 2024: ``` GET /account/stat/aggregate?from=2024-01-01&to=2024-12-31 ``` **Note:** Maximum date range is 366 days (1 year).
20
20
 
21
21
  ### Examples
22
22
 
@@ -32,8 +32,8 @@ Sendpost.configure do |config|
32
32
  end
33
33
 
34
34
  api_instance = Sendpost::StatsAApi.new
35
- from = Date.parse('2019-01-01') # Date | The start date for retrieving aggregated stats (inclusive)
36
- to = Date.parse('2019-12-31') # Date | The end date for retrieving aggregated stats (inclusive). The difference between `from` and `to` should not exceed 366 days.
35
+ from = Date.parse('2024-01-01') # Date | Start date for aggregation (inclusive). Format YYYY-MM-DD.
36
+ to = Date.parse('2024-12-31') # Date | End date for aggregation (inclusive). Max 366 days from `from` date.
37
37
 
38
38
  begin
39
39
  # Get Account Aggregate Stats
@@ -66,8 +66,8 @@ end
66
66
 
67
67
  | Name | Type | Description | Notes |
68
68
  | ---- | ---- | ----------- | ----- |
69
- | **from** | **Date** | The start date for retrieving aggregated stats (inclusive) | |
70
- | **to** | **Date** | The end date for retrieving aggregated stats (inclusive). The difference between `from` and `to` should not exceed 366 days. | |
69
+ | **from** | **Date** | Start date for aggregation (inclusive). Format YYYY-MM-DD. | |
70
+ | **to** | **Date** | End date for aggregation (inclusive). Max 366 days from `from` date. | |
71
71
 
72
72
  ### Return type
73
73
 
@@ -89,7 +89,7 @@ end
89
89
 
90
90
  Get Account Group Aggregate Stats
91
91
 
92
- Gets aggregated email stats for a specific group in all sub-accounts of a specific account for the given daterange. The maximum daterange for which these stats can be retrieved is 366 days.
92
+ Retrieve summarized email statistics for a specific group across all sub-accounts. Returns a single aggregated record for the group—ideal for campaign reporting. **Use Cases:** - Annual performance report for a specific product integration - Compare total metrics for different campaigns - Summarize email performance for a specific customer segment - Calculate ROI for a marketing campaign by group **Example:** Get yearly stats for Shopify integration: ``` GET /account/stat/aggregate/group?group=shopify&from=2024-01-01&to=2024-12-31 ``` **Note:** Maximum date range is 366 days (1 year).
93
93
 
94
94
  ### Examples
95
95
 
@@ -105,9 +105,9 @@ Sendpost.configure do |config|
105
105
  end
106
106
 
107
107
  api_instance = Sendpost::StatsAApi.new
108
- group = 'shopify' # String | Group whose aggregate stats need to be retrieved.
109
- from = Date.parse('2019-01-01') # Date | Date from which stats should be retrieved (should be in the format `YYYY-MM-DD`).
110
- to = Date.parse('2019-12-31') # Date | Date to which stats should be retrieved (should be in the format `YYYY-MM-DD`). Note that the difference between `from` and `to` should not be more than 366 days.
108
+ group = 'shopify' # String | The group/tag name to filter and aggregate statistics by.
109
+ from = Date.parse('2024-01-01') # Date | Start date for aggregation (inclusive). Format YYYY-MM-DD.
110
+ to = Date.parse('2024-12-31') # Date | End date for aggregation (inclusive). Max 366 days from `from` date.
111
111
 
112
112
  begin
113
113
  # Get Account Group Aggregate Stats
@@ -140,9 +140,9 @@ end
140
140
 
141
141
  | Name | Type | Description | Notes |
142
142
  | ---- | ---- | ----------- | ----- |
143
- | **group** | **String** | Group whose aggregate stats need to be retrieved. | |
144
- | **from** | **Date** | Date from which stats should be retrieved (should be in the format `YYYY-MM-DD`). | |
145
- | **to** | **Date** | Date to which stats should be retrieved (should be in the format `YYYY-MM-DD`). Note that the difference between `from` and `to` should not be more than 366 days. | |
143
+ | **group** | **String** | The group/tag name to filter and aggregate statistics by. | |
144
+ | **from** | **Date** | Start date for aggregation (inclusive). Format YYYY-MM-DD. | |
145
+ | **to** | **Date** | End date for aggregation (inclusive). Max 366 days from `from` date. | |
146
146
 
147
147
  ### Return type
148
148
 
@@ -164,7 +164,7 @@ end
164
164
 
165
165
  List Account Group Stats
166
166
 
167
- Gets a list of all email stats for all sub-accounts of a specific account by group for a given daterange. The maximum daterange for which these stats can be retrieved is 31 days.
167
+ Retrieve daily email statistics for a specific group across all sub-accounts. Returns one record per day, filtered by the group/tag you specify. **What are Groups?** Groups (tags) are labels attached to emails when sending. They enable segmented analytics across your entire account. **Common Group Strategies:** | Strategy | Example Groups | |----------|----------------| | By Product | `shopify`, `wordpress`, `api-direct` | | By Type | `transactional`, `marketing`, `alerts` | | By Team | `sales-team`, `support`, `engineering` | | By Campaign | `black-friday-2024`, `summer-sale` | **Use Cases:** - Compare performance across products/integrations - Track specific campaign performance account-wide - Analyze transactional vs marketing metrics - Benchmark different teams' email performance **Note:** Maximum date range is 31 days.
168
168
 
169
169
  ### Examples
170
170
 
@@ -180,9 +180,9 @@ Sendpost.configure do |config|
180
180
  end
181
181
 
182
182
  api_instance = Sendpost::StatsAApi.new
183
- group = 'shopify' # String | Group whose stats need to be retrieved
184
- from = Date.parse('2020-03-12') # Date | Date from which stats should be retrieved (should be in the format `YYYY-MM-DD`)
185
- to = Date.parse('2020-04-14') # Date | Date to which stats should be retrieved (should be in the format `YYYY-MM-DD`). Note that the difference between `from` and `to` should not be more than 31 days.
183
+ group = 'shopify' # String | The group/tag name to filter statistics by.
184
+ from = Date.parse('2024-01-01') # Date | Start date for stats retrieval (inclusive). Format YYYY-MM-DD.
185
+ to = Date.parse('2024-01-31') # Date | End date for stats retrieval (inclusive). Max 31 days from `from` date.
186
186
 
187
187
  begin
188
188
  # List Account Group Stats
@@ -215,9 +215,9 @@ end
215
215
 
216
216
  | Name | Type | Description | Notes |
217
217
  | ---- | ---- | ----------- | ----- |
218
- | **group** | **String** | Group whose stats need to be retrieved | |
219
- | **from** | **Date** | Date from which stats should be retrieved (should be in the format `YYYY-MM-DD`) | |
220
- | **to** | **Date** | Date to which stats should be retrieved (should be in the format `YYYY-MM-DD`). Note that the difference between `from` and `to` should not be more than 31 days. | |
218
+ | **group** | **String** | The group/tag name to filter statistics by. | |
219
+ | **from** | **Date** | Start date for stats retrieval (inclusive). Format YYYY-MM-DD. | |
220
+ | **to** | **Date** | End date for stats retrieval (inclusive). Max 31 days from `from` date. | |
221
221
 
222
222
  ### Return type
223
223
 
@@ -239,7 +239,7 @@ end
239
239
 
240
240
  List Account Stats
241
241
 
242
- Retrieve email statistics for all sub-accounts of a specific account for a given date range.
242
+ Retrieve daily email statistics aggregated across all sub-accounts. Returns one record per day within the date range—ideal for organization-wide reporting. **Metrics Per Day:** | Metric | Description | |--------|-------------| | `processed` | Total emails submitted across all sub-accounts | | `delivered` | Successfully delivered to recipients | | `dropped` | Blocked before sending | | `hardBounced` | Permanent delivery failures | | `softBounced` | Temporary delivery failures | | `opens` | Total email opens | | `clicks` | Total link clicks | | `unsubscribed` | Recipients who unsubscribed | | `spams` | Spam complaints received | **Use Cases:** - Organization-wide email performance dashboard - Billing and usage tracking across all sub-accounts - Executive reporting for email program health - Trend analysis across your entire email operation **Note:** Maximum date range is 31 days.
243
243
 
244
244
  ### Examples
245
245
 
@@ -255,8 +255,8 @@ Sendpost.configure do |config|
255
255
  end
256
256
 
257
257
  api_instance = Sendpost::StatsAApi.new
258
- from = Date.parse('2020-03-12') # Date | The start date for retrieving stats (inclusive)
259
- to = Date.parse('2020-04-14') # Date | The end date for retrieving stats (inclusive). The difference between `from` and `to` should not exceed 31 days.
258
+ from = Date.parse('2024-01-01') # Date | Start date for stats retrieval (inclusive). Format YYYY-MM-DD.
259
+ to = Date.parse('2024-01-31') # Date | End date for stats retrieval (inclusive). Max 31 days from `from` date.
260
260
 
261
261
  begin
262
262
  # List Account Stats
@@ -289,8 +289,8 @@ end
289
289
 
290
290
  | Name | Type | Description | Notes |
291
291
  | ---- | ---- | ----------- | ----- |
292
- | **from** | **Date** | The start date for retrieving stats (inclusive) | |
293
- | **to** | **Date** | The end date for retrieving stats (inclusive). The difference between `from` and `to` should not exceed 31 days. | |
292
+ | **from** | **Date** | Start date for stats retrieval (inclusive). Format YYYY-MM-DD. | |
293
+ | **to** | **Date** | End date for stats retrieval (inclusive). Max 31 days from `from` date. | |
294
294
 
295
295
  ### Return type
296
296
 
data/docs/StatsApi.md CHANGED
@@ -15,7 +15,7 @@ All URIs are relative to *https://api.sendpost.io/api/v1*
15
15
 
16
16
  Get Aggregate Stats
17
17
 
18
- Retrieves aggregated email stats for a specific sub-account for a date range. **Note**: The maximum date range is 366 days.
18
+ Retrieve summarized email statistics for a sub-account over a date range. Unlike daily stats, this returns a single record with totals across all days—ideal for high-level reporting. **Response includes total counts for:** - `processed` - Total emails submitted - `delivered` - Successfully delivered - `dropped` - Blocked before sending - `hardBounced` / `softBounced` - Bounce breakdowns - `opens` / `clicks` - Engagement totals - `unsubscribed` / `spams` - Negative signals **Use Cases:** - Monthly performance reports - Executive dashboards - Billing period summaries - Year-over-year comparisons - SLA compliance reports **Example:** To get Q1 2024 totals: ``` GET /account/subaccount/stat/11/aggregate?from=2024-01-01&to=2024-03-31 ``` **Note:** Maximum date range is 366 days (1 year).
19
19
 
20
20
  ### Examples
21
21
 
@@ -31,9 +31,9 @@ Sendpost.configure do |config|
31
31
  end
32
32
 
33
33
  api_instance = Sendpost::StatsApi.new
34
- from = Date.parse('2013-10-20') # Date | Start date for stats retrieval.
35
- to = Date.parse('2013-10-20') # Date | Date to which stats should be retrieved ( Note than from date should be earlier than to date. Also the difference between from and to date shouldn't ne more than 60 days )
36
- subaccount_id = 11 # Integer | The ID of the subaccount to retrieve
34
+ from = Date.parse('2024-01-01') # Date | Start date for aggregation (inclusive). Format YYYY-MM-DD.
35
+ to = Date.parse('2024-03-31') # Date | End date for aggregation (inclusive). Max 366 days from `from` date.
36
+ subaccount_id = 11 # Integer | The unique ID of the sub-account.
37
37
 
38
38
  begin
39
39
  # Get Aggregate Stats
@@ -66,9 +66,9 @@ end
66
66
 
67
67
  | Name | Type | Description | Notes |
68
68
  | ---- | ---- | ----------- | ----- |
69
- | **from** | **Date** | Start date for stats retrieval. | |
70
- | **to** | **Date** | Date to which stats should be retrieved ( Note than from date should be earlier than to date. Also the difference between from and to date shouldn't ne more than 60 days ) | |
71
- | **subaccount_id** | **Integer** | The ID of the subaccount to retrieve | |
69
+ | **from** | **Date** | Start date for aggregation (inclusive). Format YYYY-MM-DD. | |
70
+ | **to** | **Date** | End date for aggregation (inclusive). Max 366 days from `from` date. | |
71
+ | **subaccount_id** | **Integer** | The unique ID of the sub-account. | |
72
72
 
73
73
  ### Return type
74
74
 
@@ -90,7 +90,7 @@ end
90
90
 
91
91
  List Stats
92
92
 
93
- Retrieves a list of email stats for a specific sub-account within a given date range. Both `from` and `to` dates are inclusive. **Note**: The maximum date range is 31 days.
93
+ Retrieve daily email statistics for a specific sub-account. Returns one record per day within the date range, perfect for charting trends and identifying patterns. **Metrics Per Day:** | Metric | Description | |--------|-------------| | `processed` | Emails submitted to SendPost | | `delivered` | Successfully delivered to recipient's mailbox | | `dropped` | Blocked before sending (suppressed, invalid, etc.) | | `hardBounced` | Permanent failures (invalid address, domain doesn't exist) | | `softBounced` | Temporary failures (mailbox full, server down) | | `opens` | Total email opens (includes multiple opens per recipient) | | `clicks` | Total link clicks | | `unsubscribed` | Recipients who unsubscribed | | `spams` | Emails marked as spam by recipients | **Key Rates to Calculate:** - Delivery Rate = `delivered / processed × 100` - Open Rate = `opens / delivered × 100` - Click Rate = `clicks / delivered × 100` - Bounce Rate = `(hardBounced + softBounced) / processed × 100` **Use Cases:** - Daily performance dashboard - Week-over-week trend analysis - Identifying delivery issues early - SLA monitoring and reporting **Note:** Maximum date range is 31 days. Both `from` and `to` dates are inclusive.
94
94
 
95
95
  ### Examples
96
96
 
@@ -106,9 +106,9 @@ Sendpost.configure do |config|
106
106
  end
107
107
 
108
108
  api_instance = Sendpost::StatsApi.new
109
- from = Date.parse('2013-10-20') # Date | Start date for stats retrieval.
110
- to = Date.parse('2013-10-20') # Date | Date to which stats should be retrieved ( Note than from date should be earlier than to date. Also the difference between from and to date shouldn't ne more than 60 days )
111
- subaccount_id = 11 # Integer | The ID of the subaccount to retrieve
109
+ from = Date.parse('2024-01-01') # Date | Start date for stats retrieval (inclusive). Format YYYY-MM-DD.
110
+ to = Date.parse('2024-01-31') # Date | End date for stats retrieval (inclusive). Must be after `from` date with max 31 days range.
111
+ subaccount_id = 11 # Integer | The unique ID of the sub-account to retrieve stats for.
112
112
 
113
113
  begin
114
114
  # List Stats
@@ -141,9 +141,9 @@ end
141
141
 
142
142
  | Name | Type | Description | Notes |
143
143
  | ---- | ---- | ----------- | ----- |
144
- | **from** | **Date** | Start date for stats retrieval. | |
145
- | **to** | **Date** | Date to which stats should be retrieved ( Note than from date should be earlier than to date. Also the difference between from and to date shouldn't ne more than 60 days ) | |
146
- | **subaccount_id** | **Integer** | The ID of the subaccount to retrieve | |
144
+ | **from** | **Date** | Start date for stats retrieval (inclusive). Format YYYY-MM-DD. | |
145
+ | **to** | **Date** | End date for stats retrieval (inclusive). Must be after `from` date with max 31 days range. | |
146
+ | **subaccount_id** | **Integer** | The unique ID of the sub-account to retrieve stats for. | |
147
147
 
148
148
  ### Return type
149
149
 
@@ -165,7 +165,7 @@ end
165
165
 
166
166
  Get Group Aggregate Stats
167
167
 
168
- Retrieves aggregated email stats for a specific group in a sub-account for the specified daterange. The maximum daterange for which these stats can be retrieved is 366 days. Ensure that the difference between the `from` and `to` dates does not exceed 366 days.
168
+ Retrieve aggregated email statistics filtered by a specific group/tag. Groups are labels you assign when sending emails to categorize and segment your analytics. **What are Groups?** Groups (also called tags) are strings you attach to emails when sending. They help you: - Track different email types (transactional vs marketing) - Segment by campaign or feature - Compare performance across categories **Setting Groups When Sending:** ```json { \"from\": { \"email\": \"orders@shop.com\" }, \"to\": [{ \"email\": \"customer@example.com\" }], \"subject\": \"Order Confirmation\", \"groups\": [\"order-confirmations\", \"transactional\"] } ``` **Use Cases:** - Compare welcome email vs password reset performance - Track marketing campaign performance by campaign ID - Measure transactional vs promotional email metrics - Analyze A/B test results by variant group **Example:** Get stats for \"welcome-emails\" group: ``` GET /account/subaccount/stat/11/group?group=welcome-emails&from=2024-01-01&to=2024-03-31 ``` **Note:** Maximum date range is 366 days.
169
169
 
170
170
  ### Examples
171
171
 
@@ -181,8 +181,8 @@ Sendpost.configure do |config|
181
181
  end
182
182
 
183
183
  api_instance = Sendpost::StatsApi.new
184
- group = 'group_example' # String | Group whose aggregated stats need to be retrieved
185
- from = Date.parse('2013-10-20') # Date | The starting date for the aggregated stats
184
+ group = 'order-confirmations' # String | The group/tag name to filter statistics by. Must match the group name used when sending emails.
185
+ from = Date.parse('2024-01-01') # Date | Start date for aggregation (inclusive). Format YYYY-MM-DD.
186
186
  to = Date.parse('2013-10-20') # Date | The ending date for the aggregated stats (Note: `from` should be earlier than `to` and the date range should not exceed 366 days)
187
187
  subaccount_id = 11 # Integer | The ID of the subaccount to retrieve
188
188
 
@@ -217,8 +217,8 @@ end
217
217
 
218
218
  | Name | Type | Description | Notes |
219
219
  | ---- | ---- | ----------- | ----- |
220
- | **group** | **String** | Group whose aggregated stats need to be retrieved | |
221
- | **from** | **Date** | The starting date for the aggregated stats | |
220
+ | **group** | **String** | The group/tag name to filter statistics by. Must match the group name used when sending emails. | |
221
+ | **from** | **Date** | Start date for aggregation (inclusive). Format YYYY-MM-DD. | |
222
222
  | **to** | **Date** | The ending date for the aggregated stats (Note: `from` should be earlier than `to` and the date range should not exceed 366 days) | |
223
223
  | **subaccount_id** | **Integer** | The ID of the subaccount to retrieve | |
224
224
 
data/docs/SubAccount.md CHANGED
@@ -4,22 +4,15 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **Integer** | Unique ID for the sub-account. | [optional] |
8
- | **api_key** | **String** | API key for the sub-account. | [optional] |
9
- | **name** | **String** | Name of the sub-account. | [optional] |
10
- | **labels** | [**Array<Label>**](Label.md) | Labels associated with the sub-account | [optional] |
11
- | **smtp_auths** | [**Array<SMTPAuth>**](SMTPAuth.md) | SMTP Auths associated with the sub-account | [optional] |
12
- | **type** | **Integer** | Type of the sub-account | [optional] |
13
- | **is_plus** | **Boolean** | Indicates whether the sub-account is a Plus sub-account | [optional] |
14
- | **created** | **Integer** | UNIX epoch nano timestamp when the sub-account was created. | [optional] |
15
- | **created_by** | **Hash<String, Object>** | Member who created the sub-account | [optional] |
16
- | **updated_by** | **Hash<String, Object>** | Member who updated the sub-account | [optional] |
17
- | **blocked** | **Boolean** | Indicates whether the sub-account is blocked | [optional] |
18
- | **blocked_at** | **Integer** | UNIX epoch nano timestamp when the sub-account was blocked (0 if not blocked) | [optional] |
19
- | **block_reason** | **String** | Reason for blocking the sub-account | [optional] |
20
- | **hb_exempt** | **Boolean** | Indicates whether the sub-account is exempt from hard bounce tracking | [optional] |
21
- | **generate_weekly_report** | **Boolean** | Indicates whether weekly reports are generated for this sub-account | [optional] |
22
- | **handlers** | **Array<String>** | Handlers associated with the sub-account | [optional] |
7
+ | **id** | **Integer** | Unique identifier for the sub-account | [optional] |
8
+ | **account_id** | **Integer** | Identifier of the parent account this sub-account belongs to | [optional] |
9
+ | **name** | **String** | Display name for the sub-account. Must be unique within your account. Use descriptive names. | [optional] |
10
+ | **api_key** | **String** | API key for this sub-account. Use this as the `X-SubAccount-ApiKey` header when making API calls for this sub-account (sending emails, managing domains, etc.). **Security:** Treat this like a password. Rotate if compromised. | [optional] |
11
+ | **type** | **Integer** | Type of sub-account: - `0` = Default (the primary sub-account created with your account) - `1` = Custom (additional sub-accounts you create) Note: The default sub-account cannot be deleted. | [optional] |
12
+ | **is_plus** | **Boolean** | Whether this sub-account belongs to a SendX Plus customer. SendX Plus is a premium tier that provides enhanced features and support. | [optional] |
13
+ | **labels** | [**Array<Label>**](Label.md) | Custom labels for organizing and filtering sub-accounts | [optional] |
14
+ | **blocked** | **Boolean** | Whether the sub-account is blocked from sending. A blocked sub-account cannot send emails. Common reasons: - High bounce/spam rates - Billing issues - Policy violations - Manual suspension by administrator | [optional] |
15
+ | **created** | **Integer** | UNIX epoch timestamp in nanoseconds when the sub-account was created | [optional] |
23
16
 
24
17
  ## Example
25
18
 
@@ -28,21 +21,14 @@ require 'sendpost_ruby_sdk'
28
21
 
29
22
  instance = Sendpost::SubAccount.new(
30
23
  id: 50441,
24
+ account_id: 4021,
25
+ name: Transactional - Production,
31
26
  api_key: pR0YIuxYSbVwmQi2Y8Qs,
32
- name: API,
33
- labels: [],
34
- smtp_auths: null,
35
27
  type: 1,
36
28
  is_plus: false,
37
- created: 1733844681120384500,
38
- created_by: null,
39
- updated_by: null,
29
+ labels: null,
40
30
  blocked: false,
41
- blocked_at: 0,
42
- block_reason: ,
43
- hb_exempt: false,
44
- generate_weekly_report: false,
45
- handlers: []
31
+ created: 1704067200000000000
46
32
  )
47
33
  ```
48
34
 
@@ -13,11 +13,11 @@ All URIs are relative to *https://api.sendpost.io/api/v1*
13
13
 
14
14
  ## create_sub_account
15
15
 
16
- > <SubAccount> create_sub_account(create_sub_account_request)
16
+ > <SubAccount> create_sub_account(new_sub_account)
17
17
 
18
18
  Create Sub-Account
19
19
 
20
- Creates a new sub-account under the current account.
20
+ Create a new sub-account to segment your email sending. Each sub-account gets its own API key, suppression list, and statistics. **What You Get:** - Unique `X-SubAccount-ApiKey` for authentication - Isolated email statistics - Separate suppression management - Independent domain configuration - Optional SMTP credentials **Naming Best Practices:** - Use descriptive names: `Transactional_Orders`, `Marketing_Newsletter` - Include environment: `Production_Alerts`, `Staging_Tests` - For multi-tenant: `Client_CompanyName` **Use Cases:** - New application or microservice needing email - Onboarding a new client in multi-tenant setup - Creating isolated testing environment - Separating email streams for analytics
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::SubAccountApi.new
36
- create_sub_account_request = Sendpost::CreateSubAccountRequest.new # CreateSubAccountRequest |
36
+ new_sub_account = Sendpost::NewSubAccount.new({name: 'Marketing - Production'}) # NewSubAccount |
37
37
 
38
38
  begin
39
39
  # Create Sub-Account
40
- result = api_instance.create_sub_account(create_sub_account_request)
40
+ result = api_instance.create_sub_account(new_sub_account)
41
41
  p result
42
42
  rescue Sendpost::ApiError => e
43
43
  puts "Error when calling SubAccountApi->create_sub_account: #{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(<SubAccount>, Integer, Hash)> create_sub_account_with_http_info(create_sub_account_request)
51
+ > <Array(<SubAccount>, Integer, Hash)> create_sub_account_with_http_info(new_sub_account)
52
52
 
53
53
  ```ruby
54
54
  begin
55
55
  # Create Sub-Account
56
- data, status_code, headers = api_instance.create_sub_account_with_http_info(create_sub_account_request)
56
+ data, status_code, headers = api_instance.create_sub_account_with_http_info(new_sub_account)
57
57
  p status_code # => 2xx
58
58
  p headers # => { ... }
59
59
  p data # => <SubAccount>
@@ -66,7 +66,7 @@ end
66
66
 
67
67
  | Name | Type | Description | Notes |
68
68
  | ---- | ---- | ----------- | ----- |
69
- | **create_sub_account_request** | [**CreateSubAccountRequest**](CreateSubAccountRequest.md) | | |
69
+ | **new_sub_account** | [**NewSubAccount**](NewSubAccount.md) | | |
70
70
 
71
71
  ### Return type
72
72
 
@@ -88,7 +88,7 @@ end
88
88
 
89
89
  Delete Sub-Account
90
90
 
91
- Deletes a specific sub-account by its ID.
91
+ Remove a sub-account from your organization. This action is irreversible. **⚠️ Before Deleting:** - Export any needed statistics or suppression lists - Update applications using this sub-account's API key - Ensure no active email sending relies on this sub-account **What Gets Deleted:** - All sub-account configuration - Associated API keys (will stop working) - Statistics are retained for your account records **Note:** The default sub-account (type `0`) cannot be deleted.
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::SubAccountApi.new
107
- subaccount_id = 12 # Integer | The ID of the sub-account to delete.
107
+ subaccount_id = 12 # Integer | The unique ID of the sub-account to delete.
108
108
 
109
109
  begin
110
110
  # Delete Sub-Account
@@ -137,7 +137,7 @@ end
137
137
 
138
138
  | Name | Type | Description | Notes |
139
139
  | ---- | ---- | ----------- | ----- |
140
- | **subaccount_id** | **Integer** | The ID of the sub-account to delete. | |
140
+ | **subaccount_id** | **Integer** | The unique ID of the sub-account to delete. | |
141
141
 
142
142
  ### Return type
143
143
 
@@ -159,7 +159,7 @@ end
159
159
 
160
160
  List Sub-Accounts
161
161
 
162
- Retrieves a list of all sub-accounts associated with a specific account.
162
+ Retrieve all sub-accounts under your main account. Sub-accounts allow you to segment email sending for different applications, brands, or use cases. **Sub-Account Types:** | Type | Value | Description | |------|-------|-------------| | Default | `0` | Primary sub-account created with your account (cannot be deleted) | | Custom | `1` | Additional sub-accounts you create | **Each Sub-Account Has:** - Unique `X-SubAccount-ApiKey` for API authentication - Independent suppression list - Isolated email statistics - Own domain configurations - SMTP credentials (if enabled) **Use Cases:** - Separate transactional and marketing emails - Multi-tenant SaaS applications (one sub-account per customer) - Different brands or product lines - Development/staging/production environments **Note:** `isPlus` indicates SendX Plus customers with premium features.
163
163
 
164
164
  ### Examples
165
165
 
@@ -176,9 +176,9 @@ end
176
176
 
177
177
  api_instance = Sendpost::SubAccountApi.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 the sub-account name.
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: 'Production' # String | Case-insensitive search against sub-account names.
182
182
  }
183
183
 
184
184
  begin
@@ -212,9 +212,9 @@ 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 the sub-account name. | [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 sub-account names. | [optional] |
218
218
 
219
219
  ### Return type
220
220
 
@@ -236,7 +236,7 @@ end
236
236
 
237
237
  Get Sub-Account
238
238
 
239
- Retrieves a specific sub-account by its ID.
239
+ Retrieve detailed information about a specific sub-account, including API keys, SMTP credentials, and configuration. **Response Includes:** - Sub-account name and ID - API key for sub-account authentication - SMTP credentials (if enabled) - Team members with access - Labels/tags for categorization - Creation timestamp
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::SubAccountApi.new
255
- subaccount_id = 11 # Integer | The ID of the sub-account to retrieve.
255
+ subaccount_id = 11 # Integer | The unique ID of the sub-account to retrieve.
256
256
 
257
257
  begin
258
258
  # Get Sub-Account
@@ -285,7 +285,7 @@ end
285
285
 
286
286
  | Name | Type | Description | Notes |
287
287
  | ---- | ---- | ----------- | ----- |
288
- | **subaccount_id** | **Integer** | The ID of the sub-account to retrieve. | |
288
+ | **subaccount_id** | **Integer** | The unique ID of the sub-account to retrieve. | |
289
289
 
290
290
  ### Return type
291
291
 
@@ -307,7 +307,7 @@ end
307
307
 
308
308
  Update Sub-Account
309
309
 
310
- Updates the details of an existing sub-account.
310
+ Modify settings for an existing sub-account. Use this to rename sub-accounts, update labels, or modify configuration. **What Can Be Updated:** - Sub-account name - Labels/tags for categorization - Other configuration settings **Use Cases:** - Rename sub-account for clarity - Update labels for organizational changes - Modify settings after initial setup
311
311
 
312
312
  ### Examples
313
313
 
@@ -324,7 +324,7 @@ end
324
324
 
325
325
  api_instance = Sendpost::SubAccountApi.new
326
326
  update_sub_account = Sendpost::UpdateSubAccount.new # UpdateSubAccount |
327
- subaccount_id = 12 # Integer | The ID of the sub-account to update.
327
+ subaccount_id = 12 # Integer | The unique ID of the sub-account to update.
328
328
 
329
329
  begin
330
330
  # Update Sub-Account
@@ -358,7 +358,7 @@ end
358
358
  | Name | Type | Description | Notes |
359
359
  | ---- | ---- | ----------- | ----- |
360
360
  | **update_sub_account** | [**UpdateSubAccount**](UpdateSubAccount.md) | | |
361
- | **subaccount_id** | **Integer** | The ID of the sub-account to update. | |
361
+ | **subaccount_id** | **Integer** | The unique ID of the sub-account to update. | |
362
362
 
363
363
  ### Return type
364
364
 
@@ -0,0 +1,44 @@
1
+ # Sendpost::SubAccountStat
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
+ | **sub_account_id** | **Integer** | Unique identifier of the sub-account. | [optional] |
19
+ | **sub_account_name** | **String** | Human-readable name of the sub-account. | [optional] |
20
+ | **blocked** | **Boolean** | Whether the sub-account is currently blocked from sending. | [optional] |
21
+
22
+ ## Example
23
+
24
+ ```ruby
25
+ require 'sendpost_ruby_sdk'
26
+
27
+ instance = Sendpost::SubAccountStat.new(
28
+ processed: 225,
29
+ sent: 220,
30
+ dropped: 10,
31
+ smtp_dropped: 5,
32
+ delivered: 200,
33
+ soft_bounced: 5,
34
+ hard_bounced: 10,
35
+ opened: 150,
36
+ clicked: 50,
37
+ unsubscribed: 6,
38
+ spam: 2,
39
+ sub_account_id: 42,
40
+ sub_account_name: Marketing,
41
+ blocked: false
42
+ )
43
+ ```
44
+
@@ -0,0 +1,42 @@
1
+ # Sendpost::SubAccountStatForPool
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
+ | **sub_account_id** | **Integer** | Unique identifier of the sub-account. | [optional] |
19
+ | **name** | **String** | Human-readable name of the sub-account. | [optional] |
20
+
21
+ ## Example
22
+
23
+ ```ruby
24
+ require 'sendpost_ruby_sdk'
25
+
26
+ instance = Sendpost::SubAccountStatForPool.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
+ sub_account_id: 42,
39
+ name: Marketing
40
+ )
41
+ ```
42
+