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
@@ -0,0 +1,503 @@
|
|
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 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module ConstantContactClient
|
17
|
+
class ContactCreateOrUpdateInput
|
18
|
+
# The email address for the contact. This method identifies each unique contact using their email address. If the email address exists in the account, this method updates the contact. If the email address is new, this method creates a new contact.
|
19
|
+
attr_accessor :email_address
|
20
|
+
|
21
|
+
# The first name of the contact.
|
22
|
+
attr_accessor :first_name
|
23
|
+
|
24
|
+
# The last name of the contact.
|
25
|
+
attr_accessor :last_name
|
26
|
+
|
27
|
+
# The job title of the contact.
|
28
|
+
attr_accessor :job_title
|
29
|
+
|
30
|
+
# The name of the company where the contact works.
|
31
|
+
attr_accessor :company_name
|
32
|
+
|
33
|
+
# The phone number for the contact.
|
34
|
+
attr_accessor :phone_number
|
35
|
+
|
36
|
+
# The contact lists you want to add the contact to as an array of up to 50 contact <code>list_id</code> values. You must include at least one <code>list_id</code>.
|
37
|
+
attr_accessor :list_memberships
|
38
|
+
|
39
|
+
# The custom fields you want to add to the contact as an array of up to 50 custom field objects.
|
40
|
+
attr_accessor :custom_fields
|
41
|
+
|
42
|
+
# The anniversary date for the contact. For example, this value could be the date when the contact first became a customer of an organization in Constant Contact. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY.
|
43
|
+
attr_accessor :anniversary
|
44
|
+
|
45
|
+
# The month value for the contact's birthday. Valid values are from 1 through 12. The <code>birthday_month</code> property is required if you use <code>birthday_day</code>.
|
46
|
+
attr_accessor :birthday_month
|
47
|
+
|
48
|
+
# The day value for the contact's birthday. Valid values are from 1 through 31. The <code>birthday_day</code> property is required if you use <code>birthday_month</code>.
|
49
|
+
attr_accessor :birthday_day
|
50
|
+
|
51
|
+
attr_accessor :street_address
|
52
|
+
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
54
|
+
def self.attribute_map
|
55
|
+
{
|
56
|
+
:'email_address' => :'email_address',
|
57
|
+
:'first_name' => :'first_name',
|
58
|
+
:'last_name' => :'last_name',
|
59
|
+
:'job_title' => :'job_title',
|
60
|
+
:'company_name' => :'company_name',
|
61
|
+
:'phone_number' => :'phone_number',
|
62
|
+
:'list_memberships' => :'list_memberships',
|
63
|
+
:'custom_fields' => :'custom_fields',
|
64
|
+
:'anniversary' => :'anniversary',
|
65
|
+
:'birthday_month' => :'birthday_month',
|
66
|
+
:'birthday_day' => :'birthday_day',
|
67
|
+
:'street_address' => :'street_address'
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
# Returns all the JSON keys this model knows about
|
72
|
+
def self.acceptable_attributes
|
73
|
+
attribute_map.values
|
74
|
+
end
|
75
|
+
|
76
|
+
# Attribute type mapping.
|
77
|
+
def self.openapi_types
|
78
|
+
{
|
79
|
+
:'email_address' => :'String',
|
80
|
+
:'first_name' => :'String',
|
81
|
+
:'last_name' => :'String',
|
82
|
+
:'job_title' => :'String',
|
83
|
+
:'company_name' => :'String',
|
84
|
+
:'phone_number' => :'String',
|
85
|
+
:'list_memberships' => :'Array<String>',
|
86
|
+
:'custom_fields' => :'Array<CreateOrUpdateContactRequestCustomFieldsInner>',
|
87
|
+
:'anniversary' => :'String',
|
88
|
+
:'birthday_month' => :'Integer',
|
89
|
+
:'birthday_day' => :'Integer',
|
90
|
+
:'street_address' => :'CreateOrUpdateContactRequestStreetAddress'
|
91
|
+
}
|
92
|
+
end
|
93
|
+
|
94
|
+
# List of attributes with nullable: true
|
95
|
+
def self.openapi_nullable
|
96
|
+
Set.new([
|
97
|
+
])
|
98
|
+
end
|
99
|
+
|
100
|
+
# Initializes the object
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
def initialize(attributes = {})
|
103
|
+
if (!attributes.is_a?(Hash))
|
104
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ConstantContactClient::ContactCreateOrUpdateInput` initialize method"
|
105
|
+
end
|
106
|
+
|
107
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
108
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
109
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
110
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ConstantContactClient::ContactCreateOrUpdateInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
111
|
+
end
|
112
|
+
h[k.to_sym] = v
|
113
|
+
}
|
114
|
+
|
115
|
+
if attributes.key?(:'email_address')
|
116
|
+
self.email_address = attributes[:'email_address']
|
117
|
+
else
|
118
|
+
self.email_address = nil
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'first_name')
|
122
|
+
self.first_name = attributes[:'first_name']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'last_name')
|
126
|
+
self.last_name = attributes[:'last_name']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'job_title')
|
130
|
+
self.job_title = attributes[:'job_title']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'company_name')
|
134
|
+
self.company_name = attributes[:'company_name']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'phone_number')
|
138
|
+
self.phone_number = attributes[:'phone_number']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'list_memberships')
|
142
|
+
if (value = attributes[:'list_memberships']).is_a?(Array)
|
143
|
+
self.list_memberships = value
|
144
|
+
end
|
145
|
+
else
|
146
|
+
self.list_memberships = nil
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.key?(:'custom_fields')
|
150
|
+
if (value = attributes[:'custom_fields']).is_a?(Array)
|
151
|
+
self.custom_fields = value
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.key?(:'anniversary')
|
156
|
+
self.anniversary = attributes[:'anniversary']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:'birthday_month')
|
160
|
+
self.birthday_month = attributes[:'birthday_month']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.key?(:'birthday_day')
|
164
|
+
self.birthday_day = attributes[:'birthday_day']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.key?(:'street_address')
|
168
|
+
self.street_address = attributes[:'street_address']
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
173
|
+
# @return Array for valid properties with the reasons
|
174
|
+
def list_invalid_properties
|
175
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
176
|
+
invalid_properties = Array.new
|
177
|
+
if @email_address.nil?
|
178
|
+
invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
|
179
|
+
end
|
180
|
+
|
181
|
+
if @email_address.to_s.length > 50
|
182
|
+
invalid_properties.push('invalid value for "email_address", the character length must be smaller than or equal to 50.')
|
183
|
+
end
|
184
|
+
|
185
|
+
if !@first_name.nil? && @first_name.to_s.length > 50
|
186
|
+
invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 50.')
|
187
|
+
end
|
188
|
+
|
189
|
+
if !@last_name.nil? && @last_name.to_s.length > 50
|
190
|
+
invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 50.')
|
191
|
+
end
|
192
|
+
|
193
|
+
if !@job_title.nil? && @job_title.to_s.length > 50
|
194
|
+
invalid_properties.push('invalid value for "job_title", the character length must be smaller than or equal to 50.')
|
195
|
+
end
|
196
|
+
|
197
|
+
if !@company_name.nil? && @company_name.to_s.length > 50
|
198
|
+
invalid_properties.push('invalid value for "company_name", the character length must be smaller than or equal to 50.')
|
199
|
+
end
|
200
|
+
|
201
|
+
if !@phone_number.nil? && @phone_number.to_s.length > 25
|
202
|
+
invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 25.')
|
203
|
+
end
|
204
|
+
|
205
|
+
if @list_memberships.nil?
|
206
|
+
invalid_properties.push('invalid value for "list_memberships", list_memberships cannot be nil.')
|
207
|
+
end
|
208
|
+
|
209
|
+
if @list_memberships.length > 50
|
210
|
+
invalid_properties.push('invalid value for "list_memberships", number of items must be less than or equal to 50.')
|
211
|
+
end
|
212
|
+
|
213
|
+
if @list_memberships.length < 1
|
214
|
+
invalid_properties.push('invalid value for "list_memberships", number of items must be greater than or equal to 1.')
|
215
|
+
end
|
216
|
+
|
217
|
+
if !@custom_fields.nil? && @custom_fields.length > 50
|
218
|
+
invalid_properties.push('invalid value for "custom_fields", number of items must be less than or equal to 50.')
|
219
|
+
end
|
220
|
+
|
221
|
+
invalid_properties
|
222
|
+
end
|
223
|
+
|
224
|
+
# Check to see if the all the properties in the model are valid
|
225
|
+
# @return true if the model is valid
|
226
|
+
def valid?
|
227
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
228
|
+
return false if @email_address.nil?
|
229
|
+
return false if @email_address.to_s.length > 50
|
230
|
+
return false if !@first_name.nil? && @first_name.to_s.length > 50
|
231
|
+
return false if !@last_name.nil? && @last_name.to_s.length > 50
|
232
|
+
return false if !@job_title.nil? && @job_title.to_s.length > 50
|
233
|
+
return false if !@company_name.nil? && @company_name.to_s.length > 50
|
234
|
+
return false if !@phone_number.nil? && @phone_number.to_s.length > 25
|
235
|
+
return false if @list_memberships.nil?
|
236
|
+
return false if @list_memberships.length > 50
|
237
|
+
return false if @list_memberships.length < 1
|
238
|
+
return false if !@custom_fields.nil? && @custom_fields.length > 50
|
239
|
+
true
|
240
|
+
end
|
241
|
+
|
242
|
+
# Custom attribute writer method with validation
|
243
|
+
# @param [Object] email_address Value to be assigned
|
244
|
+
def email_address=(email_address)
|
245
|
+
if email_address.nil?
|
246
|
+
fail ArgumentError, 'email_address cannot be nil'
|
247
|
+
end
|
248
|
+
|
249
|
+
if email_address.to_s.length > 50
|
250
|
+
fail ArgumentError, 'invalid value for "email_address", the character length must be smaller than or equal to 50.'
|
251
|
+
end
|
252
|
+
|
253
|
+
@email_address = email_address
|
254
|
+
end
|
255
|
+
|
256
|
+
# Custom attribute writer method with validation
|
257
|
+
# @param [Object] first_name Value to be assigned
|
258
|
+
def first_name=(first_name)
|
259
|
+
if first_name.nil?
|
260
|
+
fail ArgumentError, 'first_name cannot be nil'
|
261
|
+
end
|
262
|
+
|
263
|
+
if first_name.to_s.length > 50
|
264
|
+
fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 50.'
|
265
|
+
end
|
266
|
+
|
267
|
+
@first_name = first_name
|
268
|
+
end
|
269
|
+
|
270
|
+
# Custom attribute writer method with validation
|
271
|
+
# @param [Object] last_name Value to be assigned
|
272
|
+
def last_name=(last_name)
|
273
|
+
if last_name.nil?
|
274
|
+
fail ArgumentError, 'last_name cannot be nil'
|
275
|
+
end
|
276
|
+
|
277
|
+
if last_name.to_s.length > 50
|
278
|
+
fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 50.'
|
279
|
+
end
|
280
|
+
|
281
|
+
@last_name = last_name
|
282
|
+
end
|
283
|
+
|
284
|
+
# Custom attribute writer method with validation
|
285
|
+
# @param [Object] job_title Value to be assigned
|
286
|
+
def job_title=(job_title)
|
287
|
+
if job_title.nil?
|
288
|
+
fail ArgumentError, 'job_title cannot be nil'
|
289
|
+
end
|
290
|
+
|
291
|
+
if job_title.to_s.length > 50
|
292
|
+
fail ArgumentError, 'invalid value for "job_title", the character length must be smaller than or equal to 50.'
|
293
|
+
end
|
294
|
+
|
295
|
+
@job_title = job_title
|
296
|
+
end
|
297
|
+
|
298
|
+
# Custom attribute writer method with validation
|
299
|
+
# @param [Object] company_name Value to be assigned
|
300
|
+
def company_name=(company_name)
|
301
|
+
if company_name.nil?
|
302
|
+
fail ArgumentError, 'company_name cannot be nil'
|
303
|
+
end
|
304
|
+
|
305
|
+
if company_name.to_s.length > 50
|
306
|
+
fail ArgumentError, 'invalid value for "company_name", the character length must be smaller than or equal to 50.'
|
307
|
+
end
|
308
|
+
|
309
|
+
@company_name = company_name
|
310
|
+
end
|
311
|
+
|
312
|
+
# Custom attribute writer method with validation
|
313
|
+
# @param [Object] phone_number Value to be assigned
|
314
|
+
def phone_number=(phone_number)
|
315
|
+
if phone_number.nil?
|
316
|
+
fail ArgumentError, 'phone_number cannot be nil'
|
317
|
+
end
|
318
|
+
|
319
|
+
if phone_number.to_s.length > 25
|
320
|
+
fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 25.'
|
321
|
+
end
|
322
|
+
|
323
|
+
@phone_number = phone_number
|
324
|
+
end
|
325
|
+
|
326
|
+
# Custom attribute writer method with validation
|
327
|
+
# @param [Object] list_memberships Value to be assigned
|
328
|
+
def list_memberships=(list_memberships)
|
329
|
+
if list_memberships.nil?
|
330
|
+
fail ArgumentError, 'list_memberships cannot be nil'
|
331
|
+
end
|
332
|
+
|
333
|
+
if list_memberships.length > 50
|
334
|
+
fail ArgumentError, 'invalid value for "list_memberships", number of items must be less than or equal to 50.'
|
335
|
+
end
|
336
|
+
|
337
|
+
if list_memberships.length < 1
|
338
|
+
fail ArgumentError, 'invalid value for "list_memberships", number of items must be greater than or equal to 1.'
|
339
|
+
end
|
340
|
+
|
341
|
+
@list_memberships = list_memberships
|
342
|
+
end
|
343
|
+
|
344
|
+
# Custom attribute writer method with validation
|
345
|
+
# @param [Object] custom_fields Value to be assigned
|
346
|
+
def custom_fields=(custom_fields)
|
347
|
+
if custom_fields.nil?
|
348
|
+
fail ArgumentError, 'custom_fields cannot be nil'
|
349
|
+
end
|
350
|
+
|
351
|
+
if custom_fields.length > 50
|
352
|
+
fail ArgumentError, 'invalid value for "custom_fields", number of items must be less than or equal to 50.'
|
353
|
+
end
|
354
|
+
|
355
|
+
@custom_fields = custom_fields
|
356
|
+
end
|
357
|
+
|
358
|
+
# Checks equality by comparing each attribute.
|
359
|
+
# @param [Object] Object to be compared
|
360
|
+
def ==(o)
|
361
|
+
return true if self.equal?(o)
|
362
|
+
self.class == o.class &&
|
363
|
+
email_address == o.email_address &&
|
364
|
+
first_name == o.first_name &&
|
365
|
+
last_name == o.last_name &&
|
366
|
+
job_title == o.job_title &&
|
367
|
+
company_name == o.company_name &&
|
368
|
+
phone_number == o.phone_number &&
|
369
|
+
list_memberships == o.list_memberships &&
|
370
|
+
custom_fields == o.custom_fields &&
|
371
|
+
anniversary == o.anniversary &&
|
372
|
+
birthday_month == o.birthday_month &&
|
373
|
+
birthday_day == o.birthday_day &&
|
374
|
+
street_address == o.street_address
|
375
|
+
end
|
376
|
+
|
377
|
+
# @see the `==` method
|
378
|
+
# @param [Object] Object to be compared
|
379
|
+
def eql?(o)
|
380
|
+
self == o
|
381
|
+
end
|
382
|
+
|
383
|
+
# Calculates hash code according to all attributes.
|
384
|
+
# @return [Integer] Hash code
|
385
|
+
def hash
|
386
|
+
[email_address, first_name, last_name, job_title, company_name, phone_number, list_memberships, custom_fields, anniversary, birthday_month, birthday_day, street_address].hash
|
387
|
+
end
|
388
|
+
|
389
|
+
# Builds the object from hash
|
390
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
391
|
+
# @return [Object] Returns the model itself
|
392
|
+
def self.build_from_hash(attributes)
|
393
|
+
return nil unless attributes.is_a?(Hash)
|
394
|
+
attributes = attributes.transform_keys(&:to_sym)
|
395
|
+
transformed_hash = {}
|
396
|
+
openapi_types.each_pair do |key, type|
|
397
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
398
|
+
transformed_hash["#{key}"] = nil
|
399
|
+
elsif type =~ /\AArray<(.*)>/i
|
400
|
+
# check to ensure the input is an array given that the attribute
|
401
|
+
# is documented as an array but the input is not
|
402
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
403
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
404
|
+
end
|
405
|
+
elsif !attributes[attribute_map[key]].nil?
|
406
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
407
|
+
end
|
408
|
+
end
|
409
|
+
new(transformed_hash)
|
410
|
+
end
|
411
|
+
|
412
|
+
# Deserializes the data based on type
|
413
|
+
# @param string type Data type
|
414
|
+
# @param string value Value to be deserialized
|
415
|
+
# @return [Object] Deserialized data
|
416
|
+
def self._deserialize(type, value)
|
417
|
+
case type.to_sym
|
418
|
+
when :Time
|
419
|
+
Time.parse(value)
|
420
|
+
when :Date
|
421
|
+
Date.parse(value)
|
422
|
+
when :String
|
423
|
+
value.to_s
|
424
|
+
when :Integer
|
425
|
+
value.to_i
|
426
|
+
when :Float
|
427
|
+
value.to_f
|
428
|
+
when :Boolean
|
429
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
430
|
+
true
|
431
|
+
else
|
432
|
+
false
|
433
|
+
end
|
434
|
+
when :Object
|
435
|
+
# generic object (usually a Hash), return directly
|
436
|
+
value
|
437
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
438
|
+
inner_type = Regexp.last_match[:inner_type]
|
439
|
+
value.map { |v| _deserialize(inner_type, v) }
|
440
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
441
|
+
k_type = Regexp.last_match[:k_type]
|
442
|
+
v_type = Regexp.last_match[:v_type]
|
443
|
+
{}.tap do |hash|
|
444
|
+
value.each do |k, v|
|
445
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
446
|
+
end
|
447
|
+
end
|
448
|
+
else # model
|
449
|
+
# models (e.g. Pet) or oneOf
|
450
|
+
klass = ConstantContactClient.const_get(type)
|
451
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
452
|
+
end
|
453
|
+
end
|
454
|
+
|
455
|
+
# Returns the string representation of the object
|
456
|
+
# @return [String] String presentation of the object
|
457
|
+
def to_s
|
458
|
+
to_hash.to_s
|
459
|
+
end
|
460
|
+
|
461
|
+
# to_body is an alias to to_hash (backward compatibility)
|
462
|
+
# @return [Hash] Returns the object in the form of hash
|
463
|
+
def to_body
|
464
|
+
to_hash
|
465
|
+
end
|
466
|
+
|
467
|
+
# Returns the object in the form of hash
|
468
|
+
# @return [Hash] Returns the object in the form of hash
|
469
|
+
def to_hash
|
470
|
+
hash = {}
|
471
|
+
self.class.attribute_map.each_pair do |attr, param|
|
472
|
+
value = self.send(attr)
|
473
|
+
if value.nil?
|
474
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
475
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
476
|
+
end
|
477
|
+
|
478
|
+
hash[param] = _to_hash(value)
|
479
|
+
end
|
480
|
+
hash
|
481
|
+
end
|
482
|
+
|
483
|
+
# Outputs non-array value in the form of hash
|
484
|
+
# For object, use to_hash. Otherwise, just return the value
|
485
|
+
# @param [Object] value Any valid value
|
486
|
+
# @return [Hash] Returns the value in the form of hash
|
487
|
+
def _to_hash(value)
|
488
|
+
if value.is_a?(Array)
|
489
|
+
value.compact.map { |v| _to_hash(v) }
|
490
|
+
elsif value.is_a?(Hash)
|
491
|
+
{}.tap do |hash|
|
492
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
493
|
+
end
|
494
|
+
elsif value.respond_to? :to_hash
|
495
|
+
value.to_hash
|
496
|
+
else
|
497
|
+
value
|
498
|
+
end
|
499
|
+
end
|
500
|
+
|
501
|
+
end
|
502
|
+
|
503
|
+
end
|