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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bf4bc1761d1350fe826351583d038be1a7517d1c8a4f34cfd92f3c1dc6509e8
|
4
|
+
data.tar.gz: f150bf36261d398d7c765bb791a851d25ebe29dd00aef1789aa0adcb0376cd5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6459f22c8d57fe6db580707476a17e467294a9a83c44aec0cc3c5fdc73deebb69238c1c6208e1cb3b84b36d6d5ab7359c93042da6bca1a506c79babedb54406b
|
7
|
+
data.tar.gz: ea1e1b1f6ca744d650c02ed136ac9944a5734722032ec6c2be6d243b2390af49d634f1f02340fd427164c58e7ebf1e2a7b0e0ea51ddf7a81a3c6c4f529b0b799
|
data/lib/environment.rb
CHANGED
@@ -0,0 +1,631 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../requests"
|
4
|
+
require_relative "types/autofill_brand_schema_options"
|
5
|
+
require_relative "../types/optional_brand_info"
|
6
|
+
require_relative "../types/nullable_contact"
|
7
|
+
require_relative "../types/company_sector_enum"
|
8
|
+
require_relative "../types/company_type_enum"
|
9
|
+
require_relative "../types/extended_brand"
|
10
|
+
require_relative "../types/extended_brand_with_vetting"
|
11
|
+
require_relative "../types/submission_results"
|
12
|
+
require_relative "types/brand_contact"
|
13
|
+
require_relative "../types/validation_results"
|
14
|
+
require_relative "../types/vetting_results"
|
15
|
+
require "async"
|
16
|
+
|
17
|
+
module Pinnacle
|
18
|
+
class BrandsClient
|
19
|
+
# @return [Pinnacle::RequestClient]
|
20
|
+
attr_reader :request_client
|
21
|
+
|
22
|
+
# @param request_client [Pinnacle::RequestClient]
|
23
|
+
# @return [Pinnacle::BrandsClient]
|
24
|
+
def initialize(request_client:)
|
25
|
+
@request_client = request_client
|
26
|
+
end
|
27
|
+
|
28
|
+
# Automatically populate brand information based on partial input data you
|
29
|
+
# provide.
|
30
|
+
#
|
31
|
+
# @param additional_info [String] Any extra details about the brand to help improve data accuracy.
|
32
|
+
# @param name [String] Name of the brand.
|
33
|
+
# @param options [Hash] Request of type Pinnacle::Brands::Types::AutofillBrandSchemaOptions, as a Hash
|
34
|
+
# * :force_reload (Boolean)
|
35
|
+
# @param website [String] Brand's website URL.
|
36
|
+
# @param request_options [Pinnacle::RequestOptions]
|
37
|
+
# @return [Pinnacle::Types::OptionalBrandInfo]
|
38
|
+
# @example
|
39
|
+
# api = Pinnacle::Client.new(
|
40
|
+
# base_url: "https://api.example.com",
|
41
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
42
|
+
# api_key: "YOUR_API_KEY"
|
43
|
+
# )
|
44
|
+
# api.brands.autofill(
|
45
|
+
# additional_info: "A developer-friendly, compliant API for SMS, MMS, and RCS, built to scale real conversations.",
|
46
|
+
# name: "Pinnacle",
|
47
|
+
# options: { force_reload: true },
|
48
|
+
# website: "https://www.pinnacle.sh"
|
49
|
+
# )
|
50
|
+
def autofill(additional_info: nil, name: nil, options: nil, website: nil, request_options: nil)
|
51
|
+
response = @request_client.conn.post do |req|
|
52
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
53
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
54
|
+
req.headers = {
|
55
|
+
**(req.headers || {}),
|
56
|
+
**@request_client.get_headers,
|
57
|
+
**(request_options&.additional_headers || {})
|
58
|
+
}.compact
|
59
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
60
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
61
|
+
end
|
62
|
+
req.body = {
|
63
|
+
**(request_options&.additional_body_parameters || {}),
|
64
|
+
additional_info: additional_info,
|
65
|
+
name: name,
|
66
|
+
options: options,
|
67
|
+
website: website
|
68
|
+
}.compact
|
69
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands/autofill"
|
70
|
+
end
|
71
|
+
Pinnacle::Types::OptionalBrandInfo.from_json(json_object: response.body)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Create a new brand or update an existing brand by with the provided information.
|
75
|
+
#
|
76
|
+
# @param address [String] Primary brand address where the company is located.
|
77
|
+
# @param contact [Hash] Contact information for the brand.Request of type Pinnacle::Types::NullableContact, as a Hash
|
78
|
+
# * :email (String)
|
79
|
+
# * :name (String)
|
80
|
+
# * :phone (String)
|
81
|
+
# * :title (String)
|
82
|
+
# @param dba [String] "Doing Business As" name - the public name the brand operates under.
|
83
|
+
# @param description [String] Brief description of what the brand does.
|
84
|
+
# @param ein [String] Brand's Employer Identification Number (EIN) assigned by the IRS.
|
85
|
+
# @param email [String] Main contact email address for the brand.
|
86
|
+
# @param id [Integer] Brand ID - include only when updating an existing brand, omit to create a new
|
87
|
+
# one.
|
88
|
+
# @param name [String] Legal name of the brand as registered.
|
89
|
+
# @param sector [Pinnacle::Types::CompanySectorEnum] Industry the brand operates in.
|
90
|
+
# @param type [Pinnacle::Types::CompanyTypeEnum] Legal structure of the brand.
|
91
|
+
# @param website [String] Brand website URL.
|
92
|
+
# @param request_options [Pinnacle::RequestOptions]
|
93
|
+
# @return [Pinnacle::Types::ExtendedBrand]
|
94
|
+
# @example
|
95
|
+
# api = Pinnacle::Client.new(
|
96
|
+
# base_url: "https://api.example.com",
|
97
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
98
|
+
# api_key: "YOUR_API_KEY"
|
99
|
+
# )
|
100
|
+
# api.brands.upsert(
|
101
|
+
# address: "500 Folsom St, San Francisco, CA 94105",
|
102
|
+
# contact: { email: "michael.chen@trypinnacle.app", name: "Michael Chen", phone: "+14155551234", title: "Customer Support Representative" },
|
103
|
+
# dba: "Pinnacle RCS",
|
104
|
+
# description: "A developer-friendly, compliant API for SMS, MMS, and RCS, built to scale real conversations.",
|
105
|
+
# ein: "88-1234567",
|
106
|
+
# email: "founders@trypinnacle.app",
|
107
|
+
# id: 1,
|
108
|
+
# name: "Pinnacle",
|
109
|
+
# sector: TECHNOLOGY,
|
110
|
+
# type: PRIVATE_PROFIT,
|
111
|
+
# website: "https://www.pinnacle.sh"
|
112
|
+
# )
|
113
|
+
def upsert(address: nil, contact: nil, dba: nil, description: nil, ein: nil, email: nil, id: nil, name: nil,
|
114
|
+
sector: nil, type: nil, website: nil, request_options: nil)
|
115
|
+
response = @request_client.conn.post do |req|
|
116
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
117
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
118
|
+
req.headers = {
|
119
|
+
**(req.headers || {}),
|
120
|
+
**@request_client.get_headers,
|
121
|
+
**(request_options&.additional_headers || {})
|
122
|
+
}.compact
|
123
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
124
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
125
|
+
end
|
126
|
+
req.body = {
|
127
|
+
**(request_options&.additional_body_parameters || {}),
|
128
|
+
address: address,
|
129
|
+
contact: contact,
|
130
|
+
dba: dba,
|
131
|
+
description: description,
|
132
|
+
ein: ein,
|
133
|
+
email: email,
|
134
|
+
id: id,
|
135
|
+
name: name,
|
136
|
+
sector: sector,
|
137
|
+
type: type,
|
138
|
+
website: website
|
139
|
+
}.compact
|
140
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands"
|
141
|
+
end
|
142
|
+
Pinnacle::Types::ExtendedBrand.from_json(json_object: response.body)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Retrieve detailed information for a specific brand in your account by ID.
|
146
|
+
#
|
147
|
+
# @param id [Integer] ID of an existing brand in your account that you want to retrieve.
|
148
|
+
# @param hide_ein [Boolean] Optional flag to mask the Employer Identification Number in the response for
|
149
|
+
# security purposes.<br>
|
150
|
+
# When you set this to true, the EIN value will be replaced with a masked
|
151
|
+
# placeholder instead of the actual number.
|
152
|
+
# @param request_options [Pinnacle::RequestOptions]
|
153
|
+
# @return [Pinnacle::Types::ExtendedBrandWithVetting]
|
154
|
+
# @example
|
155
|
+
# api = Pinnacle::Client.new(
|
156
|
+
# base_url: "https://api.example.com",
|
157
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
158
|
+
# api_key: "YOUR_API_KEY"
|
159
|
+
# )
|
160
|
+
# api.brands.get(id: 1)
|
161
|
+
def get(id:, hide_ein: nil, request_options: nil)
|
162
|
+
response = @request_client.conn.get do |req|
|
163
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
164
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
165
|
+
req.headers = {
|
166
|
+
**(req.headers || {}),
|
167
|
+
**@request_client.get_headers,
|
168
|
+
**(request_options&.additional_headers || {})
|
169
|
+
}.compact
|
170
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "hideEIN": hide_ein }.compact
|
171
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
172
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
173
|
+
end
|
174
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands/#{id}"
|
175
|
+
end
|
176
|
+
Pinnacle::Types::ExtendedBrandWithVetting.from_json(json_object: response.body)
|
177
|
+
end
|
178
|
+
|
179
|
+
# Submit your brand for review and approval by the compliance team.
|
180
|
+
#
|
181
|
+
# @param brand_id [Integer] The unique identifier of the brand you want to submit for review. <br>
|
182
|
+
# Must correspond to an existing brand in your account that is ready for
|
183
|
+
# submission.
|
184
|
+
# @param request_options [Pinnacle::RequestOptions]
|
185
|
+
# @return [Pinnacle::Types::SubmissionResults]
|
186
|
+
# @example
|
187
|
+
# api = Pinnacle::Client.new(
|
188
|
+
# base_url: "https://api.example.com",
|
189
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
190
|
+
# api_key: "YOUR_API_KEY"
|
191
|
+
# )
|
192
|
+
# api.brands.submit(brand_id: 1)
|
193
|
+
def submit(brand_id:, request_options: nil)
|
194
|
+
response = @request_client.conn.post do |req|
|
195
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
196
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
197
|
+
req.headers = {
|
198
|
+
**(req.headers || {}),
|
199
|
+
**@request_client.get_headers,
|
200
|
+
**(request_options&.additional_headers || {})
|
201
|
+
}.compact
|
202
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
203
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
204
|
+
end
|
205
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
206
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
207
|
+
end
|
208
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands/#{brand_id}/submit"
|
209
|
+
end
|
210
|
+
Pinnacle::Types::SubmissionResults.from_json(json_object: response.body)
|
211
|
+
end
|
212
|
+
|
213
|
+
# Validate your brand information for compliance and correctness before submission
|
214
|
+
# or storage.
|
215
|
+
#
|
216
|
+
# @param address [String] Primary brand address where the brand is located.
|
217
|
+
# @param contact [Hash] Contact information for the primary brand representative.Request of type Pinnacle::Brands::Types::BrandContact, as a Hash
|
218
|
+
# * :email (String)
|
219
|
+
# * :name (String)
|
220
|
+
# * :phone (String)
|
221
|
+
# * :title (String)
|
222
|
+
# @param dba [String] "Doing Business As" name - the public name the brand operates under.
|
223
|
+
# @param description [String] Brief description of what the brand does.
|
224
|
+
# @param ein [String] Employer Identification Number (EIN) assigned by the IRS.
|
225
|
+
# @param email [String] Main contact email address for the brand.
|
226
|
+
# @param name [String] Legal name of the brand as registered.
|
227
|
+
# @param sector [Pinnacle::Types::CompanySectorEnum]
|
228
|
+
# @param type [Pinnacle::Types::CompanyTypeEnum]
|
229
|
+
# @param website [String] Brand website URL.
|
230
|
+
# @param request_options [Pinnacle::RequestOptions]
|
231
|
+
# @return [Pinnacle::Types::ValidationResults]
|
232
|
+
# @example
|
233
|
+
# api = Pinnacle::Client.new(
|
234
|
+
# base_url: "https://api.example.com",
|
235
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
236
|
+
# api_key: "YOUR_API_KEY"
|
237
|
+
# )
|
238
|
+
# api.brands.validate(
|
239
|
+
# address: "500 Folsom St, San Francisco, CA 94105",
|
240
|
+
# contact: { email: "michael.chen@trypinnacle.app", name: "Michael Chen", phone: "+14155551234", title: "Customer Support Representative" },
|
241
|
+
# dba: "Pinnacle Messaging",
|
242
|
+
# description: "Pinnacle is an SMS, MMS, and RCS API for scaling conversations with customers you value.",
|
243
|
+
# ein: "88-1234567",
|
244
|
+
# email: "founders@trypinnacle.app",
|
245
|
+
# name: "Pinnacle",
|
246
|
+
# sector: TECHNOLOGY,
|
247
|
+
# type: PRIVATE_PROFIT,
|
248
|
+
# website: "https://www.pinnacle.sh"
|
249
|
+
# )
|
250
|
+
def validate(address:, contact:, description:, email:, name:, sector:, type:, website:, dba: nil, ein: nil,
|
251
|
+
request_options: nil)
|
252
|
+
response = @request_client.conn.post do |req|
|
253
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
254
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
255
|
+
req.headers = {
|
256
|
+
**(req.headers || {}),
|
257
|
+
**@request_client.get_headers,
|
258
|
+
**(request_options&.additional_headers || {})
|
259
|
+
}.compact
|
260
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
261
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
262
|
+
end
|
263
|
+
req.body = {
|
264
|
+
**(request_options&.additional_body_parameters || {}),
|
265
|
+
address: address,
|
266
|
+
contact: contact,
|
267
|
+
dba: dba,
|
268
|
+
description: description,
|
269
|
+
ein: ein,
|
270
|
+
email: email,
|
271
|
+
name: name,
|
272
|
+
sector: sector,
|
273
|
+
type: type,
|
274
|
+
website: website
|
275
|
+
}.compact
|
276
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands/validate"
|
277
|
+
end
|
278
|
+
Pinnacle::Types::ValidationResults.from_json(json_object: response.body)
|
279
|
+
end
|
280
|
+
|
281
|
+
# Submit a brand for external vetting verification to enhance your brand's trust
|
282
|
+
# score and improved message delivery rates.
|
283
|
+
#
|
284
|
+
# @param brand_id [Integer] The unique identifier of the brand to vet. <br>
|
285
|
+
# The brand must be already registered before it can be vetted.
|
286
|
+
# @param request_options [Pinnacle::RequestOptions]
|
287
|
+
# @return [Pinnacle::Types::VettingResults]
|
288
|
+
# @example
|
289
|
+
# api = Pinnacle::Client.new(
|
290
|
+
# base_url: "https://api.example.com",
|
291
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
292
|
+
# api_key: "YOUR_API_KEY"
|
293
|
+
# )
|
294
|
+
# api.brands.vet(brand_id: 1)
|
295
|
+
def vet(brand_id:, request_options: nil)
|
296
|
+
response = @request_client.conn.post do |req|
|
297
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
298
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
299
|
+
req.headers = {
|
300
|
+
**(req.headers || {}),
|
301
|
+
**@request_client.get_headers,
|
302
|
+
**(request_options&.additional_headers || {})
|
303
|
+
}.compact
|
304
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
305
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
306
|
+
end
|
307
|
+
req.body = {
|
308
|
+
**(request_options&.additional_body_parameters || {}),
|
309
|
+
"type": "EXTERNAL",
|
310
|
+
"provider": "AEGIS",
|
311
|
+
"vettingClass": "STANDARD"
|
312
|
+
}.compact
|
313
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands/#{brand_id}/vet"
|
314
|
+
end
|
315
|
+
Pinnacle::Types::VettingResults.from_json(json_object: response.body)
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
319
|
+
class AsyncBrandsClient
|
320
|
+
# @return [Pinnacle::AsyncRequestClient]
|
321
|
+
attr_reader :request_client
|
322
|
+
|
323
|
+
# @param request_client [Pinnacle::AsyncRequestClient]
|
324
|
+
# @return [Pinnacle::AsyncBrandsClient]
|
325
|
+
def initialize(request_client:)
|
326
|
+
@request_client = request_client
|
327
|
+
end
|
328
|
+
|
329
|
+
# Automatically populate brand information based on partial input data you
|
330
|
+
# provide.
|
331
|
+
#
|
332
|
+
# @param additional_info [String] Any extra details about the brand to help improve data accuracy.
|
333
|
+
# @param name [String] Name of the brand.
|
334
|
+
# @param options [Hash] Request of type Pinnacle::Brands::Types::AutofillBrandSchemaOptions, as a Hash
|
335
|
+
# * :force_reload (Boolean)
|
336
|
+
# @param website [String] Brand's website URL.
|
337
|
+
# @param request_options [Pinnacle::RequestOptions]
|
338
|
+
# @return [Pinnacle::Types::OptionalBrandInfo]
|
339
|
+
# @example
|
340
|
+
# api = Pinnacle::Client.new(
|
341
|
+
# base_url: "https://api.example.com",
|
342
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
343
|
+
# api_key: "YOUR_API_KEY"
|
344
|
+
# )
|
345
|
+
# api.brands.autofill(
|
346
|
+
# additional_info: "A developer-friendly, compliant API for SMS, MMS, and RCS, built to scale real conversations.",
|
347
|
+
# name: "Pinnacle",
|
348
|
+
# options: { force_reload: true },
|
349
|
+
# website: "https://www.pinnacle.sh"
|
350
|
+
# )
|
351
|
+
def autofill(additional_info: nil, name: nil, options: nil, website: nil, request_options: nil)
|
352
|
+
Async do
|
353
|
+
response = @request_client.conn.post do |req|
|
354
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
355
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
356
|
+
req.headers = {
|
357
|
+
**(req.headers || {}),
|
358
|
+
**@request_client.get_headers,
|
359
|
+
**(request_options&.additional_headers || {})
|
360
|
+
}.compact
|
361
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
362
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
363
|
+
end
|
364
|
+
req.body = {
|
365
|
+
**(request_options&.additional_body_parameters || {}),
|
366
|
+
additional_info: additional_info,
|
367
|
+
name: name,
|
368
|
+
options: options,
|
369
|
+
website: website
|
370
|
+
}.compact
|
371
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands/autofill"
|
372
|
+
end
|
373
|
+
Pinnacle::Types::OptionalBrandInfo.from_json(json_object: response.body)
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
# Create a new brand or update an existing brand by with the provided information.
|
378
|
+
#
|
379
|
+
# @param address [String] Primary brand address where the company is located.
|
380
|
+
# @param contact [Hash] Contact information for the brand.Request of type Pinnacle::Types::NullableContact, as a Hash
|
381
|
+
# * :email (String)
|
382
|
+
# * :name (String)
|
383
|
+
# * :phone (String)
|
384
|
+
# * :title (String)
|
385
|
+
# @param dba [String] "Doing Business As" name - the public name the brand operates under.
|
386
|
+
# @param description [String] Brief description of what the brand does.
|
387
|
+
# @param ein [String] Brand's Employer Identification Number (EIN) assigned by the IRS.
|
388
|
+
# @param email [String] Main contact email address for the brand.
|
389
|
+
# @param id [Integer] Brand ID - include only when updating an existing brand, omit to create a new
|
390
|
+
# one.
|
391
|
+
# @param name [String] Legal name of the brand as registered.
|
392
|
+
# @param sector [Pinnacle::Types::CompanySectorEnum] Industry the brand operates in.
|
393
|
+
# @param type [Pinnacle::Types::CompanyTypeEnum] Legal structure of the brand.
|
394
|
+
# @param website [String] Brand website URL.
|
395
|
+
# @param request_options [Pinnacle::RequestOptions]
|
396
|
+
# @return [Pinnacle::Types::ExtendedBrand]
|
397
|
+
# @example
|
398
|
+
# api = Pinnacle::Client.new(
|
399
|
+
# base_url: "https://api.example.com",
|
400
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
401
|
+
# api_key: "YOUR_API_KEY"
|
402
|
+
# )
|
403
|
+
# api.brands.upsert(
|
404
|
+
# address: "500 Folsom St, San Francisco, CA 94105",
|
405
|
+
# contact: { email: "michael.chen@trypinnacle.app", name: "Michael Chen", phone: "+14155551234", title: "Customer Support Representative" },
|
406
|
+
# dba: "Pinnacle RCS",
|
407
|
+
# description: "A developer-friendly, compliant API for SMS, MMS, and RCS, built to scale real conversations.",
|
408
|
+
# ein: "88-1234567",
|
409
|
+
# email: "founders@trypinnacle.app",
|
410
|
+
# id: 1,
|
411
|
+
# name: "Pinnacle",
|
412
|
+
# sector: TECHNOLOGY,
|
413
|
+
# type: PRIVATE_PROFIT,
|
414
|
+
# website: "https://www.pinnacle.sh"
|
415
|
+
# )
|
416
|
+
def upsert(address: nil, contact: nil, dba: nil, description: nil, ein: nil, email: nil, id: nil, name: nil,
|
417
|
+
sector: nil, type: nil, website: nil, request_options: nil)
|
418
|
+
Async do
|
419
|
+
response = @request_client.conn.post do |req|
|
420
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
421
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
422
|
+
req.headers = {
|
423
|
+
**(req.headers || {}),
|
424
|
+
**@request_client.get_headers,
|
425
|
+
**(request_options&.additional_headers || {})
|
426
|
+
}.compact
|
427
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
428
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
429
|
+
end
|
430
|
+
req.body = {
|
431
|
+
**(request_options&.additional_body_parameters || {}),
|
432
|
+
address: address,
|
433
|
+
contact: contact,
|
434
|
+
dba: dba,
|
435
|
+
description: description,
|
436
|
+
ein: ein,
|
437
|
+
email: email,
|
438
|
+
id: id,
|
439
|
+
name: name,
|
440
|
+
sector: sector,
|
441
|
+
type: type,
|
442
|
+
website: website
|
443
|
+
}.compact
|
444
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands"
|
445
|
+
end
|
446
|
+
Pinnacle::Types::ExtendedBrand.from_json(json_object: response.body)
|
447
|
+
end
|
448
|
+
end
|
449
|
+
|
450
|
+
# Retrieve detailed information for a specific brand in your account by ID.
|
451
|
+
#
|
452
|
+
# @param id [Integer] ID of an existing brand in your account that you want to retrieve.
|
453
|
+
# @param hide_ein [Boolean] Optional flag to mask the Employer Identification Number in the response for
|
454
|
+
# security purposes.<br>
|
455
|
+
# When you set this to true, the EIN value will be replaced with a masked
|
456
|
+
# placeholder instead of the actual number.
|
457
|
+
# @param request_options [Pinnacle::RequestOptions]
|
458
|
+
# @return [Pinnacle::Types::ExtendedBrandWithVetting]
|
459
|
+
# @example
|
460
|
+
# api = Pinnacle::Client.new(
|
461
|
+
# base_url: "https://api.example.com",
|
462
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
463
|
+
# api_key: "YOUR_API_KEY"
|
464
|
+
# )
|
465
|
+
# api.brands.get(id: 1)
|
466
|
+
def get(id:, hide_ein: nil, request_options: nil)
|
467
|
+
Async do
|
468
|
+
response = @request_client.conn.get do |req|
|
469
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
470
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
471
|
+
req.headers = {
|
472
|
+
**(req.headers || {}),
|
473
|
+
**@request_client.get_headers,
|
474
|
+
**(request_options&.additional_headers || {})
|
475
|
+
}.compact
|
476
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "hideEIN": hide_ein }.compact
|
477
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
478
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
479
|
+
end
|
480
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands/#{id}"
|
481
|
+
end
|
482
|
+
Pinnacle::Types::ExtendedBrandWithVetting.from_json(json_object: response.body)
|
483
|
+
end
|
484
|
+
end
|
485
|
+
|
486
|
+
# Submit your brand for review and approval by the compliance team.
|
487
|
+
#
|
488
|
+
# @param brand_id [Integer] The unique identifier of the brand you want to submit for review. <br>
|
489
|
+
# Must correspond to an existing brand in your account that is ready for
|
490
|
+
# submission.
|
491
|
+
# @param request_options [Pinnacle::RequestOptions]
|
492
|
+
# @return [Pinnacle::Types::SubmissionResults]
|
493
|
+
# @example
|
494
|
+
# api = Pinnacle::Client.new(
|
495
|
+
# base_url: "https://api.example.com",
|
496
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
497
|
+
# api_key: "YOUR_API_KEY"
|
498
|
+
# )
|
499
|
+
# api.brands.submit(brand_id: 1)
|
500
|
+
def submit(brand_id:, request_options: nil)
|
501
|
+
Async do
|
502
|
+
response = @request_client.conn.post do |req|
|
503
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
504
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
505
|
+
req.headers = {
|
506
|
+
**(req.headers || {}),
|
507
|
+
**@request_client.get_headers,
|
508
|
+
**(request_options&.additional_headers || {})
|
509
|
+
}.compact
|
510
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
511
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
512
|
+
end
|
513
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
514
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
515
|
+
end
|
516
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands/#{brand_id}/submit"
|
517
|
+
end
|
518
|
+
Pinnacle::Types::SubmissionResults.from_json(json_object: response.body)
|
519
|
+
end
|
520
|
+
end
|
521
|
+
|
522
|
+
# Validate your brand information for compliance and correctness before submission
|
523
|
+
# or storage.
|
524
|
+
#
|
525
|
+
# @param address [String] Primary brand address where the brand is located.
|
526
|
+
# @param contact [Hash] Contact information for the primary brand representative.Request of type Pinnacle::Brands::Types::BrandContact, as a Hash
|
527
|
+
# * :email (String)
|
528
|
+
# * :name (String)
|
529
|
+
# * :phone (String)
|
530
|
+
# * :title (String)
|
531
|
+
# @param dba [String] "Doing Business As" name - the public name the brand operates under.
|
532
|
+
# @param description [String] Brief description of what the brand does.
|
533
|
+
# @param ein [String] Employer Identification Number (EIN) assigned by the IRS.
|
534
|
+
# @param email [String] Main contact email address for the brand.
|
535
|
+
# @param name [String] Legal name of the brand as registered.
|
536
|
+
# @param sector [Pinnacle::Types::CompanySectorEnum]
|
537
|
+
# @param type [Pinnacle::Types::CompanyTypeEnum]
|
538
|
+
# @param website [String] Brand website URL.
|
539
|
+
# @param request_options [Pinnacle::RequestOptions]
|
540
|
+
# @return [Pinnacle::Types::ValidationResults]
|
541
|
+
# @example
|
542
|
+
# api = Pinnacle::Client.new(
|
543
|
+
# base_url: "https://api.example.com",
|
544
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
545
|
+
# api_key: "YOUR_API_KEY"
|
546
|
+
# )
|
547
|
+
# api.brands.validate(
|
548
|
+
# address: "500 Folsom St, San Francisco, CA 94105",
|
549
|
+
# contact: { email: "michael.chen@trypinnacle.app", name: "Michael Chen", phone: "+14155551234", title: "Customer Support Representative" },
|
550
|
+
# dba: "Pinnacle Messaging",
|
551
|
+
# description: "Pinnacle is an SMS, MMS, and RCS API for scaling conversations with customers you value.",
|
552
|
+
# ein: "88-1234567",
|
553
|
+
# email: "founders@trypinnacle.app",
|
554
|
+
# name: "Pinnacle",
|
555
|
+
# sector: TECHNOLOGY,
|
556
|
+
# type: PRIVATE_PROFIT,
|
557
|
+
# website: "https://www.pinnacle.sh"
|
558
|
+
# )
|
559
|
+
def validate(address:, contact:, description:, email:, name:, sector:, type:, website:, dba: nil, ein: nil,
|
560
|
+
request_options: nil)
|
561
|
+
Async do
|
562
|
+
response = @request_client.conn.post do |req|
|
563
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
564
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
565
|
+
req.headers = {
|
566
|
+
**(req.headers || {}),
|
567
|
+
**@request_client.get_headers,
|
568
|
+
**(request_options&.additional_headers || {})
|
569
|
+
}.compact
|
570
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
571
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
572
|
+
end
|
573
|
+
req.body = {
|
574
|
+
**(request_options&.additional_body_parameters || {}),
|
575
|
+
address: address,
|
576
|
+
contact: contact,
|
577
|
+
dba: dba,
|
578
|
+
description: description,
|
579
|
+
ein: ein,
|
580
|
+
email: email,
|
581
|
+
name: name,
|
582
|
+
sector: sector,
|
583
|
+
type: type,
|
584
|
+
website: website
|
585
|
+
}.compact
|
586
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands/validate"
|
587
|
+
end
|
588
|
+
Pinnacle::Types::ValidationResults.from_json(json_object: response.body)
|
589
|
+
end
|
590
|
+
end
|
591
|
+
|
592
|
+
# Submit a brand for external vetting verification to enhance your brand's trust
|
593
|
+
# score and improved message delivery rates.
|
594
|
+
#
|
595
|
+
# @param brand_id [Integer] The unique identifier of the brand to vet. <br>
|
596
|
+
# The brand must be already registered before it can be vetted.
|
597
|
+
# @param request_options [Pinnacle::RequestOptions]
|
598
|
+
# @return [Pinnacle::Types::VettingResults]
|
599
|
+
# @example
|
600
|
+
# api = Pinnacle::Client.new(
|
601
|
+
# base_url: "https://api.example.com",
|
602
|
+
# environment: Pinnacle::Environment::DEFAULT,
|
603
|
+
# api_key: "YOUR_API_KEY"
|
604
|
+
# )
|
605
|
+
# api.brands.vet(brand_id: 1)
|
606
|
+
def vet(brand_id:, request_options: nil)
|
607
|
+
Async do
|
608
|
+
response = @request_client.conn.post do |req|
|
609
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
610
|
+
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
611
|
+
req.headers = {
|
612
|
+
**(req.headers || {}),
|
613
|
+
**@request_client.get_headers,
|
614
|
+
**(request_options&.additional_headers || {})
|
615
|
+
}.compact
|
616
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
617
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
618
|
+
end
|
619
|
+
req.body = {
|
620
|
+
**(request_options&.additional_body_parameters || {}),
|
621
|
+
"type": "EXTERNAL",
|
622
|
+
"provider": "AEGIS",
|
623
|
+
"vettingClass": "STANDARD"
|
624
|
+
}.compact
|
625
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/brands/#{brand_id}/vet"
|
626
|
+
end
|
627
|
+
Pinnacle::Types::VettingResults.from_json(json_object: response.body)
|
628
|
+
end
|
629
|
+
end
|
630
|
+
end
|
631
|
+
end
|