constant_contact_client 1.0.0 → 1.5.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 +4 -4
- data/CHANGELOG.md +653 -27
- data/Gemfile.lock +52 -23
- data/README.md +23 -6
- data/constant_contact_client.gemspec +3 -3
- data/docs/AccountServicesApi.md +2 -2
- data/docs/BulkActivitiesApi.md +16 -12
- data/docs/ContactListsApi.md +5 -1
- data/docs/ContactsApi.md +84 -10
- data/docs/ContactsCustomFieldsApi.md +22 -22
- data/docs/EmailCampaignsApi.md +1 -1
- data/docs/EmailSchedulingApi.md +1 -1
- data/docs/EventsApi.md +881 -0
- data/docs/SMSReportingApi.md +86 -0
- data/docs/SocialApi.md +302 -0
- data/lib/constant_contact_client/api/account_services_api.rb +4 -4
- data/lib/constant_contact_client/api/bulk_activities_api.rb +19 -16
- data/lib/constant_contact_client/api/contact_lists_api.rb +12 -2
- data/lib/constant_contact_client/api/contact_tags_api.rb +2 -2
- data/lib/constant_contact_client/api/contacts_api.rb +89 -17
- data/lib/constant_contact_client/api/contacts_custom_fields_api.rb +29 -29
- data/lib/constant_contact_client/api/contacts_reporting_api.rb +2 -2
- data/lib/constant_contact_client/api/email_campaigns_ab_tests_api.rb +2 -2
- data/lib/constant_contact_client/api/email_campaigns_api.rb +4 -4
- data/lib/constant_contact_client/api/email_reporting_api.rb +2 -2
- data/lib/constant_contact_client/api/email_scheduling_api.rb +4 -4
- data/lib/constant_contact_client/api/events_api.rb +881 -0
- data/lib/constant_contact_client/api/landing_pages_reporting_api.rb +2 -2
- data/lib/constant_contact_client/api/segments_api.rb +2 -2
- data/lib/constant_contact_client/api/sms_reporting_api.rb +92 -0
- data/lib/constant_contact_client/api/social_api.rb +286 -0
- data/lib/constant_contact_client/api_client.rb +3 -3
- data/lib/constant_contact_client/api_error.rb +2 -2
- data/lib/constant_contact_client/configuration.rb +2 -2
- data/lib/constant_contact_client/models/ab_test_data.rb +2 -2
- data/lib/constant_contact_client/models/access_token_response.rb +2 -2
- data/lib/constant_contact_client/models/account_cancellation.rb +2 -2
- data/lib/constant_contact_client/models/account_email_create_response.rb +2 -2
- data/lib/constant_contact_client/models/account_email_input.rb +2 -2
- data/lib/constant_contact_client/models/account_info_dto.rb +266 -0
- data/lib/constant_contact_client/models/account_physical_address.rb +2 -2
- data/lib/constant_contact_client/models/account_suspension.rb +2 -2
- data/lib/constant_contact_client/models/activities.rb +2 -2
- data/lib/constant_contact_client/models/activity.rb +2 -2
- data/lib/constant_contact_client/models/activity_delete_custom_fields.rb +2 -2
- data/lib/constant_contact_client/models/activity_delete_list_response.rb +3 -3
- data/lib/constant_contact_client/models/activity_delete_lists_response.rb +2 -2
- data/lib/constant_contact_client/models/activity_delete_status.rb +2 -2
- data/lib/constant_contact_client/models/activity_errors.rb +2 -2
- data/lib/constant_contact_client/models/activity_export_status.rb +2 -2
- data/lib/constant_contact_client/models/activity_generic.rb +2 -2
- data/lib/constant_contact_client/models/activity_generic_status.rb +2 -2
- data/lib/constant_contact_client/models/activity_import.rb +2 -2
- data/lib/constant_contact_client/models/activity_links.rb +2 -2
- data/lib/constant_contact_client/models/activity_lists_membership.rb +2 -2
- data/lib/constant_contact_client/models/activity_reference.rb +2 -2
- data/lib/constant_contact_client/models/activity_status.rb +2 -2
- data/lib/constant_contact_client/models/activity_status_export_link.rb +2 -2
- data/lib/constant_contact_client/models/activity_status_link.rb +2 -2
- data/lib/constant_contact_client/models/activity_tagging.rb +2 -2
- data/lib/constant_contact_client/models/activity_tagging_status.rb +2 -2
- data/lib/constant_contact_client/models/add_account_email_address201_response.rb +2 -2
- data/lib/constant_contact_client/models/add_account_email_address_request.rb +2 -2
- data/lib/constant_contact_client/models/address_dto.rb +604 -0
- data/lib/constant_contact_client/models/address_dto1.rb +604 -0
- data/lib/constant_contact_client/models/api_error_schema_inner.rb +2 -2
- data/lib/constant_contact_client/models/attribute_dto.rb +323 -0
- data/lib/constant_contact_client/models/attribute_dto1.rb +323 -0
- data/lib/constant_contact_client/models/authorization_error_schema.rb +2 -2
- data/lib/constant_contact_client/models/automation_campaign.rb +274 -0
- data/lib/constant_contact_client/models/automation_campaign_active_definition.rb +235 -0
- data/lib/constant_contact_client/models/automation_campaign_structured_tags_inner.rb +232 -0
- data/lib/constant_contact_client/models/automation_flow.rb +215 -0
- data/lib/constant_contact_client/models/automation_flow_workflow_def.rb +262 -0
- data/lib/constant_contact_client/models/automation_structured_tag.rb +232 -0
- data/lib/constant_contact_client/models/automation_workflow_def.rb +262 -0
- data/lib/constant_contact_client/models/automation_workflow_definition.rb +235 -0
- data/lib/constant_contact_client/models/automation_workflow_definition_workflow.rb +215 -0
- data/lib/constant_contact_client/models/bounces_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/bounces_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/bulk_campaign_summary.rb +289 -0
- data/lib/constant_contact_client/models/bulk_email_campaign_summaries_page.rb +2 -16
- data/lib/constant_contact_client/models/bulk_email_campaign_summaries_percents.rb +2 -2
- data/lib/constant_contact_client/models/bulk_email_campaign_summary.rb +2 -23
- data/lib/constant_contact_client/models/bulk_sms_campaign_summaries_percents.rb +245 -0
- data/lib/constant_contact_client/models/campaign_activity_stats_query_result_email.rb +2 -2
- data/lib/constant_contact_client/models/campaign_activity_stats_result_generic_stats_email_activity.rb +2 -2
- data/lib/constant_contact_client/models/campaign_activity_summary.rb +2 -2
- data/lib/constant_contact_client/models/campaign_stats_query_result_email.rb +2 -2
- data/lib/constant_contact_client/models/campaign_stats_result_generic_stats_email_percents_email.rb +2 -2
- data/lib/constant_contact_client/models/check_in_tickets_request.rb +225 -0
- data/lib/constant_contact_client/models/clicks_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/clicks_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/company_logo.rb +2 -2
- data/lib/constant_contact_client/models/connection_dto.rb +224 -0
- data/lib/constant_contact_client/models/connection_response_dto.rb +218 -0
- data/lib/constant_contact_client/models/connection_status_dto.rb +276 -0
- data/lib/constant_contact_client/models/contact_campaign_activities_summary.rb +2 -2
- data/lib/constant_contact_client/models/contact_create_or_update_input.rb +17 -15
- data/lib/constant_contact_client/models/contact_create_or_update_response.rb +2 -2
- data/lib/constant_contact_client/models/contact_custom_field.rb +22 -17
- data/lib/constant_contact_client/models/contact_delete.rb +2 -2
- data/lib/constant_contact_client/models/contact_dto.rb +429 -0
- data/lib/constant_contact_client/models/contact_dto1.rb +430 -0
- data/lib/constant_contact_client/models/contact_list.rb +2 -2
- data/lib/constant_contact_client/models/contact_list_array.rb +2 -2
- data/lib/constant_contact_client/models/contact_list_put_post.rb +2 -2
- data/lib/constant_contact_client/models/contact_open_and_click_rates.rb +2 -2
- data/lib/constant_contact_client/models/contact_post_request.rb +15 -6
- data/lib/constant_contact_client/models/contact_put_request.rb +15 -6
- data/lib/constant_contact_client/models/contact_resource.rb +2 -2
- data/lib/constant_contact_client/models/contact_resubscribe_request.rb +224 -0
- data/lib/constant_contact_client/models/contact_sms_channel.rb +241 -0
- data/lib/constant_contact_client/models/contact_sms_channel_consents.rb +249 -0
- data/lib/constant_contact_client/models/contact_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/contact_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/contact_xref.rb +2 -2
- data/lib/constant_contact_client/models/contact_xrefs.rb +2 -2
- data/lib/constant_contact_client/models/contacts.rb +2 -2
- data/lib/constant_contact_client/models/contacts_counts.rb +2 -2
- data/lib/constant_contact_client/models/contacts_export.rb +62 -12
- data/lib/constant_contact_client/models/contacts_json_import.rb +2 -2
- data/lib/constant_contact_client/models/copy_event_request.rb +235 -0
- data/lib/constant_contact_client/models/create_contact_request.rb +15 -6
- data/lib/constant_contact_client/models/create_contact_request_email_address.rb +2 -2
- data/lib/constant_contact_client/models/create_csv_import_activity201_response.rb +2 -2
- data/lib/constant_contact_client/models/create_csv_import_activity201_response_links.rb +2 -2
- data/lib/constant_contact_client/models/create_csv_import_activity201_response_status.rb +2 -2
- data/lib/constant_contact_client/models/create_custom_fields_request.rb +313 -0
- data/lib/constant_contact_client/models/create_custom_fields_request_choices_inner.rb +245 -0
- data/lib/constant_contact_client/models/create_delete_activity201_response.rb +2 -2
- data/lib/constant_contact_client/models/create_delete_activity201_response_links.rb +2 -2
- data/lib/constant_contact_client/models/create_delete_activity201_response_links_self.rb +2 -2
- data/lib/constant_contact_client/models/create_delete_activity201_response_status.rb +2 -2
- data/lib/constant_contact_client/models/create_delete_activity_request.rb +2 -2
- data/lib/constant_contact_client/models/create_email_campaign200_response.rb +2 -2
- data/lib/constant_contact_client/models/create_email_campaign200_response_campaign_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/create_email_campaign_request.rb +2 -2
- data/lib/constant_contact_client/models/create_email_campaign_request_email_campaign_activities_inner.rb +21 -2
- data/lib/constant_contact_client/models/create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer.rb +2 -2
- data/lib/constant_contact_client/models/create_event201_response.rb +708 -0
- data/lib/constant_contact_client/models/create_event201_response_event_promotions_inner.rb +256 -0
- data/lib/constant_contact_client/models/create_event201_response_event_settings.rb +265 -0
- data/lib/constant_contact_client/models/create_export_activity201_response.rb +2 -2
- data/lib/constant_contact_client/models/create_export_activity201_response_status.rb +2 -2
- data/lib/constant_contact_client/models/create_export_activity_request.rb +62 -12
- data/lib/constant_contact_client/models/create_export_activity_request_exclude.rb +217 -0
- data/lib/constant_contact_client/models/create_import_json_activity_request.rb +2 -2
- data/lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb +7 -14
- data/lib/constant_contact_client/models/create_list_add_activity_request.rb +2 -2
- data/lib/constant_contact_client/models/create_list_add_activity_request_exclude.rb +2 -2
- data/lib/constant_contact_client/models/create_list_add_activity_request_source.rb +2 -2
- data/lib/constant_contact_client/models/create_list_delete_activity201_response.rb +2 -2
- data/lib/constant_contact_client/models/create_list_delete_activity201_response_links.rb +2 -2
- data/lib/constant_contact_client/models/create_list_delete_activity201_response_links_self.rb +2 -2
- data/lib/constant_contact_client/models/create_list_delete_activity201_response_status.rb +2 -2
- data/lib/constant_contact_client/models/create_list_delete_activity_request.rb +2 -2
- data/lib/constant_contact_client/models/create_list_remove_activity201_response.rb +2 -2
- data/lib/constant_contact_client/models/create_list_remove_activity201_response_status.rb +2 -2
- data/lib/constant_contact_client/models/create_list_remove_activity_request.rb +2 -2
- data/lib/constant_contact_client/models/create_list_remove_activity_request_exclude.rb +2 -2
- data/lib/constant_contact_client/models/create_list_remove_activity_request_source.rb +2 -2
- data/lib/constant_contact_client/models/create_or_update_contact200_response.rb +2 -2
- data/lib/constant_contact_client/models/create_or_update_contact_custom_field.rb +2 -2
- data/lib/constant_contact_client/models/create_or_update_contact_request.rb +17 -15
- data/lib/constant_contact_client/models/create_or_update_contact_request_custom_fields_inner.rb +2 -2
- data/lib/constant_contact_client/models/create_or_update_contact_request_sms_channel.rb +276 -0
- data/lib/constant_contact_client/models/create_or_update_contact_request_sms_channel_sms_channel_consents_inner.rb +310 -0
- data/lib/constant_contact_client/models/create_or_update_contact_request_street_address.rb +2 -2
- data/lib/constant_contact_client/models/create_resend_email_campaign201_response.rb +2 -2
- data/lib/constant_contact_client/models/create_resend_email_campaign_request.rb +2 -2
- data/lib/constant_contact_client/models/create_segment201_response.rb +2 -2
- data/lib/constant_contact_client/models/create_segment_request.rb +2 -2
- data/lib/constant_contact_client/models/create_social_post200_response.rb +272 -0
- data/lib/constant_contact_client/models/create_social_post_request.rb +262 -0
- data/lib/constant_contact_client/models/create_social_post_request_profile_posts_inner.rb +269 -0
- data/lib/constant_contact_client/models/create_social_post_request_profile_posts_inner_images_inner.rb +233 -0
- data/lib/constant_contact_client/models/create_social_post_request_profile_posts_inner_profiles_inner.rb +323 -0
- data/lib/constant_contact_client/models/create_tag_delete_activity_request.rb +2 -2
- data/lib/constant_contact_client/models/create_tag_remove_activity201_response.rb +2 -2
- data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links.rb +2 -2
- data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links_results.rb +2 -2
- data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links_self.rb +2 -2
- data/lib/constant_contact_client/models/create_tag_remove_activity201_response_status.rb +2 -2
- data/lib/constant_contact_client/models/create_tag_remove_activity_request.rb +2 -2
- data/lib/constant_contact_client/models/create_tag_remove_activity_request_exclude.rb +2 -2
- data/lib/constant_contact_client/models/create_tag_remove_activity_request_source.rb +2 -2
- data/lib/constant_contact_client/models/cross_reference.rb +2 -2
- data/lib/constant_contact_client/models/cross_reference_response.rb +2 -2
- data/lib/constant_contact_client/models/{custom_field_resource.rb → custom_field.rb} +80 -11
- data/lib/constant_contact_client/models/custom_field_choice.rb +295 -0
- data/lib/constant_contact_client/models/custom_field_choice_put_request.rb +255 -0
- data/lib/constant_contact_client/models/custom_field_choice_request.rb +245 -0
- data/lib/constant_contact_client/models/custom_field_id100.rb +2 -2
- data/lib/constant_contact_client/models/custom_field_metadata.rb +266 -0
- data/lib/constant_contact_client/models/{custom_field_input.rb → custom_field_put_request.rb} +35 -28
- data/lib/constant_contact_client/models/custom_field_request.rb +313 -0
- data/lib/constant_contact_client/models/custom_fields.rb +2 -3
- data/lib/constant_contact_client/models/customer.rb +13 -3
- data/lib/constant_contact_client/models/customer_put.rb +2 -2
- data/lib/constant_contact_client/models/delete_list202_response.rb +3 -3
- data/lib/constant_contact_client/models/delete_tag202_response.rb +2 -2
- data/lib/constant_contact_client/models/delete_tag202_response_activity_errors_inner.rb +2 -2
- data/lib/constant_contact_client/models/delete_tag202_response_links.rb +2 -2
- data/lib/constant_contact_client/models/delete_tag202_response_links_self.rb +2 -2
- data/lib/constant_contact_client/models/delete_tag202_response_status.rb +2 -2
- data/lib/constant_contact_client/models/detailed_registration_dto.rb +316 -0
- data/lib/constant_contact_client/models/device_flow_response.rb +2 -2
- data/lib/constant_contact_client/models/did_not_opens_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/did_not_opens_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/email_address.rb +2 -2
- data/lib/constant_contact_client/models/email_address_post.rb +2 -2
- data/lib/constant_contact_client/models/email_address_put.rb +2 -2
- data/lib/constant_contact_client/models/email_campaign.rb +2 -2
- data/lib/constant_contact_client/models/email_campaign_account_information.rb +417 -0
- data/lib/constant_contact_client/models/email_campaign_account_information_message_settings.rb +256 -0
- data/lib/constant_contact_client/models/email_campaign_account_information_physical_address.rb +336 -0
- data/lib/constant_contact_client/models/email_campaign_activity.rb +2 -2
- data/lib/constant_contact_client/models/email_campaign_activity_input.rb +21 -2
- data/lib/constant_contact_client/models/email_campaign_activity_preview.rb +2 -2
- data/lib/constant_contact_client/models/email_campaign_complete.rb +2 -2
- data/lib/constant_contact_client/models/email_campaign_name.rb +2 -2
- data/lib/constant_contact_client/models/email_campaigns.rb +2 -2
- data/lib/constant_contact_client/models/email_link_click_count.rb +2 -2
- data/lib/constant_contact_client/models/email_links.rb +2 -2
- data/lib/constant_contact_client/models/email_physical_address.rb +2 -2
- data/lib/constant_contact_client/models/email_schedule_input.rb +2 -2
- data/lib/constant_contact_client/models/email_test_send_input.rb +2 -2
- data/lib/constant_contact_client/models/emails_link.rb +2 -2
- data/lib/constant_contact_client/models/emails_paging_links.rb +2 -2
- data/lib/constant_contact_client/models/event_copy_request_dto.rb +235 -0
- data/lib/constant_contact_client/models/event_dto.rb +708 -0
- data/lib/constant_contact_client/models/event_listing_dto.rb +344 -0
- data/lib/constant_contact_client/models/event_media_asset_dto.rb +265 -0
- data/lib/constant_contact_client/models/event_media_asset_dto1.rb +265 -0
- data/lib/constant_contact_client/models/event_meta_data_dto.rb +236 -0
- data/lib/constant_contact_client/models/event_meta_data_dto1.rb +236 -0
- data/lib/constant_contact_client/models/event_promotion_dto.rb +256 -0
- data/lib/constant_contact_client/models/event_registration_summary_metric_dto.rb +235 -0
- data/lib/constant_contact_client/models/event_settings_dto.rb +265 -0
- data/lib/constant_contact_client/models/file_object.rb +2 -2
- data/lib/constant_contact_client/models/file_status_array_inner.rb +2 -2
- data/lib/constant_contact_client/models/find_events200_response.rb +256 -0
- data/lib/constant_contact_client/models/find_events200_response_links.rb +233 -0
- data/lib/constant_contact_client/models/find_events200_response_records_inner.rb +344 -0
- data/lib/constant_contact_client/models/find_events200_response_records_inner_event_registration_summary_metrics.rb +235 -0
- data/lib/constant_contact_client/models/find_registrations_using_get200_response.rb +255 -0
- data/lib/constant_contact_client/models/find_registrations_using_get200_response_links.rb +232 -0
- data/lib/constant_contact_client/models/find_registrations_using_get200_response_records_inner.rb +345 -0
- data/lib/constant_contact_client/models/forwards_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/forwards_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/get_ab_test_email_campaign200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_account_details200_response.rb +13 -3
- data/lib/constant_contact_client/models/get_account_details200_response_company_logo.rb +2 -2
- data/lib/constant_contact_client/models/get_account_details200_response_physical_address.rb +2 -2
- data/lib/constant_contact_client/models/get_activity_by_id200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_all_account_email_addresses200_response_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_all_activities200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links.rb +2 -2
- data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links_results.rb +2 -2
- data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links_self.rb +2 -2
- data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_status.rb +2 -2
- data/lib/constant_contact_client/models/get_all_activities200_response_links.rb +2 -2
- data/lib/constant_contact_client/models/get_all_activities200_response_links_next.rb +2 -2
- data/lib/constant_contact_client/models/get_all_bulk_sms_campaign_summaries200_response.rb +235 -0
- data/lib/constant_contact_client/models/get_all_bulk_sms_campaign_summaries200_response_aggregate_percents.rb +246 -0
- data/lib/constant_contact_client/models/get_all_bulk_sms_campaign_summaries200_response_bulk_sms_campaign_summaries_inner.rb +289 -0
- data/lib/constant_contact_client/models/get_all_bulk_sms_campaign_summaries200_response_bulk_sms_campaign_summaries_inner_unique_counts.rb +284 -0
- data/lib/constant_contact_client/models/get_all_bulk_sms_campaign_summaries200_response_links.rb +215 -0
- data/lib/constant_contact_client/models/get_all_bulk_sms_campaign_summaries200_response_links_next.rb +223 -0
- data/lib/constant_contact_client/models/get_all_contacts200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_all_custom_fields200_response.rb +2 -3
- data/lib/constant_contact_client/models/get_all_email_campaigns200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_all_email_campaigns200_response_campaigns_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_all_email_campaigns200_response_links.rb +2 -2
- data/lib/constant_contact_client/models/get_all_lists200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_all_segments200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_all_segments200_response_links.rb +2 -2
- data/lib/constant_contact_client/models/get_all_segments200_response_links_next.rb +2 -2
- data/lib/constant_contact_client/models/get_all_segments200_response_segments_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_all_tags200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_all_tags200_response_links.rb +2 -2
- data/lib/constant_contact_client/models/get_all_tags200_response_links_next.rb +2 -2
- data/lib/constant_contact_client/models/get_all_tags200_response_links_next_next.rb +2 -9
- data/lib/constant_contact_client/models/get_bounces_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_bounces_report200_response_links.rb +2 -9
- data/lib/constant_contact_client/models/get_bounces_report200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_campaign_activity_link_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_campaign_activity_link_report200_response_link_click_counts_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_clicks_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_clicks_report200_response_links.rb +2 -9
- data/lib/constant_contact_client/models/get_clicks_report200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_adds200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_adds200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_by_id200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_by_id200_response_custom_fields_inner.rb +22 -17
- data/lib/constant_contact_client/models/get_contact_by_id200_response_email_address.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_by_id200_response_notes_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_by_id200_response_phone_numbers_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_by_id200_response_sms_channel.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_by_id200_response_sms_channel_sms_channel_consents_inner.rb +3 -2
- data/lib/constant_contact_client/models/get_contact_by_id200_response_street_addresses_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_counts200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_id_xrefs200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_id_xrefs200_response_xrefs_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_open_click_rate_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response_campaign_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response_links.rb +2 -9
- data/lib/constant_contact_client/models/get_contact_tracking_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_contact_tracking_report200_response_links.rb +2 -9
- data/lib/constant_contact_client/models/get_contact_tracking_report200_response_links_next.rb +2 -9
- data/lib/constant_contact_client/models/get_contact_tracking_report200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_custom_field200_response.rb +77 -8
- data/lib/constant_contact_client/models/get_custom_field200_response_choices_inner.rb +295 -0
- data/lib/constant_contact_client/models/get_custom_field200_response_metadata.rb +266 -0
- data/lib/constant_contact_client/models/get_did_not_opens_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_did_not_opens_report200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_activity200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_activity200_response_document_properties.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_activity200_response_physical_address_in_footer.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_activity_preview200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response_results_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response_results_inner_stats.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_activity_schedule200_response_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_report200_response.rb +2 -16
- data/lib/constant_contact_client/models/get_email_campaign_report200_response_aggregate_percents.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_report200_response_bulk_email_campaign_summaries_inner.rb +2 -23
- data/lib/constant_contact_client/models/get_email_campaign_report200_response_bulk_email_campaign_summaries_inner_unique_counts.rb +2 -58
- data/lib/constant_contact_client/models/get_email_campaign_xrefs200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_email_campaign_xrefs200_response_xrefs_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_email_opens_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_email_opens_report200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_email_sends_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_email_sends_report200_response_links.rb +2 -9
- data/lib/constant_contact_client/models/get_email_sends_report200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_email_stats_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_email_stats_report200_response_errors_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner_percents.rb +2 -2
- data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner_stats.rb +2 -2
- data/lib/constant_contact_client/models/get_forwards_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_forwards_report200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_hashtag_groups200_response.rb +257 -0
- data/lib/constant_contact_client/models/get_hashtag_groups200_response_hashtag_groups_inner.rb +252 -0
- data/lib/constant_contact_client/models/get_hashtag_groups200_response_links.rb +215 -0
- data/lib/constant_contact_client/models/get_hashtag_groups200_response_links_next.rb +223 -0
- data/lib/constant_contact_client/models/get_hashtag_groups200_response_page.rb +274 -0
- data/lib/constant_contact_client/models/get_list200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_list_id_xrefs200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_list_id_xrefs200_response_xrefs_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_optouts_report200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_optouts_report200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_registration_info200_response.rb +316 -0
- data/lib/constant_contact_client/models/get_registration_info200_response_contact_inner.rb +278 -0
- data/lib/constant_contact_client/models/get_registration_info200_response_order_summary.rb +296 -0
- data/lib/constant_contact_client/models/get_registration_info200_response_order_summary_details_inner.rb +245 -0
- data/lib/constant_contact_client/models/get_registration_info200_response_tickets_inner.rb +266 -0
- data/lib/constant_contact_client/models/get_resend_email_campaign200_response_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_sms_engagement_history200_response_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_sms_engagement_history200_response_inner_history_details.rb +3 -13
- data/lib/constant_contact_client/models/get_social_connections200_response.rb +218 -0
- data/lib/constant_contact_client/models/get_social_connections200_response_connections_inner.rb +224 -0
- data/lib/constant_contact_client/models/get_social_connections200_response_connections_inner_account_info.rb +266 -0
- data/lib/constant_contact_client/models/get_social_connections200_response_connections_inner_connection_status.rb +276 -0
- data/lib/constant_contact_client/models/get_social_profiles200_response_inner.rb +348 -0
- data/lib/constant_contact_client/models/get_social_profiles200_response_inner_account_info.rb +266 -0
- data/lib/constant_contact_client/models/get_tag200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_unique_contact_clicks200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_links.rb +2 -2
- data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_links_next.rb +2 -2
- data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel.rb +2 -2
- data/lib/constant_contact_client/models/get_unique_contact_opens200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_unique_contact_opens200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_unique_contact_sms_opt_ins200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_unique_contact_sms_opt_ins200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_unique_contact_updates200_response.rb +2 -2
- data/lib/constant_contact_client/models/get_unique_contact_updates200_response_tracking_activities_inner.rb +2 -2
- data/lib/constant_contact_client/models/get_user_privileges200_response_inner.rb +2 -2
- data/lib/constant_contact_client/models/hashtag_group_dto.rb +252 -0
- data/lib/constant_contact_client/models/headers_object.rb +2 -2
- data/lib/constant_contact_client/models/history_details.rb +3 -13
- data/lib/constant_contact_client/models/href.rb +214 -0
- data/lib/constant_contact_client/models/image_dto.rb +233 -0
- data/lib/constant_contact_client/models/item_dto.rb +444 -0
- data/lib/constant_contact_client/models/item_dto1.rb +444 -0
- data/lib/constant_contact_client/models/item_summary_dto.rb +263 -0
- data/lib/constant_contact_client/models/item_summary_dto1.rb +263 -0
- data/lib/constant_contact_client/models/jmml_sms_channel.rb +276 -0
- data/lib/constant_contact_client/models/jmml_sms_channel_consents.rb +310 -0
- data/lib/constant_contact_client/models/json_import_contact.rb +7 -14
- data/lib/constant_contact_client/models/line_item_details_dto.rb +245 -0
- data/lib/constant_contact_client/models/link.rb +2 -2
- data/lib/constant_contact_client/models/links.rb +25 -13
- data/lib/constant_contact_client/models/list_activity_add_contacts.rb +2 -2
- data/lib/constant_contact_client/models/list_activity_remove_contacts.rb +2 -2
- data/lib/constant_contact_client/models/list_id_list100.rb +2 -2
- data/lib/constant_contact_client/models/list_input.rb +2 -2
- data/lib/constant_contact_client/models/list_xref.rb +2 -2
- data/lib/constant_contact_client/models/list_xrefs.rb +2 -2
- data/lib/constant_contact_client/models/lpreporting_links.rb +2 -2
- data/lib/constant_contact_client/models/lpreporting_next.rb +2 -2
- data/lib/constant_contact_client/models/model_next.rb +2 -2
- data/lib/constant_contact_client/models/my_library_file_collection_inner.rb +2 -2
- data/lib/constant_contact_client/models/my_library_file_collection_inner_thumbnail.rb +2 -2
- data/lib/constant_contact_client/models/note.rb +2 -2
- data/lib/constant_contact_client/models/o_auth_error.rb +2 -2
- data/lib/constant_contact_client/models/online_meeting_dto.rb +272 -0
- data/lib/constant_contact_client/models/online_meeting_dto1.rb +273 -0
- data/lib/constant_contact_client/models/opens_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/opens_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/optouts_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/optouts_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/order_details_dto.rb +296 -0
- data/lib/constant_contact_client/models/order_ticket_keys_request_dto.rb +225 -0
- data/lib/constant_contact_client/models/p_contact_add_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/p_contact_add_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/p_contact_click_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/p_contact_click_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/p_contact_open_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/p_contact_opens_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/p_contact_sms_opt_in_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/p_contact_sms_opt_in_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/p_contact_update_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/p_contact_update_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/page_metadata_dto.rb +274 -0
- data/lib/constant_contact_client/models/paged_email_campaign_response.rb +2 -2
- data/lib/constant_contact_client/models/paged_hashtag_groups_dto.rb +257 -0
- data/lib/constant_contact_client/models/paged_response_link_rel_dto.rb +223 -0
- data/lib/constant_contact_client/models/paged_response_links_dto.rb +215 -0
- data/lib/constant_contact_client/models/paginated_registrations.rb +255 -0
- data/lib/constant_contact_client/models/pagination_dto_event_listing_dto.rb +256 -0
- data/lib/constant_contact_client/models/pagination_links.rb +2 -2
- data/lib/constant_contact_client/models/pagination_links_next.rb +2 -2
- data/lib/constant_contact_client/models/paging_links.rb +2 -2
- data/lib/constant_contact_client/models/partner_account.rb +2 -2
- data/lib/constant_contact_client/models/partner_account_links.rb +2 -2
- data/lib/constant_contact_client/models/partner_account_operations_request.rb +2 -2
- data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_headers_inner.rb +2 -2
- data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_path_parameters_inner.rb +2 -2
- data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_query_parameters_inner.rb +2 -2
- data/lib/constant_contact_client/models/partner_account_site_owner_list_inner.rb +2 -2
- data/lib/constant_contact_client/models/partner_unsubscribe_response.rb +216 -0
- data/lib/constant_contact_client/models/partners_link.rb +2 -2
- data/lib/constant_contact_client/models/patch_email_campaign_name_request.rb +2 -2
- data/lib/constant_contact_client/models/path_param_object.rb +2 -2
- data/lib/constant_contact_client/models/payment_status_update_request_dto.rb +242 -0
- data/lib/constant_contact_client/models/percents_email.rb +2 -2
- data/lib/constant_contact_client/models/phone_number.rb +2 -2
- data/lib/constant_contact_client/models/phone_number_put.rb +2 -2
- data/lib/constant_contact_client/models/plan_info.rb +2 -2
- data/lib/constant_contact_client/models/plan_tiers_object.rb +2 -2
- data/lib/constant_contact_client/models/plan_tiers_object_current_tiers_inner.rb +2 -2
- data/lib/constant_contact_client/models/post_create_dto.rb +262 -0
- data/lib/constant_contact_client/models/post_custom_field_delete201_response.rb +2 -2
- data/lib/constant_contact_client/models/post_custom_field_delete_request.rb +2 -2
- data/lib/constant_contact_client/models/post_dto.rb +272 -0
- data/lib/constant_contact_client/models/post_tag_request.rb +2 -2
- data/lib/constant_contact_client/models/profile_dto.rb +348 -0
- data/lib/constant_contact_client/models/profile_post_dto.rb +269 -0
- data/lib/constant_contact_client/models/profile_post_profile_dto.rb +323 -0
- data/lib/constant_contact_client/models/promo_code_dto.rb +408 -0
- data/lib/constant_contact_client/models/promo_code_dto1.rb +408 -0
- data/lib/constant_contact_client/models/provision.rb +2 -2
- data/lib/constant_contact_client/models/provision_response.rb +2 -2
- data/lib/constant_contact_client/models/put_tag_request.rb +2 -2
- data/lib/constant_contact_client/models/query_param_object.rb +2 -2
- data/lib/constant_contact_client/models/registrant_information_lite_dto.rb +345 -0
- data/lib/constant_contact_client/models/registration_status_update_request_dto.rb +242 -0
- data/lib/constant_contact_client/models/registration_status_update_response_dto.rb +218 -0
- data/lib/constant_contact_client/models/registration_ticket_dto.rb +266 -0
- data/lib/constant_contact_client/models/registrations_links.rb +232 -0
- data/lib/constant_contact_client/models/reporting_links.rb +2 -9
- data/lib/constant_contact_client/models/reporting_next.rb +2 -9
- data/lib/constant_contact_client/models/reportingsms_links.rb +214 -0
- data/lib/constant_contact_client/models/reportingsms_next.rb +222 -0
- data/lib/constant_contact_client/models/resend_to_non_openers_input.rb +2 -2
- data/lib/constant_contact_client/models/resend_to_non_openers_object.rb +2 -2
- data/lib/constant_contact_client/models/resubscribe_contact_request.rb +224 -0
- data/lib/constant_contact_client/models/schedule_email_campaign_activity_request.rb +2 -2
- data/lib/constant_contact_client/models/segment_data.rb +2 -2
- data/lib/constant_contact_client/models/segment_detail.rb +2 -2
- data/lib/constant_contact_client/models/segment_master.rb +2 -2
- data/lib/constant_contact_client/models/segment_name.rb +2 -2
- data/lib/constant_contact_client/models/segments_dto.rb +2 -2
- data/lib/constant_contact_client/models/segments_links.rb +221 -0
- data/lib/constant_contact_client/models/sends_tracking_activities_page.rb +2 -2
- data/lib/constant_contact_client/models/sends_tracking_activity.rb +2 -2
- data/lib/constant_contact_client/models/simple_field_dto.rb +278 -0
- data/lib/constant_contact_client/models/sms_campaign_summaries_page.rb +235 -0
- data/lib/constant_contact_client/models/sms_channel_consent_details.rb +3 -2
- data/lib/constant_contact_client/models/sso_user.rb +3 -3
- data/lib/constant_contact_client/models/stats_email.rb +2 -2
- data/lib/constant_contact_client/models/stats_email_activity.rb +2 -2
- data/lib/constant_contact_client/models/stats_error.rb +2 -2
- data/lib/constant_contact_client/models/status_display_label_dto.rb +226 -0
- data/lib/constant_contact_client/models/status_display_label_dto1.rb +226 -0
- data/lib/constant_contact_client/models/street_address.rb +2 -2
- data/lib/constant_contact_client/models/street_address_put.rb +2 -2
- data/lib/constant_contact_client/models/tag.rb +2 -2
- data/lib/constant_contact_client/models/tag_add_remove_contacts.rb +2 -2
- data/lib/constant_contact_client/models/tag_id_list500_limit.rb +2 -2
- data/lib/constant_contact_client/models/tag_post.rb +2 -2
- data/lib/constant_contact_client/models/tag_put.rb +2 -2
- data/lib/constant_contact_client/models/tags.rb +2 -2
- data/lib/constant_contact_client/models/tags_activity_links.rb +2 -2
- data/lib/constant_contact_client/models/tags_links.rb +2 -2
- data/lib/constant_contact_client/models/tags_paging_links.rb +2 -2
- data/lib/constant_contact_client/models/test_send_email_campaign_activity_request.rb +2 -2
- data/lib/constant_contact_client/models/ticket_summary_dto.rb +279 -0
- data/lib/constant_contact_client/models/ticket_summary_dto1.rb +279 -0
- data/lib/constant_contact_client/models/tier_object.rb +2 -2
- data/lib/constant_contact_client/models/track_dto.rb +377 -0
- data/lib/constant_contact_client/models/track_dto1.rb +377 -0
- data/lib/constant_contact_client/models/tracking_activity_sms_channel_dto.rb +2 -2
- data/lib/constant_contact_client/models/unique_email_counts.rb +2 -58
- data/lib/constant_contact_client/models/unique_sms_counts.rb +283 -0
- data/lib/constant_contact_client/models/update_account_request.rb +2 -2
- data/lib/constant_contact_client/models/update_contact_request.rb +15 -6
- data/lib/constant_contact_client/models/update_contact_request_email_address.rb +2 -2
- data/lib/constant_contact_client/models/update_contact_request_phone_numbers_inner.rb +2 -2
- data/lib/constant_contact_client/models/update_contact_request_sms_channel.rb +241 -0
- data/lib/constant_contact_client/models/update_contact_request_sms_channel_sms_channel_consents_inner.rb +249 -0
- data/lib/constant_contact_client/models/update_contact_request_street_addresses_inner.rb +2 -2
- data/lib/constant_contact_client/models/update_custom_field_request.rb +32 -25
- data/lib/constant_contact_client/models/update_custom_field_request_choices_inner.rb +255 -0
- data/lib/constant_contact_client/models/update_list200_response.rb +2 -2
- data/lib/constant_contact_client/models/update_list_request.rb +2 -2
- data/lib/constant_contact_client/models/update_registration_payment_status_using_put_request.rb +242 -0
- data/lib/constant_contact_client/models/update_registration_status_using_put207_response.rb +218 -0
- data/lib/constant_contact_client/models/update_registration_status_using_put_request.rb +242 -0
- data/lib/constant_contact_client/models/update_segment_name_request.rb +2 -2
- data/lib/constant_contact_client/models/webhooks_subscription_body.rb +2 -2
- data/lib/constant_contact_client/models/webhooks_subscription_collection_inner.rb +2 -2
- data/lib/constant_contact_client/models/webhooks_subscription_put_resp.rb +2 -2
- data/lib/constant_contact_client/models/webhooks_subscription_response.rb +2 -2
- data/lib/constant_contact_client/models/webhooks_test_send.rb +2 -2
- data/lib/constant_contact_client/version.rb +3 -3
- data/lib/constant_contact_client.rb +149 -4
- data/spec/spec_helper.rb +2 -2
- metadata +157 -9
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Constant Contact API v3
|
|
3
|
+
|
|
4
|
+
#Swagger build version 3.0.161
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.220
|
|
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
|
+
# Describes a social network profile (Business Page, Company Page/Organization, etc.). <br><strong>Note:</strong> Due to performance and/or rate-limit issues, some properties <em>may</em> be cached. Where possible, caching will be limited to 15 minutes.
|
|
18
|
+
class ProfileDto
|
|
19
|
+
# Whether the profile is currently accessible for posting. Publishing a post will fail if its profile is not currently accessible. Only populated when the GET request includes the query parameter <code>include=accessible</code>.
|
|
20
|
+
attr_accessor :accessible
|
|
21
|
+
|
|
22
|
+
attr_accessor :account_info
|
|
23
|
+
|
|
24
|
+
# Whether this profile is currently connected. You can only create and publish posts with connected profiles.
|
|
25
|
+
attr_accessor :connected
|
|
26
|
+
|
|
27
|
+
# The profile's handle on the social network (for example, an Instagram or TikTok username). May be <code>null</code> if the network does not expose a separate handle (for example, Facebook).
|
|
28
|
+
attr_accessor :handle
|
|
29
|
+
|
|
30
|
+
# URL of the profile's image or avatar.
|
|
31
|
+
attr_accessor :image_url
|
|
32
|
+
|
|
33
|
+
# Display name of the profile.
|
|
34
|
+
attr_accessor :name
|
|
35
|
+
|
|
36
|
+
# The social network this profile belongs to.
|
|
37
|
+
attr_accessor :network
|
|
38
|
+
|
|
39
|
+
# The social network-specific identifier for this profile.
|
|
40
|
+
attr_accessor :network_profile_id
|
|
41
|
+
|
|
42
|
+
# The social network-specific identifier for the user who owns this profile.
|
|
43
|
+
attr_accessor :network_user_id
|
|
44
|
+
|
|
45
|
+
# Unique identifier for this profile. Use this value in the <code>profile_id</code> field of a <code>ProfilePost</code> when creating a post.
|
|
46
|
+
attr_accessor :profile_id
|
|
47
|
+
|
|
48
|
+
# Network-specific settings for the profile. Only populated when the request includes <code>include=accessible</code> and settings are available for the network. Currently, only TikTok provides settings: <pre>\"content\": { \"comment_disabled\": Boolean, \"duet_disabled\": Boolean, \"stitch_disabled\": Boolean, \"max_video_post_duration_sec\": Integer }</pre>
|
|
49
|
+
attr_accessor :settings
|
|
50
|
+
|
|
51
|
+
# URL to the profile on the social network.
|
|
52
|
+
attr_accessor :url
|
|
53
|
+
|
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
|
+
def self.attribute_map
|
|
56
|
+
{
|
|
57
|
+
:'accessible' => :'accessible',
|
|
58
|
+
:'account_info' => :'account_info',
|
|
59
|
+
:'connected' => :'connected',
|
|
60
|
+
:'handle' => :'handle',
|
|
61
|
+
:'image_url' => :'image_url',
|
|
62
|
+
:'name' => :'name',
|
|
63
|
+
:'network' => :'network',
|
|
64
|
+
:'network_profile_id' => :'network_profile_id',
|
|
65
|
+
:'network_user_id' => :'network_user_id',
|
|
66
|
+
:'profile_id' => :'profile_id',
|
|
67
|
+
:'settings' => :'settings',
|
|
68
|
+
:'url' => :'url'
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns all the JSON keys this model knows about
|
|
73
|
+
def self.acceptable_attributes
|
|
74
|
+
attribute_map.values
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Attribute type mapping.
|
|
78
|
+
def self.openapi_types
|
|
79
|
+
{
|
|
80
|
+
:'accessible' => :'Boolean',
|
|
81
|
+
:'account_info' => :'GetSocialProfiles200ResponseInnerAccountInfo',
|
|
82
|
+
:'connected' => :'Boolean',
|
|
83
|
+
:'handle' => :'String',
|
|
84
|
+
:'image_url' => :'String',
|
|
85
|
+
:'name' => :'String',
|
|
86
|
+
:'network' => :'String',
|
|
87
|
+
:'network_profile_id' => :'String',
|
|
88
|
+
:'network_user_id' => :'String',
|
|
89
|
+
:'profile_id' => :'String',
|
|
90
|
+
:'settings' => :'Hash<String, Object>',
|
|
91
|
+
:'url' => :'String'
|
|
92
|
+
}
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# List of attributes with nullable: true
|
|
96
|
+
def self.openapi_nullable
|
|
97
|
+
Set.new([
|
|
98
|
+
])
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Initializes the object
|
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
103
|
+
def initialize(attributes = {})
|
|
104
|
+
if (!attributes.is_a?(Hash))
|
|
105
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ConstantContactClient::ProfileDto` initialize method"
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
109
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
110
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
111
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ConstantContactClient::ProfileDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
112
|
+
end
|
|
113
|
+
h[k.to_sym] = v
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'accessible')
|
|
117
|
+
self.accessible = attributes[:'accessible']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'account_info')
|
|
121
|
+
self.account_info = attributes[:'account_info']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'connected')
|
|
125
|
+
self.connected = attributes[:'connected']
|
|
126
|
+
else
|
|
127
|
+
self.connected = nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'handle')
|
|
131
|
+
self.handle = attributes[:'handle']
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'image_url')
|
|
135
|
+
self.image_url = attributes[:'image_url']
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'name')
|
|
139
|
+
self.name = attributes[:'name']
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'network')
|
|
143
|
+
self.network = attributes[:'network']
|
|
144
|
+
else
|
|
145
|
+
self.network = nil
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'network_profile_id')
|
|
149
|
+
self.network_profile_id = attributes[:'network_profile_id']
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'network_user_id')
|
|
153
|
+
self.network_user_id = attributes[:'network_user_id']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'profile_id')
|
|
157
|
+
self.profile_id = attributes[:'profile_id']
|
|
158
|
+
else
|
|
159
|
+
self.profile_id = nil
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'settings')
|
|
163
|
+
if (value = attributes[:'settings']).is_a?(Hash)
|
|
164
|
+
self.settings = value
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'url')
|
|
169
|
+
self.url = attributes[:'url']
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
174
|
+
# @return Array for valid properties with the reasons
|
|
175
|
+
def list_invalid_properties
|
|
176
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
177
|
+
invalid_properties = Array.new
|
|
178
|
+
if @connected.nil?
|
|
179
|
+
invalid_properties.push('invalid value for "connected", connected cannot be nil.')
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if @network.nil?
|
|
183
|
+
invalid_properties.push('invalid value for "network", network cannot be nil.')
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if @profile_id.nil?
|
|
187
|
+
invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.')
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
invalid_properties
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Check to see if the all the properties in the model are valid
|
|
194
|
+
# @return true if the model is valid
|
|
195
|
+
def valid?
|
|
196
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
197
|
+
return false if @connected.nil?
|
|
198
|
+
return false if @network.nil?
|
|
199
|
+
return false if @profile_id.nil?
|
|
200
|
+
true
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Checks equality by comparing each attribute.
|
|
204
|
+
# @param [Object] Object to be compared
|
|
205
|
+
def ==(o)
|
|
206
|
+
return true if self.equal?(o)
|
|
207
|
+
self.class == o.class &&
|
|
208
|
+
accessible == o.accessible &&
|
|
209
|
+
account_info == o.account_info &&
|
|
210
|
+
connected == o.connected &&
|
|
211
|
+
handle == o.handle &&
|
|
212
|
+
image_url == o.image_url &&
|
|
213
|
+
name == o.name &&
|
|
214
|
+
network == o.network &&
|
|
215
|
+
network_profile_id == o.network_profile_id &&
|
|
216
|
+
network_user_id == o.network_user_id &&
|
|
217
|
+
profile_id == o.profile_id &&
|
|
218
|
+
settings == o.settings &&
|
|
219
|
+
url == o.url
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# @see the `==` method
|
|
223
|
+
# @param [Object] Object to be compared
|
|
224
|
+
def eql?(o)
|
|
225
|
+
self == o
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Calculates hash code according to all attributes.
|
|
229
|
+
# @return [Integer] Hash code
|
|
230
|
+
def hash
|
|
231
|
+
[accessible, account_info, connected, handle, image_url, name, network, network_profile_id, network_user_id, profile_id, settings, url].hash
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Builds the object from hash
|
|
235
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
236
|
+
# @return [Object] Returns the model itself
|
|
237
|
+
def self.build_from_hash(attributes)
|
|
238
|
+
return nil unless attributes.is_a?(Hash)
|
|
239
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
240
|
+
transformed_hash = {}
|
|
241
|
+
openapi_types.each_pair do |key, type|
|
|
242
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
243
|
+
transformed_hash["#{key}"] = nil
|
|
244
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
245
|
+
# check to ensure the input is an array given that the attribute
|
|
246
|
+
# is documented as an array but the input is not
|
|
247
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
248
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
249
|
+
end
|
|
250
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
251
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
new(transformed_hash)
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Deserializes the data based on type
|
|
258
|
+
# @param string type Data type
|
|
259
|
+
# @param string value Value to be deserialized
|
|
260
|
+
# @return [Object] Deserialized data
|
|
261
|
+
def self._deserialize(type, value)
|
|
262
|
+
case type.to_sym
|
|
263
|
+
when :Time
|
|
264
|
+
Time.parse(value)
|
|
265
|
+
when :Date
|
|
266
|
+
Date.parse(value)
|
|
267
|
+
when :String
|
|
268
|
+
value.to_s
|
|
269
|
+
when :Integer
|
|
270
|
+
value.to_i
|
|
271
|
+
when :Float
|
|
272
|
+
value.to_f
|
|
273
|
+
when :Boolean
|
|
274
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
275
|
+
true
|
|
276
|
+
else
|
|
277
|
+
false
|
|
278
|
+
end
|
|
279
|
+
when :Object
|
|
280
|
+
# generic object (usually a Hash), return directly
|
|
281
|
+
value
|
|
282
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
283
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
284
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
285
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
286
|
+
k_type = Regexp.last_match[:k_type]
|
|
287
|
+
v_type = Regexp.last_match[:v_type]
|
|
288
|
+
{}.tap do |hash|
|
|
289
|
+
value.each do |k, v|
|
|
290
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
291
|
+
end
|
|
292
|
+
end
|
|
293
|
+
else # model
|
|
294
|
+
# models (e.g. Pet) or oneOf
|
|
295
|
+
klass = ConstantContactClient.const_get(type)
|
|
296
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Returns the string representation of the object
|
|
301
|
+
# @return [String] String presentation of the object
|
|
302
|
+
def to_s
|
|
303
|
+
to_hash.to_s
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
307
|
+
# @return [Hash] Returns the object in the form of hash
|
|
308
|
+
def to_body
|
|
309
|
+
to_hash
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# Returns the object in the form of hash
|
|
313
|
+
# @return [Hash] Returns the object in the form of hash
|
|
314
|
+
def to_hash
|
|
315
|
+
hash = {}
|
|
316
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
317
|
+
value = self.send(attr)
|
|
318
|
+
if value.nil?
|
|
319
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
320
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
hash[param] = _to_hash(value)
|
|
324
|
+
end
|
|
325
|
+
hash
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Outputs non-array value in the form of hash
|
|
329
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
330
|
+
# @param [Object] value Any valid value
|
|
331
|
+
# @return [Hash] Returns the value in the form of hash
|
|
332
|
+
def _to_hash(value)
|
|
333
|
+
if value.is_a?(Array)
|
|
334
|
+
value.compact.map { |v| _to_hash(v) }
|
|
335
|
+
elsif value.is_a?(Hash)
|
|
336
|
+
{}.tap do |hash|
|
|
337
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
338
|
+
end
|
|
339
|
+
elsif value.respond_to? :to_hash
|
|
340
|
+
value.to_hash
|
|
341
|
+
else
|
|
342
|
+
value
|
|
343
|
+
end
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
end
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Constant Contact API v3
|
|
3
|
+
|
|
4
|
+
#Swagger build version 3.0.161
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.220
|
|
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
|
+
# The content to post to one or more social profiles as part of a social post campaign.
|
|
18
|
+
class ProfilePostDto
|
|
19
|
+
# Images to include in the post. Each image must be accessible via a public URL.
|
|
20
|
+
attr_accessor :images
|
|
21
|
+
|
|
22
|
+
# Identifier for this post content. Generated by the server on creation. When updating a post, existing profile posts must include their original <code>post_content_id</code> unchanged.
|
|
23
|
+
attr_accessor :post_content_id
|
|
24
|
+
|
|
25
|
+
# The list of profiles to post to. Can be an empty list only when the post is in <code>DRAFT</code> status.
|
|
26
|
+
attr_accessor :profiles
|
|
27
|
+
|
|
28
|
+
# Network-specific post settings. If no settings are provided, this field will be omitted in the JSON response. All values are persisted as strings. Currently, only TikTok has available settings: <pre>{ \"settings\": { \"tiktok\": { \"disable_comment\": \"true\", \"disable_duet\": \"false\", \"disable_stitch\": \"true\", \"auto_add_music\": \"false\" } } }</pre>
|
|
29
|
+
attr_accessor :settings
|
|
30
|
+
|
|
31
|
+
# The text/caption content for the post. Whether text is required depends on the target social network. In <code>DRAFT</code> status, this is always optional.
|
|
32
|
+
attr_accessor :text
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'images' => :'images',
|
|
38
|
+
:'post_content_id' => :'post_content_id',
|
|
39
|
+
:'profiles' => :'profiles',
|
|
40
|
+
:'settings' => :'settings',
|
|
41
|
+
:'text' => :'text'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'images' => :'Array<CreateSocialPostRequestProfilePostsInnerImagesInner>',
|
|
54
|
+
:'post_content_id' => :'String',
|
|
55
|
+
:'profiles' => :'Array<CreateSocialPostRequestProfilePostsInnerProfilesInner>',
|
|
56
|
+
:'settings' => :'Hash<String, Hash<String, String>>',
|
|
57
|
+
:'text' => :'String'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List of attributes with nullable: true
|
|
62
|
+
def self.openapi_nullable
|
|
63
|
+
Set.new([
|
|
64
|
+
])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Initializes the object
|
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ConstantContactClient::ProfilePostDto` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ConstantContactClient::ProfilePostDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'images')
|
|
83
|
+
if (value = attributes[:'images']).is_a?(Array)
|
|
84
|
+
self.images = value
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'post_content_id')
|
|
89
|
+
self.post_content_id = attributes[:'post_content_id']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'profiles')
|
|
93
|
+
if (value = attributes[:'profiles']).is_a?(Array)
|
|
94
|
+
self.profiles = value
|
|
95
|
+
end
|
|
96
|
+
else
|
|
97
|
+
self.profiles = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'settings')
|
|
101
|
+
if (value = attributes[:'settings']).is_a?(Hash)
|
|
102
|
+
self.settings = value
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'text')
|
|
107
|
+
self.text = attributes[:'text']
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
115
|
+
invalid_properties = Array.new
|
|
116
|
+
if @profiles.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "profiles", profiles cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
invalid_properties
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Check to see if the all the properties in the model are valid
|
|
124
|
+
# @return true if the model is valid
|
|
125
|
+
def valid?
|
|
126
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
127
|
+
return false if @profiles.nil?
|
|
128
|
+
true
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Checks equality by comparing each attribute.
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def ==(o)
|
|
134
|
+
return true if self.equal?(o)
|
|
135
|
+
self.class == o.class &&
|
|
136
|
+
images == o.images &&
|
|
137
|
+
post_content_id == o.post_content_id &&
|
|
138
|
+
profiles == o.profiles &&
|
|
139
|
+
settings == o.settings &&
|
|
140
|
+
text == o.text
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# @see the `==` method
|
|
144
|
+
# @param [Object] Object to be compared
|
|
145
|
+
def eql?(o)
|
|
146
|
+
self == o
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Calculates hash code according to all attributes.
|
|
150
|
+
# @return [Integer] Hash code
|
|
151
|
+
def hash
|
|
152
|
+
[images, post_content_id, profiles, settings, text].hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Builds the object from hash
|
|
156
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
157
|
+
# @return [Object] Returns the model itself
|
|
158
|
+
def self.build_from_hash(attributes)
|
|
159
|
+
return nil unless attributes.is_a?(Hash)
|
|
160
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
161
|
+
transformed_hash = {}
|
|
162
|
+
openapi_types.each_pair do |key, type|
|
|
163
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
164
|
+
transformed_hash["#{key}"] = nil
|
|
165
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
166
|
+
# check to ensure the input is an array given that the attribute
|
|
167
|
+
# is documented as an array but the input is not
|
|
168
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
169
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
170
|
+
end
|
|
171
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
172
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
new(transformed_hash)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Deserializes the data based on type
|
|
179
|
+
# @param string type Data type
|
|
180
|
+
# @param string value Value to be deserialized
|
|
181
|
+
# @return [Object] Deserialized data
|
|
182
|
+
def self._deserialize(type, value)
|
|
183
|
+
case type.to_sym
|
|
184
|
+
when :Time
|
|
185
|
+
Time.parse(value)
|
|
186
|
+
when :Date
|
|
187
|
+
Date.parse(value)
|
|
188
|
+
when :String
|
|
189
|
+
value.to_s
|
|
190
|
+
when :Integer
|
|
191
|
+
value.to_i
|
|
192
|
+
when :Float
|
|
193
|
+
value.to_f
|
|
194
|
+
when :Boolean
|
|
195
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
196
|
+
true
|
|
197
|
+
else
|
|
198
|
+
false
|
|
199
|
+
end
|
|
200
|
+
when :Object
|
|
201
|
+
# generic object (usually a Hash), return directly
|
|
202
|
+
value
|
|
203
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
204
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
205
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
206
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
207
|
+
k_type = Regexp.last_match[:k_type]
|
|
208
|
+
v_type = Regexp.last_match[:v_type]
|
|
209
|
+
{}.tap do |hash|
|
|
210
|
+
value.each do |k, v|
|
|
211
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
else # model
|
|
215
|
+
# models (e.g. Pet) or oneOf
|
|
216
|
+
klass = ConstantContactClient.const_get(type)
|
|
217
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Returns the string representation of the object
|
|
222
|
+
# @return [String] String presentation of the object
|
|
223
|
+
def to_s
|
|
224
|
+
to_hash.to_s
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
228
|
+
# @return [Hash] Returns the object in the form of hash
|
|
229
|
+
def to_body
|
|
230
|
+
to_hash
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Returns the object in the form of hash
|
|
234
|
+
# @return [Hash] Returns the object in the form of hash
|
|
235
|
+
def to_hash
|
|
236
|
+
hash = {}
|
|
237
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
238
|
+
value = self.send(attr)
|
|
239
|
+
if value.nil?
|
|
240
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
241
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
hash[param] = _to_hash(value)
|
|
245
|
+
end
|
|
246
|
+
hash
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Outputs non-array value in the form of hash
|
|
250
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
251
|
+
# @param [Object] value Any valid value
|
|
252
|
+
# @return [Hash] Returns the value in the form of hash
|
|
253
|
+
def _to_hash(value)
|
|
254
|
+
if value.is_a?(Array)
|
|
255
|
+
value.compact.map { |v| _to_hash(v) }
|
|
256
|
+
elsif value.is_a?(Hash)
|
|
257
|
+
{}.tap do |hash|
|
|
258
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
259
|
+
end
|
|
260
|
+
elsif value.respond_to? :to_hash
|
|
261
|
+
value.to_hash
|
|
262
|
+
else
|
|
263
|
+
value
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
end
|