constant_contact_client 1.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 (406) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +56 -0
  3. data/Gemfile +9 -0
  4. data/Gemfile.lock +72 -0
  5. data/LICENSE +29 -0
  6. data/README.md +201 -0
  7. data/Rakefile +10 -0
  8. data/constant_contact_client.gemspec +39 -0
  9. data/docs/AccountServicesApi.md +593 -0
  10. data/docs/BulkActivitiesApi.md +1035 -0
  11. data/docs/ContactListsApi.md +461 -0
  12. data/docs/ContactTagsApi.md +382 -0
  13. data/docs/ContactsApi.md +701 -0
  14. data/docs/ContactsCustomFieldsApi.md +375 -0
  15. data/docs/ContactsReportingApi.md +244 -0
  16. data/docs/EmailCampaignsABTestsApi.md +227 -0
  17. data/docs/EmailCampaignsApi.md +826 -0
  18. data/docs/EmailReportingApi.md +925 -0
  19. data/docs/EmailSchedulingApi.md +447 -0
  20. data/docs/LandingPagesReportingApi.md +481 -0
  21. data/docs/SegmentsApi.md +452 -0
  22. data/lib/constant_contact_client/api/account_services_api.rb +546 -0
  23. data/lib/constant_contact_client/api/bulk_activities_api.rb +983 -0
  24. data/lib/constant_contact_client/api/contact_lists_api.rb +449 -0
  25. data/lib/constant_contact_client/api/contact_tags_api.rb +356 -0
  26. data/lib/constant_contact_client/api/contacts_api.rb +676 -0
  27. data/lib/constant_contact_client/api/contacts_custom_fields_api.rb +356 -0
  28. data/lib/constant_contact_client/api/contacts_reporting_api.rb +255 -0
  29. data/lib/constant_contact_client/api/email_campaigns_ab_tests_api.rb +220 -0
  30. data/lib/constant_contact_client/api/email_campaigns_api.rb +766 -0
  31. data/lib/constant_contact_client/api/email_reporting_api.rb +812 -0
  32. data/lib/constant_contact_client/api/email_scheduling_api.rb +418 -0
  33. data/lib/constant_contact_client/api/landing_pages_reporting_api.rb +436 -0
  34. data/lib/constant_contact_client/api/segments_api.rb +425 -0
  35. data/lib/constant_contact_client/api_client.rb +394 -0
  36. data/lib/constant_contact_client/api_error.rb +58 -0
  37. data/lib/constant_contact_client/configuration.rb +305 -0
  38. data/lib/constant_contact_client/models/ab_test_data.rb +256 -0
  39. data/lib/constant_contact_client/models/access_token_response.rb +265 -0
  40. data/lib/constant_contact_client/models/account_cancellation.rb +226 -0
  41. data/lib/constant_contact_client/models/account_email_create_response.rb +273 -0
  42. data/lib/constant_contact_client/models/account_email_input.rb +234 -0
  43. data/lib/constant_contact_client/models/account_physical_address.rb +409 -0
  44. data/lib/constant_contact_client/models/account_suspension.rb +289 -0
  45. data/lib/constant_contact_client/models/activities.rb +226 -0
  46. data/lib/constant_contact_client/models/activity.rb +316 -0
  47. data/lib/constant_contact_client/models/activity_delete_custom_fields.rb +297 -0
  48. data/lib/constant_contact_client/models/activity_delete_list_response.rb +276 -0
  49. data/lib/constant_contact_client/models/activity_delete_lists_response.rb +305 -0
  50. data/lib/constant_contact_client/models/activity_delete_status.rb +306 -0
  51. data/lib/constant_contact_client/models/activity_errors.rb +215 -0
  52. data/lib/constant_contact_client/models/activity_export_status.rb +306 -0
  53. data/lib/constant_contact_client/models/activity_generic.rb +299 -0
  54. data/lib/constant_contact_client/models/activity_generic_status.rb +225 -0
  55. data/lib/constant_contact_client/models/activity_import.rb +316 -0
  56. data/lib/constant_contact_client/models/activity_links.rb +223 -0
  57. data/lib/constant_contact_client/models/activity_lists_membership.rb +305 -0
  58. data/lib/constant_contact_client/models/activity_reference.rb +225 -0
  59. data/lib/constant_contact_client/models/activity_status.rb +275 -0
  60. data/lib/constant_contact_client/models/activity_status_export_link.rb +223 -0
  61. data/lib/constant_contact_client/models/activity_status_link.rb +214 -0
  62. data/lib/constant_contact_client/models/activity_tagging.rb +319 -0
  63. data/lib/constant_contact_client/models/activity_tagging_status.rb +226 -0
  64. data/lib/constant_contact_client/models/add_account_email_address201_response.rb +273 -0
  65. data/lib/constant_contact_client/models/add_account_email_address_request.rb +234 -0
  66. data/lib/constant_contact_client/models/api_error_schema_inner.rb +225 -0
  67. data/lib/constant_contact_client/models/authorization_error_schema.rb +225 -0
  68. data/lib/constant_contact_client/models/bounces_tracking_activities_page.rb +240 -0
  69. data/lib/constant_contact_client/models/bounces_tracking_activity.rb +347 -0
  70. data/lib/constant_contact_client/models/bulk_email_campaign_summaries_page.rb +249 -0
  71. data/lib/constant_contact_client/models/bulk_email_campaign_summaries_percents.rb +255 -0
  72. data/lib/constant_contact_client/models/bulk_email_campaign_summary.rb +272 -0
  73. data/lib/constant_contact_client/models/campaign_activity_stats_query_result_email.rb +229 -0
  74. data/lib/constant_contact_client/models/campaign_activity_stats_result_generic_stats_email_activity.rb +244 -0
  75. data/lib/constant_contact_client/models/campaign_activity_summary.rb +341 -0
  76. data/lib/constant_contact_client/models/campaign_stats_query_result_email.rb +229 -0
  77. data/lib/constant_contact_client/models/campaign_stats_result_generic_stats_email_percents_email.rb +243 -0
  78. data/lib/constant_contact_client/models/clicks_tracking_activities_page.rb +233 -0
  79. data/lib/constant_contact_client/models/clicks_tracking_activity.rb +364 -0
  80. data/lib/constant_contact_client/models/company_logo.rb +235 -0
  81. data/lib/constant_contact_client/models/contact_campaign_activities_summary.rb +250 -0
  82. data/lib/constant_contact_client/models/contact_create_or_update_input.rb +503 -0
  83. data/lib/constant_contact_client/models/contact_create_or_update_response.rb +225 -0
  84. data/lib/constant_contact_client/models/contact_custom_field.rb +259 -0
  85. data/lib/constant_contact_client/models/contact_delete.rb +267 -0
  86. data/lib/constant_contact_client/models/contact_list.rb +301 -0
  87. data/lib/constant_contact_client/models/contact_list_array.rb +235 -0
  88. data/lib/constant_contact_client/models/contact_list_put_post.rb +291 -0
  89. data/lib/constant_contact_client/models/contact_open_and_click_rates.rb +274 -0
  90. data/lib/constant_contact_client/models/contact_post_request.rb +575 -0
  91. data/lib/constant_contact_client/models/contact_put_request.rb +582 -0
  92. data/lib/constant_contact_client/models/contact_resource.rb +635 -0
  93. data/lib/constant_contact_client/models/contact_tracking_activities_page.rb +227 -0
  94. data/lib/constant_contact_client/models/contact_tracking_activity.rb +270 -0
  95. data/lib/constant_contact_client/models/contact_xref.rb +226 -0
  96. data/lib/constant_contact_client/models/contact_xrefs.rb +236 -0
  97. data/lib/constant_contact_client/models/contacts.rb +246 -0
  98. data/lib/constant_contact_client/models/contacts_counts.rb +265 -0
  99. data/lib/constant_contact_client/models/contacts_export.rb +300 -0
  100. data/lib/constant_contact_client/models/contacts_json_import.rb +281 -0
  101. data/lib/constant_contact_client/models/create_contact_request.rb +575 -0
  102. data/lib/constant_contact_client/models/create_contact_request_email_address.rb +252 -0
  103. data/lib/constant_contact_client/models/create_csv_import_activity201_response.rb +316 -0
  104. data/lib/constant_contact_client/models/create_csv_import_activity201_response_links.rb +214 -0
  105. data/lib/constant_contact_client/models/create_csv_import_activity201_response_status.rb +255 -0
  106. data/lib/constant_contact_client/models/create_delete_activity201_response.rb +306 -0
  107. data/lib/constant_contact_client/models/create_delete_activity201_response_links.rb +214 -0
  108. data/lib/constant_contact_client/models/create_delete_activity201_response_links_self.rb +215 -0
  109. data/lib/constant_contact_client/models/create_delete_activity201_response_status.rb +235 -0
  110. data/lib/constant_contact_client/models/create_delete_activity_request.rb +267 -0
  111. data/lib/constant_contact_client/models/create_email_campaign200_response.rb +306 -0
  112. data/lib/constant_contact_client/models/create_email_campaign200_response_campaign_activities_inner.rb +225 -0
  113. data/lib/constant_contact_client/models/create_email_campaign_request.rb +260 -0
  114. data/lib/constant_contact_client/models/create_email_campaign_request_email_campaign_activities_inner.rb +402 -0
  115. data/lib/constant_contact_client/models/create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer.rb +347 -0
  116. data/lib/constant_contact_client/models/create_export_activity201_response.rb +306 -0
  117. data/lib/constant_contact_client/models/create_export_activity201_response_status.rb +225 -0
  118. data/lib/constant_contact_client/models/create_export_activity_request.rb +300 -0
  119. data/lib/constant_contact_client/models/create_import_json_activity_request.rb +281 -0
  120. data/lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb +1315 -0
  121. data/lib/constant_contact_client/models/create_list_add_activity_request.rb +268 -0
  122. data/lib/constant_contact_client/models/create_list_add_activity_request_exclude.rb +217 -0
  123. data/lib/constant_contact_client/models/create_list_add_activity_request_source.rb +331 -0
  124. data/lib/constant_contact_client/models/create_list_delete_activity201_response.rb +305 -0
  125. data/lib/constant_contact_client/models/create_list_delete_activity201_response_links.rb +214 -0
  126. data/lib/constant_contact_client/models/create_list_delete_activity201_response_links_self.rb +215 -0
  127. data/lib/constant_contact_client/models/create_list_delete_activity201_response_status.rb +215 -0
  128. data/lib/constant_contact_client/models/create_list_delete_activity_request.rb +243 -0
  129. data/lib/constant_contact_client/models/create_list_remove_activity201_response.rb +305 -0
  130. data/lib/constant_contact_client/models/create_list_remove_activity201_response_status.rb +235 -0
  131. data/lib/constant_contact_client/models/create_list_remove_activity_request.rb +268 -0
  132. data/lib/constant_contact_client/models/create_list_remove_activity_request_exclude.rb +217 -0
  133. data/lib/constant_contact_client/models/create_list_remove_activity_request_source.rb +321 -0
  134. data/lib/constant_contact_client/models/create_or_update_contact200_response.rb +225 -0
  135. data/lib/constant_contact_client/models/create_or_update_contact_custom_field.rb +244 -0
  136. data/lib/constant_contact_client/models/create_or_update_contact_request.rb +503 -0
  137. data/lib/constant_contact_client/models/create_or_update_contact_request_custom_fields_inner.rb +244 -0
  138. data/lib/constant_contact_client/models/create_or_update_contact_request_street_address.rb +367 -0
  139. data/lib/constant_contact_client/models/create_resend_email_campaign201_response.rb +255 -0
  140. data/lib/constant_contact_client/models/create_resend_email_campaign_request.rb +242 -0
  141. data/lib/constant_contact_client/models/create_segment201_response.rb +274 -0
  142. data/lib/constant_contact_client/models/create_segment_request.rb +258 -0
  143. data/lib/constant_contact_client/models/create_tag_delete_activity_request.rb +243 -0
  144. data/lib/constant_contact_client/models/create_tag_remove_activity201_response.rb +319 -0
  145. data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links.rb +223 -0
  146. data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links_results.rb +215 -0
  147. data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links_self.rb +214 -0
  148. data/lib/constant_contact_client/models/create_tag_remove_activity201_response_status.rb +226 -0
  149. data/lib/constant_contact_client/models/create_tag_remove_activity_request.rb +268 -0
  150. data/lib/constant_contact_client/models/create_tag_remove_activity_request_exclude.rb +218 -0
  151. data/lib/constant_contact_client/models/create_tag_remove_activity_request_source.rb +319 -0
  152. data/lib/constant_contact_client/models/cross_reference.rb +235 -0
  153. data/lib/constant_contact_client/models/cross_reference_response.rb +217 -0
  154. data/lib/constant_contact_client/models/custom_field_id100.rb +243 -0
  155. data/lib/constant_contact_client/models/custom_field_input.rb +258 -0
  156. data/lib/constant_contact_client/models/custom_field_resource.rb +318 -0
  157. data/lib/constant_contact_client/models/custom_fields.rb +245 -0
  158. data/lib/constant_contact_client/models/customer.rb +352 -0
  159. data/lib/constant_contact_client/models/customer_put.rb +334 -0
  160. data/lib/constant_contact_client/models/delete_list202_response.rb +276 -0
  161. data/lib/constant_contact_client/models/delete_tag202_response.rb +299 -0
  162. data/lib/constant_contact_client/models/delete_tag202_response_activity_errors_inner.rb +215 -0
  163. data/lib/constant_contact_client/models/delete_tag202_response_links.rb +214 -0
  164. data/lib/constant_contact_client/models/delete_tag202_response_links_self.rb +215 -0
  165. data/lib/constant_contact_client/models/delete_tag202_response_status.rb +225 -0
  166. data/lib/constant_contact_client/models/device_flow_response.rb +265 -0
  167. data/lib/constant_contact_client/models/did_not_opens_tracking_activities_page.rb +233 -0
  168. data/lib/constant_contact_client/models/did_not_opens_tracking_activity.rb +320 -0
  169. data/lib/constant_contact_client/models/email_address.rb +351 -0
  170. data/lib/constant_contact_client/models/email_address_post.rb +252 -0
  171. data/lib/constant_contact_client/models/email_address_put.rb +341 -0
  172. data/lib/constant_contact_client/models/email_campaign.rb +306 -0
  173. data/lib/constant_contact_client/models/email_campaign_activity.rb +405 -0
  174. data/lib/constant_contact_client/models/email_campaign_activity_input.rb +402 -0
  175. data/lib/constant_contact_client/models/email_campaign_activity_preview.rb +285 -0
  176. data/lib/constant_contact_client/models/email_campaign_complete.rb +260 -0
  177. data/lib/constant_contact_client/models/email_campaign_name.rb +241 -0
  178. data/lib/constant_contact_client/models/email_campaigns.rb +294 -0
  179. data/lib/constant_contact_client/models/email_link_click_count.rb +265 -0
  180. data/lib/constant_contact_client/models/email_links.rb +227 -0
  181. data/lib/constant_contact_client/models/email_physical_address.rb +346 -0
  182. data/lib/constant_contact_client/models/email_schedule_input.rb +222 -0
  183. data/lib/constant_contact_client/models/email_test_send_input.rb +253 -0
  184. data/lib/constant_contact_client/models/emails_link.rb +214 -0
  185. data/lib/constant_contact_client/models/emails_paging_links.rb +214 -0
  186. data/lib/constant_contact_client/models/file_object.rb +384 -0
  187. data/lib/constant_contact_client/models/file_status_array_inner.rb +235 -0
  188. data/lib/constant_contact_client/models/forwards_tracking_activities_page.rb +233 -0
  189. data/lib/constant_contact_client/models/forwards_tracking_activity.rb +320 -0
  190. data/lib/constant_contact_client/models/get_ab_test_email_campaign200_response.rb +256 -0
  191. data/lib/constant_contact_client/models/get_account_details200_response.rb +352 -0
  192. data/lib/constant_contact_client/models/get_account_details200_response_company_logo.rb +236 -0
  193. data/lib/constant_contact_client/models/get_account_details200_response_physical_address.rb +409 -0
  194. data/lib/constant_contact_client/models/get_activity_by_id200_response.rb +316 -0
  195. data/lib/constant_contact_client/models/get_all_account_email_addresses200_response_inner.rb +317 -0
  196. data/lib/constant_contact_client/models/get_all_activities200_response.rb +226 -0
  197. data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner.rb +316 -0
  198. data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links.rb +223 -0
  199. data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links_results.rb +215 -0
  200. data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links_self.rb +215 -0
  201. data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_status.rb +275 -0
  202. data/lib/constant_contact_client/models/get_all_activities200_response_links.rb +214 -0
  203. data/lib/constant_contact_client/models/get_all_activities200_response_links_next.rb +214 -0
  204. data/lib/constant_contact_client/models/get_all_contacts200_response.rb +246 -0
  205. data/lib/constant_contact_client/models/get_all_custom_fields200_response.rb +245 -0
  206. data/lib/constant_contact_client/models/get_all_email_campaigns200_response.rb +225 -0
  207. data/lib/constant_contact_client/models/get_all_email_campaigns200_response_campaigns_inner.rb +294 -0
  208. data/lib/constant_contact_client/models/get_all_email_campaigns200_response_links.rb +214 -0
  209. data/lib/constant_contact_client/models/get_all_lists200_response.rb +235 -0
  210. data/lib/constant_contact_client/models/get_all_segments200_response.rb +233 -0
  211. data/lib/constant_contact_client/models/get_all_segments200_response_links.rb +222 -0
  212. data/lib/constant_contact_client/models/get_all_segments200_response_links_next.rb +223 -0
  213. data/lib/constant_contact_client/models/get_all_segments200_response_segments_inner.rb +245 -0
  214. data/lib/constant_contact_client/models/get_all_tags200_response.rb +226 -0
  215. data/lib/constant_contact_client/models/get_all_tags200_response_links.rb +215 -0
  216. data/lib/constant_contact_client/models/get_all_tags200_response_links_next.rb +224 -0
  217. data/lib/constant_contact_client/models/get_all_tags200_response_links_next_next.rb +223 -0
  218. data/lib/constant_contact_client/models/get_bounces_report200_response.rb +240 -0
  219. data/lib/constant_contact_client/models/get_bounces_report200_response_links.rb +222 -0
  220. data/lib/constant_contact_client/models/get_bounces_report200_response_tracking_activities_inner.rb +347 -0
  221. data/lib/constant_contact_client/models/get_campaign_activity_link_report200_response.rb +227 -0
  222. data/lib/constant_contact_client/models/get_campaign_activity_link_report200_response_link_click_counts_inner.rb +265 -0
  223. data/lib/constant_contact_client/models/get_clicks_report200_response.rb +233 -0
  224. data/lib/constant_contact_client/models/get_clicks_report200_response_links.rb +222 -0
  225. data/lib/constant_contact_client/models/get_clicks_report200_response_tracking_activities_inner.rb +364 -0
  226. data/lib/constant_contact_client/models/get_contact_adds200_response.rb +240 -0
  227. data/lib/constant_contact_client/models/get_contact_adds200_response_tracking_activities_inner.rb +329 -0
  228. data/lib/constant_contact_client/models/get_contact_by_id200_response.rb +635 -0
  229. data/lib/constant_contact_client/models/get_contact_by_id200_response_custom_fields_inner.rb +259 -0
  230. data/lib/constant_contact_client/models/get_contact_by_id200_response_email_address.rb +351 -0
  231. data/lib/constant_contact_client/models/get_contact_by_id200_response_notes_inner.rb +255 -0
  232. data/lib/constant_contact_client/models/get_contact_by_id200_response_phone_numbers_inner.rb +294 -0
  233. data/lib/constant_contact_client/models/get_contact_by_id200_response_sms_channel.rb +278 -0
  234. data/lib/constant_contact_client/models/get_contact_by_id200_response_sms_channel_sms_channel_consents_inner.rb +285 -0
  235. data/lib/constant_contact_client/models/get_contact_by_id200_response_street_addresses_inner.rb +397 -0
  236. data/lib/constant_contact_client/models/get_contact_counts200_response.rb +265 -0
  237. data/lib/constant_contact_client/models/get_contact_id_xrefs200_response.rb +236 -0
  238. data/lib/constant_contact_client/models/get_contact_id_xrefs200_response_xrefs_inner.rb +226 -0
  239. data/lib/constant_contact_client/models/get_contact_open_click_rate_report200_response.rb +274 -0
  240. data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response.rb +250 -0
  241. data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response_campaign_activities_inner.rb +341 -0
  242. data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response_links.rb +222 -0
  243. data/lib/constant_contact_client/models/get_contact_tracking_report200_response.rb +227 -0
  244. data/lib/constant_contact_client/models/get_contact_tracking_report200_response_links.rb +222 -0
  245. data/lib/constant_contact_client/models/get_contact_tracking_report200_response_links_next.rb +223 -0
  246. data/lib/constant_contact_client/models/get_contact_tracking_report200_response_tracking_activities_inner.rb +270 -0
  247. data/lib/constant_contact_client/models/get_custom_field200_response.rb +318 -0
  248. data/lib/constant_contact_client/models/get_did_not_opens_report200_response.rb +233 -0
  249. data/lib/constant_contact_client/models/get_did_not_opens_report200_response_tracking_activities_inner.rb +320 -0
  250. data/lib/constant_contact_client/models/get_email_campaign_activity200_response.rb +405 -0
  251. data/lib/constant_contact_client/models/get_email_campaign_activity200_response_document_properties.rb +520 -0
  252. data/lib/constant_contact_client/models/get_email_campaign_activity200_response_physical_address_in_footer.rb +347 -0
  253. data/lib/constant_contact_client/models/get_email_campaign_activity_preview200_response.rb +285 -0
  254. data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response.rb +229 -0
  255. data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response_results_inner.rb +244 -0
  256. data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response_results_inner_stats.rb +476 -0
  257. data/lib/constant_contact_client/models/get_email_campaign_activity_schedule200_response_inner.rb +215 -0
  258. data/lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb +298 -0
  259. data/lib/constant_contact_client/models/get_email_campaign_report200_response.rb +249 -0
  260. data/lib/constant_contact_client/models/get_email_campaign_report200_response_aggregate_percents.rb +256 -0
  261. data/lib/constant_contact_client/models/get_email_campaign_report200_response_bulk_email_campaign_summaries_inner.rb +272 -0
  262. data/lib/constant_contact_client/models/get_email_campaign_report200_response_bulk_email_campaign_summaries_inner_unique_counts.rb +342 -0
  263. data/lib/constant_contact_client/models/get_email_campaign_xrefs200_response.rb +217 -0
  264. data/lib/constant_contact_client/models/get_email_campaign_xrefs200_response_xrefs_inner.rb +235 -0
  265. data/lib/constant_contact_client/models/get_email_opens_report200_response.rb +233 -0
  266. data/lib/constant_contact_client/models/get_email_opens_report200_response_tracking_activities_inner.rb +330 -0
  267. data/lib/constant_contact_client/models/get_email_sends_report200_response.rb +233 -0
  268. data/lib/constant_contact_client/models/get_email_sends_report200_response_links.rb +222 -0
  269. data/lib/constant_contact_client/models/get_email_sends_report200_response_tracking_activities_inner.rb +320 -0
  270. data/lib/constant_contact_client/models/get_email_stats_report200_response.rb +229 -0
  271. data/lib/constant_contact_client/models/get_email_stats_report200_response_errors_inner.rb +225 -0
  272. data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner.rb +243 -0
  273. data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner_percents.rb +296 -0
  274. data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner_stats.rb +396 -0
  275. data/lib/constant_contact_client/models/get_forwards_report200_response.rb +233 -0
  276. data/lib/constant_contact_client/models/get_forwards_report200_response_tracking_activities_inner.rb +320 -0
  277. data/lib/constant_contact_client/models/get_list200_response.rb +301 -0
  278. data/lib/constant_contact_client/models/get_list_id_xrefs200_response.rb +236 -0
  279. data/lib/constant_contact_client/models/get_list_id_xrefs200_response_xrefs_inner.rb +226 -0
  280. data/lib/constant_contact_client/models/get_optouts_report200_response.rb +240 -0
  281. data/lib/constant_contact_client/models/get_optouts_report200_response_tracking_activities_inner.rb +330 -0
  282. data/lib/constant_contact_client/models/get_resend_email_campaign200_response_inner.rb +265 -0
  283. data/lib/constant_contact_client/models/get_sms_engagement_history200_response_inner.rb +255 -0
  284. data/lib/constant_contact_client/models/get_sms_engagement_history200_response_inner_history_details.rb +316 -0
  285. data/lib/constant_contact_client/models/get_tag200_response.rb +265 -0
  286. data/lib/constant_contact_client/models/get_unique_contact_clicks200_response.rb +240 -0
  287. data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_links.rb +222 -0
  288. data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_links_next.rb +223 -0
  289. data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_tracking_activities_inner.rb +366 -0
  290. data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel.rb +246 -0
  291. data/lib/constant_contact_client/models/get_unique_contact_opens200_response.rb +240 -0
  292. data/lib/constant_contact_client/models/get_unique_contact_opens200_response_tracking_activities_inner.rb +339 -0
  293. data/lib/constant_contact_client/models/get_unique_contact_sms_opt_ins200_response.rb +240 -0
  294. data/lib/constant_contact_client/models/get_unique_contact_sms_opt_ins200_response_tracking_activities_inner.rb +329 -0
  295. data/lib/constant_contact_client/models/get_unique_contact_updates200_response.rb +240 -0
  296. data/lib/constant_contact_client/models/get_unique_contact_updates200_response_tracking_activities_inner.rb +329 -0
  297. data/lib/constant_contact_client/models/get_user_privileges200_response_inner.rb +225 -0
  298. data/lib/constant_contact_client/models/headers_object.rb +225 -0
  299. data/lib/constant_contact_client/models/history_details.rb +316 -0
  300. data/lib/constant_contact_client/models/json_import_contact.rb +1315 -0
  301. data/lib/constant_contact_client/models/link.rb +214 -0
  302. data/lib/constant_contact_client/models/links.rb +221 -0
  303. data/lib/constant_contact_client/models/list_activity_add_contacts.rb +268 -0
  304. data/lib/constant_contact_client/models/list_activity_remove_contacts.rb +268 -0
  305. data/lib/constant_contact_client/models/list_id_list100.rb +243 -0
  306. data/lib/constant_contact_client/models/list_input.rb +263 -0
  307. data/lib/constant_contact_client/models/list_xref.rb +226 -0
  308. data/lib/constant_contact_client/models/list_xrefs.rb +236 -0
  309. data/lib/constant_contact_client/models/lpreporting_links.rb +221 -0
  310. data/lib/constant_contact_client/models/lpreporting_next.rb +222 -0
  311. data/lib/constant_contact_client/models/model_next.rb +222 -0
  312. data/lib/constant_contact_client/models/my_library_file_collection_inner.rb +384 -0
  313. data/lib/constant_contact_client/models/my_library_file_collection_inner_thumbnail.rb +235 -0
  314. data/lib/constant_contact_client/models/note.rb +255 -0
  315. data/lib/constant_contact_client/models/o_auth_error.rb +223 -0
  316. data/lib/constant_contact_client/models/opens_tracking_activities_page.rb +233 -0
  317. data/lib/constant_contact_client/models/opens_tracking_activity.rb +330 -0
  318. data/lib/constant_contact_client/models/optouts_tracking_activities_page.rb +240 -0
  319. data/lib/constant_contact_client/models/optouts_tracking_activity.rb +330 -0
  320. data/lib/constant_contact_client/models/p_contact_add_tracking_activities_page.rb +240 -0
  321. data/lib/constant_contact_client/models/p_contact_add_tracking_activity.rb +329 -0
  322. data/lib/constant_contact_client/models/p_contact_click_tracking_activities_page.rb +240 -0
  323. data/lib/constant_contact_client/models/p_contact_click_tracking_activity.rb +366 -0
  324. data/lib/constant_contact_client/models/p_contact_open_tracking_activity.rb +339 -0
  325. data/lib/constant_contact_client/models/p_contact_opens_tracking_activities_page.rb +240 -0
  326. data/lib/constant_contact_client/models/p_contact_sms_opt_in_tracking_activities_page.rb +240 -0
  327. data/lib/constant_contact_client/models/p_contact_sms_opt_in_tracking_activity.rb +329 -0
  328. data/lib/constant_contact_client/models/p_contact_update_tracking_activities_page.rb +240 -0
  329. data/lib/constant_contact_client/models/p_contact_update_tracking_activity.rb +329 -0
  330. data/lib/constant_contact_client/models/paged_email_campaign_response.rb +225 -0
  331. data/lib/constant_contact_client/models/pagination_links.rb +214 -0
  332. data/lib/constant_contact_client/models/pagination_links_next.rb +215 -0
  333. data/lib/constant_contact_client/models/paging_links.rb +214 -0
  334. data/lib/constant_contact_client/models/partner_account.rb +233 -0
  335. data/lib/constant_contact_client/models/partner_account_links.rb +215 -0
  336. data/lib/constant_contact_client/models/partner_account_operations_request.rb +286 -0
  337. data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_headers_inner.rb +225 -0
  338. data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_path_parameters_inner.rb +225 -0
  339. data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_query_parameters_inner.rb +225 -0
  340. data/lib/constant_contact_client/models/partner_account_site_owner_list_inner.rb +265 -0
  341. data/lib/constant_contact_client/models/partners_link.rb +214 -0
  342. data/lib/constant_contact_client/models/patch_email_campaign_name_request.rb +241 -0
  343. data/lib/constant_contact_client/models/path_param_object.rb +225 -0
  344. data/lib/constant_contact_client/models/percents_email.rb +295 -0
  345. data/lib/constant_contact_client/models/phone_number.rb +294 -0
  346. data/lib/constant_contact_client/models/phone_number_put.rb +244 -0
  347. data/lib/constant_contact_client/models/plan_info.rb +236 -0
  348. data/lib/constant_contact_client/models/plan_tiers_object.rb +248 -0
  349. data/lib/constant_contact_client/models/plan_tiers_object_current_tiers_inner.rb +278 -0
  350. data/lib/constant_contact_client/models/post_custom_field_delete201_response.rb +297 -0
  351. data/lib/constant_contact_client/models/post_custom_field_delete_request.rb +243 -0
  352. data/lib/constant_contact_client/models/post_tag_request.rb +260 -0
  353. data/lib/constant_contact_client/models/provision.rb +723 -0
  354. data/lib/constant_contact_client/models/provision_response.rb +225 -0
  355. data/lib/constant_contact_client/models/put_tag_request.rb +250 -0
  356. data/lib/constant_contact_client/models/query_param_object.rb +225 -0
  357. data/lib/constant_contact_client/models/reporting_links.rb +221 -0
  358. data/lib/constant_contact_client/models/reporting_next.rb +222 -0
  359. data/lib/constant_contact_client/models/resend_to_non_openers_input.rb +242 -0
  360. data/lib/constant_contact_client/models/resend_to_non_openers_object.rb +255 -0
  361. data/lib/constant_contact_client/models/schedule_email_campaign_activity_request.rb +222 -0
  362. data/lib/constant_contact_client/models/segment_data.rb +258 -0
  363. data/lib/constant_contact_client/models/segment_detail.rb +274 -0
  364. data/lib/constant_contact_client/models/segment_master.rb +245 -0
  365. data/lib/constant_contact_client/models/segment_name.rb +222 -0
  366. data/lib/constant_contact_client/models/segments_dto.rb +233 -0
  367. data/lib/constant_contact_client/models/sends_tracking_activities_page.rb +233 -0
  368. data/lib/constant_contact_client/models/sends_tracking_activity.rb +320 -0
  369. data/lib/constant_contact_client/models/sms_channel_consent_details.rb +285 -0
  370. data/lib/constant_contact_client/models/sso_user.rb +439 -0
  371. data/lib/constant_contact_client/models/stats_email.rb +395 -0
  372. data/lib/constant_contact_client/models/stats_email_activity.rb +475 -0
  373. data/lib/constant_contact_client/models/stats_error.rb +225 -0
  374. data/lib/constant_contact_client/models/street_address.rb +397 -0
  375. data/lib/constant_contact_client/models/street_address_put.rb +367 -0
  376. data/lib/constant_contact_client/models/tag.rb +265 -0
  377. data/lib/constant_contact_client/models/tag_add_remove_contacts.rb +268 -0
  378. data/lib/constant_contact_client/models/tag_id_list500_limit.rb +243 -0
  379. data/lib/constant_contact_client/models/tag_post.rb +260 -0
  380. data/lib/constant_contact_client/models/tag_put.rb +250 -0
  381. data/lib/constant_contact_client/models/tags.rb +226 -0
  382. data/lib/constant_contact_client/models/tags_activity_links.rb +214 -0
  383. data/lib/constant_contact_client/models/tags_links.rb +223 -0
  384. data/lib/constant_contact_client/models/tags_paging_links.rb +214 -0
  385. data/lib/constant_contact_client/models/test_send_email_campaign_activity_request.rb +253 -0
  386. data/lib/constant_contact_client/models/tier_object.rb +278 -0
  387. data/lib/constant_contact_client/models/tracking_activity_sms_channel_dto.rb +245 -0
  388. data/lib/constant_contact_client/models/unique_email_counts.rb +341 -0
  389. data/lib/constant_contact_client/models/update_account_request.rb +334 -0
  390. data/lib/constant_contact_client/models/update_contact_request.rb +582 -0
  391. data/lib/constant_contact_client/models/update_contact_request_email_address.rb +341 -0
  392. data/lib/constant_contact_client/models/update_contact_request_phone_numbers_inner.rb +244 -0
  393. data/lib/constant_contact_client/models/update_contact_request_street_addresses_inner.rb +367 -0
  394. data/lib/constant_contact_client/models/update_custom_field_request.rb +258 -0
  395. data/lib/constant_contact_client/models/update_list200_response.rb +291 -0
  396. data/lib/constant_contact_client/models/update_list_request.rb +263 -0
  397. data/lib/constant_contact_client/models/update_segment_name_request.rb +222 -0
  398. data/lib/constant_contact_client/models/webhooks_subscription_body.rb +215 -0
  399. data/lib/constant_contact_client/models/webhooks_subscription_collection_inner.rb +245 -0
  400. data/lib/constant_contact_client/models/webhooks_subscription_put_resp.rb +225 -0
  401. data/lib/constant_contact_client/models/webhooks_subscription_response.rb +245 -0
  402. data/lib/constant_contact_client/models/webhooks_test_send.rb +245 -0
  403. data/lib/constant_contact_client/version.rb +15 -0
  404. data/lib/constant_contact_client.rb +417 -0
  405. data/spec/spec_helper.rb +111 -0
  406. metadata +488 -0
@@ -0,0 +1,676 @@
1
+ =begin
2
+ #Constant Contact API v3
3
+
4
+ #Swagger build version 3.0.2475
5
+
6
+ The version of the OpenAPI document: 1.0.101
7
+ Contact: webservices@constantcontact.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module ConstantContactClient
16
+ class ContactsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # POST (create) a Contact
23
+ # Creates a new contact resource; you must include the `create_source` property and at least one of the following properties when creating a new contact: `first_name`, `last_name`, or `email_address` (`email_address` must be unique for each contact).
24
+ # @param create_contact_request [CreateContactRequest] The JSON payload defining the contact
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [GetContactById200Response]
27
+ def create_contact(create_contact_request, opts = {})
28
+ data, _status_code, _headers = create_contact_with_http_info(create_contact_request, opts)
29
+ data
30
+ end
31
+
32
+ # POST (create) a Contact
33
+ # Creates a new contact resource; you must include the `create_source` property and at least one of the following properties when creating a new contact: `first_name`, `last_name`, or `email_address` (`email_address` must be unique for each contact).
34
+ # @param create_contact_request [CreateContactRequest] The JSON payload defining the contact
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(GetContactById200Response, Integer, Hash)>] GetContactById200Response data, response status code and response headers
37
+ def create_contact_with_http_info(create_contact_request, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_contact ...'
40
+ end
41
+ # verify the required parameter 'create_contact_request' is set
42
+ if @api_client.config.client_side_validation && create_contact_request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'create_contact_request' when calling ContactsApi.create_contact"
44
+ end
45
+ # resource path
46
+ local_var_path = '/contacts'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_contact_request)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'GetContactById200Response'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"ContactsApi.create_contact",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: ContactsApi#create_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Create or Update a Contact
91
+ # Use this method to create a new contact or update an existing contact. This method uses the `email_address` string value you include in the request body to determine if it should create an new contact or update an existing contact. Updates to existing contacts are partial updates. This method only updates the contact properties you include in the request body. Updates append new contact lists or custom fields to the existing `list_memberships` or `custom_fields` arrays. <div class=\"Msg\"><p class=\"note-text\">Only use this method when a contact gives you their explicit permission to send them emails. It is a violation of US and Canadian anti-spam laws, as well as a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API to opt a contact back in without his or her own action and consent.</p></div> When this method creates a new contact, it returns a 201 response code. When this method updates an existing contact, it returns a 200 response code. Updating a deleted contact restores the contact. The method automatically modifies the contact's `permission_to_send` and `opt_in_source` properties depending on the [Confirmed Opt-In](https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5533-obtain-permission-to-send-email-campaigns-to-your-contacts-by-using-confirmed-opt-in) Constant Contact account setting: If Confirmed Opt-in is _enabled_, this method automatically sets the `permission_to_send` property as pending\\_confirmation for new contacts. If Confirmed Opt-in is _disabled_, this method automatically sets the `permission_to_send` property as explicit and the `opt_in_source` property as `Contact` for new contacts. Updated contacts have their `permission_to_send` property set as explicit.
92
+ # @param create_or_update_contact_request [CreateOrUpdateContactRequest] A JSON request body payload that contains the contact resource you are creating or updating. The request body must contain the &#x60;email_address&#x60; property and the &#x60;list_memberships&#x60; array.
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [CreateOrUpdateContact200Response]
95
+ def create_or_update_contact(create_or_update_contact_request, opts = {})
96
+ data, _status_code, _headers = create_or_update_contact_with_http_info(create_or_update_contact_request, opts)
97
+ data
98
+ end
99
+
100
+ # Create or Update a Contact
101
+ # Use this method to create a new contact or update an existing contact. This method uses the &#x60;email_address&#x60; string value you include in the request body to determine if it should create an new contact or update an existing contact. Updates to existing contacts are partial updates. This method only updates the contact properties you include in the request body. Updates append new contact lists or custom fields to the existing &#x60;list_memberships&#x60; or &#x60;custom_fields&#x60; arrays. &lt;div class&#x3D;\&quot;Msg\&quot;&gt;&lt;p class&#x3D;\&quot;note-text\&quot;&gt;Only use this method when a contact gives you their explicit permission to send them emails. It is a violation of US and Canadian anti-spam laws, as well as a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API to opt a contact back in without his or her own action and consent.&lt;/p&gt;&lt;/div&gt; When this method creates a new contact, it returns a 201 response code. When this method updates an existing contact, it returns a 200 response code. Updating a deleted contact restores the contact. The method automatically modifies the contact&#39;s &#x60;permission_to_send&#x60; and &#x60;opt_in_source&#x60; properties depending on the [Confirmed Opt-In](https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5533-obtain-permission-to-send-email-campaigns-to-your-contacts-by-using-confirmed-opt-in) Constant Contact account setting: If Confirmed Opt-in is _enabled_, this method automatically sets the &#x60;permission_to_send&#x60; property as pending\\_confirmation for new contacts. If Confirmed Opt-in is _disabled_, this method automatically sets the &#x60;permission_to_send&#x60; property as explicit and the &#x60;opt_in_source&#x60; property as &#x60;Contact&#x60; for new contacts. Updated contacts have their &#x60;permission_to_send&#x60; property set as explicit.
102
+ # @param create_or_update_contact_request [CreateOrUpdateContactRequest] A JSON request body payload that contains the contact resource you are creating or updating. The request body must contain the &#x60;email_address&#x60; property and the &#x60;list_memberships&#x60; array.
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(CreateOrUpdateContact200Response, Integer, Hash)>] CreateOrUpdateContact200Response data, response status code and response headers
105
+ def create_or_update_contact_with_http_info(create_or_update_contact_request, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: ContactsApi.create_or_update_contact ...'
108
+ end
109
+ # verify the required parameter 'create_or_update_contact_request' is set
110
+ if @api_client.config.client_side_validation && create_or_update_contact_request.nil?
111
+ fail ArgumentError, "Missing the required parameter 'create_or_update_contact_request' when calling ContactsApi.create_or_update_contact"
112
+ end
113
+ # resource path
114
+ local_var_path = '/contacts/sign_up_form'
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
123
+ # HTTP header 'Content-Type'
124
+ content_type = @api_client.select_header_content_type(['application/json'])
125
+ if !content_type.nil?
126
+ header_params['Content-Type'] = content_type
127
+ end
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_or_update_contact_request)
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type] || 'CreateOrUpdateContact200Response'
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"ContactsApi.create_or_update_contact",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: ContactsApi#create_or_update_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # DELETE a Contact
159
+ # Deletes the contact identified by the contact_id path parameter. Deleted contacts won't receive email from you, and they don't count as active contacts. Unlike unsubscribed contacts, deleted contacts can be revived, or added back to an account. Learn how to [revive deleted contacts](/api_guide/contacts_delete.html#revive).
160
+ # @param contact_id [String] Unique ID of contact to DELETE
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [nil]
163
+ def delete_contact(contact_id, opts = {})
164
+ delete_contact_with_http_info(contact_id, opts)
165
+ nil
166
+ end
167
+
168
+ # DELETE a Contact
169
+ # Deletes the contact identified by the contact_id path parameter. Deleted contacts won&#39;t receive email from you, and they don&#39;t count as active contacts. Unlike unsubscribed contacts, deleted contacts can be revived, or added back to an account. Learn how to [revive deleted contacts](/api_guide/contacts_delete.html#revive).
170
+ # @param contact_id [String] Unique ID of contact to DELETE
171
+ # @param [Hash] opts the optional parameters
172
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
173
+ def delete_contact_with_http_info(contact_id, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: ContactsApi.delete_contact ...'
176
+ end
177
+ # verify the required parameter 'contact_id' is set
178
+ if @api_client.config.client_side_validation && contact_id.nil?
179
+ fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.delete_contact"
180
+ end
181
+ # resource path
182
+ local_var_path = '/contacts/{contact_id}'.sub('{' + 'contact_id' + '}', CGI.escape(contact_id.to_s))
183
+
184
+ # query parameters
185
+ query_params = opts[:query_params] || {}
186
+
187
+ # header parameters
188
+ header_params = opts[:header_params] || {}
189
+
190
+ # form parameters
191
+ form_params = opts[:form_params] || {}
192
+
193
+ # http body (model)
194
+ post_body = opts[:debug_body]
195
+
196
+ # return_type
197
+ return_type = opts[:debug_return_type]
198
+
199
+ # auth_names
200
+ auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']
201
+
202
+ new_options = opts.merge(
203
+ :operation => :"ContactsApi.delete_contact",
204
+ :header_params => header_params,
205
+ :query_params => query_params,
206
+ :form_params => form_params,
207
+ :body => post_body,
208
+ :auth_names => auth_names,
209
+ :return_type => return_type
210
+ )
211
+
212
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
213
+ if @api_client.config.debugging
214
+ @api_client.config.logger.debug "API called: ContactsApi#delete_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
215
+ end
216
+ return data, status_code, headers
217
+ end
218
+
219
+ # GET Contacts Collection
220
+ # Use this method to return a collection of contacts. Use the query parameters to search for contacts that match specific contact properties and subresourse properties as criteria. For example, you can search using the contact's `email` address, `lists` memberships, and by the date range that a contact was created or updated. Use the `limit` query parameter to limit the number of results returned per page. Use the `include` query parameter to include contact sub-resources in the response and `include_count` to include the total number of contacts that meet your specified search criteria. By default, this method returns all contacts that are not deleted. Use the `status` query parameter with the value `all` to return all contacts including deleted contacts.
221
+ # @param [Hash] opts the optional parameters
222
+ # @option opts [String] :status Use the &#x60;status&#x60; query parameter to search for contacts by status. This parameter accepts one or more comma separated values: &#x60;all&#x60;, &#x60;active&#x60;, &#x60;deleted&#x60;, &#x60;not_set&#x60;, &#x60;pending_confirmation&#x60;, &#x60;temp_hold&#x60;, and &#x60;unsubscribed&#x60;.
223
+ # @option opts [String] :email Use the &#x60;email&#x60; query parameter to search for a contact using a specific email address.
224
+ # @option opts [String] :lists Use the &#x60;lists&#x60; query parameter to search for contacts that are members of one or more specified lists. Use a comma to separate multiple &#x60;list_id&#x60; values, up to a maximum of 25.
225
+ # @option opts [String] :segment_id Use to get contacts that meet the segment criteria for a single specified &#x60;segment_id&#x60;. This query parameter can only be combined with the limit query parameter. When using the &#x60;segment_id&#x60; query parameter, the V3 API may return a 202 response code instead of a 200 response. The 202 response code indicates that your request has been accepted, but not fully completed. Retry sending your API request to return the completed results and a 200 response code.
226
+ # @option opts [String] :tags Use to get contact details for up to 50 specified tags. Use a comma to separate each &#x60;tag_id&#x60;.
227
+ # @option opts [Time] :updated_after Use &#x60;updated_after&#x60; to search for contacts that have been updated after the date you specify. To search for updated contacts within a date range, specify both &#x60;updated_after&#x60; and &#x60;updated_before&#x60; dates. Accepts ISO-8601 formatted dates.
228
+ # @option opts [Time] :updated_before Use &#x60;updated_before&#x60; to search for contacts that have been updated before a specified date. To search for updated contacts within a date range, specify both &#x60;updated_after&#x60; and &#x60;updated_before&#x60; dates. Accepts ISO-8601 formatted dates.
229
+ # @option opts [Time] :created_after Use &#x60;created_after&#x60; to search for contacts created after a specified date. To search for contacts created within a date range, specify both &#x60;created_after&#x60; and &#x60;created_before&#x60; dates. Accepts ISO-8601 formatted dates.
230
+ # @option opts [Time] :created_before Use &#x60;created_before&#x60; to search for contacts created before a specified date. To search for contacts created within a date range, specify both &#x60;created_after&#x60; and &#x60;created_before&#x60; dates. Accepts ISO-8601 formatted dates.
231
+ # @option opts [Time] :optout_after Use &#x60;optout_after&#x60; to search for contacts that unsubscribed after a specified date.
232
+ # @option opts [Time] :optout_before Use &#x60;optout_before&#x60; to search for contacts that unsubscribed before a specified date.
233
+ # @option opts [String] :include Use &#x60;include&#x60; to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: &#x60;custom_fields&#x60;, &#x60;list_memberships&#x60;, &#x60;taggings&#x60;, &#x60;notes&#x60;,&#x60;phone_numbers&#x60;, &#x60;street_addresses&#x60;, &#x60;sms_channel&#x60;.
234
+ # @option opts [String] :sms_status Use to get contacts by their SMS status. This parameter accepts one or more comma separated values: &#x60;all&#x60;, &#x60;explicit&#x60;, &#x60;unsubscribed&#x60;, &#x60;pending_confirmation&#x60;, &#x60;not_set&#x60;.
235
+ # @option opts [Boolean] :include_count Set &#x60;include_count&#x3D;true&#x60; to include the total number of contacts (&#x60;contacts_count&#x60;) that meet all search criteria in the response body.
236
+ # @option opts [Integer] :limit Specifies the number of results displayed per page of output in the response, from 1 - 500, default &#x3D; 50. (default to 50)
237
+ # @return [GetAllContacts200Response]
238
+ def get_all_contacts(opts = {})
239
+ data, _status_code, _headers = get_all_contacts_with_http_info(opts)
240
+ data
241
+ end
242
+
243
+ # GET Contacts Collection
244
+ # Use this method to return a collection of contacts. Use the query parameters to search for contacts that match specific contact properties and subresourse properties as criteria. For example, you can search using the contact&#39;s &#x60;email&#x60; address, &#x60;lists&#x60; memberships, and by the date range that a contact was created or updated. Use the &#x60;limit&#x60; query parameter to limit the number of results returned per page. Use the &#x60;include&#x60; query parameter to include contact sub-resources in the response and &#x60;include_count&#x60; to include the total number of contacts that meet your specified search criteria. By default, this method returns all contacts that are not deleted. Use the &#x60;status&#x60; query parameter with the value &#x60;all&#x60; to return all contacts including deleted contacts.
245
+ # @param [Hash] opts the optional parameters
246
+ # @option opts [String] :status Use the &#x60;status&#x60; query parameter to search for contacts by status. This parameter accepts one or more comma separated values: &#x60;all&#x60;, &#x60;active&#x60;, &#x60;deleted&#x60;, &#x60;not_set&#x60;, &#x60;pending_confirmation&#x60;, &#x60;temp_hold&#x60;, and &#x60;unsubscribed&#x60;.
247
+ # @option opts [String] :email Use the &#x60;email&#x60; query parameter to search for a contact using a specific email address.
248
+ # @option opts [String] :lists Use the &#x60;lists&#x60; query parameter to search for contacts that are members of one or more specified lists. Use a comma to separate multiple &#x60;list_id&#x60; values, up to a maximum of 25.
249
+ # @option opts [String] :segment_id Use to get contacts that meet the segment criteria for a single specified &#x60;segment_id&#x60;. This query parameter can only be combined with the limit query parameter. When using the &#x60;segment_id&#x60; query parameter, the V3 API may return a 202 response code instead of a 200 response. The 202 response code indicates that your request has been accepted, but not fully completed. Retry sending your API request to return the completed results and a 200 response code.
250
+ # @option opts [String] :tags Use to get contact details for up to 50 specified tags. Use a comma to separate each &#x60;tag_id&#x60;.
251
+ # @option opts [Time] :updated_after Use &#x60;updated_after&#x60; to search for contacts that have been updated after the date you specify. To search for updated contacts within a date range, specify both &#x60;updated_after&#x60; and &#x60;updated_before&#x60; dates. Accepts ISO-8601 formatted dates.
252
+ # @option opts [Time] :updated_before Use &#x60;updated_before&#x60; to search for contacts that have been updated before a specified date. To search for updated contacts within a date range, specify both &#x60;updated_after&#x60; and &#x60;updated_before&#x60; dates. Accepts ISO-8601 formatted dates.
253
+ # @option opts [Time] :created_after Use &#x60;created_after&#x60; to search for contacts created after a specified date. To search for contacts created within a date range, specify both &#x60;created_after&#x60; and &#x60;created_before&#x60; dates. Accepts ISO-8601 formatted dates.
254
+ # @option opts [Time] :created_before Use &#x60;created_before&#x60; to search for contacts created before a specified date. To search for contacts created within a date range, specify both &#x60;created_after&#x60; and &#x60;created_before&#x60; dates. Accepts ISO-8601 formatted dates.
255
+ # @option opts [Time] :optout_after Use &#x60;optout_after&#x60; to search for contacts that unsubscribed after a specified date.
256
+ # @option opts [Time] :optout_before Use &#x60;optout_before&#x60; to search for contacts that unsubscribed before a specified date.
257
+ # @option opts [String] :include Use &#x60;include&#x60; to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: &#x60;custom_fields&#x60;, &#x60;list_memberships&#x60;, &#x60;taggings&#x60;, &#x60;notes&#x60;,&#x60;phone_numbers&#x60;, &#x60;street_addresses&#x60;, &#x60;sms_channel&#x60;.
258
+ # @option opts [String] :sms_status Use to get contacts by their SMS status. This parameter accepts one or more comma separated values: &#x60;all&#x60;, &#x60;explicit&#x60;, &#x60;unsubscribed&#x60;, &#x60;pending_confirmation&#x60;, &#x60;not_set&#x60;.
259
+ # @option opts [Boolean] :include_count Set &#x60;include_count&#x3D;true&#x60; to include the total number of contacts (&#x60;contacts_count&#x60;) that meet all search criteria in the response body.
260
+ # @option opts [Integer] :limit Specifies the number of results displayed per page of output in the response, from 1 - 500, default &#x3D; 50. (default to 50)
261
+ # @return [Array<(GetAllContacts200Response, Integer, Hash)>] GetAllContacts200Response data, response status code and response headers
262
+ def get_all_contacts_with_http_info(opts = {})
263
+ if @api_client.config.debugging
264
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_all_contacts ...'
265
+ end
266
+ allowable_values = ["all", "active", "deleted", "not_set", "pending_confirmation", "temp_hold", "unsubscribed"]
267
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
268
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
269
+ end
270
+ allowable_values = ["custom_fields", "list_memberships", "phone_numbers", "street_addresses", "taggings", "notes", "sms_channel"]
271
+ if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include'])
272
+ fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}"
273
+ end
274
+ allowable_values = ["all", "explicit", "unsubscribed", "pending_confirmation", "not_set"]
275
+ if @api_client.config.client_side_validation && opts[:'sms_status'] && !allowable_values.include?(opts[:'sms_status'])
276
+ fail ArgumentError, "invalid value for \"sms_status\", must be one of #{allowable_values}"
277
+ end
278
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
279
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_all_contacts, must be smaller than or equal to 500.'
280
+ end
281
+
282
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
283
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContactsApi.get_all_contacts, must be greater than or equal to 1.'
284
+ end
285
+
286
+ # resource path
287
+ local_var_path = '/contacts'
288
+
289
+ # query parameters
290
+ query_params = opts[:query_params] || {}
291
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
292
+ query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
293
+ query_params[:'lists'] = opts[:'lists'] if !opts[:'lists'].nil?
294
+ query_params[:'segment_id'] = opts[:'segment_id'] if !opts[:'segment_id'].nil?
295
+ query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
296
+ query_params[:'updated_after'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
297
+ query_params[:'updated_before'] = opts[:'updated_before'] if !opts[:'updated_before'].nil?
298
+ query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
299
+ query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
300
+ query_params[:'optout_after'] = opts[:'optout_after'] if !opts[:'optout_after'].nil?
301
+ query_params[:'optout_before'] = opts[:'optout_before'] if !opts[:'optout_before'].nil?
302
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
303
+ query_params[:'sms_status'] = opts[:'sms_status'] if !opts[:'sms_status'].nil?
304
+ query_params[:'include_count'] = opts[:'include_count'] if !opts[:'include_count'].nil?
305
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
306
+
307
+ # header parameters
308
+ header_params = opts[:header_params] || {}
309
+ # HTTP header 'Accept' (if needed)
310
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
311
+
312
+ # form parameters
313
+ form_params = opts[:form_params] || {}
314
+
315
+ # http body (model)
316
+ post_body = opts[:debug_body]
317
+
318
+ # return_type
319
+ return_type = opts[:debug_return_type] || 'GetAllContacts200Response'
320
+
321
+ # auth_names
322
+ auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']
323
+
324
+ new_options = opts.merge(
325
+ :operation => :"ContactsApi.get_all_contacts",
326
+ :header_params => header_params,
327
+ :query_params => query_params,
328
+ :form_params => form_params,
329
+ :body => post_body,
330
+ :auth_names => auth_names,
331
+ :return_type => return_type
332
+ )
333
+
334
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
335
+ if @api_client.config.debugging
336
+ @api_client.config.logger.debug "API called: ContactsApi#get_all_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
337
+ end
338
+ return data, status_code, headers
339
+ end
340
+
341
+ # GET a Contact
342
+ # This endpoint GETs a specific contact resource (contact_id). Use the `include` query parameter to add any of the available contact sub-resources to the response payload.
343
+ # @param contact_id [String] Unique ID of contact to GET
344
+ # @param [Hash] opts the optional parameters
345
+ # @option opts [String] :include Use &#x60;include&#x60; to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: &#x60;custom_fields&#x60;, &#x60;list_memberships&#x60;, &#x60;phone_numbers&#x60;, &#x60;street_addresses&#x60;, &#x60;notes&#x60;, &#x60;sms_channel&#x60;, and &#x60;taggings&#x60;.
346
+ # @return [GetContactById200Response]
347
+ def get_contact_by_id(contact_id, opts = {})
348
+ data, _status_code, _headers = get_contact_by_id_with_http_info(contact_id, opts)
349
+ data
350
+ end
351
+
352
+ # GET a Contact
353
+ # This endpoint GETs a specific contact resource (contact_id). Use the &#x60;include&#x60; query parameter to add any of the available contact sub-resources to the response payload.
354
+ # @param contact_id [String] Unique ID of contact to GET
355
+ # @param [Hash] opts the optional parameters
356
+ # @option opts [String] :include Use &#x60;include&#x60; to specify which contact sub-resources to include in the response. Use a comma to separate multiple sub-resources. Valid values: &#x60;custom_fields&#x60;, &#x60;list_memberships&#x60;, &#x60;phone_numbers&#x60;, &#x60;street_addresses&#x60;, &#x60;notes&#x60;, &#x60;sms_channel&#x60;, and &#x60;taggings&#x60;.
357
+ # @return [Array<(GetContactById200Response, Integer, Hash)>] GetContactById200Response data, response status code and response headers
358
+ def get_contact_by_id_with_http_info(contact_id, opts = {})
359
+ if @api_client.config.debugging
360
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_contact_by_id ...'
361
+ end
362
+ # verify the required parameter 'contact_id' is set
363
+ if @api_client.config.client_side_validation && contact_id.nil?
364
+ fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.get_contact_by_id"
365
+ end
366
+ allowable_values = ["custom_fields", "list_memberships", "phone_numbers", "street_addresses", "taggings", "notes"]
367
+ if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include'])
368
+ fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}"
369
+ end
370
+ # resource path
371
+ local_var_path = '/contacts/{contact_id}'.sub('{' + 'contact_id' + '}', CGI.escape(contact_id.to_s))
372
+
373
+ # query parameters
374
+ query_params = opts[:query_params] || {}
375
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
376
+
377
+ # header parameters
378
+ header_params = opts[:header_params] || {}
379
+ # HTTP header 'Accept' (if needed)
380
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
381
+
382
+ # form parameters
383
+ form_params = opts[:form_params] || {}
384
+
385
+ # http body (model)
386
+ post_body = opts[:debug_body]
387
+
388
+ # return_type
389
+ return_type = opts[:debug_return_type] || 'GetContactById200Response'
390
+
391
+ # auth_names
392
+ auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']
393
+
394
+ new_options = opts.merge(
395
+ :operation => :"ContactsApi.get_contact_by_id",
396
+ :header_params => header_params,
397
+ :query_params => query_params,
398
+ :form_params => form_params,
399
+ :body => post_body,
400
+ :auth_names => auth_names,
401
+ :return_type => return_type
402
+ )
403
+
404
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
405
+ if @api_client.config.debugging
406
+ @api_client.config.logger.debug "API called: ContactsApi#get_contact_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
407
+ end
408
+ return data, status_code, headers
409
+ end
410
+
411
+ # GET Contact Consent Counts
412
+ # Use to get the total contacts count for the account and the total contact-consent counts for each consent state. Optionally, to include the total number of contacts that subscribed within the last 30 days in the results, use `new_subscribers` in the `include` query parameter. To optimize open rates, reduce spam reports, and help grow your business, you must value your contact's consent to receive or to not receive your emails.
413
+ # @param [Hash] opts the optional parameters
414
+ # @option opts [String] :include Use to return the total number of contacts that subscribed within the last 30 days in the results.
415
+ # @return [GetContactCounts200Response]
416
+ def get_contact_counts(opts = {})
417
+ data, _status_code, _headers = get_contact_counts_with_http_info(opts)
418
+ data
419
+ end
420
+
421
+ # GET Contact Consent Counts
422
+ # Use to get the total contacts count for the account and the total contact-consent counts for each consent state. Optionally, to include the total number of contacts that subscribed within the last 30 days in the results, use &#x60;new_subscribers&#x60; in the &#x60;include&#x60; query parameter. To optimize open rates, reduce spam reports, and help grow your business, you must value your contact&#39;s consent to receive or to not receive your emails.
423
+ # @param [Hash] opts the optional parameters
424
+ # @option opts [String] :include Use to return the total number of contacts that subscribed within the last 30 days in the results.
425
+ # @return [Array<(GetContactCounts200Response, Integer, Hash)>] GetContactCounts200Response data, response status code and response headers
426
+ def get_contact_counts_with_http_info(opts = {})
427
+ if @api_client.config.debugging
428
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_contact_counts ...'
429
+ end
430
+ allowable_values = ["new_subscriber"]
431
+ if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include'])
432
+ fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}"
433
+ end
434
+ # resource path
435
+ local_var_path = '/contacts/counts'
436
+
437
+ # query parameters
438
+ query_params = opts[:query_params] || {}
439
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
440
+
441
+ # header parameters
442
+ header_params = opts[:header_params] || {}
443
+ # HTTP header 'Accept' (if needed)
444
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
445
+
446
+ # form parameters
447
+ form_params = opts[:form_params] || {}
448
+
449
+ # http body (model)
450
+ post_body = opts[:debug_body]
451
+
452
+ # return_type
453
+ return_type = opts[:debug_return_type] || 'GetContactCounts200Response'
454
+
455
+ # auth_names
456
+ auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']
457
+
458
+ new_options = opts.merge(
459
+ :operation => :"ContactsApi.get_contact_counts",
460
+ :header_params => header_params,
461
+ :query_params => query_params,
462
+ :form_params => form_params,
463
+ :body => post_body,
464
+ :auth_names => auth_names,
465
+ :return_type => return_type
466
+ )
467
+
468
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
469
+ if @api_client.config.debugging
470
+ @api_client.config.logger.debug "API called: ContactsApi#get_contact_counts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
471
+ end
472
+ return data, status_code, headers
473
+ end
474
+
475
+ # GET a collection of V2 and V3 API contact IDs
476
+ # <div class=\"Msg Msg--warning\"><p class=\"note-text\">Use this endpoint to migrate your locally stored V2 contact ids to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.</p></div> This GET call retrieves a collection of cross-referenced contact sequence IDs (`id` used in the V2 API) and UUIDs (`contact_id` used in the V3 API). This endpoint is intended for developers who have an existing V2 API integration, and are migrating their users to a new V3 API integration. The V2 and V3 APIs use different resource ID formats. Use the `sequence_ids` query parameter to specify a set of comma delimited V2 contacts ids to cross-referenced with their V3 `contact_ids`. See [Migrating to V3](/api_guide/migration_overview.html) to learn more.
477
+ # @param sequence_ids [String] Comma delimited list of V2 API contact &#x60;ids&#x60; to cross-reference with the V3 API &#x60;contact_id&#x60; value. Endpoint accepts a maximum of 500 ids at a time.
478
+ # @param [Hash] opts the optional parameters
479
+ # @return [GetContactIdXrefs200Response]
480
+ def get_contact_id_xrefs(sequence_ids, opts = {})
481
+ data, _status_code, _headers = get_contact_id_xrefs_with_http_info(sequence_ids, opts)
482
+ data
483
+ end
484
+
485
+ # GET a collection of V2 and V3 API contact IDs
486
+ # &lt;div class&#x3D;\&quot;Msg Msg--warning\&quot;&gt;&lt;p class&#x3D;\&quot;note-text\&quot;&gt;Use this endpoint to migrate your locally stored V2 contact ids to the new V3 format. Developers are expected to use this endpoint sparingly. This endpoint is NOT intended for regular or repeated use. Constant Contact will eventually deprecate and remove this endpoint.&lt;/p&gt;&lt;/div&gt; This GET call retrieves a collection of cross-referenced contact sequence IDs (&#x60;id&#x60; used in the V2 API) and UUIDs (&#x60;contact_id&#x60; used in the V3 API). This endpoint is intended for developers who have an existing V2 API integration, and are migrating their users to a new V3 API integration. The V2 and V3 APIs use different resource ID formats. Use the &#x60;sequence_ids&#x60; query parameter to specify a set of comma delimited V2 contacts ids to cross-referenced with their V3 &#x60;contact_ids&#x60;. See [Migrating to V3](/api_guide/migration_overview.html) to learn more.
487
+ # @param sequence_ids [String] Comma delimited list of V2 API contact &#x60;ids&#x60; to cross-reference with the V3 API &#x60;contact_id&#x60; value. Endpoint accepts a maximum of 500 ids at a time.
488
+ # @param [Hash] opts the optional parameters
489
+ # @return [Array<(GetContactIdXrefs200Response, Integer, Hash)>] GetContactIdXrefs200Response data, response status code and response headers
490
+ def get_contact_id_xrefs_with_http_info(sequence_ids, opts = {})
491
+ if @api_client.config.debugging
492
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_contact_id_xrefs ...'
493
+ end
494
+ # verify the required parameter 'sequence_ids' is set
495
+ if @api_client.config.client_side_validation && sequence_ids.nil?
496
+ fail ArgumentError, "Missing the required parameter 'sequence_ids' when calling ContactsApi.get_contact_id_xrefs"
497
+ end
498
+ # resource path
499
+ local_var_path = '/contacts/contact_id_xrefs'
500
+
501
+ # query parameters
502
+ query_params = opts[:query_params] || {}
503
+ query_params[:'sequence_ids'] = sequence_ids
504
+
505
+ # header parameters
506
+ header_params = opts[:header_params] || {}
507
+ # HTTP header 'Accept' (if needed)
508
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
509
+
510
+ # form parameters
511
+ form_params = opts[:form_params] || {}
512
+
513
+ # http body (model)
514
+ post_body = opts[:debug_body]
515
+
516
+ # return_type
517
+ return_type = opts[:debug_return_type] || 'GetContactIdXrefs200Response'
518
+
519
+ # auth_names
520
+ auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']
521
+
522
+ new_options = opts.merge(
523
+ :operation => :"ContactsApi.get_contact_id_xrefs",
524
+ :header_params => header_params,
525
+ :query_params => query_params,
526
+ :form_params => form_params,
527
+ :body => post_body,
528
+ :auth_names => auth_names,
529
+ :return_type => return_type
530
+ )
531
+
532
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
533
+ if @api_client.config.debugging
534
+ @api_client.config.logger.debug "API called: ContactsApi#get_contact_id_xrefs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
535
+ end
536
+ return data, status_code, headers
537
+ end
538
+
539
+ # GET SMS Engagement History for a Contact
540
+ # Use this method to return SMS engagement details for a contact, such as SMS consent and advertising frequency details.
541
+ # @param contact_id [String] The contact&#39;s unique ID.
542
+ # @param [Hash] opts the optional parameters
543
+ # @return [Array<GetSmsEngagementHistory200ResponseInner>]
544
+ def get_sms_engagement_history(contact_id, opts = {})
545
+ data, _status_code, _headers = get_sms_engagement_history_with_http_info(contact_id, opts)
546
+ data
547
+ end
548
+
549
+ # GET SMS Engagement History for a Contact
550
+ # Use this method to return SMS engagement details for a contact, such as SMS consent and advertising frequency details.
551
+ # @param contact_id [String] The contact&#39;s unique ID.
552
+ # @param [Hash] opts the optional parameters
553
+ # @return [Array<(Array<GetSmsEngagementHistory200ResponseInner>, Integer, Hash)>] Array<GetSmsEngagementHistory200ResponseInner> data, response status code and response headers
554
+ def get_sms_engagement_history_with_http_info(contact_id, opts = {})
555
+ if @api_client.config.debugging
556
+ @api_client.config.logger.debug 'Calling API: ContactsApi.get_sms_engagement_history ...'
557
+ end
558
+ # verify the required parameter 'contact_id' is set
559
+ if @api_client.config.client_side_validation && contact_id.nil?
560
+ fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.get_sms_engagement_history"
561
+ end
562
+ # resource path
563
+ local_var_path = '/contacts/sms_engagement_history/{contact_id}'.sub('{' + 'contact_id' + '}', CGI.escape(contact_id.to_s))
564
+
565
+ # query parameters
566
+ query_params = opts[:query_params] || {}
567
+
568
+ # header parameters
569
+ header_params = opts[:header_params] || {}
570
+ # HTTP header 'Accept' (if needed)
571
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
572
+
573
+ # form parameters
574
+ form_params = opts[:form_params] || {}
575
+
576
+ # http body (model)
577
+ post_body = opts[:debug_body]
578
+
579
+ # return_type
580
+ return_type = opts[:debug_return_type] || 'Array<GetSmsEngagementHistory200ResponseInner>'
581
+
582
+ # auth_names
583
+ auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']
584
+
585
+ new_options = opts.merge(
586
+ :operation => :"ContactsApi.get_sms_engagement_history",
587
+ :header_params => header_params,
588
+ :query_params => query_params,
589
+ :form_params => form_params,
590
+ :body => post_body,
591
+ :auth_names => auth_names,
592
+ :return_type => return_type
593
+ )
594
+
595
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
596
+ if @api_client.config.debugging
597
+ @api_client.config.logger.debug "API called: ContactsApi#get_sms_engagement_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
598
+ end
599
+ return data, status_code, headers
600
+ end
601
+
602
+ # PUT (update) a Contact
603
+ # The PUT method updates an existing contact. You must include the `update_source` property in the PUT request payload. To restore a deleted contact you must specify the `update_source` as `Account`. When updating any resource using PUT, all properties are updated, overwriting all previous values. Any properties left blank or not included in the request are overwritten with null value - however this does not apply to contact subresources. Add or change any of the subresources by including them in the PUT request payload. Omitted subresources are not overwritten with null. If the contact being updated is deleted, the contact will be revived.
604
+ # @param contact_id [String] Unique ID of contact to update
605
+ # @param update_contact_request [UpdateContactRequest] JSON payload defining the contact object, with updates. Any properties left blank or not included in the PUT payload are overwritten with null value - does not apply to contact subresources.
606
+ # @param [Hash] opts the optional parameters
607
+ # @return [GetContactById200Response]
608
+ def update_contact(contact_id, update_contact_request, opts = {})
609
+ data, _status_code, _headers = update_contact_with_http_info(contact_id, update_contact_request, opts)
610
+ data
611
+ end
612
+
613
+ # PUT (update) a Contact
614
+ # The PUT method updates an existing contact. You must include the &#x60;update_source&#x60; property in the PUT request payload. To restore a deleted contact you must specify the &#x60;update_source&#x60; as &#x60;Account&#x60;. When updating any resource using PUT, all properties are updated, overwriting all previous values. Any properties left blank or not included in the request are overwritten with null value - however this does not apply to contact subresources. Add or change any of the subresources by including them in the PUT request payload. Omitted subresources are not overwritten with null. If the contact being updated is deleted, the contact will be revived.
615
+ # @param contact_id [String] Unique ID of contact to update
616
+ # @param update_contact_request [UpdateContactRequest] JSON payload defining the contact object, with updates. Any properties left blank or not included in the PUT payload are overwritten with null value - does not apply to contact subresources.
617
+ # @param [Hash] opts the optional parameters
618
+ # @return [Array<(GetContactById200Response, Integer, Hash)>] GetContactById200Response data, response status code and response headers
619
+ def update_contact_with_http_info(contact_id, update_contact_request, opts = {})
620
+ if @api_client.config.debugging
621
+ @api_client.config.logger.debug 'Calling API: ContactsApi.update_contact ...'
622
+ end
623
+ # verify the required parameter 'contact_id' is set
624
+ if @api_client.config.client_side_validation && contact_id.nil?
625
+ fail ArgumentError, "Missing the required parameter 'contact_id' when calling ContactsApi.update_contact"
626
+ end
627
+ # verify the required parameter 'update_contact_request' is set
628
+ if @api_client.config.client_side_validation && update_contact_request.nil?
629
+ fail ArgumentError, "Missing the required parameter 'update_contact_request' when calling ContactsApi.update_contact"
630
+ end
631
+ # resource path
632
+ local_var_path = '/contacts/{contact_id}'.sub('{' + 'contact_id' + '}', CGI.escape(contact_id.to_s))
633
+
634
+ # query parameters
635
+ query_params = opts[:query_params] || {}
636
+
637
+ # header parameters
638
+ header_params = opts[:header_params] || {}
639
+ # HTTP header 'Accept' (if needed)
640
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
641
+ # HTTP header 'Content-Type'
642
+ content_type = @api_client.select_header_content_type(['application/json'])
643
+ if !content_type.nil?
644
+ header_params['Content-Type'] = content_type
645
+ end
646
+
647
+ # form parameters
648
+ form_params = opts[:form_params] || {}
649
+
650
+ # http body (model)
651
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_contact_request)
652
+
653
+ # return_type
654
+ return_type = opts[:debug_return_type] || 'GetContactById200Response'
655
+
656
+ # auth_names
657
+ auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit']
658
+
659
+ new_options = opts.merge(
660
+ :operation => :"ContactsApi.update_contact",
661
+ :header_params => header_params,
662
+ :query_params => query_params,
663
+ :form_params => form_params,
664
+ :body => post_body,
665
+ :auth_names => auth_names,
666
+ :return_type => return_type
667
+ )
668
+
669
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
670
+ if @api_client.config.debugging
671
+ @api_client.config.logger.debug "API called: ContactsApi#update_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
672
+ end
673
+ return data, status_code, headers
674
+ end
675
+ end
676
+ end