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,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "phone_enum"
|
4
|
+
require_relative "phone_number_cost"
|
5
|
+
require_relative "phone_feature_enum"
|
6
|
+
require_relative "phone_number_region"
|
7
|
+
require "ostruct"
|
8
|
+
require "json"
|
9
|
+
|
10
|
+
module Pinnacle
|
11
|
+
module Types
|
12
|
+
# Details of a phone number available for purchase.
|
13
|
+
# Includes all essential data required for acquisition and operational planning.
|
14
|
+
class PhoneNumberDetails
|
15
|
+
# @return [String] Phone number in E.164 format.
|
16
|
+
attr_reader :number
|
17
|
+
# @return [Pinnacle::Types::PhoneEnum] Classification that defines the number's billing model and geographic scope.
|
18
|
+
attr_reader :phone_type
|
19
|
+
# @return [Pinnacle::Types::PhoneNumberCost] Pricing details for the phone number.
|
20
|
+
attr_reader :cost
|
21
|
+
# @return [Array<Pinnacle::Types::PhoneFeatureEnum>] Supported communication capabilities associated with the number.
|
22
|
+
attr_reader :features
|
23
|
+
# @return [Pinnacle::Types::PhoneNumberRegion] Geographic and routing information for the phone number.
|
24
|
+
attr_reader :region
|
25
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
attr_reader :additional_properties
|
27
|
+
# @return [Object]
|
28
|
+
attr_reader :_field_set
|
29
|
+
protected :_field_set
|
30
|
+
|
31
|
+
OMIT = Object.new
|
32
|
+
|
33
|
+
# @param number [String] Phone number in E.164 format.
|
34
|
+
# @param phone_type [Pinnacle::Types::PhoneEnum] Classification that defines the number's billing model and geographic scope.
|
35
|
+
# @param cost [Pinnacle::Types::PhoneNumberCost] Pricing details for the phone number.
|
36
|
+
# @param features [Array<Pinnacle::Types::PhoneFeatureEnum>] Supported communication capabilities associated with the number.
|
37
|
+
# @param region [Pinnacle::Types::PhoneNumberRegion] Geographic and routing information for the phone number.
|
38
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
39
|
+
# @return [Pinnacle::Types::PhoneNumberDetails]
|
40
|
+
def initialize(number:, phone_type:, cost:, features:, region:, additional_properties: nil)
|
41
|
+
@number = number
|
42
|
+
@phone_type = phone_type
|
43
|
+
@cost = cost
|
44
|
+
@features = features
|
45
|
+
@region = region
|
46
|
+
@additional_properties = additional_properties
|
47
|
+
@_field_set = {
|
48
|
+
"number": number,
|
49
|
+
"phone_type": phone_type,
|
50
|
+
"cost": cost,
|
51
|
+
"features": features,
|
52
|
+
"region": region
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Deserialize a JSON object to an instance of PhoneNumberDetails
|
57
|
+
#
|
58
|
+
# @param json_object [String]
|
59
|
+
# @return [Pinnacle::Types::PhoneNumberDetails]
|
60
|
+
def self.from_json(json_object:)
|
61
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
62
|
+
parsed_json = JSON.parse(json_object)
|
63
|
+
number = parsed_json["number"]
|
64
|
+
phone_type = parsed_json["phone_type"]
|
65
|
+
if parsed_json["cost"].nil?
|
66
|
+
cost = nil
|
67
|
+
else
|
68
|
+
cost = parsed_json["cost"].to_json
|
69
|
+
cost = Pinnacle::Types::PhoneNumberCost.from_json(json_object: cost)
|
70
|
+
end
|
71
|
+
features = parsed_json["features"]
|
72
|
+
if parsed_json["region"].nil?
|
73
|
+
region = nil
|
74
|
+
else
|
75
|
+
region = parsed_json["region"].to_json
|
76
|
+
region = Pinnacle::Types::PhoneNumberRegion.from_json(json_object: region)
|
77
|
+
end
|
78
|
+
new(
|
79
|
+
number: number,
|
80
|
+
phone_type: phone_type,
|
81
|
+
cost: cost,
|
82
|
+
features: features,
|
83
|
+
region: region,
|
84
|
+
additional_properties: struct
|
85
|
+
)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Serialize an instance of PhoneNumberDetails to a JSON object
|
89
|
+
#
|
90
|
+
# @return [String]
|
91
|
+
def to_json(*_args)
|
92
|
+
@_field_set&.to_json
|
93
|
+
end
|
94
|
+
|
95
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
96
|
+
# hash and check each fields type against the current object's property
|
97
|
+
# definitions.
|
98
|
+
#
|
99
|
+
# @param obj [Object]
|
100
|
+
# @return [Void]
|
101
|
+
def self.validate_raw(obj:)
|
102
|
+
obj.number.is_a?(String) != false || raise("Passed value for field obj.number is not the expected type, validation failed.")
|
103
|
+
obj.phone_type.is_a?(Pinnacle::Types::PhoneEnum) != false || raise("Passed value for field obj.phone_type is not the expected type, validation failed.")
|
104
|
+
Pinnacle::Types::PhoneNumberCost.validate_raw(obj: obj.cost)
|
105
|
+
obj.features.is_a?(Array) != false || raise("Passed value for field obj.features is not the expected type, validation failed.")
|
106
|
+
Pinnacle::Types::PhoneNumberRegion.validate_raw(obj: obj.region)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Pinnacle
|
4
|
+
module Types
|
5
|
+
# The classification of the phone number based on its service type. <br>
|
6
|
+
# Determines the billing, usage, and routing characteristics.
|
7
|
+
class PhoneNumberEnum
|
8
|
+
LANDLINE = "LANDLINE"
|
9
|
+
MOBILE = "MOBILE"
|
10
|
+
SATELLITE = "SATELLITE"
|
11
|
+
PREMIUM = "PREMIUM"
|
12
|
+
PAGING = "PAGING"
|
13
|
+
SPECIAL = "SPECIAL"
|
14
|
+
TOLL_FREE = "TOLL_FREE"
|
15
|
+
UNKNOWN = "UNKNOWN"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Geographic and routing information for the phone number.
|
9
|
+
class PhoneNumberRegion
|
10
|
+
# @return [String] Two-letter country code where the number is registered.
|
11
|
+
attr_reader :country
|
12
|
+
# @return [String] State or province code applicable to local numbers.
|
13
|
+
attr_reader :state
|
14
|
+
# @return [String] Primary city or metropolitan area served by the number.
|
15
|
+
attr_reader :city
|
16
|
+
# @return [String] Telecommunications rate center used for call routing and billing,
|
17
|
+
# defining local calling area boundaries.
|
18
|
+
attr_reader :rate_center
|
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 country [String] Two-letter country code where the number is registered.
|
28
|
+
# @param state [String] State or province code applicable to local numbers.
|
29
|
+
# @param city [String] Primary city or metropolitan area served by the number.
|
30
|
+
# @param rate_center [String] Telecommunications rate center used for call routing and billing,
|
31
|
+
# defining local calling area boundaries.
|
32
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
33
|
+
# @return [Pinnacle::Types::PhoneNumberRegion]
|
34
|
+
def initialize(country:, state: OMIT, city: OMIT, rate_center: OMIT, additional_properties: nil)
|
35
|
+
@country = country
|
36
|
+
@state = state if state != OMIT
|
37
|
+
@city = city if city != OMIT
|
38
|
+
@rate_center = rate_center if rate_center != OMIT
|
39
|
+
@additional_properties = additional_properties
|
40
|
+
@_field_set = {
|
41
|
+
"country": country,
|
42
|
+
"state": state,
|
43
|
+
"city": city,
|
44
|
+
"rateCenter": rate_center
|
45
|
+
}.reject do |_k, v|
|
46
|
+
v == OMIT
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# Deserialize a JSON object to an instance of PhoneNumberRegion
|
51
|
+
#
|
52
|
+
# @param json_object [String]
|
53
|
+
# @return [Pinnacle::Types::PhoneNumberRegion]
|
54
|
+
def self.from_json(json_object:)
|
55
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
56
|
+
parsed_json = JSON.parse(json_object)
|
57
|
+
country = parsed_json["country"]
|
58
|
+
state = parsed_json["state"]
|
59
|
+
city = parsed_json["city"]
|
60
|
+
rate_center = parsed_json["rateCenter"]
|
61
|
+
new(
|
62
|
+
country: country,
|
63
|
+
state: state,
|
64
|
+
city: city,
|
65
|
+
rate_center: rate_center,
|
66
|
+
additional_properties: struct
|
67
|
+
)
|
68
|
+
end
|
69
|
+
|
70
|
+
# Serialize an instance of PhoneNumberRegion to a JSON object
|
71
|
+
#
|
72
|
+
# @return [String]
|
73
|
+
def to_json(*_args)
|
74
|
+
@_field_set&.to_json
|
75
|
+
end
|
76
|
+
|
77
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
78
|
+
# hash and check each fields type against the current object's property
|
79
|
+
# definitions.
|
80
|
+
#
|
81
|
+
# @param obj [Object]
|
82
|
+
# @return [Void]
|
83
|
+
def self.validate_raw(obj:)
|
84
|
+
obj.country.is_a?(String) != false || raise("Passed value for field obj.country is not the expected type, validation failed.")
|
85
|
+
obj.state&.is_a?(String) != false || raise("Passed value for field obj.state is not the expected type, validation failed.")
|
86
|
+
obj.city&.is_a?(String) != false || raise("Passed value for field obj.city is not the expected type, validation failed.")
|
87
|
+
obj.rate_center&.is_a?(String) != false || raise("Passed value for field obj.rate_center is not the expected type, validation failed.")
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "phone_number_status_enum"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Response for get phone number status.
|
10
|
+
class PhoneNumberStatus
|
11
|
+
# @return [Array<String>] List of errors that occured.
|
12
|
+
attr_reader :errors
|
13
|
+
# @return [String] Phone number in E164 format that is in review
|
14
|
+
attr_reader :phone_number
|
15
|
+
# @return [Pinnacle::Types::PhoneNumberStatusEnum] Current status of the phone number. <br>
|
16
|
+
# `PENDING`: Not active during the one or more of the following: purchase pending,
|
17
|
+
# brand or campaign pending verification, and pending assignment to a campaign. To
|
18
|
+
# use a number, make sure to [attach it](../phone-numbers/attach-campaign) to an
|
19
|
+
# active campaign. <br>
|
20
|
+
# `ACTIVE`: Number is ready to send messages. <br>
|
21
|
+
# `FAILURE`: Errors occurred while activating this number. See the [errors
|
22
|
+
# field](phone-number#response.body.errors).
|
23
|
+
attr_reader :status
|
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 errors [Array<String>] List of errors that occured.
|
33
|
+
# @param phone_number [String] Phone number in E164 format that is in review
|
34
|
+
# @param status [Pinnacle::Types::PhoneNumberStatusEnum] Current status of the phone number. <br>
|
35
|
+
# `PENDING`: Not active during the one or more of the following: purchase pending,
|
36
|
+
# brand or campaign pending verification, and pending assignment to a campaign. To
|
37
|
+
# use a number, make sure to [attach it](../phone-numbers/attach-campaign) to an
|
38
|
+
# active campaign. <br>
|
39
|
+
# `ACTIVE`: Number is ready to send messages. <br>
|
40
|
+
# `FAILURE`: Errors occurred while activating this number. See the [errors
|
41
|
+
# field](phone-number#response.body.errors).
|
42
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
43
|
+
# @return [Pinnacle::Types::PhoneNumberStatus]
|
44
|
+
def initialize(errors:, phone_number:, status:, additional_properties: nil)
|
45
|
+
@errors = errors
|
46
|
+
@phone_number = phone_number
|
47
|
+
@status = status
|
48
|
+
@additional_properties = additional_properties
|
49
|
+
@_field_set = { "errors": errors, "phoneNumber": phone_number, "status": status }
|
50
|
+
end
|
51
|
+
|
52
|
+
# Deserialize a JSON object to an instance of PhoneNumberStatus
|
53
|
+
#
|
54
|
+
# @param json_object [String]
|
55
|
+
# @return [Pinnacle::Types::PhoneNumberStatus]
|
56
|
+
def self.from_json(json_object:)
|
57
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
58
|
+
parsed_json = JSON.parse(json_object)
|
59
|
+
errors = parsed_json["errors"]
|
60
|
+
phone_number = parsed_json["phoneNumber"]
|
61
|
+
status = parsed_json["status"]
|
62
|
+
new(
|
63
|
+
errors: errors,
|
64
|
+
phone_number: phone_number,
|
65
|
+
status: status,
|
66
|
+
additional_properties: struct
|
67
|
+
)
|
68
|
+
end
|
69
|
+
|
70
|
+
# Serialize an instance of PhoneNumberStatus to a JSON object
|
71
|
+
#
|
72
|
+
# @return [String]
|
73
|
+
def to_json(*_args)
|
74
|
+
@_field_set&.to_json
|
75
|
+
end
|
76
|
+
|
77
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
78
|
+
# hash and check each fields type against the current object's property
|
79
|
+
# definitions.
|
80
|
+
#
|
81
|
+
# @param obj [Object]
|
82
|
+
# @return [Void]
|
83
|
+
def self.validate_raw(obj:)
|
84
|
+
obj.errors.is_a?(Array) != false || raise("Passed value for field obj.errors is not the expected type, validation failed.")
|
85
|
+
obj.phone_number.is_a?(String) != false || raise("Passed value for field obj.phone_number is not the expected type, validation failed.")
|
86
|
+
obj.status.is_a?(Pinnacle::Types::PhoneNumberStatusEnum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Pinnacle
|
4
|
+
module Types
|
5
|
+
# Current status of the phone number.
|
6
|
+
# `PENDING`: Not active during the one or more of the following: purchase pending,
|
7
|
+
# brand or campaign pending verification, and pending assignment to a campaign.
|
8
|
+
# `ACTIVE`: Number is ready to send messages.
|
9
|
+
# `FAILURE`: Errors occurred while activating this number.
|
10
|
+
class PhoneNumberStatusEnum
|
11
|
+
PENDING = "PENDING"
|
12
|
+
ACTIVE = "ACTIVE"
|
13
|
+
FAILURE = "FAILURE"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class PinnacleFileUploadMetadata
|
9
|
+
# @return [String] Name of the uploaded file.
|
10
|
+
attr_reader :file_name
|
11
|
+
# @return [String] MIME type of the file.
|
12
|
+
attr_reader :content_type
|
13
|
+
# @return [String] Expiration date in ISO 8601 format for file download access.<br>
|
14
|
+
# Null indicates that `download.expiresAt` was not provided and the expiration
|
15
|
+
# time is defaulted to one hour after uploading.
|
16
|
+
attr_reader :expires_at
|
17
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
|
+
attr_reader :additional_properties
|
19
|
+
# @return [Object]
|
20
|
+
attr_reader :_field_set
|
21
|
+
protected :_field_set
|
22
|
+
|
23
|
+
OMIT = Object.new
|
24
|
+
|
25
|
+
# @param file_name [String] Name of the uploaded file.
|
26
|
+
# @param content_type [String] MIME type of the file.
|
27
|
+
# @param expires_at [String] Expiration date in ISO 8601 format for file download access.<br>
|
28
|
+
# Null indicates that `download.expiresAt` was not provided and the expiration
|
29
|
+
# time is defaulted to one hour after uploading.
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
+
# @return [Pinnacle::Types::PinnacleFileUploadMetadata]
|
32
|
+
def initialize(file_name:, content_type:, expires_at: OMIT, additional_properties: nil)
|
33
|
+
@file_name = file_name
|
34
|
+
@content_type = content_type
|
35
|
+
@expires_at = expires_at if expires_at != OMIT
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = {
|
38
|
+
"fileName": file_name,
|
39
|
+
"contentType": content_type,
|
40
|
+
"expiresAt": expires_at
|
41
|
+
}.reject do |_k, v|
|
42
|
+
v == OMIT
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Deserialize a JSON object to an instance of PinnacleFileUploadMetadata
|
47
|
+
#
|
48
|
+
# @param json_object [String]
|
49
|
+
# @return [Pinnacle::Types::PinnacleFileUploadMetadata]
|
50
|
+
def self.from_json(json_object:)
|
51
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
52
|
+
parsed_json = JSON.parse(json_object)
|
53
|
+
file_name = parsed_json["fileName"]
|
54
|
+
content_type = parsed_json["contentType"]
|
55
|
+
expires_at = parsed_json["expiresAt"]
|
56
|
+
new(
|
57
|
+
file_name: file_name,
|
58
|
+
content_type: content_type,
|
59
|
+
expires_at: expires_at,
|
60
|
+
additional_properties: struct
|
61
|
+
)
|
62
|
+
end
|
63
|
+
|
64
|
+
# Serialize an instance of PinnacleFileUploadMetadata to a JSON object
|
65
|
+
#
|
66
|
+
# @return [String]
|
67
|
+
def to_json(*_args)
|
68
|
+
@_field_set&.to_json
|
69
|
+
end
|
70
|
+
|
71
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
72
|
+
# hash and check each fields type against the current object's property
|
73
|
+
# definitions.
|
74
|
+
#
|
75
|
+
# @param obj [Object]
|
76
|
+
# @return [Void]
|
77
|
+
def self.validate_raw(obj:)
|
78
|
+
obj.file_name.is_a?(String) != false || raise("Passed value for field obj.file_name is not the expected type, validation failed.")
|
79
|
+
obj.content_type.is_a?(String) != false || raise("Passed value for field obj.content_type is not the expected type, validation failed.")
|
80
|
+
obj.expires_at&.is_a?(String) != false || raise("Passed value for field obj.expires_at is not the expected type, validation failed.")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class PinnacleUrlConfig
|
9
|
+
# @return [String] Destination URL that your shortened link redirects to.
|
10
|
+
attr_reader :to
|
11
|
+
# @return [String] Expiration date for your shortened link in ISO 8601 format, or null if it's
|
12
|
+
# permanent.
|
13
|
+
attr_reader :expires_at
|
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 to [String] Destination URL that your shortened link redirects to.
|
23
|
+
# @param expires_at [String] Expiration date for your shortened link in ISO 8601 format, or null if it's
|
24
|
+
# permanent.
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [Pinnacle::Types::PinnacleUrlConfig]
|
27
|
+
def initialize(to:, expires_at: OMIT, additional_properties: nil)
|
28
|
+
@to = to
|
29
|
+
@expires_at = expires_at if expires_at != OMIT
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = { "to": to, "expiresAt": expires_at }.reject do |_k, v|
|
32
|
+
v == OMIT
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Deserialize a JSON object to an instance of PinnacleUrlConfig
|
37
|
+
#
|
38
|
+
# @param json_object [String]
|
39
|
+
# @return [Pinnacle::Types::PinnacleUrlConfig]
|
40
|
+
def self.from_json(json_object:)
|
41
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
42
|
+
parsed_json = JSON.parse(json_object)
|
43
|
+
to = parsed_json["to"]
|
44
|
+
expires_at = parsed_json["expiresAt"]
|
45
|
+
new(
|
46
|
+
to: to,
|
47
|
+
expires_at: expires_at,
|
48
|
+
additional_properties: struct
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Serialize an instance of PinnacleUrlConfig to a JSON object
|
53
|
+
#
|
54
|
+
# @return [String]
|
55
|
+
def to_json(*_args)
|
56
|
+
@_field_set&.to_json
|
57
|
+
end
|
58
|
+
|
59
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
60
|
+
# hash and check each fields type against the current object's property
|
61
|
+
# definitions.
|
62
|
+
#
|
63
|
+
# @param obj [Object]
|
64
|
+
# @return [Void]
|
65
|
+
def self.validate_raw(obj:)
|
66
|
+
obj.to.is_a?(String) != false || raise("Passed value for field obj.to is not the expected type, validation failed.")
|
67
|
+
obj.expires_at&.is_a?(String) != false || raise("Passed value for field obj.expires_at is not the expected type, validation failed.")
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Pinnacle
|
4
|
+
module Types
|
5
|
+
# Current review status of the campaign.
|
6
|
+
# `INCOMPLETE`: Not submitted.
|
7
|
+
# `IN REVIEW`: Being reviewed by carriers.
|
8
|
+
# `VERIFIED`: Approved and ready to send messages.
|
9
|
+
# `FAILED`: Issues and errors related to the campaign's details.
|
10
|
+
class ProfileStatusEnum
|
11
|
+
INCOMPLETE = "INCOMPLETE"
|
12
|
+
IN_REVIEW = "IN REVIEW"
|
13
|
+
VERIFIED = "VERIFIED"
|
14
|
+
FAILED = "FAILED"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "buy_response_capabilities"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Details of a phone number that has been successfully purchased and provisioned.
|
10
|
+
# Includes all communication capabilities currently enabled for immediate use.
|
11
|
+
class PurchasedNumber
|
12
|
+
# @return [String] Purchased phone number in E.164 format.
|
13
|
+
attr_reader :number
|
14
|
+
# @return [Pinnacle::Types::BuyResponseCapabilities] Enabled communication features for the phone number.
|
15
|
+
attr_reader :capabilities
|
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 number [String] Purchased phone number in E.164 format.
|
25
|
+
# @param capabilities [Pinnacle::Types::BuyResponseCapabilities] Enabled communication features for the phone number.
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [Pinnacle::Types::PurchasedNumber]
|
28
|
+
def initialize(number:, capabilities:, additional_properties: nil)
|
29
|
+
@number = number
|
30
|
+
@capabilities = capabilities
|
31
|
+
@additional_properties = additional_properties
|
32
|
+
@_field_set = { "number": number, "capabilities": capabilities }
|
33
|
+
end
|
34
|
+
|
35
|
+
# Deserialize a JSON object to an instance of PurchasedNumber
|
36
|
+
#
|
37
|
+
# @param json_object [String]
|
38
|
+
# @return [Pinnacle::Types::PurchasedNumber]
|
39
|
+
def self.from_json(json_object:)
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
+
parsed_json = JSON.parse(json_object)
|
42
|
+
number = parsed_json["number"]
|
43
|
+
if parsed_json["capabilities"].nil?
|
44
|
+
capabilities = nil
|
45
|
+
else
|
46
|
+
capabilities = parsed_json["capabilities"].to_json
|
47
|
+
capabilities = Pinnacle::Types::BuyResponseCapabilities.from_json(json_object: capabilities)
|
48
|
+
end
|
49
|
+
new(
|
50
|
+
number: number,
|
51
|
+
capabilities: capabilities,
|
52
|
+
additional_properties: struct
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Serialize an instance of PurchasedNumber to a JSON object
|
57
|
+
#
|
58
|
+
# @return [String]
|
59
|
+
def to_json(*_args)
|
60
|
+
@_field_set&.to_json
|
61
|
+
end
|
62
|
+
|
63
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
64
|
+
# hash and check each fields type against the current object's property
|
65
|
+
# definitions.
|
66
|
+
#
|
67
|
+
# @param obj [Object]
|
68
|
+
# @return [Void]
|
69
|
+
def self.validate_raw(obj:)
|
70
|
+
obj.number.is_a?(String) != false || raise("Passed value for field obj.number is not the expected type, validation failed.")
|
71
|
+
Pinnacle::Types::BuyResponseCapabilities.validate_raw(obj: obj.capabilities)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
require_relative "rcs_text"
|
5
|
+
require_relative "rcs_media"
|
6
|
+
require_relative "rcs_card"
|
7
|
+
|
8
|
+
module Pinnacle
|
9
|
+
module Types
|
10
|
+
class Rcs
|
11
|
+
# Deserialize a JSON object to an instance of Rcs
|
12
|
+
#
|
13
|
+
# @param json_object [String]
|
14
|
+
# @return [Pinnacle::Types::Rcs]
|
15
|
+
def self.from_json(json_object:)
|
16
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
17
|
+
begin
|
18
|
+
Pinnacle::Types::RcsText.validate_raw(obj: struct)
|
19
|
+
return Pinnacle::Types::RcsText.from_json(json_object: struct) unless struct.nil?
|
20
|
+
|
21
|
+
return nil
|
22
|
+
rescue StandardError
|
23
|
+
# noop
|
24
|
+
end
|
25
|
+
begin
|
26
|
+
Pinnacle::Types::RcsMedia.validate_raw(obj: struct)
|
27
|
+
return Pinnacle::Types::RcsMedia.from_json(json_object: struct) unless struct.nil?
|
28
|
+
|
29
|
+
return nil
|
30
|
+
rescue StandardError
|
31
|
+
# noop
|
32
|
+
end
|
33
|
+
begin
|
34
|
+
Pinnacle::Types::RcsCard.validate_raw(obj: struct)
|
35
|
+
return Pinnacle::Types::RcsCard.from_json(json_object: struct) unless struct.nil?
|
36
|
+
|
37
|
+
return nil
|
38
|
+
rescue StandardError
|
39
|
+
# noop
|
40
|
+
end
|
41
|
+
struct
|
42
|
+
end
|
43
|
+
|
44
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
45
|
+
# hash and check each fields type against the current object's property
|
46
|
+
# definitions.
|
47
|
+
#
|
48
|
+
# @param obj [Object]
|
49
|
+
# @return [Void]
|
50
|
+
def self.validate_raw(obj:)
|
51
|
+
begin
|
52
|
+
return Pinnacle::Types::RcsText.validate_raw(obj: obj)
|
53
|
+
rescue StandardError
|
54
|
+
# noop
|
55
|
+
end
|
56
|
+
begin
|
57
|
+
return Pinnacle::Types::RcsMedia.validate_raw(obj: obj)
|
58
|
+
rescue StandardError
|
59
|
+
# noop
|
60
|
+
end
|
61
|
+
begin
|
62
|
+
return Pinnacle::Types::RcsCard.validate_raw(obj: obj)
|
63
|
+
rescue StandardError
|
64
|
+
# noop
|
65
|
+
end
|
66
|
+
raise("Passed value matched no type within the union, validation failed.")
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|