rcs 1.0.18 → 2.0.0.pre.rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/environment.rb +1 -1
- data/lib/rcs/brands/client.rb +631 -0
- data/lib/rcs/brands/types/autofill_brand_schema_options.rb +61 -0
- data/lib/rcs/brands/types/brand_contact.rb +84 -0
- data/lib/rcs/campaigns/client.rb +44 -0
- data/lib/rcs/campaigns/dlc/client.rb +480 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords.rb +99 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_help.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_in.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_out.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_links.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_options.rb +110 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_use_case.rb +76 -0
- data/lib/rcs/campaigns/rcs/client.rb +457 -0
- data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +155 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent.rb +140 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_emails_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_phones_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_websites_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_links.rb +74 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_in.rb +75 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_out.rb +76 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_use_case.rb +75 -0
- data/lib/rcs/campaigns/toll_free/client.rb +429 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +130 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_opt_in.rb +86 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_use_case.rb +75 -0
- data/lib/rcs/contacts/client.rb +275 -0
- data/lib/rcs/conversations/client.rb +273 -0
- data/lib/rcs/message/client.rb +30 -0
- data/lib/rcs/message/sms/client.rb +96 -0
- data/lib/rcs/messages/client.rb +192 -0
- data/lib/rcs/messages/mms/client.rb +98 -0
- data/lib/rcs/messages/rcs/client.rb +94 -0
- data/lib/rcs/messages/send/client.rb +318 -0
- data/lib/rcs/messages/send/types/send_mms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_mms_schema_options.rb +108 -0
- data/lib/rcs/messages/send/types/send_rcs_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_schema_options.rb +81 -0
- data/lib/rcs/messages/types/message_reaction_schema_options.rb +71 -0
- data/lib/rcs/phone_numbers/campaign/client.rb +179 -0
- data/lib/rcs/phone_numbers/client.rb +359 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_level.rb +16 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options.rb +93 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options_enhanced_contact_info.rb +64 -0
- data/lib/rcs/phone_numbers/types/phone_numbers_get_response.rb +58 -0
- data/lib/rcs/phone_numbers/types/search_schema_location.rb +96 -0
- data/lib/rcs/phone_numbers/types/search_schema_number.rb +81 -0
- data/lib/rcs/phone_numbers/types/search_schema_options.rb +62 -0
- data/lib/rcs/phone_numbers/webhook/client.rb +191 -0
- data/lib/rcs/status/client.rb +30 -0
- data/lib/rcs/status/get/client.rb +367 -0
- data/lib/rcs/tools/client.rb +32 -199
- data/lib/rcs/tools/contact_card/client.rb +285 -0
- data/lib/rcs/tools/contact_card/types/get_v_card_schema_options.rb +67 -0
- data/lib/rcs/tools/file/client.rb +138 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options.rb +70 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options_download.rb +66 -0
- data/lib/rcs/tools/url/client.rb +245 -0
- data/lib/rcs/types/advanced_phone_information.rb +147 -0
- data/lib/rcs/types/advanced_phone_information_carrier.rb +90 -0
- data/lib/rcs/types/advanced_phone_information_contact.rb +146 -0
- data/lib/rcs/types/advanced_phone_information_location.rb +142 -0
- data/lib/rcs/types/advanced_phone_information_location_coordinates.rb +73 -0
- data/lib/rcs/types/advanced_phone_information_location_country.rb +77 -0
- data/lib/rcs/types/advanced_phone_information_type.rb +97 -0
- data/lib/rcs/types/advanced_phone_information_type_recommendation.rb +15 -0
- data/lib/rcs/types/agent.rb +68 -0
- data/lib/rcs/types/attach_webhook_params.rb +60 -0
- data/lib/rcs/types/attach_webhook_response_webhook.rb +86 -0
- data/lib/rcs/types/attach_webhook_schema_name.rb +88 -0
- data/lib/rcs/types/attach_webhook_schema_webhook_id.rb +77 -0
- data/lib/rcs/types/attached_phone_number_result.rb +75 -0
- data/lib/rcs/types/autofill_campaign_params.rb +69 -0
- data/lib/rcs/types/autofill_dlc_campaign_response.rb +169 -0
- data/lib/rcs/types/autofill_dlc_response_keywords.rb +95 -0
- data/lib/rcs/types/autofill_dlc_response_keywords_help.rb +70 -0
- data/lib/rcs/{send/types/send_sms_response.rb → types/autofill_dlc_response_keywords_opt_in.rb} +18 -17
- data/lib/rcs/types/autofill_dlc_response_keywords_opt_out.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_links.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_options.rb +106 -0
- data/lib/rcs/types/autofill_dlc_response_use_case.rb +72 -0
- data/lib/rcs/types/bad_request_error_body.rb +44 -45
- data/lib/rcs/types/basic_phone_information.rb +127 -0
- data/lib/rcs/{company/types/company_register_response_brand.rb → types/basic_phone_information_contact.rb} +12 -21
- data/lib/rcs/types/basic_phone_information_location.rb +74 -0
- data/lib/rcs/types/basic_phone_information_location_country.rb +75 -0
- data/lib/rcs/types/brand_status.rb +92 -0
- data/lib/rcs/types/brand_status_enum.rb +21 -0
- data/lib/rcs/types/buy_response_capabilities.rb +77 -0
- data/lib/rcs/types/campaign_enum.rb +15 -0
- data/lib/rcs/types/campaign_query.rb +69 -0
- data/lib/rcs/{company/types/company_register_request_company_id.rb → types/campaign_submission_result.rb} +15 -16
- data/lib/rcs/types/campaign_validation_response_errors_item.rb +76 -0
- data/lib/rcs/types/campaign_validation_result.rb +71 -0
- data/lib/rcs/types/click_action.rb +73 -0
- data/lib/rcs/types/click_action_data.rb +56 -0
- data/lib/rcs/types/click_action_data_metadata.rb +69 -0
- data/lib/rcs/types/company_sector_enum.rb +26 -0
- data/lib/rcs/types/company_type_enum.rb +14 -0
- data/lib/rcs/types/configured_webhook.rb +85 -0
- data/lib/rcs/types/contact.rb +105 -0
- data/lib/rcs/types/contact_id.rb +57 -0
- data/lib/rcs/types/conversation.rb +146 -0
- data/lib/rcs/types/conversation_contact.rb +68 -0
- data/lib/rcs/types/conversation_list.rb +79 -0
- data/lib/rcs/types/conversation_sender.rb +60 -0
- data/lib/rcs/types/create_url_options.rb +61 -0
- data/lib/rcs/types/detached_phone_number_result.rb +75 -0
- data/lib/rcs/types/detached_webhook_info.rb +74 -0
- data/lib/rcs/types/detailed_phone_number_enum.rb +25 -0
- data/lib/rcs/types/dlc_assignment_status_enum.rb +19 -0
- data/lib/rcs/types/dlc_campaign_status.rb +107 -0
- data/lib/rcs/types/dlc_campaign_use_case_enum.rb +35 -0
- data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +194 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords.rb +94 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_help.rb +72 -0
- data/lib/rcs/{send/types/send_mms_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_in.rb} +20 -17
- data/lib/rcs/{send/types/send_rcs_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_out.rb} +20 -17
- data/lib/rcs/types/dlc_with_extended_brand_and_status_links.rb +70 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_options.rb +106 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_use_case.rb +72 -0
- data/lib/rcs/types/enhanced_contact.rb +9 -0
- data/lib/rcs/types/enhanced_contact_item.rb +104 -0
- data/lib/rcs/types/error.rb +61 -0
- data/lib/rcs/types/extended_brand.rb +194 -0
- data/lib/rcs/types/extended_brand_with_vetting.rb +226 -0
- data/lib/rcs/types/extended_rcs_campaign.rb +173 -0
- data/lib/rcs/{company/types/company_register_request.rb → types/get_conversation_params.rb} +13 -12
- data/lib/rcs/types/get_conversation_request_id.rb +58 -0
- data/lib/rcs/types/get_conversation_request_recipient.rb +72 -0
- data/lib/rcs/types/get_dlc_campaign_status_response_updates.rb +96 -0
- data/lib/rcs/types/get_toll_free_campaign_status_response_updates.rb +92 -0
- data/lib/rcs/types/inbound_button.rb +56 -0
- data/lib/rcs/types/link_click_event.rb +465 -0
- data/lib/rcs/{company/types/company_update_response.rb → types/location_share_action.rb} +19 -19
- data/lib/rcs/types/location_share_action_data.rb +89 -0
- data/lib/rcs/types/message.rb +174 -0
- data/lib/rcs/types/message_content.rb +85 -0
- data/lib/rcs/types/message_method_enum.rb +12 -0
- data/lib/rcs/types/message_protocol_enum.rb +12 -0
- data/lib/rcs/types/message_schedule.rb +94 -0
- data/lib/rcs/types/message_status_enum.rb +16 -0
- data/lib/rcs/types/message_volume_enum.rb +20 -0
- data/lib/rcs/types/messaging_profile_enum.rb +11 -0
- data/lib/rcs/types/mms_content.rb +74 -0
- data/lib/rcs/types/mms_validation_response_segments.rb +85 -0
- data/lib/rcs/types/mms_validation_response_segments_value_item.rb +75 -0
- data/lib/rcs/types/mms_validation_result.rb +82 -0
- data/lib/rcs/types/nullable_contact.rb +84 -0
- data/lib/rcs/types/number_format.rb +79 -0
- data/lib/rcs/types/opt_in_method_enum.rb +13 -0
- data/lib/rcs/types/optional_brand_info.rb +145 -0
- data/lib/rcs/types/optional_contact.rb +83 -0
- data/lib/rcs/types/optional_contacts.rb +84 -0
- data/lib/rcs/types/phone.rb +101 -0
- data/lib/rcs/types/phone_capabilities.rb +75 -0
- data/lib/rcs/types/phone_enum.rb +13 -0
- data/lib/rcs/types/phone_feature_enum.rb +18 -0
- data/lib/rcs/types/phone_number_campaign_attach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_campaign_detach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_cost.rb +75 -0
- data/lib/rcs/types/phone_number_details.rb +110 -0
- data/lib/rcs/types/phone_number_enum.rb +18 -0
- data/lib/rcs/types/phone_number_region.rb +91 -0
- data/lib/rcs/types/phone_number_status.rb +90 -0
- data/lib/rcs/types/phone_number_status_enum.rb +16 -0
- data/lib/rcs/types/pinnacle_file_upload_metadata.rb +84 -0
- data/lib/rcs/types/pinnacle_url_config.rb +71 -0
- data/lib/rcs/types/profile_status_enum.rb +17 -0
- data/lib/rcs/types/purchased_number.rb +75 -0
- data/lib/rcs/types/rcs.rb +70 -0
- data/lib/rcs/types/rcs_base.rb +82 -0
- data/lib/rcs/types/rcs_base_options.rb +100 -0
- data/lib/rcs/types/rcs_button_call.rb +68 -0
- data/lib/rcs/types/rcs_button_content.rb +148 -0
- data/lib/rcs/types/rcs_button_open_url.rb +68 -0
- data/lib/rcs/types/rcs_button_request_user_location.rb +58 -0
- data/lib/rcs/types/rcs_button_schedule_event.rb +98 -0
- data/lib/rcs/types/rcs_button_send_location.rb +74 -0
- data/lib/rcs/types/rcs_button_send_location_lat_long.rb +68 -0
- data/lib/rcs/types/rcs_button_trigger.rb +78 -0
- data/lib/rcs/types/rcs_campaign.rb +143 -0
- data/lib/rcs/types/rcs_campaign_opt_in_method_enum.rb +15 -0
- data/lib/rcs/types/rcs_campaign_schema_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_emails_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_phones_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_websites_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_emails_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_phones_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_websites_item.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_status.rb +86 -0
- data/lib/rcs/types/rcs_campaign_use_case_enum.rb +23 -0
- data/lib/rcs/types/rcs_card.rb +110 -0
- data/lib/rcs/types/rcs_cards.rb +79 -0
- data/lib/rcs/types/rcs_cards_cards_item.rb +88 -0
- data/lib/rcs/types/rcs_cards_content.rb +79 -0
- data/lib/rcs/types/rcs_cards_content_cards_item.rb +94 -0
- data/lib/rcs/types/rcs_content.rb +72 -0
- data/lib/rcs/types/rcs_media.rb +110 -0
- data/lib/rcs/types/rcs_media_content.rb +81 -0
- data/lib/rcs/types/rcs_media_details_content.rb +77 -0
- data/lib/rcs/types/rcs_text.rb +106 -0
- data/lib/rcs/types/rcs_text_content.rb +72 -0
- data/lib/rcs/types/rcs_validate_content.rb +70 -0
- data/lib/rcs/{company/types/company_register_response.rb → types/rcs_validate_content_media.rb} +19 -21
- data/lib/rcs/types/rcs_validation_result.rb +76 -0
- data/lib/rcs/types/reaction_result.rb +67 -0
- data/lib/rcs/types/scheduled_messaage.rb +73 -0
- data/lib/rcs/types/scheduled_send_response_config.rb +89 -0
- data/lib/rcs/types/send_sms_response_segments.rb +69 -0
- data/lib/rcs/types/send_sms_response_segments_encoding.rb +11 -0
- data/lib/rcs/types/sent_mms_details.rb +102 -0
- data/lib/rcs/types/sent_rcs_details.rb +105 -0
- data/lib/rcs/types/sent_sms_details.rb +108 -0
- data/lib/rcs/types/shortened_url.rb +77 -0
- data/lib/rcs/types/shortened_url_with_click_data.rb +90 -0
- data/lib/rcs/types/sms_content.rb +58 -0
- data/lib/rcs/types/sms_validation_response_segments.rb +80 -0
- data/lib/rcs/types/sms_validation_response_segments_gsm_7.rb +75 -0
- data/lib/rcs/types/sms_validation_response_segments_utf_16.rb +68 -0
- data/lib/rcs/types/sms_validation_response_total.rb +75 -0
- data/lib/rcs/types/sms_validation_result.rb +102 -0
- data/lib/rcs/types/sub_use_case_enum.rb +19 -0
- data/lib/rcs/types/submission_results.rb +57 -0
- data/lib/rcs/types/successful_conversation_update.rb +58 -0
- data/lib/rcs/types/toll_free_campaign.rb +118 -0
- data/lib/rcs/types/toll_free_campaign_schema_opt_in.rb +78 -0
- data/lib/rcs/types/toll_free_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/toll_free_campaign_status.rb +91 -0
- data/lib/rcs/types/toll_free_campaign_use_case_enum.rb +52 -0
- data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +155 -0
- data/lib/rcs/types/toll_free_status_enum.rb +20 -0
- data/lib/rcs/types/tracking.rb +17 -0
- data/lib/rcs/types/updated_contact_id.rb +57 -0
- data/lib/rcs/types/upload_results.rb +80 -0
- data/lib/rcs/types/v_card_address_schema_type_item.rb +15 -0
- data/lib/rcs/types/v_card_data.rb +237 -0
- data/lib/rcs/types/v_card_data_file.rb +74 -0
- data/lib/rcs/types/v_card_data_file_metadata.rb +62 -0
- data/lib/rcs/types/v_card_email_schema_type_item.rb +21 -0
- data/lib/rcs/types/v_card_geo.rb +70 -0
- data/lib/rcs/types/v_card_name.rb +98 -0
- data/lib/rcs/types/v_card_organization.rb +70 -0
- data/lib/rcs/types/v_card_phone_schema_type_item.rb +21 -0
- data/lib/rcs/types/validate_campaign_params.rb +69 -0
- data/lib/rcs/types/validation_error_details.rb +76 -0
- data/lib/rcs/types/validation_results.rb +71 -0
- data/lib/rcs/types/vcard.rb +215 -0
- data/lib/rcs/types/vcard_address.rb +130 -0
- data/lib/rcs/types/vcard_content.rb +223 -0
- data/lib/rcs/types/vcard_email.rb +70 -0
- data/lib/rcs/types/vcard_phone.rb +70 -0
- data/lib/rcs/types/vcard_resource.rb +71 -0
- data/lib/rcs/types/vetting_feedback.rb +81 -0
- data/lib/rcs/types/vetting_history.rb +98 -0
- data/lib/rcs/types/vetting_history_vetting_status.rb +13 -0
- data/lib/rcs/types/vetting_results.rb +57 -0
- data/lib/rcs/types/webhook_event_enum.rb +13 -0
- data/lib/rcs/types/webhook_result.rb +64 -0
- data/lib/rcs/{company/types/company_update_response_brand.rb → types/webhooks.rb} +25 -17
- data/lib/rcs/types/zod_error.rb +73 -0
- data/lib/rcs/webhooks/client.rb +93 -0
- data/lib/rcs.rb +67 -83
- data/lib/requests.rb +4 -4
- data/lib/types_export.rb +252 -46
- metadata +278 -52
- data/lib/rcs/company/client.rb +0 -375
- data/lib/rcs/company/types/company_register_request_company.rb +0 -128
- data/lib/rcs/send/client.rb +0 -382
- data/lib/rcs/send/types/rcs_fallback.rb +0 -84
- data/lib/rcs/tools/types/tools_shorten_url_response.rb +0 -70
- data/lib/rcs/tools/types/tools_upload_url_response.rb +0 -69
- data/lib/rcs/types/action.rb +0 -154
- data/lib/rcs/types/action_lat_long.rb +0 -68
- data/lib/rcs/types/action_type.rb +0 -16
- data/lib/rcs/types/additional_email.rb +0 -65
- data/lib/rcs/types/additional_phone_number.rb +0 -65
- data/lib/rcs/types/additional_website.rb +0 -65
- data/lib/rcs/types/card.rb +0 -90
- data/lib/rcs/types/company.rb +0 -319
- data/lib/rcs/types/company_additional_emails_item.rb +0 -67
- data/lib/rcs/types/company_additional_phone_numbers_item.rb +0 -67
- data/lib/rcs/types/company_additional_websites_item.rb +0 -67
- data/lib/rcs/types/company_category.rb +0 -20
- data/lib/rcs/types/company_contact.rb +0 -117
- data/lib/rcs/types/company_details.rb +0 -120
- data/lib/rcs/types/forbidden_error_body.rb +0 -57
- data/lib/rcs/types/inbound_action_message.rb +0 -117
- data/lib/rcs/types/inbound_location_message.rb +0 -106
- data/lib/rcs/types/inbound_location_message_coordinates.rb +0 -65
- data/lib/rcs/types/inbound_media_message.rb +0 -112
- data/lib/rcs/types/inbound_message.rb +0 -88
- data/lib/rcs/types/inbound_message_message_type.rb +0 -10
- data/lib/rcs/types/inbound_message_metadata.rb +0 -79
- data/lib/rcs/types/inbound_text_message.rb +0 -100
- data/lib/rcs/types/internal_server_error_body.rb +0 -57
- data/lib/rcs/types/media_payload.rb +0 -65
- data/lib/rcs/types/message_metadata.rb +0 -56
- data/lib/rcs/types/messaging.rb +0 -95
- data/lib/rcs/types/optionals.rb +0 -99
- data/lib/rcs/types/payment_required_error_body.rb +0 -57
- data/lib/rcs/types/point_of_contact.rb +0 -72
- data/lib/rcs/types/rcs_functionalities.rb +0 -117
- data/lib/rcs/types/sender_metadata.rb +0 -74
- data/lib/rcs/types/unauthorized_error_body.rb +0 -57
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Pinnacle
|
4
|
+
module Types
|
5
|
+
# Types of events that can trigger webhook notifications for phone numbers.
|
6
|
+
# Subscribe to specific events to receive real-time updates about your phone
|
7
|
+
# number activity.
|
8
|
+
class WebhookEventEnum
|
9
|
+
MESSAGE_STATUS = "MESSAGE.STATUS"
|
10
|
+
MESSAGE_RECEIVED = "MESSAGE.RECEIVED"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "webhooks"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Response containing all webhooks that match the requested identifiers.
|
10
|
+
# Only includes the essential webhook information needed for identification and
|
11
|
+
# management.
|
12
|
+
class WebhookResult
|
13
|
+
# @return [Array<Pinnacle::Types::Webhooks>] List of webhooks.
|
14
|
+
attr_reader :webhooks
|
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 webhooks [Array<Pinnacle::Types::Webhooks>] List of webhooks.
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [Pinnacle::Types::WebhookResult]
|
26
|
+
def initialize(webhooks:, additional_properties: nil)
|
27
|
+
@webhooks = webhooks
|
28
|
+
@additional_properties = additional_properties
|
29
|
+
@_field_set = { "webhooks": webhooks }
|
30
|
+
end
|
31
|
+
|
32
|
+
# Deserialize a JSON object to an instance of WebhookResult
|
33
|
+
#
|
34
|
+
# @param json_object [String]
|
35
|
+
# @return [Pinnacle::Types::WebhookResult]
|
36
|
+
def self.from_json(json_object:)
|
37
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
38
|
+
parsed_json = JSON.parse(json_object)
|
39
|
+
webhooks = parsed_json["webhooks"]&.map do |item|
|
40
|
+
item = item.to_json
|
41
|
+
Pinnacle::Types::Webhooks.from_json(json_object: item)
|
42
|
+
end
|
43
|
+
new(webhooks: webhooks, additional_properties: struct)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Serialize an instance of WebhookResult to a JSON object
|
47
|
+
#
|
48
|
+
# @return [String]
|
49
|
+
def to_json(*_args)
|
50
|
+
@_field_set&.to_json
|
51
|
+
end
|
52
|
+
|
53
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
54
|
+
# hash and check each fields type against the current object's property
|
55
|
+
# definitions.
|
56
|
+
#
|
57
|
+
# @param obj [Object]
|
58
|
+
# @return [Void]
|
59
|
+
def self.validate_raw(obj:)
|
60
|
+
obj.webhooks.is_a?(Array) != false || raise("Passed value for field obj.webhooks is not the expected type, validation failed.")
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -4,12 +4,15 @@ require "ostruct"
|
|
4
4
|
require "json"
|
5
5
|
|
6
6
|
module Pinnacle
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
module Types
|
8
|
+
# Webhook configuration that defines where event notifications are sent.
|
9
|
+
class Webhooks
|
10
|
+
# @return [String] URL where webhook events are delivered.
|
11
|
+
attr_reader :endpoint
|
12
|
+
# @return [Integer] Unique identifier for the webhook.
|
12
13
|
attr_reader :id
|
14
|
+
# @return [String] Name of the webhook.
|
15
|
+
attr_reader :name
|
13
16
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
17
|
attr_reader :additional_properties
|
15
18
|
# @return [Object]
|
@@ -18,34 +21,38 @@ module Pinnacle
|
|
18
21
|
|
19
22
|
OMIT = Object.new
|
20
23
|
|
21
|
-
# @param
|
22
|
-
# @param id [
|
24
|
+
# @param endpoint [String] URL where webhook events are delivered.
|
25
|
+
# @param id [Integer] Unique identifier for the webhook.
|
26
|
+
# @param name [String] Name of the webhook.
|
23
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
-
# @return [Pinnacle::
|
25
|
-
def initialize(
|
26
|
-
@
|
28
|
+
# @return [Pinnacle::Types::Webhooks]
|
29
|
+
def initialize(endpoint:, id:, name:, additional_properties: nil)
|
30
|
+
@endpoint = endpoint
|
27
31
|
@id = id
|
32
|
+
@name = name
|
28
33
|
@additional_properties = additional_properties
|
29
|
-
@_field_set = { "
|
34
|
+
@_field_set = { "endpoint": endpoint, "id": id, "name": name }
|
30
35
|
end
|
31
36
|
|
32
|
-
# Deserialize a JSON object to an instance of
|
37
|
+
# Deserialize a JSON object to an instance of Webhooks
|
33
38
|
#
|
34
39
|
# @param json_object [String]
|
35
|
-
# @return [Pinnacle::
|
40
|
+
# @return [Pinnacle::Types::Webhooks]
|
36
41
|
def self.from_json(json_object:)
|
37
42
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
38
43
|
parsed_json = JSON.parse(json_object)
|
39
|
-
|
44
|
+
endpoint = parsed_json["endpoint"]
|
40
45
|
id = parsed_json["id"]
|
46
|
+
name = parsed_json["name"]
|
41
47
|
new(
|
42
|
-
|
48
|
+
endpoint: endpoint,
|
43
49
|
id: id,
|
50
|
+
name: name,
|
44
51
|
additional_properties: struct
|
45
52
|
)
|
46
53
|
end
|
47
54
|
|
48
|
-
# Serialize an instance of
|
55
|
+
# Serialize an instance of Webhooks to a JSON object
|
49
56
|
#
|
50
57
|
# @return [String]
|
51
58
|
def to_json(*_args)
|
@@ -59,8 +66,9 @@ module Pinnacle
|
|
59
66
|
# @param obj [Object]
|
60
67
|
# @return [Void]
|
61
68
|
def self.validate_raw(obj:)
|
69
|
+
obj.endpoint.is_a?(String) != false || raise("Passed value for field obj.endpoint is not the expected type, validation failed.")
|
70
|
+
obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
62
71
|
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
63
|
-
obj.id.is_a?(Float) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
64
72
|
end
|
65
73
|
end
|
66
74
|
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class ZodError
|
9
|
+
# @return [String] Human-readable summary of validation failures.
|
10
|
+
attr_reader :description
|
11
|
+
# @return [Hash{String => Object}] Structured dictionary of issues containing two main sections:
|
12
|
+
# - `errors`: Array of global validation errors not tied to specific fields
|
13
|
+
# - `properties`: Object mapping field names to their specific validation errors,
|
14
|
+
# where each field contains an `errors` array
|
15
|
+
attr_reader :errors
|
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 description [String] Human-readable summary of validation failures.
|
25
|
+
# @param errors [Hash{String => Object}] Structured dictionary of issues containing two main sections:
|
26
|
+
# - `errors`: Array of global validation errors not tied to specific fields
|
27
|
+
# - `properties`: Object mapping field names to their specific validation errors,
|
28
|
+
# where each field contains an `errors` array
|
29
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
# @return [Pinnacle::Types::ZodError]
|
31
|
+
def initialize(description:, errors:, additional_properties: nil)
|
32
|
+
@description = description
|
33
|
+
@errors = errors
|
34
|
+
@additional_properties = additional_properties
|
35
|
+
@_field_set = { "description": description, "errors": errors }
|
36
|
+
end
|
37
|
+
|
38
|
+
# Deserialize a JSON object to an instance of ZodError
|
39
|
+
#
|
40
|
+
# @param json_object [String]
|
41
|
+
# @return [Pinnacle::Types::ZodError]
|
42
|
+
def self.from_json(json_object:)
|
43
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
44
|
+
parsed_json = JSON.parse(json_object)
|
45
|
+
description = parsed_json["description"]
|
46
|
+
errors = parsed_json["errors"]
|
47
|
+
new(
|
48
|
+
description: description,
|
49
|
+
errors: errors,
|
50
|
+
additional_properties: struct
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Serialize an instance of ZodError 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.description.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
69
|
+
obj.errors.is_a?(Hash) != false || raise("Passed value for field obj.errors is not the expected type, validation failed.")
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../requests"
|
4
|
+
require_relative "../types/webhook_result"
|
5
|
+
require "async"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
class WebhooksClient
|
9
|
+
# @return [Pinnacle::RequestClient]
|
10
|
+
attr_reader :request_client
|
11
|
+
|
12
|
+
# @param request_client [Pinnacle::RequestClient]
|
13
|
+
# @return [Pinnacle::WebhooksClient]
|
14
|
+
def initialize(request_client:)
|
15
|
+
@request_client = request_client
|
16
|
+
end
|
17
|
+
|
18
|
+
# Retrieve all webhook that are set up to receive events for specific URLs or
|
19
|
+
# phone numbers.
|
20
|
+
#
|
21
|
+
# @param identifiers [Array<String>] List of URLs or phone numbers in E.164 format that the webhook is attached to.
|
22
|
+
# @param request_options [Pinnacle::RequestOptions]
|
23
|
+
# @return [Pinnacle::Types::WebhookResult]
|
24
|
+
# @example
|
25
|
+
# api = Pinnacle::Client.new(
|
26
|
+
# base_url: "https://api.example.com",
|
27
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
28
|
+
# api_key: "YOUR_API_KEY"
|
29
|
+
# )
|
30
|
+
# api.webhooks.get(identifiers: ["https://www.pinnacle.sh/payment", "+14155678901", "https://www.pinnacle.sh/sms-callback", "+14153456659"])
|
31
|
+
def get(identifiers:, request_options: nil)
|
32
|
+
response = @request_client.conn.post do |req|
|
33
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
34
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
35
|
+
req.headers = {
|
36
|
+
**(req.headers || {}),
|
37
|
+
**@request_client.get_headers,
|
38
|
+
**(request_options&.additional_headers || {})
|
39
|
+
}.compact
|
40
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
41
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
42
|
+
end
|
43
|
+
req.body = { **(request_options&.additional_body_parameters || {}), identifiers: identifiers }.compact
|
44
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/webhooks"
|
45
|
+
end
|
46
|
+
Pinnacle::Types::WebhookResult.from_json(json_object: response.body)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
class AsyncWebhooksClient
|
51
|
+
# @return [Pinnacle::AsyncRequestClient]
|
52
|
+
attr_reader :request_client
|
53
|
+
|
54
|
+
# @param request_client [Pinnacle::AsyncRequestClient]
|
55
|
+
# @return [Pinnacle::AsyncWebhooksClient]
|
56
|
+
def initialize(request_client:)
|
57
|
+
@request_client = request_client
|
58
|
+
end
|
59
|
+
|
60
|
+
# Retrieve all webhook that are set up to receive events for specific URLs or
|
61
|
+
# phone numbers.
|
62
|
+
#
|
63
|
+
# @param identifiers [Array<String>] List of URLs or phone numbers in E.164 format that the webhook is attached to.
|
64
|
+
# @param request_options [Pinnacle::RequestOptions]
|
65
|
+
# @return [Pinnacle::Types::WebhookResult]
|
66
|
+
# @example
|
67
|
+
# api = Pinnacle::Client.new(
|
68
|
+
# base_url: "https://api.example.com",
|
69
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
70
|
+
# api_key: "YOUR_API_KEY"
|
71
|
+
# )
|
72
|
+
# api.webhooks.get(identifiers: ["https://www.pinnacle.sh/payment", "+14155678901", "https://www.pinnacle.sh/sms-callback", "+14153456659"])
|
73
|
+
def get(identifiers:, request_options: nil)
|
74
|
+
Async do
|
75
|
+
response = @request_client.conn.post do |req|
|
76
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
77
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
78
|
+
req.headers = {
|
79
|
+
**(req.headers || {}),
|
80
|
+
**@request_client.get_headers,
|
81
|
+
**(request_options&.additional_headers || {})
|
82
|
+
}.compact
|
83
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
84
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
85
|
+
end
|
86
|
+
req.body = { **(request_options&.additional_body_parameters || {}), identifiers: identifiers }.compact
|
87
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/webhooks"
|
88
|
+
end
|
89
|
+
Pinnacle::Types::WebhookResult.from_json(json_object: response.body)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
data/lib/rcs.rb
CHANGED
@@ -3,18 +3,38 @@
|
|
3
3
|
require_relative "environment"
|
4
4
|
require_relative "types_export"
|
5
5
|
require_relative "requests"
|
6
|
-
require_relative "rcs/
|
7
|
-
require_relative "rcs/
|
6
|
+
require_relative "rcs/brands/client"
|
7
|
+
require_relative "rcs/contacts/client"
|
8
|
+
require_relative "rcs/conversations/client"
|
9
|
+
require_relative "rcs/messages/client"
|
10
|
+
require_relative "rcs/phone_numbers/client"
|
11
|
+
require_relative "rcs/webhooks/client"
|
12
|
+
require_relative "rcs/campaigns/client"
|
13
|
+
require_relative "rcs/message/client"
|
14
|
+
require_relative "rcs/status/client"
|
8
15
|
require_relative "rcs/tools/client"
|
9
|
-
require_relative "rcs/types/rcs_functionalities"
|
10
16
|
|
11
17
|
module Pinnacle
|
12
18
|
class Client
|
13
|
-
# @return [Pinnacle::
|
14
|
-
attr_reader :
|
15
|
-
# @return [Pinnacle::
|
16
|
-
attr_reader :
|
17
|
-
# @return [Pinnacle::
|
19
|
+
# @return [Pinnacle::BrandsClient]
|
20
|
+
attr_reader :brands
|
21
|
+
# @return [Pinnacle::ContactsClient]
|
22
|
+
attr_reader :contacts
|
23
|
+
# @return [Pinnacle::ConversationsClient]
|
24
|
+
attr_reader :conversations
|
25
|
+
# @return [Pinnacle::MessagesClient]
|
26
|
+
attr_reader :messages
|
27
|
+
# @return [Pinnacle::PhoneNumbersClient]
|
28
|
+
attr_reader :phone_numbers
|
29
|
+
# @return [Pinnacle::WebhooksClient]
|
30
|
+
attr_reader :webhooks
|
31
|
+
# @return [Pinnacle::Campaigns::Client]
|
32
|
+
attr_reader :campaigns
|
33
|
+
# @return [Pinnacle::Message::Client]
|
34
|
+
attr_reader :message
|
35
|
+
# @return [Pinnacle::Status::Client]
|
36
|
+
attr_reader :status
|
37
|
+
# @return [Pinnacle::Tools::Client]
|
18
38
|
attr_reader :tools
|
19
39
|
|
20
40
|
# @param base_url [String]
|
@@ -32,50 +52,39 @@ module Pinnacle
|
|
32
52
|
timeout_in_seconds: timeout_in_seconds,
|
33
53
|
api_key: api_key
|
34
54
|
)
|
35
|
-
@
|
36
|
-
@
|
37
|
-
@
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
# @param request_options [Pinnacle::RequestOptions]
|
46
|
-
# @return [Pinnacle::RcsFunctionalities]
|
47
|
-
# @example
|
48
|
-
# api = Pinnacle::Client.new(
|
49
|
-
# base_url: "https://api.example.com",
|
50
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
51
|
-
# api_key: "YOUR_API_KEY"
|
52
|
-
# )
|
53
|
-
# api.get_rcs_functionality
|
54
|
-
def get_rcs_functionality(phone_number: nil, request_options: nil)
|
55
|
-
response = @request_client.conn.get do |req|
|
56
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
57
|
-
req.headers["PINNACLE-API-Key"] = request_options.api_key unless request_options&.api_key.nil?
|
58
|
-
req.headers = {
|
59
|
-
**(req.headers || {}),
|
60
|
-
**@request_client.get_headers,
|
61
|
-
**(request_options&.additional_headers || {})
|
62
|
-
}.compact
|
63
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "phoneNumber": phone_number }.compact
|
64
|
-
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
65
|
-
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
66
|
-
end
|
67
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/rcs_functionality"
|
68
|
-
end
|
69
|
-
Pinnacle::RcsFunctionalities.from_json(json_object: response.body)
|
55
|
+
@brands = Pinnacle::BrandsClient.new(request_client: @request_client)
|
56
|
+
@contacts = Pinnacle::ContactsClient.new(request_client: @request_client)
|
57
|
+
@conversations = Pinnacle::ConversationsClient.new(request_client: @request_client)
|
58
|
+
@messages = Pinnacle::MessagesClient.new(request_client: @request_client)
|
59
|
+
@phone_numbers = Pinnacle::PhoneNumbersClient.new(request_client: @request_client)
|
60
|
+
@webhooks = Pinnacle::WebhooksClient.new(request_client: @request_client)
|
61
|
+
@campaigns = Pinnacle::Campaigns::Client.new(request_client: @request_client)
|
62
|
+
@message = Pinnacle::Message::Client.new(request_client: @request_client)
|
63
|
+
@status = Pinnacle::Status::Client.new(request_client: @request_client)
|
64
|
+
@tools = Pinnacle::Tools::Client.new(request_client: @request_client)
|
70
65
|
end
|
71
66
|
end
|
72
67
|
|
73
68
|
class AsyncClient
|
74
|
-
# @return [Pinnacle::
|
75
|
-
attr_reader :
|
76
|
-
# @return [Pinnacle::
|
77
|
-
attr_reader :
|
78
|
-
# @return [Pinnacle::
|
69
|
+
# @return [Pinnacle::AsyncBrandsClient]
|
70
|
+
attr_reader :brands
|
71
|
+
# @return [Pinnacle::AsyncContactsClient]
|
72
|
+
attr_reader :contacts
|
73
|
+
# @return [Pinnacle::AsyncConversationsClient]
|
74
|
+
attr_reader :conversations
|
75
|
+
# @return [Pinnacle::AsyncMessagesClient]
|
76
|
+
attr_reader :messages
|
77
|
+
# @return [Pinnacle::AsyncPhoneNumbersClient]
|
78
|
+
attr_reader :phone_numbers
|
79
|
+
# @return [Pinnacle::AsyncWebhooksClient]
|
80
|
+
attr_reader :webhooks
|
81
|
+
# @return [Pinnacle::Campaigns::AsyncClient]
|
82
|
+
attr_reader :campaigns
|
83
|
+
# @return [Pinnacle::Message::AsyncClient]
|
84
|
+
attr_reader :message
|
85
|
+
# @return [Pinnacle::Status::AsyncClient]
|
86
|
+
attr_reader :status
|
87
|
+
# @return [Pinnacle::Tools::AsyncClient]
|
79
88
|
attr_reader :tools
|
80
89
|
|
81
90
|
# @param base_url [String]
|
@@ -93,41 +102,16 @@ module Pinnacle
|
|
93
102
|
timeout_in_seconds: timeout_in_seconds,
|
94
103
|
api_key: api_key
|
95
104
|
)
|
96
|
-
@
|
97
|
-
@
|
98
|
-
@
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
# @param request_options [Pinnacle::RequestOptions]
|
107
|
-
# @return [Pinnacle::RcsFunctionalities]
|
108
|
-
# @example
|
109
|
-
# api = Pinnacle::Client.new(
|
110
|
-
# base_url: "https://api.example.com",
|
111
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
112
|
-
# api_key: "YOUR_API_KEY"
|
113
|
-
# )
|
114
|
-
# api.get_rcs_functionality
|
115
|
-
def get_rcs_functionality(phone_number: nil, request_options: nil)
|
116
|
-
response = @async_request_client.conn.get do |req|
|
117
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
118
|
-
req.headers["PINNACLE-API-Key"] = request_options.api_key unless request_options&.api_key.nil?
|
119
|
-
req.headers = {
|
120
|
-
**(req.headers || {}),
|
121
|
-
**@async_request_client.get_headers,
|
122
|
-
**(request_options&.additional_headers || {})
|
123
|
-
}.compact
|
124
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "phoneNumber": phone_number }.compact
|
125
|
-
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
126
|
-
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
127
|
-
end
|
128
|
-
req.url "#{@async_request_client.get_url(request_options: request_options)}/rcs_functionality"
|
129
|
-
end
|
130
|
-
Pinnacle::RcsFunctionalities.from_json(json_object: response.body)
|
105
|
+
@brands = Pinnacle::AsyncBrandsClient.new(request_client: @async_request_client)
|
106
|
+
@contacts = Pinnacle::AsyncContactsClient.new(request_client: @async_request_client)
|
107
|
+
@conversations = Pinnacle::AsyncConversationsClient.new(request_client: @async_request_client)
|
108
|
+
@messages = Pinnacle::AsyncMessagesClient.new(request_client: @async_request_client)
|
109
|
+
@phone_numbers = Pinnacle::AsyncPhoneNumbersClient.new(request_client: @async_request_client)
|
110
|
+
@webhooks = Pinnacle::AsyncWebhooksClient.new(request_client: @async_request_client)
|
111
|
+
@campaigns = Pinnacle::Campaigns::AsyncClient.new(request_client: @async_request_client)
|
112
|
+
@message = Pinnacle::Message::AsyncClient.new(request_client: @async_request_client)
|
113
|
+
@status = Pinnacle::Status::AsyncClient.new(request_client: @async_request_client)
|
114
|
+
@tools = Pinnacle::Tools::AsyncClient.new(request_client: @async_request_client)
|
131
115
|
end
|
132
116
|
end
|
133
117
|
end
|
data/lib/requests.rb
CHANGED
@@ -43,8 +43,8 @@ module Pinnacle
|
|
43
43
|
|
44
44
|
# @return [Hash{String => String}]
|
45
45
|
def get_headers
|
46
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "
|
47
|
-
headers["PINNACLE-API-
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.0-rc.2" }
|
47
|
+
headers["PINNACLE-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
|
48
48
|
headers
|
49
49
|
end
|
50
50
|
end
|
@@ -87,8 +87,8 @@ module Pinnacle
|
|
87
87
|
|
88
88
|
# @return [Hash{String => String}]
|
89
89
|
def get_headers
|
90
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "
|
91
|
-
headers["PINNACLE-API-
|
90
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.0-rc.2" }
|
91
|
+
headers["PINNACLE-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
|
92
92
|
headers
|
93
93
|
end
|
94
94
|
end
|