sendpost_ruby_sdk 2.0.2 → 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 (360) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +612 -531
  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 -85
  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 -375
  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 +94 -82
  154. data/lib/sendpost_ruby_sdk/models/ip_pool_create_request.rb +91 -29
  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 -27
  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 +143 -219
  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/DomainSpf.md +0 -22
  239. data/docs/DomainTrack.md +0 -22
  240. data/docs/EmailMessageFrom.md +0 -20
  241. data/docs/EmailMessageToInner.md +0 -26
  242. data/docs/EmailMessageToInnerBccInner.md +0 -22
  243. data/docs/EmailMessageToInnerCcInner.md +0 -22
  244. data/docs/EmailStats.md +0 -20
  245. data/docs/EmailStatsStats.md +0 -38
  246. data/docs/MessageHeaderTo.md +0 -26
  247. data/docs/MessageTo.md +0 -26
  248. data/docs/OperatingSystem.md +0 -26
  249. data/docs/Person.md +0 -20
  250. data/docs/StatStat.md +0 -38
  251. data/docs/StatStats.md +0 -38
  252. data/docs/ThirdPartySendingProvider.md +0 -38
  253. data/lib/sendpost_ruby_sdk/models/account_stats_stat.rb +0 -311
  254. data/lib/sendpost_ruby_sdk/models/aggregated_email_stats.rb +0 -321
  255. data/lib/sendpost_ruby_sdk/models/auto_warmup_plan.rb +0 -531
  256. data/lib/sendpost_ruby_sdk/models/create_sub_account_request.rb +0 -221
  257. data/lib/sendpost_ruby_sdk/models/create_webhook_request.rb +0 -361
  258. data/lib/sendpost_ruby_sdk/models/delete_suppression200_response_inner.rb +0 -231
  259. data/lib/sendpost_ruby_sdk/models/domain_dkim.rb +0 -239
  260. data/lib/sendpost_ruby_sdk/models/domain_dmarc.rb +0 -239
  261. data/lib/sendpost_ruby_sdk/models/domain_gpt.rb +0 -239
  262. data/lib/sendpost_ruby_sdk/models/domain_return_path.rb +0 -239
  263. data/lib/sendpost_ruby_sdk/models/domain_spf.rb +0 -239
  264. data/lib/sendpost_ruby_sdk/models/domain_track.rb +0 -239
  265. data/lib/sendpost_ruby_sdk/models/email_message_from.rb +0 -229
  266. data/lib/sendpost_ruby_sdk/models/email_message_reply_to.rb +0 -229
  267. data/lib/sendpost_ruby_sdk/models/email_message_to_inner.rb +0 -262
  268. data/lib/sendpost_ruby_sdk/models/email_message_to_inner_bcc_inner.rb +0 -240
  269. data/lib/sendpost_ruby_sdk/models/email_message_to_inner_cc_inner.rb +0 -240
  270. data/lib/sendpost_ruby_sdk/models/email_stats.rb +0 -230
  271. data/lib/sendpost_ruby_sdk/models/email_stats_stats.rb +0 -321
  272. data/lib/sendpost_ruby_sdk/models/message_header_to.rb +0 -268
  273. data/lib/sendpost_ruby_sdk/models/message_to.rb +0 -268
  274. data/lib/sendpost_ruby_sdk/models/operating_system.rb +0 -256
  275. data/lib/sendpost_ruby_sdk/models/person.rb +0 -231
  276. data/lib/sendpost_ruby_sdk/models/stat_stat.rb +0 -322
  277. data/lib/sendpost_ruby_sdk/models/stat_stats.rb +0 -321
  278. data/lib/sendpost_ruby_sdk/models/third_party_sending_provider.rb +0 -310
  279. data/spec/api/domain_api_spec.rb +0 -85
  280. data/spec/api/email_api_spec.rb +0 -59
  281. data/spec/api/ip_api_spec.rb +0 -98
  282. data/spec/api/ip_pools_api_spec.rb +0 -98
  283. data/spec/api/message_api_spec.rb +0 -47
  284. data/spec/api/stats_a_api_spec.rb +0 -89
  285. data/spec/api/stats_api_spec.rb +0 -78
  286. data/spec/api/sub_account_api_spec.rb +0 -98
  287. data/spec/api/suppression_api_spec.rb +0 -76
  288. data/spec/api/webhook_api_spec.rb +0 -98
  289. data/spec/models/account_stats_spec.rb +0 -42
  290. data/spec/models/account_stats_stat_spec.rb +0 -96
  291. data/spec/models/aggregate_stat_spec.rb +0 -96
  292. data/spec/models/aggregate_stats_spec.rb +0 -96
  293. data/spec/models/aggregated_email_stats_spec.rb +0 -96
  294. data/spec/models/attachment_spec.rb +0 -42
  295. data/spec/models/auto_warmup_plan_spec.rb +0 -222
  296. data/spec/models/copy_to_spec.rb +0 -48
  297. data/spec/models/create_domain_request_spec.rb +0 -36
  298. data/spec/models/create_sub_account_request_spec.rb +0 -36
  299. data/spec/models/create_suppression_request_hard_bounce_inner_spec.rb +0 -36
  300. data/spec/models/create_suppression_request_manual_inner_spec.rb +0 -36
  301. data/spec/models/create_suppression_request_spam_complaint_inner_spec.rb +0 -36
  302. data/spec/models/create_suppression_request_spec.rb +0 -54
  303. data/spec/models/create_suppression_request_unsubscribe_inner_spec.rb +0 -36
  304. data/spec/models/create_webhook_request_spec.rb +0 -120
  305. data/spec/models/delete_response_spec.rb +0 -42
  306. data/spec/models/delete_sub_account_response_spec.rb +0 -42
  307. data/spec/models/delete_suppression200_response_inner_spec.rb +0 -42
  308. data/spec/models/delete_suppression_request_spec.rb +0 -36
  309. data/spec/models/delete_webhook_response_spec.rb +0 -42
  310. data/spec/models/device_spec.rb +0 -36
  311. data/spec/models/domain_dkim_spec.rb +0 -48
  312. data/spec/models/domain_dmarc_spec.rb +0 -48
  313. data/spec/models/domain_gpt_spec.rb +0 -48
  314. data/spec/models/domain_return_path_spec.rb +0 -48
  315. data/spec/models/domain_spec.rb +0 -150
  316. data/spec/models/domain_spf_spec.rb +0 -48
  317. data/spec/models/domain_track_spec.rb +0 -48
  318. data/spec/models/eip_spec.rb +0 -36
  319. data/spec/models/email_address_spec.rb +0 -42
  320. data/spec/models/email_message_from_spec.rb +0 -42
  321. data/spec/models/email_message_object_spec.rb +0 -120
  322. data/spec/models/email_message_reply_to_spec.rb +0 -42
  323. data/spec/models/email_message_spec.rb +0 -138
  324. data/spec/models/email_message_to_inner_bcc_inner_spec.rb +0 -48
  325. data/spec/models/email_message_to_inner_cc_inner_spec.rb +0 -48
  326. data/spec/models/email_message_to_inner_spec.rb +0 -60
  327. data/spec/models/email_message_with_template_spec.rb +0 -138
  328. data/spec/models/email_response_spec.rb +0 -60
  329. data/spec/models/email_stats_spec.rb +0 -42
  330. data/spec/models/email_stats_stats_spec.rb +0 -96
  331. data/spec/models/event_metadata_spec.rb +0 -84
  332. data/spec/models/event_spec.rb +0 -150
  333. data/spec/models/geo_location_spec.rb +0 -60
  334. data/spec/models/ip_allocation_request_spec.rb +0 -42
  335. data/spec/models/ip_deletion_response_spec.rb +0 -42
  336. data/spec/models/ip_pool_create_request_spec.rb +0 -66
  337. data/spec/models/ip_pool_delete_response_spec.rb +0 -42
  338. data/spec/models/ip_pool_spec.rb +0 -108
  339. data/spec/models/ip_pool_update_request_spec.rb +0 -54
  340. data/spec/models/ip_spec.rb +0 -168
  341. data/spec/models/ip_update_request_spec.rb +0 -36
  342. data/spec/models/label_spec.rb +0 -48
  343. data/spec/models/member_spec.rb +0 -102
  344. data/spec/models/message_header_to_spec.rb +0 -60
  345. data/spec/models/message_spec.rb +0 -210
  346. data/spec/models/message_to_spec.rb +0 -60
  347. data/spec/models/operating_system_spec.rb +0 -60
  348. data/spec/models/person_spec.rb +0 -42
  349. data/spec/models/recipient_spec.rb +0 -60
  350. data/spec/models/smtp_auth_spec.rb +0 -60
  351. data/spec/models/stat_spec.rb +0 -42
  352. data/spec/models/stat_stat_spec.rb +0 -96
  353. data/spec/models/stat_stats_spec.rb +0 -96
  354. data/spec/models/sub_account_spec.rb +0 -130
  355. data/spec/models/suppression_spec.rb +0 -60
  356. data/spec/models/third_party_sending_provider_spec.rb +0 -96
  357. data/spec/models/update_sub_account_spec.rb +0 -36
  358. data/spec/models/update_webhook_spec.rb +0 -120
  359. data/spec/models/user_agent_spec.rb +0 -54
  360. data/spec/models/webhook_spec.rb +0 -144
data/docs/DnsRecord.md ADDED
@@ -0,0 +1,22 @@
1
+ # Sendpost::DnsRecord
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **host** | **String** | The DNS hostname where this record should be created | [optional] |
8
+ | **type** | **String** | The DNS record type (TXT or CNAME) | [optional] |
9
+ | **text_value** | **String** | The value to set for this DNS record | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'sendpost_ruby_sdk'
15
+
16
+ instance = Sendpost::DnsRecord.new(
17
+ host: sp-dkim._domainkey.example.com,
18
+ type: TXT,
19
+ text_value: v=DKIM1;k=rsa;p=MIGfMA0GCSqGSIb3D...
20
+ )
21
+ ```
22
+
data/docs/Domain.md CHANGED
@@ -4,26 +4,24 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **Integer** | Unique ID for the domain. | [optional] |
8
- | **name** | **String** | Name of the domain. | [optional] |
9
- | **dkim** | [**DomainDkim**](DomainDkim.md) | | [optional] |
10
- | **return_path** | [**DomainReturnPath**](DomainReturnPath.md) | | [optional] |
11
- | **track** | [**DomainTrack**](DomainTrack.md) | | [optional] |
12
- | **dmarc** | [**DomainDmarc**](DomainDmarc.md) | | [optional] |
13
- | **dkim_config** | **String** | DKIM configuration | [optional] |
14
- | **dkim_verified** | **Boolean** | Status of DKIM verification ( true or false ) | [optional] |
15
- | **dmarc_verified** | **Boolean** | Status of DMARC verification ( true or false) | [optional] |
16
- | **return_path_verified** | **Boolean** | Status of ReturnPath verification ( true or false ) | [optional] |
17
- | **track_verified** | **Boolean** | Status of Track verification ( true or false ) | [optional] |
18
- | **verified** | **Boolean** | Overall verification status of the domain | [optional] |
19
- | **domain_registered_date** | **String** | Date when the domain was registered | [optional] |
20
- | **created** | **Integer** | UNIX epoch timestamp in nanoseconds. | [optional] |
21
- | **gpt_verified** | **Boolean** | Status of GPT verification ( true or false ) | [optional] |
22
- | **gpt** | [**DomainGpt**](DomainGpt.md) | | [optional] |
23
- | **dmarc_failure_reason** | **String** | Reason for DMARC verification failure | [optional] |
24
- | **dkim_failure_reason** | **String** | Reason for DKIM verification failure | [optional] |
25
- | **track_failure_reason** | **String** | Reason for Track verification failure | [optional] |
26
- | **return_path_failure_reason** | **String** | Reason for ReturnPath verification failure | [optional] |
7
+ | **id** | **Integer** | Unique identifier for the domain | [optional] |
8
+ | **name** | **String** | The domain name (e.g., \"example.com\"). This is the domain portion of your sending email addresses. | [optional] |
9
+ | **dns_provider** | **String** | Auto-detected DNS provider for this domain (e.g. \"cloudflare\", \"other\"), used to tailor DNS-setup instructions. Read-only. | [optional] |
10
+ | **dkim** | [**DnsRecord**](DnsRecord.md) | DKIM (DomainKeys Identified Mail) DNS record configuration. DKIM cryptographically signs your emails to verify they haven't been tampered with. This is REQUIRED for sending emails. | [optional] |
11
+ | **return_path** | [**DnsRecord**](DnsRecord.md) | Return-Path (bounce handling) DNS record configuration. Configuring this allows bounce notifications to be properly routed through SendPost. RECOMMENDED for better deliverability. | [optional] |
12
+ | **track** | [**DnsRecord**](DnsRecord.md) | Tracking domain DNS record configuration. When configured, click tracking links use your domain instead of SendPost's domain. RECOMMENDED for brand consistency and improved click-through rates. | [optional] |
13
+ | **dmarc** | [**DnsRecord**](DnsRecord.md) | DMARC (Domain-based Message Authentication, Reporting & Conformance) DNS record. DMARC builds on DKIM and SPF to provide email authentication and reporting. RECOMMENDED for enterprise senders. | [optional] |
14
+ | **dkim_verified** | **Boolean** | Whether the DKIM DNS record has been verified successfully | [optional] |
15
+ | **dmarc_verified** | **Boolean** | Whether the DMARC DNS record has been verified successfully | [optional] |
16
+ | **return_path_verified** | **Boolean** | Whether the Return-Path DNS record has been verified successfully | [optional] |
17
+ | **track_verified** | **Boolean** | Whether the tracking domain DNS record has been verified successfully | [optional] |
18
+ | **verified** | **Boolean** | Overall verification status. True only if DKIM is verified (minimum requirement). For full verification, configure all DNS records. | [optional] |
19
+ | **domain_registered_date** | **Date** | Date when this domain was originally registered (from WHOIS). Newer domains may have lower sender reputation initially. | [optional] |
20
+ | **created** | **Integer** | UNIX epoch timestamp in nanoseconds when the domain was added to SendPost | [optional] |
21
+ | **dkim_failure_reason** | **String** | Detailed reason if DKIM verification failed (empty if verified or not attempted) | [optional] |
22
+ | **dmarc_failure_reason** | **String** | Detailed reason if DMARC verification failed | [optional] |
23
+ | **track_failure_reason** | **String** | Detailed reason if tracking domain verification failed | [optional] |
24
+ | **return_path_failure_reason** | **String** | Detailed reason if Return-Path verification failed | [optional] |
27
25
 
28
26
  ## Example
29
27
 
@@ -33,22 +31,20 @@ require 'sendpost_ruby_sdk'
33
31
  instance = Sendpost::Domain.new(
34
32
  id: 117,
35
33
  name: piedpiper.com,
34
+ dns_provider: cloudflare,
36
35
  dkim: null,
37
36
  return_path: null,
38
37
  track: null,
39
38
  dmarc: null,
40
- dkim_config: null,
41
- dkim_verified: false,
39
+ dkim_verified: true,
42
40
  dmarc_verified: false,
43
- return_path_verified: false,
41
+ return_path_verified: true,
44
42
  track_verified: true,
45
- verified: false,
43
+ verified: true,
46
44
  domain_registered_date: 1995-08-14,
47
- created: 1766394250613907000,
48
- gpt_verified: false,
49
- gpt: null,
45
+ created: 1704067200000000000,
46
+ dkim_failure_reason: DNS record not found. Please add the TXT record to your DNS provider.,
50
47
  dmarc_failure_reason: ,
51
- dkim_failure_reason: ,
52
48
  track_failure_reason: ,
53
49
  return_path_failure_reason:
54
50
  )
data/docs/DomainApi.md CHANGED
@@ -4,19 +4,19 @@ All URIs are relative to *https://api.sendpost.io/api/v1*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
+ | [**create_sub_account_domain**](DomainApi.md#create_sub_account_domain) | **POST** /subaccount/domain | Create Domain |
8
+ | [**delete_sub_account_domain**](DomainApi.md#delete_sub_account_domain) | **DELETE** /subaccount/domain/{domain_id} | Delete Domain |
7
9
  | [**get_all_domains**](DomainApi.md#get_all_domains) | **GET** /subaccount/domain | List Domains |
8
- | [**subaccount_domain_domain_id_delete**](DomainApi.md#subaccount_domain_domain_id_delete) | **DELETE** /subaccount/domain/{domain_id} | Delete Domain |
9
- | [**subaccount_domain_domain_id_get**](DomainApi.md#subaccount_domain_domain_id_get) | **GET** /subaccount/domain/{domain_id} | Get Domain |
10
- | [**subaccount_domain_post**](DomainApi.md#subaccount_domain_post) | **POST** /subaccount/domain | Create Domain |
10
+ | [**get_sub_account_domain**](DomainApi.md#get_sub_account_domain) | **GET** /subaccount/domain/{domain_id} | Get Domain |
11
11
 
12
12
 
13
- ## get_all_domains
13
+ ## create_sub_account_domain
14
14
 
15
- > <Array<Domain>> get_all_domains(opts)
15
+ > <Domain> create_sub_account_domain(create_domain_request)
16
16
 
17
- List Domains
17
+ Create Domain
18
18
 
19
- Retrieve a list of all domains associated with the sub-account, including their DNS records and authentication status.
19
+ Register a new sending domain with SendPost. After creation, you'll receive DNS records that must be configured with your DNS provider before you can send emails. **Domain Setup Process:** 1. Call this endpoint with your domain name 2. Copy the returned DNS records (DKIM, Return-Path, Track, DMARC) 3. Add records to your DNS provider (GoDaddy, Cloudflare, Route53, etc.) 4. Wait for DNS propagation (typically 15 minutes to 48 hours) 5. Verification happens automatically, or trigger manual verification **DNS Records Explained:** | Record | Purpose | Required | |--------|---------|----------| | DKIM | Cryptographically signs emails to prove authenticity | Yes | | Return-Path | Routes bounce notifications through SendPost | Recommended | | Track | Enables click tracking with your domain | Optional | | DMARC | Adds additional authentication layer | Recommended | **Best Practices:** - Use a subdomain like `mail.yourdomain.com` for sending - Keep your root domain for your website - Configure all records for best deliverability
20
20
 
21
21
  ### Examples
22
22
 
@@ -32,36 +32,32 @@ Sendpost.configure do |config|
32
32
  end
33
33
 
34
34
  api_instance = Sendpost::DomainApi.new
35
- opts = {
36
- limit: 56, # Integer | Number of records to return per request
37
- offset: 56, # Integer | Number of initial records to skip
38
- search: 'search_example' # String | Case insensitive search against domain names
39
- }
35
+ create_domain_request = Sendpost::CreateDomainRequest.new({name: 'piedpiper.com'}) # CreateDomainRequest |
40
36
 
41
37
  begin
42
- # List Domains
43
- result = api_instance.get_all_domains(opts)
38
+ # Create Domain
39
+ result = api_instance.create_sub_account_domain(create_domain_request)
44
40
  p result
45
41
  rescue Sendpost::ApiError => e
46
- puts "Error when calling DomainApi->get_all_domains: #{e}"
42
+ puts "Error when calling DomainApi->create_sub_account_domain: #{e}"
47
43
  end
48
44
  ```
49
45
 
50
- #### Using the get_all_domains_with_http_info variant
46
+ #### Using the create_sub_account_domain_with_http_info variant
51
47
 
52
48
  This returns an Array which contains the response data, status code and headers.
53
49
 
54
- > <Array(<Array<Domain>>, Integer, Hash)> get_all_domains_with_http_info(opts)
50
+ > <Array(<Domain>, Integer, Hash)> create_sub_account_domain_with_http_info(create_domain_request)
55
51
 
56
52
  ```ruby
57
53
  begin
58
- # List Domains
59
- data, status_code, headers = api_instance.get_all_domains_with_http_info(opts)
54
+ # Create Domain
55
+ data, status_code, headers = api_instance.create_sub_account_domain_with_http_info(create_domain_request)
60
56
  p status_code # => 2xx
61
57
  p headers # => { ... }
62
- p data # => <Array<Domain>>
58
+ p data # => <Domain>
63
59
  rescue Sendpost::ApiError => e
64
- puts "Error when calling DomainApi->get_all_domains_with_http_info: #{e}"
60
+ puts "Error when calling DomainApi->create_sub_account_domain_with_http_info: #{e}"
65
61
  end
66
62
  ```
67
63
 
@@ -69,13 +65,11 @@ end
69
65
 
70
66
  | Name | Type | Description | Notes |
71
67
  | ---- | ---- | ----------- | ----- |
72
- | **limit** | **Integer** | Number of records to return per request | [optional] |
73
- | **offset** | **Integer** | Number of initial records to skip | [optional] |
74
- | **search** | **String** | Case insensitive search against domain names | [optional] |
68
+ | **create_domain_request** | [**CreateDomainRequest**](CreateDomainRequest.md) | | |
75
69
 
76
70
  ### Return type
77
71
 
78
- [**Array&lt;Domain&gt;**](Domain.md)
72
+ [**Domain**](Domain.md)
79
73
 
80
74
  ### Authorization
81
75
 
@@ -83,17 +77,17 @@ end
83
77
 
84
78
  ### HTTP request headers
85
79
 
86
- - **Content-Type**: Not defined
80
+ - **Content-Type**: application/json
87
81
  - **Accept**: application/json
88
82
 
89
83
 
90
- ## subaccount_domain_domain_id_delete
84
+ ## delete_sub_account_domain
91
85
 
92
- > <DeleteResponse> subaccount_domain_domain_id_delete(domain_id)
86
+ > <DeleteResponse> delete_sub_account_domain(domain_id)
93
87
 
94
88
  Delete Domain
95
89
 
96
- Delete a specific domain using its `id`.
90
+ Remove a sending domain from your sub-account. Once deleted, you can no longer send emails from addresses on this domain. **Before Deleting:** - Ensure no active email campaigns use this domain - Update sender addresses in your applications - Consider impact on email deliverability **Note:** DNS records for the domain will become orphaned. You may want to remove them from your DNS provider.
97
91
 
98
92
  ### Examples
99
93
 
@@ -113,28 +107,28 @@ domain_id = 'domain_id_example' # String | The unique ID of the domain to delete
113
107
 
114
108
  begin
115
109
  # Delete Domain
116
- result = api_instance.subaccount_domain_domain_id_delete(domain_id)
110
+ result = api_instance.delete_sub_account_domain(domain_id)
117
111
  p result
118
112
  rescue Sendpost::ApiError => e
119
- puts "Error when calling DomainApi->subaccount_domain_domain_id_delete: #{e}"
113
+ puts "Error when calling DomainApi->delete_sub_account_domain: #{e}"
120
114
  end
121
115
  ```
122
116
 
123
- #### Using the subaccount_domain_domain_id_delete_with_http_info variant
117
+ #### Using the delete_sub_account_domain_with_http_info variant
124
118
 
125
119
  This returns an Array which contains the response data, status code and headers.
126
120
 
127
- > <Array(<DeleteResponse>, Integer, Hash)> subaccount_domain_domain_id_delete_with_http_info(domain_id)
121
+ > <Array(<DeleteResponse>, Integer, Hash)> delete_sub_account_domain_with_http_info(domain_id)
128
122
 
129
123
  ```ruby
130
124
  begin
131
125
  # Delete Domain
132
- data, status_code, headers = api_instance.subaccount_domain_domain_id_delete_with_http_info(domain_id)
126
+ data, status_code, headers = api_instance.delete_sub_account_domain_with_http_info(domain_id)
133
127
  p status_code # => 2xx
134
128
  p headers # => { ... }
135
129
  p data # => <DeleteResponse>
136
130
  rescue Sendpost::ApiError => e
137
- puts "Error when calling DomainApi->subaccount_domain_domain_id_delete_with_http_info: #{e}"
131
+ puts "Error when calling DomainApi->delete_sub_account_domain_with_http_info: #{e}"
138
132
  end
139
133
  ```
140
134
 
@@ -158,13 +152,13 @@ end
158
152
  - **Accept**: application/json
159
153
 
160
154
 
161
- ## subaccount_domain_domain_id_get
155
+ ## get_all_domains
162
156
 
163
- > <Domain> subaccount_domain_domain_id_get(domain_id)
157
+ > <Array<Domain>> get_all_domains(opts)
164
158
 
165
- Get Domain
159
+ List Domains
166
160
 
167
- Retrieve details of a specific domain using its `id`.
161
+ Retrieve all sending domains configured for this sub-account. Use this endpoint to audit your domain setup, check verification status, or retrieve DNS records for configuration. **Each domain record includes:** - Domain name and unique ID - DNS records to configure (DKIM, Return-Path, Track, DMARC) - Verification status for each record type - Failure messages for troubleshooting - Creation timestamp **Verification Status Values:** - `true` - Record verified and active - `false` - Record not verified (check DNS configuration) **Use Cases:** - Audit all configured sending domains - Export DNS records for documentation - Identify domains pending verification - Monitor domain health across multiple domains **Pagination:** Use `limit` and `offset` for large domain lists.
168
162
 
169
163
  ### Examples
170
164
 
@@ -180,32 +174,36 @@ Sendpost.configure do |config|
180
174
  end
181
175
 
182
176
  api_instance = Sendpost::DomainApi.new
183
- domain_id = 'domain_id_example' # String | The unique ID of the domain to retrieve.
177
+ opts = {
178
+ limit: 20, # Integer | Number of records to return per request. Default is 20.
179
+ offset: 0, # Integer | Number of initial records to skip for pagination.
180
+ search: 'mycompany' # String | Case insensitive search against domain names. Useful for finding specific domains in large lists.
181
+ }
184
182
 
185
183
  begin
186
- # Get Domain
187
- result = api_instance.subaccount_domain_domain_id_get(domain_id)
184
+ # List Domains
185
+ result = api_instance.get_all_domains(opts)
188
186
  p result
189
187
  rescue Sendpost::ApiError => e
190
- puts "Error when calling DomainApi->subaccount_domain_domain_id_get: #{e}"
188
+ puts "Error when calling DomainApi->get_all_domains: #{e}"
191
189
  end
192
190
  ```
193
191
 
194
- #### Using the subaccount_domain_domain_id_get_with_http_info variant
192
+ #### Using the get_all_domains_with_http_info variant
195
193
 
196
194
  This returns an Array which contains the response data, status code and headers.
197
195
 
198
- > <Array(<Domain>, Integer, Hash)> subaccount_domain_domain_id_get_with_http_info(domain_id)
196
+ > <Array(<Array<Domain>>, Integer, Hash)> get_all_domains_with_http_info(opts)
199
197
 
200
198
  ```ruby
201
199
  begin
202
- # Get Domain
203
- data, status_code, headers = api_instance.subaccount_domain_domain_id_get_with_http_info(domain_id)
200
+ # List Domains
201
+ data, status_code, headers = api_instance.get_all_domains_with_http_info(opts)
204
202
  p status_code # => 2xx
205
203
  p headers # => { ... }
206
- p data # => <Domain>
204
+ p data # => <Array<Domain>>
207
205
  rescue Sendpost::ApiError => e
208
- puts "Error when calling DomainApi->subaccount_domain_domain_id_get_with_http_info: #{e}"
206
+ puts "Error when calling DomainApi->get_all_domains_with_http_info: #{e}"
209
207
  end
210
208
  ```
211
209
 
@@ -213,11 +211,13 @@ end
213
211
 
214
212
  | Name | Type | Description | Notes |
215
213
  | ---- | ---- | ----------- | ----- |
216
- | **domain_id** | **String** | The unique ID of the domain to retrieve. | |
214
+ | **limit** | **Integer** | Number of records to return per request. Default is 20. | [optional][default to 20] |
215
+ | **offset** | **Integer** | Number of initial records to skip for pagination. | [optional][default to 0] |
216
+ | **search** | **String** | Case insensitive search against domain names. Useful for finding specific domains in large lists. | [optional] |
217
217
 
218
218
  ### Return type
219
219
 
220
- [**Domain**](Domain.md)
220
+ [**Array&lt;Domain&gt;**](Domain.md)
221
221
 
222
222
  ### Authorization
223
223
 
@@ -229,13 +229,13 @@ end
229
229
  - **Accept**: application/json
230
230
 
231
231
 
232
- ## subaccount_domain_post
232
+ ## get_sub_account_domain
233
233
 
234
- > <Domain> subaccount_domain_post(create_domain_request)
234
+ > <Domain> get_sub_account_domain(domain_id)
235
235
 
236
- Create Domain
236
+ Get Domain
237
237
 
238
- Add a new domain using its `name`.
238
+ Retrieve detailed information about a specific sending domain, including DNS record configuration and verification status. **Response includes:** - Domain name and ID - DKIM, Return-Path, Track, and DMARC DNS records to configure - Verification status for each record type - Failure reasons if verification failed - Domain registration date **Use Cases:** - Check verification status before sending emails - Retrieve DNS records during domain setup - Debug DNS configuration issues - Audit domain settings for compliance
239
239
 
240
240
  ### Examples
241
241
 
@@ -251,32 +251,32 @@ Sendpost.configure do |config|
251
251
  end
252
252
 
253
253
  api_instance = Sendpost::DomainApi.new
254
- create_domain_request = Sendpost::CreateDomainRequest.new # CreateDomainRequest |
254
+ domain_id = 'domain_id_example' # String | The unique ID of the domain to retrieve.
255
255
 
256
256
  begin
257
- # Create Domain
258
- result = api_instance.subaccount_domain_post(create_domain_request)
257
+ # Get Domain
258
+ result = api_instance.get_sub_account_domain(domain_id)
259
259
  p result
260
260
  rescue Sendpost::ApiError => e
261
- puts "Error when calling DomainApi->subaccount_domain_post: #{e}"
261
+ puts "Error when calling DomainApi->get_sub_account_domain: #{e}"
262
262
  end
263
263
  ```
264
264
 
265
- #### Using the subaccount_domain_post_with_http_info variant
265
+ #### Using the get_sub_account_domain_with_http_info variant
266
266
 
267
267
  This returns an Array which contains the response data, status code and headers.
268
268
 
269
- > <Array(<Domain>, Integer, Hash)> subaccount_domain_post_with_http_info(create_domain_request)
269
+ > <Array(<Domain>, Integer, Hash)> get_sub_account_domain_with_http_info(domain_id)
270
270
 
271
271
  ```ruby
272
272
  begin
273
- # Create Domain
274
- data, status_code, headers = api_instance.subaccount_domain_post_with_http_info(create_domain_request)
273
+ # Get Domain
274
+ data, status_code, headers = api_instance.get_sub_account_domain_with_http_info(domain_id)
275
275
  p status_code # => 2xx
276
276
  p headers # => { ... }
277
277
  p data # => <Domain>
278
278
  rescue Sendpost::ApiError => e
279
- puts "Error when calling DomainApi->subaccount_domain_post_with_http_info: #{e}"
279
+ puts "Error when calling DomainApi->get_sub_account_domain_with_http_info: #{e}"
280
280
  end
281
281
  ```
282
282
 
@@ -284,7 +284,7 @@ end
284
284
 
285
285
  | Name | Type | Description | Notes |
286
286
  | ---- | ---- | ----------- | ----- |
287
- | **create_domain_request** | [**CreateDomainRequest**](CreateDomainRequest.md) | | |
287
+ | **domain_id** | **String** | The unique ID of the domain to retrieve. | |
288
288
 
289
289
  ### Return type
290
290
 
@@ -296,6 +296,6 @@ end
296
296
 
297
297
  ### HTTP request headers
298
298
 
299
- - **Content-Type**: application/json
299
+ - **Content-Type**: Not defined
300
300
  - **Accept**: application/json
301
301
 
@@ -0,0 +1,46 @@
1
+ # Sendpost::DomainStat
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
+ | **domain_id** | **Integer** | Unique identifier of the domain record. | [optional] |
19
+ | **domain** | **String** | The sending domain these statistics belong to. | [optional] |
20
+ | **domain_registered_date** | **String** | Date the domain was registered/verified in SendPost (YYYY-MM-DD). | [optional] |
21
+ | **throttled** | **Boolean** | Whether sending on this domain is currently throttled. | [optional] |
22
+
23
+ ## Example
24
+
25
+ ```ruby
26
+ require 'sendpost_ruby_sdk'
27
+
28
+ instance = Sendpost::DomainStat.new(
29
+ processed: 225,
30
+ sent: 220,
31
+ dropped: 10,
32
+ smtp_dropped: 5,
33
+ delivered: 200,
34
+ soft_bounced: 5,
35
+ hard_bounced: 10,
36
+ opened: 150,
37
+ clicked: 50,
38
+ unsubscribed: 6,
39
+ spam: 2,
40
+ domain_id: 12,
41
+ domain: mail.hooli.com,
42
+ domain_registered_date: 2023-06-01,
43
+ throttled: false
44
+ )
45
+ ```
46
+
data/docs/EIP.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **public_ip** | **String** | list of IP resources which are a part of the IP Pool containing public IP information. Note that the IPs specified in the IPPool should have been allocated in advance for your account | |
7
+ | **public_ip** | **String** | Public IPv4 address to include in the IP pool. The IP must already be allocated to your account. | |
8
8
 
9
9
  ## Example
10
10
 
data/docs/EmailAddress.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **email** | **String** | | [optional] |
8
- | **name** | **String** | | [optional] |
7
+ | **email** | **String** | The email address (must be a valid email format) | |
8
+ | **name** | **String** | Display name shown in email clients. Will appear as \&quot;Name &lt;email@example.com&gt;\&quot; in the From/To fields. | [optional] |
9
9
 
10
10
  ## Example
11
11
 
@@ -13,8 +13,8 @@
13
13
  require 'sendpost_ruby_sdk'
14
14
 
15
15
  instance = Sendpost::EmailAddress.new(
16
- email: null,
17
- name: null
16
+ email: sender@example.com,
17
+ name: John Doe
18
18
  )
19
19
  ```
20
20
 
data/docs/EmailApi.md CHANGED
@@ -14,7 +14,7 @@ All URIs are relative to *https://api.sendpost.io/api/v1*
14
14
 
15
15
  Send Email
16
16
 
17
- Use this API to send either a single or batch email.
17
+ Send transactional or marketing emails to one or multiple recipients. This is the primary endpoint for all email sending through SendPost. **Capabilities:** - **Single Email**: Send to one recipient with full personalization - **Batch Sending**: Send to up to 500 recipients in a single API call - **Personalization**: Use Handlebars templating (`{{variableName}}`) in subject, HTML body, and text body - **Attachments**: Include base64-encoded files (max 25MB total per request) - **Tracking**: Enable/disable open and click tracking per email - **IP Pool Routing**: Route emails through specific IP pools **Common Use Cases:** | Use Case | Example | |----------|---------| | Order Confirmation | Send receipt with order details after purchase | | Password Reset | Time-sensitive security email with reset link | | Welcome Email | Onboard new users with personalized greeting | | Shipping Notification | Update customers when orders ship | | Invoice/Receipt | Attach PDF invoices to billing emails | **Personalization Example:** ```json { \"to\": [{ \"email\": \"john@example.com\", \"customFields\": { \"firstName\": \"John\", \"orderTotal\": \"$99.99\" } }], \"subject\": \"Hi {{firstName}}, your order is confirmed!\", \"htmlBody\": \"<p>Thanks {{firstName}}! Your total: {{orderTotal}}</p>\" } ``` **Test Email Addresses:** SendPost provides special test email addresses for testing webhooks and events without sending real emails: | Test Email | Behavior | |------------|----------| | `test@playwithsendpost.io` | Generates delivered event, then simulates opens and clicks after a few seconds | | `deliver@playwithsendpost.io` | Generates delivered event only (no opens/clicks) | | `hardbounce@playwithsendpost.io` | Always generates a hard bounce event | | `softbounce@playwithsendpost.io` | Always generates a soft bounce event | | `dropped@playwithsendpost.io` | Always generates a dropped event (SMTPDropped) | **Self-Test Email (Send to Yourself):** Use `hello@playwithsendpost.io` as the **from** address to send emails to yourself for testing: - **Sender**: Must be `hello@playwithsendpost.io` - **Recipient**: Must be your account owner email (the email you used to sign up) - **Behavior**: Real email delivery to your inbox (no domain verification required, no mock mode) - **Use Case**: Test your API integration by sending real emails to yourself without domain setup **Example:** ```json { \"from\": {\"email\": \"hello@playwithsendpost.io\"}, \"to\": [{\"email\": \"your-account-email@example.com\"}], \"subject\": \"Test Email to Myself\", \"htmlBody\": \"<p>This is a test email to myself</p>\" } ``` This will send a real email to your inbox that you can actually receive and open. **Note**: If you send to any email other than your account email, the request will be rejected with an error. **Using Test Emails:** - Simply send to any test email address like a normal recipient - Mock mode is automatically enabled for test emails - All events trigger webhooks normally - Events are marked as mock messages but follow the same structure as real events - Perfect for testing webhook integrations without using real email addresses **Example:** ```json { \"to\": [{\"email\": \"test@playwithsendpost.io\"}], \"from\": {\"email\": \"sender@example.com\"}, \"subject\": \"Test Email\", \"htmlBody\": \"<p>This is a test</p>\" } ``` This will generate: Sent → Delivered → Opened (after 2-5s) → Clicked (after 1-3s more) **Response:** Returns an array of responses, one per recipient, each containing: - `messageId` - Unique ID for tracking - `submittedAt` - Timestamp of acceptance - `errorCode` and `message` - Status information
18
18
 
19
19
  ### Examples
20
20
 
@@ -30,7 +30,7 @@ Sendpost.configure do |config|
30
30
  end
31
31
 
32
32
  api_instance = Sendpost::EmailApi.new
33
- email_message_object = Sendpost::EmailMessageObject.new # EmailMessageObject | Email message details
33
+ email_message_object = Sendpost::EmailMessageObject.new({from: Sendpost::EmailAddress.new({email: 'sender@example.com'}), to: [Sendpost::Recipient.new({email: 'recipient@example.com'})]}) # EmailMessageObject | Email message details
34
34
 
35
35
  begin
36
36
  # Send Email
@@ -85,7 +85,7 @@ end
85
85
 
86
86
  Send Email With Template
87
87
 
88
- Use this API to send an email with a predefined template. This makes it easy to integrate transactional emails with minimal code.
88
+ Send emails using pre-configured templates stored in SendPost. Templates separate email content from code, enabling: **Benefits:** - Update email content without code deployments - Marketing teams can manage templates independently - Consistent branding across all applications - A/B test different template versions **How It Works:** 1. Create templates in the SendPost dashboard with Handlebars variables 2. Reference the template by name or ID in this API call 3. Pass dynamic data through recipient `customFields` 4. SendPost merges data with template and sends **Common Use Cases:** | Template Type | Dynamic Data | |---------------|--------------| | Welcome Email | `firstName`, `accountType`, `loginUrl` | | Order Receipt | `orderNumber`, `items`, `total`, `shippingAddress` | | Password Reset | `resetLink`, `expiryTime`, `userName` | | Weekly Digest | `articleList`, `unreadCount`, `userName` | **Example Request:** ```json { \"from\": { \"email\": \"orders@yourstore.com\" }, \"to\": [{ \"email\": \"customer@example.com\", \"customFields\": { \"firstName\": \"Sarah\", \"orderNumber\": \"ORD-2024-001\", \"totalAmount\": \"$149.99\" } }], \"template\": \"order-confirmation-v2\" } ``` **Note:** Template variables not provided in `customFields` will render as empty strings.
89
89
 
90
90
  ### Examples
91
91
 
@@ -101,7 +101,7 @@ Sendpost.configure do |config|
101
101
  end
102
102
 
103
103
  api_instance = Sendpost::EmailApi.new
104
- email_message_with_template = Sendpost::EmailMessageWithTemplate.new # EmailMessageWithTemplate | Email message details with template information
104
+ email_message_with_template = Sendpost::EmailMessageWithTemplate.new({from: Sendpost::EmailAddress.new({email: 'sender@example.com'}), to: [Sendpost::Recipient.new({email: 'recipient@example.com'})]}) # EmailMessageWithTemplate | Email message details with template information
105
105
 
106
106
  begin
107
107
  # Send Email With Template
data/docs/EmailMessage.md CHANGED
@@ -4,24 +4,24 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **message_id** | **String** | | [optional] |
8
- | **account_id** | **Integer** | | [optional] |
9
- | **sub_account_id** | **Integer** | | [optional] |
10
- | **ip_id** | **Integer** | | [optional] |
11
- | **public_ip** | **String** | | [optional] |
12
- | **local_ip** | **String** | | [optional] |
13
- | **email_type** | **String** | | [optional] |
14
- | **submitted_at** | **Integer** | | [optional] |
15
- | **from** | [**EmailMessageFrom**](EmailMessageFrom.md) | | [optional] |
16
- | **reply_to** | [**EmailMessageReplyTo**](EmailMessageReplyTo.md) | | [optional] |
17
- | **to** | [**Array&lt;EmailMessageToInner&gt;**](EmailMessageToInner.md) | | [optional] |
18
- | **groups** | **Array&lt;String&gt;** | | [optional] |
19
- | **ip_pool** | **String** | | [optional] |
20
- | **headers** | **Hash&lt;String, String&gt;** | | [optional] |
21
- | **custom_fields** | **Hash&lt;String, String&gt;** | | [optional] |
22
- | **track_opens** | **Boolean** | | [optional] |
23
- | **track_clicks** | **Boolean** | | [optional] |
24
- | **webhook_endpoint** | **String** | | [optional] |
7
+ | **message_id** | **String** | Unique identifier for this email message | [optional] |
8
+ | **account_id** | **Integer** | ID of the SendPost account that sent this email | [optional] |
9
+ | **sub_account_id** | **Integer** | ID of the sub-account that sent this email | [optional] |
10
+ | **ip_id** | **Integer** | ID of the dedicated IP used for sending (0 if a shared IP was used) | [optional] |
11
+ | **public_ip** | **String** | The public IP address used to send this email | [optional] |
12
+ | **local_ip** | **String** | The internal/local IP address used to send this email | [optional] |
13
+ | **email_type** | **String** | Classification of the email based on recipient domain: - &#x60;gmail&#x60; - Gmail recipient - &#x60;yahoo&#x60; - Yahoo recipient - &#x60;microsoft&#x60; - Outlook/Hotmail recipient - &#x60;default&#x60; - Other email providers | [optional] |
14
+ | **submitted_at** | **Integer** | UNIX epoch timestamp in nanoseconds when the email was submitted | [optional] |
15
+ | **from** | [**EmailAddress**](EmailAddress.md) | The sender&#39;s email address | [optional] |
16
+ | **reply_to** | [**EmailAddress**](EmailAddress.md) | The reply-to address (if different from sender) | [optional] |
17
+ | **to** | [**Recipient**](Recipient.md) | The envelope recipient (actual delivery address) | [optional] |
18
+ | **groups** | **Array&lt;String&gt;** | Tags/groups for categorization and analytics | [optional] |
19
+ | **ip_pool** | **String** | Name of the IP pool used for sending | [optional] |
20
+ | **headers** | **Hash&lt;String, String&gt;** | Custom headers included in the email | [optional] |
21
+ | **custom_fields** | **Hash&lt;String, Object&gt;** | Custom fields sent with the email, available for personalization | [optional] |
22
+ | **track_opens** | **Boolean** | Whether open tracking was enabled | [optional] |
23
+ | **track_clicks** | **Boolean** | Whether click tracking was enabled | [optional] |
24
+ | **webhook_endpoint** | **String** | Custom webhook endpoint for this email (if specified) | [optional] |
25
25
 
26
26
  ## Example
27
27
 
@@ -29,24 +29,24 @@
29
29
  require 'sendpost_ruby_sdk'
30
30
 
31
31
  instance = Sendpost::EmailMessage.new(
32
- message_id: mjhl-1401-sasdf-129324,
33
- account_id: 117,
34
- sub_account_id: 117,
35
- ip_id: 123,
32
+ message_id: 550e8400-e29b-41d4-a716-446655440000,
33
+ account_id: 100,
34
+ sub_account_id: 50441,
35
+ ip_id: 11321,
36
36
  public_ip: 52.34.11.12,
37
- local_ip: 127.0.0.1,
38
- email_type: default,
39
- submitted_at: 1567512491587205024,
37
+ local_ip: 10.0.1.5,
38
+ email_type: gmail,
39
+ submitted_at: 1704067200000000000,
40
40
  from: null,
41
41
  reply_to: null,
42
42
  to: null,
43
- groups: [&quot;welcome&quot;,&quot;user-onboarding&quot;],
44
- ip_pool: transactional-piedpiper,
45
- headers: {&quot;X-Campaign-Id&quot;:&quot;12345&quot;},
46
- custom_fields: {&quot;Company&quot;:&quot;Company Name&quot;,&quot;Email&quot;:&quot;user@example.com&quot;},
43
+ groups: [transactional, order-confirmation],
44
+ ip_pool: transactional,
45
+ headers: {X-Campaign-ID&#x3D;summer-sale-2024, List-Unsubscribe&#x3D;&lt;mailto:unsubscribe@piedpiper.com&gt;},
46
+ custom_fields: {&quot;firstName&quot;:&quot;John&quot;,&quot;orderId&quot;:&quot;12345&quot;},
47
47
  track_opens: true,
48
48
  track_clicks: true,
49
- webhook_endpoint: https://webhook.example.com/webhook
49
+ webhook_endpoint: https://piedpiper.com/webhooks/email
50
50
  )
51
51
  ```
52
52