apimatic-apollo-sdk 0.0.1

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 (416) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +179 -0
  4. data/bin/console +15 -0
  5. data/lib/apollo_rest_api/api_helper.rb +10 -0
  6. data/lib/apollo_rest_api/apis/accounts_api.rb +400 -0
  7. data/lib/apollo_rest_api/apis/analytics_api.rb +65 -0
  8. data/lib/apollo_rest_api/apis/api.rb +45 -0
  9. data/lib/apollo_rest_api/apis/base_api.rb +67 -0
  10. data/lib/apollo_rest_api/apis/calls_api.rb +354 -0
  11. data/lib/apollo_rest_api/apis/contacts_api.rb +478 -0
  12. data/lib/apollo_rest_api/apis/conversations_api.rb +157 -0
  13. data/lib/apollo_rest_api/apis/deals_api.rb +253 -0
  14. data/lib/apollo_rest_api/apis/emailer_messages_api.rb +160 -0
  15. data/lib/apollo_rest_api/apis/enrichment_api.rb +447 -0
  16. data/lib/apollo_rest_api/apis/miscellaneous_api.rb +610 -0
  17. data/lib/apollo_rest_api/apis/search_api.rb +675 -0
  18. data/lib/apollo_rest_api/apis/sequences_api.rb +774 -0
  19. data/lib/apollo_rest_api/apis/tasks_api.rb +397 -0
  20. data/lib/apollo_rest_api/client.rb +147 -0
  21. data/lib/apollo_rest_api/configuration.rb +170 -0
  22. data/lib/apollo_rest_api/exceptions/account_stages429_error_exception.rb +46 -0
  23. data/lib/apollo_rest_api/exceptions/accounts422_error_exception.rb +46 -0
  24. data/lib/apollo_rest_api/exceptions/accounts429_error_exception.rb +46 -0
  25. data/lib/apollo_rest_api/exceptions/accounts_bulk_create422_error_exception.rb +46 -0
  26. data/lib/apollo_rest_api/exceptions/accounts_bulk_create429_error_exception.rb +46 -0
  27. data/lib/apollo_rest_api/exceptions/accounts_bulk_create500_error_exception.rb +46 -0
  28. data/lib/apollo_rest_api/exceptions/accounts_bulk_update422_error_exception.rb +46 -0
  29. data/lib/apollo_rest_api/exceptions/accounts_bulk_update429_error_exception.rb +46 -0
  30. data/lib/apollo_rest_api/exceptions/accounts_search403_error_exception.rb +46 -0
  31. data/lib/apollo_rest_api/exceptions/accounts_search429_error_exception.rb +46 -0
  32. data/lib/apollo_rest_api/exceptions/accounts_update_owners429_error_exception.rb +46 -0
  33. data/lib/apollo_rest_api/exceptions/api_exception.rb +21 -0
  34. data/lib/apollo_rest_api/exceptions/contact_stages429_error_exception.rb +46 -0
  35. data/lib/apollo_rest_api/exceptions/contacts422_error_exception.rb +46 -0
  36. data/lib/apollo_rest_api/exceptions/contacts429_error_exception.rb +46 -0
  37. data/lib/apollo_rest_api/exceptions/contacts_bulk_create422_error_exception.rb +46 -0
  38. data/lib/apollo_rest_api/exceptions/contacts_bulk_create429_error_exception.rb +46 -0
  39. data/lib/apollo_rest_api/exceptions/contacts_bulk_create500_error_exception.rb +46 -0
  40. data/lib/apollo_rest_api/exceptions/contacts_bulk_update422_error_exception.rb +51 -0
  41. data/lib/apollo_rest_api/exceptions/contacts_bulk_update429_error_exception.rb +46 -0
  42. data/lib/apollo_rest_api/exceptions/contacts_opportunities429_error_exception.rb +46 -0
  43. data/lib/apollo_rest_api/exceptions/contacts_search403_error_exception.rb +46 -0
  44. data/lib/apollo_rest_api/exceptions/contacts_search429_error_exception.rb +46 -0
  45. data/lib/apollo_rest_api/exceptions/contacts_update_owners422_error_exception.rb +46 -0
  46. data/lib/apollo_rest_api/exceptions/contacts_update_owners429_error_exception.rb +46 -0
  47. data/lib/apollo_rest_api/exceptions/contacts_update_stages422_error_exception.rb +46 -0
  48. data/lib/apollo_rest_api/exceptions/contacts_update_stages429_error_exception.rb +46 -0
  49. data/lib/apollo_rest_api/exceptions/conversations404_error_exception.rb +46 -0
  50. data/lib/apollo_rest_api/exceptions/conversations422_error_exception.rb +46 -0
  51. data/lib/apollo_rest_api/exceptions/conversations_export404_error_exception.rb +46 -0
  52. data/lib/apollo_rest_api/exceptions/conversations_export422_error_exception.rb +46 -0
  53. data/lib/apollo_rest_api/exceptions/conversations_search403_error_exception.rb +46 -0
  54. data/lib/apollo_rest_api/exceptions/email_accounts429_error_exception.rb +46 -0
  55. data/lib/apollo_rest_api/exceptions/emailer_campaigns_abort422_error_exception.rb +46 -0
  56. data/lib/apollo_rest_api/exceptions/emailer_campaigns_abort429_error_exception.rb +46 -0
  57. data/lib/apollo_rest_api/exceptions/emailer_campaigns_add_contact_ids429_error_exception.rb +46 -0
  58. data/lib/apollo_rest_api/exceptions/emailer_campaigns_approve422_error_exception.rb +46 -0
  59. data/lib/apollo_rest_api/exceptions/emailer_campaigns_approve429_error_exception.rb +46 -0
  60. data/lib/apollo_rest_api/exceptions/emailer_campaigns_archive429_error_exception.rb +46 -0
  61. data/lib/apollo_rest_api/exceptions/emailer_campaigns_remove_or_stop_contact_ids429_error_exception.rb +46 -0
  62. data/lib/apollo_rest_api/exceptions/emailer_campaigns_search429_error_exception.rb +46 -0
  63. data/lib/apollo_rest_api/exceptions/emailer_messages429_error_exception.rb +46 -0
  64. data/lib/apollo_rest_api/exceptions/emailer_messages_email_send_status404_error_exception.rb +46 -0
  65. data/lib/apollo_rest_api/exceptions/emailer_messages_email_send_status422_error_exception.rb +46 -0
  66. data/lib/apollo_rest_api/exceptions/emailer_messages_email_send_status429_error_exception.rb +46 -0
  67. data/lib/apollo_rest_api/exceptions/emailer_messages_search422_error_exception.rb +46 -0
  68. data/lib/apollo_rest_api/exceptions/emailer_messages_search429_error_exception.rb +46 -0
  69. data/lib/apollo_rest_api/exceptions/emailer_messages_send_now429_error_exception.rb +46 -0
  70. data/lib/apollo_rest_api/exceptions/emailer_schedules429_error_exception.rb +46 -0
  71. data/lib/apollo_rest_api/exceptions/fields429_error_exception.rb +46 -0
  72. data/lib/apollo_rest_api/exceptions/labels404_error_exception.rb +51 -0
  73. data/lib/apollo_rest_api/exceptions/labels422_error_exception.rb +53 -0
  74. data/lib/apollo_rest_api/exceptions/labels429_error_exception.rb +46 -0
  75. data/lib/apollo_rest_api/exceptions/labels_add_entity_ids_to_label_names422_error_exception.rb +46 -0
  76. data/lib/apollo_rest_api/exceptions/labels_add_entity_ids_to_label_names429_error_exception.rb +46 -0
  77. data/lib/apollo_rest_api/exceptions/labels_remove_entity_ids_from_label_names422_error_exception.rb +46 -0
  78. data/lib/apollo_rest_api/exceptions/labels_remove_entity_ids_from_label_names429_error_exception.rb +46 -0
  79. data/lib/apollo_rest_api/exceptions/mixed_companies_search403_error_exception.rb +46 -0
  80. data/lib/apollo_rest_api/exceptions/mixed_companies_search429_error_exception.rb +46 -0
  81. data/lib/apollo_rest_api/exceptions/mixed_people_api_search422_error_exception.rb +46 -0
  82. data/lib/apollo_rest_api/exceptions/mixed_people_api_search429_error_exception.rb +46 -0
  83. data/lib/apollo_rest_api/exceptions/need_master_api_key_exception.rb +51 -0
  84. data/lib/apollo_rest_api/exceptions/notes400_error_exception.rb +46 -0
  85. data/lib/apollo_rest_api/exceptions/opportunities404_error_exception.rb +51 -0
  86. data/lib/apollo_rest_api/exceptions/opportunities422_error_exception.rb +46 -0
  87. data/lib/apollo_rest_api/exceptions/opportunities429_error_exception.rb +46 -0
  88. data/lib/apollo_rest_api/exceptions/opportunities_search429_error_exception.rb +46 -0
  89. data/lib/apollo_rest_api/exceptions/opportunity_stages429_error_exception.rb +46 -0
  90. data/lib/apollo_rest_api/exceptions/organizations_bulk_enrich400_error_exception.rb +58 -0
  91. data/lib/apollo_rest_api/exceptions/organizations_bulk_enrich429_error_exception.rb +46 -0
  92. data/lib/apollo_rest_api/exceptions/organizations_enrich422_error_exception.rb +46 -0
  93. data/lib/apollo_rest_api/exceptions/organizations_enrich429_error_exception.rb +46 -0
  94. data/lib/apollo_rest_api/exceptions/organizations_job_postings422_error_exception.rb +46 -0
  95. data/lib/apollo_rest_api/exceptions/organizations_job_postings429_error_exception.rb +46 -0
  96. data/lib/apollo_rest_api/exceptions/people_bulk_match429_error_exception.rb +46 -0
  97. data/lib/apollo_rest_api/exceptions/people_match429_error_exception.rb +46 -0
  98. data/lib/apollo_rest_api/exceptions/reports_sync_report400_error_exception.rb +46 -0
  99. data/lib/apollo_rest_api/exceptions/reports_sync_report429_error_exception.rb +46 -0
  100. data/lib/apollo_rest_api/exceptions/sequences404_error_exception.rb +46 -0
  101. data/lib/apollo_rest_api/exceptions/sequences422_error_exception.rb +46 -0
  102. data/lib/apollo_rest_api/exceptions/sequences429_error_exception.rb +46 -0
  103. data/lib/apollo_rest_api/exceptions/tasks401_error_exception.rb +46 -0
  104. data/lib/apollo_rest_api/exceptions/tasks422_error_exception.rb +46 -0
  105. data/lib/apollo_rest_api/exceptions/tasks429_error_exception.rb +46 -0
  106. data/lib/apollo_rest_api/exceptions/tasks_bulk_create422_error_exception.rb +46 -0
  107. data/lib/apollo_rest_api/exceptions/tasks_bulk_create429_error_exception.rb +46 -0
  108. data/lib/apollo_rest_api/exceptions/tasks_complete422_error_exception.rb +46 -0
  109. data/lib/apollo_rest_api/exceptions/tasks_complete429_error_exception.rb +46 -0
  110. data/lib/apollo_rest_api/exceptions/tasks_search429_error_exception.rb +46 -0
  111. data/lib/apollo_rest_api/exceptions/tasks_skip422_error_exception.rb +46 -0
  112. data/lib/apollo_rest_api/exceptions/tasks_skip429_error_exception.rb +46 -0
  113. data/lib/apollo_rest_api/exceptions/typed_custom_fields429_error_exception.rb +46 -0
  114. data/lib/apollo_rest_api/exceptions/users_search429_error_exception.rb +46 -0
  115. data/lib/apollo_rest_api/exceptions/webhook_result404_error_exception.rb +55 -0
  116. data/lib/apollo_rest_api/http/api_response.rb +19 -0
  117. data/lib/apollo_rest_api/http/auth/api_key.rb +52 -0
  118. data/lib/apollo_rest_api/http/auth/bearer_auth.rb +53 -0
  119. data/lib/apollo_rest_api/http/http_call_back.rb +10 -0
  120. data/lib/apollo_rest_api/http/http_method_enum.rb +10 -0
  121. data/lib/apollo_rest_api/http/http_request.rb +10 -0
  122. data/lib/apollo_rest_api/http/http_response.rb +10 -0
  123. data/lib/apollo_rest_api/http/proxy_settings.rb +22 -0
  124. data/lib/apollo_rest_api/logging/configuration/api_logging_configuration.rb +186 -0
  125. data/lib/apollo_rest_api/logging/sdk_logger.rb +17 -0
  126. data/lib/apollo_rest_api/models/account.rb +551 -0
  127. data/lib/apollo_rest_api/models/account1.rb +420 -0
  128. data/lib/apollo_rest_api/models/account10.rb +595 -0
  129. data/lib/apollo_rest_api/models/account12.rb +424 -0
  130. data/lib/apollo_rest_api/models/account14.rb +247 -0
  131. data/lib/apollo_rest_api/models/account2.rb +420 -0
  132. data/lib/apollo_rest_api/models/account22.rb +85 -0
  133. data/lib/apollo_rest_api/models/account3.rb +420 -0
  134. data/lib/apollo_rest_api/models/account4.rb +474 -0
  135. data/lib/apollo_rest_api/models/account5.rb +238 -0
  136. data/lib/apollo_rest_api/models/account6.rb +86 -0
  137. data/lib/apollo_rest_api/models/account7.rb +95 -0
  138. data/lib/apollo_rest_api/models/account8.rb +434 -0
  139. data/lib/apollo_rest_api/models/account9.rb +540 -0
  140. data/lib/apollo_rest_api/models/account_attribute.rb +116 -0
  141. data/lib/apollo_rest_api/models/account_rule_config_status.rb +138 -0
  142. data/lib/apollo_rest_api/models/account_stage.rb +151 -0
  143. data/lib/apollo_rest_api/models/account_stages_response.rb +85 -0
  144. data/lib/apollo_rest_api/models/accounts_bulk_create_request.rb +108 -0
  145. data/lib/apollo_rest_api/models/accounts_bulk_create_response.rb +105 -0
  146. data/lib/apollo_rest_api/models/accounts_bulk_update_request.rb +139 -0
  147. data/lib/apollo_rest_api/models/accounts_bulk_update_response.rb +84 -0
  148. data/lib/apollo_rest_api/models/accounts_request.rb +183 -0
  149. data/lib/apollo_rest_api/models/accounts_request1.rb +183 -0
  150. data/lib/apollo_rest_api/models/accounts_response.rb +75 -0
  151. data/lib/apollo_rest_api/models/accounts_response1.rb +85 -0
  152. data/lib/apollo_rest_api/models/accounts_search_request.rb +167 -0
  153. data/lib/apollo_rest_api/models/accounts_search_response.rb +168 -0
  154. data/lib/apollo_rest_api/models/accounts_update_owners_response.rb +84 -0
  155. data/lib/apollo_rest_api/models/active.rb +26 -0
  156. data/lib/apollo_rest_api/models/assistant_setting.rb +397 -0
  157. data/lib/apollo_rest_api/models/audio_recording.rb +74 -0
  158. data/lib/apollo_rest_api/models/base_model.rb +110 -0
  159. data/lib/apollo_rest_api/models/bounced.rb +26 -0
  160. data/lib/apollo_rest_api/models/breadcrumb.rb +107 -0
  161. data/lib/apollo_rest_api/models/check_apollo_pricing_plan.rb +75 -0
  162. data/lib/apollo_rest_api/models/check_the_account_id.rb +75 -0
  163. data/lib/apollo_rest_api/models/check_the_contact_stage_id.rb +75 -0
  164. data/lib/apollo_rest_api/models/contact.rb +809 -0
  165. data/lib/apollo_rest_api/models/contact1.rb +921 -0
  166. data/lib/apollo_rest_api/models/contact10.rb +465 -0
  167. data/lib/apollo_rest_api/models/contact11.rb +250 -0
  168. data/lib/apollo_rest_api/models/contact14.rb +248 -0
  169. data/lib/apollo_rest_api/models/contact15.rb +166 -0
  170. data/lib/apollo_rest_api/models/contact2.rb +884 -0
  171. data/lib/apollo_rest_api/models/contact3.rb +239 -0
  172. data/lib/apollo_rest_api/models/contact4.rb +105 -0
  173. data/lib/apollo_rest_api/models/contact5.rb +893 -0
  174. data/lib/apollo_rest_api/models/contact6.rb +839 -0
  175. data/lib/apollo_rest_api/models/contact7.rb +95 -0
  176. data/lib/apollo_rest_api/models/contact8.rb +375 -0
  177. data/lib/apollo_rest_api/models/contact9.rb +198 -0
  178. data/lib/apollo_rest_api/models/contact_attribute.rb +179 -0
  179. data/lib/apollo_rest_api/models/contact_campaign_status.rb +336 -0
  180. data/lib/apollo_rest_api/models/contact_campaign_status2.rb +163 -0
  181. data/lib/apollo_rest_api/models/contact_email.rb +167 -0
  182. data/lib/apollo_rest_api/models/contact_email1.rb +85 -0
  183. data/lib/apollo_rest_api/models/contact_email2.rb +148 -0
  184. data/lib/apollo_rest_api/models/contact_statuses.rb +132 -0
  185. data/lib/apollo_rest_api/models/contacts_bulk_create_request.rb +121 -0
  186. data/lib/apollo_rest_api/models/contacts_bulk_create_response.rb +106 -0
  187. data/lib/apollo_rest_api/models/contacts_bulk_update_request.rb +224 -0
  188. data/lib/apollo_rest_api/models/contacts_bulk_update_response.rb +94 -0
  189. data/lib/apollo_rest_api/models/contacts_bulk_update_response1.rb +87 -0
  190. data/lib/apollo_rest_api/models/contacts_opportunities_response.rb +85 -0
  191. data/lib/apollo_rest_api/models/contacts_request.rb +269 -0
  192. data/lib/apollo_rest_api/models/contacts_request1.rb +253 -0
  193. data/lib/apollo_rest_api/models/contacts_response.rb +94 -0
  194. data/lib/apollo_rest_api/models/contacts_response1.rb +94 -0
  195. data/lib/apollo_rest_api/models/contacts_response2.rb +75 -0
  196. data/lib/apollo_rest_api/models/contacts_search_request.rb +166 -0
  197. data/lib/apollo_rest_api/models/contacts_search_response.rb +168 -0
  198. data/lib/apollo_rest_api/models/contacts_update_owners_response.rb +84 -0
  199. data/lib/apollo_rest_api/models/contacts_update_stages_response.rb +84 -0
  200. data/lib/apollo_rest_api/models/conversation.rb +284 -0
  201. data/lib/apollo_rest_api/models/conversation_type.rb +36 -0
  202. data/lib/apollo_rest_api/models/conversation_type2.rb +36 -0
  203. data/lib/apollo_rest_api/models/conversations_export_request.rb +94 -0
  204. data/lib/apollo_rest_api/models/conversations_export_response.rb +86 -0
  205. data/lib/apollo_rest_api/models/conversations_export_response1.rb +76 -0
  206. data/lib/apollo_rest_api/models/conversations_response.rb +333 -0
  207. data/lib/apollo_rest_api/models/conversations_search_request.rb +207 -0
  208. data/lib/apollo_rest_api/models/conversations_search_response.rb +130 -0
  209. data/lib/apollo_rest_api/models/counts.rb +115 -0
  210. data/lib/apollo_rest_api/models/created_account.rb +174 -0
  211. data/lib/apollo_rest_api/models/created_contact.rb +195 -0
  212. data/lib/apollo_rest_api/models/creation_type.rb +41 -0
  213. data/lib/apollo_rest_api/models/currency.rb +95 -0
  214. data/lib/apollo_rest_api/models/current_technology.rb +95 -0
  215. data/lib/apollo_rest_api/models/date_range.rb +84 -0
  216. data/lib/apollo_rest_api/models/date_range1.rb +87 -0
  217. data/lib/apollo_rest_api/models/deal.rb +107 -0
  218. data/lib/apollo_rest_api/models/deliverability_score.rb +460 -0
  219. data/lib/apollo_rest_api/models/departmental_head_count.rb +260 -0
  220. data/lib/apollo_rest_api/models/detail.rb +173 -0
  221. data/lib/apollo_rest_api/models/detail1.rb +109 -0
  222. data/lib/apollo_rest_api/models/email_account.rb +616 -0
  223. data/lib/apollo_rest_api/models/email_accounts_response.rb +85 -0
  224. data/lib/apollo_rest_api/models/emailer_campaign.rb +722 -0
  225. data/lib/apollo_rest_api/models/emailer_campaign1.rb +359 -0
  226. data/lib/apollo_rest_api/models/emailer_campaign2.rb +158 -0
  227. data/lib/apollo_rest_api/models/emailer_campaign3.rb +95 -0
  228. data/lib/apollo_rest_api/models/emailer_campaign4.rb +96 -0
  229. data/lib/apollo_rest_api/models/emailer_campaign6.rb +105 -0
  230. data/lib/apollo_rest_api/models/emailer_campaigns_abort_response.rb +96 -0
  231. data/lib/apollo_rest_api/models/emailer_campaigns_add_contact_ids_response.rb +164 -0
  232. data/lib/apollo_rest_api/models/emailer_campaigns_approve_response.rb +96 -0
  233. data/lib/apollo_rest_api/models/emailer_campaigns_archive_response.rb +77 -0
  234. data/lib/apollo_rest_api/models/emailer_campaigns_remove_or_stop_contact_ids_response.rb +77 -0
  235. data/lib/apollo_rest_api/models/emailer_campaigns_search_response.rb +125 -0
  236. data/lib/apollo_rest_api/models/emailer_message.rb +676 -0
  237. data/lib/apollo_rest_api/models/emailer_message1.rb +410 -0
  238. data/lib/apollo_rest_api/models/emailer_messages_email_send_status_request.rb +74 -0
  239. data/lib/apollo_rest_api/models/emailer_messages_email_send_status_response.rb +166 -0
  240. data/lib/apollo_rest_api/models/emailer_messages_request.rb +197 -0
  241. data/lib/apollo_rest_api/models/emailer_messages_response.rb +77 -0
  242. data/lib/apollo_rest_api/models/emailer_messages_send_now_request.rb +76 -0
  243. data/lib/apollo_rest_api/models/emailer_messages_send_now_response.rb +77 -0
  244. data/lib/apollo_rest_api/models/emailer_schedule.rb +154 -0
  245. data/lib/apollo_rest_api/models/emailer_schedules_response.rb +85 -0
  246. data/lib/apollo_rest_api/models/emailer_step.rb +206 -0
  247. data/lib/apollo_rest_api/models/emailer_step1.rb +189 -0
  248. data/lib/apollo_rest_api/models/emailer_step2.rb +126 -0
  249. data/lib/apollo_rest_api/models/emailer_step3.rb +148 -0
  250. data/lib/apollo_rest_api/models/emailer_step4.rb +85 -0
  251. data/lib/apollo_rest_api/models/emailer_step5.rb +128 -0
  252. data/lib/apollo_rest_api/models/emailer_template.rb +100 -0
  253. data/lib/apollo_rest_api/models/emailer_template1.rb +95 -0
  254. data/lib/apollo_rest_api/models/emailer_template2.rb +85 -0
  255. data/lib/apollo_rest_api/models/emailer_touch.rb +254 -0
  256. data/lib/apollo_rest_api/models/emailer_touch1.rb +128 -0
  257. data/lib/apollo_rest_api/models/emailer_touch2.rb +117 -0
  258. data/lib/apollo_rest_api/models/emailer_touch3.rb +139 -0
  259. data/lib/apollo_rest_api/models/emailer_touch4.rb +85 -0
  260. data/lib/apollo_rest_api/models/employment_history.rb +238 -0
  261. data/lib/apollo_rest_api/models/entity_progress_job.rb +153 -0
  262. data/lib/apollo_rest_api/models/entity_progress_job1.rb +135 -0
  263. data/lib/apollo_rest_api/models/entity_progress_job2.rb +141 -0
  264. data/lib/apollo_rest_api/models/error_details.rb +95 -0
  265. data/lib/apollo_rest_api/models/existing_account.rb +152 -0
  266. data/lib/apollo_rest_api/models/existing_contact.rb +171 -0
  267. data/lib/apollo_rest_api/models/faceting.rb +523 -0
  268. data/lib/apollo_rest_api/models/failure_reason.rb +44 -0
  269. data/lib/apollo_rest_api/models/field.rb +181 -0
  270. data/lib/apollo_rest_api/models/fields_request.rb +105 -0
  271. data/lib/apollo_rest_api/models/fields_response.rb +84 -0
  272. data/lib/apollo_rest_api/models/fields_response1.rb +85 -0
  273. data/lib/apollo_rest_api/models/filters.rb +165 -0
  274. data/lib/apollo_rest_api/models/finished.rb +26 -0
  275. data/lib/apollo_rest_api/models/funding_event.rb +134 -0
  276. data/lib/apollo_rest_api/models/generation_option.rb +107 -0
  277. data/lib/apollo_rest_api/models/generation_tone.rb +86 -0
  278. data/lib/apollo_rest_api/models/group_by.rb +84 -0
  279. data/lib/apollo_rest_api/models/industry_tag_hash.rb +83 -0
  280. data/lib/apollo_rest_api/models/label.rb +135 -0
  281. data/lib/apollo_rest_api/models/label2.rb +147 -0
  282. data/lib/apollo_rest_api/models/labels_add_entity_ids_to_label_names_request.rb +113 -0
  283. data/lib/apollo_rest_api/models/labels_add_entity_ids_to_label_names_response.rb +107 -0
  284. data/lib/apollo_rest_api/models/labels_remove_entity_ids_from_label_names_request.rb +113 -0
  285. data/lib/apollo_rest_api/models/labels_remove_entity_ids_from_label_names_response.rb +107 -0
  286. data/lib/apollo_rest_api/models/labels_request.rb +97 -0
  287. data/lib/apollo_rest_api/models/labels_request1.rb +87 -0
  288. data/lib/apollo_rest_api/models/labels_response.rb +201 -0
  289. data/lib/apollo_rest_api/models/labels_response1.rb +75 -0
  290. data/lib/apollo_rest_api/models/match.rb +393 -0
  291. data/lib/apollo_rest_api/models/meta.rb +76 -0
  292. data/lib/apollo_rest_api/models/metric.rb +117 -0
  293. data/lib/apollo_rest_api/models/metric1.rb +100 -0
  294. data/lib/apollo_rest_api/models/mixed_companies_search_response.rb +199 -0
  295. data/lib/apollo_rest_api/models/mixed_people_api_search_response.rb +95 -0
  296. data/lib/apollo_rest_api/models/modality.rb +37 -0
  297. data/lib/apollo_rest_api/models/modality1.rb +37 -0
  298. data/lib/apollo_rest_api/models/modality3.rb +40 -0
  299. data/lib/apollo_rest_api/models/note.rb +260 -0
  300. data/lib/apollo_rest_api/models/notes_response.rb +84 -0
  301. data/lib/apollo_rest_api/models/opportunities_request.rb +175 -0
  302. data/lib/apollo_rest_api/models/opportunities_request1.rb +164 -0
  303. data/lib/apollo_rest_api/models/opportunities_response.rb +76 -0
  304. data/lib/apollo_rest_api/models/opportunities_response1.rb +76 -0
  305. data/lib/apollo_rest_api/models/opportunities_response2.rb +76 -0
  306. data/lib/apollo_rest_api/models/opportunities_search_response.rb +170 -0
  307. data/lib/apollo_rest_api/models/opportunity.rb +602 -0
  308. data/lib/apollo_rest_api/models/opportunity1.rb +574 -0
  309. data/lib/apollo_rest_api/models/opportunity11.rb +217 -0
  310. data/lib/apollo_rest_api/models/opportunity2.rb +583 -0
  311. data/lib/apollo_rest_api/models/opportunity3.rb +594 -0
  312. data/lib/apollo_rest_api/models/opportunity4.rb +574 -0
  313. data/lib/apollo_rest_api/models/opportunity5.rb +591 -0
  314. data/lib/apollo_rest_api/models/opportunity_contact_role.rb +95 -0
  315. data/lib/apollo_rest_api/models/opportunity_contact_role1.rb +135 -0
  316. data/lib/apollo_rest_api/models/opportunity_stage.rb +210 -0
  317. data/lib/apollo_rest_api/models/opportunity_stages_response.rb +85 -0
  318. data/lib/apollo_rest_api/models/organization.rb +659 -0
  319. data/lib/apollo_rest_api/models/organization1.rb +422 -0
  320. data/lib/apollo_rest_api/models/organization2.rb +752 -0
  321. data/lib/apollo_rest_api/models/organization3.rb +600 -0
  322. data/lib/apollo_rest_api/models/organization4.rb +162 -0
  323. data/lib/apollo_rest_api/models/organization5.rb +336 -0
  324. data/lib/apollo_rest_api/models/organization6.rb +264 -0
  325. data/lib/apollo_rest_api/models/organization7.rb +88 -0
  326. data/lib/apollo_rest_api/models/organization_job_posting.rb +144 -0
  327. data/lib/apollo_rest_api/models/organizations_bulk_enrich_request.rb +89 -0
  328. data/lib/apollo_rest_api/models/organizations_bulk_enrich_response.rb +194 -0
  329. data/lib/apollo_rest_api/models/organizations_enrich_response.rb +76 -0
  330. data/lib/apollo_rest_api/models/organizations_job_postings_response.rb +88 -0
  331. data/lib/apollo_rest_api/models/pagination.rb +105 -0
  332. data/lib/apollo_rest_api/models/pagination6.rb +105 -0
  333. data/lib/apollo_rest_api/models/params.rb +116 -0
  334. data/lib/apollo_rest_api/models/participants.rb +85 -0
  335. data/lib/apollo_rest_api/models/paused.rb +26 -0
  336. data/lib/apollo_rest_api/models/people_bulk_match_request.rb +83 -0
  337. data/lib/apollo_rest_api/models/people_bulk_match_response.rb +180 -0
  338. data/lib/apollo_rest_api/models/people_match_response.rb +87 -0
  339. data/lib/apollo_rest_api/models/person.rb +393 -0
  340. data/lib/apollo_rest_api/models/person1.rb +196 -0
  341. data/lib/apollo_rest_api/models/phone_call.rb +131 -0
  342. data/lib/apollo_rest_api/models/phone_number.rb +149 -0
  343. data/lib/apollo_rest_api/models/phone_number1.rb +149 -0
  344. data/lib/apollo_rest_api/models/phone_number3.rb +97 -0
  345. data/lib/apollo_rest_api/models/phone_number4.rb +85 -0
  346. data/lib/apollo_rest_api/models/phone_number5.rb +127 -0
  347. data/lib/apollo_rest_api/models/pivot_group_by.rb +85 -0
  348. data/lib/apollo_rest_api/models/primary_phone.rb +96 -0
  349. data/lib/apollo_rest_api/models/priority.rb +40 -0
  350. data/lib/apollo_rest_api/models/recipient.rb +100 -0
  351. data/lib/apollo_rest_api/models/recipient1.rb +116 -0
  352. data/lib/apollo_rest_api/models/reports_sync_report_request.rb +253 -0
  353. data/lib/apollo_rest_api/models/reports_sync_report_response.rb +102 -0
  354. data/lib/apollo_rest_api/models/request_type.rb +40 -0
  355. data/lib/apollo_rest_api/models/response.rb +118 -0
  356. data/lib/apollo_rest_api/models/role.rb +112 -0
  357. data/lib/apollo_rest_api/models/send_from.rb +116 -0
  358. data/lib/apollo_rest_api/models/sequences_request.rb +391 -0
  359. data/lib/apollo_rest_api/models/sequences_request1.rb +206 -0
  360. data/lib/apollo_rest_api/models/sequences_response.rb +148 -0
  361. data/lib/apollo_rest_api/models/sequences_response1.rb +203 -0
  362. data/lib/apollo_rest_api/models/sharing_access.rb +148 -0
  363. data/lib/apollo_rest_api/models/sharing_permission.rb +154 -0
  364. data/lib/apollo_rest_api/models/skipped_contact_ids.rb +77 -0
  365. data/lib/apollo_rest_api/models/smart_datetime_range.rb +86 -0
  366. data/lib/apollo_rest_api/models/sort.rb +85 -0
  367. data/lib/apollo_rest_api/models/sort_by_field.rb +43 -0
  368. data/lib/apollo_rest_api/models/sort_by_field1.rb +36 -0
  369. data/lib/apollo_rest_api/models/sort_direction.rb +36 -0
  370. data/lib/apollo_rest_api/models/source.rb +40 -0
  371. data/lib/apollo_rest_api/models/status.rb +44 -0
  372. data/lib/apollo_rest_api/models/status2.rb +36 -0
  373. data/lib/apollo_rest_api/models/status3.rb +40 -0
  374. data/lib/apollo_rest_api/models/status4.rb +37 -0
  375. data/lib/apollo_rest_api/models/step.rb +127 -0
  376. data/lib/apollo_rest_api/models/task.rb +394 -0
  377. data/lib/apollo_rest_api/models/task2.rb +536 -0
  378. data/lib/apollo_rest_api/models/task4.rb +524 -0
  379. data/lib/apollo_rest_api/models/task5.rb +104 -0
  380. data/lib/apollo_rest_api/models/task_type.rb +95 -0
  381. data/lib/apollo_rest_api/models/tasks_bulk_create_request.rb +173 -0
  382. data/lib/apollo_rest_api/models/tasks_bulk_create_response.rb +94 -0
  383. data/lib/apollo_rest_api/models/tasks_complete_request.rb +75 -0
  384. data/lib/apollo_rest_api/models/tasks_complete_response.rb +86 -0
  385. data/lib/apollo_rest_api/models/tasks_request.rb +183 -0
  386. data/lib/apollo_rest_api/models/tasks_request1.rb +227 -0
  387. data/lib/apollo_rest_api/models/tasks_response.rb +74 -0
  388. data/lib/apollo_rest_api/models/tasks_response1.rb +74 -0
  389. data/lib/apollo_rest_api/models/tasks_search_response.rb +136 -0
  390. data/lib/apollo_rest_api/models/tasks_skip_request.rb +88 -0
  391. data/lib/apollo_rest_api/models/tasks_skip_response.rb +74 -0
  392. data/lib/apollo_rest_api/models/team.rb +87 -0
  393. data/lib/apollo_rest_api/models/total_facet.rb +95 -0
  394. data/lib/apollo_rest_api/models/true_warmup_thresholds.rb +106 -0
  395. data/lib/apollo_rest_api/models/type.rb +44 -0
  396. data/lib/apollo_rest_api/models/type1.rb +36 -0
  397. data/lib/apollo_rest_api/models/type2.rb +52 -0
  398. data/lib/apollo_rest_api/models/typed_custom_fields.rb +111 -0
  399. data/lib/apollo_rest_api/models/typed_custom_fields6.rb +106 -0
  400. data/lib/apollo_rest_api/models/typed_custom_fields7.rb +243 -0
  401. data/lib/apollo_rest_api/models/typed_custom_fields_response.rb +85 -0
  402. data/lib/apollo_rest_api/models/unique_completed.rb +26 -0
  403. data/lib/apollo_rest_api/models/unique_scheduled.rb +26 -0
  404. data/lib/apollo_rest_api/models/unique_skipped.rb +26 -0
  405. data/lib/apollo_rest_api/models/user.rb +1294 -0
  406. data/lib/apollo_rest_api/models/users_api_profile_response.rb +309 -0
  407. data/lib/apollo_rest_api/models/users_search_response.rb +106 -0
  408. data/lib/apollo_rest_api/models/video_recording.rb +95 -0
  409. data/lib/apollo_rest_api/models/wait_mode.rb +40 -0
  410. data/lib/apollo_rest_api/models/webhook_result_response.rb +140 -0
  411. data/lib/apollo_rest_api/models/webhook_status.rb +40 -0
  412. data/lib/apollo_rest_api/utilities/date_time_helper.rb +11 -0
  413. data/lib/apollo_rest_api/utilities/file_wrapper.rb +28 -0
  414. data/lib/apollo_rest_api/utilities/union_type_lookup.rb +128 -0
  415. data/lib/apollo_rest_api.rb +503 -0
  416. metadata +499 -0
@@ -0,0 +1,253 @@
1
+ # apollo_rest_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module ApolloRestApi
7
+ # DealsApi
8
+ class DealsApi < BaseApi
9
+ # This endpoint doesn't consume Apollo credits. Learn more about [API
10
+ # pricing and credits](https://docs.apollo.io/docs/api-pricing).
11
+ # <a
12
+ # href="https://knowledge.apollo.io/hc/en-us/articles/4415062467725-Deals-Ov
13
+ # erview" target="_blank">Deals</a> on Apollo help you track sales
14
+ # opportunities.<br><br>Use the Create Deal endpoint to create new deals for
15
+ # an Apollo account.<br><br>To update existing deals in your Apollo account,
16
+ # use the <a href="https://docs.apollo.io/reference/update-deal">Update Deal
17
+ # endpoint</a> instead.<br><br>This endpoint requires a master API key. If
18
+ # you call the endpoint without a master key, you receive a `403` response.
19
+ # Check out <a href="https://docs.apollo.io/docs/create-api-key">Create an
20
+ # API Key</a> to learn how to create a master key.
21
+ # @param [OpportunitiesRequest] body Required parameter: TODO: type
22
+ # description here
23
+ # @return [ApiResponse] Complete http response with raw body and status code.
24
+ def create_deal(body)
25
+ @api_call
26
+ .request(new_request_builder(HttpMethodEnum::POST,
27
+ '/opportunities',
28
+ Server::DEFAULT)
29
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
30
+ .body_param(new_parameter(body)
31
+ .is_required(true))
32
+ .header_param(new_parameter('application/json', key: 'accept'))
33
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
34
+ .auth(Or.new('bearerAuth', 'apiKey')))
35
+ .response(new_response_handler
36
+ .deserializer(APIHelper.method(:custom_type_deserializer))
37
+ .deserialize_into(OpportunitiesResponse.method(:from_hash))
38
+ .is_api_response(true)
39
+ .local_error('401',
40
+ '401',
41
+ APIException)
42
+ .local_error('403',
43
+ '403',
44
+ NeedMasterApiKeyException)
45
+ .local_error('422',
46
+ '422',
47
+ APIException)
48
+ .local_error('429',
49
+ '429',
50
+ Opportunities429ErrorException))
51
+ .execute
52
+ end
53
+
54
+ # This endpoint doesn't consume Apollo credits. Learn more about [API
55
+ # pricing and credits](https://docs.apollo.io/docs/api-pricing).
56
+ # <a
57
+ # href="https://knowledge.apollo.io/hc/en-us/articles/4415062467725-Deals-Ov
58
+ # erview" target="_blank">Deals</a> on Apollo help you track sales
59
+ # opportunities.<br><br>Use the List All Deals endpoint to retrieve every
60
+ # deal that has been created for your team's Apollo account.<br><br>This
61
+ # endpoint requires a master API key. If you call the endpoint without a
62
+ # master key, you receive a `403` response. Check out <a
63
+ # href="https://docs.apollo.io/docs/create-api-key">Create an API Key</a> to
64
+ # learn how to create a master key.
65
+ # @param [String] sort_by_field Optional parameter: Sort the tasks by 1 of
66
+ # the following options: <ul> <li> `amount`: The largest deal values
67
+ # first. </li> <li> `is_closed`: Deals that have been closed first. </li>
68
+ # <li> `is_won`: Deals that have been won first. </li> </ul>
69
+ # @param [Integer] page Optional parameter: The page number of the Apollo
70
+ # data that you want to retrieve. <br><br>Use this parameter in combination
71
+ # with the `per_page` parameter to make search results for navigable and
72
+ # improve the performance of the endpoint. <br><br>Example: `4`
73
+ # @param [Integer] per_page Optional parameter: The number of search results
74
+ # that should be returned for each page. Limiting the number of results per
75
+ # page improves the endpoint's performance. <br><br>Use the `page` parameter
76
+ # to search the different pages of data. <br><br>Example: `10`
77
+ # @return [ApiResponse] Complete http response with raw body and status code.
78
+ def list_all_deals(sort_by_field: nil,
79
+ page: nil,
80
+ per_page: nil)
81
+ @api_call
82
+ .request(new_request_builder(HttpMethodEnum::GET,
83
+ '/opportunities/search',
84
+ Server::DEFAULT)
85
+ .query_param(new_parameter(sort_by_field, key: 'sort_by_field'))
86
+ .query_param(new_parameter(page, key: 'page'))
87
+ .query_param(new_parameter(per_page, key: 'per_page'))
88
+ .header_param(new_parameter('application/json', key: 'accept'))
89
+ .auth(Or.new('bearerAuth', 'apiKey')))
90
+ .response(new_response_handler
91
+ .deserializer(APIHelper.method(:custom_type_deserializer))
92
+ .deserialize_into(OpportunitiesSearchResponse.method(:from_hash))
93
+ .is_api_response(true)
94
+ .local_error('401',
95
+ '401',
96
+ APIException)
97
+ .local_error('403',
98
+ '403',
99
+ APIException)
100
+ .local_error('429',
101
+ '429',
102
+ OpportunitiesSearch429ErrorException))
103
+ .execute
104
+ end
105
+
106
+ # This endpoint doesn't consume Apollo credits. Learn more about [API
107
+ # pricing and credits](https://docs.apollo.io/docs/api-pricing).
108
+ # <a
109
+ # href="https://knowledge.apollo.io/hc/en-us/articles/4415062467725-Deals-Ov
110
+ # erview" target="_blank">Deals</a> on Apollo help you track sales
111
+ # opportunities.<br><br>Use the View Deal endpoint to retrieve complete
112
+ # details about a deal within your team's Apollo account.<br><br>Deal
113
+ # information can include the ID of the deal owner, the monetary value of
114
+ # the deal, the deal stage, and general details about the
115
+ # account.<br><br>This endpoint requires a master API key. If you call the
116
+ # endpoint without a master key, you receive a `403` response. Check out <a
117
+ # href="https://docs.apollo.io/docs/create-api-key">Create an API Key</a> to
118
+ # learn how to create a master key.
119
+ # @param [String] opportunity_id Required parameter: The ID for the deal you
120
+ # want to view. <br><br>Each deal in the Apollo database is assigned a
121
+ # unique ID. To find deal IDs, call the <a
122
+ # href="https://docs.apollo.io/reference/list-all-deals"
123
+ # target="_blank">List All Deals endpoint</a> and identify the value for
124
+ # `id` for the desired deal. <br><br>Example: `66e09ea8e3cfcf01b2208ec7`
125
+ # @return [ApiResponse] Complete http response with raw body and status code.
126
+ def view_deal(opportunity_id)
127
+ @api_call
128
+ .request(new_request_builder(HttpMethodEnum::GET,
129
+ '/opportunities/{opportunity_id}',
130
+ Server::DEFAULT)
131
+ .template_param(new_parameter(opportunity_id, key: 'opportunity_id')
132
+ .is_required(true)
133
+ .should_encode(true))
134
+ .header_param(new_parameter('application/json', key: 'accept'))
135
+ .auth(Or.new('bearerAuth', 'apiKey')))
136
+ .response(new_response_handler
137
+ .deserializer(APIHelper.method(:custom_type_deserializer))
138
+ .deserialize_into(OpportunitiesResponse1.method(:from_hash))
139
+ .is_api_response(true)
140
+ .local_error('401',
141
+ '401',
142
+ APIException)
143
+ .local_error('403',
144
+ '403',
145
+ NeedMasterApiKeyException)
146
+ .local_error('404',
147
+ '404',
148
+ Opportunities404ErrorException)
149
+ .local_error('422',
150
+ '422',
151
+ APIException)
152
+ .local_error('429',
153
+ '429',
154
+ Opportunities429ErrorException))
155
+ .execute
156
+ end
157
+
158
+ # This endpoint doesn't consume Apollo credits. Learn more about [API
159
+ # pricing and credits](https://docs.apollo.io/docs/api-pricing).
160
+ # <a
161
+ # href="https://knowledge.apollo.io/hc/en-us/articles/4415062467725-Deals-Ov
162
+ # erview" target="_blank">Deals</a> on Apollo help you track sales
163
+ # opportunities.<br><br>Use the Update Deal endpoint to update the details
164
+ # of existing deals within your team's Apollo account.<br><br>To create new
165
+ # deals in your Apollo account, use the <a
166
+ # href="https://docs.apollo.io/reference/create-deal">Create Deal
167
+ # endpoint</a> instead.<br><br>This endpoint requires a master API key. If
168
+ # you call the endpoint without a master key, you receive a `403` response.
169
+ # Check out <a href="https://docs.apollo.io/docs/create-api-key">Create an
170
+ # API Key</a> to learn how to create a master key.
171
+ # @param [String] opportunity_id Required parameter: The ID for the deal you
172
+ # want to update. <br><br>Each deal in the Apollo database is assigned a
173
+ # unique ID. To find deal IDs, call the <a
174
+ # href="https://docs.apollo.io/reference/list-all-deals"
175
+ # target="_blank">List All Deals endpoint</a> and identify the value for
176
+ # `id` for the desired deal. <br><br>Example: `66e09ea8e3cfcf01b2208ec7`
177
+ # @param [OpportunitiesRequest1] body Required parameter: TODO: type
178
+ # description here
179
+ # @return [ApiResponse] Complete http response with raw body and status code.
180
+ def update_deal(opportunity_id,
181
+ body)
182
+ @api_call
183
+ .request(new_request_builder(HttpMethodEnum::PATCH,
184
+ '/opportunities/{opportunity_id}',
185
+ Server::DEFAULT)
186
+ .template_param(new_parameter(opportunity_id, key: 'opportunity_id')
187
+ .is_required(true)
188
+ .should_encode(true))
189
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
190
+ .body_param(new_parameter(body)
191
+ .is_required(true))
192
+ .header_param(new_parameter('application/json', key: 'accept'))
193
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
194
+ .auth(Or.new('bearerAuth', 'apiKey')))
195
+ .response(new_response_handler
196
+ .deserializer(APIHelper.method(:custom_type_deserializer))
197
+ .deserialize_into(OpportunitiesResponse2.method(:from_hash))
198
+ .is_api_response(true)
199
+ .local_error('401',
200
+ '401',
201
+ APIException)
202
+ .local_error('403',
203
+ '403',
204
+ NeedMasterApiKeyException)
205
+ .local_error('422',
206
+ '422',
207
+ Opportunities422ErrorException)
208
+ .local_error('429',
209
+ '429',
210
+ Opportunities429ErrorException))
211
+ .execute
212
+ end
213
+
214
+ # This endpoint doesn't consume Apollo credits. Learn more about [API
215
+ # pricing and credits](https://docs.apollo.io/docs/api-pricing).
216
+ # <a
217
+ # href="https://knowledge.apollo.io/hc/en-us/articles/4415062467725-Deals-Ov
218
+ # erview" target="_blank">Deals</a> on Apollo help you track sales
219
+ # opportunities.<br><br>Use the List Deal Stages endpoint to retrieve
220
+ # information about every deal stage that's available in your team's Apollo
221
+ # account.<br><br>The `id` value for each deal stage can be used to set the
222
+ # stage when <a href="https://docs.apollo.io/reference/create-deal">creating
223
+ # a deal</a> or <a
224
+ # href="https://docs.apollo.io/reference/update-deal">updating a deal</a>
225
+ # via the Apollo API.<br><br>This endpoint requires a master API key. If you
226
+ # call the endpoint without a master key, you receive a `403` response.
227
+ # Check out <a href="https://docs.apollo.io/docs/create-api-key">Create an
228
+ # API Key</a> to learn how to create a master key.
229
+ # @return [ApiResponse] Complete http response with raw body and status code.
230
+ def list_deal_stages
231
+ @api_call
232
+ .request(new_request_builder(HttpMethodEnum::GET,
233
+ '/opportunity_stages',
234
+ Server::DEFAULT)
235
+ .header_param(new_parameter('application/json', key: 'accept'))
236
+ .auth(Or.new('bearerAuth', 'apiKey')))
237
+ .response(new_response_handler
238
+ .deserializer(APIHelper.method(:custom_type_deserializer))
239
+ .deserialize_into(OpportunityStagesResponse.method(:from_hash))
240
+ .is_api_response(true)
241
+ .local_error('401',
242
+ '401',
243
+ APIException)
244
+ .local_error('403',
245
+ '403',
246
+ NeedMasterApiKeyException)
247
+ .local_error('429',
248
+ '429',
249
+ OpportunityStages429ErrorException))
250
+ .execute
251
+ end
252
+ end
253
+ end
@@ -0,0 +1,160 @@
1
+ # apollo_rest_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module ApolloRestApi
7
+ # EmailerMessagesApi
8
+ class EmailerMessagesApi < BaseApi
9
+ # Use the Create an Email Draft endpoint to create a single, unsent email
10
+ # message (an email draft) for a contact. The draft is created with a
11
+ # `drafted` status — this endpoint does not send the email. <br><br>To send
12
+ # the draft after creating it, call the <a
13
+ # href="https://docs.apollo.io/reference/send-email-now"
14
+ # target="_blank">Send Email Now endpoint</a> with the `id` returned in the
15
+ # response. <br><br>You must provide a `contact_id` so Apollo knows who the
16
+ # email is for. Alternatively, to draft a reply within an existing email
17
+ # thread, provide `in_response_to_emailer_message_id` instead and Apollo
18
+ # will infer the contact and recipients from the parent message. <br><br>The
19
+ # email is drafted from the user that owns the API key. That user must have
20
+ # permission to email the contact (i.e. they own the contact or its
21
+ # account), and the contact must not be blocked by your team's Do Not
22
+ # Contact (DNC) enforcement settings. <br><br>This endpoint returns the
23
+ # created `emailer_message` object. If the draft is linked to an outreach
24
+ # task, a `task` object is also returned.
25
+ # @param [EmailerMessagesRequest] body Required parameter: TODO: type
26
+ # description here
27
+ # @return [ApiResponse] Complete http response with raw body and status code.
28
+ def create_an_email_draft(body)
29
+ @api_call
30
+ .request(new_request_builder(HttpMethodEnum::POST,
31
+ '/emailer_messages',
32
+ Server::DEFAULT)
33
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
34
+ .body_param(new_parameter(body)
35
+ .is_required(true))
36
+ .header_param(new_parameter('application/json', key: 'accept'))
37
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
38
+ .auth(Or.new('bearerAuth', 'apiKey')))
39
+ .response(new_response_handler
40
+ .deserializer(APIHelper.method(:custom_type_deserializer))
41
+ .deserialize_into(EmailerMessagesResponse.method(:from_hash))
42
+ .is_api_response(true)
43
+ .local_error('401',
44
+ '401',
45
+ APIException)
46
+ .local_error('422',
47
+ '422',
48
+ NeedMasterApiKeyException)
49
+ .local_error('429',
50
+ '429',
51
+ EmailerMessages429ErrorException))
52
+ .execute
53
+ end
54
+
55
+ # Use the Send Email Now endpoint to immediately send an existing email
56
+ # message. This works for emails that are currently in a `drafted`,
57
+ # `scheduled`, or `failed` state — Apollo schedules the email to be sent
58
+ # right away and processes it asynchronously. <br><br>To first create an
59
+ # email draft, use the <a
60
+ # href="https://docs.apollo.io/reference/create-an-email-draft"
61
+ # target="_blank">Create an Email Draft endpoint</a> and then pass the
62
+ # returned `id` to this endpoint. <br><br>The email is sent from the user
63
+ # that owns the API key. That user must have a linked email account on the
64
+ # message, must have permission to send from that email account, and must
65
+ # have permission to email the contact. The contact must also not be blocked
66
+ # by your team's Do Not Contact (DNC) enforcement settings, and the user
67
+ # must not have exceeded their daily sending limit. <br><br>Because sending
68
+ # is processed asynchronously, a successful `200` response means the email
69
+ # has been queued for sending — not that it has been delivered. To check
70
+ # whether the email was delivered, poll the <a
71
+ # href="https://docs.apollo.io/reference/check-email-send-status"
72
+ # target="_blank">Check Email Send Status endpoint</a> using the message
73
+ # `id`. <br><br>This endpoint returns the `emailer_message` object. If the
74
+ # message is linked to an outreach task, a `task` object is also returned.
75
+ # @param [String] id Required parameter: The Apollo ID of the email message
76
+ # to send. This is the `id` returned when you create an email draft.
77
+ # <br><br>Example: `66e8cc45028aed019c25d724`
78
+ # @param [EmailerMessagesSendNowRequest] body Optional parameter: TODO: type
79
+ # description here
80
+ # @return [ApiResponse] Complete http response with raw body and status code.
81
+ def send_email_now(id,
82
+ body: nil)
83
+ @api_call
84
+ .request(new_request_builder(HttpMethodEnum::POST,
85
+ '/emailer_messages/{id}/send_now',
86
+ Server::DEFAULT)
87
+ .template_param(new_parameter(id, key: 'id')
88
+ .is_required(true)
89
+ .should_encode(true))
90
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
91
+ .body_param(new_parameter(body))
92
+ .header_param(new_parameter('application/json', key: 'accept'))
93
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
94
+ .auth(Or.new('bearerAuth', 'apiKey')))
95
+ .response(new_response_handler
96
+ .deserializer(APIHelper.method(:custom_type_deserializer))
97
+ .deserialize_into(EmailerMessagesSendNowResponse.method(:from_hash))
98
+ .is_api_response(true)
99
+ .local_error('401',
100
+ '401',
101
+ APIException)
102
+ .local_error('422',
103
+ '422',
104
+ NeedMasterApiKeyException)
105
+ .local_error('429',
106
+ '429',
107
+ EmailerMessagesSendNow429ErrorException))
108
+ .execute
109
+ end
110
+
111
+ # Use the Check Email Send Status endpoint to check the current delivery
112
+ # status of an email message. This is typically used after calling the <a
113
+ # href="https://docs.apollo.io/reference/send-email-now"
114
+ # target="_blank">Send Email Now endpoint</a>, since emails are sent
115
+ # asynchronously and a successful send response only means the email was
116
+ # queued. <br><br>You must provide the `id` of the email message. The
117
+ # message must belong to your team, otherwise a `404` is returned.
118
+ # <br><br>The response always includes the message `id`, its current
119
+ # `status`, and a human-readable `message`. The remaining fields depend on
120
+ # the status: <ul> <li> If the email was delivered (`completed`), a
121
+ # `completed_at` timestamp is included. </li> <li> If the email failed
122
+ # (`failed`), a `not_sent_reason`, `failure_reason`, and `failed_at`
123
+ # timestamp may be included. </li> <li> If the email is still being
124
+ # processed (e.g. `drafted` or `scheduled`), a `retry_after_seconds` value
125
+ # is included to indicate how long to wait before checking again. </li>
126
+ # </ul>
127
+ # @param [EmailerMessagesEmailSendStatusRequest] body Required parameter:
128
+ # TODO: type description here
129
+ # @return [ApiResponse] Complete http response with raw body and status code.
130
+ def check_email_send_status(body)
131
+ @api_call
132
+ .request(new_request_builder(HttpMethodEnum::POST,
133
+ '/emailer_messages/email_send_status',
134
+ Server::DEFAULT)
135
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
136
+ .body_param(new_parameter(body)
137
+ .is_required(true))
138
+ .header_param(new_parameter('application/json', key: 'accept'))
139
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
140
+ .auth(Or.new('bearerAuth', 'apiKey')))
141
+ .response(new_response_handler
142
+ .deserializer(APIHelper.method(:custom_type_deserializer))
143
+ .deserialize_into(EmailerMessagesEmailSendStatusResponse.method(:from_hash))
144
+ .is_api_response(true)
145
+ .local_error('401',
146
+ '401',
147
+ APIException)
148
+ .local_error('404',
149
+ '404',
150
+ EmailerMessagesEmailSendStatus404ErrorException)
151
+ .local_error('422',
152
+ '422',
153
+ EmailerMessagesEmailSendStatus422ErrorException)
154
+ .local_error('429',
155
+ '429',
156
+ EmailerMessagesEmailSendStatus429ErrorException))
157
+ .execute
158
+ end
159
+ end
160
+ end