rcs 1.0.18 → 2.0.0.pre.rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/environment.rb +1 -1
- data/lib/rcs/brands/client.rb +631 -0
- data/lib/rcs/brands/types/autofill_brand_schema_options.rb +61 -0
- data/lib/rcs/brands/types/brand_contact.rb +84 -0
- data/lib/rcs/campaigns/client.rb +44 -0
- data/lib/rcs/campaigns/dlc/client.rb +480 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords.rb +99 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_help.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_in.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_out.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_links.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_options.rb +110 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_use_case.rb +76 -0
- data/lib/rcs/campaigns/rcs/client.rb +457 -0
- data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +155 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent.rb +140 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_emails_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_phones_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_websites_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_links.rb +74 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_in.rb +75 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_out.rb +76 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_use_case.rb +75 -0
- data/lib/rcs/campaigns/toll_free/client.rb +429 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +130 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_opt_in.rb +86 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_use_case.rb +75 -0
- data/lib/rcs/contacts/client.rb +275 -0
- data/lib/rcs/conversations/client.rb +273 -0
- data/lib/rcs/message/client.rb +30 -0
- data/lib/rcs/message/sms/client.rb +96 -0
- data/lib/rcs/messages/client.rb +192 -0
- data/lib/rcs/messages/mms/client.rb +98 -0
- data/lib/rcs/messages/rcs/client.rb +94 -0
- data/lib/rcs/messages/send/client.rb +318 -0
- data/lib/rcs/messages/send/types/send_mms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_mms_schema_options.rb +108 -0
- data/lib/rcs/messages/send/types/send_rcs_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_schema_options.rb +81 -0
- data/lib/rcs/messages/types/message_reaction_schema_options.rb +71 -0
- data/lib/rcs/phone_numbers/campaign/client.rb +179 -0
- data/lib/rcs/phone_numbers/client.rb +359 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_level.rb +16 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options.rb +93 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options_enhanced_contact_info.rb +64 -0
- data/lib/rcs/phone_numbers/types/phone_numbers_get_response.rb +58 -0
- data/lib/rcs/phone_numbers/types/search_schema_location.rb +96 -0
- data/lib/rcs/phone_numbers/types/search_schema_number.rb +81 -0
- data/lib/rcs/phone_numbers/types/search_schema_options.rb +62 -0
- data/lib/rcs/phone_numbers/webhook/client.rb +191 -0
- data/lib/rcs/status/client.rb +30 -0
- data/lib/rcs/status/get/client.rb +367 -0
- data/lib/rcs/tools/client.rb +32 -199
- data/lib/rcs/tools/contact_card/client.rb +285 -0
- data/lib/rcs/tools/contact_card/types/get_v_card_schema_options.rb +67 -0
- data/lib/rcs/tools/file/client.rb +138 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options.rb +70 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options_download.rb +66 -0
- data/lib/rcs/tools/url/client.rb +245 -0
- data/lib/rcs/types/advanced_phone_information.rb +147 -0
- data/lib/rcs/types/advanced_phone_information_carrier.rb +90 -0
- data/lib/rcs/types/advanced_phone_information_contact.rb +146 -0
- data/lib/rcs/types/advanced_phone_information_location.rb +142 -0
- data/lib/rcs/types/advanced_phone_information_location_coordinates.rb +73 -0
- data/lib/rcs/types/advanced_phone_information_location_country.rb +77 -0
- data/lib/rcs/types/advanced_phone_information_type.rb +97 -0
- data/lib/rcs/types/advanced_phone_information_type_recommendation.rb +15 -0
- data/lib/rcs/types/agent.rb +68 -0
- data/lib/rcs/types/attach_webhook_params.rb +60 -0
- data/lib/rcs/types/attach_webhook_response_webhook.rb +86 -0
- data/lib/rcs/types/attach_webhook_schema_name.rb +88 -0
- data/lib/rcs/types/attach_webhook_schema_webhook_id.rb +77 -0
- data/lib/rcs/types/attached_phone_number_result.rb +75 -0
- data/lib/rcs/types/autofill_campaign_params.rb +69 -0
- data/lib/rcs/types/autofill_dlc_campaign_response.rb +169 -0
- data/lib/rcs/types/autofill_dlc_response_keywords.rb +95 -0
- data/lib/rcs/types/autofill_dlc_response_keywords_help.rb +70 -0
- data/lib/rcs/{send/types/send_sms_response.rb → types/autofill_dlc_response_keywords_opt_in.rb} +18 -17
- data/lib/rcs/types/autofill_dlc_response_keywords_opt_out.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_links.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_options.rb +106 -0
- data/lib/rcs/types/autofill_dlc_response_use_case.rb +72 -0
- data/lib/rcs/types/bad_request_error_body.rb +44 -45
- data/lib/rcs/types/basic_phone_information.rb +127 -0
- data/lib/rcs/{company/types/company_register_response_brand.rb → types/basic_phone_information_contact.rb} +12 -21
- data/lib/rcs/types/basic_phone_information_location.rb +74 -0
- data/lib/rcs/types/basic_phone_information_location_country.rb +75 -0
- data/lib/rcs/types/brand_status.rb +92 -0
- data/lib/rcs/types/brand_status_enum.rb +21 -0
- data/lib/rcs/types/buy_response_capabilities.rb +77 -0
- data/lib/rcs/types/campaign_enum.rb +15 -0
- data/lib/rcs/types/campaign_query.rb +69 -0
- data/lib/rcs/{company/types/company_register_request_company_id.rb → types/campaign_submission_result.rb} +15 -16
- data/lib/rcs/types/campaign_validation_response_errors_item.rb +76 -0
- data/lib/rcs/types/campaign_validation_result.rb +71 -0
- data/lib/rcs/types/click_action.rb +73 -0
- data/lib/rcs/types/click_action_data.rb +56 -0
- data/lib/rcs/types/click_action_data_metadata.rb +69 -0
- data/lib/rcs/types/company_sector_enum.rb +26 -0
- data/lib/rcs/types/company_type_enum.rb +14 -0
- data/lib/rcs/types/configured_webhook.rb +85 -0
- data/lib/rcs/types/contact.rb +105 -0
- data/lib/rcs/types/contact_id.rb +57 -0
- data/lib/rcs/types/conversation.rb +146 -0
- data/lib/rcs/types/conversation_contact.rb +68 -0
- data/lib/rcs/types/conversation_list.rb +79 -0
- data/lib/rcs/types/conversation_sender.rb +60 -0
- data/lib/rcs/types/create_url_options.rb +61 -0
- data/lib/rcs/types/detached_phone_number_result.rb +75 -0
- data/lib/rcs/types/detached_webhook_info.rb +74 -0
- data/lib/rcs/types/detailed_phone_number_enum.rb +25 -0
- data/lib/rcs/types/dlc_assignment_status_enum.rb +19 -0
- data/lib/rcs/types/dlc_campaign_status.rb +107 -0
- data/lib/rcs/types/dlc_campaign_use_case_enum.rb +35 -0
- data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +194 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords.rb +94 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_help.rb +72 -0
- data/lib/rcs/{send/types/send_mms_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_in.rb} +20 -17
- data/lib/rcs/{send/types/send_rcs_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_out.rb} +20 -17
- data/lib/rcs/types/dlc_with_extended_brand_and_status_links.rb +70 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_options.rb +106 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_use_case.rb +72 -0
- data/lib/rcs/types/enhanced_contact.rb +9 -0
- data/lib/rcs/types/enhanced_contact_item.rb +104 -0
- data/lib/rcs/types/error.rb +61 -0
- data/lib/rcs/types/extended_brand.rb +194 -0
- data/lib/rcs/types/extended_brand_with_vetting.rb +226 -0
- data/lib/rcs/types/extended_rcs_campaign.rb +173 -0
- data/lib/rcs/{company/types/company_register_request.rb → types/get_conversation_params.rb} +13 -12
- data/lib/rcs/types/get_conversation_request_id.rb +58 -0
- data/lib/rcs/types/get_conversation_request_recipient.rb +72 -0
- data/lib/rcs/types/get_dlc_campaign_status_response_updates.rb +96 -0
- data/lib/rcs/types/get_toll_free_campaign_status_response_updates.rb +92 -0
- data/lib/rcs/types/inbound_button.rb +56 -0
- data/lib/rcs/types/link_click_event.rb +465 -0
- data/lib/rcs/{company/types/company_update_response.rb → types/location_share_action.rb} +19 -19
- data/lib/rcs/types/location_share_action_data.rb +89 -0
- data/lib/rcs/types/message.rb +174 -0
- data/lib/rcs/types/message_content.rb +85 -0
- data/lib/rcs/types/message_method_enum.rb +12 -0
- data/lib/rcs/types/message_protocol_enum.rb +12 -0
- data/lib/rcs/types/message_schedule.rb +94 -0
- data/lib/rcs/types/message_status_enum.rb +16 -0
- data/lib/rcs/types/message_volume_enum.rb +20 -0
- data/lib/rcs/types/messaging_profile_enum.rb +11 -0
- data/lib/rcs/types/mms_content.rb +74 -0
- data/lib/rcs/types/mms_validation_response_segments.rb +85 -0
- data/lib/rcs/types/mms_validation_response_segments_value_item.rb +75 -0
- data/lib/rcs/types/mms_validation_result.rb +82 -0
- data/lib/rcs/types/nullable_contact.rb +84 -0
- data/lib/rcs/types/number_format.rb +79 -0
- data/lib/rcs/types/opt_in_method_enum.rb +13 -0
- data/lib/rcs/types/optional_brand_info.rb +145 -0
- data/lib/rcs/types/optional_contact.rb +83 -0
- data/lib/rcs/types/optional_contacts.rb +84 -0
- data/lib/rcs/types/phone.rb +101 -0
- data/lib/rcs/types/phone_capabilities.rb +75 -0
- data/lib/rcs/types/phone_enum.rb +13 -0
- data/lib/rcs/types/phone_feature_enum.rb +18 -0
- data/lib/rcs/types/phone_number_campaign_attach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_campaign_detach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_cost.rb +75 -0
- data/lib/rcs/types/phone_number_details.rb +110 -0
- data/lib/rcs/types/phone_number_enum.rb +18 -0
- data/lib/rcs/types/phone_number_region.rb +91 -0
- data/lib/rcs/types/phone_number_status.rb +90 -0
- data/lib/rcs/types/phone_number_status_enum.rb +16 -0
- data/lib/rcs/types/pinnacle_file_upload_metadata.rb +84 -0
- data/lib/rcs/types/pinnacle_url_config.rb +71 -0
- data/lib/rcs/types/profile_status_enum.rb +17 -0
- data/lib/rcs/types/purchased_number.rb +75 -0
- data/lib/rcs/types/rcs.rb +70 -0
- data/lib/rcs/types/rcs_base.rb +82 -0
- data/lib/rcs/types/rcs_base_options.rb +100 -0
- data/lib/rcs/types/rcs_button_call.rb +68 -0
- data/lib/rcs/types/rcs_button_content.rb +148 -0
- data/lib/rcs/types/rcs_button_open_url.rb +68 -0
- data/lib/rcs/types/rcs_button_request_user_location.rb +58 -0
- data/lib/rcs/types/rcs_button_schedule_event.rb +98 -0
- data/lib/rcs/types/rcs_button_send_location.rb +74 -0
- data/lib/rcs/types/rcs_button_send_location_lat_long.rb +68 -0
- data/lib/rcs/types/rcs_button_trigger.rb +78 -0
- data/lib/rcs/types/rcs_campaign.rb +143 -0
- data/lib/rcs/types/rcs_campaign_opt_in_method_enum.rb +15 -0
- data/lib/rcs/types/rcs_campaign_schema_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_emails_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_phones_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_websites_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_emails_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_phones_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_websites_item.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_status.rb +86 -0
- data/lib/rcs/types/rcs_campaign_use_case_enum.rb +23 -0
- data/lib/rcs/types/rcs_card.rb +110 -0
- data/lib/rcs/types/rcs_cards.rb +79 -0
- data/lib/rcs/types/rcs_cards_cards_item.rb +88 -0
- data/lib/rcs/types/rcs_cards_content.rb +79 -0
- data/lib/rcs/types/rcs_cards_content_cards_item.rb +94 -0
- data/lib/rcs/types/rcs_content.rb +72 -0
- data/lib/rcs/types/rcs_media.rb +110 -0
- data/lib/rcs/types/rcs_media_content.rb +81 -0
- data/lib/rcs/types/rcs_media_details_content.rb +77 -0
- data/lib/rcs/types/rcs_text.rb +106 -0
- data/lib/rcs/types/rcs_text_content.rb +72 -0
- data/lib/rcs/types/rcs_validate_content.rb +70 -0
- data/lib/rcs/{company/types/company_register_response.rb → types/rcs_validate_content_media.rb} +19 -21
- data/lib/rcs/types/rcs_validation_result.rb +76 -0
- data/lib/rcs/types/reaction_result.rb +67 -0
- data/lib/rcs/types/scheduled_messaage.rb +73 -0
- data/lib/rcs/types/scheduled_send_response_config.rb +89 -0
- data/lib/rcs/types/send_sms_response_segments.rb +69 -0
- data/lib/rcs/types/send_sms_response_segments_encoding.rb +11 -0
- data/lib/rcs/types/sent_mms_details.rb +102 -0
- data/lib/rcs/types/sent_rcs_details.rb +105 -0
- data/lib/rcs/types/sent_sms_details.rb +108 -0
- data/lib/rcs/types/shortened_url.rb +77 -0
- data/lib/rcs/types/shortened_url_with_click_data.rb +90 -0
- data/lib/rcs/types/sms_content.rb +58 -0
- data/lib/rcs/types/sms_validation_response_segments.rb +80 -0
- data/lib/rcs/types/sms_validation_response_segments_gsm_7.rb +75 -0
- data/lib/rcs/types/sms_validation_response_segments_utf_16.rb +68 -0
- data/lib/rcs/types/sms_validation_response_total.rb +75 -0
- data/lib/rcs/types/sms_validation_result.rb +102 -0
- data/lib/rcs/types/sub_use_case_enum.rb +19 -0
- data/lib/rcs/types/submission_results.rb +57 -0
- data/lib/rcs/types/successful_conversation_update.rb +58 -0
- data/lib/rcs/types/toll_free_campaign.rb +118 -0
- data/lib/rcs/types/toll_free_campaign_schema_opt_in.rb +78 -0
- data/lib/rcs/types/toll_free_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/toll_free_campaign_status.rb +91 -0
- data/lib/rcs/types/toll_free_campaign_use_case_enum.rb +52 -0
- data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +155 -0
- data/lib/rcs/types/toll_free_status_enum.rb +20 -0
- data/lib/rcs/types/tracking.rb +17 -0
- data/lib/rcs/types/updated_contact_id.rb +57 -0
- data/lib/rcs/types/upload_results.rb +80 -0
- data/lib/rcs/types/v_card_address_schema_type_item.rb +15 -0
- data/lib/rcs/types/v_card_data.rb +237 -0
- data/lib/rcs/types/v_card_data_file.rb +74 -0
- data/lib/rcs/types/v_card_data_file_metadata.rb +62 -0
- data/lib/rcs/types/v_card_email_schema_type_item.rb +21 -0
- data/lib/rcs/types/v_card_geo.rb +70 -0
- data/lib/rcs/types/v_card_name.rb +98 -0
- data/lib/rcs/types/v_card_organization.rb +70 -0
- data/lib/rcs/types/v_card_phone_schema_type_item.rb +21 -0
- data/lib/rcs/types/validate_campaign_params.rb +69 -0
- data/lib/rcs/types/validation_error_details.rb +76 -0
- data/lib/rcs/types/validation_results.rb +71 -0
- data/lib/rcs/types/vcard.rb +215 -0
- data/lib/rcs/types/vcard_address.rb +130 -0
- data/lib/rcs/types/vcard_content.rb +223 -0
- data/lib/rcs/types/vcard_email.rb +70 -0
- data/lib/rcs/types/vcard_phone.rb +70 -0
- data/lib/rcs/types/vcard_resource.rb +71 -0
- data/lib/rcs/types/vetting_feedback.rb +81 -0
- data/lib/rcs/types/vetting_history.rb +98 -0
- data/lib/rcs/types/vetting_history_vetting_status.rb +13 -0
- data/lib/rcs/types/vetting_results.rb +57 -0
- data/lib/rcs/types/webhook_event_enum.rb +13 -0
- data/lib/rcs/types/webhook_result.rb +64 -0
- data/lib/rcs/{company/types/company_update_response_brand.rb → types/webhooks.rb} +25 -17
- data/lib/rcs/types/zod_error.rb +73 -0
- data/lib/rcs/webhooks/client.rb +93 -0
- data/lib/rcs.rb +67 -83
- data/lib/requests.rb +4 -4
- data/lib/types_export.rb +252 -46
- metadata +278 -52
- data/lib/rcs/company/client.rb +0 -375
- data/lib/rcs/company/types/company_register_request_company.rb +0 -128
- data/lib/rcs/send/client.rb +0 -382
- data/lib/rcs/send/types/rcs_fallback.rb +0 -84
- data/lib/rcs/tools/types/tools_shorten_url_response.rb +0 -70
- data/lib/rcs/tools/types/tools_upload_url_response.rb +0 -69
- data/lib/rcs/types/action.rb +0 -154
- data/lib/rcs/types/action_lat_long.rb +0 -68
- data/lib/rcs/types/action_type.rb +0 -16
- data/lib/rcs/types/additional_email.rb +0 -65
- data/lib/rcs/types/additional_phone_number.rb +0 -65
- data/lib/rcs/types/additional_website.rb +0 -65
- data/lib/rcs/types/card.rb +0 -90
- data/lib/rcs/types/company.rb +0 -319
- data/lib/rcs/types/company_additional_emails_item.rb +0 -67
- data/lib/rcs/types/company_additional_phone_numbers_item.rb +0 -67
- data/lib/rcs/types/company_additional_websites_item.rb +0 -67
- data/lib/rcs/types/company_category.rb +0 -20
- data/lib/rcs/types/company_contact.rb +0 -117
- data/lib/rcs/types/company_details.rb +0 -120
- data/lib/rcs/types/forbidden_error_body.rb +0 -57
- data/lib/rcs/types/inbound_action_message.rb +0 -117
- data/lib/rcs/types/inbound_location_message.rb +0 -106
- data/lib/rcs/types/inbound_location_message_coordinates.rb +0 -65
- data/lib/rcs/types/inbound_media_message.rb +0 -112
- data/lib/rcs/types/inbound_message.rb +0 -88
- data/lib/rcs/types/inbound_message_message_type.rb +0 -10
- data/lib/rcs/types/inbound_message_metadata.rb +0 -79
- data/lib/rcs/types/inbound_text_message.rb +0 -100
- data/lib/rcs/types/internal_server_error_body.rb +0 -57
- data/lib/rcs/types/media_payload.rb +0 -65
- data/lib/rcs/types/message_metadata.rb +0 -56
- data/lib/rcs/types/messaging.rb +0 -95
- data/lib/rcs/types/optionals.rb +0 -99
- data/lib/rcs/types/payment_required_error_body.rb +0 -57
- data/lib/rcs/types/point_of_contact.rb +0 -72
- data/lib/rcs/types/rcs_functionalities.rb +0 -117
- data/lib/rcs/types/sender_metadata.rb +0 -74
- data/lib/rcs/types/unauthorized_error_body.rb +0 -57
@@ -0,0 +1,226 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "vetting_feedback"
|
4
|
+
require_relative "vetting_history"
|
5
|
+
require_relative "brand_status_enum"
|
6
|
+
require_relative "optional_contacts"
|
7
|
+
require_relative "company_sector_enum"
|
8
|
+
require_relative "company_type_enum"
|
9
|
+
require "ostruct"
|
10
|
+
require "json"
|
11
|
+
|
12
|
+
module Pinnacle
|
13
|
+
module Types
|
14
|
+
class ExtendedBrandWithVetting
|
15
|
+
# @return [String] ISO 8601 formatted timestamp of the last TCR vetting.
|
16
|
+
attr_reader :last_tcr_vetting_date
|
17
|
+
# @return [Array<Pinnacle::Types::VettingFeedback>] Feedback from The Campaign Registry if TCR vetting was performed.
|
18
|
+
attr_reader :tcr_feedback
|
19
|
+
# @return [Array<Pinnacle::Types::VettingHistory>] History of all external vetting attempts for this brand.
|
20
|
+
attr_reader :vetting_history
|
21
|
+
# @return [String] ISO 8601 formatted timestamp of when this brand was added to our system.
|
22
|
+
attr_reader :created_at
|
23
|
+
# @return [Integer] The brand's ID.
|
24
|
+
attr_reader :id
|
25
|
+
# @return [Boolean] Indicates if this brand is archived.
|
26
|
+
attr_reader :is_archived
|
27
|
+
# @return [Pinnacle::Types::BrandStatusEnum] Current review status of the campaign.<br>
|
28
|
+
# `INCOMPLETE`: Not submitted.<br>
|
29
|
+
# `IN REVIEW`: Being reviewed by carriers.<br>
|
30
|
+
# `VERIFIED`: Approved and ready to send messages.<br>
|
31
|
+
# `FAILED`: Issues and errors related to the campaign's details.
|
32
|
+
attr_reader :status
|
33
|
+
# @return [String] ISO 8601 formatted timestamp of when this brand was last updated.
|
34
|
+
attr_reader :updated_at
|
35
|
+
# @return [String] Primary brand address where this brand is located.
|
36
|
+
attr_reader :address
|
37
|
+
# @return [Pinnacle::Types::OptionalContacts]
|
38
|
+
attr_reader :contact
|
39
|
+
# @return [String] "Doing Business As" name - the public name this brand operates under.
|
40
|
+
attr_reader :dba
|
41
|
+
# @return [String] Brief description of what this brand does.
|
42
|
+
attr_reader :description
|
43
|
+
# @return [String] Employer Identification Number (EIN) assigned by the IRS.
|
44
|
+
attr_reader :ein
|
45
|
+
# @return [String] Main contact email address for this brand.
|
46
|
+
attr_reader :email
|
47
|
+
# @return [String] Legal name of the brand as registered.
|
48
|
+
attr_reader :name
|
49
|
+
# @return [Pinnacle::Types::CompanySectorEnum]
|
50
|
+
attr_reader :sector
|
51
|
+
# @return [Pinnacle::Types::CompanyTypeEnum]
|
52
|
+
attr_reader :type
|
53
|
+
# @return [String] Brand website URL.
|
54
|
+
attr_reader :website
|
55
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
56
|
+
attr_reader :additional_properties
|
57
|
+
# @return [Object]
|
58
|
+
attr_reader :_field_set
|
59
|
+
protected :_field_set
|
60
|
+
|
61
|
+
OMIT = Object.new
|
62
|
+
|
63
|
+
# @param last_tcr_vetting_date [String] ISO 8601 formatted timestamp of the last TCR vetting.
|
64
|
+
# @param tcr_feedback [Array<Pinnacle::Types::VettingFeedback>] Feedback from The Campaign Registry if TCR vetting was performed.
|
65
|
+
# @param vetting_history [Array<Pinnacle::Types::VettingHistory>] History of all external vetting attempts for this brand.
|
66
|
+
# @param created_at [String] ISO 8601 formatted timestamp of when this brand was added to our system.
|
67
|
+
# @param id [Integer] The brand's ID.
|
68
|
+
# @param is_archived [Boolean] Indicates if this brand is archived.
|
69
|
+
# @param status [Pinnacle::Types::BrandStatusEnum] Current review status of the campaign.<br>
|
70
|
+
# `INCOMPLETE`: Not submitted.<br>
|
71
|
+
# `IN REVIEW`: Being reviewed by carriers.<br>
|
72
|
+
# `VERIFIED`: Approved and ready to send messages.<br>
|
73
|
+
# `FAILED`: Issues and errors related to the campaign's details.
|
74
|
+
# @param updated_at [String] ISO 8601 formatted timestamp of when this brand was last updated.
|
75
|
+
# @param address [String] Primary brand address where this brand is located.
|
76
|
+
# @param contact [Pinnacle::Types::OptionalContacts]
|
77
|
+
# @param dba [String] "Doing Business As" name - the public name this brand operates under.
|
78
|
+
# @param description [String] Brief description of what this brand does.
|
79
|
+
# @param ein [String] Employer Identification Number (EIN) assigned by the IRS.
|
80
|
+
# @param email [String] Main contact email address for this brand.
|
81
|
+
# @param name [String] Legal name of the brand as registered.
|
82
|
+
# @param sector [Pinnacle::Types::CompanySectorEnum]
|
83
|
+
# @param type [Pinnacle::Types::CompanyTypeEnum]
|
84
|
+
# @param website [String] Brand website URL.
|
85
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
86
|
+
# @return [Pinnacle::Types::ExtendedBrandWithVetting]
|
87
|
+
def initialize(vetting_history:, created_at:, id:, is_archived:, status:, updated_at:,
|
88
|
+
last_tcr_vetting_date: OMIT, tcr_feedback: OMIT, address: OMIT, contact: OMIT, dba: OMIT, description: OMIT, ein: OMIT, email: OMIT, name: OMIT, sector: OMIT, type: OMIT, website: OMIT, additional_properties: nil)
|
89
|
+
@last_tcr_vetting_date = last_tcr_vetting_date if last_tcr_vetting_date != OMIT
|
90
|
+
@tcr_feedback = tcr_feedback if tcr_feedback != OMIT
|
91
|
+
@vetting_history = vetting_history
|
92
|
+
@created_at = created_at
|
93
|
+
@id = id
|
94
|
+
@is_archived = is_archived
|
95
|
+
@status = status
|
96
|
+
@updated_at = updated_at
|
97
|
+
@address = address if address != OMIT
|
98
|
+
@contact = contact if contact != OMIT
|
99
|
+
@dba = dba if dba != OMIT
|
100
|
+
@description = description if description != OMIT
|
101
|
+
@ein = ein if ein != OMIT
|
102
|
+
@email = email if email != OMIT
|
103
|
+
@name = name if name != OMIT
|
104
|
+
@sector = sector if sector != OMIT
|
105
|
+
@type = type if type != OMIT
|
106
|
+
@website = website if website != OMIT
|
107
|
+
@additional_properties = additional_properties
|
108
|
+
@_field_set = {
|
109
|
+
"lastTcrVettingDate": last_tcr_vetting_date,
|
110
|
+
"tcrFeedback": tcr_feedback,
|
111
|
+
"vettingHistory": vetting_history,
|
112
|
+
"createdAt": created_at,
|
113
|
+
"id": id,
|
114
|
+
"isArchived": is_archived,
|
115
|
+
"status": status,
|
116
|
+
"updatedAt": updated_at,
|
117
|
+
"address": address,
|
118
|
+
"contact": contact,
|
119
|
+
"dba": dba,
|
120
|
+
"description": description,
|
121
|
+
"ein": ein,
|
122
|
+
"email": email,
|
123
|
+
"name": name,
|
124
|
+
"sector": sector,
|
125
|
+
"type": type,
|
126
|
+
"website": website
|
127
|
+
}.reject do |_k, v|
|
128
|
+
v == OMIT
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# Deserialize a JSON object to an instance of ExtendedBrandWithVetting
|
133
|
+
#
|
134
|
+
# @param json_object [String]
|
135
|
+
# @return [Pinnacle::Types::ExtendedBrandWithVetting]
|
136
|
+
def self.from_json(json_object:)
|
137
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
138
|
+
parsed_json = JSON.parse(json_object)
|
139
|
+
last_tcr_vetting_date = parsed_json["lastTcrVettingDate"]
|
140
|
+
tcr_feedback = parsed_json["tcrFeedback"]&.map do |item|
|
141
|
+
item = item.to_json
|
142
|
+
Pinnacle::Types::VettingFeedback.from_json(json_object: item)
|
143
|
+
end
|
144
|
+
vetting_history = parsed_json["vettingHistory"]&.map do |item|
|
145
|
+
item = item.to_json
|
146
|
+
Pinnacle::Types::VettingHistory.from_json(json_object: item)
|
147
|
+
end
|
148
|
+
created_at = parsed_json["createdAt"]
|
149
|
+
id = parsed_json["id"]
|
150
|
+
is_archived = parsed_json["isArchived"]
|
151
|
+
status = parsed_json["status"]
|
152
|
+
updated_at = parsed_json["updatedAt"]
|
153
|
+
address = parsed_json["address"]
|
154
|
+
if parsed_json["contact"].nil?
|
155
|
+
contact = nil
|
156
|
+
else
|
157
|
+
contact = parsed_json["contact"].to_json
|
158
|
+
contact = Pinnacle::Types::OptionalContacts.from_json(json_object: contact)
|
159
|
+
end
|
160
|
+
dba = parsed_json["dba"]
|
161
|
+
description = parsed_json["description"]
|
162
|
+
ein = parsed_json["ein"]
|
163
|
+
email = parsed_json["email"]
|
164
|
+
name = parsed_json["name"]
|
165
|
+
sector = parsed_json["sector"]
|
166
|
+
type = parsed_json["type"]
|
167
|
+
website = parsed_json["website"]
|
168
|
+
new(
|
169
|
+
last_tcr_vetting_date: last_tcr_vetting_date,
|
170
|
+
tcr_feedback: tcr_feedback,
|
171
|
+
vetting_history: vetting_history,
|
172
|
+
created_at: created_at,
|
173
|
+
id: id,
|
174
|
+
is_archived: is_archived,
|
175
|
+
status: status,
|
176
|
+
updated_at: updated_at,
|
177
|
+
address: address,
|
178
|
+
contact: contact,
|
179
|
+
dba: dba,
|
180
|
+
description: description,
|
181
|
+
ein: ein,
|
182
|
+
email: email,
|
183
|
+
name: name,
|
184
|
+
sector: sector,
|
185
|
+
type: type,
|
186
|
+
website: website,
|
187
|
+
additional_properties: struct
|
188
|
+
)
|
189
|
+
end
|
190
|
+
|
191
|
+
# Serialize an instance of ExtendedBrandWithVetting to a JSON object
|
192
|
+
#
|
193
|
+
# @return [String]
|
194
|
+
def to_json(*_args)
|
195
|
+
@_field_set&.to_json
|
196
|
+
end
|
197
|
+
|
198
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
199
|
+
# hash and check each fields type against the current object's property
|
200
|
+
# definitions.
|
201
|
+
#
|
202
|
+
# @param obj [Object]
|
203
|
+
# @return [Void]
|
204
|
+
def self.validate_raw(obj:)
|
205
|
+
obj.last_tcr_vetting_date&.is_a?(String) != false || raise("Passed value for field obj.last_tcr_vetting_date is not the expected type, validation failed.")
|
206
|
+
obj.tcr_feedback&.is_a?(Array) != false || raise("Passed value for field obj.tcr_feedback is not the expected type, validation failed.")
|
207
|
+
obj.vetting_history.is_a?(Array) != false || raise("Passed value for field obj.vetting_history is not the expected type, validation failed.")
|
208
|
+
obj.created_at.is_a?(String) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
|
209
|
+
obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
210
|
+
obj.is_archived.is_a?(Boolean) != false || raise("Passed value for field obj.is_archived is not the expected type, validation failed.")
|
211
|
+
obj.status.is_a?(Pinnacle::Types::BrandStatusEnum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
212
|
+
obj.updated_at.is_a?(String) != false || raise("Passed value for field obj.updated_at is not the expected type, validation failed.")
|
213
|
+
obj.address&.is_a?(String) != false || raise("Passed value for field obj.address is not the expected type, validation failed.")
|
214
|
+
obj.contact.nil? || Pinnacle::Types::OptionalContacts.validate_raw(obj: obj.contact)
|
215
|
+
obj.dba&.is_a?(String) != false || raise("Passed value for field obj.dba is not the expected type, validation failed.")
|
216
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
217
|
+
obj.ein&.is_a?(String) != false || raise("Passed value for field obj.ein is not the expected type, validation failed.")
|
218
|
+
obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
|
219
|
+
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
220
|
+
obj.sector&.is_a?(Pinnacle::Types::CompanySectorEnum) != false || raise("Passed value for field obj.sector is not the expected type, validation failed.")
|
221
|
+
obj.type&.is_a?(Pinnacle::Types::CompanyTypeEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
222
|
+
obj.website&.is_a?(String) != false || raise("Passed value for field obj.website is not the expected type, validation failed.")
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
@@ -0,0 +1,173 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "rcs_campaign_schema_extra_agent"
|
4
|
+
require_relative "extended_brand"
|
5
|
+
require_relative "rcs_campaign_schema_extra_links"
|
6
|
+
require_relative "rcs_campaign_schema_extra_opt_in"
|
7
|
+
require_relative "rcs_campaign_schema_extra_opt_out"
|
8
|
+
require_relative "rcs_campaign_schema_extra_use_case"
|
9
|
+
require "ostruct"
|
10
|
+
require "json"
|
11
|
+
|
12
|
+
module Pinnacle
|
13
|
+
module Types
|
14
|
+
class ExtendedRcsCampaign
|
15
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaExtraAgent] Agent configured to the campaign.
|
16
|
+
attr_reader :agent
|
17
|
+
# @return [String] Agent's unique identifier.
|
18
|
+
attr_reader :agent_id
|
19
|
+
# @return [Pinnacle::Types::ExtendedBrand] Brand associated with this campaign.
|
20
|
+
attr_reader :brand
|
21
|
+
# @return [Boolean] Indicates whether the brand has provided an attestation.
|
22
|
+
attr_reader :brand_attestation
|
23
|
+
# @return [Integer] Unique identifier for the campaign.
|
24
|
+
attr_reader :campaign_id
|
25
|
+
# @return [Array<String>] List of what the agent might say to users.
|
26
|
+
attr_reader :expected_agent_responses
|
27
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaExtraLinks] Legal documentation links.
|
28
|
+
attr_reader :links
|
29
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaExtraOptIn] Opt-in configuration.
|
30
|
+
attr_reader :opt_in
|
31
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaExtraOptOut] Opt-out configuration.
|
32
|
+
attr_reader :opt_out
|
33
|
+
# @return [Pinnacle::Types::RcsCampaignSchemaExtraUseCase] Use case classification for the campaign.
|
34
|
+
attr_reader :use_case
|
35
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
36
|
+
attr_reader :additional_properties
|
37
|
+
# @return [Object]
|
38
|
+
attr_reader :_field_set
|
39
|
+
protected :_field_set
|
40
|
+
|
41
|
+
OMIT = Object.new
|
42
|
+
|
43
|
+
# @param agent [Pinnacle::Types::RcsCampaignSchemaExtraAgent] Agent configured to the campaign.
|
44
|
+
# @param agent_id [String] Agent's unique identifier.
|
45
|
+
# @param brand [Pinnacle::Types::ExtendedBrand] Brand associated with this campaign.
|
46
|
+
# @param brand_attestation [Boolean] Indicates whether the brand has provided an attestation.
|
47
|
+
# @param campaign_id [Integer] Unique identifier for the campaign.
|
48
|
+
# @param expected_agent_responses [Array<String>] List of what the agent might say to users.
|
49
|
+
# @param links [Pinnacle::Types::RcsCampaignSchemaExtraLinks] Legal documentation links.
|
50
|
+
# @param opt_in [Pinnacle::Types::RcsCampaignSchemaExtraOptIn] Opt-in configuration.
|
51
|
+
# @param opt_out [Pinnacle::Types::RcsCampaignSchemaExtraOptOut] Opt-out configuration.
|
52
|
+
# @param use_case [Pinnacle::Types::RcsCampaignSchemaExtraUseCase] Use case classification for the campaign.
|
53
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
54
|
+
# @return [Pinnacle::Types::ExtendedRcsCampaign]
|
55
|
+
def initialize(agent:, agent_id:, brand:, brand_attestation:, campaign_id:, links:, opt_in:, opt_out:, use_case:,
|
56
|
+
expected_agent_responses: OMIT, additional_properties: nil)
|
57
|
+
@agent = agent
|
58
|
+
@agent_id = agent_id
|
59
|
+
@brand = brand
|
60
|
+
@brand_attestation = brand_attestation
|
61
|
+
@campaign_id = campaign_id
|
62
|
+
@expected_agent_responses = expected_agent_responses if expected_agent_responses != OMIT
|
63
|
+
@links = links
|
64
|
+
@opt_in = opt_in
|
65
|
+
@opt_out = opt_out
|
66
|
+
@use_case = use_case
|
67
|
+
@additional_properties = additional_properties
|
68
|
+
@_field_set = {
|
69
|
+
"agent": agent,
|
70
|
+
"agentId": agent_id,
|
71
|
+
"brand": brand,
|
72
|
+
"brandAttestation": brand_attestation,
|
73
|
+
"campaignId": campaign_id,
|
74
|
+
"expectedAgentResponses": expected_agent_responses,
|
75
|
+
"links": links,
|
76
|
+
"optIn": opt_in,
|
77
|
+
"optOut": opt_out,
|
78
|
+
"useCase": use_case
|
79
|
+
}.reject do |_k, v|
|
80
|
+
v == OMIT
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# Deserialize a JSON object to an instance of ExtendedRcsCampaign
|
85
|
+
#
|
86
|
+
# @param json_object [String]
|
87
|
+
# @return [Pinnacle::Types::ExtendedRcsCampaign]
|
88
|
+
def self.from_json(json_object:)
|
89
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
90
|
+
parsed_json = JSON.parse(json_object)
|
91
|
+
if parsed_json["agent"].nil?
|
92
|
+
agent = nil
|
93
|
+
else
|
94
|
+
agent = parsed_json["agent"].to_json
|
95
|
+
agent = Pinnacle::Types::RcsCampaignSchemaExtraAgent.from_json(json_object: agent)
|
96
|
+
end
|
97
|
+
agent_id = parsed_json["agentId"]
|
98
|
+
if parsed_json["brand"].nil?
|
99
|
+
brand = nil
|
100
|
+
else
|
101
|
+
brand = parsed_json["brand"].to_json
|
102
|
+
brand = Pinnacle::Types::ExtendedBrand.from_json(json_object: brand)
|
103
|
+
end
|
104
|
+
brand_attestation = parsed_json["brandAttestation"]
|
105
|
+
campaign_id = parsed_json["campaignId"]
|
106
|
+
expected_agent_responses = parsed_json["expectedAgentResponses"]
|
107
|
+
if parsed_json["links"].nil?
|
108
|
+
links = nil
|
109
|
+
else
|
110
|
+
links = parsed_json["links"].to_json
|
111
|
+
links = Pinnacle::Types::RcsCampaignSchemaExtraLinks.from_json(json_object: links)
|
112
|
+
end
|
113
|
+
if parsed_json["optIn"].nil?
|
114
|
+
opt_in = nil
|
115
|
+
else
|
116
|
+
opt_in = parsed_json["optIn"].to_json
|
117
|
+
opt_in = Pinnacle::Types::RcsCampaignSchemaExtraOptIn.from_json(json_object: opt_in)
|
118
|
+
end
|
119
|
+
if parsed_json["optOut"].nil?
|
120
|
+
opt_out = nil
|
121
|
+
else
|
122
|
+
opt_out = parsed_json["optOut"].to_json
|
123
|
+
opt_out = Pinnacle::Types::RcsCampaignSchemaExtraOptOut.from_json(json_object: opt_out)
|
124
|
+
end
|
125
|
+
if parsed_json["useCase"].nil?
|
126
|
+
use_case = nil
|
127
|
+
else
|
128
|
+
use_case = parsed_json["useCase"].to_json
|
129
|
+
use_case = Pinnacle::Types::RcsCampaignSchemaExtraUseCase.from_json(json_object: use_case)
|
130
|
+
end
|
131
|
+
new(
|
132
|
+
agent: agent,
|
133
|
+
agent_id: agent_id,
|
134
|
+
brand: brand,
|
135
|
+
brand_attestation: brand_attestation,
|
136
|
+
campaign_id: campaign_id,
|
137
|
+
expected_agent_responses: expected_agent_responses,
|
138
|
+
links: links,
|
139
|
+
opt_in: opt_in,
|
140
|
+
opt_out: opt_out,
|
141
|
+
use_case: use_case,
|
142
|
+
additional_properties: struct
|
143
|
+
)
|
144
|
+
end
|
145
|
+
|
146
|
+
# Serialize an instance of ExtendedRcsCampaign to a JSON object
|
147
|
+
#
|
148
|
+
# @return [String]
|
149
|
+
def to_json(*_args)
|
150
|
+
@_field_set&.to_json
|
151
|
+
end
|
152
|
+
|
153
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
154
|
+
# hash and check each fields type against the current object's property
|
155
|
+
# definitions.
|
156
|
+
#
|
157
|
+
# @param obj [Object]
|
158
|
+
# @return [Void]
|
159
|
+
def self.validate_raw(obj:)
|
160
|
+
Pinnacle::Types::RcsCampaignSchemaExtraAgent.validate_raw(obj: obj.agent)
|
161
|
+
obj.agent_id.is_a?(String) != false || raise("Passed value for field obj.agent_id is not the expected type, validation failed.")
|
162
|
+
Pinnacle::Types::ExtendedBrand.validate_raw(obj: obj.brand)
|
163
|
+
obj.brand_attestation.is_a?(Boolean) != false || raise("Passed value for field obj.brand_attestation is not the expected type, validation failed.")
|
164
|
+
obj.campaign_id.is_a?(Integer) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
165
|
+
obj.expected_agent_responses&.is_a?(Array) != false || raise("Passed value for field obj.expected_agent_responses is not the expected type, validation failed.")
|
166
|
+
Pinnacle::Types::RcsCampaignSchemaExtraLinks.validate_raw(obj: obj.links)
|
167
|
+
Pinnacle::Types::RcsCampaignSchemaExtraOptIn.validate_raw(obj: obj.opt_in)
|
168
|
+
Pinnacle::Types::RcsCampaignSchemaExtraOptOut.validate_raw(obj: obj.opt_out)
|
169
|
+
Pinnacle::Types::RcsCampaignSchemaExtraUseCase.validate_raw(obj: obj.use_case)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
@@ -1,29 +1,30 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "json"
|
4
|
-
require_relative "
|
5
|
-
require_relative "
|
4
|
+
require_relative "get_conversation_request_id"
|
5
|
+
require_relative "get_conversation_request_recipient"
|
6
6
|
|
7
7
|
module Pinnacle
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
module Types
|
9
|
+
# Parameters for getting a specific conversation.
|
10
|
+
class GetConversationParams
|
11
|
+
# Deserialize a JSON object to an instance of GetConversationParams
|
11
12
|
#
|
12
13
|
# @param json_object [String]
|
13
|
-
# @return [Pinnacle::
|
14
|
+
# @return [Pinnacle::Types::GetConversationParams]
|
14
15
|
def self.from_json(json_object:)
|
15
16
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
16
17
|
begin
|
17
|
-
Pinnacle::
|
18
|
-
return Pinnacle::
|
18
|
+
Pinnacle::Types::GetConversationRequestId.validate_raw(obj: struct)
|
19
|
+
return Pinnacle::Types::GetConversationRequestId.from_json(json_object: struct) unless struct.nil?
|
19
20
|
|
20
21
|
return nil
|
21
22
|
rescue StandardError
|
22
23
|
# noop
|
23
24
|
end
|
24
25
|
begin
|
25
|
-
Pinnacle::
|
26
|
-
return Pinnacle::
|
26
|
+
Pinnacle::Types::GetConversationRequestRecipient.validate_raw(obj: struct)
|
27
|
+
return Pinnacle::Types::GetConversationRequestRecipient.from_json(json_object: struct) unless struct.nil?
|
27
28
|
|
28
29
|
return nil
|
29
30
|
rescue StandardError
|
@@ -40,12 +41,12 @@ module Pinnacle
|
|
40
41
|
# @return [Void]
|
41
42
|
def self.validate_raw(obj:)
|
42
43
|
begin
|
43
|
-
return Pinnacle::
|
44
|
+
return Pinnacle::Types::GetConversationRequestId.validate_raw(obj: obj)
|
44
45
|
rescue StandardError
|
45
46
|
# noop
|
46
47
|
end
|
47
48
|
begin
|
48
|
-
return Pinnacle::
|
49
|
+
return Pinnacle::Types::GetConversationRequestRecipient.validate_raw(obj: obj)
|
49
50
|
rescue StandardError
|
50
51
|
# noop
|
51
52
|
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Retrieve conversation information by ID.
|
9
|
+
class GetConversationRequestId
|
10
|
+
# @return [Integer] Unique identifier of the conversation you want to retrieve.
|
11
|
+
attr_reader :id
|
12
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
13
|
+
attr_reader :additional_properties
|
14
|
+
# @return [Object]
|
15
|
+
attr_reader :_field_set
|
16
|
+
protected :_field_set
|
17
|
+
|
18
|
+
OMIT = Object.new
|
19
|
+
|
20
|
+
# @param id [Integer] Unique identifier of the conversation you want to retrieve.
|
21
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
+
# @return [Pinnacle::Types::GetConversationRequestId]
|
23
|
+
def initialize(id:, additional_properties: nil)
|
24
|
+
@id = id
|
25
|
+
@additional_properties = additional_properties
|
26
|
+
@_field_set = { "id": id }
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of GetConversationRequestId
|
30
|
+
#
|
31
|
+
# @param json_object [String]
|
32
|
+
# @return [Pinnacle::Types::GetConversationRequestId]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
parsed_json = JSON.parse(json_object)
|
36
|
+
id = parsed_json["id"]
|
37
|
+
new(id: id, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of GetConversationRequestId to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Retrieve conversation information by sender and recipient.
|
9
|
+
class GetConversationRequestRecipient
|
10
|
+
# @return [String] The recipient's phone number in E.164 format
|
11
|
+
attr_reader :recipient
|
12
|
+
# @return [String] The sender identifier. Can be either:
|
13
|
+
# - A phone number in E.164 format
|
14
|
+
# - An RCS agent ID prefixed with 'agent_'
|
15
|
+
attr_reader :sender
|
16
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
attr_reader :additional_properties
|
18
|
+
# @return [Object]
|
19
|
+
attr_reader :_field_set
|
20
|
+
protected :_field_set
|
21
|
+
|
22
|
+
OMIT = Object.new
|
23
|
+
|
24
|
+
# @param recipient [String] The recipient's phone number in E.164 format
|
25
|
+
# @param sender [String] The sender identifier. Can be either:
|
26
|
+
# - A phone number in E.164 format
|
27
|
+
# - An RCS agent ID prefixed with 'agent_'
|
28
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
# @return [Pinnacle::Types::GetConversationRequestRecipient]
|
30
|
+
def initialize(recipient:, sender:, additional_properties: nil)
|
31
|
+
@recipient = recipient
|
32
|
+
@sender = sender
|
33
|
+
@additional_properties = additional_properties
|
34
|
+
@_field_set = { "recipient": recipient, "sender": sender }
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deserialize a JSON object to an instance of GetConversationRequestRecipient
|
38
|
+
#
|
39
|
+
# @param json_object [String]
|
40
|
+
# @return [Pinnacle::Types::GetConversationRequestRecipient]
|
41
|
+
def self.from_json(json_object:)
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
44
|
+
recipient = parsed_json["recipient"]
|
45
|
+
sender = parsed_json["sender"]
|
46
|
+
new(
|
47
|
+
recipient: recipient,
|
48
|
+
sender: sender,
|
49
|
+
additional_properties: struct
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serialize an instance of GetConversationRequestRecipient to a JSON object
|
54
|
+
#
|
55
|
+
# @return [String]
|
56
|
+
def to_json(*_args)
|
57
|
+
@_field_set&.to_json
|
58
|
+
end
|
59
|
+
|
60
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
61
|
+
# hash and check each fields type against the current object's property
|
62
|
+
# definitions.
|
63
|
+
#
|
64
|
+
# @param obj [Object]
|
65
|
+
# @return [Void]
|
66
|
+
def self.validate_raw(obj:)
|
67
|
+
obj.recipient.is_a?(String) != false || raise("Passed value for field obj.recipient is not the expected type, validation failed.")
|
68
|
+
obj.sender.is_a?(String) != false || raise("Passed value for field obj.sender is not the expected type, validation failed.")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|