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
data/lib/rcs/{send/types/send_sms_response.rb → types/autofill_dlc_response_keywords_opt_in.rb}
RENAMED
@@ -4,12 +4,13 @@ require "ostruct"
|
|
4
4
|
require "json"
|
5
5
|
|
6
6
|
module Pinnacle
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
# @return [String] A message indicating the status of the sent message.
|
7
|
+
module Types
|
8
|
+
# Opt-in keyword settings.
|
9
|
+
class AutofillDlcResponseKeywordsOptIn
|
10
|
+
# @return [String] Response message for opt-in keywords.
|
12
11
|
attr_reader :message
|
12
|
+
# @return [Array<String>] Keywords that trigger opt-in.
|
13
|
+
attr_reader :values
|
13
14
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
15
|
attr_reader :additional_properties
|
15
16
|
# @return [Object]
|
@@ -18,34 +19,34 @@ module Pinnacle
|
|
18
19
|
|
19
20
|
OMIT = Object.new
|
20
21
|
|
21
|
-
# @param
|
22
|
-
# @param
|
22
|
+
# @param message [String] Response message for opt-in keywords.
|
23
|
+
# @param values [Array<String>] Keywords that trigger opt-in.
|
23
24
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
-
# @return [Pinnacle::
|
25
|
-
def initialize(
|
26
|
-
@message_id = message_id
|
25
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsOptIn]
|
26
|
+
def initialize(message:, values:, additional_properties: nil)
|
27
27
|
@message = message
|
28
|
+
@values = values
|
28
29
|
@additional_properties = additional_properties
|
29
|
-
@_field_set = { "
|
30
|
+
@_field_set = { "message": message, "values": values }
|
30
31
|
end
|
31
32
|
|
32
|
-
# Deserialize a JSON object to an instance of
|
33
|
+
# Deserialize a JSON object to an instance of AutofillDlcResponseKeywordsOptIn
|
33
34
|
#
|
34
35
|
# @param json_object [String]
|
35
|
-
# @return [Pinnacle::
|
36
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsOptIn]
|
36
37
|
def self.from_json(json_object:)
|
37
38
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
38
39
|
parsed_json = JSON.parse(json_object)
|
39
|
-
message_id = parsed_json["messageId"]
|
40
40
|
message = parsed_json["message"]
|
41
|
+
values = parsed_json["values"]
|
41
42
|
new(
|
42
|
-
message_id: message_id,
|
43
43
|
message: message,
|
44
|
+
values: values,
|
44
45
|
additional_properties: struct
|
45
46
|
)
|
46
47
|
end
|
47
48
|
|
48
|
-
# Serialize an instance of
|
49
|
+
# Serialize an instance of AutofillDlcResponseKeywordsOptIn to a JSON object
|
49
50
|
#
|
50
51
|
# @return [String]
|
51
52
|
def to_json(*_args)
|
@@ -59,8 +60,8 @@ module Pinnacle
|
|
59
60
|
# @param obj [Object]
|
60
61
|
# @return [Void]
|
61
62
|
def self.validate_raw(obj:)
|
62
|
-
obj.message_id.is_a?(String) != false || raise("Passed value for field obj.message_id is not the expected type, validation failed.")
|
63
63
|
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
64
|
+
obj.values.is_a?(Array) != false || raise("Passed value for field obj.values is not the expected type, validation failed.")
|
64
65
|
end
|
65
66
|
end
|
66
67
|
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Opt-out keyword settings.
|
9
|
+
class AutofillDlcResponseKeywordsOptOut
|
10
|
+
# @return [String] Response message for opt-out keywords.
|
11
|
+
attr_reader :message
|
12
|
+
# @return [Array<String>] Keywords that trigger opt-out.
|
13
|
+
attr_reader :values
|
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 message [String] Response message for opt-out keywords.
|
23
|
+
# @param values [Array<String>] Keywords that trigger opt-out.
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsOptOut]
|
26
|
+
def initialize(message: OMIT, values: OMIT, additional_properties: nil)
|
27
|
+
@message = message if message != OMIT
|
28
|
+
@values = values if values != OMIT
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "message": message, "values": values }.reject do |_k, v|
|
31
|
+
v == OMIT
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Deserialize a JSON object to an instance of AutofillDlcResponseKeywordsOptOut
|
36
|
+
#
|
37
|
+
# @param json_object [String]
|
38
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsOptOut]
|
39
|
+
def self.from_json(json_object:)
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
+
parsed_json = JSON.parse(json_object)
|
42
|
+
message = parsed_json["message"]
|
43
|
+
values = parsed_json["values"]
|
44
|
+
new(
|
45
|
+
message: message,
|
46
|
+
values: values,
|
47
|
+
additional_properties: struct
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
# Serialize an instance of AutofillDlcResponseKeywordsOptOut to a JSON object
|
52
|
+
#
|
53
|
+
# @return [String]
|
54
|
+
def to_json(*_args)
|
55
|
+
@_field_set&.to_json
|
56
|
+
end
|
57
|
+
|
58
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
59
|
+
# hash and check each fields type against the current object's property
|
60
|
+
# definitions.
|
61
|
+
#
|
62
|
+
# @param obj [Object]
|
63
|
+
# @return [Void]
|
64
|
+
def self.validate_raw(obj:)
|
65
|
+
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
66
|
+
obj.values&.is_a?(Array) != false || raise("Passed value for field obj.values is not the expected type, validation failed.")
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Legal documentation links.
|
9
|
+
class AutofillDlcResponseLinks
|
10
|
+
# @return [String] Privacy policy URL.
|
11
|
+
attr_reader :privacy_policy
|
12
|
+
# @return [String] Terms of service URL.
|
13
|
+
attr_reader :terms_of_service
|
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 privacy_policy [String] Privacy policy URL.
|
23
|
+
# @param terms_of_service [String] Terms of service URL.
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [Pinnacle::Types::AutofillDlcResponseLinks]
|
26
|
+
def initialize(privacy_policy: OMIT, terms_of_service: OMIT, additional_properties: nil)
|
27
|
+
@privacy_policy = privacy_policy if privacy_policy != OMIT
|
28
|
+
@terms_of_service = terms_of_service if terms_of_service != OMIT
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "privacyPolicy": privacy_policy, "termsOfService": terms_of_service }.reject do |_k, v|
|
31
|
+
v == OMIT
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Deserialize a JSON object to an instance of AutofillDlcResponseLinks
|
36
|
+
#
|
37
|
+
# @param json_object [String]
|
38
|
+
# @return [Pinnacle::Types::AutofillDlcResponseLinks]
|
39
|
+
def self.from_json(json_object:)
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
+
parsed_json = JSON.parse(json_object)
|
42
|
+
privacy_policy = parsed_json["privacyPolicy"]
|
43
|
+
terms_of_service = parsed_json["termsOfService"]
|
44
|
+
new(
|
45
|
+
privacy_policy: privacy_policy,
|
46
|
+
terms_of_service: terms_of_service,
|
47
|
+
additional_properties: struct
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
# Serialize an instance of AutofillDlcResponseLinks to a JSON object
|
52
|
+
#
|
53
|
+
# @return [String]
|
54
|
+
def to_json(*_args)
|
55
|
+
@_field_set&.to_json
|
56
|
+
end
|
57
|
+
|
58
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
59
|
+
# hash and check each fields type against the current object's property
|
60
|
+
# definitions.
|
61
|
+
#
|
62
|
+
# @param obj [Object]
|
63
|
+
# @return [Void]
|
64
|
+
def self.validate_raw(obj:)
|
65
|
+
obj.privacy_policy&.is_a?(String) != false || raise("Passed value for field obj.privacy_policy is not the expected type, validation failed.")
|
66
|
+
obj.terms_of_service&.is_a?(String) != false || raise("Passed value for field obj.terms_of_service is not the expected type, validation failed.")
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Campaign configuration options.
|
9
|
+
class AutofillDlcResponseOptions
|
10
|
+
# @return [Boolean] Whether the campaign uses affiliate marketing.
|
11
|
+
attr_reader :affiliate_marketing
|
12
|
+
# @return [Boolean] Whether the campaign is age-gated.
|
13
|
+
attr_reader :age_gated
|
14
|
+
# @return [Boolean] Whether the campaign involves direct lending.
|
15
|
+
attr_reader :direct_lending
|
16
|
+
# @return [String] Link embedded in campaign message.
|
17
|
+
attr_reader :embedded_link
|
18
|
+
# @return [Boolean] Whether messages include phone numbers.
|
19
|
+
attr_reader :embedded_phone
|
20
|
+
# @return [Boolean] Whether the campaign uses number pooling.
|
21
|
+
attr_reader :number_pooling
|
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 affiliate_marketing [Boolean] Whether the campaign uses affiliate marketing.
|
31
|
+
# @param age_gated [Boolean] Whether the campaign is age-gated.
|
32
|
+
# @param direct_lending [Boolean] Whether the campaign involves direct lending.
|
33
|
+
# @param embedded_link [String] Link embedded in campaign message.
|
34
|
+
# @param embedded_phone [Boolean] Whether messages include phone numbers.
|
35
|
+
# @param number_pooling [Boolean] Whether the campaign uses number pooling.
|
36
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
37
|
+
# @return [Pinnacle::Types::AutofillDlcResponseOptions]
|
38
|
+
def initialize(affiliate_marketing: OMIT, age_gated: OMIT, direct_lending: OMIT, embedded_link: OMIT,
|
39
|
+
embedded_phone: OMIT, number_pooling: OMIT, additional_properties: nil)
|
40
|
+
@affiliate_marketing = affiliate_marketing if affiliate_marketing != OMIT
|
41
|
+
@age_gated = age_gated if age_gated != OMIT
|
42
|
+
@direct_lending = direct_lending if direct_lending != OMIT
|
43
|
+
@embedded_link = embedded_link if embedded_link != OMIT
|
44
|
+
@embedded_phone = embedded_phone if embedded_phone != OMIT
|
45
|
+
@number_pooling = number_pooling if number_pooling != OMIT
|
46
|
+
@additional_properties = additional_properties
|
47
|
+
@_field_set = {
|
48
|
+
"affiliateMarketing": affiliate_marketing,
|
49
|
+
"ageGated": age_gated,
|
50
|
+
"directLending": direct_lending,
|
51
|
+
"embeddedLink": embedded_link,
|
52
|
+
"embeddedPhone": embedded_phone,
|
53
|
+
"numberPooling": number_pooling
|
54
|
+
}.reject do |_k, v|
|
55
|
+
v == OMIT
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Deserialize a JSON object to an instance of AutofillDlcResponseOptions
|
60
|
+
#
|
61
|
+
# @param json_object [String]
|
62
|
+
# @return [Pinnacle::Types::AutofillDlcResponseOptions]
|
63
|
+
def self.from_json(json_object:)
|
64
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
65
|
+
parsed_json = JSON.parse(json_object)
|
66
|
+
affiliate_marketing = parsed_json["affiliateMarketing"]
|
67
|
+
age_gated = parsed_json["ageGated"]
|
68
|
+
direct_lending = parsed_json["directLending"]
|
69
|
+
embedded_link = parsed_json["embeddedLink"]
|
70
|
+
embedded_phone = parsed_json["embeddedPhone"]
|
71
|
+
number_pooling = parsed_json["numberPooling"]
|
72
|
+
new(
|
73
|
+
affiliate_marketing: affiliate_marketing,
|
74
|
+
age_gated: age_gated,
|
75
|
+
direct_lending: direct_lending,
|
76
|
+
embedded_link: embedded_link,
|
77
|
+
embedded_phone: embedded_phone,
|
78
|
+
number_pooling: number_pooling,
|
79
|
+
additional_properties: struct
|
80
|
+
)
|
81
|
+
end
|
82
|
+
|
83
|
+
# Serialize an instance of AutofillDlcResponseOptions to a JSON object
|
84
|
+
#
|
85
|
+
# @return [String]
|
86
|
+
def to_json(*_args)
|
87
|
+
@_field_set&.to_json
|
88
|
+
end
|
89
|
+
|
90
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
91
|
+
# hash and check each fields type against the current object's property
|
92
|
+
# definitions.
|
93
|
+
#
|
94
|
+
# @param obj [Object]
|
95
|
+
# @return [Void]
|
96
|
+
def self.validate_raw(obj:)
|
97
|
+
obj.affiliate_marketing&.is_a?(Boolean) != false || raise("Passed value for field obj.affiliate_marketing is not the expected type, validation failed.")
|
98
|
+
obj.age_gated&.is_a?(Boolean) != false || raise("Passed value for field obj.age_gated is not the expected type, validation failed.")
|
99
|
+
obj.direct_lending&.is_a?(Boolean) != false || raise("Passed value for field obj.direct_lending is not the expected type, validation failed.")
|
100
|
+
obj.embedded_link&.is_a?(String) != false || raise("Passed value for field obj.embedded_link is not the expected type, validation failed.")
|
101
|
+
obj.embedded_phone&.is_a?(Boolean) != false || raise("Passed value for field obj.embedded_phone is not the expected type, validation failed.")
|
102
|
+
obj.number_pooling&.is_a?(Boolean) != false || raise("Passed value for field obj.number_pooling is not the expected type, validation failed.")
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "sub_use_case_enum"
|
4
|
+
require_relative "dlc_campaign_use_case_enum"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module Pinnacle
|
9
|
+
module Types
|
10
|
+
# Use case for the campaign.
|
11
|
+
class AutofillDlcResponseUseCase
|
12
|
+
# @return [Array<Pinnacle::Types::SubUseCaseEnum>] Sub-use case categories.
|
13
|
+
attr_reader :sub
|
14
|
+
# @return [Pinnacle::Types::DlcCampaignUseCaseEnum]
|
15
|
+
attr_reader :value
|
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 sub [Array<Pinnacle::Types::SubUseCaseEnum>] Sub-use case categories.
|
25
|
+
# @param value [Pinnacle::Types::DlcCampaignUseCaseEnum]
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [Pinnacle::Types::AutofillDlcResponseUseCase]
|
28
|
+
def initialize(sub: OMIT, value: OMIT, additional_properties: nil)
|
29
|
+
@sub = sub if sub != OMIT
|
30
|
+
@value = value if value != OMIT
|
31
|
+
@additional_properties = additional_properties
|
32
|
+
@_field_set = { "sub": sub, "value": value }.reject do |_k, v|
|
33
|
+
v == OMIT
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deserialize a JSON object to an instance of AutofillDlcResponseUseCase
|
38
|
+
#
|
39
|
+
# @param json_object [String]
|
40
|
+
# @return [Pinnacle::Types::AutofillDlcResponseUseCase]
|
41
|
+
def self.from_json(json_object:)
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
44
|
+
sub = parsed_json["sub"]
|
45
|
+
value = parsed_json["value"]
|
46
|
+
new(
|
47
|
+
sub: sub,
|
48
|
+
value: value,
|
49
|
+
additional_properties: struct
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serialize an instance of AutofillDlcResponseUseCase to a JSON object
|
54
|
+
#
|
55
|
+
# @return [String]
|
56
|
+
def to_json(*_args)
|
57
|
+
@_field_set&.to_json
|
58
|
+
end
|
59
|
+
|
60
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
61
|
+
# hash and check each fields type against the current object's property
|
62
|
+
# definitions.
|
63
|
+
#
|
64
|
+
# @param obj [Object]
|
65
|
+
# @return [Void]
|
66
|
+
def self.validate_raw(obj:)
|
67
|
+
obj.sub&.is_a?(Array) != false || raise("Passed value for field obj.sub is not the expected type, validation failed.")
|
68
|
+
obj.value&.is_a?(Pinnacle::Types::DlcCampaignUseCaseEnum) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -1,57 +1,56 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "ostruct"
|
4
3
|
require "json"
|
4
|
+
require_relative "zod_error"
|
5
|
+
require_relative "error"
|
5
6
|
|
6
7
|
module Pinnacle
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
module Types
|
9
|
+
class BadRequestErrorBody
|
10
|
+
# Deserialize a JSON object to an instance of BadRequestErrorBody
|
11
|
+
#
|
12
|
+
# @param json_object [String]
|
13
|
+
# @return [Pinnacle::Types::BadRequestErrorBody]
|
14
|
+
def self.from_json(json_object:)
|
15
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
16
|
+
begin
|
17
|
+
Pinnacle::Types::ZodError.validate_raw(obj: struct)
|
18
|
+
return Pinnacle::Types::ZodError.from_json(json_object: struct) unless struct.nil?
|
15
19
|
|
16
|
-
|
20
|
+
return nil
|
21
|
+
rescue StandardError
|
22
|
+
# noop
|
23
|
+
end
|
24
|
+
begin
|
25
|
+
Pinnacle::Types::Error.validate_raw(obj: struct)
|
26
|
+
return Pinnacle::Types::Error.from_json(json_object: struct) unless struct.nil?
|
17
27
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
@additional_properties = additional_properties
|
24
|
-
@_field_set = { "errors": errors }.reject do |_k, v|
|
25
|
-
v == OMIT
|
28
|
+
return nil
|
29
|
+
rescue StandardError
|
30
|
+
# noop
|
31
|
+
end
|
32
|
+
struct
|
26
33
|
end
|
27
|
-
end
|
28
|
-
|
29
|
-
# Deserialize a JSON object to an instance of BadRequestErrorBody
|
30
|
-
#
|
31
|
-
# @param json_object [String]
|
32
|
-
# @return [Pinnacle::BadRequestErrorBody]
|
33
|
-
def self.from_json(json_object:)
|
34
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
-
parsed_json = JSON.parse(json_object)
|
36
|
-
errors = parsed_json["errors"]
|
37
|
-
new(errors: errors, additional_properties: struct)
|
38
|
-
end
|
39
34
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
@
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
35
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
36
|
+
# hash and check each fields type against the current object's property
|
37
|
+
# definitions.
|
38
|
+
#
|
39
|
+
# @param obj [Object]
|
40
|
+
# @return [Void]
|
41
|
+
def self.validate_raw(obj:)
|
42
|
+
begin
|
43
|
+
return Pinnacle::Types::ZodError.validate_raw(obj: obj)
|
44
|
+
rescue StandardError
|
45
|
+
# noop
|
46
|
+
end
|
47
|
+
begin
|
48
|
+
return Pinnacle::Types::Error.validate_raw(obj: obj)
|
49
|
+
rescue StandardError
|
50
|
+
# noop
|
51
|
+
end
|
52
|
+
raise("Passed value matched no type within the union, validation failed.")
|
53
|
+
end
|
55
54
|
end
|
56
55
|
end
|
57
56
|
end
|
@@ -0,0 +1,127 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "phone_number_enum"
|
4
|
+
require_relative "number_format"
|
5
|
+
require_relative "basic_phone_information_location"
|
6
|
+
require_relative "basic_phone_information_contact"
|
7
|
+
require "ostruct"
|
8
|
+
require "json"
|
9
|
+
|
10
|
+
module Pinnacle
|
11
|
+
module Types
|
12
|
+
# Key details about a phone number, including its validity, type, location,
|
13
|
+
# carrier, and contact information.
|
14
|
+
# Provides the essential data required for verification, display, and basic
|
15
|
+
# analysis.
|
16
|
+
class BasicPhoneInformation
|
17
|
+
# @return [Boolean] Indicates whether the phone number is valid and capable of receiving
|
18
|
+
# communications.
|
19
|
+
attr_reader :is_valid
|
20
|
+
# @return [Pinnacle::Types::PhoneNumberEnum] Classification of the phone number.
|
21
|
+
attr_reader :type
|
22
|
+
# @return [Pinnacle::Types::NumberFormat] Different standardized ways the phone number can be formatted for display.
|
23
|
+
attr_reader :formats
|
24
|
+
# @return [Pinnacle::Types::BasicPhoneInformationLocation] Geographic and political details where the phone number is registered.
|
25
|
+
attr_reader :location
|
26
|
+
# @return [String] The telecommunications carrier or service provider for the number.
|
27
|
+
attr_reader :carrier
|
28
|
+
# @return [Pinnacle::Types::BasicPhoneInformationContact] Contact information linked to the phone number registration, if available.
|
29
|
+
attr_reader :contact
|
30
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
+
attr_reader :additional_properties
|
32
|
+
# @return [Object]
|
33
|
+
attr_reader :_field_set
|
34
|
+
protected :_field_set
|
35
|
+
|
36
|
+
OMIT = Object.new
|
37
|
+
|
38
|
+
# @param is_valid [Boolean] Indicates whether the phone number is valid and capable of receiving
|
39
|
+
# communications.
|
40
|
+
# @param type [Pinnacle::Types::PhoneNumberEnum] Classification of the phone number.
|
41
|
+
# @param formats [Pinnacle::Types::NumberFormat] Different standardized ways the phone number can be formatted for display.
|
42
|
+
# @param location [Pinnacle::Types::BasicPhoneInformationLocation] Geographic and political details where the phone number is registered.
|
43
|
+
# @param carrier [String] The telecommunications carrier or service provider for the number.
|
44
|
+
# @param contact [Pinnacle::Types::BasicPhoneInformationContact] Contact information linked to the phone number registration, if available.
|
45
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
46
|
+
# @return [Pinnacle::Types::BasicPhoneInformation]
|
47
|
+
def initialize(is_valid:, type:, formats:, location:, carrier:, contact:, additional_properties: nil)
|
48
|
+
@is_valid = is_valid
|
49
|
+
@type = type
|
50
|
+
@formats = formats
|
51
|
+
@location = location
|
52
|
+
@carrier = carrier
|
53
|
+
@contact = contact
|
54
|
+
@additional_properties = additional_properties
|
55
|
+
@_field_set = {
|
56
|
+
"isValid": is_valid,
|
57
|
+
"type": type,
|
58
|
+
"formats": formats,
|
59
|
+
"location": location,
|
60
|
+
"carrier": carrier,
|
61
|
+
"contact": contact
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Deserialize a JSON object to an instance of BasicPhoneInformation
|
66
|
+
#
|
67
|
+
# @param json_object [String]
|
68
|
+
# @return [Pinnacle::Types::BasicPhoneInformation]
|
69
|
+
def self.from_json(json_object:)
|
70
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
71
|
+
parsed_json = JSON.parse(json_object)
|
72
|
+
is_valid = parsed_json["isValid"]
|
73
|
+
type = parsed_json["type"]
|
74
|
+
if parsed_json["formats"].nil?
|
75
|
+
formats = nil
|
76
|
+
else
|
77
|
+
formats = parsed_json["formats"].to_json
|
78
|
+
formats = Pinnacle::Types::NumberFormat.from_json(json_object: formats)
|
79
|
+
end
|
80
|
+
if parsed_json["location"].nil?
|
81
|
+
location = nil
|
82
|
+
else
|
83
|
+
location = parsed_json["location"].to_json
|
84
|
+
location = Pinnacle::Types::BasicPhoneInformationLocation.from_json(json_object: location)
|
85
|
+
end
|
86
|
+
carrier = parsed_json["carrier"]
|
87
|
+
if parsed_json["contact"].nil?
|
88
|
+
contact = nil
|
89
|
+
else
|
90
|
+
contact = parsed_json["contact"].to_json
|
91
|
+
contact = Pinnacle::Types::BasicPhoneInformationContact.from_json(json_object: contact)
|
92
|
+
end
|
93
|
+
new(
|
94
|
+
is_valid: is_valid,
|
95
|
+
type: type,
|
96
|
+
formats: formats,
|
97
|
+
location: location,
|
98
|
+
carrier: carrier,
|
99
|
+
contact: contact,
|
100
|
+
additional_properties: struct
|
101
|
+
)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Serialize an instance of BasicPhoneInformation to a JSON object
|
105
|
+
#
|
106
|
+
# @return [String]
|
107
|
+
def to_json(*_args)
|
108
|
+
@_field_set&.to_json
|
109
|
+
end
|
110
|
+
|
111
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
112
|
+
# hash and check each fields type against the current object's property
|
113
|
+
# definitions.
|
114
|
+
#
|
115
|
+
# @param obj [Object]
|
116
|
+
# @return [Void]
|
117
|
+
def self.validate_raw(obj:)
|
118
|
+
obj.is_valid.is_a?(Boolean) != false || raise("Passed value for field obj.is_valid is not the expected type, validation failed.")
|
119
|
+
obj.type.is_a?(Pinnacle::Types::PhoneNumberEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
120
|
+
Pinnacle::Types::NumberFormat.validate_raw(obj: obj.formats)
|
121
|
+
Pinnacle::Types::BasicPhoneInformationLocation.validate_raw(obj: obj.location)
|
122
|
+
obj.carrier.is_a?(String) != false || raise("Passed value for field obj.carrier is not the expected type, validation failed.")
|
123
|
+
Pinnacle::Types::BasicPhoneInformationContact.validate_raw(obj: obj.contact)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|