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,142 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "advanced_phone_information_location_country"
|
4
|
+
require_relative "advanced_phone_information_location_coordinates"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module Pinnacle
|
9
|
+
module Types
|
10
|
+
# Comprehensive geographic and administrative location data with precise
|
11
|
+
# coordinates
|
12
|
+
# and timezone information for accurate localization.
|
13
|
+
class AdvancedPhoneInformationLocation
|
14
|
+
# @return [Pinnacle::Types::AdvancedPhoneInformationLocationCountry] Complete country identification and metadata.
|
15
|
+
attr_reader :country
|
16
|
+
# @return [String] Primary city or municipality associated with the phone number.
|
17
|
+
attr_reader :city
|
18
|
+
# @return [String] State, province, or primary administrative division code.
|
19
|
+
# Uses standard 2-letter abbreviations where applicable.
|
20
|
+
attr_reader :state
|
21
|
+
# @return [String] Postal or ZIP code for the phone number's registered location.
|
22
|
+
attr_reader :zip
|
23
|
+
# @return [String] Primary Metropolitan Statistical Area (PMSA) code for US numbers.
|
24
|
+
# Used for demographic and market analysis purposes.
|
25
|
+
attr_reader :metro_code
|
26
|
+
# @return [String] County or secondary administrative division name.
|
27
|
+
attr_reader :county
|
28
|
+
# @return [Pinnacle::Types::AdvancedPhoneInformationLocationCoordinates] Coordinates provide the precise latitude and longitude values for the phone
|
29
|
+
# number’s registered location.
|
30
|
+
attr_reader :coordinates
|
31
|
+
# @return [String] IANA timezone identifier for the number’s location.
|
32
|
+
attr_reader :time_zone
|
33
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
34
|
+
attr_reader :additional_properties
|
35
|
+
# @return [Object]
|
36
|
+
attr_reader :_field_set
|
37
|
+
protected :_field_set
|
38
|
+
|
39
|
+
OMIT = Object.new
|
40
|
+
|
41
|
+
# @param country [Pinnacle::Types::AdvancedPhoneInformationLocationCountry] Complete country identification and metadata.
|
42
|
+
# @param city [String] Primary city or municipality associated with the phone number.
|
43
|
+
# @param state [String] State, province, or primary administrative division code.
|
44
|
+
# Uses standard 2-letter abbreviations where applicable.
|
45
|
+
# @param zip [String] Postal or ZIP code for the phone number's registered location.
|
46
|
+
# @param metro_code [String] Primary Metropolitan Statistical Area (PMSA) code for US numbers.
|
47
|
+
# Used for demographic and market analysis purposes.
|
48
|
+
# @param county [String] County or secondary administrative division name.
|
49
|
+
# @param coordinates [Pinnacle::Types::AdvancedPhoneInformationLocationCoordinates] Coordinates provide the precise latitude and longitude values for the phone
|
50
|
+
# number’s registered location.
|
51
|
+
# @param time_zone [String] IANA timezone identifier for the number’s location.
|
52
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
53
|
+
# @return [Pinnacle::Types::AdvancedPhoneInformationLocation]
|
54
|
+
def initialize(country:, coordinates:, city: OMIT, state: OMIT, zip: OMIT, metro_code: OMIT, county: OMIT,
|
55
|
+
time_zone: OMIT, additional_properties: nil)
|
56
|
+
@country = country
|
57
|
+
@city = city if city != OMIT
|
58
|
+
@state = state if state != OMIT
|
59
|
+
@zip = zip if zip != OMIT
|
60
|
+
@metro_code = metro_code if metro_code != OMIT
|
61
|
+
@county = county if county != OMIT
|
62
|
+
@coordinates = coordinates
|
63
|
+
@time_zone = time_zone if time_zone != OMIT
|
64
|
+
@additional_properties = additional_properties
|
65
|
+
@_field_set = {
|
66
|
+
"country": country,
|
67
|
+
"city": city,
|
68
|
+
"state": state,
|
69
|
+
"zip": zip,
|
70
|
+
"metroCode": metro_code,
|
71
|
+
"county": county,
|
72
|
+
"coordinates": coordinates,
|
73
|
+
"timeZone": time_zone
|
74
|
+
}.reject do |_k, v|
|
75
|
+
v == OMIT
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Deserialize a JSON object to an instance of AdvancedPhoneInformationLocation
|
80
|
+
#
|
81
|
+
# @param json_object [String]
|
82
|
+
# @return [Pinnacle::Types::AdvancedPhoneInformationLocation]
|
83
|
+
def self.from_json(json_object:)
|
84
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
85
|
+
parsed_json = JSON.parse(json_object)
|
86
|
+
if parsed_json["country"].nil?
|
87
|
+
country = nil
|
88
|
+
else
|
89
|
+
country = parsed_json["country"].to_json
|
90
|
+
country = Pinnacle::Types::AdvancedPhoneInformationLocationCountry.from_json(json_object: country)
|
91
|
+
end
|
92
|
+
city = parsed_json["city"]
|
93
|
+
state = parsed_json["state"]
|
94
|
+
zip = parsed_json["zip"]
|
95
|
+
metro_code = parsed_json["metroCode"]
|
96
|
+
county = parsed_json["county"]
|
97
|
+
if parsed_json["coordinates"].nil?
|
98
|
+
coordinates = nil
|
99
|
+
else
|
100
|
+
coordinates = parsed_json["coordinates"].to_json
|
101
|
+
coordinates = Pinnacle::Types::AdvancedPhoneInformationLocationCoordinates.from_json(json_object: coordinates)
|
102
|
+
end
|
103
|
+
time_zone = parsed_json["timeZone"]
|
104
|
+
new(
|
105
|
+
country: country,
|
106
|
+
city: city,
|
107
|
+
state: state,
|
108
|
+
zip: zip,
|
109
|
+
metro_code: metro_code,
|
110
|
+
county: county,
|
111
|
+
coordinates: coordinates,
|
112
|
+
time_zone: time_zone,
|
113
|
+
additional_properties: struct
|
114
|
+
)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Serialize an instance of AdvancedPhoneInformationLocation to a JSON object
|
118
|
+
#
|
119
|
+
# @return [String]
|
120
|
+
def to_json(*_args)
|
121
|
+
@_field_set&.to_json
|
122
|
+
end
|
123
|
+
|
124
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
125
|
+
# hash and check each fields type against the current object's property
|
126
|
+
# definitions.
|
127
|
+
#
|
128
|
+
# @param obj [Object]
|
129
|
+
# @return [Void]
|
130
|
+
def self.validate_raw(obj:)
|
131
|
+
Pinnacle::Types::AdvancedPhoneInformationLocationCountry.validate_raw(obj: obj.country)
|
132
|
+
obj.city&.is_a?(String) != false || raise("Passed value for field obj.city is not the expected type, validation failed.")
|
133
|
+
obj.state&.is_a?(String) != false || raise("Passed value for field obj.state is not the expected type, validation failed.")
|
134
|
+
obj.zip&.is_a?(String) != false || raise("Passed value for field obj.zip is not the expected type, validation failed.")
|
135
|
+
obj.metro_code&.is_a?(String) != false || raise("Passed value for field obj.metro_code is not the expected type, validation failed.")
|
136
|
+
obj.county&.is_a?(String) != false || raise("Passed value for field obj.county is not the expected type, validation failed.")
|
137
|
+
Pinnacle::Types::AdvancedPhoneInformationLocationCoordinates.validate_raw(obj: obj.coordinates)
|
138
|
+
obj.time_zone&.is_a?(String) != false || raise("Passed value for field obj.time_zone is not the expected type, validation failed.")
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Coordinates provide the precise latitude and longitude values for the phone
|
9
|
+
# number’s registered location.
|
10
|
+
class AdvancedPhoneInformationLocationCoordinates
|
11
|
+
# @return [Float] Decimal degrees latitude coordinate.
|
12
|
+
attr_reader :latitude
|
13
|
+
# @return [Float] Decimal degrees longitude coordinate.
|
14
|
+
attr_reader :longitude
|
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 latitude [Float] Decimal degrees latitude coordinate.
|
24
|
+
# @param longitude [Float] Decimal degrees longitude coordinate.
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [Pinnacle::Types::AdvancedPhoneInformationLocationCoordinates]
|
27
|
+
def initialize(latitude: OMIT, longitude: OMIT, additional_properties: nil)
|
28
|
+
@latitude = latitude if latitude != OMIT
|
29
|
+
@longitude = longitude if longitude != OMIT
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = { "latitude": latitude, "longitude": longitude }.reject do |_k, v|
|
32
|
+
v == OMIT
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Deserialize a JSON object to an instance of
|
37
|
+
# AdvancedPhoneInformationLocationCoordinates
|
38
|
+
#
|
39
|
+
# @param json_object [String]
|
40
|
+
# @return [Pinnacle::Types::AdvancedPhoneInformationLocationCoordinates]
|
41
|
+
def self.from_json(json_object:)
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
44
|
+
latitude = parsed_json["latitude"]
|
45
|
+
longitude = parsed_json["longitude"]
|
46
|
+
new(
|
47
|
+
latitude: latitude,
|
48
|
+
longitude: longitude,
|
49
|
+
additional_properties: struct
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serialize an instance of AdvancedPhoneInformationLocationCoordinates to a JSON
|
54
|
+
# 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.latitude&.is_a?(Float) != false || raise("Passed value for field obj.latitude is not the expected type, validation failed.")
|
69
|
+
obj.longitude&.is_a?(Float) != false || raise("Passed value for field obj.longitude is not the expected type, validation failed.")
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Complete country identification and metadata.
|
9
|
+
class AdvancedPhoneInformationLocationCountry
|
10
|
+
# @return [String] Name of the country.
|
11
|
+
attr_reader :name
|
12
|
+
# @return [String] Two-letter country code where the number is registered.
|
13
|
+
attr_reader :code
|
14
|
+
# @return [String] Three-letter country code where the number is registered.
|
15
|
+
attr_reader :code_3
|
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 name [String] Name of the country.
|
25
|
+
# @param code [String] Two-letter country code where the number is registered.
|
26
|
+
# @param code_3 [String] Three-letter country code where the number is registered.
|
27
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
+
# @return [Pinnacle::Types::AdvancedPhoneInformationLocationCountry]
|
29
|
+
def initialize(name:, code:, code_3:, additional_properties: nil)
|
30
|
+
@name = name
|
31
|
+
@code = code
|
32
|
+
@code_3 = code_3
|
33
|
+
@additional_properties = additional_properties
|
34
|
+
@_field_set = { "name": name, "code": code, "code3": code_3 }
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deserialize a JSON object to an instance of
|
38
|
+
# AdvancedPhoneInformationLocationCountry
|
39
|
+
#
|
40
|
+
# @param json_object [String]
|
41
|
+
# @return [Pinnacle::Types::AdvancedPhoneInformationLocationCountry]
|
42
|
+
def self.from_json(json_object:)
|
43
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
44
|
+
parsed_json = JSON.parse(json_object)
|
45
|
+
name = parsed_json["name"]
|
46
|
+
code = parsed_json["code"]
|
47
|
+
code_3 = parsed_json["code3"]
|
48
|
+
new(
|
49
|
+
name: name,
|
50
|
+
code: code,
|
51
|
+
code_3: code_3,
|
52
|
+
additional_properties: struct
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Serialize an instance of AdvancedPhoneInformationLocationCountry to a JSON
|
57
|
+
# object
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
def to_json(*_args)
|
61
|
+
@_field_set&.to_json
|
62
|
+
end
|
63
|
+
|
64
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
65
|
+
# hash and check each fields type against the current object's property
|
66
|
+
# definitions.
|
67
|
+
#
|
68
|
+
# @param obj [Object]
|
69
|
+
# @return [Void]
|
70
|
+
def self.validate_raw(obj:)
|
71
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
72
|
+
obj.code.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
73
|
+
obj.code_3.is_a?(String) != false || raise("Passed value for field obj.code_3 is not the expected type, validation failed.")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "detailed_phone_number_enum"
|
4
|
+
require_relative "advanced_phone_information_type_recommendation"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module Pinnacle
|
9
|
+
module Types
|
10
|
+
# Detailed classification including fraud risk and security recommendations.
|
11
|
+
class AdvancedPhoneInformationType
|
12
|
+
# @return [Pinnacle::Types::DetailedPhoneNumberEnum] Technical classification derived from carrier intelligence systems.
|
13
|
+
attr_reader :value
|
14
|
+
# @return [String] Explanation of the phone number type and service
|
15
|
+
attr_reader :description
|
16
|
+
# @return [String] Additional technical details about the service type, billing model,
|
17
|
+
# and typical usage patterns for this number classification.
|
18
|
+
attr_reader :details
|
19
|
+
# @return [Pinnacle::Types::AdvancedPhoneInformationTypeRecommendation] Security recommendation based on fraud risk analysis:
|
20
|
+
# - `ALLOW`: Low risk, safe for normal use.
|
21
|
+
# - `BLOCK`: High risk, block or require additional verification.
|
22
|
+
# - `FLAG`: Medium risk, recommend further scrutiny or monitoring.
|
23
|
+
attr_reader :recommendation
|
24
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
attr_reader :additional_properties
|
26
|
+
# @return [Object]
|
27
|
+
attr_reader :_field_set
|
28
|
+
protected :_field_set
|
29
|
+
|
30
|
+
OMIT = Object.new
|
31
|
+
|
32
|
+
# @param value [Pinnacle::Types::DetailedPhoneNumberEnum] Technical classification derived from carrier intelligence systems.
|
33
|
+
# @param description [String] Explanation of the phone number type and service
|
34
|
+
# @param details [String] Additional technical details about the service type, billing model,
|
35
|
+
# and typical usage patterns for this number classification.
|
36
|
+
# @param recommendation [Pinnacle::Types::AdvancedPhoneInformationTypeRecommendation] Security recommendation based on fraud risk analysis:
|
37
|
+
# - `ALLOW`: Low risk, safe for normal use.
|
38
|
+
# - `BLOCK`: High risk, block or require additional verification.
|
39
|
+
# - `FLAG`: Medium risk, recommend further scrutiny or monitoring.
|
40
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
41
|
+
# @return [Pinnacle::Types::AdvancedPhoneInformationType]
|
42
|
+
def initialize(value:, description:, details:, recommendation:, additional_properties: nil)
|
43
|
+
@value = value
|
44
|
+
@description = description
|
45
|
+
@details = details
|
46
|
+
@recommendation = recommendation
|
47
|
+
@additional_properties = additional_properties
|
48
|
+
@_field_set = {
|
49
|
+
"value": value,
|
50
|
+
"description": description,
|
51
|
+
"details": details,
|
52
|
+
"recommendation": recommendation
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Deserialize a JSON object to an instance of AdvancedPhoneInformationType
|
57
|
+
#
|
58
|
+
# @param json_object [String]
|
59
|
+
# @return [Pinnacle::Types::AdvancedPhoneInformationType]
|
60
|
+
def self.from_json(json_object:)
|
61
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
62
|
+
parsed_json = JSON.parse(json_object)
|
63
|
+
value = parsed_json["value"]
|
64
|
+
description = parsed_json["description"]
|
65
|
+
details = parsed_json["details"]
|
66
|
+
recommendation = parsed_json["recommendation"]
|
67
|
+
new(
|
68
|
+
value: value,
|
69
|
+
description: description,
|
70
|
+
details: details,
|
71
|
+
recommendation: recommendation,
|
72
|
+
additional_properties: struct
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
# Serialize an instance of AdvancedPhoneInformationType 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.value.is_a?(Pinnacle::Types::DetailedPhoneNumberEnum) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
91
|
+
obj.description.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
92
|
+
obj.details.is_a?(String) != false || raise("Passed value for field obj.details is not the expected type, validation failed.")
|
93
|
+
obj.recommendation.is_a?(Pinnacle::Types::AdvancedPhoneInformationTypeRecommendation) != false || raise("Passed value for field obj.recommendation is not the expected type, validation failed.")
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Pinnacle
|
4
|
+
module Types
|
5
|
+
# Security recommendation based on fraud risk analysis:
|
6
|
+
# - `ALLOW`: Low risk, safe for normal use.
|
7
|
+
# - `BLOCK`: High risk, block or require additional verification.
|
8
|
+
# - `FLAG`: Medium risk, recommend further scrutiny or monitoring.
|
9
|
+
class AdvancedPhoneInformationTypeRecommendation
|
10
|
+
ALLOW = "ALLOW"
|
11
|
+
BLOCK = "BLOCK"
|
12
|
+
FLAG = "FLAG"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
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
|
+
# Information about an RCS agent sender in a conversation.
|
9
|
+
class Agent
|
10
|
+
# @return [String] Unique identifier for the RCS agent.
|
11
|
+
attr_reader :agent_id
|
12
|
+
# @return [String] Display name of the RCS agent.
|
13
|
+
attr_reader :agent_name
|
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 agent_id [String] Unique identifier for the RCS agent.
|
23
|
+
# @param agent_name [String] Display name of the RCS agent.
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [Pinnacle::Types::Agent]
|
26
|
+
def initialize(agent_id:, agent_name:, additional_properties: nil)
|
27
|
+
@agent_id = agent_id
|
28
|
+
@agent_name = agent_name
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "agentId": agent_id, "agentName": agent_name }
|
31
|
+
end
|
32
|
+
|
33
|
+
# Deserialize a JSON object to an instance of Agent
|
34
|
+
#
|
35
|
+
# @param json_object [String]
|
36
|
+
# @return [Pinnacle::Types::Agent]
|
37
|
+
def self.from_json(json_object:)
|
38
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
39
|
+
parsed_json = JSON.parse(json_object)
|
40
|
+
agent_id = parsed_json["agentId"]
|
41
|
+
agent_name = parsed_json["agentName"]
|
42
|
+
new(
|
43
|
+
agent_id: agent_id,
|
44
|
+
agent_name: agent_name,
|
45
|
+
additional_properties: struct
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Serialize an instance of Agent 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.agent_id.is_a?(String) != false || raise("Passed value for field obj.agent_id is not the expected type, validation failed.")
|
64
|
+
obj.agent_name.is_a?(String) != false || raise("Passed value for field obj.agent_name is not the expected type, validation failed.")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
require_relative "attach_webhook_schema_webhook_id"
|
5
|
+
require_relative "attach_webhook_schema_name"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Use this request to connect a webhook to your phone number and receive real-time
|
10
|
+
# event notifications.
|
11
|
+
# You can either attach one of your existing webhooks by providing its ID or
|
12
|
+
# create a new webhook by specifying its name, URL, and event type.
|
13
|
+
class AttachWebhookParams
|
14
|
+
# Deserialize a JSON object to an instance of AttachWebhookParams
|
15
|
+
#
|
16
|
+
# @param json_object [String]
|
17
|
+
# @return [Pinnacle::Types::AttachWebhookParams]
|
18
|
+
def self.from_json(json_object:)
|
19
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
20
|
+
begin
|
21
|
+
Pinnacle::Types::AttachWebhookSchemaWebhookId.validate_raw(obj: struct)
|
22
|
+
return Pinnacle::Types::AttachWebhookSchemaWebhookId.from_json(json_object: struct) unless struct.nil?
|
23
|
+
|
24
|
+
return nil
|
25
|
+
rescue StandardError
|
26
|
+
# noop
|
27
|
+
end
|
28
|
+
begin
|
29
|
+
Pinnacle::Types::AttachWebhookSchemaName.validate_raw(obj: struct)
|
30
|
+
return Pinnacle::Types::AttachWebhookSchemaName.from_json(json_object: struct) unless struct.nil?
|
31
|
+
|
32
|
+
return nil
|
33
|
+
rescue StandardError
|
34
|
+
# noop
|
35
|
+
end
|
36
|
+
struct
|
37
|
+
end
|
38
|
+
|
39
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
40
|
+
# hash and check each fields type against the current object's property
|
41
|
+
# definitions.
|
42
|
+
#
|
43
|
+
# @param obj [Object]
|
44
|
+
# @return [Void]
|
45
|
+
def self.validate_raw(obj:)
|
46
|
+
begin
|
47
|
+
return Pinnacle::Types::AttachWebhookSchemaWebhookId.validate_raw(obj: obj)
|
48
|
+
rescue StandardError
|
49
|
+
# noop
|
50
|
+
end
|
51
|
+
begin
|
52
|
+
return Pinnacle::Types::AttachWebhookSchemaName.validate_raw(obj: obj)
|
53
|
+
rescue StandardError
|
54
|
+
# noop
|
55
|
+
end
|
56
|
+
raise("Passed value matched no type within the union, validation failed.")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Detailed information about the attached webhook.
|
9
|
+
class AttachWebhookResponseWebhook
|
10
|
+
# @return [Integer] Unique identifier of the webhook within the account.
|
11
|
+
attr_reader :id
|
12
|
+
# @return [String] Name of the webhook.
|
13
|
+
attr_reader :name
|
14
|
+
# @return [String] The HTTPS endpoint URL where webhook events will be sent as HTTP POST requests.
|
15
|
+
attr_reader :url
|
16
|
+
# @return [String] Secret key used to verify the authenticity of incoming webhook requests. <br>
|
17
|
+
# This secret key will be stored in the `PINNACLE-SIGNING-SECRET` header.
|
18
|
+
attr_reader :secret
|
19
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
20
|
+
attr_reader :additional_properties
|
21
|
+
# @return [Object]
|
22
|
+
attr_reader :_field_set
|
23
|
+
protected :_field_set
|
24
|
+
|
25
|
+
OMIT = Object.new
|
26
|
+
|
27
|
+
# @param id [Integer] Unique identifier of the webhook within the account.
|
28
|
+
# @param name [String] Name of the webhook.
|
29
|
+
# @param url [String] The HTTPS endpoint URL where webhook events will be sent as HTTP POST requests.
|
30
|
+
# @param secret [String] Secret key used to verify the authenticity of incoming webhook requests. <br>
|
31
|
+
# This secret key will be stored in the `PINNACLE-SIGNING-SECRET` header.
|
32
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
33
|
+
# @return [Pinnacle::Types::AttachWebhookResponseWebhook]
|
34
|
+
def initialize(id:, name:, url:, secret: OMIT, additional_properties: nil)
|
35
|
+
@id = id
|
36
|
+
@name = name
|
37
|
+
@url = url
|
38
|
+
@secret = secret if secret != OMIT
|
39
|
+
@additional_properties = additional_properties
|
40
|
+
@_field_set = { "id": id, "name": name, "url": url, "secret": secret }.reject do |_k, v|
|
41
|
+
v == OMIT
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Deserialize a JSON object to an instance of AttachWebhookResponseWebhook
|
46
|
+
#
|
47
|
+
# @param json_object [String]
|
48
|
+
# @return [Pinnacle::Types::AttachWebhookResponseWebhook]
|
49
|
+
def self.from_json(json_object:)
|
50
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
51
|
+
parsed_json = JSON.parse(json_object)
|
52
|
+
id = parsed_json["id"]
|
53
|
+
name = parsed_json["name"]
|
54
|
+
url = parsed_json["url"]
|
55
|
+
secret = parsed_json["secret"]
|
56
|
+
new(
|
57
|
+
id: id,
|
58
|
+
name: name,
|
59
|
+
url: url,
|
60
|
+
secret: secret,
|
61
|
+
additional_properties: struct
|
62
|
+
)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Serialize an instance of AttachWebhookResponseWebhook to a JSON object
|
66
|
+
#
|
67
|
+
# @return [String]
|
68
|
+
def to_json(*_args)
|
69
|
+
@_field_set&.to_json
|
70
|
+
end
|
71
|
+
|
72
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
73
|
+
# hash and check each fields type against the current object's property
|
74
|
+
# definitions.
|
75
|
+
#
|
76
|
+
# @param obj [Object]
|
77
|
+
# @return [Void]
|
78
|
+
def self.validate_raw(obj:)
|
79
|
+
obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
80
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
81
|
+
obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
|
82
|
+
obj.secret&.is_a?(String) != false || raise("Passed value for field obj.secret is not the expected type, validation failed.")
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|