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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +56 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +72 -0
- data/LICENSE +29 -0
- data/README.md +201 -0
- data/Rakefile +10 -0
- data/constant_contact_client.gemspec +39 -0
- data/docs/AccountServicesApi.md +593 -0
- data/docs/BulkActivitiesApi.md +1035 -0
- data/docs/ContactListsApi.md +461 -0
- data/docs/ContactTagsApi.md +382 -0
- data/docs/ContactsApi.md +701 -0
- data/docs/ContactsCustomFieldsApi.md +375 -0
- data/docs/ContactsReportingApi.md +244 -0
- data/docs/EmailCampaignsABTestsApi.md +227 -0
- data/docs/EmailCampaignsApi.md +826 -0
- data/docs/EmailReportingApi.md +925 -0
- data/docs/EmailSchedulingApi.md +447 -0
- data/docs/LandingPagesReportingApi.md +481 -0
- data/docs/SegmentsApi.md +452 -0
- data/lib/constant_contact_client/api/account_services_api.rb +546 -0
- data/lib/constant_contact_client/api/bulk_activities_api.rb +983 -0
- data/lib/constant_contact_client/api/contact_lists_api.rb +449 -0
- data/lib/constant_contact_client/api/contact_tags_api.rb +356 -0
- data/lib/constant_contact_client/api/contacts_api.rb +676 -0
- data/lib/constant_contact_client/api/contacts_custom_fields_api.rb +356 -0
- data/lib/constant_contact_client/api/contacts_reporting_api.rb +255 -0
- data/lib/constant_contact_client/api/email_campaigns_ab_tests_api.rb +220 -0
- data/lib/constant_contact_client/api/email_campaigns_api.rb +766 -0
- data/lib/constant_contact_client/api/email_reporting_api.rb +812 -0
- data/lib/constant_contact_client/api/email_scheduling_api.rb +418 -0
- data/lib/constant_contact_client/api/landing_pages_reporting_api.rb +436 -0
- data/lib/constant_contact_client/api/segments_api.rb +425 -0
- data/lib/constant_contact_client/api_client.rb +394 -0
- data/lib/constant_contact_client/api_error.rb +58 -0
- data/lib/constant_contact_client/configuration.rb +305 -0
- data/lib/constant_contact_client/models/ab_test_data.rb +256 -0
- data/lib/constant_contact_client/models/access_token_response.rb +265 -0
- data/lib/constant_contact_client/models/account_cancellation.rb +226 -0
- data/lib/constant_contact_client/models/account_email_create_response.rb +273 -0
- data/lib/constant_contact_client/models/account_email_input.rb +234 -0
- data/lib/constant_contact_client/models/account_physical_address.rb +409 -0
- data/lib/constant_contact_client/models/account_suspension.rb +289 -0
- data/lib/constant_contact_client/models/activities.rb +226 -0
- data/lib/constant_contact_client/models/activity.rb +316 -0
- data/lib/constant_contact_client/models/activity_delete_custom_fields.rb +297 -0
- data/lib/constant_contact_client/models/activity_delete_list_response.rb +276 -0
- data/lib/constant_contact_client/models/activity_delete_lists_response.rb +305 -0
- data/lib/constant_contact_client/models/activity_delete_status.rb +306 -0
- data/lib/constant_contact_client/models/activity_errors.rb +215 -0
- data/lib/constant_contact_client/models/activity_export_status.rb +306 -0
- data/lib/constant_contact_client/models/activity_generic.rb +299 -0
- data/lib/constant_contact_client/models/activity_generic_status.rb +225 -0
- data/lib/constant_contact_client/models/activity_import.rb +316 -0
- data/lib/constant_contact_client/models/activity_links.rb +223 -0
- data/lib/constant_contact_client/models/activity_lists_membership.rb +305 -0
- data/lib/constant_contact_client/models/activity_reference.rb +225 -0
- data/lib/constant_contact_client/models/activity_status.rb +275 -0
- data/lib/constant_contact_client/models/activity_status_export_link.rb +223 -0
- data/lib/constant_contact_client/models/activity_status_link.rb +214 -0
- data/lib/constant_contact_client/models/activity_tagging.rb +319 -0
- data/lib/constant_contact_client/models/activity_tagging_status.rb +226 -0
- data/lib/constant_contact_client/models/add_account_email_address201_response.rb +273 -0
- data/lib/constant_contact_client/models/add_account_email_address_request.rb +234 -0
- data/lib/constant_contact_client/models/api_error_schema_inner.rb +225 -0
- data/lib/constant_contact_client/models/authorization_error_schema.rb +225 -0
- data/lib/constant_contact_client/models/bounces_tracking_activities_page.rb +240 -0
- data/lib/constant_contact_client/models/bounces_tracking_activity.rb +347 -0
- data/lib/constant_contact_client/models/bulk_email_campaign_summaries_page.rb +249 -0
- data/lib/constant_contact_client/models/bulk_email_campaign_summaries_percents.rb +255 -0
- data/lib/constant_contact_client/models/bulk_email_campaign_summary.rb +272 -0
- data/lib/constant_contact_client/models/campaign_activity_stats_query_result_email.rb +229 -0
- data/lib/constant_contact_client/models/campaign_activity_stats_result_generic_stats_email_activity.rb +244 -0
- data/lib/constant_contact_client/models/campaign_activity_summary.rb +341 -0
- data/lib/constant_contact_client/models/campaign_stats_query_result_email.rb +229 -0
- data/lib/constant_contact_client/models/campaign_stats_result_generic_stats_email_percents_email.rb +243 -0
- data/lib/constant_contact_client/models/clicks_tracking_activities_page.rb +233 -0
- data/lib/constant_contact_client/models/clicks_tracking_activity.rb +364 -0
- data/lib/constant_contact_client/models/company_logo.rb +235 -0
- data/lib/constant_contact_client/models/contact_campaign_activities_summary.rb +250 -0
- data/lib/constant_contact_client/models/contact_create_or_update_input.rb +503 -0
- data/lib/constant_contact_client/models/contact_create_or_update_response.rb +225 -0
- data/lib/constant_contact_client/models/contact_custom_field.rb +259 -0
- data/lib/constant_contact_client/models/contact_delete.rb +267 -0
- data/lib/constant_contact_client/models/contact_list.rb +301 -0
- data/lib/constant_contact_client/models/contact_list_array.rb +235 -0
- data/lib/constant_contact_client/models/contact_list_put_post.rb +291 -0
- data/lib/constant_contact_client/models/contact_open_and_click_rates.rb +274 -0
- data/lib/constant_contact_client/models/contact_post_request.rb +575 -0
- data/lib/constant_contact_client/models/contact_put_request.rb +582 -0
- data/lib/constant_contact_client/models/contact_resource.rb +635 -0
- data/lib/constant_contact_client/models/contact_tracking_activities_page.rb +227 -0
- data/lib/constant_contact_client/models/contact_tracking_activity.rb +270 -0
- data/lib/constant_contact_client/models/contact_xref.rb +226 -0
- data/lib/constant_contact_client/models/contact_xrefs.rb +236 -0
- data/lib/constant_contact_client/models/contacts.rb +246 -0
- data/lib/constant_contact_client/models/contacts_counts.rb +265 -0
- data/lib/constant_contact_client/models/contacts_export.rb +300 -0
- data/lib/constant_contact_client/models/contacts_json_import.rb +281 -0
- data/lib/constant_contact_client/models/create_contact_request.rb +575 -0
- data/lib/constant_contact_client/models/create_contact_request_email_address.rb +252 -0
- data/lib/constant_contact_client/models/create_csv_import_activity201_response.rb +316 -0
- data/lib/constant_contact_client/models/create_csv_import_activity201_response_links.rb +214 -0
- data/lib/constant_contact_client/models/create_csv_import_activity201_response_status.rb +255 -0
- data/lib/constant_contact_client/models/create_delete_activity201_response.rb +306 -0
- data/lib/constant_contact_client/models/create_delete_activity201_response_links.rb +214 -0
- data/lib/constant_contact_client/models/create_delete_activity201_response_links_self.rb +215 -0
- data/lib/constant_contact_client/models/create_delete_activity201_response_status.rb +235 -0
- data/lib/constant_contact_client/models/create_delete_activity_request.rb +267 -0
- data/lib/constant_contact_client/models/create_email_campaign200_response.rb +306 -0
- data/lib/constant_contact_client/models/create_email_campaign200_response_campaign_activities_inner.rb +225 -0
- data/lib/constant_contact_client/models/create_email_campaign_request.rb +260 -0
- data/lib/constant_contact_client/models/create_email_campaign_request_email_campaign_activities_inner.rb +402 -0
- data/lib/constant_contact_client/models/create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer.rb +347 -0
- data/lib/constant_contact_client/models/create_export_activity201_response.rb +306 -0
- data/lib/constant_contact_client/models/create_export_activity201_response_status.rb +225 -0
- data/lib/constant_contact_client/models/create_export_activity_request.rb +300 -0
- data/lib/constant_contact_client/models/create_import_json_activity_request.rb +281 -0
- data/lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb +1315 -0
- data/lib/constant_contact_client/models/create_list_add_activity_request.rb +268 -0
- data/lib/constant_contact_client/models/create_list_add_activity_request_exclude.rb +217 -0
- data/lib/constant_contact_client/models/create_list_add_activity_request_source.rb +331 -0
- data/lib/constant_contact_client/models/create_list_delete_activity201_response.rb +305 -0
- data/lib/constant_contact_client/models/create_list_delete_activity201_response_links.rb +214 -0
- data/lib/constant_contact_client/models/create_list_delete_activity201_response_links_self.rb +215 -0
- data/lib/constant_contact_client/models/create_list_delete_activity201_response_status.rb +215 -0
- data/lib/constant_contact_client/models/create_list_delete_activity_request.rb +243 -0
- data/lib/constant_contact_client/models/create_list_remove_activity201_response.rb +305 -0
- data/lib/constant_contact_client/models/create_list_remove_activity201_response_status.rb +235 -0
- data/lib/constant_contact_client/models/create_list_remove_activity_request.rb +268 -0
- data/lib/constant_contact_client/models/create_list_remove_activity_request_exclude.rb +217 -0
- data/lib/constant_contact_client/models/create_list_remove_activity_request_source.rb +321 -0
- data/lib/constant_contact_client/models/create_or_update_contact200_response.rb +225 -0
- data/lib/constant_contact_client/models/create_or_update_contact_custom_field.rb +244 -0
- data/lib/constant_contact_client/models/create_or_update_contact_request.rb +503 -0
- data/lib/constant_contact_client/models/create_or_update_contact_request_custom_fields_inner.rb +244 -0
- data/lib/constant_contact_client/models/create_or_update_contact_request_street_address.rb +367 -0
- data/lib/constant_contact_client/models/create_resend_email_campaign201_response.rb +255 -0
- data/lib/constant_contact_client/models/create_resend_email_campaign_request.rb +242 -0
- data/lib/constant_contact_client/models/create_segment201_response.rb +274 -0
- data/lib/constant_contact_client/models/create_segment_request.rb +258 -0
- data/lib/constant_contact_client/models/create_tag_delete_activity_request.rb +243 -0
- data/lib/constant_contact_client/models/create_tag_remove_activity201_response.rb +319 -0
- data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links.rb +223 -0
- data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links_results.rb +215 -0
- data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links_self.rb +214 -0
- data/lib/constant_contact_client/models/create_tag_remove_activity201_response_status.rb +226 -0
- data/lib/constant_contact_client/models/create_tag_remove_activity_request.rb +268 -0
- data/lib/constant_contact_client/models/create_tag_remove_activity_request_exclude.rb +218 -0
- data/lib/constant_contact_client/models/create_tag_remove_activity_request_source.rb +319 -0
- data/lib/constant_contact_client/models/cross_reference.rb +235 -0
- data/lib/constant_contact_client/models/cross_reference_response.rb +217 -0
- data/lib/constant_contact_client/models/custom_field_id100.rb +243 -0
- data/lib/constant_contact_client/models/custom_field_input.rb +258 -0
- data/lib/constant_contact_client/models/custom_field_resource.rb +318 -0
- data/lib/constant_contact_client/models/custom_fields.rb +245 -0
- data/lib/constant_contact_client/models/customer.rb +352 -0
- data/lib/constant_contact_client/models/customer_put.rb +334 -0
- data/lib/constant_contact_client/models/delete_list202_response.rb +276 -0
- data/lib/constant_contact_client/models/delete_tag202_response.rb +299 -0
- data/lib/constant_contact_client/models/delete_tag202_response_activity_errors_inner.rb +215 -0
- data/lib/constant_contact_client/models/delete_tag202_response_links.rb +214 -0
- data/lib/constant_contact_client/models/delete_tag202_response_links_self.rb +215 -0
- data/lib/constant_contact_client/models/delete_tag202_response_status.rb +225 -0
- data/lib/constant_contact_client/models/device_flow_response.rb +265 -0
- data/lib/constant_contact_client/models/did_not_opens_tracking_activities_page.rb +233 -0
- data/lib/constant_contact_client/models/did_not_opens_tracking_activity.rb +320 -0
- data/lib/constant_contact_client/models/email_address.rb +351 -0
- data/lib/constant_contact_client/models/email_address_post.rb +252 -0
- data/lib/constant_contact_client/models/email_address_put.rb +341 -0
- data/lib/constant_contact_client/models/email_campaign.rb +306 -0
- data/lib/constant_contact_client/models/email_campaign_activity.rb +405 -0
- data/lib/constant_contact_client/models/email_campaign_activity_input.rb +402 -0
- data/lib/constant_contact_client/models/email_campaign_activity_preview.rb +285 -0
- data/lib/constant_contact_client/models/email_campaign_complete.rb +260 -0
- data/lib/constant_contact_client/models/email_campaign_name.rb +241 -0
- data/lib/constant_contact_client/models/email_campaigns.rb +294 -0
- data/lib/constant_contact_client/models/email_link_click_count.rb +265 -0
- data/lib/constant_contact_client/models/email_links.rb +227 -0
- data/lib/constant_contact_client/models/email_physical_address.rb +346 -0
- data/lib/constant_contact_client/models/email_schedule_input.rb +222 -0
- data/lib/constant_contact_client/models/email_test_send_input.rb +253 -0
- data/lib/constant_contact_client/models/emails_link.rb +214 -0
- data/lib/constant_contact_client/models/emails_paging_links.rb +214 -0
- data/lib/constant_contact_client/models/file_object.rb +384 -0
- data/lib/constant_contact_client/models/file_status_array_inner.rb +235 -0
- data/lib/constant_contact_client/models/forwards_tracking_activities_page.rb +233 -0
- data/lib/constant_contact_client/models/forwards_tracking_activity.rb +320 -0
- data/lib/constant_contact_client/models/get_ab_test_email_campaign200_response.rb +256 -0
- data/lib/constant_contact_client/models/get_account_details200_response.rb +352 -0
- data/lib/constant_contact_client/models/get_account_details200_response_company_logo.rb +236 -0
- data/lib/constant_contact_client/models/get_account_details200_response_physical_address.rb +409 -0
- data/lib/constant_contact_client/models/get_activity_by_id200_response.rb +316 -0
- data/lib/constant_contact_client/models/get_all_account_email_addresses200_response_inner.rb +317 -0
- data/lib/constant_contact_client/models/get_all_activities200_response.rb +226 -0
- data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner.rb +316 -0
- data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links.rb +223 -0
- data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links_results.rb +215 -0
- data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links_self.rb +215 -0
- data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_status.rb +275 -0
- data/lib/constant_contact_client/models/get_all_activities200_response_links.rb +214 -0
- data/lib/constant_contact_client/models/get_all_activities200_response_links_next.rb +214 -0
- data/lib/constant_contact_client/models/get_all_contacts200_response.rb +246 -0
- data/lib/constant_contact_client/models/get_all_custom_fields200_response.rb +245 -0
- data/lib/constant_contact_client/models/get_all_email_campaigns200_response.rb +225 -0
- data/lib/constant_contact_client/models/get_all_email_campaigns200_response_campaigns_inner.rb +294 -0
- data/lib/constant_contact_client/models/get_all_email_campaigns200_response_links.rb +214 -0
- data/lib/constant_contact_client/models/get_all_lists200_response.rb +235 -0
- data/lib/constant_contact_client/models/get_all_segments200_response.rb +233 -0
- data/lib/constant_contact_client/models/get_all_segments200_response_links.rb +222 -0
- data/lib/constant_contact_client/models/get_all_segments200_response_links_next.rb +223 -0
- data/lib/constant_contact_client/models/get_all_segments200_response_segments_inner.rb +245 -0
- data/lib/constant_contact_client/models/get_all_tags200_response.rb +226 -0
- data/lib/constant_contact_client/models/get_all_tags200_response_links.rb +215 -0
- data/lib/constant_contact_client/models/get_all_tags200_response_links_next.rb +224 -0
- data/lib/constant_contact_client/models/get_all_tags200_response_links_next_next.rb +223 -0
- data/lib/constant_contact_client/models/get_bounces_report200_response.rb +240 -0
- data/lib/constant_contact_client/models/get_bounces_report200_response_links.rb +222 -0
- data/lib/constant_contact_client/models/get_bounces_report200_response_tracking_activities_inner.rb +347 -0
- data/lib/constant_contact_client/models/get_campaign_activity_link_report200_response.rb +227 -0
- data/lib/constant_contact_client/models/get_campaign_activity_link_report200_response_link_click_counts_inner.rb +265 -0
- data/lib/constant_contact_client/models/get_clicks_report200_response.rb +233 -0
- data/lib/constant_contact_client/models/get_clicks_report200_response_links.rb +222 -0
- data/lib/constant_contact_client/models/get_clicks_report200_response_tracking_activities_inner.rb +364 -0
- data/lib/constant_contact_client/models/get_contact_adds200_response.rb +240 -0
- data/lib/constant_contact_client/models/get_contact_adds200_response_tracking_activities_inner.rb +329 -0
- data/lib/constant_contact_client/models/get_contact_by_id200_response.rb +635 -0
- data/lib/constant_contact_client/models/get_contact_by_id200_response_custom_fields_inner.rb +259 -0
- data/lib/constant_contact_client/models/get_contact_by_id200_response_email_address.rb +351 -0
- data/lib/constant_contact_client/models/get_contact_by_id200_response_notes_inner.rb +255 -0
- data/lib/constant_contact_client/models/get_contact_by_id200_response_phone_numbers_inner.rb +294 -0
- data/lib/constant_contact_client/models/get_contact_by_id200_response_sms_channel.rb +278 -0
- data/lib/constant_contact_client/models/get_contact_by_id200_response_sms_channel_sms_channel_consents_inner.rb +285 -0
- data/lib/constant_contact_client/models/get_contact_by_id200_response_street_addresses_inner.rb +397 -0
- data/lib/constant_contact_client/models/get_contact_counts200_response.rb +265 -0
- data/lib/constant_contact_client/models/get_contact_id_xrefs200_response.rb +236 -0
- data/lib/constant_contact_client/models/get_contact_id_xrefs200_response_xrefs_inner.rb +226 -0
- data/lib/constant_contact_client/models/get_contact_open_click_rate_report200_response.rb +274 -0
- data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response.rb +250 -0
- data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response_campaign_activities_inner.rb +341 -0
- data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response_links.rb +222 -0
- data/lib/constant_contact_client/models/get_contact_tracking_report200_response.rb +227 -0
- data/lib/constant_contact_client/models/get_contact_tracking_report200_response_links.rb +222 -0
- data/lib/constant_contact_client/models/get_contact_tracking_report200_response_links_next.rb +223 -0
- data/lib/constant_contact_client/models/get_contact_tracking_report200_response_tracking_activities_inner.rb +270 -0
- data/lib/constant_contact_client/models/get_custom_field200_response.rb +318 -0
- data/lib/constant_contact_client/models/get_did_not_opens_report200_response.rb +233 -0
- data/lib/constant_contact_client/models/get_did_not_opens_report200_response_tracking_activities_inner.rb +320 -0
- data/lib/constant_contact_client/models/get_email_campaign_activity200_response.rb +405 -0
- data/lib/constant_contact_client/models/get_email_campaign_activity200_response_document_properties.rb +520 -0
- data/lib/constant_contact_client/models/get_email_campaign_activity200_response_physical_address_in_footer.rb +347 -0
- data/lib/constant_contact_client/models/get_email_campaign_activity_preview200_response.rb +285 -0
- data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response.rb +229 -0
- data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response_results_inner.rb +244 -0
- data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response_results_inner_stats.rb +476 -0
- data/lib/constant_contact_client/models/get_email_campaign_activity_schedule200_response_inner.rb +215 -0
- data/lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb +298 -0
- data/lib/constant_contact_client/models/get_email_campaign_report200_response.rb +249 -0
- data/lib/constant_contact_client/models/get_email_campaign_report200_response_aggregate_percents.rb +256 -0
- data/lib/constant_contact_client/models/get_email_campaign_report200_response_bulk_email_campaign_summaries_inner.rb +272 -0
- data/lib/constant_contact_client/models/get_email_campaign_report200_response_bulk_email_campaign_summaries_inner_unique_counts.rb +342 -0
- data/lib/constant_contact_client/models/get_email_campaign_xrefs200_response.rb +217 -0
- data/lib/constant_contact_client/models/get_email_campaign_xrefs200_response_xrefs_inner.rb +235 -0
- data/lib/constant_contact_client/models/get_email_opens_report200_response.rb +233 -0
- data/lib/constant_contact_client/models/get_email_opens_report200_response_tracking_activities_inner.rb +330 -0
- data/lib/constant_contact_client/models/get_email_sends_report200_response.rb +233 -0
- data/lib/constant_contact_client/models/get_email_sends_report200_response_links.rb +222 -0
- data/lib/constant_contact_client/models/get_email_sends_report200_response_tracking_activities_inner.rb +320 -0
- data/lib/constant_contact_client/models/get_email_stats_report200_response.rb +229 -0
- data/lib/constant_contact_client/models/get_email_stats_report200_response_errors_inner.rb +225 -0
- data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner.rb +243 -0
- data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner_percents.rb +296 -0
- data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner_stats.rb +396 -0
- data/lib/constant_contact_client/models/get_forwards_report200_response.rb +233 -0
- data/lib/constant_contact_client/models/get_forwards_report200_response_tracking_activities_inner.rb +320 -0
- data/lib/constant_contact_client/models/get_list200_response.rb +301 -0
- data/lib/constant_contact_client/models/get_list_id_xrefs200_response.rb +236 -0
- data/lib/constant_contact_client/models/get_list_id_xrefs200_response_xrefs_inner.rb +226 -0
- data/lib/constant_contact_client/models/get_optouts_report200_response.rb +240 -0
- data/lib/constant_contact_client/models/get_optouts_report200_response_tracking_activities_inner.rb +330 -0
- data/lib/constant_contact_client/models/get_resend_email_campaign200_response_inner.rb +265 -0
- data/lib/constant_contact_client/models/get_sms_engagement_history200_response_inner.rb +255 -0
- data/lib/constant_contact_client/models/get_sms_engagement_history200_response_inner_history_details.rb +316 -0
- data/lib/constant_contact_client/models/get_tag200_response.rb +265 -0
- data/lib/constant_contact_client/models/get_unique_contact_clicks200_response.rb +240 -0
- data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_links.rb +222 -0
- data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_links_next.rb +223 -0
- data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_tracking_activities_inner.rb +366 -0
- data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel.rb +246 -0
- data/lib/constant_contact_client/models/get_unique_contact_opens200_response.rb +240 -0
- data/lib/constant_contact_client/models/get_unique_contact_opens200_response_tracking_activities_inner.rb +339 -0
- data/lib/constant_contact_client/models/get_unique_contact_sms_opt_ins200_response.rb +240 -0
- data/lib/constant_contact_client/models/get_unique_contact_sms_opt_ins200_response_tracking_activities_inner.rb +329 -0
- data/lib/constant_contact_client/models/get_unique_contact_updates200_response.rb +240 -0
- data/lib/constant_contact_client/models/get_unique_contact_updates200_response_tracking_activities_inner.rb +329 -0
- data/lib/constant_contact_client/models/get_user_privileges200_response_inner.rb +225 -0
- data/lib/constant_contact_client/models/headers_object.rb +225 -0
- data/lib/constant_contact_client/models/history_details.rb +316 -0
- data/lib/constant_contact_client/models/json_import_contact.rb +1315 -0
- data/lib/constant_contact_client/models/link.rb +214 -0
- data/lib/constant_contact_client/models/links.rb +221 -0
- data/lib/constant_contact_client/models/list_activity_add_contacts.rb +268 -0
- data/lib/constant_contact_client/models/list_activity_remove_contacts.rb +268 -0
- data/lib/constant_contact_client/models/list_id_list100.rb +243 -0
- data/lib/constant_contact_client/models/list_input.rb +263 -0
- data/lib/constant_contact_client/models/list_xref.rb +226 -0
- data/lib/constant_contact_client/models/list_xrefs.rb +236 -0
- data/lib/constant_contact_client/models/lpreporting_links.rb +221 -0
- data/lib/constant_contact_client/models/lpreporting_next.rb +222 -0
- data/lib/constant_contact_client/models/model_next.rb +222 -0
- data/lib/constant_contact_client/models/my_library_file_collection_inner.rb +384 -0
- data/lib/constant_contact_client/models/my_library_file_collection_inner_thumbnail.rb +235 -0
- data/lib/constant_contact_client/models/note.rb +255 -0
- data/lib/constant_contact_client/models/o_auth_error.rb +223 -0
- data/lib/constant_contact_client/models/opens_tracking_activities_page.rb +233 -0
- data/lib/constant_contact_client/models/opens_tracking_activity.rb +330 -0
- data/lib/constant_contact_client/models/optouts_tracking_activities_page.rb +240 -0
- data/lib/constant_contact_client/models/optouts_tracking_activity.rb +330 -0
- data/lib/constant_contact_client/models/p_contact_add_tracking_activities_page.rb +240 -0
- data/lib/constant_contact_client/models/p_contact_add_tracking_activity.rb +329 -0
- data/lib/constant_contact_client/models/p_contact_click_tracking_activities_page.rb +240 -0
- data/lib/constant_contact_client/models/p_contact_click_tracking_activity.rb +366 -0
- data/lib/constant_contact_client/models/p_contact_open_tracking_activity.rb +339 -0
- data/lib/constant_contact_client/models/p_contact_opens_tracking_activities_page.rb +240 -0
- data/lib/constant_contact_client/models/p_contact_sms_opt_in_tracking_activities_page.rb +240 -0
- data/lib/constant_contact_client/models/p_contact_sms_opt_in_tracking_activity.rb +329 -0
- data/lib/constant_contact_client/models/p_contact_update_tracking_activities_page.rb +240 -0
- data/lib/constant_contact_client/models/p_contact_update_tracking_activity.rb +329 -0
- data/lib/constant_contact_client/models/paged_email_campaign_response.rb +225 -0
- data/lib/constant_contact_client/models/pagination_links.rb +214 -0
- data/lib/constant_contact_client/models/pagination_links_next.rb +215 -0
- data/lib/constant_contact_client/models/paging_links.rb +214 -0
- data/lib/constant_contact_client/models/partner_account.rb +233 -0
- data/lib/constant_contact_client/models/partner_account_links.rb +215 -0
- data/lib/constant_contact_client/models/partner_account_operations_request.rb +286 -0
- data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_headers_inner.rb +225 -0
- data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_path_parameters_inner.rb +225 -0
- data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_query_parameters_inner.rb +225 -0
- data/lib/constant_contact_client/models/partner_account_site_owner_list_inner.rb +265 -0
- data/lib/constant_contact_client/models/partners_link.rb +214 -0
- data/lib/constant_contact_client/models/patch_email_campaign_name_request.rb +241 -0
- data/lib/constant_contact_client/models/path_param_object.rb +225 -0
- data/lib/constant_contact_client/models/percents_email.rb +295 -0
- data/lib/constant_contact_client/models/phone_number.rb +294 -0
- data/lib/constant_contact_client/models/phone_number_put.rb +244 -0
- data/lib/constant_contact_client/models/plan_info.rb +236 -0
- data/lib/constant_contact_client/models/plan_tiers_object.rb +248 -0
- data/lib/constant_contact_client/models/plan_tiers_object_current_tiers_inner.rb +278 -0
- data/lib/constant_contact_client/models/post_custom_field_delete201_response.rb +297 -0
- data/lib/constant_contact_client/models/post_custom_field_delete_request.rb +243 -0
- data/lib/constant_contact_client/models/post_tag_request.rb +260 -0
- data/lib/constant_contact_client/models/provision.rb +723 -0
- data/lib/constant_contact_client/models/provision_response.rb +225 -0
- data/lib/constant_contact_client/models/put_tag_request.rb +250 -0
- data/lib/constant_contact_client/models/query_param_object.rb +225 -0
- data/lib/constant_contact_client/models/reporting_links.rb +221 -0
- data/lib/constant_contact_client/models/reporting_next.rb +222 -0
- data/lib/constant_contact_client/models/resend_to_non_openers_input.rb +242 -0
- data/lib/constant_contact_client/models/resend_to_non_openers_object.rb +255 -0
- data/lib/constant_contact_client/models/schedule_email_campaign_activity_request.rb +222 -0
- data/lib/constant_contact_client/models/segment_data.rb +258 -0
- data/lib/constant_contact_client/models/segment_detail.rb +274 -0
- data/lib/constant_contact_client/models/segment_master.rb +245 -0
- data/lib/constant_contact_client/models/segment_name.rb +222 -0
- data/lib/constant_contact_client/models/segments_dto.rb +233 -0
- data/lib/constant_contact_client/models/sends_tracking_activities_page.rb +233 -0
- data/lib/constant_contact_client/models/sends_tracking_activity.rb +320 -0
- data/lib/constant_contact_client/models/sms_channel_consent_details.rb +285 -0
- data/lib/constant_contact_client/models/sso_user.rb +439 -0
- data/lib/constant_contact_client/models/stats_email.rb +395 -0
- data/lib/constant_contact_client/models/stats_email_activity.rb +475 -0
- data/lib/constant_contact_client/models/stats_error.rb +225 -0
- data/lib/constant_contact_client/models/street_address.rb +397 -0
- data/lib/constant_contact_client/models/street_address_put.rb +367 -0
- data/lib/constant_contact_client/models/tag.rb +265 -0
- data/lib/constant_contact_client/models/tag_add_remove_contacts.rb +268 -0
- data/lib/constant_contact_client/models/tag_id_list500_limit.rb +243 -0
- data/lib/constant_contact_client/models/tag_post.rb +260 -0
- data/lib/constant_contact_client/models/tag_put.rb +250 -0
- data/lib/constant_contact_client/models/tags.rb +226 -0
- data/lib/constant_contact_client/models/tags_activity_links.rb +214 -0
- data/lib/constant_contact_client/models/tags_links.rb +223 -0
- data/lib/constant_contact_client/models/tags_paging_links.rb +214 -0
- data/lib/constant_contact_client/models/test_send_email_campaign_activity_request.rb +253 -0
- data/lib/constant_contact_client/models/tier_object.rb +278 -0
- data/lib/constant_contact_client/models/tracking_activity_sms_channel_dto.rb +245 -0
- data/lib/constant_contact_client/models/unique_email_counts.rb +341 -0
- data/lib/constant_contact_client/models/update_account_request.rb +334 -0
- data/lib/constant_contact_client/models/update_contact_request.rb +582 -0
- data/lib/constant_contact_client/models/update_contact_request_email_address.rb +341 -0
- data/lib/constant_contact_client/models/update_contact_request_phone_numbers_inner.rb +244 -0
- data/lib/constant_contact_client/models/update_contact_request_street_addresses_inner.rb +367 -0
- data/lib/constant_contact_client/models/update_custom_field_request.rb +258 -0
- data/lib/constant_contact_client/models/update_list200_response.rb +291 -0
- data/lib/constant_contact_client/models/update_list_request.rb +263 -0
- data/lib/constant_contact_client/models/update_segment_name_request.rb +222 -0
- data/lib/constant_contact_client/models/webhooks_subscription_body.rb +215 -0
- data/lib/constant_contact_client/models/webhooks_subscription_collection_inner.rb +245 -0
- data/lib/constant_contact_client/models/webhooks_subscription_put_resp.rb +225 -0
- data/lib/constant_contact_client/models/webhooks_subscription_response.rb +245 -0
- data/lib/constant_contact_client/models/webhooks_test_send.rb +245 -0
- data/lib/constant_contact_client/version.rb +15 -0
- data/lib/constant_contact_client.rb +417 -0
- data/spec/spec_helper.rb +111 -0
- metadata +488 -0
data/docs/SegmentsApi.md
ADDED
@@ -0,0 +1,452 @@
|
|
1
|
+
# ConstantContactClient::SegmentsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cc.email/v3*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**create_segment**](SegmentsApi.md#create_segment) | **POST** /segments | POST (create) a Segment |
|
8
|
+
| [**delete_segment**](SegmentsApi.md#delete_segment) | **DELETE** /segments/{segment_id} | DELETE a Segment |
|
9
|
+
| [**get_all_segments**](SegmentsApi.md#get_all_segments) | **GET** /segments | GET all Segments |
|
10
|
+
| [**get_segment_by_id**](SegmentsApi.md#get_segment_by_id) | **GET** /segments/{segment_id} | GET a Segment's Details |
|
11
|
+
| [**update_segment**](SegmentsApi.md#update_segment) | **PUT** /segments/{segment_id} | PUT (update) a Segment |
|
12
|
+
| [**update_segment_name**](SegmentsApi.md#update_segment_name) | **PATCH** /segments/{segment_id}/name | PATCH (rename) a Segment |
|
13
|
+
|
14
|
+
|
15
|
+
## create_segment
|
16
|
+
|
17
|
+
> <CreateSegment201Response> create_segment(create_segment_request)
|
18
|
+
|
19
|
+
POST (create) a Segment
|
20
|
+
|
21
|
+
Use this method to create a new segment. You create segments to target a subset of your contacts that meet your specific criteria for a marketing campaign. The segment `name` must be unique. The `segment_criteria` requires single-string escaped JSON. Constant Contact uses the contact data that you specify in the `segment_criteria` to evaluate and identify the contacts you want to target. Contact data can be grouped from different data sources, including: - **`tracking`**: Supports **or** and **and** groups. - **`contact`**: Supports **or** and **and** groups. - **`list_membership`**: Supports **or** groups. - **`tags`**: Supports **or** groups. If you do not specify `list_membership` as criteria, Constant Contact evaluates all contacts in your account. To avoid returning a 400 error response, when specifying the `segment_criteria` do not request more than 500 email campaigns or a date range greater than 1825 days (5 years) be evaluated. For more use case information, see the [Segments Overview](/api_guide/segments_overview.html) in the API guide.
|
22
|
+
|
23
|
+
### Examples
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'time'
|
27
|
+
require 'constant_contact_client'
|
28
|
+
# setup authorization
|
29
|
+
ConstantContactClient.configure do |config|
|
30
|
+
# Configure OAuth2 access token for authorization: oauth2_access_code
|
31
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
32
|
+
|
33
|
+
# Configure OAuth2 access token for authorization: oauth2_implicit
|
34
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
35
|
+
end
|
36
|
+
|
37
|
+
api_instance = ConstantContactClient::SegmentsApi.new
|
38
|
+
create_segment_request = ConstantContactClient::CreateSegmentRequest.new({name: 'Re-engage contacts who did not open the last 5 email campaign activities.', segment_criteria: '{"version":"1.0.0","criteria":{"type":"and","group":[{"source":"tracking","field":"not_opened","op":"contains-any","const_value":"last-n-campaigns","param":"5"}]}}'}) # CreateSegmentRequest | The segment `name` and `segment_criteria` (requires single-string escaped JSON).
|
39
|
+
|
40
|
+
begin
|
41
|
+
# POST (create) a Segment
|
42
|
+
result = api_instance.create_segment(create_segment_request)
|
43
|
+
p result
|
44
|
+
rescue ConstantContactClient::ApiError => e
|
45
|
+
puts "Error when calling SegmentsApi->create_segment: #{e}"
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
49
|
+
#### Using the create_segment_with_http_info variant
|
50
|
+
|
51
|
+
This returns an Array which contains the response data, status code and headers.
|
52
|
+
|
53
|
+
> <Array(<CreateSegment201Response>, Integer, Hash)> create_segment_with_http_info(create_segment_request)
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
begin
|
57
|
+
# POST (create) a Segment
|
58
|
+
data, status_code, headers = api_instance.create_segment_with_http_info(create_segment_request)
|
59
|
+
p status_code # => 2xx
|
60
|
+
p headers # => { ... }
|
61
|
+
p data # => <CreateSegment201Response>
|
62
|
+
rescue ConstantContactClient::ApiError => e
|
63
|
+
puts "Error when calling SegmentsApi->create_segment_with_http_info: #{e}"
|
64
|
+
end
|
65
|
+
```
|
66
|
+
|
67
|
+
### Parameters
|
68
|
+
|
69
|
+
| Name | Type | Description | Notes |
|
70
|
+
| ---- | ---- | ----------- | ----- |
|
71
|
+
| **create_segment_request** | [**CreateSegmentRequest**](CreateSegmentRequest.md) | The segment `name` and `segment_criteria` (requires single-string escaped JSON). | |
|
72
|
+
|
73
|
+
### Return type
|
74
|
+
|
75
|
+
[**CreateSegment201Response**](CreateSegment201Response.md)
|
76
|
+
|
77
|
+
### Authorization
|
78
|
+
|
79
|
+
[oauth2_access_code](../README.md#oauth2_access_code), [oauth2_implicit](../README.md#oauth2_implicit)
|
80
|
+
|
81
|
+
### HTTP request headers
|
82
|
+
|
83
|
+
- **Content-Type**: application/json
|
84
|
+
- **Accept**: application/json
|
85
|
+
|
86
|
+
|
87
|
+
## delete_segment
|
88
|
+
|
89
|
+
> delete_segment(segment_id)
|
90
|
+
|
91
|
+
DELETE a Segment
|
92
|
+
|
93
|
+
Use this method to delete a segment from your account. Before deleting a segment, verify that the segment is not associated with a scheduled campaign. Deleted segments do not display in the results when using the `GET /segments` endpoint. If you know the `segment_id`, you can use the `GET /segments/{segment_id}` endpoint to view the deleted segment's details. A segment's details are preserved for external reference purposes, such as displaying the segment name in a campaign's history. For more use case information, see [Delete a Segment](/api_guide/segment_delete.html) in the API guide.
|
94
|
+
|
95
|
+
### Examples
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
require 'time'
|
99
|
+
require 'constant_contact_client'
|
100
|
+
# setup authorization
|
101
|
+
ConstantContactClient.configure do |config|
|
102
|
+
# Configure OAuth2 access token for authorization: oauth2_access_code
|
103
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
104
|
+
|
105
|
+
# Configure OAuth2 access token for authorization: oauth2_implicit
|
106
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
107
|
+
end
|
108
|
+
|
109
|
+
api_instance = ConstantContactClient::SegmentsApi.new
|
110
|
+
segment_id = 14 # Integer | The system generated ID that uniquely identifies the segment.
|
111
|
+
|
112
|
+
begin
|
113
|
+
# DELETE a Segment
|
114
|
+
api_instance.delete_segment(segment_id)
|
115
|
+
rescue ConstantContactClient::ApiError => e
|
116
|
+
puts "Error when calling SegmentsApi->delete_segment: #{e}"
|
117
|
+
end
|
118
|
+
```
|
119
|
+
|
120
|
+
#### Using the delete_segment_with_http_info variant
|
121
|
+
|
122
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
123
|
+
|
124
|
+
> <Array(nil, Integer, Hash)> delete_segment_with_http_info(segment_id)
|
125
|
+
|
126
|
+
```ruby
|
127
|
+
begin
|
128
|
+
# DELETE a Segment
|
129
|
+
data, status_code, headers = api_instance.delete_segment_with_http_info(segment_id)
|
130
|
+
p status_code # => 2xx
|
131
|
+
p headers # => { ... }
|
132
|
+
p data # => nil
|
133
|
+
rescue ConstantContactClient::ApiError => e
|
134
|
+
puts "Error when calling SegmentsApi->delete_segment_with_http_info: #{e}"
|
135
|
+
end
|
136
|
+
```
|
137
|
+
|
138
|
+
### Parameters
|
139
|
+
|
140
|
+
| Name | Type | Description | Notes |
|
141
|
+
| ---- | ---- | ----------- | ----- |
|
142
|
+
| **segment_id** | **Integer** | The system generated ID that uniquely identifies the segment. | |
|
143
|
+
|
144
|
+
### Return type
|
145
|
+
|
146
|
+
nil (empty response body)
|
147
|
+
|
148
|
+
### Authorization
|
149
|
+
|
150
|
+
[oauth2_access_code](../README.md#oauth2_access_code), [oauth2_implicit](../README.md#oauth2_implicit)
|
151
|
+
|
152
|
+
### HTTP request headers
|
153
|
+
|
154
|
+
- **Content-Type**: Not defined
|
155
|
+
- **Accept**: Not defined
|
156
|
+
|
157
|
+
|
158
|
+
## get_all_segments
|
159
|
+
|
160
|
+
> <GetAllSegments200Response> get_all_segments(opts)
|
161
|
+
|
162
|
+
GET all Segments
|
163
|
+
|
164
|
+
Use this method to get a list of all segments associated with the account. You can sort segment results and limit the number of segments that display per page. Deleted segments are excluded from the results. For more use case information, see [Get All Segments](/api_guide/segment_get_all.html) in the API guide.
|
165
|
+
|
166
|
+
### Examples
|
167
|
+
|
168
|
+
```ruby
|
169
|
+
require 'time'
|
170
|
+
require 'constant_contact_client'
|
171
|
+
# setup authorization
|
172
|
+
ConstantContactClient.configure do |config|
|
173
|
+
# Configure OAuth2 access token for authorization: oauth2_access_code
|
174
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
175
|
+
|
176
|
+
# Configure OAuth2 access token for authorization: oauth2_implicit
|
177
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
178
|
+
end
|
179
|
+
|
180
|
+
api_instance = ConstantContactClient::SegmentsApi.new
|
181
|
+
opts = {
|
182
|
+
limit: '1000', # String | The number of segments to return on a page.
|
183
|
+
sort_by: 'sort_by=date' # String | Specify the segment sort order to use. Sort by name (`sort_by=name`) in ascending order, or sort by date (`sort_by=date`) in descending order with the most recently updated segments listed first.
|
184
|
+
}
|
185
|
+
|
186
|
+
begin
|
187
|
+
# GET all Segments
|
188
|
+
result = api_instance.get_all_segments(opts)
|
189
|
+
p result
|
190
|
+
rescue ConstantContactClient::ApiError => e
|
191
|
+
puts "Error when calling SegmentsApi->get_all_segments: #{e}"
|
192
|
+
end
|
193
|
+
```
|
194
|
+
|
195
|
+
#### Using the get_all_segments_with_http_info variant
|
196
|
+
|
197
|
+
This returns an Array which contains the response data, status code and headers.
|
198
|
+
|
199
|
+
> <Array(<GetAllSegments200Response>, Integer, Hash)> get_all_segments_with_http_info(opts)
|
200
|
+
|
201
|
+
```ruby
|
202
|
+
begin
|
203
|
+
# GET all Segments
|
204
|
+
data, status_code, headers = api_instance.get_all_segments_with_http_info(opts)
|
205
|
+
p status_code # => 2xx
|
206
|
+
p headers # => { ... }
|
207
|
+
p data # => <GetAllSegments200Response>
|
208
|
+
rescue ConstantContactClient::ApiError => e
|
209
|
+
puts "Error when calling SegmentsApi->get_all_segments_with_http_info: #{e}"
|
210
|
+
end
|
211
|
+
```
|
212
|
+
|
213
|
+
### Parameters
|
214
|
+
|
215
|
+
| Name | Type | Description | Notes |
|
216
|
+
| ---- | ---- | ----------- | ----- |
|
217
|
+
| **limit** | **String** | The number of segments to return on a page. | [optional][default to '1000'] |
|
218
|
+
| **sort_by** | **String** | Specify the segment sort order to use. Sort by name (`sort_by=name`) in ascending order, or sort by date (`sort_by=date`) in descending order with the most recently updated segments listed first. | [optional][default to 'date'] |
|
219
|
+
|
220
|
+
### Return type
|
221
|
+
|
222
|
+
[**GetAllSegments200Response**](GetAllSegments200Response.md)
|
223
|
+
|
224
|
+
### Authorization
|
225
|
+
|
226
|
+
[oauth2_access_code](../README.md#oauth2_access_code), [oauth2_implicit](../README.md#oauth2_implicit)
|
227
|
+
|
228
|
+
### HTTP request headers
|
229
|
+
|
230
|
+
- **Content-Type**: Not defined
|
231
|
+
- **Accept**: application/json
|
232
|
+
|
233
|
+
|
234
|
+
## get_segment_by_id
|
235
|
+
|
236
|
+
> <CreateSegment201Response> get_segment_by_id(segment_id)
|
237
|
+
|
238
|
+
GET a Segment's Details
|
239
|
+
|
240
|
+
Use this method to get details about a segment, including the segment criteria. If you know the `segment_id` You can also use this method to get details about a deleted segment. For more use case information, see [Get a Segment's Details](/api_guide/segment_get.html) in the API guide.
|
241
|
+
|
242
|
+
### Examples
|
243
|
+
|
244
|
+
```ruby
|
245
|
+
require 'time'
|
246
|
+
require 'constant_contact_client'
|
247
|
+
# setup authorization
|
248
|
+
ConstantContactClient.configure do |config|
|
249
|
+
# Configure OAuth2 access token for authorization: oauth2_access_code
|
250
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
251
|
+
|
252
|
+
# Configure OAuth2 access token for authorization: oauth2_implicit
|
253
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
254
|
+
end
|
255
|
+
|
256
|
+
api_instance = ConstantContactClient::SegmentsApi.new
|
257
|
+
segment_id = 14 # Integer | The system-generated unique ID that identifies a segment.
|
258
|
+
|
259
|
+
begin
|
260
|
+
# GET a Segment's Details
|
261
|
+
result = api_instance.get_segment_by_id(segment_id)
|
262
|
+
p result
|
263
|
+
rescue ConstantContactClient::ApiError => e
|
264
|
+
puts "Error when calling SegmentsApi->get_segment_by_id: #{e}"
|
265
|
+
end
|
266
|
+
```
|
267
|
+
|
268
|
+
#### Using the get_segment_by_id_with_http_info variant
|
269
|
+
|
270
|
+
This returns an Array which contains the response data, status code and headers.
|
271
|
+
|
272
|
+
> <Array(<CreateSegment201Response>, Integer, Hash)> get_segment_by_id_with_http_info(segment_id)
|
273
|
+
|
274
|
+
```ruby
|
275
|
+
begin
|
276
|
+
# GET a Segment's Details
|
277
|
+
data, status_code, headers = api_instance.get_segment_by_id_with_http_info(segment_id)
|
278
|
+
p status_code # => 2xx
|
279
|
+
p headers # => { ... }
|
280
|
+
p data # => <CreateSegment201Response>
|
281
|
+
rescue ConstantContactClient::ApiError => e
|
282
|
+
puts "Error when calling SegmentsApi->get_segment_by_id_with_http_info: #{e}"
|
283
|
+
end
|
284
|
+
```
|
285
|
+
|
286
|
+
### Parameters
|
287
|
+
|
288
|
+
| Name | Type | Description | Notes |
|
289
|
+
| ---- | ---- | ----------- | ----- |
|
290
|
+
| **segment_id** | **Integer** | The system-generated unique ID that identifies a segment. | |
|
291
|
+
|
292
|
+
### Return type
|
293
|
+
|
294
|
+
[**CreateSegment201Response**](CreateSegment201Response.md)
|
295
|
+
|
296
|
+
### Authorization
|
297
|
+
|
298
|
+
[oauth2_access_code](../README.md#oauth2_access_code), [oauth2_implicit](../README.md#oauth2_implicit)
|
299
|
+
|
300
|
+
### HTTP request headers
|
301
|
+
|
302
|
+
- **Content-Type**: Not defined
|
303
|
+
- **Accept**: application/json
|
304
|
+
|
305
|
+
|
306
|
+
## update_segment
|
307
|
+
|
308
|
+
> <CreateSegment201Response> update_segment(segment_id, create_segment_request)
|
309
|
+
|
310
|
+
PUT (update) a Segment
|
311
|
+
|
312
|
+
Use this method to update an existing segment's name (`name`) and/or contact selection criteria (`segment_criteria`). You must specify both the `name` and the `segment_criteria` in the request body, even if you don't plan to update both. The segment's name must be unique and the JSON must be valid (requires single-string escaped JSON). To avoid returning a 400 error response, when specifying the `segment_criteria` do not request more than 500 email campaigns or a date range greater than 1825 days (5 years) be evaluated. For more use case information, see [Update Segment Details](/api_guide/segment_update.html) in the API guide.
|
313
|
+
|
314
|
+
### Examples
|
315
|
+
|
316
|
+
```ruby
|
317
|
+
require 'time'
|
318
|
+
require 'constant_contact_client'
|
319
|
+
# setup authorization
|
320
|
+
ConstantContactClient.configure do |config|
|
321
|
+
# Configure OAuth2 access token for authorization: oauth2_access_code
|
322
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
323
|
+
|
324
|
+
# Configure OAuth2 access token for authorization: oauth2_implicit
|
325
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
326
|
+
end
|
327
|
+
|
328
|
+
api_instance = ConstantContactClient::SegmentsApi.new
|
329
|
+
segment_id = 14 # Integer | The system generated ID that uniquely identifies the segment that you want to modify.
|
330
|
+
create_segment_request = ConstantContactClient::CreateSegmentRequest.new({name: 'Re-engage contacts who did not open the last 5 email campaign activities.', segment_criteria: '{"version":"1.0.0","criteria":{"type":"and","group":[{"source":"tracking","field":"not_opened","op":"contains-any","const_value":"last-n-campaigns","param":"5"}]}}'}) # CreateSegmentRequest | Include both the `name` and `segment_criteria` (single-string escaped JSON) in the body request, then make updates to either or both.
|
331
|
+
|
332
|
+
begin
|
333
|
+
# PUT (update) a Segment
|
334
|
+
result = api_instance.update_segment(segment_id, create_segment_request)
|
335
|
+
p result
|
336
|
+
rescue ConstantContactClient::ApiError => e
|
337
|
+
puts "Error when calling SegmentsApi->update_segment: #{e}"
|
338
|
+
end
|
339
|
+
```
|
340
|
+
|
341
|
+
#### Using the update_segment_with_http_info variant
|
342
|
+
|
343
|
+
This returns an Array which contains the response data, status code and headers.
|
344
|
+
|
345
|
+
> <Array(<CreateSegment201Response>, Integer, Hash)> update_segment_with_http_info(segment_id, create_segment_request)
|
346
|
+
|
347
|
+
```ruby
|
348
|
+
begin
|
349
|
+
# PUT (update) a Segment
|
350
|
+
data, status_code, headers = api_instance.update_segment_with_http_info(segment_id, create_segment_request)
|
351
|
+
p status_code # => 2xx
|
352
|
+
p headers # => { ... }
|
353
|
+
p data # => <CreateSegment201Response>
|
354
|
+
rescue ConstantContactClient::ApiError => e
|
355
|
+
puts "Error when calling SegmentsApi->update_segment_with_http_info: #{e}"
|
356
|
+
end
|
357
|
+
```
|
358
|
+
|
359
|
+
### Parameters
|
360
|
+
|
361
|
+
| Name | Type | Description | Notes |
|
362
|
+
| ---- | ---- | ----------- | ----- |
|
363
|
+
| **segment_id** | **Integer** | The system generated ID that uniquely identifies the segment that you want to modify. | |
|
364
|
+
| **create_segment_request** | [**CreateSegmentRequest**](CreateSegmentRequest.md) | Include both the `name` and `segment_criteria` (single-string escaped JSON) in the body request, then make updates to either or both. | |
|
365
|
+
|
366
|
+
### Return type
|
367
|
+
|
368
|
+
[**CreateSegment201Response**](CreateSegment201Response.md)
|
369
|
+
|
370
|
+
### Authorization
|
371
|
+
|
372
|
+
[oauth2_access_code](../README.md#oauth2_access_code), [oauth2_implicit](../README.md#oauth2_implicit)
|
373
|
+
|
374
|
+
### HTTP request headers
|
375
|
+
|
376
|
+
- **Content-Type**: application/json
|
377
|
+
- **Accept**: application/json
|
378
|
+
|
379
|
+
|
380
|
+
## update_segment_name
|
381
|
+
|
382
|
+
> <CreateSegment201Response> update_segment_name(segment_id, update_segment_name_request)
|
383
|
+
|
384
|
+
PATCH (rename) a Segment
|
385
|
+
|
386
|
+
Use this method to update an existing segment `name` with a new unique name in the request body. For more use case information, see [Rename a Segment](/api_guide/segment_rename.html) in the API guide.
|
387
|
+
|
388
|
+
### Examples
|
389
|
+
|
390
|
+
```ruby
|
391
|
+
require 'time'
|
392
|
+
require 'constant_contact_client'
|
393
|
+
# setup authorization
|
394
|
+
ConstantContactClient.configure do |config|
|
395
|
+
# Configure OAuth2 access token for authorization: oauth2_access_code
|
396
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
397
|
+
|
398
|
+
# Configure OAuth2 access token for authorization: oauth2_implicit
|
399
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
400
|
+
end
|
401
|
+
|
402
|
+
api_instance = ConstantContactClient::SegmentsApi.new
|
403
|
+
segment_id = 14 # Integer | The system generated ID that uniquely identifies the segment that you want to modify.
|
404
|
+
update_segment_name_request = ConstantContactClient::UpdateSegmentNameRequest.new({name: 'Contacts who did not open any email campaign within the last 100 days.'}) # UpdateSegmentNameRequest | Include the existing segment `name` in the body request, then rename the segment using a unique new name.
|
405
|
+
|
406
|
+
begin
|
407
|
+
# PATCH (rename) a Segment
|
408
|
+
result = api_instance.update_segment_name(segment_id, update_segment_name_request)
|
409
|
+
p result
|
410
|
+
rescue ConstantContactClient::ApiError => e
|
411
|
+
puts "Error when calling SegmentsApi->update_segment_name: #{e}"
|
412
|
+
end
|
413
|
+
```
|
414
|
+
|
415
|
+
#### Using the update_segment_name_with_http_info variant
|
416
|
+
|
417
|
+
This returns an Array which contains the response data, status code and headers.
|
418
|
+
|
419
|
+
> <Array(<CreateSegment201Response>, Integer, Hash)> update_segment_name_with_http_info(segment_id, update_segment_name_request)
|
420
|
+
|
421
|
+
```ruby
|
422
|
+
begin
|
423
|
+
# PATCH (rename) a Segment
|
424
|
+
data, status_code, headers = api_instance.update_segment_name_with_http_info(segment_id, update_segment_name_request)
|
425
|
+
p status_code # => 2xx
|
426
|
+
p headers # => { ... }
|
427
|
+
p data # => <CreateSegment201Response>
|
428
|
+
rescue ConstantContactClient::ApiError => e
|
429
|
+
puts "Error when calling SegmentsApi->update_segment_name_with_http_info: #{e}"
|
430
|
+
end
|
431
|
+
```
|
432
|
+
|
433
|
+
### Parameters
|
434
|
+
|
435
|
+
| Name | Type | Description | Notes |
|
436
|
+
| ---- | ---- | ----------- | ----- |
|
437
|
+
| **segment_id** | **Integer** | The system generated ID that uniquely identifies the segment that you want to modify. | |
|
438
|
+
| **update_segment_name_request** | [**UpdateSegmentNameRequest**](UpdateSegmentNameRequest.md) | Include the existing segment `name` in the body request, then rename the segment using a unique new name. | |
|
439
|
+
|
440
|
+
### Return type
|
441
|
+
|
442
|
+
[**CreateSegment201Response**](CreateSegment201Response.md)
|
443
|
+
|
444
|
+
### Authorization
|
445
|
+
|
446
|
+
[oauth2_access_code](../README.md#oauth2_access_code), [oauth2_implicit](../README.md#oauth2_implicit)
|
447
|
+
|
448
|
+
### HTTP request headers
|
449
|
+
|
450
|
+
- **Content-Type**: application/json
|
451
|
+
- **Accept**: application/json
|
452
|
+
|