rcs 1.0.18 → 2.0.0.pre.rc.2
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/lib/environment.rb +1 -1
- data/lib/rcs/brands/client.rb +631 -0
- data/lib/rcs/brands/types/autofill_brand_schema_options.rb +61 -0
- data/lib/rcs/brands/types/brand_contact.rb +84 -0
- data/lib/rcs/campaigns/client.rb +44 -0
- data/lib/rcs/campaigns/dlc/client.rb +480 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords.rb +99 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_help.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_in.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_out.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_links.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_options.rb +110 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_use_case.rb +76 -0
- data/lib/rcs/campaigns/rcs/client.rb +457 -0
- data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +155 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent.rb +140 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_emails_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_phones_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_websites_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_links.rb +74 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_in.rb +75 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_out.rb +76 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_use_case.rb +75 -0
- data/lib/rcs/campaigns/toll_free/client.rb +429 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +130 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_opt_in.rb +86 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_use_case.rb +75 -0
- data/lib/rcs/contacts/client.rb +275 -0
- data/lib/rcs/conversations/client.rb +273 -0
- data/lib/rcs/message/client.rb +30 -0
- data/lib/rcs/message/sms/client.rb +96 -0
- data/lib/rcs/messages/client.rb +192 -0
- data/lib/rcs/messages/mms/client.rb +98 -0
- data/lib/rcs/messages/rcs/client.rb +94 -0
- data/lib/rcs/messages/send/client.rb +318 -0
- data/lib/rcs/messages/send/types/send_mms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_mms_schema_options.rb +108 -0
- data/lib/rcs/messages/send/types/send_rcs_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_schema_options.rb +81 -0
- data/lib/rcs/messages/types/message_reaction_schema_options.rb +71 -0
- data/lib/rcs/phone_numbers/campaign/client.rb +179 -0
- data/lib/rcs/phone_numbers/client.rb +359 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_level.rb +16 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options.rb +93 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options_enhanced_contact_info.rb +64 -0
- data/lib/rcs/phone_numbers/types/phone_numbers_get_response.rb +58 -0
- data/lib/rcs/phone_numbers/types/search_schema_location.rb +96 -0
- data/lib/rcs/phone_numbers/types/search_schema_number.rb +81 -0
- data/lib/rcs/phone_numbers/types/search_schema_options.rb +62 -0
- data/lib/rcs/phone_numbers/webhook/client.rb +191 -0
- data/lib/rcs/status/client.rb +30 -0
- data/lib/rcs/status/get/client.rb +367 -0
- data/lib/rcs/tools/client.rb +32 -199
- data/lib/rcs/tools/contact_card/client.rb +285 -0
- data/lib/rcs/tools/contact_card/types/get_v_card_schema_options.rb +67 -0
- data/lib/rcs/tools/file/client.rb +138 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options.rb +70 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options_download.rb +66 -0
- data/lib/rcs/tools/url/client.rb +245 -0
- data/lib/rcs/types/advanced_phone_information.rb +147 -0
- data/lib/rcs/types/advanced_phone_information_carrier.rb +90 -0
- data/lib/rcs/types/advanced_phone_information_contact.rb +146 -0
- data/lib/rcs/types/advanced_phone_information_location.rb +142 -0
- data/lib/rcs/types/advanced_phone_information_location_coordinates.rb +73 -0
- data/lib/rcs/types/advanced_phone_information_location_country.rb +77 -0
- data/lib/rcs/types/advanced_phone_information_type.rb +97 -0
- data/lib/rcs/types/advanced_phone_information_type_recommendation.rb +15 -0
- data/lib/rcs/types/agent.rb +68 -0
- data/lib/rcs/types/attach_webhook_params.rb +60 -0
- data/lib/rcs/types/attach_webhook_response_webhook.rb +86 -0
- data/lib/rcs/types/attach_webhook_schema_name.rb +88 -0
- data/lib/rcs/types/attach_webhook_schema_webhook_id.rb +77 -0
- data/lib/rcs/types/attached_phone_number_result.rb +75 -0
- data/lib/rcs/types/autofill_campaign_params.rb +69 -0
- data/lib/rcs/types/autofill_dlc_campaign_response.rb +169 -0
- data/lib/rcs/types/autofill_dlc_response_keywords.rb +95 -0
- data/lib/rcs/types/autofill_dlc_response_keywords_help.rb +70 -0
- data/lib/rcs/{send/types/send_sms_response.rb → types/autofill_dlc_response_keywords_opt_in.rb} +18 -17
- data/lib/rcs/types/autofill_dlc_response_keywords_opt_out.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_links.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_options.rb +106 -0
- data/lib/rcs/types/autofill_dlc_response_use_case.rb +72 -0
- data/lib/rcs/types/bad_request_error_body.rb +44 -45
- data/lib/rcs/types/basic_phone_information.rb +127 -0
- data/lib/rcs/{company/types/company_register_response_brand.rb → types/basic_phone_information_contact.rb} +12 -21
- data/lib/rcs/types/basic_phone_information_location.rb +74 -0
- data/lib/rcs/types/basic_phone_information_location_country.rb +75 -0
- data/lib/rcs/types/brand_status.rb +92 -0
- data/lib/rcs/types/brand_status_enum.rb +21 -0
- data/lib/rcs/types/buy_response_capabilities.rb +77 -0
- data/lib/rcs/types/campaign_enum.rb +15 -0
- data/lib/rcs/types/campaign_query.rb +69 -0
- data/lib/rcs/{company/types/company_register_request_company_id.rb → types/campaign_submission_result.rb} +15 -16
- data/lib/rcs/types/campaign_validation_response_errors_item.rb +76 -0
- data/lib/rcs/types/campaign_validation_result.rb +71 -0
- data/lib/rcs/types/click_action.rb +73 -0
- data/lib/rcs/types/click_action_data.rb +56 -0
- data/lib/rcs/types/click_action_data_metadata.rb +69 -0
- data/lib/rcs/types/company_sector_enum.rb +26 -0
- data/lib/rcs/types/company_type_enum.rb +14 -0
- data/lib/rcs/types/configured_webhook.rb +85 -0
- data/lib/rcs/types/contact.rb +105 -0
- data/lib/rcs/types/contact_id.rb +57 -0
- data/lib/rcs/types/conversation.rb +146 -0
- data/lib/rcs/types/conversation_contact.rb +68 -0
- data/lib/rcs/types/conversation_list.rb +79 -0
- data/lib/rcs/types/conversation_sender.rb +60 -0
- data/lib/rcs/types/create_url_options.rb +61 -0
- data/lib/rcs/types/detached_phone_number_result.rb +75 -0
- data/lib/rcs/types/detached_webhook_info.rb +74 -0
- data/lib/rcs/types/detailed_phone_number_enum.rb +25 -0
- data/lib/rcs/types/dlc_assignment_status_enum.rb +19 -0
- data/lib/rcs/types/dlc_campaign_status.rb +107 -0
- data/lib/rcs/types/dlc_campaign_use_case_enum.rb +35 -0
- data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +194 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords.rb +94 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_help.rb +72 -0
- data/lib/rcs/{send/types/send_mms_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_in.rb} +20 -17
- data/lib/rcs/{send/types/send_rcs_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_out.rb} +20 -17
- data/lib/rcs/types/dlc_with_extended_brand_and_status_links.rb +70 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_options.rb +106 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_use_case.rb +72 -0
- data/lib/rcs/types/enhanced_contact.rb +9 -0
- data/lib/rcs/types/enhanced_contact_item.rb +104 -0
- data/lib/rcs/types/error.rb +61 -0
- data/lib/rcs/types/extended_brand.rb +194 -0
- data/lib/rcs/types/extended_brand_with_vetting.rb +226 -0
- data/lib/rcs/types/extended_rcs_campaign.rb +173 -0
- data/lib/rcs/{company/types/company_register_request.rb → types/get_conversation_params.rb} +13 -12
- data/lib/rcs/types/get_conversation_request_id.rb +58 -0
- data/lib/rcs/types/get_conversation_request_recipient.rb +72 -0
- data/lib/rcs/types/get_dlc_campaign_status_response_updates.rb +96 -0
- data/lib/rcs/types/get_toll_free_campaign_status_response_updates.rb +92 -0
- data/lib/rcs/types/inbound_button.rb +56 -0
- data/lib/rcs/types/link_click_event.rb +465 -0
- data/lib/rcs/{company/types/company_update_response.rb → types/location_share_action.rb} +19 -19
- data/lib/rcs/types/location_share_action_data.rb +89 -0
- data/lib/rcs/types/message.rb +174 -0
- data/lib/rcs/types/message_content.rb +85 -0
- data/lib/rcs/types/message_method_enum.rb +12 -0
- data/lib/rcs/types/message_protocol_enum.rb +12 -0
- data/lib/rcs/types/message_schedule.rb +94 -0
- data/lib/rcs/types/message_status_enum.rb +16 -0
- data/lib/rcs/types/message_volume_enum.rb +20 -0
- data/lib/rcs/types/messaging_profile_enum.rb +11 -0
- data/lib/rcs/types/mms_content.rb +74 -0
- data/lib/rcs/types/mms_validation_response_segments.rb +85 -0
- data/lib/rcs/types/mms_validation_response_segments_value_item.rb +75 -0
- data/lib/rcs/types/mms_validation_result.rb +82 -0
- data/lib/rcs/types/nullable_contact.rb +84 -0
- data/lib/rcs/types/number_format.rb +79 -0
- data/lib/rcs/types/opt_in_method_enum.rb +13 -0
- data/lib/rcs/types/optional_brand_info.rb +145 -0
- data/lib/rcs/types/optional_contact.rb +83 -0
- data/lib/rcs/types/optional_contacts.rb +84 -0
- data/lib/rcs/types/phone.rb +101 -0
- data/lib/rcs/types/phone_capabilities.rb +75 -0
- data/lib/rcs/types/phone_enum.rb +13 -0
- data/lib/rcs/types/phone_feature_enum.rb +18 -0
- data/lib/rcs/types/phone_number_campaign_attach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_campaign_detach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_cost.rb +75 -0
- data/lib/rcs/types/phone_number_details.rb +110 -0
- data/lib/rcs/types/phone_number_enum.rb +18 -0
- data/lib/rcs/types/phone_number_region.rb +91 -0
- data/lib/rcs/types/phone_number_status.rb +90 -0
- data/lib/rcs/types/phone_number_status_enum.rb +16 -0
- data/lib/rcs/types/pinnacle_file_upload_metadata.rb +84 -0
- data/lib/rcs/types/pinnacle_url_config.rb +71 -0
- data/lib/rcs/types/profile_status_enum.rb +17 -0
- data/lib/rcs/types/purchased_number.rb +75 -0
- data/lib/rcs/types/rcs.rb +70 -0
- data/lib/rcs/types/rcs_base.rb +82 -0
- data/lib/rcs/types/rcs_base_options.rb +100 -0
- data/lib/rcs/types/rcs_button_call.rb +68 -0
- data/lib/rcs/types/rcs_button_content.rb +148 -0
- data/lib/rcs/types/rcs_button_open_url.rb +68 -0
- data/lib/rcs/types/rcs_button_request_user_location.rb +58 -0
- data/lib/rcs/types/rcs_button_schedule_event.rb +98 -0
- data/lib/rcs/types/rcs_button_send_location.rb +74 -0
- data/lib/rcs/types/rcs_button_send_location_lat_long.rb +68 -0
- data/lib/rcs/types/rcs_button_trigger.rb +78 -0
- data/lib/rcs/types/rcs_campaign.rb +143 -0
- data/lib/rcs/types/rcs_campaign_opt_in_method_enum.rb +15 -0
- data/lib/rcs/types/rcs_campaign_schema_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_emails_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_phones_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_websites_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_emails_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_phones_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_websites_item.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_status.rb +86 -0
- data/lib/rcs/types/rcs_campaign_use_case_enum.rb +23 -0
- data/lib/rcs/types/rcs_card.rb +110 -0
- data/lib/rcs/types/rcs_cards.rb +79 -0
- data/lib/rcs/types/rcs_cards_cards_item.rb +88 -0
- data/lib/rcs/types/rcs_cards_content.rb +79 -0
- data/lib/rcs/types/rcs_cards_content_cards_item.rb +94 -0
- data/lib/rcs/types/rcs_content.rb +72 -0
- data/lib/rcs/types/rcs_media.rb +110 -0
- data/lib/rcs/types/rcs_media_content.rb +81 -0
- data/lib/rcs/types/rcs_media_details_content.rb +77 -0
- data/lib/rcs/types/rcs_text.rb +106 -0
- data/lib/rcs/types/rcs_text_content.rb +72 -0
- data/lib/rcs/types/rcs_validate_content.rb +70 -0
- data/lib/rcs/{company/types/company_register_response.rb → types/rcs_validate_content_media.rb} +19 -21
- data/lib/rcs/types/rcs_validation_result.rb +76 -0
- data/lib/rcs/types/reaction_result.rb +67 -0
- data/lib/rcs/types/scheduled_messaage.rb +73 -0
- data/lib/rcs/types/scheduled_send_response_config.rb +89 -0
- data/lib/rcs/types/send_sms_response_segments.rb +69 -0
- data/lib/rcs/types/send_sms_response_segments_encoding.rb +11 -0
- data/lib/rcs/types/sent_mms_details.rb +102 -0
- data/lib/rcs/types/sent_rcs_details.rb +105 -0
- data/lib/rcs/types/sent_sms_details.rb +108 -0
- data/lib/rcs/types/shortened_url.rb +77 -0
- data/lib/rcs/types/shortened_url_with_click_data.rb +90 -0
- data/lib/rcs/types/sms_content.rb +58 -0
- data/lib/rcs/types/sms_validation_response_segments.rb +80 -0
- data/lib/rcs/types/sms_validation_response_segments_gsm_7.rb +75 -0
- data/lib/rcs/types/sms_validation_response_segments_utf_16.rb +68 -0
- data/lib/rcs/types/sms_validation_response_total.rb +75 -0
- data/lib/rcs/types/sms_validation_result.rb +102 -0
- data/lib/rcs/types/sub_use_case_enum.rb +19 -0
- data/lib/rcs/types/submission_results.rb +57 -0
- data/lib/rcs/types/successful_conversation_update.rb +58 -0
- data/lib/rcs/types/toll_free_campaign.rb +118 -0
- data/lib/rcs/types/toll_free_campaign_schema_opt_in.rb +78 -0
- data/lib/rcs/types/toll_free_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/toll_free_campaign_status.rb +91 -0
- data/lib/rcs/types/toll_free_campaign_use_case_enum.rb +52 -0
- data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +155 -0
- data/lib/rcs/types/toll_free_status_enum.rb +20 -0
- data/lib/rcs/types/tracking.rb +17 -0
- data/lib/rcs/types/updated_contact_id.rb +57 -0
- data/lib/rcs/types/upload_results.rb +80 -0
- data/lib/rcs/types/v_card_address_schema_type_item.rb +15 -0
- data/lib/rcs/types/v_card_data.rb +237 -0
- data/lib/rcs/types/v_card_data_file.rb +74 -0
- data/lib/rcs/types/v_card_data_file_metadata.rb +62 -0
- data/lib/rcs/types/v_card_email_schema_type_item.rb +21 -0
- data/lib/rcs/types/v_card_geo.rb +70 -0
- data/lib/rcs/types/v_card_name.rb +98 -0
- data/lib/rcs/types/v_card_organization.rb +70 -0
- data/lib/rcs/types/v_card_phone_schema_type_item.rb +21 -0
- data/lib/rcs/types/validate_campaign_params.rb +69 -0
- data/lib/rcs/types/validation_error_details.rb +76 -0
- data/lib/rcs/types/validation_results.rb +71 -0
- data/lib/rcs/types/vcard.rb +215 -0
- data/lib/rcs/types/vcard_address.rb +130 -0
- data/lib/rcs/types/vcard_content.rb +223 -0
- data/lib/rcs/types/vcard_email.rb +70 -0
- data/lib/rcs/types/vcard_phone.rb +70 -0
- data/lib/rcs/types/vcard_resource.rb +71 -0
- data/lib/rcs/types/vetting_feedback.rb +81 -0
- data/lib/rcs/types/vetting_history.rb +98 -0
- data/lib/rcs/types/vetting_history_vetting_status.rb +13 -0
- data/lib/rcs/types/vetting_results.rb +57 -0
- data/lib/rcs/types/webhook_event_enum.rb +13 -0
- data/lib/rcs/types/webhook_result.rb +64 -0
- data/lib/rcs/{company/types/company_update_response_brand.rb → types/webhooks.rb} +25 -17
- data/lib/rcs/types/zod_error.rb +73 -0
- data/lib/rcs/webhooks/client.rb +93 -0
- data/lib/rcs.rb +67 -83
- data/lib/requests.rb +4 -4
- data/lib/types_export.rb +252 -46
- metadata +278 -52
- data/lib/rcs/company/client.rb +0 -375
- data/lib/rcs/company/types/company_register_request_company.rb +0 -128
- data/lib/rcs/send/client.rb +0 -382
- data/lib/rcs/send/types/rcs_fallback.rb +0 -84
- data/lib/rcs/tools/types/tools_shorten_url_response.rb +0 -70
- data/lib/rcs/tools/types/tools_upload_url_response.rb +0 -69
- data/lib/rcs/types/action.rb +0 -154
- data/lib/rcs/types/action_lat_long.rb +0 -68
- data/lib/rcs/types/action_type.rb +0 -16
- data/lib/rcs/types/additional_email.rb +0 -65
- data/lib/rcs/types/additional_phone_number.rb +0 -65
- data/lib/rcs/types/additional_website.rb +0 -65
- data/lib/rcs/types/card.rb +0 -90
- data/lib/rcs/types/company.rb +0 -319
- data/lib/rcs/types/company_additional_emails_item.rb +0 -67
- data/lib/rcs/types/company_additional_phone_numbers_item.rb +0 -67
- data/lib/rcs/types/company_additional_websites_item.rb +0 -67
- data/lib/rcs/types/company_category.rb +0 -20
- data/lib/rcs/types/company_contact.rb +0 -117
- data/lib/rcs/types/company_details.rb +0 -120
- data/lib/rcs/types/forbidden_error_body.rb +0 -57
- data/lib/rcs/types/inbound_action_message.rb +0 -117
- data/lib/rcs/types/inbound_location_message.rb +0 -106
- data/lib/rcs/types/inbound_location_message_coordinates.rb +0 -65
- data/lib/rcs/types/inbound_media_message.rb +0 -112
- data/lib/rcs/types/inbound_message.rb +0 -88
- data/lib/rcs/types/inbound_message_message_type.rb +0 -10
- data/lib/rcs/types/inbound_message_metadata.rb +0 -79
- data/lib/rcs/types/inbound_text_message.rb +0 -100
- data/lib/rcs/types/internal_server_error_body.rb +0 -57
- data/lib/rcs/types/media_payload.rb +0 -65
- data/lib/rcs/types/message_metadata.rb +0 -56
- data/lib/rcs/types/messaging.rb +0 -95
- data/lib/rcs/types/optionals.rb +0 -99
- data/lib/rcs/types/payment_required_error_body.rb +0 -57
- data/lib/rcs/types/point_of_contact.rb +0 -72
- data/lib/rcs/types/rcs_functionalities.rb +0 -117
- data/lib/rcs/types/sender_metadata.rb +0 -74
- data/lib/rcs/types/unauthorized_error_body.rb +0 -57
@@ -0,0 +1,140 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "upsert_rcs_schema_agent_emails_item"
|
4
|
+
require_relative "upsert_rcs_schema_agent_phones_item"
|
5
|
+
require_relative "upsert_rcs_schema_agent_websites_item"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module Pinnacle
|
10
|
+
module Campaigns
|
11
|
+
module Rcs
|
12
|
+
module Types
|
13
|
+
# Create an agent for the campaign.
|
14
|
+
class UpsertRcsSchemaAgent
|
15
|
+
# @return [String] Color of the agent's buttons. <br>
|
16
|
+
# Must have sufficient contrast with white.
|
17
|
+
attr_reader :color
|
18
|
+
# @return [String] Description of the agent.
|
19
|
+
attr_reader :description
|
20
|
+
# @return [Array<Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentEmailsItem>] List of emails (1-3 required).
|
21
|
+
attr_reader :emails
|
22
|
+
# @return [String] Link to the agent's hero.
|
23
|
+
attr_reader :hero_url
|
24
|
+
# @return [String] Link to the agent's icon.
|
25
|
+
attr_reader :icon_url
|
26
|
+
# @return [String] Name of the agent.
|
27
|
+
attr_reader :name
|
28
|
+
# @return [Array<Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentPhonesItem>] List of phone numbers (1-3 required).
|
29
|
+
attr_reader :phones
|
30
|
+
# @return [Array<Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentWebsitesItem>] List of urls (1-3 required).
|
31
|
+
attr_reader :websites
|
32
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
33
|
+
attr_reader :additional_properties
|
34
|
+
# @return [Object]
|
35
|
+
attr_reader :_field_set
|
36
|
+
protected :_field_set
|
37
|
+
|
38
|
+
OMIT = Object.new
|
39
|
+
|
40
|
+
# @param color [String] Color of the agent's buttons. <br>
|
41
|
+
# Must have sufficient contrast with white.
|
42
|
+
# @param description [String] Description of the agent.
|
43
|
+
# @param emails [Array<Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentEmailsItem>] List of emails (1-3 required).
|
44
|
+
# @param hero_url [String] Link to the agent's hero.
|
45
|
+
# @param icon_url [String] Link to the agent's icon.
|
46
|
+
# @param name [String] Name of the agent.
|
47
|
+
# @param phones [Array<Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentPhonesItem>] List of phone numbers (1-3 required).
|
48
|
+
# @param websites [Array<Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentWebsitesItem>] List of urls (1-3 required).
|
49
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
50
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgent]
|
51
|
+
def initialize(color: OMIT, description: OMIT, emails: OMIT, hero_url: OMIT, icon_url: OMIT, name: OMIT,
|
52
|
+
phones: OMIT, websites: OMIT, additional_properties: nil)
|
53
|
+
@color = color if color != OMIT
|
54
|
+
@description = description if description != OMIT
|
55
|
+
@emails = emails if emails != OMIT
|
56
|
+
@hero_url = hero_url if hero_url != OMIT
|
57
|
+
@icon_url = icon_url if icon_url != OMIT
|
58
|
+
@name = name if name != OMIT
|
59
|
+
@phones = phones if phones != OMIT
|
60
|
+
@websites = websites if websites != OMIT
|
61
|
+
@additional_properties = additional_properties
|
62
|
+
@_field_set = {
|
63
|
+
"color": color,
|
64
|
+
"description": description,
|
65
|
+
"emails": emails,
|
66
|
+
"heroUrl": hero_url,
|
67
|
+
"iconUrl": icon_url,
|
68
|
+
"name": name,
|
69
|
+
"phones": phones,
|
70
|
+
"websites": websites
|
71
|
+
}.reject do |_k, v|
|
72
|
+
v == OMIT
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# Deserialize a JSON object to an instance of UpsertRcsSchemaAgent
|
77
|
+
#
|
78
|
+
# @param json_object [String]
|
79
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgent]
|
80
|
+
def self.from_json(json_object:)
|
81
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
82
|
+
parsed_json = JSON.parse(json_object)
|
83
|
+
color = parsed_json["color"]
|
84
|
+
description = parsed_json["description"]
|
85
|
+
emails = parsed_json["emails"]&.map do |item|
|
86
|
+
item = item.to_json
|
87
|
+
Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentEmailsItem.from_json(json_object: item)
|
88
|
+
end
|
89
|
+
hero_url = parsed_json["heroUrl"]
|
90
|
+
icon_url = parsed_json["iconUrl"]
|
91
|
+
name = parsed_json["name"]
|
92
|
+
phones = parsed_json["phones"]&.map do |item|
|
93
|
+
item = item.to_json
|
94
|
+
Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentPhonesItem.from_json(json_object: item)
|
95
|
+
end
|
96
|
+
websites = parsed_json["websites"]&.map do |item|
|
97
|
+
item = item.to_json
|
98
|
+
Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentWebsitesItem.from_json(json_object: item)
|
99
|
+
end
|
100
|
+
new(
|
101
|
+
color: color,
|
102
|
+
description: description,
|
103
|
+
emails: emails,
|
104
|
+
hero_url: hero_url,
|
105
|
+
icon_url: icon_url,
|
106
|
+
name: name,
|
107
|
+
phones: phones,
|
108
|
+
websites: websites,
|
109
|
+
additional_properties: struct
|
110
|
+
)
|
111
|
+
end
|
112
|
+
|
113
|
+
# Serialize an instance of UpsertRcsSchemaAgent to a JSON object
|
114
|
+
#
|
115
|
+
# @return [String]
|
116
|
+
def to_json(*_args)
|
117
|
+
@_field_set&.to_json
|
118
|
+
end
|
119
|
+
|
120
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
121
|
+
# hash and check each fields type against the current object's property
|
122
|
+
# definitions.
|
123
|
+
#
|
124
|
+
# @param obj [Object]
|
125
|
+
# @return [Void]
|
126
|
+
def self.validate_raw(obj:)
|
127
|
+
obj.color&.is_a?(String) != false || raise("Passed value for field obj.color is not the expected type, validation failed.")
|
128
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
129
|
+
obj.emails&.is_a?(Array) != false || raise("Passed value for field obj.emails is not the expected type, validation failed.")
|
130
|
+
obj.hero_url&.is_a?(String) != false || raise("Passed value for field obj.hero_url is not the expected type, validation failed.")
|
131
|
+
obj.icon_url&.is_a?(String) != false || raise("Passed value for field obj.icon_url is not the expected type, validation failed.")
|
132
|
+
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
133
|
+
obj.phones&.is_a?(Array) != false || raise("Passed value for field obj.phones is not the expected type, validation failed.")
|
134
|
+
obj.websites&.is_a?(Array) != false || raise("Passed value for field obj.websites is not the expected type, validation failed.")
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Campaigns
|
8
|
+
module Rcs
|
9
|
+
module Types
|
10
|
+
class UpsertRcsSchemaAgentEmailsItem
|
11
|
+
# @return [String] Email attached to the agent.
|
12
|
+
attr_reader :email
|
13
|
+
# @return [String] Label for the email.
|
14
|
+
attr_reader :label
|
15
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
attr_reader :additional_properties
|
17
|
+
# @return [Object]
|
18
|
+
attr_reader :_field_set
|
19
|
+
protected :_field_set
|
20
|
+
|
21
|
+
OMIT = Object.new
|
22
|
+
|
23
|
+
# @param email [String] Email attached to the agent.
|
24
|
+
# @param label [String] Label for the email.
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentEmailsItem]
|
27
|
+
def initialize(email: OMIT, label: OMIT, additional_properties: nil)
|
28
|
+
@email = email if email != OMIT
|
29
|
+
@label = label if label != OMIT
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = { "email": email, "label": label }.reject do |_k, v|
|
32
|
+
v == OMIT
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Deserialize a JSON object to an instance of UpsertRcsSchemaAgentEmailsItem
|
37
|
+
#
|
38
|
+
# @param json_object [String]
|
39
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentEmailsItem]
|
40
|
+
def self.from_json(json_object:)
|
41
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
42
|
+
parsed_json = JSON.parse(json_object)
|
43
|
+
email = parsed_json["email"]
|
44
|
+
label = parsed_json["label"]
|
45
|
+
new(
|
46
|
+
email: email,
|
47
|
+
label: label,
|
48
|
+
additional_properties: struct
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Serialize an instance of UpsertRcsSchemaAgentEmailsItem to a JSON object
|
53
|
+
#
|
54
|
+
# @return [String]
|
55
|
+
def to_json(*_args)
|
56
|
+
@_field_set&.to_json
|
57
|
+
end
|
58
|
+
|
59
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
60
|
+
# hash and check each fields type against the current object's property
|
61
|
+
# definitions.
|
62
|
+
#
|
63
|
+
# @param obj [Object]
|
64
|
+
# @return [Void]
|
65
|
+
def self.validate_raw(obj:)
|
66
|
+
obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
|
67
|
+
obj.label&.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Campaigns
|
8
|
+
module Rcs
|
9
|
+
module Types
|
10
|
+
class UpsertRcsSchemaAgentPhonesItem
|
11
|
+
# @return [String] Label for the phone number.
|
12
|
+
attr_reader :label
|
13
|
+
# @return [String] Phone number attached to the agent in E.164 format.
|
14
|
+
attr_reader :phone
|
15
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
attr_reader :additional_properties
|
17
|
+
# @return [Object]
|
18
|
+
attr_reader :_field_set
|
19
|
+
protected :_field_set
|
20
|
+
|
21
|
+
OMIT = Object.new
|
22
|
+
|
23
|
+
# @param label [String] Label for the phone number.
|
24
|
+
# @param phone [String] Phone number attached to the agent in E.164 format.
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentPhonesItem]
|
27
|
+
def initialize(label: OMIT, phone: OMIT, additional_properties: nil)
|
28
|
+
@label = label if label != OMIT
|
29
|
+
@phone = phone if phone != OMIT
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = { "label": label, "phone": phone }.reject do |_k, v|
|
32
|
+
v == OMIT
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Deserialize a JSON object to an instance of UpsertRcsSchemaAgentPhonesItem
|
37
|
+
#
|
38
|
+
# @param json_object [String]
|
39
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentPhonesItem]
|
40
|
+
def self.from_json(json_object:)
|
41
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
42
|
+
parsed_json = JSON.parse(json_object)
|
43
|
+
label = parsed_json["label"]
|
44
|
+
phone = parsed_json["phone"]
|
45
|
+
new(
|
46
|
+
label: label,
|
47
|
+
phone: phone,
|
48
|
+
additional_properties: struct
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Serialize an instance of UpsertRcsSchemaAgentPhonesItem to a JSON object
|
53
|
+
#
|
54
|
+
# @return [String]
|
55
|
+
def to_json(*_args)
|
56
|
+
@_field_set&.to_json
|
57
|
+
end
|
58
|
+
|
59
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
60
|
+
# hash and check each fields type against the current object's property
|
61
|
+
# definitions.
|
62
|
+
#
|
63
|
+
# @param obj [Object]
|
64
|
+
# @return [Void]
|
65
|
+
def self.validate_raw(obj:)
|
66
|
+
obj.label&.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
|
67
|
+
obj.phone&.is_a?(String) != false || raise("Passed value for field obj.phone is not the expected type, validation failed.")
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Campaigns
|
8
|
+
module Rcs
|
9
|
+
module Types
|
10
|
+
class UpsertRcsSchemaAgentWebsitesItem
|
11
|
+
# @return [String] Label for the url.
|
12
|
+
attr_reader :label
|
13
|
+
# @return [String] Url attached to the agent.
|
14
|
+
attr_reader :url
|
15
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
attr_reader :additional_properties
|
17
|
+
# @return [Object]
|
18
|
+
attr_reader :_field_set
|
19
|
+
protected :_field_set
|
20
|
+
|
21
|
+
OMIT = Object.new
|
22
|
+
|
23
|
+
# @param label [String] Label for the url.
|
24
|
+
# @param url [String] Url attached to the agent.
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentWebsitesItem]
|
27
|
+
def initialize(label: OMIT, url: OMIT, additional_properties: nil)
|
28
|
+
@label = label if label != OMIT
|
29
|
+
@url = url if url != OMIT
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = { "label": label, "url": url }.reject do |_k, v|
|
32
|
+
v == OMIT
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Deserialize a JSON object to an instance of UpsertRcsSchemaAgentWebsitesItem
|
37
|
+
#
|
38
|
+
# @param json_object [String]
|
39
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaAgentWebsitesItem]
|
40
|
+
def self.from_json(json_object:)
|
41
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
42
|
+
parsed_json = JSON.parse(json_object)
|
43
|
+
label = parsed_json["label"]
|
44
|
+
url = parsed_json["url"]
|
45
|
+
new(
|
46
|
+
label: label,
|
47
|
+
url: url,
|
48
|
+
additional_properties: struct
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Serialize an instance of UpsertRcsSchemaAgentWebsitesItem to a JSON object
|
53
|
+
#
|
54
|
+
# @return [String]
|
55
|
+
def to_json(*_args)
|
56
|
+
@_field_set&.to_json
|
57
|
+
end
|
58
|
+
|
59
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
60
|
+
# hash and check each fields type against the current object's property
|
61
|
+
# definitions.
|
62
|
+
#
|
63
|
+
# @param obj [Object]
|
64
|
+
# @return [Void]
|
65
|
+
def self.validate_raw(obj:)
|
66
|
+
obj.label&.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
|
67
|
+
obj.url&.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Campaigns
|
8
|
+
module Rcs
|
9
|
+
module Types
|
10
|
+
# Legal documentation links.
|
11
|
+
class UpsertRcsSchemaLinks
|
12
|
+
# @return [String] Privacy policy URL.
|
13
|
+
attr_reader :privacy_policy
|
14
|
+
# @return [String] Terms of service URL.
|
15
|
+
attr_reader :terms_of_service
|
16
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
attr_reader :additional_properties
|
18
|
+
# @return [Object]
|
19
|
+
attr_reader :_field_set
|
20
|
+
protected :_field_set
|
21
|
+
|
22
|
+
OMIT = Object.new
|
23
|
+
|
24
|
+
# @param privacy_policy [String] Privacy policy URL.
|
25
|
+
# @param terms_of_service [String] Terms of service URL.
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaLinks]
|
28
|
+
def initialize(privacy_policy: OMIT, terms_of_service: OMIT, additional_properties: nil)
|
29
|
+
@privacy_policy = privacy_policy if privacy_policy != OMIT
|
30
|
+
@terms_of_service = terms_of_service if terms_of_service != OMIT
|
31
|
+
@additional_properties = additional_properties
|
32
|
+
@_field_set = { "privacyPolicy": privacy_policy, "termsOfService": terms_of_service }.reject do |_k, v|
|
33
|
+
v == OMIT
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deserialize a JSON object to an instance of UpsertRcsSchemaLinks
|
38
|
+
#
|
39
|
+
# @param json_object [String]
|
40
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaLinks]
|
41
|
+
def self.from_json(json_object:)
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
44
|
+
privacy_policy = parsed_json["privacyPolicy"]
|
45
|
+
terms_of_service = parsed_json["termsOfService"]
|
46
|
+
new(
|
47
|
+
privacy_policy: privacy_policy,
|
48
|
+
terms_of_service: terms_of_service,
|
49
|
+
additional_properties: struct
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serialize an instance of UpsertRcsSchemaLinks to a JSON object
|
54
|
+
#
|
55
|
+
# @return [String]
|
56
|
+
def to_json(*_args)
|
57
|
+
@_field_set&.to_json
|
58
|
+
end
|
59
|
+
|
60
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
61
|
+
# hash and check each fields type against the current object's property
|
62
|
+
# definitions.
|
63
|
+
#
|
64
|
+
# @param obj [Object]
|
65
|
+
# @return [Void]
|
66
|
+
def self.validate_raw(obj:)
|
67
|
+
obj.privacy_policy&.is_a?(String) != false || raise("Passed value for field obj.privacy_policy is not the expected type, validation failed.")
|
68
|
+
obj.terms_of_service&.is_a?(String) != false || raise("Passed value for field obj.terms_of_service is not the expected type, validation failed.")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../types/rcs_campaign_opt_in_method_enum"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Campaigns
|
9
|
+
module Rcs
|
10
|
+
module Types
|
11
|
+
# Opt-in configuration.
|
12
|
+
class UpsertRcsSchemaOptIn
|
13
|
+
# @return [Pinnacle::Types::RcsCampaignOptInMethodEnum]
|
14
|
+
attr_reader :method
|
15
|
+
# @return [String] Message shown to users explaining what they are agreeing to when opting in.
|
16
|
+
attr_reader :terms_and_conditions
|
17
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
|
+
attr_reader :additional_properties
|
19
|
+
# @return [Object]
|
20
|
+
attr_reader :_field_set
|
21
|
+
protected :_field_set
|
22
|
+
|
23
|
+
OMIT = Object.new
|
24
|
+
|
25
|
+
# @param method [Pinnacle::Types::RcsCampaignOptInMethodEnum]
|
26
|
+
# @param terms_and_conditions [String] Message shown to users explaining what they are agreeing to when opting in.
|
27
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaOptIn]
|
29
|
+
def initialize(method: OMIT, terms_and_conditions: OMIT, additional_properties: nil)
|
30
|
+
@method = method if method != OMIT
|
31
|
+
@terms_and_conditions = terms_and_conditions if terms_and_conditions != OMIT
|
32
|
+
@additional_properties = additional_properties
|
33
|
+
@_field_set = { "method": method, "termsAndConditions": terms_and_conditions }.reject do |_k, v|
|
34
|
+
v == OMIT
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# Deserialize a JSON object to an instance of UpsertRcsSchemaOptIn
|
39
|
+
#
|
40
|
+
# @param json_object [String]
|
41
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaOptIn]
|
42
|
+
def self.from_json(json_object:)
|
43
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
44
|
+
parsed_json = JSON.parse(json_object)
|
45
|
+
method = parsed_json["method"]
|
46
|
+
terms_and_conditions = parsed_json["termsAndConditions"]
|
47
|
+
new(
|
48
|
+
method: method,
|
49
|
+
terms_and_conditions: terms_and_conditions,
|
50
|
+
additional_properties: struct
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Serialize an instance of UpsertRcsSchemaOptIn to a JSON object
|
55
|
+
#
|
56
|
+
# @return [String]
|
57
|
+
def to_json(*_args)
|
58
|
+
@_field_set&.to_json
|
59
|
+
end
|
60
|
+
|
61
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
62
|
+
# hash and check each fields type against the current object's property
|
63
|
+
# definitions.
|
64
|
+
#
|
65
|
+
# @param obj [Object]
|
66
|
+
# @return [Void]
|
67
|
+
def self.validate_raw(obj:)
|
68
|
+
obj.method&.is_a?(Pinnacle::Types::RcsCampaignOptInMethodEnum) != false || raise("Passed value for field obj.method is not the expected type, validation failed.")
|
69
|
+
obj.terms_and_conditions&.is_a?(String) != false || raise("Passed value for field obj.terms_and_conditions is not the expected type, validation failed.")
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Campaigns
|
8
|
+
module Rcs
|
9
|
+
module Types
|
10
|
+
# Opt-out configuration.
|
11
|
+
class UpsertRcsSchemaOptOut
|
12
|
+
# @return [String] Description for the keyword.
|
13
|
+
attr_reader :description
|
14
|
+
# @return [Array<String>] Keywords to opt-out. <br>
|
15
|
+
# Each keyword must be a single word with no spaces or whitespace characters.
|
16
|
+
attr_reader :keywords
|
17
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
|
+
attr_reader :additional_properties
|
19
|
+
# @return [Object]
|
20
|
+
attr_reader :_field_set
|
21
|
+
protected :_field_set
|
22
|
+
|
23
|
+
OMIT = Object.new
|
24
|
+
|
25
|
+
# @param description [String] Description for the keyword.
|
26
|
+
# @param keywords [Array<String>] Keywords to opt-out. <br>
|
27
|
+
# Each keyword must be a single word with no spaces or whitespace characters.
|
28
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaOptOut]
|
30
|
+
def initialize(description: OMIT, keywords: OMIT, additional_properties: nil)
|
31
|
+
@description = description if description != OMIT
|
32
|
+
@keywords = keywords if keywords != OMIT
|
33
|
+
@additional_properties = additional_properties
|
34
|
+
@_field_set = { "description": description, "keywords": keywords }.reject do |_k, v|
|
35
|
+
v == OMIT
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Deserialize a JSON object to an instance of UpsertRcsSchemaOptOut
|
40
|
+
#
|
41
|
+
# @param json_object [String]
|
42
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaOptOut]
|
43
|
+
def self.from_json(json_object:)
|
44
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
45
|
+
parsed_json = JSON.parse(json_object)
|
46
|
+
description = parsed_json["description"]
|
47
|
+
keywords = parsed_json["keywords"]
|
48
|
+
new(
|
49
|
+
description: description,
|
50
|
+
keywords: keywords,
|
51
|
+
additional_properties: struct
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Serialize an instance of UpsertRcsSchemaOptOut to a JSON object
|
56
|
+
#
|
57
|
+
# @return [String]
|
58
|
+
def to_json(*_args)
|
59
|
+
@_field_set&.to_json
|
60
|
+
end
|
61
|
+
|
62
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
63
|
+
# hash and check each fields type against the current object's property
|
64
|
+
# definitions.
|
65
|
+
#
|
66
|
+
# @param obj [Object]
|
67
|
+
# @return [Void]
|
68
|
+
def self.validate_raw(obj:)
|
69
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
70
|
+
obj.keywords&.is_a?(Array) != false || raise("Passed value for field obj.keywords is not the expected type, validation failed.")
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../types/rcs_campaign_use_case_enum"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Campaigns
|
9
|
+
module Rcs
|
10
|
+
module Types
|
11
|
+
# Use case classification for the campaign.
|
12
|
+
class UpsertRcsSchemaUseCase
|
13
|
+
# @return [String] Summary of the use case.
|
14
|
+
attr_reader :behavior
|
15
|
+
# @return [Pinnacle::Types::RcsCampaignUseCaseEnum]
|
16
|
+
attr_reader :value
|
17
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
|
+
attr_reader :additional_properties
|
19
|
+
# @return [Object]
|
20
|
+
attr_reader :_field_set
|
21
|
+
protected :_field_set
|
22
|
+
|
23
|
+
OMIT = Object.new
|
24
|
+
|
25
|
+
# @param behavior [String] Summary of the use case.
|
26
|
+
# @param value [Pinnacle::Types::RcsCampaignUseCaseEnum]
|
27
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaUseCase]
|
29
|
+
def initialize(behavior: OMIT, value: OMIT, additional_properties: nil)
|
30
|
+
@behavior = behavior if behavior != OMIT
|
31
|
+
@value = value if value != OMIT
|
32
|
+
@additional_properties = additional_properties
|
33
|
+
@_field_set = { "behavior": behavior, "value": value }.reject do |_k, v|
|
34
|
+
v == OMIT
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# Deserialize a JSON object to an instance of UpsertRcsSchemaUseCase
|
39
|
+
#
|
40
|
+
# @param json_object [String]
|
41
|
+
# @return [Pinnacle::Campaigns::Rcs::Types::UpsertRcsSchemaUseCase]
|
42
|
+
def self.from_json(json_object:)
|
43
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
44
|
+
parsed_json = JSON.parse(json_object)
|
45
|
+
behavior = parsed_json["behavior"]
|
46
|
+
value = parsed_json["value"]
|
47
|
+
new(
|
48
|
+
behavior: behavior,
|
49
|
+
value: value,
|
50
|
+
additional_properties: struct
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Serialize an instance of UpsertRcsSchemaUseCase to a JSON object
|
55
|
+
#
|
56
|
+
# @return [String]
|
57
|
+
def to_json(*_args)
|
58
|
+
@_field_set&.to_json
|
59
|
+
end
|
60
|
+
|
61
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
62
|
+
# hash and check each fields type against the current object's property
|
63
|
+
# definitions.
|
64
|
+
#
|
65
|
+
# @param obj [Object]
|
66
|
+
# @return [Void]
|
67
|
+
def self.validate_raw(obj:)
|
68
|
+
obj.behavior&.is_a?(String) != false || raise("Passed value for field obj.behavior is not the expected type, validation failed.")
|
69
|
+
obj.value&.is_a?(Pinnacle::Types::RcsCampaignUseCaseEnum) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|