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,465 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class LinkClickEvent
|
9
|
+
# @return [String] Accept-Language header value.
|
10
|
+
attr_reader :accept_language
|
11
|
+
# @return [Integer] Accuracy radius for geographic coordinates in kilometers.
|
12
|
+
attr_reader :accuracy_radius_km
|
13
|
+
# @return [Integer] Autonomous System Number.
|
14
|
+
attr_reader :asn
|
15
|
+
# @return [String] Reason why the request was blocked (if applicable).
|
16
|
+
attr_reader :blocked_reason
|
17
|
+
# @return [String] User-Agent Client Hint brand.
|
18
|
+
attr_reader :ch_ua_brand
|
19
|
+
# @return [String] User-Agent Client Hint mobile indicator.
|
20
|
+
attr_reader :ch_ua_mobile
|
21
|
+
# @return [String] User-Agent Client Hint platform.
|
22
|
+
attr_reader :ch_ua_platform
|
23
|
+
# @return [String] City name.
|
24
|
+
attr_reader :city
|
25
|
+
# @return [Integer] Color depth in bits.
|
26
|
+
attr_reader :color_depth
|
27
|
+
# @return [String] Type of internet connection.
|
28
|
+
attr_reader :connection_type
|
29
|
+
# @return [String] Country code (ISO 3166-1 alpha-2).
|
30
|
+
attr_reader :country
|
31
|
+
# @return [String] Timestamp when the click occurred in ISO 8601 format.
|
32
|
+
attr_reader :created_at
|
33
|
+
# @return [Hash{String => Object}] Error details if the request failed.
|
34
|
+
attr_reader :error_details
|
35
|
+
# @return [String] Facebook Click Identifier.
|
36
|
+
attr_reader :fbclid
|
37
|
+
# @return [String] Final resolved URL after redirects.
|
38
|
+
attr_reader :final_url
|
39
|
+
# @return [String] Unique fingerprint identifier for the client.
|
40
|
+
attr_reader :fingerprint_id
|
41
|
+
# @return [String] Google Click Identifier.
|
42
|
+
attr_reader :gclid
|
43
|
+
# @return [Integer] Unique identifier for the click event.
|
44
|
+
attr_reader :id
|
45
|
+
# @return [String] IP address of the visitor (may be anonymized).
|
46
|
+
attr_reader :ip_address
|
47
|
+
# @return [Array<String>] Chain of IP addresses for proxied requests.
|
48
|
+
attr_reader :ip_chain
|
49
|
+
# @return [Boolean] Whether the request was identified as coming from a bot.
|
50
|
+
attr_reader :is_bot
|
51
|
+
# @return [Integer] Request latency in milliseconds.
|
52
|
+
attr_reader :latency_ms
|
53
|
+
# @return [Float] Geographic latitude.
|
54
|
+
attr_reader :latitude
|
55
|
+
# @return [Integer] ID of your shortened URL.
|
56
|
+
attr_reader :link_id
|
57
|
+
# @return [Float] Geographic longitude.
|
58
|
+
attr_reader :longitude
|
59
|
+
# @return [Hash{String => Object}] Additional metadata as JSON object.
|
60
|
+
attr_reader :metadata
|
61
|
+
# @return [String] HTTP method used.
|
62
|
+
attr_reader :method
|
63
|
+
# @return [Integer] Metro area code.
|
64
|
+
attr_reader :metro_code
|
65
|
+
# @return [Float] Network downlink speed estimate in Mbps.
|
66
|
+
attr_reader :network_downlink
|
67
|
+
# @return [Integer] Network round-trip time in milliseconds.
|
68
|
+
attr_reader :network_rtt
|
69
|
+
# @return [Integer] Time to first byte in milliseconds,.
|
70
|
+
attr_reader :performance_ttfb_ms
|
71
|
+
# @return [String] Postal/ZIP code.
|
72
|
+
attr_reader :postal_code
|
73
|
+
# @return [Integer] Number of redirect hops to reach final destination.
|
74
|
+
attr_reader :redirect_hops
|
75
|
+
# @return [String] The referring URL.
|
76
|
+
attr_reader :referrer
|
77
|
+
# @return [String] Domain of the referring URL.
|
78
|
+
attr_reader :referrer_domain
|
79
|
+
# @return [String] Region or state.
|
80
|
+
attr_reader :region
|
81
|
+
# @return [String] Timestamp when the redirect was resolved in ISO 8601 format.
|
82
|
+
attr_reader :resolved_at
|
83
|
+
# @return [String] Screen resolution.
|
84
|
+
attr_reader :screen_res
|
85
|
+
# @return [Integer] HTTP status code of the response.
|
86
|
+
attr_reader :status_code
|
87
|
+
# @return [Integer] Timezone offset in minutes from UTC.
|
88
|
+
attr_reader :timezone_offset_min
|
89
|
+
# @return [Boolean] Whether the request came from a Tor exit node.
|
90
|
+
attr_reader :tor_exit_node
|
91
|
+
# @return [String] Browser name.
|
92
|
+
attr_reader :ua_browser
|
93
|
+
# @return [String] Device type.
|
94
|
+
attr_reader :ua_device
|
95
|
+
# @return [String] Operating system.
|
96
|
+
attr_reader :ua_os
|
97
|
+
# @return [String] Browser version.
|
98
|
+
attr_reader :ua_version
|
99
|
+
# @return [String] User agent string from the browser.
|
100
|
+
attr_reader :user_agent
|
101
|
+
# @return [String] UTM campaign parameter.
|
102
|
+
attr_reader :utm_campaign
|
103
|
+
# @return [String] UTM content parameter.
|
104
|
+
attr_reader :utm_content
|
105
|
+
# @return [String] UTM medium parameter.
|
106
|
+
attr_reader :utm_medium
|
107
|
+
# @return [String] UTM source parameter.
|
108
|
+
attr_reader :utm_source
|
109
|
+
# @return [String] UTM term.
|
110
|
+
attr_reader :utm_term
|
111
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
112
|
+
attr_reader :additional_properties
|
113
|
+
# @return [Object]
|
114
|
+
attr_reader :_field_set
|
115
|
+
protected :_field_set
|
116
|
+
|
117
|
+
OMIT = Object.new
|
118
|
+
|
119
|
+
# @param accept_language [String] Accept-Language header value.
|
120
|
+
# @param accuracy_radius_km [Integer] Accuracy radius for geographic coordinates in kilometers.
|
121
|
+
# @param asn [Integer] Autonomous System Number.
|
122
|
+
# @param blocked_reason [String] Reason why the request was blocked (if applicable).
|
123
|
+
# @param ch_ua_brand [String] User-Agent Client Hint brand.
|
124
|
+
# @param ch_ua_mobile [String] User-Agent Client Hint mobile indicator.
|
125
|
+
# @param ch_ua_platform [String] User-Agent Client Hint platform.
|
126
|
+
# @param city [String] City name.
|
127
|
+
# @param color_depth [Integer] Color depth in bits.
|
128
|
+
# @param connection_type [String] Type of internet connection.
|
129
|
+
# @param country [String] Country code (ISO 3166-1 alpha-2).
|
130
|
+
# @param created_at [String] Timestamp when the click occurred in ISO 8601 format.
|
131
|
+
# @param error_details [Hash{String => Object}] Error details if the request failed.
|
132
|
+
# @param fbclid [String] Facebook Click Identifier.
|
133
|
+
# @param final_url [String] Final resolved URL after redirects.
|
134
|
+
# @param fingerprint_id [String] Unique fingerprint identifier for the client.
|
135
|
+
# @param gclid [String] Google Click Identifier.
|
136
|
+
# @param id [Integer] Unique identifier for the click event.
|
137
|
+
# @param ip_address [String] IP address of the visitor (may be anonymized).
|
138
|
+
# @param ip_chain [Array<String>] Chain of IP addresses for proxied requests.
|
139
|
+
# @param is_bot [Boolean] Whether the request was identified as coming from a bot.
|
140
|
+
# @param latency_ms [Integer] Request latency in milliseconds.
|
141
|
+
# @param latitude [Float] Geographic latitude.
|
142
|
+
# @param link_id [Integer] ID of your shortened URL.
|
143
|
+
# @param longitude [Float] Geographic longitude.
|
144
|
+
# @param metadata [Hash{String => Object}] Additional metadata as JSON object.
|
145
|
+
# @param method [String] HTTP method used.
|
146
|
+
# @param metro_code [Integer] Metro area code.
|
147
|
+
# @param network_downlink [Float] Network downlink speed estimate in Mbps.
|
148
|
+
# @param network_rtt [Integer] Network round-trip time in milliseconds.
|
149
|
+
# @param performance_ttfb_ms [Integer] Time to first byte in milliseconds,.
|
150
|
+
# @param postal_code [String] Postal/ZIP code.
|
151
|
+
# @param redirect_hops [Integer] Number of redirect hops to reach final destination.
|
152
|
+
# @param referrer [String] The referring URL.
|
153
|
+
# @param referrer_domain [String] Domain of the referring URL.
|
154
|
+
# @param region [String] Region or state.
|
155
|
+
# @param resolved_at [String] Timestamp when the redirect was resolved in ISO 8601 format.
|
156
|
+
# @param screen_res [String] Screen resolution.
|
157
|
+
# @param status_code [Integer] HTTP status code of the response.
|
158
|
+
# @param timezone_offset_min [Integer] Timezone offset in minutes from UTC.
|
159
|
+
# @param tor_exit_node [Boolean] Whether the request came from a Tor exit node.
|
160
|
+
# @param ua_browser [String] Browser name.
|
161
|
+
# @param ua_device [String] Device type.
|
162
|
+
# @param ua_os [String] Operating system.
|
163
|
+
# @param ua_version [String] Browser version.
|
164
|
+
# @param user_agent [String] User agent string from the browser.
|
165
|
+
# @param utm_campaign [String] UTM campaign parameter.
|
166
|
+
# @param utm_content [String] UTM content parameter.
|
167
|
+
# @param utm_medium [String] UTM medium parameter.
|
168
|
+
# @param utm_source [String] UTM source parameter.
|
169
|
+
# @param utm_term [String] UTM term.
|
170
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
171
|
+
# @return [Pinnacle::Types::LinkClickEvent]
|
172
|
+
def initialize(created_at:, id:, link_id:, accept_language: OMIT, accuracy_radius_km: OMIT, asn: OMIT, blocked_reason: OMIT,
|
173
|
+
ch_ua_brand: OMIT, ch_ua_mobile: OMIT, ch_ua_platform: OMIT, city: OMIT, color_depth: OMIT, connection_type: OMIT, country: OMIT, error_details: OMIT, fbclid: OMIT, final_url: OMIT, fingerprint_id: OMIT, gclid: OMIT, ip_address: OMIT, ip_chain: OMIT, is_bot: OMIT, latency_ms: OMIT, latitude: OMIT, longitude: OMIT, metadata: OMIT, method: OMIT, metro_code: OMIT, network_downlink: OMIT, network_rtt: OMIT, performance_ttfb_ms: OMIT, postal_code: OMIT, redirect_hops: OMIT, referrer: OMIT, referrer_domain: OMIT, region: OMIT, resolved_at: OMIT, screen_res: OMIT, status_code: OMIT, timezone_offset_min: OMIT, tor_exit_node: OMIT, ua_browser: OMIT, ua_device: OMIT, ua_os: OMIT, ua_version: OMIT, user_agent: OMIT, utm_campaign: OMIT, utm_content: OMIT, utm_medium: OMIT, utm_source: OMIT, utm_term: OMIT, additional_properties: nil)
|
174
|
+
@accept_language = accept_language if accept_language != OMIT
|
175
|
+
@accuracy_radius_km = accuracy_radius_km if accuracy_radius_km != OMIT
|
176
|
+
@asn = asn if asn != OMIT
|
177
|
+
@blocked_reason = blocked_reason if blocked_reason != OMIT
|
178
|
+
@ch_ua_brand = ch_ua_brand if ch_ua_brand != OMIT
|
179
|
+
@ch_ua_mobile = ch_ua_mobile if ch_ua_mobile != OMIT
|
180
|
+
@ch_ua_platform = ch_ua_platform if ch_ua_platform != OMIT
|
181
|
+
@city = city if city != OMIT
|
182
|
+
@color_depth = color_depth if color_depth != OMIT
|
183
|
+
@connection_type = connection_type if connection_type != OMIT
|
184
|
+
@country = country if country != OMIT
|
185
|
+
@created_at = created_at
|
186
|
+
@error_details = error_details if error_details != OMIT
|
187
|
+
@fbclid = fbclid if fbclid != OMIT
|
188
|
+
@final_url = final_url if final_url != OMIT
|
189
|
+
@fingerprint_id = fingerprint_id if fingerprint_id != OMIT
|
190
|
+
@gclid = gclid if gclid != OMIT
|
191
|
+
@id = id
|
192
|
+
@ip_address = ip_address if ip_address != OMIT
|
193
|
+
@ip_chain = ip_chain if ip_chain != OMIT
|
194
|
+
@is_bot = is_bot if is_bot != OMIT
|
195
|
+
@latency_ms = latency_ms if latency_ms != OMIT
|
196
|
+
@latitude = latitude if latitude != OMIT
|
197
|
+
@link_id = link_id
|
198
|
+
@longitude = longitude if longitude != OMIT
|
199
|
+
@metadata = metadata if metadata != OMIT
|
200
|
+
@method = method if method != OMIT
|
201
|
+
@metro_code = metro_code if metro_code != OMIT
|
202
|
+
@network_downlink = network_downlink if network_downlink != OMIT
|
203
|
+
@network_rtt = network_rtt if network_rtt != OMIT
|
204
|
+
@performance_ttfb_ms = performance_ttfb_ms if performance_ttfb_ms != OMIT
|
205
|
+
@postal_code = postal_code if postal_code != OMIT
|
206
|
+
@redirect_hops = redirect_hops if redirect_hops != OMIT
|
207
|
+
@referrer = referrer if referrer != OMIT
|
208
|
+
@referrer_domain = referrer_domain if referrer_domain != OMIT
|
209
|
+
@region = region if region != OMIT
|
210
|
+
@resolved_at = resolved_at if resolved_at != OMIT
|
211
|
+
@screen_res = screen_res if screen_res != OMIT
|
212
|
+
@status_code = status_code if status_code != OMIT
|
213
|
+
@timezone_offset_min = timezone_offset_min if timezone_offset_min != OMIT
|
214
|
+
@tor_exit_node = tor_exit_node if tor_exit_node != OMIT
|
215
|
+
@ua_browser = ua_browser if ua_browser != OMIT
|
216
|
+
@ua_device = ua_device if ua_device != OMIT
|
217
|
+
@ua_os = ua_os if ua_os != OMIT
|
218
|
+
@ua_version = ua_version if ua_version != OMIT
|
219
|
+
@user_agent = user_agent if user_agent != OMIT
|
220
|
+
@utm_campaign = utm_campaign if utm_campaign != OMIT
|
221
|
+
@utm_content = utm_content if utm_content != OMIT
|
222
|
+
@utm_medium = utm_medium if utm_medium != OMIT
|
223
|
+
@utm_source = utm_source if utm_source != OMIT
|
224
|
+
@utm_term = utm_term if utm_term != OMIT
|
225
|
+
@additional_properties = additional_properties
|
226
|
+
@_field_set = {
|
227
|
+
"accept_language": accept_language,
|
228
|
+
"accuracy_radius_km": accuracy_radius_km,
|
229
|
+
"asn": asn,
|
230
|
+
"blocked_reason": blocked_reason,
|
231
|
+
"ch_ua_brand": ch_ua_brand,
|
232
|
+
"ch_ua_mobile": ch_ua_mobile,
|
233
|
+
"ch_ua_platform": ch_ua_platform,
|
234
|
+
"city": city,
|
235
|
+
"color_depth": color_depth,
|
236
|
+
"connection_type": connection_type,
|
237
|
+
"country": country,
|
238
|
+
"created_at": created_at,
|
239
|
+
"error_details": error_details,
|
240
|
+
"fbclid": fbclid,
|
241
|
+
"final_url": final_url,
|
242
|
+
"fingerprint_id": fingerprint_id,
|
243
|
+
"gclid": gclid,
|
244
|
+
"id": id,
|
245
|
+
"ip_address": ip_address,
|
246
|
+
"ip_chain": ip_chain,
|
247
|
+
"is_bot": is_bot,
|
248
|
+
"latency_ms": latency_ms,
|
249
|
+
"latitude": latitude,
|
250
|
+
"link_id": link_id,
|
251
|
+
"longitude": longitude,
|
252
|
+
"metadata": metadata,
|
253
|
+
"method": method,
|
254
|
+
"metro_code": metro_code,
|
255
|
+
"network_downlink": network_downlink,
|
256
|
+
"network_rtt": network_rtt,
|
257
|
+
"performance_ttfb_ms": performance_ttfb_ms,
|
258
|
+
"postal_code": postal_code,
|
259
|
+
"redirect_hops": redirect_hops,
|
260
|
+
"referrer": referrer,
|
261
|
+
"referrer_domain": referrer_domain,
|
262
|
+
"region": region,
|
263
|
+
"resolved_at": resolved_at,
|
264
|
+
"screen_res": screen_res,
|
265
|
+
"status_code": status_code,
|
266
|
+
"timezone_offset_min": timezone_offset_min,
|
267
|
+
"tor_exit_node": tor_exit_node,
|
268
|
+
"ua_browser": ua_browser,
|
269
|
+
"ua_device": ua_device,
|
270
|
+
"ua_os": ua_os,
|
271
|
+
"ua_version": ua_version,
|
272
|
+
"user_agent": user_agent,
|
273
|
+
"utm_campaign": utm_campaign,
|
274
|
+
"utm_content": utm_content,
|
275
|
+
"utm_medium": utm_medium,
|
276
|
+
"utm_source": utm_source,
|
277
|
+
"utm_term": utm_term
|
278
|
+
}.reject do |_k, v|
|
279
|
+
v == OMIT
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
# Deserialize a JSON object to an instance of LinkClickEvent
|
284
|
+
#
|
285
|
+
# @param json_object [String]
|
286
|
+
# @return [Pinnacle::Types::LinkClickEvent]
|
287
|
+
def self.from_json(json_object:)
|
288
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
289
|
+
parsed_json = JSON.parse(json_object)
|
290
|
+
accept_language = parsed_json["accept_language"]
|
291
|
+
accuracy_radius_km = parsed_json["accuracy_radius_km"]
|
292
|
+
asn = parsed_json["asn"]
|
293
|
+
blocked_reason = parsed_json["blocked_reason"]
|
294
|
+
ch_ua_brand = parsed_json["ch_ua_brand"]
|
295
|
+
ch_ua_mobile = parsed_json["ch_ua_mobile"]
|
296
|
+
ch_ua_platform = parsed_json["ch_ua_platform"]
|
297
|
+
city = parsed_json["city"]
|
298
|
+
color_depth = parsed_json["color_depth"]
|
299
|
+
connection_type = parsed_json["connection_type"]
|
300
|
+
country = parsed_json["country"]
|
301
|
+
created_at = parsed_json["created_at"]
|
302
|
+
error_details = parsed_json["error_details"]
|
303
|
+
fbclid = parsed_json["fbclid"]
|
304
|
+
final_url = parsed_json["final_url"]
|
305
|
+
fingerprint_id = parsed_json["fingerprint_id"]
|
306
|
+
gclid = parsed_json["gclid"]
|
307
|
+
id = parsed_json["id"]
|
308
|
+
ip_address = parsed_json["ip_address"]
|
309
|
+
ip_chain = parsed_json["ip_chain"]
|
310
|
+
is_bot = parsed_json["is_bot"]
|
311
|
+
latency_ms = parsed_json["latency_ms"]
|
312
|
+
latitude = parsed_json["latitude"]
|
313
|
+
link_id = parsed_json["link_id"]
|
314
|
+
longitude = parsed_json["longitude"]
|
315
|
+
metadata = parsed_json["metadata"]
|
316
|
+
method = parsed_json["method"]
|
317
|
+
metro_code = parsed_json["metro_code"]
|
318
|
+
network_downlink = parsed_json["network_downlink"]
|
319
|
+
network_rtt = parsed_json["network_rtt"]
|
320
|
+
performance_ttfb_ms = parsed_json["performance_ttfb_ms"]
|
321
|
+
postal_code = parsed_json["postal_code"]
|
322
|
+
redirect_hops = parsed_json["redirect_hops"]
|
323
|
+
referrer = parsed_json["referrer"]
|
324
|
+
referrer_domain = parsed_json["referrer_domain"]
|
325
|
+
region = parsed_json["region"]
|
326
|
+
resolved_at = parsed_json["resolved_at"]
|
327
|
+
screen_res = parsed_json["screen_res"]
|
328
|
+
status_code = parsed_json["status_code"]
|
329
|
+
timezone_offset_min = parsed_json["timezone_offset_min"]
|
330
|
+
tor_exit_node = parsed_json["tor_exit_node"]
|
331
|
+
ua_browser = parsed_json["ua_browser"]
|
332
|
+
ua_device = parsed_json["ua_device"]
|
333
|
+
ua_os = parsed_json["ua_os"]
|
334
|
+
ua_version = parsed_json["ua_version"]
|
335
|
+
user_agent = parsed_json["user_agent"]
|
336
|
+
utm_campaign = parsed_json["utm_campaign"]
|
337
|
+
utm_content = parsed_json["utm_content"]
|
338
|
+
utm_medium = parsed_json["utm_medium"]
|
339
|
+
utm_source = parsed_json["utm_source"]
|
340
|
+
utm_term = parsed_json["utm_term"]
|
341
|
+
new(
|
342
|
+
accept_language: accept_language,
|
343
|
+
accuracy_radius_km: accuracy_radius_km,
|
344
|
+
asn: asn,
|
345
|
+
blocked_reason: blocked_reason,
|
346
|
+
ch_ua_brand: ch_ua_brand,
|
347
|
+
ch_ua_mobile: ch_ua_mobile,
|
348
|
+
ch_ua_platform: ch_ua_platform,
|
349
|
+
city: city,
|
350
|
+
color_depth: color_depth,
|
351
|
+
connection_type: connection_type,
|
352
|
+
country: country,
|
353
|
+
created_at: created_at,
|
354
|
+
error_details: error_details,
|
355
|
+
fbclid: fbclid,
|
356
|
+
final_url: final_url,
|
357
|
+
fingerprint_id: fingerprint_id,
|
358
|
+
gclid: gclid,
|
359
|
+
id: id,
|
360
|
+
ip_address: ip_address,
|
361
|
+
ip_chain: ip_chain,
|
362
|
+
is_bot: is_bot,
|
363
|
+
latency_ms: latency_ms,
|
364
|
+
latitude: latitude,
|
365
|
+
link_id: link_id,
|
366
|
+
longitude: longitude,
|
367
|
+
metadata: metadata,
|
368
|
+
method: method,
|
369
|
+
metro_code: metro_code,
|
370
|
+
network_downlink: network_downlink,
|
371
|
+
network_rtt: network_rtt,
|
372
|
+
performance_ttfb_ms: performance_ttfb_ms,
|
373
|
+
postal_code: postal_code,
|
374
|
+
redirect_hops: redirect_hops,
|
375
|
+
referrer: referrer,
|
376
|
+
referrer_domain: referrer_domain,
|
377
|
+
region: region,
|
378
|
+
resolved_at: resolved_at,
|
379
|
+
screen_res: screen_res,
|
380
|
+
status_code: status_code,
|
381
|
+
timezone_offset_min: timezone_offset_min,
|
382
|
+
tor_exit_node: tor_exit_node,
|
383
|
+
ua_browser: ua_browser,
|
384
|
+
ua_device: ua_device,
|
385
|
+
ua_os: ua_os,
|
386
|
+
ua_version: ua_version,
|
387
|
+
user_agent: user_agent,
|
388
|
+
utm_campaign: utm_campaign,
|
389
|
+
utm_content: utm_content,
|
390
|
+
utm_medium: utm_medium,
|
391
|
+
utm_source: utm_source,
|
392
|
+
utm_term: utm_term,
|
393
|
+
additional_properties: struct
|
394
|
+
)
|
395
|
+
end
|
396
|
+
|
397
|
+
# Serialize an instance of LinkClickEvent to a JSON object
|
398
|
+
#
|
399
|
+
# @return [String]
|
400
|
+
def to_json(*_args)
|
401
|
+
@_field_set&.to_json
|
402
|
+
end
|
403
|
+
|
404
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
405
|
+
# hash and check each fields type against the current object's property
|
406
|
+
# definitions.
|
407
|
+
#
|
408
|
+
# @param obj [Object]
|
409
|
+
# @return [Void]
|
410
|
+
def self.validate_raw(obj:)
|
411
|
+
obj.accept_language&.is_a?(String) != false || raise("Passed value for field obj.accept_language is not the expected type, validation failed.")
|
412
|
+
obj.accuracy_radius_km&.is_a?(Integer) != false || raise("Passed value for field obj.accuracy_radius_km is not the expected type, validation failed.")
|
413
|
+
obj.asn&.is_a?(Integer) != false || raise("Passed value for field obj.asn is not the expected type, validation failed.")
|
414
|
+
obj.blocked_reason&.is_a?(String) != false || raise("Passed value for field obj.blocked_reason is not the expected type, validation failed.")
|
415
|
+
obj.ch_ua_brand&.is_a?(String) != false || raise("Passed value for field obj.ch_ua_brand is not the expected type, validation failed.")
|
416
|
+
obj.ch_ua_mobile&.is_a?(String) != false || raise("Passed value for field obj.ch_ua_mobile is not the expected type, validation failed.")
|
417
|
+
obj.ch_ua_platform&.is_a?(String) != false || raise("Passed value for field obj.ch_ua_platform is not the expected type, validation failed.")
|
418
|
+
obj.city&.is_a?(String) != false || raise("Passed value for field obj.city is not the expected type, validation failed.")
|
419
|
+
obj.color_depth&.is_a?(Integer) != false || raise("Passed value for field obj.color_depth is not the expected type, validation failed.")
|
420
|
+
obj.connection_type&.is_a?(String) != false || raise("Passed value for field obj.connection_type is not the expected type, validation failed.")
|
421
|
+
obj.country&.is_a?(String) != false || raise("Passed value for field obj.country is not the expected type, validation failed.")
|
422
|
+
obj.created_at.is_a?(String) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.")
|
423
|
+
obj.error_details&.is_a?(Hash) != false || raise("Passed value for field obj.error_details is not the expected type, validation failed.")
|
424
|
+
obj.fbclid&.is_a?(String) != false || raise("Passed value for field obj.fbclid is not the expected type, validation failed.")
|
425
|
+
obj.final_url&.is_a?(String) != false || raise("Passed value for field obj.final_url is not the expected type, validation failed.")
|
426
|
+
obj.fingerprint_id&.is_a?(String) != false || raise("Passed value for field obj.fingerprint_id is not the expected type, validation failed.")
|
427
|
+
obj.gclid&.is_a?(String) != false || raise("Passed value for field obj.gclid is not the expected type, validation failed.")
|
428
|
+
obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
429
|
+
obj.ip_address&.is_a?(String) != false || raise("Passed value for field obj.ip_address is not the expected type, validation failed.")
|
430
|
+
obj.ip_chain&.is_a?(Array) != false || raise("Passed value for field obj.ip_chain is not the expected type, validation failed.")
|
431
|
+
obj.is_bot&.is_a?(Boolean) != false || raise("Passed value for field obj.is_bot is not the expected type, validation failed.")
|
432
|
+
obj.latency_ms&.is_a?(Integer) != false || raise("Passed value for field obj.latency_ms is not the expected type, validation failed.")
|
433
|
+
obj.latitude&.is_a?(Float) != false || raise("Passed value for field obj.latitude is not the expected type, validation failed.")
|
434
|
+
obj.link_id.is_a?(Integer) != false || raise("Passed value for field obj.link_id is not the expected type, validation failed.")
|
435
|
+
obj.longitude&.is_a?(Float) != false || raise("Passed value for field obj.longitude is not the expected type, validation failed.")
|
436
|
+
obj.metadata&.is_a?(Hash) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
|
437
|
+
obj.method&.is_a?(String) != false || raise("Passed value for field obj.method is not the expected type, validation failed.")
|
438
|
+
obj.metro_code&.is_a?(Integer) != false || raise("Passed value for field obj.metro_code is not the expected type, validation failed.")
|
439
|
+
obj.network_downlink&.is_a?(Float) != false || raise("Passed value for field obj.network_downlink is not the expected type, validation failed.")
|
440
|
+
obj.network_rtt&.is_a?(Integer) != false || raise("Passed value for field obj.network_rtt is not the expected type, validation failed.")
|
441
|
+
obj.performance_ttfb_ms&.is_a?(Integer) != false || raise("Passed value for field obj.performance_ttfb_ms is not the expected type, validation failed.")
|
442
|
+
obj.postal_code&.is_a?(String) != false || raise("Passed value for field obj.postal_code is not the expected type, validation failed.")
|
443
|
+
obj.redirect_hops&.is_a?(Integer) != false || raise("Passed value for field obj.redirect_hops is not the expected type, validation failed.")
|
444
|
+
obj.referrer&.is_a?(String) != false || raise("Passed value for field obj.referrer is not the expected type, validation failed.")
|
445
|
+
obj.referrer_domain&.is_a?(String) != false || raise("Passed value for field obj.referrer_domain is not the expected type, validation failed.")
|
446
|
+
obj.region&.is_a?(String) != false || raise("Passed value for field obj.region is not the expected type, validation failed.")
|
447
|
+
obj.resolved_at&.is_a?(String) != false || raise("Passed value for field obj.resolved_at is not the expected type, validation failed.")
|
448
|
+
obj.screen_res&.is_a?(String) != false || raise("Passed value for field obj.screen_res is not the expected type, validation failed.")
|
449
|
+
obj.status_code&.is_a?(Integer) != false || raise("Passed value for field obj.status_code is not the expected type, validation failed.")
|
450
|
+
obj.timezone_offset_min&.is_a?(Integer) != false || raise("Passed value for field obj.timezone_offset_min is not the expected type, validation failed.")
|
451
|
+
obj.tor_exit_node&.is_a?(Boolean) != false || raise("Passed value for field obj.tor_exit_node is not the expected type, validation failed.")
|
452
|
+
obj.ua_browser&.is_a?(String) != false || raise("Passed value for field obj.ua_browser is not the expected type, validation failed.")
|
453
|
+
obj.ua_device&.is_a?(String) != false || raise("Passed value for field obj.ua_device is not the expected type, validation failed.")
|
454
|
+
obj.ua_os&.is_a?(String) != false || raise("Passed value for field obj.ua_os is not the expected type, validation failed.")
|
455
|
+
obj.ua_version&.is_a?(String) != false || raise("Passed value for field obj.ua_version is not the expected type, validation failed.")
|
456
|
+
obj.user_agent&.is_a?(String) != false || raise("Passed value for field obj.user_agent is not the expected type, validation failed.")
|
457
|
+
obj.utm_campaign&.is_a?(String) != false || raise("Passed value for field obj.utm_campaign is not the expected type, validation failed.")
|
458
|
+
obj.utm_content&.is_a?(String) != false || raise("Passed value for field obj.utm_content is not the expected type, validation failed.")
|
459
|
+
obj.utm_medium&.is_a?(String) != false || raise("Passed value for field obj.utm_medium is not the expected type, validation failed.")
|
460
|
+
obj.utm_source&.is_a?(String) != false || raise("Passed value for field obj.utm_source is not the expected type, validation failed.")
|
461
|
+
obj.utm_term&.is_a?(String) != false || raise("Passed value for field obj.utm_term is not the expected type, validation failed.")
|
462
|
+
end
|
463
|
+
end
|
464
|
+
end
|
465
|
+
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "
|
3
|
+
require_relative "location_share_action_data"
|
4
4
|
require "ostruct"
|
5
5
|
require "json"
|
6
6
|
|
7
7
|
module Pinnacle
|
8
|
-
|
9
|
-
class
|
10
|
-
# @return [Pinnacle::
|
11
|
-
attr_reader :
|
8
|
+
module Types
|
9
|
+
class LocationShareAction
|
10
|
+
# @return [Pinnacle::Types::LocationShareActionData] Location data shared by the user.
|
11
|
+
attr_reader :data
|
12
12
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
13
13
|
attr_reader :additional_properties
|
14
14
|
# @return [Object]
|
@@ -17,32 +17,32 @@ module Pinnacle
|
|
17
17
|
|
18
18
|
OMIT = Object.new
|
19
19
|
|
20
|
-
# @param
|
20
|
+
# @param data [Pinnacle::Types::LocationShareActionData] Location data shared by the user.
|
21
21
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
-
# @return [Pinnacle::
|
23
|
-
def initialize(
|
24
|
-
@
|
22
|
+
# @return [Pinnacle::Types::LocationShareAction]
|
23
|
+
def initialize(data:, additional_properties: nil)
|
24
|
+
@data = data
|
25
25
|
@additional_properties = additional_properties
|
26
|
-
@_field_set = { "
|
26
|
+
@_field_set = { "data": data }
|
27
27
|
end
|
28
28
|
|
29
|
-
# Deserialize a JSON object to an instance of
|
29
|
+
# Deserialize a JSON object to an instance of LocationShareAction
|
30
30
|
#
|
31
31
|
# @param json_object [String]
|
32
|
-
# @return [Pinnacle::
|
32
|
+
# @return [Pinnacle::Types::LocationShareAction]
|
33
33
|
def self.from_json(json_object:)
|
34
34
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
35
|
parsed_json = JSON.parse(json_object)
|
36
|
-
if parsed_json["
|
37
|
-
|
36
|
+
if parsed_json["data"].nil?
|
37
|
+
data = nil
|
38
38
|
else
|
39
|
-
|
40
|
-
|
39
|
+
data = parsed_json["data"].to_json
|
40
|
+
data = Pinnacle::Types::LocationShareActionData.from_json(json_object: data)
|
41
41
|
end
|
42
|
-
new(
|
42
|
+
new(data: data, additional_properties: struct)
|
43
43
|
end
|
44
44
|
|
45
|
-
# Serialize an instance of
|
45
|
+
# Serialize an instance of LocationShareAction to a JSON object
|
46
46
|
#
|
47
47
|
# @return [String]
|
48
48
|
def to_json(*_args)
|
@@ -56,7 +56,7 @@ module Pinnacle
|
|
56
56
|
# @param obj [Object]
|
57
57
|
# @return [Void]
|
58
58
|
def self.validate_raw(obj:)
|
59
|
-
Pinnacle::
|
59
|
+
Pinnacle::Types::LocationShareActionData.validate_raw(obj: obj.data)
|
60
60
|
end
|
61
61
|
end
|
62
62
|
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Location data shared by the user.
|
9
|
+
class LocationShareActionData
|
10
|
+
# @return [String] Address corresponding to the shared location.
|
11
|
+
attr_reader :address
|
12
|
+
# @return [Float] Latitude of the shared location.
|
13
|
+
attr_reader :latitude
|
14
|
+
# @return [Float] Longitude of the shared location.
|
15
|
+
attr_reader :longitude
|
16
|
+
# @return [String] Text message sent with the location.
|
17
|
+
attr_reader :text
|
18
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
19
|
+
attr_reader :additional_properties
|
20
|
+
# @return [Object]
|
21
|
+
attr_reader :_field_set
|
22
|
+
protected :_field_set
|
23
|
+
|
24
|
+
OMIT = Object.new
|
25
|
+
|
26
|
+
# @param address [String] Address corresponding to the shared location.
|
27
|
+
# @param latitude [Float] Latitude of the shared location.
|
28
|
+
# @param longitude [Float] Longitude of the shared location.
|
29
|
+
# @param text [String] Text message sent with the location.
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
+
# @return [Pinnacle::Types::LocationShareActionData]
|
32
|
+
def initialize(address:, latitude:, longitude:, text: OMIT, additional_properties: nil)
|
33
|
+
@address = address
|
34
|
+
@latitude = latitude
|
35
|
+
@longitude = longitude
|
36
|
+
@text = text if text != OMIT
|
37
|
+
@additional_properties = additional_properties
|
38
|
+
@_field_set = {
|
39
|
+
"address": address,
|
40
|
+
"latitude": latitude,
|
41
|
+
"longitude": longitude,
|
42
|
+
"text": text
|
43
|
+
}.reject do |_k, v|
|
44
|
+
v == OMIT
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Deserialize a JSON object to an instance of LocationShareActionData
|
49
|
+
#
|
50
|
+
# @param json_object [String]
|
51
|
+
# @return [Pinnacle::Types::LocationShareActionData]
|
52
|
+
def self.from_json(json_object:)
|
53
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
54
|
+
parsed_json = JSON.parse(json_object)
|
55
|
+
address = parsed_json["address"]
|
56
|
+
latitude = parsed_json["latitude"]
|
57
|
+
longitude = parsed_json["longitude"]
|
58
|
+
text = parsed_json["text"]
|
59
|
+
new(
|
60
|
+
address: address,
|
61
|
+
latitude: latitude,
|
62
|
+
longitude: longitude,
|
63
|
+
text: text,
|
64
|
+
additional_properties: struct
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
# Serialize an instance of LocationShareActionData to a JSON object
|
69
|
+
#
|
70
|
+
# @return [String]
|
71
|
+
def to_json(*_args)
|
72
|
+
@_field_set&.to_json
|
73
|
+
end
|
74
|
+
|
75
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
76
|
+
# hash and check each fields type against the current object's property
|
77
|
+
# definitions.
|
78
|
+
#
|
79
|
+
# @param obj [Object]
|
80
|
+
# @return [Void]
|
81
|
+
def self.validate_raw(obj:)
|
82
|
+
obj.address.is_a?(String) != false || raise("Passed value for field obj.address is not the expected type, validation failed.")
|
83
|
+
obj.latitude.is_a?(Float) != false || raise("Passed value for field obj.latitude is not the expected type, validation failed.")
|
84
|
+
obj.longitude.is_a?(Float) != false || raise("Passed value for field obj.longitude is not the expected type, validation failed.")
|
85
|
+
obj.text&.is_a?(String) != false || raise("Passed value for field obj.text is not the expected type, validation failed.")
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|