rcs 1.0.18 → 2.0.0.pre.rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/environment.rb +1 -1
- data/lib/rcs/brands/client.rb +631 -0
- data/lib/rcs/brands/types/autofill_brand_schema_options.rb +61 -0
- data/lib/rcs/brands/types/brand_contact.rb +84 -0
- data/lib/rcs/campaigns/client.rb +44 -0
- data/lib/rcs/campaigns/dlc/client.rb +480 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords.rb +99 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_help.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_in.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_out.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_links.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_options.rb +110 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_use_case.rb +76 -0
- data/lib/rcs/campaigns/rcs/client.rb +457 -0
- data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +155 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent.rb +140 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_emails_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_phones_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_websites_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_links.rb +74 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_in.rb +75 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_out.rb +76 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_use_case.rb +75 -0
- data/lib/rcs/campaigns/toll_free/client.rb +429 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +130 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_opt_in.rb +86 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_use_case.rb +75 -0
- data/lib/rcs/contacts/client.rb +275 -0
- data/lib/rcs/conversations/client.rb +273 -0
- data/lib/rcs/message/client.rb +30 -0
- data/lib/rcs/message/sms/client.rb +96 -0
- data/lib/rcs/messages/client.rb +185 -0
- data/lib/rcs/messages/mms/client.rb +98 -0
- data/lib/rcs/messages/rcs/client.rb +94 -0
- data/lib/rcs/messages/send/client.rb +318 -0
- data/lib/rcs/messages/send/types/send_mms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_mms_schema_options.rb +108 -0
- data/lib/rcs/messages/send/types/send_rcs_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_schema_options.rb +81 -0
- data/lib/rcs/messages/types/message_reaction_schema_options.rb +71 -0
- data/lib/rcs/phone_numbers/campaign/client.rb +179 -0
- data/lib/rcs/phone_numbers/client.rb +345 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_level.rb +16 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options.rb +93 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options_enhanced_contact_info.rb +64 -0
- data/lib/rcs/phone_numbers/types/phone_numbers_get_response.rb +58 -0
- data/lib/rcs/phone_numbers/types/search_schema_location.rb +96 -0
- data/lib/rcs/phone_numbers/types/search_schema_number.rb +81 -0
- data/lib/rcs/phone_numbers/types/search_schema_options.rb +62 -0
- data/lib/rcs/phone_numbers/webhook/client.rb +191 -0
- data/lib/rcs/status/client.rb +30 -0
- data/lib/rcs/status/get/client.rb +367 -0
- data/lib/rcs/tools/client.rb +32 -199
- data/lib/rcs/tools/contact_card/client.rb +285 -0
- data/lib/rcs/tools/contact_card/types/get_v_card_schema_options.rb +67 -0
- data/lib/rcs/tools/file/client.rb +138 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options.rb +70 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options_download.rb +66 -0
- data/lib/rcs/tools/url/client.rb +245 -0
- data/lib/rcs/types/advanced_phone_information.rb +147 -0
- data/lib/rcs/types/advanced_phone_information_carrier.rb +90 -0
- data/lib/rcs/types/advanced_phone_information_contact.rb +146 -0
- data/lib/rcs/types/advanced_phone_information_location.rb +142 -0
- data/lib/rcs/types/advanced_phone_information_location_coordinates.rb +73 -0
- data/lib/rcs/types/advanced_phone_information_location_country.rb +77 -0
- data/lib/rcs/types/advanced_phone_information_type.rb +97 -0
- data/lib/rcs/types/advanced_phone_information_type_recommendation.rb +15 -0
- data/lib/rcs/types/agent.rb +68 -0
- data/lib/rcs/types/attach_webhook_params.rb +60 -0
- data/lib/rcs/types/attach_webhook_response_webhook.rb +86 -0
- data/lib/rcs/types/attach_webhook_schema_name.rb +88 -0
- data/lib/rcs/types/attach_webhook_schema_webhook_id.rb +77 -0
- data/lib/rcs/types/attached_phone_number_result.rb +75 -0
- data/lib/rcs/types/autofill_campaign_params.rb +69 -0
- data/lib/rcs/types/autofill_dlc_campaign_response.rb +169 -0
- data/lib/rcs/types/autofill_dlc_response_keywords.rb +95 -0
- data/lib/rcs/types/autofill_dlc_response_keywords_help.rb +70 -0
- data/lib/rcs/{send/types/send_sms_response.rb → types/autofill_dlc_response_keywords_opt_in.rb} +18 -17
- data/lib/rcs/types/autofill_dlc_response_keywords_opt_out.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_links.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_options.rb +106 -0
- data/lib/rcs/types/autofill_dlc_response_use_case.rb +72 -0
- data/lib/rcs/types/bad_request_error_body.rb +44 -45
- data/lib/rcs/types/basic_phone_information.rb +127 -0
- data/lib/rcs/{company/types/company_register_response_brand.rb → types/basic_phone_information_contact.rb} +12 -21
- data/lib/rcs/types/basic_phone_information_location.rb +74 -0
- data/lib/rcs/types/basic_phone_information_location_country.rb +75 -0
- data/lib/rcs/types/brand_status.rb +92 -0
- data/lib/rcs/types/brand_status_enum.rb +21 -0
- data/lib/rcs/types/buy_response_capabilities.rb +77 -0
- data/lib/rcs/types/campaign_enum.rb +15 -0
- data/lib/rcs/types/campaign_query.rb +69 -0
- data/lib/rcs/{company/types/company_register_request_company_id.rb → types/campaign_submission_result.rb} +15 -16
- data/lib/rcs/types/campaign_validation_response_errors_item.rb +76 -0
- data/lib/rcs/types/campaign_validation_result.rb +71 -0
- data/lib/rcs/types/click_action.rb +73 -0
- data/lib/rcs/types/click_action_data.rb +56 -0
- data/lib/rcs/types/click_action_data_metadata.rb +69 -0
- data/lib/rcs/types/company_sector_enum.rb +26 -0
- data/lib/rcs/types/company_type_enum.rb +14 -0
- data/lib/rcs/types/configured_webhook.rb +85 -0
- data/lib/rcs/types/contact.rb +105 -0
- data/lib/rcs/types/contact_id.rb +57 -0
- data/lib/rcs/types/conversation.rb +146 -0
- data/lib/rcs/types/conversation_contact.rb +68 -0
- data/lib/rcs/types/conversation_list.rb +79 -0
- data/lib/rcs/types/conversation_sender.rb +60 -0
- data/lib/rcs/types/create_url_options.rb +61 -0
- data/lib/rcs/types/detached_phone_number_result.rb +75 -0
- data/lib/rcs/types/detached_webhook_info.rb +74 -0
- data/lib/rcs/types/detailed_phone_number_enum.rb +25 -0
- data/lib/rcs/types/dlc_assignment_status_enum.rb +19 -0
- data/lib/rcs/types/dlc_campaign_status.rb +107 -0
- data/lib/rcs/types/dlc_campaign_use_case_enum.rb +35 -0
- data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +194 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords.rb +94 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_help.rb +72 -0
- data/lib/rcs/{send/types/send_mms_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_in.rb} +20 -17
- data/lib/rcs/{send/types/send_rcs_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_out.rb} +20 -17
- data/lib/rcs/types/dlc_with_extended_brand_and_status_links.rb +70 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_options.rb +106 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_use_case.rb +72 -0
- data/lib/rcs/types/enhanced_contact.rb +9 -0
- data/lib/rcs/types/enhanced_contact_item.rb +104 -0
- data/lib/rcs/types/error.rb +61 -0
- data/lib/rcs/types/extended_brand.rb +194 -0
- data/lib/rcs/types/extended_brand_with_vetting.rb +226 -0
- data/lib/rcs/types/extended_rcs_campaign.rb +173 -0
- data/lib/rcs/{company/types/company_register_request.rb → types/get_conversation_params.rb} +13 -12
- data/lib/rcs/types/get_conversation_request_id.rb +58 -0
- data/lib/rcs/types/get_conversation_request_recipient.rb +72 -0
- data/lib/rcs/types/get_dlc_campaign_status_response_updates.rb +96 -0
- data/lib/rcs/types/get_toll_free_campaign_status_response_updates.rb +92 -0
- data/lib/rcs/types/inbound_button.rb +56 -0
- data/lib/rcs/types/link_click_event.rb +465 -0
- data/lib/rcs/{company/types/company_update_response.rb → types/location_share_action.rb} +19 -19
- data/lib/rcs/types/location_share_action_data.rb +89 -0
- data/lib/rcs/types/message.rb +174 -0
- data/lib/rcs/types/message_content.rb +85 -0
- data/lib/rcs/types/message_method_enum.rb +12 -0
- data/lib/rcs/types/message_protocol_enum.rb +12 -0
- data/lib/rcs/types/message_schedule.rb +94 -0
- data/lib/rcs/types/message_status_enum.rb +16 -0
- data/lib/rcs/types/message_volume_enum.rb +20 -0
- data/lib/rcs/types/messaging_profile_enum.rb +11 -0
- data/lib/rcs/types/mms_content.rb +74 -0
- data/lib/rcs/types/mms_validation_response_segments.rb +85 -0
- data/lib/rcs/types/mms_validation_response_segments_value_item.rb +75 -0
- data/lib/rcs/types/mms_validation_result.rb +82 -0
- data/lib/rcs/types/nullable_contact.rb +84 -0
- data/lib/rcs/types/number_format.rb +79 -0
- data/lib/rcs/types/opt_in_method_enum.rb +13 -0
- data/lib/rcs/types/optional_brand_info.rb +145 -0
- data/lib/rcs/types/optional_contact.rb +83 -0
- data/lib/rcs/types/optional_contacts.rb +84 -0
- data/lib/rcs/types/phone.rb +101 -0
- data/lib/rcs/types/phone_capabilities.rb +75 -0
- data/lib/rcs/types/phone_enum.rb +13 -0
- data/lib/rcs/types/phone_feature_enum.rb +18 -0
- data/lib/rcs/types/phone_number_campaign_attach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_campaign_detach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_cost.rb +75 -0
- data/lib/rcs/types/phone_number_details.rb +110 -0
- data/lib/rcs/types/phone_number_enum.rb +18 -0
- data/lib/rcs/types/phone_number_region.rb +91 -0
- data/lib/rcs/types/phone_number_status.rb +90 -0
- data/lib/rcs/types/phone_number_status_enum.rb +16 -0
- data/lib/rcs/types/pinnacle_file_upload_metadata.rb +84 -0
- data/lib/rcs/types/pinnacle_url_config.rb +71 -0
- data/lib/rcs/types/profile_status_enum.rb +17 -0
- data/lib/rcs/types/purchased_number.rb +75 -0
- data/lib/rcs/types/rcs.rb +70 -0
- data/lib/rcs/types/rcs_base.rb +82 -0
- data/lib/rcs/types/rcs_base_options.rb +100 -0
- data/lib/rcs/types/rcs_button_call.rb +68 -0
- data/lib/rcs/types/rcs_button_content.rb +148 -0
- data/lib/rcs/types/rcs_button_open_url.rb +68 -0
- data/lib/rcs/types/rcs_button_request_user_location.rb +58 -0
- data/lib/rcs/types/rcs_button_schedule_event.rb +98 -0
- data/lib/rcs/types/rcs_button_send_location.rb +74 -0
- data/lib/rcs/types/rcs_button_send_location_lat_long.rb +68 -0
- data/lib/rcs/types/rcs_button_trigger.rb +78 -0
- data/lib/rcs/types/rcs_campaign.rb +143 -0
- data/lib/rcs/types/rcs_campaign_opt_in_method_enum.rb +15 -0
- data/lib/rcs/types/rcs_campaign_schema_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_emails_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_phones_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_websites_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_emails_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_phones_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_websites_item.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_status.rb +86 -0
- data/lib/rcs/types/rcs_campaign_use_case_enum.rb +23 -0
- data/lib/rcs/types/rcs_card.rb +110 -0
- data/lib/rcs/types/rcs_cards.rb +79 -0
- data/lib/rcs/types/rcs_cards_cards_item.rb +88 -0
- data/lib/rcs/types/rcs_cards_content.rb +79 -0
- data/lib/rcs/types/rcs_cards_content_cards_item.rb +94 -0
- data/lib/rcs/types/rcs_content.rb +72 -0
- data/lib/rcs/types/rcs_media.rb +110 -0
- data/lib/rcs/types/rcs_media_content.rb +81 -0
- data/lib/rcs/types/rcs_media_details_content.rb +77 -0
- data/lib/rcs/types/rcs_text.rb +106 -0
- data/lib/rcs/types/rcs_text_content.rb +72 -0
- data/lib/rcs/types/rcs_validate_content.rb +70 -0
- data/lib/rcs/{company/types/company_register_response.rb → types/rcs_validate_content_media.rb} +19 -21
- data/lib/rcs/types/rcs_validation_result.rb +76 -0
- data/lib/rcs/types/reaction_result.rb +67 -0
- data/lib/rcs/types/scheduled_messaage.rb +73 -0
- data/lib/rcs/types/scheduled_send_response_config.rb +89 -0
- data/lib/rcs/types/send_sms_response_segments.rb +69 -0
- data/lib/rcs/types/send_sms_response_segments_encoding.rb +11 -0
- data/lib/rcs/types/sent_mms_details.rb +102 -0
- data/lib/rcs/types/sent_rcs_details.rb +105 -0
- data/lib/rcs/types/sent_sms_details.rb +108 -0
- data/lib/rcs/types/shortened_url.rb +77 -0
- data/lib/rcs/types/shortened_url_with_click_data.rb +90 -0
- data/lib/rcs/types/sms_content.rb +58 -0
- data/lib/rcs/types/sms_validation_response_segments.rb +80 -0
- data/lib/rcs/types/sms_validation_response_segments_gsm_7.rb +75 -0
- data/lib/rcs/types/sms_validation_response_segments_utf_16.rb +68 -0
- data/lib/rcs/types/sms_validation_response_total.rb +75 -0
- data/lib/rcs/types/sms_validation_result.rb +102 -0
- data/lib/rcs/types/sub_use_case_enum.rb +19 -0
- data/lib/rcs/types/submission_results.rb +57 -0
- data/lib/rcs/types/successful_conversation_update.rb +58 -0
- data/lib/rcs/types/toll_free_campaign.rb +118 -0
- data/lib/rcs/types/toll_free_campaign_schema_opt_in.rb +78 -0
- data/lib/rcs/types/toll_free_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/toll_free_campaign_status.rb +91 -0
- data/lib/rcs/types/toll_free_campaign_use_case_enum.rb +52 -0
- data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +155 -0
- data/lib/rcs/types/toll_free_status_enum.rb +20 -0
- data/lib/rcs/types/tracking.rb +17 -0
- data/lib/rcs/types/updated_contact_id.rb +57 -0
- data/lib/rcs/types/upload_results.rb +80 -0
- data/lib/rcs/types/v_card_address_schema_type_item.rb +15 -0
- data/lib/rcs/types/v_card_data.rb +237 -0
- data/lib/rcs/types/v_card_data_file.rb +74 -0
- data/lib/rcs/types/v_card_data_file_metadata.rb +62 -0
- data/lib/rcs/types/v_card_email_schema_type_item.rb +21 -0
- data/lib/rcs/types/v_card_geo.rb +70 -0
- data/lib/rcs/types/v_card_name.rb +98 -0
- data/lib/rcs/types/v_card_organization.rb +70 -0
- data/lib/rcs/types/v_card_phone_schema_type_item.rb +21 -0
- data/lib/rcs/types/validate_campaign_params.rb +69 -0
- data/lib/rcs/types/validation_error_details.rb +76 -0
- data/lib/rcs/types/validation_results.rb +71 -0
- data/lib/rcs/types/vcard.rb +215 -0
- data/lib/rcs/types/vcard_address.rb +130 -0
- data/lib/rcs/types/vcard_content.rb +223 -0
- data/lib/rcs/types/vcard_email.rb +70 -0
- data/lib/rcs/types/vcard_phone.rb +70 -0
- data/lib/rcs/types/vcard_resource.rb +71 -0
- data/lib/rcs/types/vetting_feedback.rb +81 -0
- data/lib/rcs/types/vetting_history.rb +98 -0
- data/lib/rcs/types/vetting_history_vetting_status.rb +13 -0
- data/lib/rcs/types/vetting_results.rb +57 -0
- data/lib/rcs/types/webhook_event_enum.rb +13 -0
- data/lib/rcs/types/webhook_result.rb +64 -0
- data/lib/rcs/{company/types/company_update_response_brand.rb → types/webhooks.rb} +25 -17
- data/lib/rcs/types/zod_error.rb +73 -0
- data/lib/rcs/webhooks/client.rb +93 -0
- data/lib/rcs.rb +67 -83
- data/lib/requests.rb +4 -4
- data/lib/types_export.rb +252 -46
- metadata +278 -52
- data/lib/rcs/company/client.rb +0 -375
- data/lib/rcs/company/types/company_register_request_company.rb +0 -128
- data/lib/rcs/send/client.rb +0 -382
- data/lib/rcs/send/types/rcs_fallback.rb +0 -84
- data/lib/rcs/tools/types/tools_shorten_url_response.rb +0 -70
- data/lib/rcs/tools/types/tools_upload_url_response.rb +0 -69
- data/lib/rcs/types/action.rb +0 -154
- data/lib/rcs/types/action_lat_long.rb +0 -68
- data/lib/rcs/types/action_type.rb +0 -16
- data/lib/rcs/types/additional_email.rb +0 -65
- data/lib/rcs/types/additional_phone_number.rb +0 -65
- data/lib/rcs/types/additional_website.rb +0 -65
- data/lib/rcs/types/card.rb +0 -90
- data/lib/rcs/types/company.rb +0 -319
- data/lib/rcs/types/company_additional_emails_item.rb +0 -67
- data/lib/rcs/types/company_additional_phone_numbers_item.rb +0 -67
- data/lib/rcs/types/company_additional_websites_item.rb +0 -67
- data/lib/rcs/types/company_category.rb +0 -20
- data/lib/rcs/types/company_contact.rb +0 -117
- data/lib/rcs/types/company_details.rb +0 -120
- data/lib/rcs/types/forbidden_error_body.rb +0 -57
- data/lib/rcs/types/inbound_action_message.rb +0 -117
- data/lib/rcs/types/inbound_location_message.rb +0 -106
- data/lib/rcs/types/inbound_location_message_coordinates.rb +0 -65
- data/lib/rcs/types/inbound_media_message.rb +0 -112
- data/lib/rcs/types/inbound_message.rb +0 -88
- data/lib/rcs/types/inbound_message_message_type.rb +0 -10
- data/lib/rcs/types/inbound_message_metadata.rb +0 -79
- data/lib/rcs/types/inbound_text_message.rb +0 -100
- data/lib/rcs/types/internal_server_error_body.rb +0 -57
- data/lib/rcs/types/media_payload.rb +0 -65
- data/lib/rcs/types/message_metadata.rb +0 -56
- data/lib/rcs/types/messaging.rb +0 -95
- data/lib/rcs/types/optionals.rb +0 -99
- data/lib/rcs/types/payment_required_error_body.rb +0 -57
- data/lib/rcs/types/point_of_contact.rb +0 -72
- data/lib/rcs/types/rcs_functionalities.rb +0 -117
- data/lib/rcs/types/sender_metadata.rb +0 -74
- data/lib/rcs/types/unauthorized_error_body.rb +0 -57
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "send_sms_response_segments_encoding"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Details about how the message was segmented for sending.
|
10
|
+
class SendSmsResponseSegments
|
11
|
+
# @return [Float] Number of message segments used to send this message.
|
12
|
+
attr_reader :count
|
13
|
+
# @return [Pinnacle::Types::SendSmsResponseSegmentsEncoding] Encoding used for the message segments.
|
14
|
+
attr_reader :encoding
|
15
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
attr_reader :additional_properties
|
17
|
+
# @return [Object]
|
18
|
+
attr_reader :_field_set
|
19
|
+
protected :_field_set
|
20
|
+
|
21
|
+
OMIT = Object.new
|
22
|
+
|
23
|
+
# @param count [Float] Number of message segments used to send this message.
|
24
|
+
# @param encoding [Pinnacle::Types::SendSmsResponseSegmentsEncoding] Encoding used for the message segments.
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [Pinnacle::Types::SendSmsResponseSegments]
|
27
|
+
def initialize(count:, encoding:, additional_properties: nil)
|
28
|
+
@count = count
|
29
|
+
@encoding = encoding
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = { "count": count, "encoding": encoding }
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deserialize a JSON object to an instance of SendSmsResponseSegments
|
35
|
+
#
|
36
|
+
# @param json_object [String]
|
37
|
+
# @return [Pinnacle::Types::SendSmsResponseSegments]
|
38
|
+
def self.from_json(json_object:)
|
39
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
40
|
+
parsed_json = JSON.parse(json_object)
|
41
|
+
count = parsed_json["count"]
|
42
|
+
encoding = parsed_json["encoding"]
|
43
|
+
new(
|
44
|
+
count: count,
|
45
|
+
encoding: encoding,
|
46
|
+
additional_properties: struct
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Serialize an instance of SendSmsResponseSegments to a JSON object
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
def to_json(*_args)
|
54
|
+
@_field_set&.to_json
|
55
|
+
end
|
56
|
+
|
57
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
58
|
+
# hash and check each fields type against the current object's property
|
59
|
+
# definitions.
|
60
|
+
#
|
61
|
+
# @param obj [Object]
|
62
|
+
# @return [Void]
|
63
|
+
def self.validate_raw(obj:)
|
64
|
+
obj.count.is_a?(Float) != false || raise("Passed value for field obj.count is not the expected type, validation failed.")
|
65
|
+
obj.encoding.is_a?(Pinnacle::Types::SendSmsResponseSegmentsEncoding) != false || raise("Passed value for field obj.encoding is not the expected type, validation failed.")
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class SentMmsDetails
|
9
|
+
# @return [Array<Integer>] Array of unique identifiers for the sent MMS messages.
|
10
|
+
attr_reader :message_ids
|
11
|
+
# @return [Float] Total number of segments used across the message.
|
12
|
+
attr_reader :segments
|
13
|
+
# @return [Float] Total cost of sending the message.
|
14
|
+
attr_reader :total_cost
|
15
|
+
# @return [String] Sender's phone number in E.164 format.
|
16
|
+
attr_reader :sender
|
17
|
+
# @return [String] Recipient's phone number in E.164 format.
|
18
|
+
attr_reader :recipient
|
19
|
+
# @return [String] Message is queued for delivery.
|
20
|
+
attr_reader :status
|
21
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
+
attr_reader :additional_properties
|
23
|
+
# @return [Object]
|
24
|
+
attr_reader :_field_set
|
25
|
+
protected :_field_set
|
26
|
+
|
27
|
+
OMIT = Object.new
|
28
|
+
|
29
|
+
# @param message_ids [Array<Integer>] Array of unique identifiers for the sent MMS messages.
|
30
|
+
# @param segments [Float] Total number of segments used across the message.
|
31
|
+
# @param total_cost [Float] Total cost of sending the message.
|
32
|
+
# @param sender [String] Sender's phone number in E.164 format.
|
33
|
+
# @param recipient [String] Recipient's phone number in E.164 format.
|
34
|
+
# @param status [String] Message is queued for delivery.
|
35
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
36
|
+
# @return [Pinnacle::Types::SentMmsDetails]
|
37
|
+
def initialize(message_ids:, segments:, total_cost:, sender:, recipient:, status:, additional_properties: nil)
|
38
|
+
@message_ids = message_ids
|
39
|
+
@segments = segments
|
40
|
+
@total_cost = total_cost
|
41
|
+
@sender = sender
|
42
|
+
@recipient = recipient
|
43
|
+
@status = status
|
44
|
+
@additional_properties = additional_properties
|
45
|
+
@_field_set = {
|
46
|
+
"messageIds": message_ids,
|
47
|
+
"segments": segments,
|
48
|
+
"totalCost": total_cost,
|
49
|
+
"sender": sender,
|
50
|
+
"recipient": recipient,
|
51
|
+
"status": status
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Deserialize a JSON object to an instance of SentMmsDetails
|
56
|
+
#
|
57
|
+
# @param json_object [String]
|
58
|
+
# @return [Pinnacle::Types::SentMmsDetails]
|
59
|
+
def self.from_json(json_object:)
|
60
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
61
|
+
parsed_json = JSON.parse(json_object)
|
62
|
+
message_ids = parsed_json["messageIds"]
|
63
|
+
segments = parsed_json["segments"]
|
64
|
+
total_cost = parsed_json["totalCost"]
|
65
|
+
sender = parsed_json["sender"]
|
66
|
+
recipient = parsed_json["recipient"]
|
67
|
+
status = parsed_json["status"]
|
68
|
+
new(
|
69
|
+
message_ids: message_ids,
|
70
|
+
segments: segments,
|
71
|
+
total_cost: total_cost,
|
72
|
+
sender: sender,
|
73
|
+
recipient: recipient,
|
74
|
+
status: status,
|
75
|
+
additional_properties: struct
|
76
|
+
)
|
77
|
+
end
|
78
|
+
|
79
|
+
# Serialize an instance of SentMmsDetails to a JSON object
|
80
|
+
#
|
81
|
+
# @return [String]
|
82
|
+
def to_json(*_args)
|
83
|
+
@_field_set&.to_json
|
84
|
+
end
|
85
|
+
|
86
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
87
|
+
# hash and check each fields type against the current object's property
|
88
|
+
# definitions.
|
89
|
+
#
|
90
|
+
# @param obj [Object]
|
91
|
+
# @return [Void]
|
92
|
+
def self.validate_raw(obj:)
|
93
|
+
obj.message_ids.is_a?(Array) != false || raise("Passed value for field obj.message_ids is not the expected type, validation failed.")
|
94
|
+
obj.segments.is_a?(Float) != false || raise("Passed value for field obj.segments is not the expected type, validation failed.")
|
95
|
+
obj.total_cost.is_a?(Float) != false || raise("Passed value for field obj.total_cost is not the expected type, validation failed.")
|
96
|
+
obj.sender.is_a?(String) != false || raise("Passed value for field obj.sender is not the expected type, validation failed.")
|
97
|
+
obj.recipient.is_a?(String) != false || raise("Passed value for field obj.recipient is not the expected type, validation failed.")
|
98
|
+
obj.status.is_a?(String) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,105 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class SentRcsDetails
|
9
|
+
# @return [Float] Unique identifier for the sent MMS messages.
|
10
|
+
attr_reader :message_ids
|
11
|
+
# @return [Integer] Total number of segments used across the message.
|
12
|
+
attr_reader :segments
|
13
|
+
# @return [Float] Total cost of sending the message.
|
14
|
+
attr_reader :total_cost
|
15
|
+
# @return [String] Sender's phone number in E.164 format.
|
16
|
+
attr_reader :sender
|
17
|
+
# @return [String] Recipient's phone number in E.164 format.
|
18
|
+
attr_reader :recipient
|
19
|
+
# @return [String] Current status of the message.
|
20
|
+
attr_reader :status
|
21
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
+
attr_reader :additional_properties
|
23
|
+
# @return [Object]
|
24
|
+
attr_reader :_field_set
|
25
|
+
protected :_field_set
|
26
|
+
|
27
|
+
OMIT = Object.new
|
28
|
+
|
29
|
+
# @param message_ids [Float] Unique identifier for the sent MMS messages.
|
30
|
+
# @param segments [Integer] Total number of segments used across the message.
|
31
|
+
# @param total_cost [Float] Total cost of sending the message.
|
32
|
+
# @param sender [String] Sender's phone number in E.164 format.
|
33
|
+
# @param recipient [String] Recipient's phone number in E.164 format.
|
34
|
+
# @param status [String] Current status of the message.
|
35
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
36
|
+
# @return [Pinnacle::Types::SentRcsDetails]
|
37
|
+
def initialize(segments:, total_cost:, sender:, recipient:, status:, message_ids: OMIT,
|
38
|
+
additional_properties: nil)
|
39
|
+
@message_ids = message_ids if message_ids != OMIT
|
40
|
+
@segments = segments
|
41
|
+
@total_cost = total_cost
|
42
|
+
@sender = sender
|
43
|
+
@recipient = recipient
|
44
|
+
@status = status
|
45
|
+
@additional_properties = additional_properties
|
46
|
+
@_field_set = {
|
47
|
+
"messageIds": message_ids,
|
48
|
+
"segments": segments,
|
49
|
+
"totalCost": total_cost,
|
50
|
+
"sender": sender,
|
51
|
+
"recipient": recipient,
|
52
|
+
"status": status
|
53
|
+
}.reject do |_k, v|
|
54
|
+
v == OMIT
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Deserialize a JSON object to an instance of SentRcsDetails
|
59
|
+
#
|
60
|
+
# @param json_object [String]
|
61
|
+
# @return [Pinnacle::Types::SentRcsDetails]
|
62
|
+
def self.from_json(json_object:)
|
63
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
64
|
+
parsed_json = JSON.parse(json_object)
|
65
|
+
message_ids = parsed_json["messageIds"]
|
66
|
+
segments = parsed_json["segments"]
|
67
|
+
total_cost = parsed_json["totalCost"]
|
68
|
+
sender = parsed_json["sender"]
|
69
|
+
recipient = parsed_json["recipient"]
|
70
|
+
status = parsed_json["status"]
|
71
|
+
new(
|
72
|
+
message_ids: message_ids,
|
73
|
+
segments: segments,
|
74
|
+
total_cost: total_cost,
|
75
|
+
sender: sender,
|
76
|
+
recipient: recipient,
|
77
|
+
status: status,
|
78
|
+
additional_properties: struct
|
79
|
+
)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Serialize an instance of SentRcsDetails to a JSON object
|
83
|
+
#
|
84
|
+
# @return [String]
|
85
|
+
def to_json(*_args)
|
86
|
+
@_field_set&.to_json
|
87
|
+
end
|
88
|
+
|
89
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
90
|
+
# hash and check each fields type against the current object's property
|
91
|
+
# definitions.
|
92
|
+
#
|
93
|
+
# @param obj [Object]
|
94
|
+
# @return [Void]
|
95
|
+
def self.validate_raw(obj:)
|
96
|
+
obj.message_ids&.is_a?(Float) != false || raise("Passed value for field obj.message_ids is not the expected type, validation failed.")
|
97
|
+
obj.segments.is_a?(Integer) != false || raise("Passed value for field obj.segments is not the expected type, validation failed.")
|
98
|
+
obj.total_cost.is_a?(Float) != false || raise("Passed value for field obj.total_cost is not the expected type, validation failed.")
|
99
|
+
obj.sender.is_a?(String) != false || raise("Passed value for field obj.sender is not the expected type, validation failed.")
|
100
|
+
obj.recipient.is_a?(String) != false || raise("Passed value for field obj.recipient is not the expected type, validation failed.")
|
101
|
+
obj.status.is_a?(String) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "send_sms_response_segments"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
class SentSmsDetails
|
10
|
+
# @return [Integer] Unique identifier for the sent message.
|
11
|
+
attr_reader :message_id
|
12
|
+
# @return [Pinnacle::Types::SendSmsResponseSegments] Details about how the message was segmented for sending.
|
13
|
+
attr_reader :segments
|
14
|
+
# @return [Float] Total cost of sending the message.
|
15
|
+
attr_reader :total_cost
|
16
|
+
# @return [String] Sender's phone number in E.164 format.
|
17
|
+
attr_reader :sender
|
18
|
+
# @return [String] Recipient's phone number in E.164 format.
|
19
|
+
attr_reader :recipient
|
20
|
+
# @return [String] Message is queued for delivery.
|
21
|
+
attr_reader :status
|
22
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
attr_reader :additional_properties
|
24
|
+
# @return [Object]
|
25
|
+
attr_reader :_field_set
|
26
|
+
protected :_field_set
|
27
|
+
|
28
|
+
OMIT = Object.new
|
29
|
+
|
30
|
+
# @param message_id [Integer] Unique identifier for the sent message.
|
31
|
+
# @param segments [Pinnacle::Types::SendSmsResponseSegments] Details about how the message was segmented for sending.
|
32
|
+
# @param total_cost [Float] Total cost of sending the message.
|
33
|
+
# @param sender [String] Sender's phone number in E.164 format.
|
34
|
+
# @param recipient [String] Recipient's phone number in E.164 format.
|
35
|
+
# @param status [String] Message is queued for delivery.
|
36
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
37
|
+
# @return [Pinnacle::Types::SentSmsDetails]
|
38
|
+
def initialize(message_id:, segments:, total_cost:, sender:, recipient:, status:, additional_properties: nil)
|
39
|
+
@message_id = message_id
|
40
|
+
@segments = segments
|
41
|
+
@total_cost = total_cost
|
42
|
+
@sender = sender
|
43
|
+
@recipient = recipient
|
44
|
+
@status = status
|
45
|
+
@additional_properties = additional_properties
|
46
|
+
@_field_set = {
|
47
|
+
"messageId": message_id,
|
48
|
+
"segments": segments,
|
49
|
+
"totalCost": total_cost,
|
50
|
+
"sender": sender,
|
51
|
+
"recipient": recipient,
|
52
|
+
"status": status
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Deserialize a JSON object to an instance of SentSmsDetails
|
57
|
+
#
|
58
|
+
# @param json_object [String]
|
59
|
+
# @return [Pinnacle::Types::SentSmsDetails]
|
60
|
+
def self.from_json(json_object:)
|
61
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
62
|
+
parsed_json = JSON.parse(json_object)
|
63
|
+
message_id = parsed_json["messageId"]
|
64
|
+
if parsed_json["segments"].nil?
|
65
|
+
segments = nil
|
66
|
+
else
|
67
|
+
segments = parsed_json["segments"].to_json
|
68
|
+
segments = Pinnacle::Types::SendSmsResponseSegments.from_json(json_object: segments)
|
69
|
+
end
|
70
|
+
total_cost = parsed_json["totalCost"]
|
71
|
+
sender = parsed_json["sender"]
|
72
|
+
recipient = parsed_json["recipient"]
|
73
|
+
status = parsed_json["status"]
|
74
|
+
new(
|
75
|
+
message_id: message_id,
|
76
|
+
segments: segments,
|
77
|
+
total_cost: total_cost,
|
78
|
+
sender: sender,
|
79
|
+
recipient: recipient,
|
80
|
+
status: status,
|
81
|
+
additional_properties: struct
|
82
|
+
)
|
83
|
+
end
|
84
|
+
|
85
|
+
# Serialize an instance of SentSmsDetails to a JSON object
|
86
|
+
#
|
87
|
+
# @return [String]
|
88
|
+
def to_json(*_args)
|
89
|
+
@_field_set&.to_json
|
90
|
+
end
|
91
|
+
|
92
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
93
|
+
# hash and check each fields type against the current object's property
|
94
|
+
# definitions.
|
95
|
+
#
|
96
|
+
# @param obj [Object]
|
97
|
+
# @return [Void]
|
98
|
+
def self.validate_raw(obj:)
|
99
|
+
obj.message_id.is_a?(Integer) != false || raise("Passed value for field obj.message_id is not the expected type, validation failed.")
|
100
|
+
Pinnacle::Types::SendSmsResponseSegments.validate_raw(obj: obj.segments)
|
101
|
+
obj.total_cost.is_a?(Float) != false || raise("Passed value for field obj.total_cost is not the expected type, validation failed.")
|
102
|
+
obj.sender.is_a?(String) != false || raise("Passed value for field obj.sender is not the expected type, validation failed.")
|
103
|
+
obj.recipient.is_a?(String) != false || raise("Passed value for field obj.recipient is not the expected type, validation failed.")
|
104
|
+
obj.status.is_a?(String) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "pinnacle_url_config"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
class ShortenedUrl
|
10
|
+
# @return [String] Your custom shortened link following the format `https://pncl.to/{linkId}`,
|
11
|
+
# where `{linkId}` is the unique identifier for the URL that can be used with our
|
12
|
+
# other endpoint.
|
13
|
+
attr_reader :url
|
14
|
+
# @return [Pinnacle::Types::PinnacleUrlConfig]
|
15
|
+
attr_reader :config
|
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 url [String] Your custom shortened link following the format `https://pncl.to/{linkId}`,
|
25
|
+
# where `{linkId}` is the unique identifier for the URL that can be used with our
|
26
|
+
# other endpoint.
|
27
|
+
# @param config [Pinnacle::Types::PinnacleUrlConfig]
|
28
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
# @return [Pinnacle::Types::ShortenedUrl]
|
30
|
+
def initialize(url:, config:, additional_properties: nil)
|
31
|
+
@url = url
|
32
|
+
@config = config
|
33
|
+
@additional_properties = additional_properties
|
34
|
+
@_field_set = { "url": url, "config": config }
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deserialize a JSON object to an instance of ShortenedUrl
|
38
|
+
#
|
39
|
+
# @param json_object [String]
|
40
|
+
# @return [Pinnacle::Types::ShortenedUrl]
|
41
|
+
def self.from_json(json_object:)
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
44
|
+
url = parsed_json["url"]
|
45
|
+
if parsed_json["config"].nil?
|
46
|
+
config = nil
|
47
|
+
else
|
48
|
+
config = parsed_json["config"].to_json
|
49
|
+
config = Pinnacle::Types::PinnacleUrlConfig.from_json(json_object: config)
|
50
|
+
end
|
51
|
+
new(
|
52
|
+
url: url,
|
53
|
+
config: config,
|
54
|
+
additional_properties: struct
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Serialize an instance of ShortenedUrl to a JSON object
|
59
|
+
#
|
60
|
+
# @return [String]
|
61
|
+
def to_json(*_args)
|
62
|
+
@_field_set&.to_json
|
63
|
+
end
|
64
|
+
|
65
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
66
|
+
# hash and check each fields type against the current object's property
|
67
|
+
# definitions.
|
68
|
+
#
|
69
|
+
# @param obj [Object]
|
70
|
+
# @return [Void]
|
71
|
+
def self.validate_raw(obj:)
|
72
|
+
obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
|
73
|
+
Pinnacle::Types::PinnacleUrlConfig.validate_raw(obj: obj.config)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "link_click_event"
|
4
|
+
require_relative "pinnacle_url_config"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module Pinnacle
|
9
|
+
module Types
|
10
|
+
class ShortenedUrlWithClickData
|
11
|
+
# @return [Array<Pinnacle::Types::LinkClickEvent>] Array of click analytics data for this URL. <br>
|
12
|
+
# Click data will be empty if no one has visited your link yet.
|
13
|
+
attr_reader :clicks
|
14
|
+
# @return [String] Your custom shortened link following the format `https://pncl.to/{linkId}`,
|
15
|
+
# where `{linkId}` is the unique identifier for the URL that can be used with our
|
16
|
+
# other endpoint.
|
17
|
+
attr_reader :url
|
18
|
+
# @return [Pinnacle::Types::PinnacleUrlConfig]
|
19
|
+
attr_reader :config
|
20
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
21
|
+
attr_reader :additional_properties
|
22
|
+
# @return [Object]
|
23
|
+
attr_reader :_field_set
|
24
|
+
protected :_field_set
|
25
|
+
|
26
|
+
OMIT = Object.new
|
27
|
+
|
28
|
+
# @param clicks [Array<Pinnacle::Types::LinkClickEvent>] Array of click analytics data for this URL. <br>
|
29
|
+
# Click data will be empty if no one has visited your link yet.
|
30
|
+
# @param url [String] Your custom shortened link following the format `https://pncl.to/{linkId}`,
|
31
|
+
# where `{linkId}` is the unique identifier for the URL that can be used with our
|
32
|
+
# other endpoint.
|
33
|
+
# @param config [Pinnacle::Types::PinnacleUrlConfig]
|
34
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
35
|
+
# @return [Pinnacle::Types::ShortenedUrlWithClickData]
|
36
|
+
def initialize(clicks:, url:, config:, additional_properties: nil)
|
37
|
+
@clicks = clicks
|
38
|
+
@url = url
|
39
|
+
@config = config
|
40
|
+
@additional_properties = additional_properties
|
41
|
+
@_field_set = { "clicks": clicks, "url": url, "config": config }
|
42
|
+
end
|
43
|
+
|
44
|
+
# Deserialize a JSON object to an instance of ShortenedUrlWithClickData
|
45
|
+
#
|
46
|
+
# @param json_object [String]
|
47
|
+
# @return [Pinnacle::Types::ShortenedUrlWithClickData]
|
48
|
+
def self.from_json(json_object:)
|
49
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
50
|
+
parsed_json = JSON.parse(json_object)
|
51
|
+
clicks = parsed_json["clicks"]&.map do |item|
|
52
|
+
item = item.to_json
|
53
|
+
Pinnacle::Types::LinkClickEvent.from_json(json_object: item)
|
54
|
+
end
|
55
|
+
url = parsed_json["url"]
|
56
|
+
if parsed_json["config"].nil?
|
57
|
+
config = nil
|
58
|
+
else
|
59
|
+
config = parsed_json["config"].to_json
|
60
|
+
config = Pinnacle::Types::PinnacleUrlConfig.from_json(json_object: config)
|
61
|
+
end
|
62
|
+
new(
|
63
|
+
clicks: clicks,
|
64
|
+
url: url,
|
65
|
+
config: config,
|
66
|
+
additional_properties: struct
|
67
|
+
)
|
68
|
+
end
|
69
|
+
|
70
|
+
# Serialize an instance of ShortenedUrlWithClickData to a JSON object
|
71
|
+
#
|
72
|
+
# @return [String]
|
73
|
+
def to_json(*_args)
|
74
|
+
@_field_set&.to_json
|
75
|
+
end
|
76
|
+
|
77
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
78
|
+
# hash and check each fields type against the current object's property
|
79
|
+
# definitions.
|
80
|
+
#
|
81
|
+
# @param obj [Object]
|
82
|
+
# @return [Void]
|
83
|
+
def self.validate_raw(obj:)
|
84
|
+
obj.clicks.is_a?(Array) != false || raise("Passed value for field obj.clicks is not the expected type, validation failed.")
|
85
|
+
obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
|
86
|
+
Pinnacle::Types::PinnacleUrlConfig.validate_raw(obj: obj.config)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
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
|
+
# SMS message containing plain text only.
|
9
|
+
class SmsContent
|
10
|
+
# @return [String] Message content.
|
11
|
+
attr_reader :text
|
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 text [String] Message content.
|
21
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
+
# @return [Pinnacle::Types::SmsContent]
|
23
|
+
def initialize(text:, additional_properties: nil)
|
24
|
+
@text = text
|
25
|
+
@additional_properties = additional_properties
|
26
|
+
@_field_set = { "text": text }
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of SmsContent
|
30
|
+
#
|
31
|
+
# @param json_object [String]
|
32
|
+
# @return [Pinnacle::Types::SmsContent]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
parsed_json = JSON.parse(json_object)
|
36
|
+
text = parsed_json["text"]
|
37
|
+
new(text: text, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of SmsContent 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.text.is_a?(String) != false || raise("Passed value for field obj.text is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|