rcs 1.0.18 → 2.0.0.pre.rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/environment.rb +1 -1
- data/lib/rcs/brands/client.rb +631 -0
- data/lib/rcs/brands/types/autofill_brand_schema_options.rb +61 -0
- data/lib/rcs/brands/types/brand_contact.rb +84 -0
- data/lib/rcs/campaigns/client.rb +44 -0
- data/lib/rcs/campaigns/dlc/client.rb +480 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords.rb +99 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_help.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_in.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_out.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_links.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_options.rb +110 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_use_case.rb +76 -0
- data/lib/rcs/campaigns/rcs/client.rb +457 -0
- data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +155 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent.rb +140 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_emails_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_phones_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_websites_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_links.rb +74 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_in.rb +75 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_out.rb +76 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_use_case.rb +75 -0
- data/lib/rcs/campaigns/toll_free/client.rb +429 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +130 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_opt_in.rb +86 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_use_case.rb +75 -0
- data/lib/rcs/contacts/client.rb +275 -0
- data/lib/rcs/conversations/client.rb +273 -0
- data/lib/rcs/message/client.rb +30 -0
- data/lib/rcs/message/sms/client.rb +96 -0
- data/lib/rcs/messages/client.rb +185 -0
- data/lib/rcs/messages/mms/client.rb +98 -0
- data/lib/rcs/messages/rcs/client.rb +94 -0
- data/lib/rcs/messages/send/client.rb +318 -0
- data/lib/rcs/messages/send/types/send_mms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_mms_schema_options.rb +108 -0
- data/lib/rcs/messages/send/types/send_rcs_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_schema_options.rb +81 -0
- data/lib/rcs/messages/types/message_reaction_schema_options.rb +71 -0
- data/lib/rcs/phone_numbers/campaign/client.rb +179 -0
- data/lib/rcs/phone_numbers/client.rb +345 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_level.rb +16 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options.rb +93 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options_enhanced_contact_info.rb +64 -0
- data/lib/rcs/phone_numbers/types/phone_numbers_get_response.rb +58 -0
- data/lib/rcs/phone_numbers/types/search_schema_location.rb +96 -0
- data/lib/rcs/phone_numbers/types/search_schema_number.rb +81 -0
- data/lib/rcs/phone_numbers/types/search_schema_options.rb +62 -0
- data/lib/rcs/phone_numbers/webhook/client.rb +191 -0
- data/lib/rcs/status/client.rb +30 -0
- data/lib/rcs/status/get/client.rb +367 -0
- data/lib/rcs/tools/client.rb +32 -199
- data/lib/rcs/tools/contact_card/client.rb +285 -0
- data/lib/rcs/tools/contact_card/types/get_v_card_schema_options.rb +67 -0
- data/lib/rcs/tools/file/client.rb +138 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options.rb +70 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options_download.rb +66 -0
- data/lib/rcs/tools/url/client.rb +245 -0
- data/lib/rcs/types/advanced_phone_information.rb +147 -0
- data/lib/rcs/types/advanced_phone_information_carrier.rb +90 -0
- data/lib/rcs/types/advanced_phone_information_contact.rb +146 -0
- data/lib/rcs/types/advanced_phone_information_location.rb +142 -0
- data/lib/rcs/types/advanced_phone_information_location_coordinates.rb +73 -0
- data/lib/rcs/types/advanced_phone_information_location_country.rb +77 -0
- data/lib/rcs/types/advanced_phone_information_type.rb +97 -0
- data/lib/rcs/types/advanced_phone_information_type_recommendation.rb +15 -0
- data/lib/rcs/types/agent.rb +68 -0
- data/lib/rcs/types/attach_webhook_params.rb +60 -0
- data/lib/rcs/types/attach_webhook_response_webhook.rb +86 -0
- data/lib/rcs/types/attach_webhook_schema_name.rb +88 -0
- data/lib/rcs/types/attach_webhook_schema_webhook_id.rb +77 -0
- data/lib/rcs/types/attached_phone_number_result.rb +75 -0
- data/lib/rcs/types/autofill_campaign_params.rb +69 -0
- data/lib/rcs/types/autofill_dlc_campaign_response.rb +169 -0
- data/lib/rcs/types/autofill_dlc_response_keywords.rb +95 -0
- data/lib/rcs/types/autofill_dlc_response_keywords_help.rb +70 -0
- data/lib/rcs/{send/types/send_sms_response.rb → types/autofill_dlc_response_keywords_opt_in.rb} +18 -17
- data/lib/rcs/types/autofill_dlc_response_keywords_opt_out.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_links.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_options.rb +106 -0
- data/lib/rcs/types/autofill_dlc_response_use_case.rb +72 -0
- data/lib/rcs/types/bad_request_error_body.rb +44 -45
- data/lib/rcs/types/basic_phone_information.rb +127 -0
- data/lib/rcs/{company/types/company_register_response_brand.rb → types/basic_phone_information_contact.rb} +12 -21
- data/lib/rcs/types/basic_phone_information_location.rb +74 -0
- data/lib/rcs/types/basic_phone_information_location_country.rb +75 -0
- data/lib/rcs/types/brand_status.rb +92 -0
- data/lib/rcs/types/brand_status_enum.rb +21 -0
- data/lib/rcs/types/buy_response_capabilities.rb +77 -0
- data/lib/rcs/types/campaign_enum.rb +15 -0
- data/lib/rcs/types/campaign_query.rb +69 -0
- data/lib/rcs/{company/types/company_register_request_company_id.rb → types/campaign_submission_result.rb} +15 -16
- data/lib/rcs/types/campaign_validation_response_errors_item.rb +76 -0
- data/lib/rcs/types/campaign_validation_result.rb +71 -0
- data/lib/rcs/types/click_action.rb +73 -0
- data/lib/rcs/types/click_action_data.rb +56 -0
- data/lib/rcs/types/click_action_data_metadata.rb +69 -0
- data/lib/rcs/types/company_sector_enum.rb +26 -0
- data/lib/rcs/types/company_type_enum.rb +14 -0
- data/lib/rcs/types/configured_webhook.rb +85 -0
- data/lib/rcs/types/contact.rb +105 -0
- data/lib/rcs/types/contact_id.rb +57 -0
- data/lib/rcs/types/conversation.rb +146 -0
- data/lib/rcs/types/conversation_contact.rb +68 -0
- data/lib/rcs/types/conversation_list.rb +79 -0
- data/lib/rcs/types/conversation_sender.rb +60 -0
- data/lib/rcs/types/create_url_options.rb +61 -0
- data/lib/rcs/types/detached_phone_number_result.rb +75 -0
- data/lib/rcs/types/detached_webhook_info.rb +74 -0
- data/lib/rcs/types/detailed_phone_number_enum.rb +25 -0
- data/lib/rcs/types/dlc_assignment_status_enum.rb +19 -0
- data/lib/rcs/types/dlc_campaign_status.rb +107 -0
- data/lib/rcs/types/dlc_campaign_use_case_enum.rb +35 -0
- data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +194 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords.rb +94 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_help.rb +72 -0
- data/lib/rcs/{send/types/send_mms_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_in.rb} +20 -17
- data/lib/rcs/{send/types/send_rcs_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_out.rb} +20 -17
- data/lib/rcs/types/dlc_with_extended_brand_and_status_links.rb +70 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_options.rb +106 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_use_case.rb +72 -0
- data/lib/rcs/types/enhanced_contact.rb +9 -0
- data/lib/rcs/types/enhanced_contact_item.rb +104 -0
- data/lib/rcs/types/error.rb +61 -0
- data/lib/rcs/types/extended_brand.rb +194 -0
- data/lib/rcs/types/extended_brand_with_vetting.rb +226 -0
- data/lib/rcs/types/extended_rcs_campaign.rb +173 -0
- data/lib/rcs/{company/types/company_register_request.rb → types/get_conversation_params.rb} +13 -12
- data/lib/rcs/types/get_conversation_request_id.rb +58 -0
- data/lib/rcs/types/get_conversation_request_recipient.rb +72 -0
- data/lib/rcs/types/get_dlc_campaign_status_response_updates.rb +96 -0
- data/lib/rcs/types/get_toll_free_campaign_status_response_updates.rb +92 -0
- data/lib/rcs/types/inbound_button.rb +56 -0
- data/lib/rcs/types/link_click_event.rb +465 -0
- data/lib/rcs/{company/types/company_update_response.rb → types/location_share_action.rb} +19 -19
- data/lib/rcs/types/location_share_action_data.rb +89 -0
- data/lib/rcs/types/message.rb +174 -0
- data/lib/rcs/types/message_content.rb +85 -0
- data/lib/rcs/types/message_method_enum.rb +12 -0
- data/lib/rcs/types/message_protocol_enum.rb +12 -0
- data/lib/rcs/types/message_schedule.rb +94 -0
- data/lib/rcs/types/message_status_enum.rb +16 -0
- data/lib/rcs/types/message_volume_enum.rb +20 -0
- data/lib/rcs/types/messaging_profile_enum.rb +11 -0
- data/lib/rcs/types/mms_content.rb +74 -0
- data/lib/rcs/types/mms_validation_response_segments.rb +85 -0
- data/lib/rcs/types/mms_validation_response_segments_value_item.rb +75 -0
- data/lib/rcs/types/mms_validation_result.rb +82 -0
- data/lib/rcs/types/nullable_contact.rb +84 -0
- data/lib/rcs/types/number_format.rb +79 -0
- data/lib/rcs/types/opt_in_method_enum.rb +13 -0
- data/lib/rcs/types/optional_brand_info.rb +145 -0
- data/lib/rcs/types/optional_contact.rb +83 -0
- data/lib/rcs/types/optional_contacts.rb +84 -0
- data/lib/rcs/types/phone.rb +101 -0
- data/lib/rcs/types/phone_capabilities.rb +75 -0
- data/lib/rcs/types/phone_enum.rb +13 -0
- data/lib/rcs/types/phone_feature_enum.rb +18 -0
- data/lib/rcs/types/phone_number_campaign_attach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_campaign_detach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_cost.rb +75 -0
- data/lib/rcs/types/phone_number_details.rb +110 -0
- data/lib/rcs/types/phone_number_enum.rb +18 -0
- data/lib/rcs/types/phone_number_region.rb +91 -0
- data/lib/rcs/types/phone_number_status.rb +90 -0
- data/lib/rcs/types/phone_number_status_enum.rb +16 -0
- data/lib/rcs/types/pinnacle_file_upload_metadata.rb +84 -0
- data/lib/rcs/types/pinnacle_url_config.rb +71 -0
- data/lib/rcs/types/profile_status_enum.rb +17 -0
- data/lib/rcs/types/purchased_number.rb +75 -0
- data/lib/rcs/types/rcs.rb +70 -0
- data/lib/rcs/types/rcs_base.rb +82 -0
- data/lib/rcs/types/rcs_base_options.rb +100 -0
- data/lib/rcs/types/rcs_button_call.rb +68 -0
- data/lib/rcs/types/rcs_button_content.rb +148 -0
- data/lib/rcs/types/rcs_button_open_url.rb +68 -0
- data/lib/rcs/types/rcs_button_request_user_location.rb +58 -0
- data/lib/rcs/types/rcs_button_schedule_event.rb +98 -0
- data/lib/rcs/types/rcs_button_send_location.rb +74 -0
- data/lib/rcs/types/rcs_button_send_location_lat_long.rb +68 -0
- data/lib/rcs/types/rcs_button_trigger.rb +78 -0
- data/lib/rcs/types/rcs_campaign.rb +143 -0
- data/lib/rcs/types/rcs_campaign_opt_in_method_enum.rb +15 -0
- data/lib/rcs/types/rcs_campaign_schema_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_emails_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_phones_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_websites_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_emails_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_phones_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_websites_item.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_status.rb +86 -0
- data/lib/rcs/types/rcs_campaign_use_case_enum.rb +23 -0
- data/lib/rcs/types/rcs_card.rb +110 -0
- data/lib/rcs/types/rcs_cards.rb +79 -0
- data/lib/rcs/types/rcs_cards_cards_item.rb +88 -0
- data/lib/rcs/types/rcs_cards_content.rb +79 -0
- data/lib/rcs/types/rcs_cards_content_cards_item.rb +94 -0
- data/lib/rcs/types/rcs_content.rb +72 -0
- data/lib/rcs/types/rcs_media.rb +110 -0
- data/lib/rcs/types/rcs_media_content.rb +81 -0
- data/lib/rcs/types/rcs_media_details_content.rb +77 -0
- data/lib/rcs/types/rcs_text.rb +106 -0
- data/lib/rcs/types/rcs_text_content.rb +72 -0
- data/lib/rcs/types/rcs_validate_content.rb +70 -0
- data/lib/rcs/{company/types/company_register_response.rb → types/rcs_validate_content_media.rb} +19 -21
- data/lib/rcs/types/rcs_validation_result.rb +76 -0
- data/lib/rcs/types/reaction_result.rb +67 -0
- data/lib/rcs/types/scheduled_messaage.rb +73 -0
- data/lib/rcs/types/scheduled_send_response_config.rb +89 -0
- data/lib/rcs/types/send_sms_response_segments.rb +69 -0
- data/lib/rcs/types/send_sms_response_segments_encoding.rb +11 -0
- data/lib/rcs/types/sent_mms_details.rb +102 -0
- data/lib/rcs/types/sent_rcs_details.rb +105 -0
- data/lib/rcs/types/sent_sms_details.rb +108 -0
- data/lib/rcs/types/shortened_url.rb +77 -0
- data/lib/rcs/types/shortened_url_with_click_data.rb +90 -0
- data/lib/rcs/types/sms_content.rb +58 -0
- data/lib/rcs/types/sms_validation_response_segments.rb +80 -0
- data/lib/rcs/types/sms_validation_response_segments_gsm_7.rb +75 -0
- data/lib/rcs/types/sms_validation_response_segments_utf_16.rb +68 -0
- data/lib/rcs/types/sms_validation_response_total.rb +75 -0
- data/lib/rcs/types/sms_validation_result.rb +102 -0
- data/lib/rcs/types/sub_use_case_enum.rb +19 -0
- data/lib/rcs/types/submission_results.rb +57 -0
- data/lib/rcs/types/successful_conversation_update.rb +58 -0
- data/lib/rcs/types/toll_free_campaign.rb +118 -0
- data/lib/rcs/types/toll_free_campaign_schema_opt_in.rb +78 -0
- data/lib/rcs/types/toll_free_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/toll_free_campaign_status.rb +91 -0
- data/lib/rcs/types/toll_free_campaign_use_case_enum.rb +52 -0
- data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +155 -0
- data/lib/rcs/types/toll_free_status_enum.rb +20 -0
- data/lib/rcs/types/tracking.rb +17 -0
- data/lib/rcs/types/updated_contact_id.rb +57 -0
- data/lib/rcs/types/upload_results.rb +80 -0
- data/lib/rcs/types/v_card_address_schema_type_item.rb +15 -0
- data/lib/rcs/types/v_card_data.rb +237 -0
- data/lib/rcs/types/v_card_data_file.rb +74 -0
- data/lib/rcs/types/v_card_data_file_metadata.rb +62 -0
- data/lib/rcs/types/v_card_email_schema_type_item.rb +21 -0
- data/lib/rcs/types/v_card_geo.rb +70 -0
- data/lib/rcs/types/v_card_name.rb +98 -0
- data/lib/rcs/types/v_card_organization.rb +70 -0
- data/lib/rcs/types/v_card_phone_schema_type_item.rb +21 -0
- data/lib/rcs/types/validate_campaign_params.rb +69 -0
- data/lib/rcs/types/validation_error_details.rb +76 -0
- data/lib/rcs/types/validation_results.rb +71 -0
- data/lib/rcs/types/vcard.rb +215 -0
- data/lib/rcs/types/vcard_address.rb +130 -0
- data/lib/rcs/types/vcard_content.rb +223 -0
- data/lib/rcs/types/vcard_email.rb +70 -0
- data/lib/rcs/types/vcard_phone.rb +70 -0
- data/lib/rcs/types/vcard_resource.rb +71 -0
- data/lib/rcs/types/vetting_feedback.rb +81 -0
- data/lib/rcs/types/vetting_history.rb +98 -0
- data/lib/rcs/types/vetting_history_vetting_status.rb +13 -0
- data/lib/rcs/types/vetting_results.rb +57 -0
- data/lib/rcs/types/webhook_event_enum.rb +13 -0
- data/lib/rcs/types/webhook_result.rb +64 -0
- data/lib/rcs/{company/types/company_update_response_brand.rb → types/webhooks.rb} +25 -17
- data/lib/rcs/types/zod_error.rb +73 -0
- data/lib/rcs/webhooks/client.rb +93 -0
- data/lib/rcs.rb +67 -83
- data/lib/requests.rb +4 -4
- data/lib/types_export.rb +252 -46
- metadata +278 -52
- data/lib/rcs/company/client.rb +0 -375
- data/lib/rcs/company/types/company_register_request_company.rb +0 -128
- data/lib/rcs/send/client.rb +0 -382
- data/lib/rcs/send/types/rcs_fallback.rb +0 -84
- data/lib/rcs/tools/types/tools_shorten_url_response.rb +0 -70
- data/lib/rcs/tools/types/tools_upload_url_response.rb +0 -69
- data/lib/rcs/types/action.rb +0 -154
- data/lib/rcs/types/action_lat_long.rb +0 -68
- data/lib/rcs/types/action_type.rb +0 -16
- data/lib/rcs/types/additional_email.rb +0 -65
- data/lib/rcs/types/additional_phone_number.rb +0 -65
- data/lib/rcs/types/additional_website.rb +0 -65
- data/lib/rcs/types/card.rb +0 -90
- data/lib/rcs/types/company.rb +0 -319
- data/lib/rcs/types/company_additional_emails_item.rb +0 -67
- data/lib/rcs/types/company_additional_phone_numbers_item.rb +0 -67
- data/lib/rcs/types/company_additional_websites_item.rb +0 -67
- data/lib/rcs/types/company_category.rb +0 -20
- data/lib/rcs/types/company_contact.rb +0 -117
- data/lib/rcs/types/company_details.rb +0 -120
- data/lib/rcs/types/forbidden_error_body.rb +0 -57
- data/lib/rcs/types/inbound_action_message.rb +0 -117
- data/lib/rcs/types/inbound_location_message.rb +0 -106
- data/lib/rcs/types/inbound_location_message_coordinates.rb +0 -65
- data/lib/rcs/types/inbound_media_message.rb +0 -112
- data/lib/rcs/types/inbound_message.rb +0 -88
- data/lib/rcs/types/inbound_message_message_type.rb +0 -10
- data/lib/rcs/types/inbound_message_metadata.rb +0 -79
- data/lib/rcs/types/inbound_text_message.rb +0 -100
- data/lib/rcs/types/internal_server_error_body.rb +0 -57
- data/lib/rcs/types/media_payload.rb +0 -65
- data/lib/rcs/types/message_metadata.rb +0 -56
- data/lib/rcs/types/messaging.rb +0 -95
- data/lib/rcs/types/optionals.rb +0 -99
- data/lib/rcs/types/payment_required_error_body.rb +0 -57
- data/lib/rcs/types/point_of_contact.rb +0 -72
- data/lib/rcs/types/rcs_functionalities.rb +0 -117
- data/lib/rcs/types/sender_metadata.rb +0 -74
- data/lib/rcs/types/unauthorized_error_body.rb +0 -57
@@ -0,0 +1,146 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "campaign_query"
|
4
|
+
require_relative "conversation_contact"
|
5
|
+
require_relative "conversation_sender"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module Pinnacle
|
10
|
+
module Types
|
11
|
+
# Conversation that was found.
|
12
|
+
class Conversation
|
13
|
+
# @return [Integer] Identifier for the brand associated with this conversation.
|
14
|
+
attr_reader :brand_id
|
15
|
+
# @return [Pinnacle::Types::CampaignQuery] Campaign information if this conversation is part of a marketing campaign.
|
16
|
+
attr_reader :campaign
|
17
|
+
# @return [Pinnacle::Types::ConversationContact] Contact information for the recipient in a conversation.
|
18
|
+
attr_reader :contact
|
19
|
+
# @return [String] ISO 8601 timestamp when the conversation was created.
|
20
|
+
attr_reader :created_at
|
21
|
+
# @return [Integer] Unique identifier for the conversation.
|
22
|
+
attr_reader :id
|
23
|
+
# @return [String] Free-form notes or comments about the conversation.
|
24
|
+
attr_reader :notes
|
25
|
+
# @return [Pinnacle::Types::ConversationSender] The sender of messages in this conversation. Can be:
|
26
|
+
# - A phone number with its capabilities and metadata
|
27
|
+
# - An RCS agent with ID and name
|
28
|
+
# - `null` if no sender is associated
|
29
|
+
attr_reader :sender
|
30
|
+
# @return [String] ISO 8601 timestamp when the conversation was last updated.
|
31
|
+
attr_reader :updated_at
|
32
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
33
|
+
attr_reader :additional_properties
|
34
|
+
# @return [Object]
|
35
|
+
attr_reader :_field_set
|
36
|
+
protected :_field_set
|
37
|
+
|
38
|
+
OMIT = Object.new
|
39
|
+
|
40
|
+
# @param brand_id [Integer] Identifier for the brand associated with this conversation.
|
41
|
+
# @param campaign [Pinnacle::Types::CampaignQuery] Campaign information if this conversation is part of a marketing campaign.
|
42
|
+
# @param contact [Pinnacle::Types::ConversationContact] Contact information for the recipient in a conversation.
|
43
|
+
# @param created_at [String] ISO 8601 timestamp when the conversation was created.
|
44
|
+
# @param id [Integer] Unique identifier for the conversation.
|
45
|
+
# @param notes [String] Free-form notes or comments about the conversation.
|
46
|
+
# @param sender [Pinnacle::Types::ConversationSender] The sender of messages in this conversation. Can be:
|
47
|
+
# - A phone number with its capabilities and metadata
|
48
|
+
# - An RCS agent with ID and name
|
49
|
+
# - `null` if no sender is associated
|
50
|
+
# @param updated_at [String] ISO 8601 timestamp when the conversation was last updated.
|
51
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
52
|
+
# @return [Pinnacle::Types::Conversation]
|
53
|
+
def initialize(contact:, created_at:, id:, notes:, updated_at:, brand_id: OMIT, campaign: OMIT, sender: OMIT,
|
54
|
+
additional_properties: nil)
|
55
|
+
@brand_id = brand_id if brand_id != OMIT
|
56
|
+
@campaign = campaign if campaign != OMIT
|
57
|
+
@contact = contact
|
58
|
+
@created_at = created_at
|
59
|
+
@id = id
|
60
|
+
@notes = notes
|
61
|
+
@sender = sender if sender != OMIT
|
62
|
+
@updated_at = updated_at
|
63
|
+
@additional_properties = additional_properties
|
64
|
+
@_field_set = {
|
65
|
+
"brandId": brand_id,
|
66
|
+
"campaign": campaign,
|
67
|
+
"contact": contact,
|
68
|
+
"createdAt": created_at,
|
69
|
+
"id": id,
|
70
|
+
"notes": notes,
|
71
|
+
"sender": sender,
|
72
|
+
"updatedAt": updated_at
|
73
|
+
}.reject do |_k, v|
|
74
|
+
v == OMIT
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Deserialize a JSON object to an instance of Conversation
|
79
|
+
#
|
80
|
+
# @param json_object [String]
|
81
|
+
# @return [Pinnacle::Types::Conversation]
|
82
|
+
def self.from_json(json_object:)
|
83
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
84
|
+
parsed_json = JSON.parse(json_object)
|
85
|
+
brand_id = parsed_json["brandId"]
|
86
|
+
if parsed_json["campaign"].nil?
|
87
|
+
campaign = nil
|
88
|
+
else
|
89
|
+
campaign = parsed_json["campaign"].to_json
|
90
|
+
campaign = Pinnacle::Types::CampaignQuery.from_json(json_object: campaign)
|
91
|
+
end
|
92
|
+
if parsed_json["contact"].nil?
|
93
|
+
contact = nil
|
94
|
+
else
|
95
|
+
contact = parsed_json["contact"].to_json
|
96
|
+
contact = Pinnacle::Types::ConversationContact.from_json(json_object: contact)
|
97
|
+
end
|
98
|
+
created_at = parsed_json["createdAt"]
|
99
|
+
id = parsed_json["id"]
|
100
|
+
notes = parsed_json["notes"]
|
101
|
+
if parsed_json["sender"].nil?
|
102
|
+
sender = nil
|
103
|
+
else
|
104
|
+
sender = parsed_json["sender"].to_json
|
105
|
+
sender = Pinnacle::Types::ConversationSender.from_json(json_object: sender)
|
106
|
+
end
|
107
|
+
updated_at = parsed_json["updatedAt"]
|
108
|
+
new(
|
109
|
+
brand_id: brand_id,
|
110
|
+
campaign: campaign,
|
111
|
+
contact: contact,
|
112
|
+
created_at: created_at,
|
113
|
+
id: id,
|
114
|
+
notes: notes,
|
115
|
+
sender: sender,
|
116
|
+
updated_at: updated_at,
|
117
|
+
additional_properties: struct
|
118
|
+
)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Serialize an instance of Conversation to a JSON object
|
122
|
+
#
|
123
|
+
# @return [String]
|
124
|
+
def to_json(*_args)
|
125
|
+
@_field_set&.to_json
|
126
|
+
end
|
127
|
+
|
128
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
129
|
+
# hash and check each fields type against the current object's property
|
130
|
+
# definitions.
|
131
|
+
#
|
132
|
+
# @param obj [Object]
|
133
|
+
# @return [Void]
|
134
|
+
def self.validate_raw(obj:)
|
135
|
+
obj.brand_id&.is_a?(Integer) != false || raise("Passed value for field obj.brand_id is not the expected type, validation failed.")
|
136
|
+
obj.campaign.nil? || Pinnacle::Types::CampaignQuery.validate_raw(obj: obj.campaign)
|
137
|
+
Pinnacle::Types::ConversationContact.validate_raw(obj: obj.contact)
|
138
|
+
obj.created_at.is_a?(String) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
|
139
|
+
obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
140
|
+
obj.notes.is_a?(String) != false || raise("Passed value for field obj.notes is not the expected type, validation failed.")
|
141
|
+
obj.sender.nil? || Pinnacle::Types::ConversationSender.validate_raw(obj: obj.sender)
|
142
|
+
obj.updated_at.is_a?(String) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.")
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
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
|
+
# Contact information for the recipient in a conversation.
|
9
|
+
class ConversationContact
|
10
|
+
# @return [Integer] Unique identifier for the contact.
|
11
|
+
attr_reader :id
|
12
|
+
# @return [String] The contact's phone number in E.164 format.
|
13
|
+
attr_reader :phone_number
|
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 id [Integer] Unique identifier for the contact.
|
23
|
+
# @param phone_number [String] The contact's phone number in E.164 format.
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [Pinnacle::Types::ConversationContact]
|
26
|
+
def initialize(id:, phone_number:, additional_properties: nil)
|
27
|
+
@id = id
|
28
|
+
@phone_number = phone_number
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "id": id, "phoneNumber": phone_number }
|
31
|
+
end
|
32
|
+
|
33
|
+
# Deserialize a JSON object to an instance of ConversationContact
|
34
|
+
#
|
35
|
+
# @param json_object [String]
|
36
|
+
# @return [Pinnacle::Types::ConversationContact]
|
37
|
+
def self.from_json(json_object:)
|
38
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
39
|
+
parsed_json = JSON.parse(json_object)
|
40
|
+
id = parsed_json["id"]
|
41
|
+
phone_number = parsed_json["phoneNumber"]
|
42
|
+
new(
|
43
|
+
id: id,
|
44
|
+
phone_number: phone_number,
|
45
|
+
additional_properties: struct
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Serialize an instance of ConversationContact 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.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
64
|
+
obj.phone_number.is_a?(String) != false || raise("Passed value for field obj.phone_number is not the expected type, validation failed.")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "conversation"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Response for list conversation.
|
10
|
+
class ConversationList
|
11
|
+
# @return [Integer] Total number of conversations matching the filter.
|
12
|
+
attr_reader :count
|
13
|
+
# @return [Array<Pinnacle::Types::Conversation>]
|
14
|
+
attr_reader :conversations
|
15
|
+
# @return [Boolean] Indicates if more conversations are available beyond the current page.
|
16
|
+
attr_reader :has_more
|
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 count [Integer] Total number of conversations matching the filter.
|
26
|
+
# @param conversations [Array<Pinnacle::Types::Conversation>]
|
27
|
+
# @param has_more [Boolean] Indicates if more conversations are available beyond the current page.
|
28
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
# @return [Pinnacle::Types::ConversationList]
|
30
|
+
def initialize(count:, conversations:, has_more:, additional_properties: nil)
|
31
|
+
@count = count
|
32
|
+
@conversations = conversations
|
33
|
+
@has_more = has_more
|
34
|
+
@additional_properties = additional_properties
|
35
|
+
@_field_set = { "count": count, "conversations": conversations, "hasMore": has_more }
|
36
|
+
end
|
37
|
+
|
38
|
+
# Deserialize a JSON object to an instance of ConversationList
|
39
|
+
#
|
40
|
+
# @param json_object [String]
|
41
|
+
# @return [Pinnacle::Types::ConversationList]
|
42
|
+
def self.from_json(json_object:)
|
43
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
44
|
+
parsed_json = JSON.parse(json_object)
|
45
|
+
count = parsed_json["count"]
|
46
|
+
conversations = parsed_json["conversations"]&.map do |item|
|
47
|
+
item = item.to_json
|
48
|
+
Pinnacle::Types::Conversation.from_json(json_object: item)
|
49
|
+
end
|
50
|
+
has_more = parsed_json["hasMore"]
|
51
|
+
new(
|
52
|
+
count: count,
|
53
|
+
conversations: conversations,
|
54
|
+
has_more: has_more,
|
55
|
+
additional_properties: struct
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Serialize an instance of ConversationList to a JSON object
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
def to_json(*_args)
|
63
|
+
@_field_set&.to_json
|
64
|
+
end
|
65
|
+
|
66
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
67
|
+
# hash and check each fields type against the current object's property
|
68
|
+
# definitions.
|
69
|
+
#
|
70
|
+
# @param obj [Object]
|
71
|
+
# @return [Void]
|
72
|
+
def self.validate_raw(obj:)
|
73
|
+
obj.count.is_a?(Integer) != false || raise("Passed value for field obj.count is not the expected type, validation failed.")
|
74
|
+
obj.conversations.is_a?(Array) != false || raise("Passed value for field obj.conversations is not the expected type, validation failed.")
|
75
|
+
obj.has_more.is_a?(Boolean) != false || raise("Passed value for field obj.has_more is not the expected type, validation failed.")
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
require_relative "phone"
|
5
|
+
require_relative "agent"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# The sender of messages in this conversation. Can be:
|
10
|
+
# - A phone number with its capabilities and metadata
|
11
|
+
# - An RCS agent with ID and name
|
12
|
+
# - `null` if no sender is associated
|
13
|
+
class ConversationSender
|
14
|
+
# Deserialize a JSON object to an instance of ConversationSender
|
15
|
+
#
|
16
|
+
# @param json_object [String]
|
17
|
+
# @return [Pinnacle::Types::ConversationSender]
|
18
|
+
def self.from_json(json_object:)
|
19
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
20
|
+
begin
|
21
|
+
Pinnacle::Types::Phone.validate_raw(obj: struct)
|
22
|
+
return Pinnacle::Types::Phone.from_json(json_object: struct) unless struct.nil?
|
23
|
+
|
24
|
+
return nil
|
25
|
+
rescue StandardError
|
26
|
+
# noop
|
27
|
+
end
|
28
|
+
begin
|
29
|
+
Pinnacle::Types::Agent.validate_raw(obj: struct)
|
30
|
+
return Pinnacle::Types::Agent.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::Phone.validate_raw(obj: obj)
|
48
|
+
rescue StandardError
|
49
|
+
# noop
|
50
|
+
end
|
51
|
+
begin
|
52
|
+
return Pinnacle::Types::Agent.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,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class CreateUrlOptions
|
9
|
+
# @return [String] Expiration date in ISO 8601 format for the shortened URL. <br>
|
10
|
+
# If omitted, then a permalink is generated instead.
|
11
|
+
attr_reader :expires_at
|
12
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
13
|
+
attr_reader :additional_properties
|
14
|
+
# @return [Object]
|
15
|
+
attr_reader :_field_set
|
16
|
+
protected :_field_set
|
17
|
+
|
18
|
+
OMIT = Object.new
|
19
|
+
|
20
|
+
# @param expires_at [String] Expiration date in ISO 8601 format for the shortened URL. <br>
|
21
|
+
# If omitted, then a permalink is generated instead.
|
22
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
# @return [Pinnacle::Types::CreateUrlOptions]
|
24
|
+
def initialize(expires_at: OMIT, additional_properties: nil)
|
25
|
+
@expires_at = expires_at if expires_at != OMIT
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
@_field_set = { "expiresAt": expires_at }.reject do |_k, v|
|
28
|
+
v == OMIT
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# Deserialize a JSON object to an instance of CreateUrlOptions
|
33
|
+
#
|
34
|
+
# @param json_object [String]
|
35
|
+
# @return [Pinnacle::Types::CreateUrlOptions]
|
36
|
+
def self.from_json(json_object:)
|
37
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
38
|
+
parsed_json = JSON.parse(json_object)
|
39
|
+
expires_at = parsed_json["expiresAt"]
|
40
|
+
new(expires_at: expires_at, additional_properties: struct)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Serialize an instance of CreateUrlOptions to a JSON object
|
44
|
+
#
|
45
|
+
# @return [String]
|
46
|
+
def to_json(*_args)
|
47
|
+
@_field_set&.to_json
|
48
|
+
end
|
49
|
+
|
50
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
51
|
+
# hash and check each fields type against the current object's property
|
52
|
+
# definitions.
|
53
|
+
#
|
54
|
+
# @param obj [Object]
|
55
|
+
# @return [Void]
|
56
|
+
def self.validate_raw(obj:)
|
57
|
+
obj.expires_at&.is_a?(String) != false || raise("Passed value for field obj.expires_at is not the expected type, validation failed.")
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "phone_number_campaign_detach_phone_numbers_item"
|
4
|
+
require_relative "phone_number_campaign_detach_failed_item"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module Pinnacle
|
9
|
+
module Types
|
10
|
+
class DetachedPhoneNumberResult
|
11
|
+
# @return [Array<Pinnacle::Types::PhoneNumberCampaignDetachPhoneNumbersItem>] List of phone numbers.
|
12
|
+
attr_reader :phone_numbers
|
13
|
+
# @return [Array<Pinnacle::Types::PhoneNumberCampaignDetachFailedItem>] List of numbers that were not failed to be detached.
|
14
|
+
attr_reader :failed
|
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 phone_numbers [Array<Pinnacle::Types::PhoneNumberCampaignDetachPhoneNumbersItem>] List of phone numbers.
|
24
|
+
# @param failed [Array<Pinnacle::Types::PhoneNumberCampaignDetachFailedItem>] List of numbers that were not failed to be detached.
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [Pinnacle::Types::DetachedPhoneNumberResult]
|
27
|
+
def initialize(phone_numbers:, failed:, additional_properties: nil)
|
28
|
+
@phone_numbers = phone_numbers
|
29
|
+
@failed = failed
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = { "phoneNumbers": phone_numbers, "failed": failed }
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deserialize a JSON object to an instance of DetachedPhoneNumberResult
|
35
|
+
#
|
36
|
+
# @param json_object [String]
|
37
|
+
# @return [Pinnacle::Types::DetachedPhoneNumberResult]
|
38
|
+
def self.from_json(json_object:)
|
39
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
40
|
+
parsed_json = JSON.parse(json_object)
|
41
|
+
phone_numbers = parsed_json["phoneNumbers"]&.map do |item|
|
42
|
+
item = item.to_json
|
43
|
+
Pinnacle::Types::PhoneNumberCampaignDetachPhoneNumbersItem.from_json(json_object: item)
|
44
|
+
end
|
45
|
+
failed = parsed_json["failed"]&.map do |item|
|
46
|
+
item = item.to_json
|
47
|
+
Pinnacle::Types::PhoneNumberCampaignDetachFailedItem.from_json(json_object: item)
|
48
|
+
end
|
49
|
+
new(
|
50
|
+
phone_numbers: phone_numbers,
|
51
|
+
failed: failed,
|
52
|
+
additional_properties: struct
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Serialize an instance of DetachedPhoneNumberResult 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.phone_numbers.is_a?(Array) != false || raise("Passed value for field obj.phone_numbers is not the expected type, validation failed.")
|
71
|
+
obj.failed.is_a?(Array) != false || raise("Passed value for field obj.failed is not the expected type, validation failed.")
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class DetachedWebhookInfo
|
9
|
+
# @return [String] Confirmation message.
|
10
|
+
attr_reader :message
|
11
|
+
# @return [Integer] ID of the detached webhook.
|
12
|
+
attr_reader :webhook_id
|
13
|
+
# @return [String] Phone number the webhook was detached from in E.164 format.
|
14
|
+
attr_reader :phone_number
|
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 message [String] Confirmation message.
|
24
|
+
# @param webhook_id [Integer] ID of the detached webhook.
|
25
|
+
# @param phone_number [String] Phone number the webhook was detached from in E.164 format.
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [Pinnacle::Types::DetachedWebhookInfo]
|
28
|
+
def initialize(message:, webhook_id:, phone_number:, additional_properties: nil)
|
29
|
+
@message = message
|
30
|
+
@webhook_id = webhook_id
|
31
|
+
@phone_number = phone_number
|
32
|
+
@additional_properties = additional_properties
|
33
|
+
@_field_set = { "message": message, "webhookId": webhook_id, "phoneNumber": phone_number }
|
34
|
+
end
|
35
|
+
|
36
|
+
# Deserialize a JSON object to an instance of DetachedWebhookInfo
|
37
|
+
#
|
38
|
+
# @param json_object [String]
|
39
|
+
# @return [Pinnacle::Types::DetachedWebhookInfo]
|
40
|
+
def self.from_json(json_object:)
|
41
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
42
|
+
parsed_json = JSON.parse(json_object)
|
43
|
+
message = parsed_json["message"]
|
44
|
+
webhook_id = parsed_json["webhookId"]
|
45
|
+
phone_number = parsed_json["phoneNumber"]
|
46
|
+
new(
|
47
|
+
message: message,
|
48
|
+
webhook_id: webhook_id,
|
49
|
+
phone_number: phone_number,
|
50
|
+
additional_properties: struct
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Serialize an instance of DetachedWebhookInfo to a JSON 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.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
69
|
+
obj.webhook_id.is_a?(Integer) != false || raise("Passed value for field obj.webhook_id is not the expected type, validation failed.")
|
70
|
+
obj.phone_number.is_a?(String) != false || raise("Passed value for field obj.phone_number is not the expected type, validation failed.")
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Pinnacle
|
4
|
+
module Types
|
5
|
+
# Classification of the phone number type based on Telesign’s taxonomy.
|
6
|
+
# Indicates the phone’s service category, such as mobile, fixed line, toll-free,
|
7
|
+
# or VOIP,
|
8
|
+
# along with special types like prepaid, pager, or restricted premium.
|
9
|
+
# The "INVALID" type denotes an unrecognized or improperly formatted number.
|
10
|
+
class DetailedPhoneNumberEnum
|
11
|
+
FIXED_LINE = "FIXED_LINE"
|
12
|
+
INVALID = "INVALID"
|
13
|
+
MOBILE = "MOBILE"
|
14
|
+
OTHER = "OTHER"
|
15
|
+
PAGER = "PAGER"
|
16
|
+
PAYPHONE = "PAYPHONE"
|
17
|
+
PERSONAL = "PERSONAL"
|
18
|
+
PREPAID = "PREPAID"
|
19
|
+
RESTRICTED_PREMIUM = "RESTRICTED_PREMIUM"
|
20
|
+
TOLL_FREE = "TOLL_FREE"
|
21
|
+
VOICEMAIL = "VOICEMAIL"
|
22
|
+
VOIP = "VOIP"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Pinnacle
|
4
|
+
module Types
|
5
|
+
# Current assignment status of the phone number to this campaign.
|
6
|
+
# `ASSIGNED`: Number assigned and ready to send messages.
|
7
|
+
# `PENDING_ASSIGNMENT`: In the process of being assigned.
|
8
|
+
# `PENDING_UNASSIGNMENT`: In the process of being unassigned.
|
9
|
+
# `FAILED_ASSIGNMENT`: Failed to assign the number.
|
10
|
+
# `FAILED_UNASSIGNMENT`: Failed to unassign the number.
|
11
|
+
class DlcAssignmentStatusEnum
|
12
|
+
ASSIGNED = "ASSIGNED"
|
13
|
+
FAILED_ASSIGNMENT = "FAILED_ASSIGNMENT"
|
14
|
+
FAILED_UNASSIGNMENT = "FAILED_UNASSIGNMENT"
|
15
|
+
PENDING_ASSIGNMENT = "PENDING_ASSIGNMENT"
|
16
|
+
PENDING_UNASSIGNMENT = "PENDING_UNASSIGNMENT"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|