rcs 1.0.17 → 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,82 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "rcs_base_options"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
class RcsBase
|
10
|
+
# @return [String] Your RCS agent ID which must be prefixed with 'agent_'.
|
11
|
+
attr_reader :from
|
12
|
+
# @return [Pinnacle::Types::RcsBaseOptions] Configure how your RCS message is sent and tracked.
|
13
|
+
attr_reader :options
|
14
|
+
# @return [String] Recipient's phone number in E.164 format.
|
15
|
+
attr_reader :to
|
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 from [String] Your RCS agent ID which must be prefixed with 'agent_'.
|
25
|
+
# @param options [Pinnacle::Types::RcsBaseOptions] Configure how your RCS message is sent and tracked.
|
26
|
+
# @param to [String] Recipient's phone number in E.164 format.
|
27
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
+
# @return [Pinnacle::Types::RcsBase]
|
29
|
+
def initialize(from:, to:, options: OMIT, additional_properties: nil)
|
30
|
+
@from = from
|
31
|
+
@options = options if options != OMIT
|
32
|
+
@to = to
|
33
|
+
@additional_properties = additional_properties
|
34
|
+
@_field_set = { "from": from, "options": options, "to": to }.reject do |_k, v|
|
35
|
+
v == OMIT
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Deserialize a JSON object to an instance of RcsBase
|
40
|
+
#
|
41
|
+
# @param json_object [String]
|
42
|
+
# @return [Pinnacle::Types::RcsBase]
|
43
|
+
def self.from_json(json_object:)
|
44
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
45
|
+
parsed_json = JSON.parse(json_object)
|
46
|
+
from = parsed_json["from"]
|
47
|
+
if parsed_json["options"].nil?
|
48
|
+
options = nil
|
49
|
+
else
|
50
|
+
options = parsed_json["options"].to_json
|
51
|
+
options = Pinnacle::Types::RcsBaseOptions.from_json(json_object: options)
|
52
|
+
end
|
53
|
+
to = parsed_json["to"]
|
54
|
+
new(
|
55
|
+
from: from,
|
56
|
+
options: options,
|
57
|
+
to: to,
|
58
|
+
additional_properties: struct
|
59
|
+
)
|
60
|
+
end
|
61
|
+
|
62
|
+
# Serialize an instance of RcsBase to a JSON object
|
63
|
+
#
|
64
|
+
# @return [String]
|
65
|
+
def to_json(*_args)
|
66
|
+
@_field_set&.to_json
|
67
|
+
end
|
68
|
+
|
69
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
70
|
+
# hash and check each fields type against the current object's property
|
71
|
+
# definitions.
|
72
|
+
#
|
73
|
+
# @param obj [Object]
|
74
|
+
# @return [Void]
|
75
|
+
def self.validate_raw(obj:)
|
76
|
+
obj.from.is_a?(String) != false || raise("Passed value for field obj.from is not the expected type, validation failed.")
|
77
|
+
obj.options.nil? || Pinnacle::Types::RcsBaseOptions.validate_raw(obj: obj.options)
|
78
|
+
obj.to.is_a?(String) != false || raise("Passed value for field obj.to is not the expected type, validation failed.")
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "message_schedule"
|
4
|
+
require_relative "tracking"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module Pinnacle
|
9
|
+
module Types
|
10
|
+
# Configure how your RCS message is sent and tracked.
|
11
|
+
class RcsBaseOptions
|
12
|
+
# @return [Pinnacle::Types::MessageSchedule]
|
13
|
+
attr_reader :schedule
|
14
|
+
# @return [Boolean] Send via the test agent to whitelisted test devices. Useful for development and
|
15
|
+
# debugging.
|
16
|
+
attr_reader :test_mode
|
17
|
+
# @return [Pinnacle::Types::Tracking]
|
18
|
+
attr_reader :tracking
|
19
|
+
# @return [Boolean] Validate your message for any unsupported files. <br>
|
20
|
+
# If failed, errors will be thrown and the message will not send.
|
21
|
+
attr_reader :validate
|
22
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
attr_reader :additional_properties
|
24
|
+
# @return [Object]
|
25
|
+
attr_reader :_field_set
|
26
|
+
protected :_field_set
|
27
|
+
|
28
|
+
OMIT = Object.new
|
29
|
+
|
30
|
+
# @param schedule [Pinnacle::Types::MessageSchedule]
|
31
|
+
# @param test_mode [Boolean] Send via the test agent to whitelisted test devices. Useful for development and
|
32
|
+
# debugging.
|
33
|
+
# @param tracking [Pinnacle::Types::Tracking]
|
34
|
+
# @param validate [Boolean] Validate your message for any unsupported files. <br>
|
35
|
+
# If failed, errors will be thrown and the message will not send.
|
36
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
37
|
+
# @return [Pinnacle::Types::RcsBaseOptions]
|
38
|
+
def initialize(schedule: OMIT, test_mode: OMIT, tracking: OMIT, validate: OMIT, additional_properties: nil)
|
39
|
+
@schedule = schedule if schedule != OMIT
|
40
|
+
@test_mode = test_mode if test_mode != OMIT
|
41
|
+
@tracking = tracking if tracking != OMIT
|
42
|
+
@validate = validate if validate != OMIT
|
43
|
+
@additional_properties = additional_properties
|
44
|
+
@_field_set = {
|
45
|
+
"schedule": schedule,
|
46
|
+
"test_mode": test_mode,
|
47
|
+
"tracking": tracking,
|
48
|
+
"validate": validate
|
49
|
+
}.reject do |_k, v|
|
50
|
+
v == OMIT
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Deserialize a JSON object to an instance of RcsBaseOptions
|
55
|
+
#
|
56
|
+
# @param json_object [String]
|
57
|
+
# @return [Pinnacle::Types::RcsBaseOptions]
|
58
|
+
def self.from_json(json_object:)
|
59
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
60
|
+
parsed_json = JSON.parse(json_object)
|
61
|
+
if parsed_json["schedule"].nil?
|
62
|
+
schedule = nil
|
63
|
+
else
|
64
|
+
schedule = parsed_json["schedule"].to_json
|
65
|
+
schedule = Pinnacle::Types::MessageSchedule.from_json(json_object: schedule)
|
66
|
+
end
|
67
|
+
test_mode = parsed_json["test_mode"]
|
68
|
+
tracking = parsed_json["tracking"]
|
69
|
+
validate = parsed_json["validate"]
|
70
|
+
new(
|
71
|
+
schedule: schedule,
|
72
|
+
test_mode: test_mode,
|
73
|
+
tracking: tracking,
|
74
|
+
validate: validate,
|
75
|
+
additional_properties: struct
|
76
|
+
)
|
77
|
+
end
|
78
|
+
|
79
|
+
# Serialize an instance of RcsBaseOptions to a JSON object
|
80
|
+
#
|
81
|
+
# @return [String]
|
82
|
+
def to_json(*_args)
|
83
|
+
@_field_set&.to_json
|
84
|
+
end
|
85
|
+
|
86
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
87
|
+
# hash and check each fields type against the current object's property
|
88
|
+
# definitions.
|
89
|
+
#
|
90
|
+
# @param obj [Object]
|
91
|
+
# @return [Void]
|
92
|
+
def self.validate_raw(obj:)
|
93
|
+
obj.schedule.nil? || Pinnacle::Types::MessageSchedule.validate_raw(obj: obj.schedule)
|
94
|
+
obj.test_mode&.is_a?(Boolean) != false || raise("Passed value for field obj.test_mode is not the expected type, validation failed.")
|
95
|
+
obj.tracking&.is_a?(Pinnacle::Types::Tracking) != false || raise("Passed value for field obj.tracking is not the expected type, validation failed.")
|
96
|
+
obj.validate&.is_a?(Boolean) != false || raise("Passed value for field obj.validate is not the expected type, validation failed.")
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
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
|
+
# Button that initiates a phone call when tapped by the recipient.
|
9
|
+
class RcsButtonCall
|
10
|
+
# @return [String] Phone number to call in E.164 format
|
11
|
+
attr_reader :payload
|
12
|
+
# @return [String] Display text for the button.
|
13
|
+
attr_reader :title
|
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 payload [String] Phone number to call in E.164 format
|
23
|
+
# @param title [String] Display text for the button.
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [Pinnacle::Types::RcsButtonCall]
|
26
|
+
def initialize(payload:, title:, additional_properties: nil)
|
27
|
+
@payload = payload
|
28
|
+
@title = title
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "payload": payload, "title": title }
|
31
|
+
end
|
32
|
+
|
33
|
+
# Deserialize a JSON object to an instance of RcsButtonCall
|
34
|
+
#
|
35
|
+
# @param json_object [String]
|
36
|
+
# @return [Pinnacle::Types::RcsButtonCall]
|
37
|
+
def self.from_json(json_object:)
|
38
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
39
|
+
parsed_json = JSON.parse(json_object)
|
40
|
+
payload = parsed_json["payload"]
|
41
|
+
title = parsed_json["title"]
|
42
|
+
new(
|
43
|
+
payload: payload,
|
44
|
+
title: title,
|
45
|
+
additional_properties: struct
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Serialize an instance of RcsButtonCall 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.payload.is_a?(String) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
|
64
|
+
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,148 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
require_relative "rcs_button_open_url"
|
5
|
+
require_relative "rcs_button_call"
|
6
|
+
require_relative "rcs_button_trigger"
|
7
|
+
require_relative "rcs_button_request_user_location"
|
8
|
+
require_relative "rcs_button_schedule_event"
|
9
|
+
require_relative "rcs_button_send_location"
|
10
|
+
|
11
|
+
module Pinnacle
|
12
|
+
module Types
|
13
|
+
class RcsButtonContent
|
14
|
+
# @return [Object]
|
15
|
+
attr_reader :member
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :discriminant
|
18
|
+
|
19
|
+
private_class_method :new
|
20
|
+
alias kind_of? is_a?
|
21
|
+
|
22
|
+
# @param member [Object]
|
23
|
+
# @param discriminant [String]
|
24
|
+
# @return [Pinnacle::Types::RcsButtonContent]
|
25
|
+
def initialize(member:, discriminant:)
|
26
|
+
@member = member
|
27
|
+
@discriminant = discriminant
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of RcsButtonContent
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [Pinnacle::Types::RcsButtonContent]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
member = case struct.type
|
37
|
+
when "openUrl"
|
38
|
+
Pinnacle::Types::RcsButtonOpenUrl.from_json(json_object: json_object)
|
39
|
+
when "call"
|
40
|
+
Pinnacle::Types::RcsButtonCall.from_json(json_object: json_object)
|
41
|
+
when "trigger"
|
42
|
+
Pinnacle::Types::RcsButtonTrigger.from_json(json_object: json_object)
|
43
|
+
when "requestUserLocation"
|
44
|
+
Pinnacle::Types::RcsButtonRequestUserLocation.from_json(json_object: json_object)
|
45
|
+
when "scheduleEvent"
|
46
|
+
Pinnacle::Types::RcsButtonScheduleEvent.from_json(json_object: json_object)
|
47
|
+
when "sendLocation"
|
48
|
+
Pinnacle::Types::RcsButtonSendLocation.from_json(json_object: json_object)
|
49
|
+
else
|
50
|
+
Pinnacle::Types::RcsButtonOpenUrl.from_json(json_object: json_object)
|
51
|
+
end
|
52
|
+
new(member: member, discriminant: struct.type)
|
53
|
+
end
|
54
|
+
|
55
|
+
# For Union Types, to_json functionality is delegated to the wrapped member.
|
56
|
+
#
|
57
|
+
# @return [String]
|
58
|
+
def to_json(*_args)
|
59
|
+
case @discriminant
|
60
|
+
when "openUrl"
|
61
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
62
|
+
when "call"
|
63
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
64
|
+
when "trigger"
|
65
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
66
|
+
when "requestUserLocation"
|
67
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
68
|
+
when "scheduleEvent"
|
69
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
70
|
+
when "sendLocation"
|
71
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
72
|
+
else
|
73
|
+
{ "type": @discriminant, value: @member }.to_json
|
74
|
+
end
|
75
|
+
@member.to_json
|
76
|
+
end
|
77
|
+
|
78
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
79
|
+
# hash and check each fields type against the current object's property
|
80
|
+
# definitions.
|
81
|
+
#
|
82
|
+
# @param obj [Object]
|
83
|
+
# @return [Void]
|
84
|
+
def self.validate_raw(obj:)
|
85
|
+
case obj.type
|
86
|
+
when "openUrl"
|
87
|
+
Pinnacle::Types::RcsButtonOpenUrl.validate_raw(obj: obj)
|
88
|
+
when "call"
|
89
|
+
Pinnacle::Types::RcsButtonCall.validate_raw(obj: obj)
|
90
|
+
when "trigger"
|
91
|
+
Pinnacle::Types::RcsButtonTrigger.validate_raw(obj: obj)
|
92
|
+
when "requestUserLocation"
|
93
|
+
Pinnacle::Types::RcsButtonRequestUserLocation.validate_raw(obj: obj)
|
94
|
+
when "scheduleEvent"
|
95
|
+
Pinnacle::Types::RcsButtonScheduleEvent.validate_raw(obj: obj)
|
96
|
+
when "sendLocation"
|
97
|
+
Pinnacle::Types::RcsButtonSendLocation.validate_raw(obj: obj)
|
98
|
+
else
|
99
|
+
raise("Passed value matched no type within the union, validation failed.")
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
# For Union Types, is_a? functionality is delegated to the wrapped member.
|
104
|
+
#
|
105
|
+
# @param obj [Object]
|
106
|
+
# @return [Boolean]
|
107
|
+
def is_a?(obj)
|
108
|
+
@member.is_a?(obj)
|
109
|
+
end
|
110
|
+
|
111
|
+
# @param member [Pinnacle::Types::RcsButtonOpenUrl]
|
112
|
+
# @return [Pinnacle::Types::RcsButtonContent]
|
113
|
+
def self.open_url(member:)
|
114
|
+
new(member: member, discriminant: "openUrl")
|
115
|
+
end
|
116
|
+
|
117
|
+
# @param member [Pinnacle::Types::RcsButtonCall]
|
118
|
+
# @return [Pinnacle::Types::RcsButtonContent]
|
119
|
+
def self.call(member:)
|
120
|
+
new(member: member, discriminant: "call")
|
121
|
+
end
|
122
|
+
|
123
|
+
# @param member [Pinnacle::Types::RcsButtonTrigger]
|
124
|
+
# @return [Pinnacle::Types::RcsButtonContent]
|
125
|
+
def self.trigger(member:)
|
126
|
+
new(member: member, discriminant: "trigger")
|
127
|
+
end
|
128
|
+
|
129
|
+
# @param member [Pinnacle::Types::RcsButtonRequestUserLocation]
|
130
|
+
# @return [Pinnacle::Types::RcsButtonContent]
|
131
|
+
def self.request_user_location(member:)
|
132
|
+
new(member: member, discriminant: "requestUserLocation")
|
133
|
+
end
|
134
|
+
|
135
|
+
# @param member [Pinnacle::Types::RcsButtonScheduleEvent]
|
136
|
+
# @return [Pinnacle::Types::RcsButtonContent]
|
137
|
+
def self.schedule_event(member:)
|
138
|
+
new(member: member, discriminant: "scheduleEvent")
|
139
|
+
end
|
140
|
+
|
141
|
+
# @param member [Pinnacle::Types::RcsButtonSendLocation]
|
142
|
+
# @return [Pinnacle::Types::RcsButtonContent]
|
143
|
+
def self.send_location(member:)
|
144
|
+
new(member: member, discriminant: "sendLocation")
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
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
|
+
# Button that opens a URL when tapped by the recipient.
|
9
|
+
class RcsButtonOpenUrl
|
10
|
+
# @return [String] The URL to open when the button is tapped. Must be a valid HTTP or HTTPS URL.
|
11
|
+
attr_reader :payload
|
12
|
+
# @return [String] Display text for the button.
|
13
|
+
attr_reader :title
|
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 payload [String] The URL to open when the button is tapped. Must be a valid HTTP or HTTPS URL.
|
23
|
+
# @param title [String] Display text for the button.
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [Pinnacle::Types::RcsButtonOpenUrl]
|
26
|
+
def initialize(payload:, title:, additional_properties: nil)
|
27
|
+
@payload = payload
|
28
|
+
@title = title
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "payload": payload, "title": title }
|
31
|
+
end
|
32
|
+
|
33
|
+
# Deserialize a JSON object to an instance of RcsButtonOpenUrl
|
34
|
+
#
|
35
|
+
# @param json_object [String]
|
36
|
+
# @return [Pinnacle::Types::RcsButtonOpenUrl]
|
37
|
+
def self.from_json(json_object:)
|
38
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
39
|
+
parsed_json = JSON.parse(json_object)
|
40
|
+
payload = parsed_json["payload"]
|
41
|
+
title = parsed_json["title"]
|
42
|
+
new(
|
43
|
+
payload: payload,
|
44
|
+
title: title,
|
45
|
+
additional_properties: struct
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Serialize an instance of RcsButtonOpenUrl 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.payload.is_a?(String) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
|
64
|
+
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Button that prompts the recipient to share their current location.
|
9
|
+
class RcsButtonRequestUserLocation
|
10
|
+
# @return [String] Display text for the button.
|
11
|
+
attr_reader :title
|
12
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
13
|
+
attr_reader :additional_properties
|
14
|
+
# @return [Object]
|
15
|
+
attr_reader :_field_set
|
16
|
+
protected :_field_set
|
17
|
+
|
18
|
+
OMIT = Object.new
|
19
|
+
|
20
|
+
# @param title [String] Display text for the button.
|
21
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
+
# @return [Pinnacle::Types::RcsButtonRequestUserLocation]
|
23
|
+
def initialize(title:, additional_properties: nil)
|
24
|
+
@title = title
|
25
|
+
@additional_properties = additional_properties
|
26
|
+
@_field_set = { "title": title }
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of RcsButtonRequestUserLocation
|
30
|
+
#
|
31
|
+
# @param json_object [String]
|
32
|
+
# @return [Pinnacle::Types::RcsButtonRequestUserLocation]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
parsed_json = JSON.parse(json_object)
|
36
|
+
title = parsed_json["title"]
|
37
|
+
new(title: title, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of RcsButtonRequestUserLocation to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Button that prompts the recipient to add an event to their calendar.
|
9
|
+
class RcsButtonScheduleEvent
|
10
|
+
# @return [String] Detailed description for the calendar event.
|
11
|
+
attr_reader :event_description
|
12
|
+
# @return [String] End time in ISO 8601 format.
|
13
|
+
attr_reader :event_end_time
|
14
|
+
# @return [String] Starting time in ISO 8601 format.
|
15
|
+
attr_reader :event_start_time
|
16
|
+
# @return [String] Title of the event.
|
17
|
+
attr_reader :event_title
|
18
|
+
# @return [String] Display text for the button.
|
19
|
+
attr_reader :title
|
20
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
21
|
+
attr_reader :additional_properties
|
22
|
+
# @return [Object]
|
23
|
+
attr_reader :_field_set
|
24
|
+
protected :_field_set
|
25
|
+
|
26
|
+
OMIT = Object.new
|
27
|
+
|
28
|
+
# @param event_description [String] Detailed description for the calendar event.
|
29
|
+
# @param event_end_time [String] End time in ISO 8601 format.
|
30
|
+
# @param event_start_time [String] Starting time in ISO 8601 format.
|
31
|
+
# @param event_title [String] Title of the event.
|
32
|
+
# @param title [String] Display text for the button.
|
33
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
34
|
+
# @return [Pinnacle::Types::RcsButtonScheduleEvent]
|
35
|
+
def initialize(event_end_time:, event_start_time:, event_title:, title:, event_description: OMIT,
|
36
|
+
additional_properties: nil)
|
37
|
+
@event_description = event_description if event_description != OMIT
|
38
|
+
@event_end_time = event_end_time
|
39
|
+
@event_start_time = event_start_time
|
40
|
+
@event_title = event_title
|
41
|
+
@title = title
|
42
|
+
@additional_properties = additional_properties
|
43
|
+
@_field_set = {
|
44
|
+
"eventDescription": event_description,
|
45
|
+
"eventEndTime": event_end_time,
|
46
|
+
"eventStartTime": event_start_time,
|
47
|
+
"eventTitle": event_title,
|
48
|
+
"title": title
|
49
|
+
}.reject do |_k, v|
|
50
|
+
v == OMIT
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Deserialize a JSON object to an instance of RcsButtonScheduleEvent
|
55
|
+
#
|
56
|
+
# @param json_object [String]
|
57
|
+
# @return [Pinnacle::Types::RcsButtonScheduleEvent]
|
58
|
+
def self.from_json(json_object:)
|
59
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
60
|
+
parsed_json = JSON.parse(json_object)
|
61
|
+
event_description = parsed_json["eventDescription"]
|
62
|
+
event_end_time = parsed_json["eventEndTime"]
|
63
|
+
event_start_time = parsed_json["eventStartTime"]
|
64
|
+
event_title = parsed_json["eventTitle"]
|
65
|
+
title = parsed_json["title"]
|
66
|
+
new(
|
67
|
+
event_description: event_description,
|
68
|
+
event_end_time: event_end_time,
|
69
|
+
event_start_time: event_start_time,
|
70
|
+
event_title: event_title,
|
71
|
+
title: title,
|
72
|
+
additional_properties: struct
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
# Serialize an instance of RcsButtonScheduleEvent to a JSON object
|
77
|
+
#
|
78
|
+
# @return [String]
|
79
|
+
def to_json(*_args)
|
80
|
+
@_field_set&.to_json
|
81
|
+
end
|
82
|
+
|
83
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
84
|
+
# hash and check each fields type against the current object's property
|
85
|
+
# definitions.
|
86
|
+
#
|
87
|
+
# @param obj [Object]
|
88
|
+
# @return [Void]
|
89
|
+
def self.validate_raw(obj:)
|
90
|
+
obj.event_description&.is_a?(String) != false || raise("Passed value for field obj.event_description is not the expected type, validation failed.")
|
91
|
+
obj.event_end_time.is_a?(String) != false || raise("Passed value for field obj.event_end_time is not the expected type, validation failed.")
|
92
|
+
obj.event_start_time.is_a?(String) != false || raise("Passed value for field obj.event_start_time is not the expected type, validation failed.")
|
93
|
+
obj.event_title.is_a?(String) != false || raise("Passed value for field obj.event_title is not the expected type, validation failed.")
|
94
|
+
obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|