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
data/lib/rcs/company/client.rb
DELETED
@@ -1,375 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "../../requests"
|
4
|
-
require_relative "../types/company"
|
5
|
-
require "json"
|
6
|
-
require_relative "types/company_register_request"
|
7
|
-
require_relative "types/company_register_response"
|
8
|
-
require_relative "../types/company_contact"
|
9
|
-
require_relative "../types/messaging"
|
10
|
-
require_relative "../types/point_of_contact"
|
11
|
-
require_relative "../types/optionals"
|
12
|
-
require_relative "types/company_update_response"
|
13
|
-
require "async"
|
14
|
-
|
15
|
-
module Pinnacle
|
16
|
-
class CompanyClient
|
17
|
-
# @return [Pinnacle::RequestClient]
|
18
|
-
attr_reader :request_client
|
19
|
-
|
20
|
-
# @param request_client [Pinnacle::RequestClient]
|
21
|
-
# @return [Pinnacle::CompanyClient]
|
22
|
-
def initialize(request_client:)
|
23
|
-
@request_client = request_client
|
24
|
-
end
|
25
|
-
|
26
|
-
# Retrieve the company's information (i.e. approval status, company name, etc.).
|
27
|
-
# Search by company ID or company name.
|
28
|
-
#
|
29
|
-
# @param company_id [Integer] The unique identifier for the company
|
30
|
-
# @param company_name [String] The name of the company
|
31
|
-
# @param request_options [Pinnacle::RequestOptions]
|
32
|
-
# @return [Array<Pinnacle::Company>]
|
33
|
-
# @example
|
34
|
-
# api = Pinnacle::Client.new(
|
35
|
-
# base_url: "https://api.example.com",
|
36
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
37
|
-
# api_key: "YOUR_API_KEY"
|
38
|
-
# )
|
39
|
-
# api.company.get
|
40
|
-
def get(company_id: nil, company_name: nil, request_options: nil)
|
41
|
-
response = @request_client.conn.get do |req|
|
42
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
43
|
-
req.headers["PINNACLE-API-Key"] = request_options.api_key unless request_options&.api_key.nil?
|
44
|
-
req.headers = {
|
45
|
-
**(req.headers || {}),
|
46
|
-
**@request_client.get_headers,
|
47
|
-
**(request_options&.additional_headers || {})
|
48
|
-
}.compact
|
49
|
-
req.params = {
|
50
|
-
**(request_options&.additional_query_parameters || {}),
|
51
|
-
"companyId": company_id,
|
52
|
-
"companyName": company_name
|
53
|
-
}.compact
|
54
|
-
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
55
|
-
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
56
|
-
end
|
57
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/company"
|
58
|
-
end
|
59
|
-
parsed_json = JSON.parse(response.body)
|
60
|
-
parsed_json&.map do |item|
|
61
|
-
item = item.to_json
|
62
|
-
Pinnacle::Company.from_json(json_object: item)
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Register a company for RCS with the Pinnacle platform
|
67
|
-
#
|
68
|
-
# @param request [Pinnacle::Company::CompanyRegisterRequestCompanyId, Pinnacle::Company::CompanyRegisterRequestCompany]
|
69
|
-
# @param request_options [Pinnacle::RequestOptions]
|
70
|
-
# @return [Pinnacle::Company::CompanyRegisterResponse]
|
71
|
-
# @example
|
72
|
-
# api = Pinnacle::Client.new(
|
73
|
-
# base_url: "https://api.example.com",
|
74
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
75
|
-
# api_key: "YOUR_API_KEY"
|
76
|
-
# )
|
77
|
-
# api.company.register(request: { company_id: "companyId" })
|
78
|
-
def register(request:, request_options: nil)
|
79
|
-
response = @request_client.conn.post do |req|
|
80
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
81
|
-
req.headers["PINNACLE-API-Key"] = request_options.api_key unless request_options&.api_key.nil?
|
82
|
-
req.headers = {
|
83
|
-
**(req.headers || {}),
|
84
|
-
**@request_client.get_headers,
|
85
|
-
**(request_options&.additional_headers || {})
|
86
|
-
}.compact
|
87
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
88
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
89
|
-
end
|
90
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
91
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/company/register"
|
92
|
-
end
|
93
|
-
Pinnacle::Company::CompanyRegisterResponse.from_json(json_object: response.body)
|
94
|
-
end
|
95
|
-
|
96
|
-
# Upsert a company on the Pinnacle platform
|
97
|
-
#
|
98
|
-
# @param company_id [String] Optional company ID. If provided, updates existing company. If not provided,
|
99
|
-
# creates a new company.
|
100
|
-
# @param company [Hash] Request of type Pinnacle::Company, as a Hash
|
101
|
-
# * :id (Integer)
|
102
|
-
# * :created_at (DateTime)
|
103
|
-
# * :name (String)
|
104
|
-
# * :category (Pinnacle::CompanyCategory)
|
105
|
-
# * :address (String)
|
106
|
-
# * :ein (String)
|
107
|
-
# * :description (String)
|
108
|
-
# * :brand_color (String)
|
109
|
-
# * :logo_url (String)
|
110
|
-
# * :hero_url (String)
|
111
|
-
# * :primary_website_url (String)
|
112
|
-
# * :primary_website_label (String)
|
113
|
-
# * :primary_phone (String)
|
114
|
-
# * :primary_phone_label (String)
|
115
|
-
# * :primary_email (String)
|
116
|
-
# * :primary_email_label (String)
|
117
|
-
# * :privacy_policy_url (String)
|
118
|
-
# * :tos_url (String)
|
119
|
-
# * :poc_name (String)
|
120
|
-
# * :poc_title (String)
|
121
|
-
# * :poc_email (String)
|
122
|
-
# * :opt_in (String)
|
123
|
-
# * :opt_out (String)
|
124
|
-
# * :opt_out_keywords (Array<String>)
|
125
|
-
# * :agent_use_case (String)
|
126
|
-
# * :expected_agent_responses (String)
|
127
|
-
# * :test_numbers (Array<String>)
|
128
|
-
# * :status (String)
|
129
|
-
# * :additional_websites (Array<Pinnacle::CompanyAdditionalWebsitesItem>)
|
130
|
-
# * :additional_emails (Array<Pinnacle::CompanyAdditionalEmailsItem>)
|
131
|
-
# * :additional_phone_numbers (Array<Pinnacle::CompanyAdditionalPhoneNumbersItem>)
|
132
|
-
# @param company_contact [Hash] Request of type Pinnacle::CompanyContact, as a Hash
|
133
|
-
# * :primary_website_url (String)
|
134
|
-
# * :primary_website_label (String)
|
135
|
-
# * :primary_phone (String)
|
136
|
-
# * :primary_phone_label (String)
|
137
|
-
# * :primary_email (String)
|
138
|
-
# * :primary_email_label (String)
|
139
|
-
# * :privacy_policy_url (String)
|
140
|
-
# * :tos_url (String)
|
141
|
-
# @param messaging [Hash] Request of type Pinnacle::Messaging, as a Hash
|
142
|
-
# * :opt_in (String)
|
143
|
-
# * :opt_out (String)
|
144
|
-
# * :opt_out_keywords (Array<String>)
|
145
|
-
# * :agent_use_case (String)
|
146
|
-
# * :expected_agent_responses (String)
|
147
|
-
# @param point_of_contact [Hash] Request of type Pinnacle::PointOfContact, as a Hash
|
148
|
-
# * :poc_name (String)
|
149
|
-
# * :poc_title (String)
|
150
|
-
# * :poc_email (String)
|
151
|
-
# @param optionals [Hash] Request of type Pinnacle::Optionals, as a Hash
|
152
|
-
# * :additional_websites (Array<Pinnacle::AdditionalWebsite>)
|
153
|
-
# * :additional_phone_numbers (Array<Pinnacle::AdditionalPhoneNumber>)
|
154
|
-
# * :additional_emails (Array<Pinnacle::AdditionalEmail>)
|
155
|
-
# * :test_numbers (Array<String>)
|
156
|
-
# @param request_options [Pinnacle::RequestOptions]
|
157
|
-
# @return [Pinnacle::Company::CompanyUpdateResponse]
|
158
|
-
# @example
|
159
|
-
# api = Pinnacle::Client.new(
|
160
|
-
# base_url: "https://api.example.com",
|
161
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
162
|
-
# api_key: "YOUR_API_KEY"
|
163
|
-
# )
|
164
|
-
# api.company.update
|
165
|
-
def update(company_id: nil, company: nil, company_contact: nil, messaging: nil, point_of_contact: nil,
|
166
|
-
optionals: nil, request_options: nil)
|
167
|
-
response = @request_client.conn.post do |req|
|
168
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
169
|
-
req.headers["PINNACLE-API-Key"] = request_options.api_key unless request_options&.api_key.nil?
|
170
|
-
req.headers = {
|
171
|
-
**(req.headers || {}),
|
172
|
-
**@request_client.get_headers,
|
173
|
-
**(request_options&.additional_headers || {})
|
174
|
-
}.compact
|
175
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
176
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
177
|
-
end
|
178
|
-
req.body = {
|
179
|
-
**(request_options&.additional_body_parameters || {}),
|
180
|
-
companyId: company_id,
|
181
|
-
company: company,
|
182
|
-
companyContact: company_contact,
|
183
|
-
messaging: messaging,
|
184
|
-
pointOfContact: point_of_contact,
|
185
|
-
optionals: optionals
|
186
|
-
}.compact
|
187
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/company/update"
|
188
|
-
end
|
189
|
-
Pinnacle::Company::CompanyUpdateResponse.from_json(json_object: response.body)
|
190
|
-
end
|
191
|
-
end
|
192
|
-
|
193
|
-
class AsyncCompanyClient
|
194
|
-
# @return [Pinnacle::AsyncRequestClient]
|
195
|
-
attr_reader :request_client
|
196
|
-
|
197
|
-
# @param request_client [Pinnacle::AsyncRequestClient]
|
198
|
-
# @return [Pinnacle::AsyncCompanyClient]
|
199
|
-
def initialize(request_client:)
|
200
|
-
@request_client = request_client
|
201
|
-
end
|
202
|
-
|
203
|
-
# Retrieve the company's information (i.e. approval status, company name, etc.).
|
204
|
-
# Search by company ID or company name.
|
205
|
-
#
|
206
|
-
# @param company_id [Integer] The unique identifier for the company
|
207
|
-
# @param company_name [String] The name of the company
|
208
|
-
# @param request_options [Pinnacle::RequestOptions]
|
209
|
-
# @return [Array<Pinnacle::Company>]
|
210
|
-
# @example
|
211
|
-
# api = Pinnacle::Client.new(
|
212
|
-
# base_url: "https://api.example.com",
|
213
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
214
|
-
# api_key: "YOUR_API_KEY"
|
215
|
-
# )
|
216
|
-
# api.company.get
|
217
|
-
def get(company_id: nil, company_name: nil, request_options: nil)
|
218
|
-
Async do
|
219
|
-
response = @request_client.conn.get do |req|
|
220
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
221
|
-
req.headers["PINNACLE-API-Key"] = request_options.api_key unless request_options&.api_key.nil?
|
222
|
-
req.headers = {
|
223
|
-
**(req.headers || {}),
|
224
|
-
**@request_client.get_headers,
|
225
|
-
**(request_options&.additional_headers || {})
|
226
|
-
}.compact
|
227
|
-
req.params = {
|
228
|
-
**(request_options&.additional_query_parameters || {}),
|
229
|
-
"companyId": company_id,
|
230
|
-
"companyName": company_name
|
231
|
-
}.compact
|
232
|
-
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
233
|
-
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
234
|
-
end
|
235
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/company"
|
236
|
-
end
|
237
|
-
parsed_json = JSON.parse(response.body)
|
238
|
-
parsed_json&.map do |item|
|
239
|
-
item = item.to_json
|
240
|
-
Pinnacle::Company.from_json(json_object: item)
|
241
|
-
end
|
242
|
-
end
|
243
|
-
end
|
244
|
-
|
245
|
-
# Register a company for RCS with the Pinnacle platform
|
246
|
-
#
|
247
|
-
# @param request [Pinnacle::Company::CompanyRegisterRequestCompanyId, Pinnacle::Company::CompanyRegisterRequestCompany]
|
248
|
-
# @param request_options [Pinnacle::RequestOptions]
|
249
|
-
# @return [Pinnacle::Company::CompanyRegisterResponse]
|
250
|
-
# @example
|
251
|
-
# api = Pinnacle::Client.new(
|
252
|
-
# base_url: "https://api.example.com",
|
253
|
-
# environment: Pinnacle::Environment::DEFAULT,
|
254
|
-
# api_key: "YOUR_API_KEY"
|
255
|
-
# )
|
256
|
-
# api.company.register(request: { company_id: "companyId" })
|
257
|
-
def register(request:, request_options: nil)
|
258
|
-
Async do
|
259
|
-
response = @request_client.conn.post do |req|
|
260
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
261
|
-
req.headers["PINNACLE-API-Key"] = request_options.api_key unless request_options&.api_key.nil?
|
262
|
-
req.headers = {
|
263
|
-
**(req.headers || {}),
|
264
|
-
**@request_client.get_headers,
|
265
|
-
**(request_options&.additional_headers || {})
|
266
|
-
}.compact
|
267
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
268
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
269
|
-
end
|
270
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
271
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/company/register"
|
272
|
-
end
|
273
|
-
Pinnacle::Company::CompanyRegisterResponse.from_json(json_object: response.body)
|
274
|
-
end
|
275
|
-
end
|
276
|
-
|
277
|
-
# Upsert a company on the Pinnacle platform
|
278
|
-
#
|
279
|
-
# @param company_id [String] Optional company ID. If provided, updates existing company. If not provided,
|
280
|
-
# creates a new company.
|
281
|
-
# @param company [Hash] Request of type Pinnacle::Company, as a Hash
|
282
|
-
# * :id (Integer)
|
283
|
-
# * :created_at (DateTime)
|
284
|
-
# * :name (String)
|
285
|
-
# * :category (Pinnacle::CompanyCategory)
|
286
|
-
# * :address (String)
|
287
|
-
# * :ein (String)
|
288
|
-
# * :description (String)
|
289
|
-
# * :brand_color (String)
|
290
|
-
# * :logo_url (String)
|
291
|
-
# * :hero_url (String)
|
292
|
-
# * :primary_website_url (String)
|
293
|
-
# * :primary_website_label (String)
|
294
|
-
# * :primary_phone (String)
|
295
|
-
# * :primary_phone_label (String)
|
296
|
-
# * :primary_email (String)
|
297
|
-
# * :primary_email_label (String)
|
298
|
-
# * :privacy_policy_url (String)
|
299
|
-
# * :tos_url (String)
|
300
|
-
# * :poc_name (String)
|
301
|
-
# * :poc_title (String)
|
302
|
-
# * :poc_email (String)
|
303
|
-
# * :opt_in (String)
|
304
|
-
# * :opt_out (String)
|
305
|
-
# * :opt_out_keywords (Array<String>)
|
306
|
-
# * :agent_use_case (String)
|
307
|
-
# * :expected_agent_responses (String)
|
308
|
-
# * :test_numbers (Array<String>)
|
309
|
-
# * :status (String)
|
310
|
-
# * :additional_websites (Array<Pinnacle::CompanyAdditionalWebsitesItem>)
|
311
|
-
# * :additional_emails (Array<Pinnacle::CompanyAdditionalEmailsItem>)
|
312
|
-
# * :additional_phone_numbers (Array<Pinnacle::CompanyAdditionalPhoneNumbersItem>)
|
313
|
-
# @param company_contact [Hash] Request of type Pinnacle::CompanyContact, as a Hash
|
314
|
-
# * :primary_website_url (String)
|
315
|
-
# * :primary_website_label (String)
|
316
|
-
# * :primary_phone (String)
|
317
|
-
# * :primary_phone_label (String)
|
318
|
-
# * :primary_email (String)
|
319
|
-
# * :primary_email_label (String)
|
320
|
-
# * :privacy_policy_url (String)
|
321
|
-
# * :tos_url (String)
|
322
|
-
# @param messaging [Hash] Request of type Pinnacle::Messaging, as a Hash
|
323
|
-
# * :opt_in (String)
|
324
|
-
# * :opt_out (String)
|
325
|
-
# * :opt_out_keywords (Array<String>)
|
326
|
-
# * :agent_use_case (String)
|
327
|
-
# * :expected_agent_responses (String)
|
328
|
-
# @param point_of_contact [Hash] Request of type Pinnacle::PointOfContact, as a Hash
|
329
|
-
# * :poc_name (String)
|
330
|
-
# * :poc_title (String)
|
331
|
-
# * :poc_email (String)
|
332
|
-
# @param optionals [Hash] Request of type Pinnacle::Optionals, as a Hash
|
333
|
-
# * :additional_websites (Array<Pinnacle::AdditionalWebsite>)
|
334
|
-
# * :additional_phone_numbers (Array<Pinnacle::AdditionalPhoneNumber>)
|
335
|
-
# * :additional_emails (Array<Pinnacle::AdditionalEmail>)
|
336
|
-
# * :test_numbers (Array<String>)
|
337
|
-
# @param request_options [Pinnacle::RequestOptions]
|
338
|
-
# @return [Pinnacle::Company::CompanyUpdateResponse]
|
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.company.update
|
346
|
-
def update(company_id: nil, company: nil, company_contact: nil, messaging: nil, point_of_contact: nil,
|
347
|
-
optionals: nil, request_options: nil)
|
348
|
-
Async do
|
349
|
-
response = @request_client.conn.post do |req|
|
350
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
351
|
-
req.headers["PINNACLE-API-Key"] = request_options.api_key unless request_options&.api_key.nil?
|
352
|
-
req.headers = {
|
353
|
-
**(req.headers || {}),
|
354
|
-
**@request_client.get_headers,
|
355
|
-
**(request_options&.additional_headers || {})
|
356
|
-
}.compact
|
357
|
-
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
358
|
-
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
359
|
-
end
|
360
|
-
req.body = {
|
361
|
-
**(request_options&.additional_body_parameters || {}),
|
362
|
-
companyId: company_id,
|
363
|
-
company: company,
|
364
|
-
companyContact: company_contact,
|
365
|
-
messaging: messaging,
|
366
|
-
pointOfContact: point_of_contact,
|
367
|
-
optionals: optionals
|
368
|
-
}.compact
|
369
|
-
req.url "#{@request_client.get_url(request_options: request_options)}/company/update"
|
370
|
-
end
|
371
|
-
Pinnacle::Company::CompanyUpdateResponse.from_json(json_object: response.body)
|
372
|
-
end
|
373
|
-
end
|
374
|
-
end
|
375
|
-
end
|
@@ -1,128 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "../../types/company_details"
|
4
|
-
require_relative "../../types/company_contact"
|
5
|
-
require_relative "../../types/messaging"
|
6
|
-
require_relative "../../types/point_of_contact"
|
7
|
-
require_relative "../../types/optionals"
|
8
|
-
require "ostruct"
|
9
|
-
require "json"
|
10
|
-
|
11
|
-
module Pinnacle
|
12
|
-
class Company
|
13
|
-
# Register a new company
|
14
|
-
class CompanyRegisterRequestCompany
|
15
|
-
# @return [Pinnacle::CompanyDetails]
|
16
|
-
attr_reader :company
|
17
|
-
# @return [Pinnacle::CompanyContact]
|
18
|
-
attr_reader :company_contact
|
19
|
-
# @return [Pinnacle::Messaging]
|
20
|
-
attr_reader :messaging
|
21
|
-
# @return [Pinnacle::PointOfContact]
|
22
|
-
attr_reader :point_of_contact
|
23
|
-
# @return [Pinnacle::Optionals]
|
24
|
-
attr_reader :optionals
|
25
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
-
attr_reader :additional_properties
|
27
|
-
# @return [Object]
|
28
|
-
attr_reader :_field_set
|
29
|
-
protected :_field_set
|
30
|
-
|
31
|
-
OMIT = Object.new
|
32
|
-
|
33
|
-
# @param company [Pinnacle::CompanyDetails]
|
34
|
-
# @param company_contact [Pinnacle::CompanyContact]
|
35
|
-
# @param messaging [Pinnacle::Messaging]
|
36
|
-
# @param point_of_contact [Pinnacle::PointOfContact]
|
37
|
-
# @param optionals [Pinnacle::Optionals]
|
38
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
39
|
-
# @return [Pinnacle::Company::CompanyRegisterRequestCompany]
|
40
|
-
def initialize(company:, company_contact:, messaging:, point_of_contact:, optionals: OMIT,
|
41
|
-
additional_properties: nil)
|
42
|
-
@company = company
|
43
|
-
@company_contact = company_contact
|
44
|
-
@messaging = messaging
|
45
|
-
@point_of_contact = point_of_contact
|
46
|
-
@optionals = optionals if optionals != OMIT
|
47
|
-
@additional_properties = additional_properties
|
48
|
-
@_field_set = {
|
49
|
-
"company": company,
|
50
|
-
"companyContact": company_contact,
|
51
|
-
"messaging": messaging,
|
52
|
-
"pointOfContact": point_of_contact,
|
53
|
-
"optionals": optionals
|
54
|
-
}.reject do |_k, v|
|
55
|
-
v == OMIT
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
# Deserialize a JSON object to an instance of CompanyRegisterRequestCompany
|
60
|
-
#
|
61
|
-
# @param json_object [String]
|
62
|
-
# @return [Pinnacle::Company::CompanyRegisterRequestCompany]
|
63
|
-
def self.from_json(json_object:)
|
64
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
65
|
-
parsed_json = JSON.parse(json_object)
|
66
|
-
if parsed_json["company"].nil?
|
67
|
-
company = nil
|
68
|
-
else
|
69
|
-
company = parsed_json["company"].to_json
|
70
|
-
company = Pinnacle::CompanyDetails.from_json(json_object: company)
|
71
|
-
end
|
72
|
-
if parsed_json["companyContact"].nil?
|
73
|
-
company_contact = nil
|
74
|
-
else
|
75
|
-
company_contact = parsed_json["companyContact"].to_json
|
76
|
-
company_contact = Pinnacle::CompanyContact.from_json(json_object: company_contact)
|
77
|
-
end
|
78
|
-
if parsed_json["messaging"].nil?
|
79
|
-
messaging = nil
|
80
|
-
else
|
81
|
-
messaging = parsed_json["messaging"].to_json
|
82
|
-
messaging = Pinnacle::Messaging.from_json(json_object: messaging)
|
83
|
-
end
|
84
|
-
if parsed_json["pointOfContact"].nil?
|
85
|
-
point_of_contact = nil
|
86
|
-
else
|
87
|
-
point_of_contact = parsed_json["pointOfContact"].to_json
|
88
|
-
point_of_contact = Pinnacle::PointOfContact.from_json(json_object: point_of_contact)
|
89
|
-
end
|
90
|
-
if parsed_json["optionals"].nil?
|
91
|
-
optionals = nil
|
92
|
-
else
|
93
|
-
optionals = parsed_json["optionals"].to_json
|
94
|
-
optionals = Pinnacle::Optionals.from_json(json_object: optionals)
|
95
|
-
end
|
96
|
-
new(
|
97
|
-
company: company,
|
98
|
-
company_contact: company_contact,
|
99
|
-
messaging: messaging,
|
100
|
-
point_of_contact: point_of_contact,
|
101
|
-
optionals: optionals,
|
102
|
-
additional_properties: struct
|
103
|
-
)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Serialize an instance of CompanyRegisterRequestCompany to a JSON object
|
107
|
-
#
|
108
|
-
# @return [String]
|
109
|
-
def to_json(*_args)
|
110
|
-
@_field_set&.to_json
|
111
|
-
end
|
112
|
-
|
113
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
114
|
-
# hash and check each fields type against the current object's property
|
115
|
-
# definitions.
|
116
|
-
#
|
117
|
-
# @param obj [Object]
|
118
|
-
# @return [Void]
|
119
|
-
def self.validate_raw(obj:)
|
120
|
-
Pinnacle::CompanyDetails.validate_raw(obj: obj.company)
|
121
|
-
Pinnacle::CompanyContact.validate_raw(obj: obj.company_contact)
|
122
|
-
Pinnacle::Messaging.validate_raw(obj: obj.messaging)
|
123
|
-
Pinnacle::PointOfContact.validate_raw(obj: obj.point_of_contact)
|
124
|
-
obj.optionals.nil? || Pinnacle::Optionals.validate_raw(obj: obj.optionals)
|
125
|
-
end
|
126
|
-
end
|
127
|
-
end
|
128
|
-
end
|