rcs 1.0.18 → 2.0.0.pre.rc.1
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 +185 -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 +345 -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,74 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "rcs_button_send_location_lat_long"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Button that shares a specific location with the recipient when tapped.
|
10
|
+
class RcsButtonSendLocation
|
11
|
+
# @return [Pinnacle::Types::RcsButtonSendLocationLatLong] Geographic coordinates of the location to share.
|
12
|
+
attr_reader :lat_long
|
13
|
+
# @return [String] Display text for the button.
|
14
|
+
attr_reader :title
|
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 lat_long [Pinnacle::Types::RcsButtonSendLocationLatLong] Geographic coordinates of the location to share.
|
24
|
+
# @param title [String] Display text for the button.
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [Pinnacle::Types::RcsButtonSendLocation]
|
27
|
+
def initialize(lat_long:, title:, additional_properties: nil)
|
28
|
+
@lat_long = lat_long
|
29
|
+
@title = title
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = { "latLong": lat_long, "title": title }
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deserialize a JSON object to an instance of RcsButtonSendLocation
|
35
|
+
#
|
36
|
+
# @param json_object [String]
|
37
|
+
# @return [Pinnacle::Types::RcsButtonSendLocation]
|
38
|
+
def self.from_json(json_object:)
|
39
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
40
|
+
parsed_json = JSON.parse(json_object)
|
41
|
+
if parsed_json["latLong"].nil?
|
42
|
+
lat_long = nil
|
43
|
+
else
|
44
|
+
lat_long = parsed_json["latLong"].to_json
|
45
|
+
lat_long = Pinnacle::Types::RcsButtonSendLocationLatLong.from_json(json_object: lat_long)
|
46
|
+
end
|
47
|
+
title = parsed_json["title"]
|
48
|
+
new(
|
49
|
+
lat_long: lat_long,
|
50
|
+
title: title,
|
51
|
+
additional_properties: struct
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Serialize an instance of RcsButtonSendLocation 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
|
+
Pinnacle::Types::RcsButtonSendLocationLatLong.validate_raw(obj: obj.lat_long)
|
70
|
+
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Geographic coordinates of the location to share.
|
9
|
+
class RcsButtonSendLocationLatLong
|
10
|
+
# @return [Float] Latitude coordinate in decimal degrees.
|
11
|
+
attr_reader :lat
|
12
|
+
# @return [Float] Longitude coordinate in decimal degrees.
|
13
|
+
attr_reader :lng
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
|
+
attr_reader :additional_properties
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :_field_set
|
18
|
+
protected :_field_set
|
19
|
+
|
20
|
+
OMIT = Object.new
|
21
|
+
|
22
|
+
# @param lat [Float] Latitude coordinate in decimal degrees.
|
23
|
+
# @param lng [Float] Longitude coordinate in decimal degrees.
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [Pinnacle::Types::RcsButtonSendLocationLatLong]
|
26
|
+
def initialize(lat:, lng:, additional_properties: nil)
|
27
|
+
@lat = lat
|
28
|
+
@lng = lng
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "lat": lat, "lng": lng }
|
31
|
+
end
|
32
|
+
|
33
|
+
# Deserialize a JSON object to an instance of RcsButtonSendLocationLatLong
|
34
|
+
#
|
35
|
+
# @param json_object [String]
|
36
|
+
# @return [Pinnacle::Types::RcsButtonSendLocationLatLong]
|
37
|
+
def self.from_json(json_object:)
|
38
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
39
|
+
parsed_json = JSON.parse(json_object)
|
40
|
+
lat = parsed_json["lat"]
|
41
|
+
lng = parsed_json["lng"]
|
42
|
+
new(
|
43
|
+
lat: lat,
|
44
|
+
lng: lng,
|
45
|
+
additional_properties: struct
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Serialize an instance of RcsButtonSendLocationLatLong to a JSON object
|
50
|
+
#
|
51
|
+
# @return [String]
|
52
|
+
def to_json(*_args)
|
53
|
+
@_field_set&.to_json
|
54
|
+
end
|
55
|
+
|
56
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
57
|
+
# hash and check each fields type against the current object's property
|
58
|
+
# definitions.
|
59
|
+
#
|
60
|
+
# @param obj [Object]
|
61
|
+
# @return [Void]
|
62
|
+
def self.validate_raw(obj:)
|
63
|
+
obj.lat.is_a?(Float) != false || raise("Passed value for field obj.lat is not the expected type, validation failed.")
|
64
|
+
obj.lng.is_a?(Float) != false || raise("Passed value for field obj.lng is not the expected type, validation failed.")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Button that sends custom data back to your application when tapped by the
|
9
|
+
# recipient.
|
10
|
+
class RcsButtonTrigger
|
11
|
+
# @return [String] Additional data attached to the button interaction.
|
12
|
+
attr_reader :metadata
|
13
|
+
# @return [String] Custom data sent to your webhook when the button is tapped. Use this to identify
|
14
|
+
# the user's choice.
|
15
|
+
attr_reader :payload
|
16
|
+
# @return [String] Display text for the button.
|
17
|
+
attr_reader :title
|
18
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
19
|
+
attr_reader :additional_properties
|
20
|
+
# @return [Object]
|
21
|
+
attr_reader :_field_set
|
22
|
+
protected :_field_set
|
23
|
+
|
24
|
+
OMIT = Object.new
|
25
|
+
|
26
|
+
# @param metadata [String] Additional data attached to the button interaction.
|
27
|
+
# @param payload [String] Custom data sent to your webhook when the button is tapped. Use this to identify
|
28
|
+
# the user's choice.
|
29
|
+
# @param title [String] Display text for the button.
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
+
# @return [Pinnacle::Types::RcsButtonTrigger]
|
32
|
+
def initialize(metadata:, payload:, title:, additional_properties: nil)
|
33
|
+
@metadata = metadata
|
34
|
+
@payload = payload
|
35
|
+
@title = title
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = { "metadata": metadata, "payload": payload, "title": title }
|
38
|
+
end
|
39
|
+
|
40
|
+
# Deserialize a JSON object to an instance of RcsButtonTrigger
|
41
|
+
#
|
42
|
+
# @param json_object [String]
|
43
|
+
# @return [Pinnacle::Types::RcsButtonTrigger]
|
44
|
+
def self.from_json(json_object:)
|
45
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
46
|
+
parsed_json = JSON.parse(json_object)
|
47
|
+
metadata = parsed_json["metadata"]
|
48
|
+
payload = parsed_json["payload"]
|
49
|
+
title = parsed_json["title"]
|
50
|
+
new(
|
51
|
+
metadata: metadata,
|
52
|
+
payload: payload,
|
53
|
+
title: title,
|
54
|
+
additional_properties: struct
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Serialize an instance of RcsButtonTrigger to a JSON object
|
59
|
+
#
|
60
|
+
# @return [String]
|
61
|
+
def to_json(*_args)
|
62
|
+
@_field_set&.to_json
|
63
|
+
end
|
64
|
+
|
65
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
66
|
+
# hash and check each fields type against the current object's property
|
67
|
+
# definitions.
|
68
|
+
#
|
69
|
+
# @param obj [Object]
|
70
|
+
# @return [Void]
|
71
|
+
def self.validate_raw(obj:)
|
72
|
+
obj.metadata.is_a?(String) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
73
|
+
obj.payload.is_a?(String) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
|
74
|
+
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,143 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "rcs_campaign_schema_agent"
|
4
|
+
require_relative "rcs_campaign_schema_links"
|
5
|
+
require_relative "rcs_campaign_schema_opt_in"
|
6
|
+
require_relative "rcs_campaign_schema_opt_out"
|
7
|
+
require_relative "rcs_campaign_schema_use_case"
|
8
|
+
require "ostruct"
|
9
|
+
require "json"
|
10
|
+
|
11
|
+
module Pinnacle
|
12
|
+
module Types
|
13
|
+
class RcsCampaign
|
14
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaAgent] Agent configured to the campaign.
|
15
|
+
attr_reader :agent
|
16
|
+
# @return [Integer] Unique identifier for the campaign.
|
17
|
+
attr_reader :campaign_id
|
18
|
+
# @return [Array<String>] List of what the agent might say to users.
|
19
|
+
attr_reader :expected_agent_responses
|
20
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaLinks] Legal documentation links.
|
21
|
+
attr_reader :links
|
22
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaOptIn] Opt-in configuration.
|
23
|
+
attr_reader :opt_in
|
24
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaOptOut] Opt-out configuration.
|
25
|
+
attr_reader :opt_out
|
26
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaUseCase] Use case classification for the campaign.
|
27
|
+
attr_reader :use_case
|
28
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
attr_reader :additional_properties
|
30
|
+
# @return [Object]
|
31
|
+
attr_reader :_field_set
|
32
|
+
protected :_field_set
|
33
|
+
|
34
|
+
OMIT = Object.new
|
35
|
+
|
36
|
+
# @param agent [Pinnacle::Types::RcsCampaignSchemaAgent] Agent configured to the campaign.
|
37
|
+
# @param campaign_id [Integer] Unique identifier for the campaign.
|
38
|
+
# @param expected_agent_responses [Array<String>] List of what the agent might say to users.
|
39
|
+
# @param links [Pinnacle::Types::RcsCampaignSchemaLinks] Legal documentation links.
|
40
|
+
# @param opt_in [Pinnacle::Types::RcsCampaignSchemaOptIn] Opt-in configuration.
|
41
|
+
# @param opt_out [Pinnacle::Types::RcsCampaignSchemaOptOut] Opt-out configuration.
|
42
|
+
# @param use_case [Pinnacle::Types::RcsCampaignSchemaUseCase] Use case classification for the campaign.
|
43
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
44
|
+
# @return [Pinnacle::Types::RcsCampaign]
|
45
|
+
def initialize(agent: OMIT, campaign_id: OMIT, expected_agent_responses: OMIT, links: OMIT, opt_in: OMIT,
|
46
|
+
opt_out: OMIT, use_case: OMIT, additional_properties: nil)
|
47
|
+
@agent = agent if agent != OMIT
|
48
|
+
@campaign_id = campaign_id if campaign_id != OMIT
|
49
|
+
@expected_agent_responses = expected_agent_responses if expected_agent_responses != OMIT
|
50
|
+
@links = links if links != OMIT
|
51
|
+
@opt_in = opt_in if opt_in != OMIT
|
52
|
+
@opt_out = opt_out if opt_out != OMIT
|
53
|
+
@use_case = use_case if use_case != OMIT
|
54
|
+
@additional_properties = additional_properties
|
55
|
+
@_field_set = {
|
56
|
+
"agent": agent,
|
57
|
+
"campaignId": campaign_id,
|
58
|
+
"expectedAgentResponses": expected_agent_responses,
|
59
|
+
"links": links,
|
60
|
+
"optIn": opt_in,
|
61
|
+
"optOut": opt_out,
|
62
|
+
"useCase": use_case
|
63
|
+
}.reject do |_k, v|
|
64
|
+
v == OMIT
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Deserialize a JSON object to an instance of RcsCampaign
|
69
|
+
#
|
70
|
+
# @param json_object [String]
|
71
|
+
# @return [Pinnacle::Types::RcsCampaign]
|
72
|
+
def self.from_json(json_object:)
|
73
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
74
|
+
parsed_json = JSON.parse(json_object)
|
75
|
+
if parsed_json["agent"].nil?
|
76
|
+
agent = nil
|
77
|
+
else
|
78
|
+
agent = parsed_json["agent"].to_json
|
79
|
+
agent = Pinnacle::Types::RcsCampaignSchemaAgent.from_json(json_object: agent)
|
80
|
+
end
|
81
|
+
campaign_id = parsed_json["campaignId"]
|
82
|
+
expected_agent_responses = parsed_json["expectedAgentResponses"]
|
83
|
+
if parsed_json["links"].nil?
|
84
|
+
links = nil
|
85
|
+
else
|
86
|
+
links = parsed_json["links"].to_json
|
87
|
+
links = Pinnacle::Types::RcsCampaignSchemaLinks.from_json(json_object: links)
|
88
|
+
end
|
89
|
+
if parsed_json["optIn"].nil?
|
90
|
+
opt_in = nil
|
91
|
+
else
|
92
|
+
opt_in = parsed_json["optIn"].to_json
|
93
|
+
opt_in = Pinnacle::Types::RcsCampaignSchemaOptIn.from_json(json_object: opt_in)
|
94
|
+
end
|
95
|
+
if parsed_json["optOut"].nil?
|
96
|
+
opt_out = nil
|
97
|
+
else
|
98
|
+
opt_out = parsed_json["optOut"].to_json
|
99
|
+
opt_out = Pinnacle::Types::RcsCampaignSchemaOptOut.from_json(json_object: opt_out)
|
100
|
+
end
|
101
|
+
if parsed_json["useCase"].nil?
|
102
|
+
use_case = nil
|
103
|
+
else
|
104
|
+
use_case = parsed_json["useCase"].to_json
|
105
|
+
use_case = Pinnacle::Types::RcsCampaignSchemaUseCase.from_json(json_object: use_case)
|
106
|
+
end
|
107
|
+
new(
|
108
|
+
agent: agent,
|
109
|
+
campaign_id: campaign_id,
|
110
|
+
expected_agent_responses: expected_agent_responses,
|
111
|
+
links: links,
|
112
|
+
opt_in: opt_in,
|
113
|
+
opt_out: opt_out,
|
114
|
+
use_case: use_case,
|
115
|
+
additional_properties: struct
|
116
|
+
)
|
117
|
+
end
|
118
|
+
|
119
|
+
# Serialize an instance of RcsCampaign to a JSON object
|
120
|
+
#
|
121
|
+
# @return [String]
|
122
|
+
def to_json(*_args)
|
123
|
+
@_field_set&.to_json
|
124
|
+
end
|
125
|
+
|
126
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
127
|
+
# hash and check each fields type against the current object's property
|
128
|
+
# definitions.
|
129
|
+
#
|
130
|
+
# @param obj [Object]
|
131
|
+
# @return [Void]
|
132
|
+
def self.validate_raw(obj:)
|
133
|
+
obj.agent.nil? || Pinnacle::Types::RcsCampaignSchemaAgent.validate_raw(obj: obj.agent)
|
134
|
+
obj.campaign_id&.is_a?(Integer) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
135
|
+
obj.expected_agent_responses&.is_a?(Array) != false || raise("Passed value for field obj.expected_agent_responses is not the expected type, validation failed.")
|
136
|
+
obj.links.nil? || Pinnacle::Types::RcsCampaignSchemaLinks.validate_raw(obj: obj.links)
|
137
|
+
obj.opt_in.nil? || Pinnacle::Types::RcsCampaignSchemaOptIn.validate_raw(obj: obj.opt_in)
|
138
|
+
obj.opt_out.nil? || Pinnacle::Types::RcsCampaignSchemaOptOut.validate_raw(obj: obj.opt_out)
|
139
|
+
obj.use_case.nil? || Pinnacle::Types::RcsCampaignSchemaUseCase.validate_raw(obj: obj.use_case)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Pinnacle
|
4
|
+
module Types
|
5
|
+
# Opt in options.
|
6
|
+
class RcsCampaignOptInMethodEnum
|
7
|
+
WEBSITE = "WEBSITE"
|
8
|
+
SMS = "SMS"
|
9
|
+
APP = "APP"
|
10
|
+
VERBAL = "VERBAL"
|
11
|
+
WRITTEN = "WRITTEN"
|
12
|
+
OTHER = "OTHER"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,134 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "rcs_campaign_schema_agent_emails_item"
|
4
|
+
require_relative "rcs_campaign_schema_agent_phones_item"
|
5
|
+
require_relative "rcs_campaign_schema_agent_websites_item"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module Pinnacle
|
10
|
+
module Types
|
11
|
+
# Agent configured to the campaign.
|
12
|
+
class RcsCampaignSchemaAgent
|
13
|
+
# @return [String] Name of the agent.
|
14
|
+
attr_reader :name
|
15
|
+
# @return [String] Description of the agent.
|
16
|
+
attr_reader :description
|
17
|
+
# @return [String] Color of the agent's buttons.
|
18
|
+
attr_reader :color
|
19
|
+
# @return [Array<Pinnacle::Types::RcsCampaignSchemaAgentEmailsItem>] List of emails.
|
20
|
+
attr_reader :emails
|
21
|
+
# @return [Array<Pinnacle::Types::RcsCampaignSchemaAgentPhonesItem>] List of phone numbers.
|
22
|
+
attr_reader :phones
|
23
|
+
# @return [Array<Pinnacle::Types::RcsCampaignSchemaAgentWebsitesItem>] List of urls.
|
24
|
+
attr_reader :websites
|
25
|
+
# @return [String] Link to the agent's hero.
|
26
|
+
attr_reader :hero_url
|
27
|
+
# @return [String] Link to the agent's icon.
|
28
|
+
attr_reader :icon_url
|
29
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
attr_reader :additional_properties
|
31
|
+
# @return [Object]
|
32
|
+
attr_reader :_field_set
|
33
|
+
protected :_field_set
|
34
|
+
|
35
|
+
OMIT = Object.new
|
36
|
+
|
37
|
+
# @param name [String] Name of the agent.
|
38
|
+
# @param description [String] Description of the agent.
|
39
|
+
# @param color [String] Color of the agent's buttons.
|
40
|
+
# @param emails [Array<Pinnacle::Types::RcsCampaignSchemaAgentEmailsItem>] List of emails.
|
41
|
+
# @param phones [Array<Pinnacle::Types::RcsCampaignSchemaAgentPhonesItem>] List of phone numbers.
|
42
|
+
# @param websites [Array<Pinnacle::Types::RcsCampaignSchemaAgentWebsitesItem>] List of urls.
|
43
|
+
# @param hero_url [String] Link to the agent's hero.
|
44
|
+
# @param icon_url [String] Link to the agent's icon.
|
45
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
46
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaAgent]
|
47
|
+
def initialize(name: OMIT, description: OMIT, color: OMIT, emails: OMIT, phones: OMIT, websites: OMIT,
|
48
|
+
hero_url: OMIT, icon_url: OMIT, additional_properties: nil)
|
49
|
+
@name = name if name != OMIT
|
50
|
+
@description = description if description != OMIT
|
51
|
+
@color = color if color != OMIT
|
52
|
+
@emails = emails if emails != OMIT
|
53
|
+
@phones = phones if phones != OMIT
|
54
|
+
@websites = websites if websites != OMIT
|
55
|
+
@hero_url = hero_url if hero_url != OMIT
|
56
|
+
@icon_url = icon_url if icon_url != OMIT
|
57
|
+
@additional_properties = additional_properties
|
58
|
+
@_field_set = {
|
59
|
+
"name": name,
|
60
|
+
"description": description,
|
61
|
+
"color": color,
|
62
|
+
"emails": emails,
|
63
|
+
"phones": phones,
|
64
|
+
"websites": websites,
|
65
|
+
"heroUrl": hero_url,
|
66
|
+
"iconUrl": icon_url
|
67
|
+
}.reject do |_k, v|
|
68
|
+
v == OMIT
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# Deserialize a JSON object to an instance of RcsCampaignSchemaAgent
|
73
|
+
#
|
74
|
+
# @param json_object [String]
|
75
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaAgent]
|
76
|
+
def self.from_json(json_object:)
|
77
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
78
|
+
parsed_json = JSON.parse(json_object)
|
79
|
+
name = parsed_json["name"]
|
80
|
+
description = parsed_json["description"]
|
81
|
+
color = parsed_json["color"]
|
82
|
+
emails = parsed_json["emails"]&.map do |item|
|
83
|
+
item = item.to_json
|
84
|
+
Pinnacle::Types::RcsCampaignSchemaAgentEmailsItem.from_json(json_object: item)
|
85
|
+
end
|
86
|
+
phones = parsed_json["phones"]&.map do |item|
|
87
|
+
item = item.to_json
|
88
|
+
Pinnacle::Types::RcsCampaignSchemaAgentPhonesItem.from_json(json_object: item)
|
89
|
+
end
|
90
|
+
websites = parsed_json["websites"]&.map do |item|
|
91
|
+
item = item.to_json
|
92
|
+
Pinnacle::Types::RcsCampaignSchemaAgentWebsitesItem.from_json(json_object: item)
|
93
|
+
end
|
94
|
+
hero_url = parsed_json["heroUrl"]
|
95
|
+
icon_url = parsed_json["iconUrl"]
|
96
|
+
new(
|
97
|
+
name: name,
|
98
|
+
description: description,
|
99
|
+
color: color,
|
100
|
+
emails: emails,
|
101
|
+
phones: phones,
|
102
|
+
websites: websites,
|
103
|
+
hero_url: hero_url,
|
104
|
+
icon_url: icon_url,
|
105
|
+
additional_properties: struct
|
106
|
+
)
|
107
|
+
end
|
108
|
+
|
109
|
+
# Serialize an instance of RcsCampaignSchemaAgent to a JSON object
|
110
|
+
#
|
111
|
+
# @return [String]
|
112
|
+
def to_json(*_args)
|
113
|
+
@_field_set&.to_json
|
114
|
+
end
|
115
|
+
|
116
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
117
|
+
# hash and check each fields type against the current object's property
|
118
|
+
# definitions.
|
119
|
+
#
|
120
|
+
# @param obj [Object]
|
121
|
+
# @return [Void]
|
122
|
+
def self.validate_raw(obj:)
|
123
|
+
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
124
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
125
|
+
obj.color&.is_a?(String) != false || raise("Passed value for field obj.color is not the expected type, validation failed.")
|
126
|
+
obj.emails&.is_a?(Array) != false || raise("Passed value for field obj.emails is not the expected type, validation failed.")
|
127
|
+
obj.phones&.is_a?(Array) != false || raise("Passed value for field obj.phones is not the expected type, validation failed.")
|
128
|
+
obj.websites&.is_a?(Array) != false || raise("Passed value for field obj.websites is not the expected type, validation failed.")
|
129
|
+
obj.hero_url&.is_a?(String) != false || raise("Passed value for field obj.hero_url is not the expected type, validation failed.")
|
130
|
+
obj.icon_url&.is_a?(String) != false || raise("Passed value for field obj.icon_url is not the expected type, validation failed.")
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class RcsCampaignSchemaAgentEmailsItem
|
9
|
+
# @return [String] Email attached to the agent.
|
10
|
+
attr_reader :email
|
11
|
+
# @return [String] Label for the email.
|
12
|
+
attr_reader :label
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param email [String] Email attached to the agent.
|
22
|
+
# @param label [String] Label for the email.
|
23
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaAgentEmailsItem]
|
25
|
+
def initialize(email: OMIT, label: OMIT, additional_properties: nil)
|
26
|
+
@email = email if email != OMIT
|
27
|
+
@label = label if label != OMIT
|
28
|
+
@additional_properties = additional_properties
|
29
|
+
@_field_set = { "email": email, "label": label }.reject do |_k, v|
|
30
|
+
v == OMIT
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deserialize a JSON object to an instance of RcsCampaignSchemaAgentEmailsItem
|
35
|
+
#
|
36
|
+
# @param json_object [String]
|
37
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaAgentEmailsItem]
|
38
|
+
def self.from_json(json_object:)
|
39
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
40
|
+
parsed_json = JSON.parse(json_object)
|
41
|
+
email = parsed_json["email"]
|
42
|
+
label = parsed_json["label"]
|
43
|
+
new(
|
44
|
+
email: email,
|
45
|
+
label: label,
|
46
|
+
additional_properties: struct
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Serialize an instance of RcsCampaignSchemaAgentEmailsItem to a JSON object
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
def to_json(*_args)
|
54
|
+
@_field_set&.to_json
|
55
|
+
end
|
56
|
+
|
57
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
58
|
+
# hash and check each fields type against the current object's property
|
59
|
+
# definitions.
|
60
|
+
#
|
61
|
+
# @param obj [Object]
|
62
|
+
# @return [Void]
|
63
|
+
def self.validate_raw(obj:)
|
64
|
+
obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
|
65
|
+
obj.label&.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class RcsCampaignSchemaAgentPhonesItem
|
9
|
+
# @return [String] Phone number attached to the agent in E.164 format.
|
10
|
+
attr_reader :phone
|
11
|
+
# @return [String] Label for the phone number.
|
12
|
+
attr_reader :label
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param phone [String] Phone number attached to the agent in E.164 format.
|
22
|
+
# @param label [String] Label for the phone number.
|
23
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaAgentPhonesItem]
|
25
|
+
def initialize(phone: OMIT, label: OMIT, additional_properties: nil)
|
26
|
+
@phone = phone if phone != OMIT
|
27
|
+
@label = label if label != OMIT
|
28
|
+
@additional_properties = additional_properties
|
29
|
+
@_field_set = { "phone": phone, "label": label }.reject do |_k, v|
|
30
|
+
v == OMIT
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deserialize a JSON object to an instance of RcsCampaignSchemaAgentPhonesItem
|
35
|
+
#
|
36
|
+
# @param json_object [String]
|
37
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaAgentPhonesItem]
|
38
|
+
def self.from_json(json_object:)
|
39
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
40
|
+
parsed_json = JSON.parse(json_object)
|
41
|
+
phone = parsed_json["phone"]
|
42
|
+
label = parsed_json["label"]
|
43
|
+
new(
|
44
|
+
phone: phone,
|
45
|
+
label: label,
|
46
|
+
additional_properties: struct
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Serialize an instance of RcsCampaignSchemaAgentPhonesItem to a JSON object
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
def to_json(*_args)
|
54
|
+
@_field_set&.to_json
|
55
|
+
end
|
56
|
+
|
57
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
58
|
+
# hash and check each fields type against the current object's property
|
59
|
+
# definitions.
|
60
|
+
#
|
61
|
+
# @param obj [Object]
|
62
|
+
# @return [Void]
|
63
|
+
def self.validate_raw(obj:)
|
64
|
+
obj.phone&.is_a?(String) != false || raise("Passed value for field obj.phone is not the expected type, validation failed.")
|
65
|
+
obj.label&.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|