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,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "webhook_event_enum"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Create a new webhook and immediately attach it to your phone number.
|
10
|
+
class AttachWebhookSchemaName
|
11
|
+
# @return [String] Name of your new webhook.
|
12
|
+
attr_reader :name
|
13
|
+
# @return [String] HTTPS endpoint where your webhook events will be sent as HTTP POST requests.
|
14
|
+
# <br>
|
15
|
+
# Ensure this URL is publicly accessible and ready to handle incoming webhook
|
16
|
+
# calls.
|
17
|
+
attr_reader :url
|
18
|
+
# @return [Pinnacle::Types::WebhookEventEnum] Select the event type that will trigger this webhook. <br>
|
19
|
+
# Set to null if you want to listen to all event types for this phone number. <br>
|
20
|
+
# Defaults to null.
|
21
|
+
attr_reader :event
|
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 name [String] Name of your new webhook.
|
31
|
+
# @param url [String] HTTPS endpoint where your webhook events will be sent as HTTP POST requests.
|
32
|
+
# <br>
|
33
|
+
# Ensure this URL is publicly accessible and ready to handle incoming webhook
|
34
|
+
# calls.
|
35
|
+
# @param event [Pinnacle::Types::WebhookEventEnum] Select the event type that will trigger this webhook. <br>
|
36
|
+
# Set to null if you want to listen to all event types for this phone number. <br>
|
37
|
+
# Defaults to null.
|
38
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
39
|
+
# @return [Pinnacle::Types::AttachWebhookSchemaName]
|
40
|
+
def initialize(name:, url:, event: OMIT, additional_properties: nil)
|
41
|
+
@name = name
|
42
|
+
@url = url
|
43
|
+
@event = event if event != OMIT
|
44
|
+
@additional_properties = additional_properties
|
45
|
+
@_field_set = { "name": name, "url": url, "event": event }.reject do |_k, v|
|
46
|
+
v == OMIT
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# Deserialize a JSON object to an instance of AttachWebhookSchemaName
|
51
|
+
#
|
52
|
+
# @param json_object [String]
|
53
|
+
# @return [Pinnacle::Types::AttachWebhookSchemaName]
|
54
|
+
def self.from_json(json_object:)
|
55
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
56
|
+
parsed_json = JSON.parse(json_object)
|
57
|
+
name = parsed_json["name"]
|
58
|
+
url = parsed_json["url"]
|
59
|
+
event = parsed_json["event"]
|
60
|
+
new(
|
61
|
+
name: name,
|
62
|
+
url: url,
|
63
|
+
event: event,
|
64
|
+
additional_properties: struct
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
# Serialize an instance of AttachWebhookSchemaName 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.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
83
|
+
obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
|
84
|
+
obj.event&.is_a?(Pinnacle::Types::WebhookEventEnum) != false || raise("Passed value for field obj.event is not the expected type, validation failed.")
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "webhook_event_enum"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Attach a webhook you’ve already created in your account to this phone number.
|
10
|
+
class AttachWebhookSchemaWebhookId
|
11
|
+
# @return [Integer] The unique ID of the webhook you want to attach.<br>
|
12
|
+
# Make sure this webhook is active and able to receive event notifications.
|
13
|
+
attr_reader :webhook_id
|
14
|
+
# @return [Pinnacle::Types::WebhookEventEnum] Select the event type that will trigger this webhook. <br>
|
15
|
+
# Set to null if you want to listen to all event types for this phone number. <br>
|
16
|
+
# Defaults to null.
|
17
|
+
attr_reader :event
|
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 webhook_id [Integer] The unique ID of the webhook you want to attach.<br>
|
27
|
+
# Make sure this webhook is active and able to receive event notifications.
|
28
|
+
# @param event [Pinnacle::Types::WebhookEventEnum] Select the event type that will trigger this webhook. <br>
|
29
|
+
# Set to null if you want to listen to all event types for this phone number. <br>
|
30
|
+
# Defaults to null.
|
31
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
32
|
+
# @return [Pinnacle::Types::AttachWebhookSchemaWebhookId]
|
33
|
+
def initialize(webhook_id:, event: OMIT, additional_properties: nil)
|
34
|
+
@webhook_id = webhook_id
|
35
|
+
@event = event if event != OMIT
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = { "webhookId": webhook_id, "event": event }.reject do |_k, v|
|
38
|
+
v == OMIT
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Deserialize a JSON object to an instance of AttachWebhookSchemaWebhookId
|
43
|
+
#
|
44
|
+
# @param json_object [String]
|
45
|
+
# @return [Pinnacle::Types::AttachWebhookSchemaWebhookId]
|
46
|
+
def self.from_json(json_object:)
|
47
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
48
|
+
parsed_json = JSON.parse(json_object)
|
49
|
+
webhook_id = parsed_json["webhookId"]
|
50
|
+
event = parsed_json["event"]
|
51
|
+
new(
|
52
|
+
webhook_id: webhook_id,
|
53
|
+
event: event,
|
54
|
+
additional_properties: struct
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Serialize an instance of AttachWebhookSchemaWebhookId 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.webhook_id.is_a?(Integer) != false || raise("Passed value for field obj.webhook_id is not the expected type, validation failed.")
|
73
|
+
obj.event&.is_a?(Pinnacle::Types::WebhookEventEnum) != false || raise("Passed value for field obj.event is not the expected type, validation failed.")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "phone_number_campaign_attach_phone_numbers_item"
|
4
|
+
require_relative "phone_number_campaign_attach_failed_item"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module Pinnacle
|
9
|
+
module Types
|
10
|
+
class AttachedPhoneNumberResult
|
11
|
+
# @return [Array<Pinnacle::Types::PhoneNumberCampaignAttachPhoneNumbersItem>] List of phone numbers.
|
12
|
+
attr_reader :phone_numbers
|
13
|
+
# @return [Array<Pinnacle::Types::PhoneNumberCampaignAttachFailedItem>] List of numbers that were not failed to be attached.
|
14
|
+
attr_reader :failed
|
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 phone_numbers [Array<Pinnacle::Types::PhoneNumberCampaignAttachPhoneNumbersItem>] List of phone numbers.
|
24
|
+
# @param failed [Array<Pinnacle::Types::PhoneNumberCampaignAttachFailedItem>] List of numbers that were not failed to be attached.
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [Pinnacle::Types::AttachedPhoneNumberResult]
|
27
|
+
def initialize(phone_numbers:, failed:, additional_properties: nil)
|
28
|
+
@phone_numbers = phone_numbers
|
29
|
+
@failed = failed
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = { "phoneNumbers": phone_numbers, "failed": failed }
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deserialize a JSON object to an instance of AttachedPhoneNumberResult
|
35
|
+
#
|
36
|
+
# @param json_object [String]
|
37
|
+
# @return [Pinnacle::Types::AttachedPhoneNumberResult]
|
38
|
+
def self.from_json(json_object:)
|
39
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
40
|
+
parsed_json = JSON.parse(json_object)
|
41
|
+
phone_numbers = parsed_json["phoneNumbers"]&.map do |item|
|
42
|
+
item = item.to_json
|
43
|
+
Pinnacle::Types::PhoneNumberCampaignAttachPhoneNumbersItem.from_json(json_object: item)
|
44
|
+
end
|
45
|
+
failed = parsed_json["failed"]&.map do |item|
|
46
|
+
item = item.to_json
|
47
|
+
Pinnacle::Types::PhoneNumberCampaignAttachFailedItem.from_json(json_object: item)
|
48
|
+
end
|
49
|
+
new(
|
50
|
+
phone_numbers: phone_numbers,
|
51
|
+
failed: failed,
|
52
|
+
additional_properties: struct
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Serialize an instance of AttachedPhoneNumberResult to a JSON object
|
57
|
+
#
|
58
|
+
# @return [String]
|
59
|
+
def to_json(*_args)
|
60
|
+
@_field_set&.to_json
|
61
|
+
end
|
62
|
+
|
63
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
64
|
+
# hash and check each fields type against the current object's property
|
65
|
+
# definitions.
|
66
|
+
#
|
67
|
+
# @param obj [Object]
|
68
|
+
# @return [Void]
|
69
|
+
def self.validate_raw(obj:)
|
70
|
+
obj.phone_numbers.is_a?(Array) != false || raise("Passed value for field obj.phone_numbers is not the expected type, validation failed.")
|
71
|
+
obj.failed.is_a?(Array) != false || raise("Passed value for field obj.failed is not the expected type, validation failed.")
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class AutofillCampaignParams
|
9
|
+
# @return [String] Any additional information you want to provide.
|
10
|
+
attr_reader :additional_info
|
11
|
+
# @return [Integer] Campaign ID.
|
12
|
+
attr_reader :campaign_id
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param additional_info [String] Any additional information you want to provide.
|
22
|
+
# @param campaign_id [Integer] Campaign ID.
|
23
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
+
# @return [Pinnacle::Types::AutofillCampaignParams]
|
25
|
+
def initialize(additional_info: OMIT, campaign_id: OMIT, additional_properties: nil)
|
26
|
+
@additional_info = additional_info if additional_info != OMIT
|
27
|
+
@campaign_id = campaign_id if campaign_id != OMIT
|
28
|
+
@additional_properties = additional_properties
|
29
|
+
@_field_set = { "additionalInfo": additional_info, "campaignId": campaign_id }.reject do |_k, v|
|
30
|
+
v == OMIT
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deserialize a JSON object to an instance of AutofillCampaignParams
|
35
|
+
#
|
36
|
+
# @param json_object [String]
|
37
|
+
# @return [Pinnacle::Types::AutofillCampaignParams]
|
38
|
+
def self.from_json(json_object:)
|
39
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
40
|
+
parsed_json = JSON.parse(json_object)
|
41
|
+
additional_info = parsed_json["additionalInfo"]
|
42
|
+
campaign_id = parsed_json["campaignId"]
|
43
|
+
new(
|
44
|
+
additional_info: additional_info,
|
45
|
+
campaign_id: campaign_id,
|
46
|
+
additional_properties: struct
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Serialize an instance of AutofillCampaignParams 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.additional_info&.is_a?(String) != false || raise("Passed value for field obj.additional_info is not the expected type, validation failed.")
|
65
|
+
obj.campaign_id&.is_a?(Integer) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,169 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "autofill_dlc_response_keywords"
|
4
|
+
require_relative "autofill_dlc_response_links"
|
5
|
+
require_relative "autofill_dlc_response_options"
|
6
|
+
require_relative "autofill_dlc_response_use_case"
|
7
|
+
require "ostruct"
|
8
|
+
require "json"
|
9
|
+
|
10
|
+
module Pinnacle
|
11
|
+
module Types
|
12
|
+
class AutofillDlcCampaignResponse
|
13
|
+
# @return [Boolean] Whether the campaign renews automatically.
|
14
|
+
attr_reader :auto_renew
|
15
|
+
# @return [Integer] Brand id.
|
16
|
+
attr_reader :brand
|
17
|
+
# @return [Integer] Unique identifier for the campaign.
|
18
|
+
attr_reader :campaign_id
|
19
|
+
# @return [String] Description of the campaign.
|
20
|
+
attr_reader :description
|
21
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywords] Keyword response configuration.
|
22
|
+
attr_reader :keywords
|
23
|
+
# @return [Pinnacle::Types::AutofillDlcResponseLinks] Legal documentation links.
|
24
|
+
attr_reader :links
|
25
|
+
# @return [String] Describe the flow of how users will opt in to this campaign.
|
26
|
+
attr_reader :message_flow
|
27
|
+
# @return [String] Display name of the campaign.
|
28
|
+
attr_reader :name
|
29
|
+
# @return [Pinnacle::Types::AutofillDlcResponseOptions] Campaign configuration options.
|
30
|
+
attr_reader :options
|
31
|
+
# @return [Array<String>] Example messages for the campaign.
|
32
|
+
attr_reader :sample_messages
|
33
|
+
# @return [Pinnacle::Types::AutofillDlcResponseUseCase] Use case for the campaign.
|
34
|
+
attr_reader :use_case
|
35
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
36
|
+
attr_reader :additional_properties
|
37
|
+
# @return [Object]
|
38
|
+
attr_reader :_field_set
|
39
|
+
protected :_field_set
|
40
|
+
|
41
|
+
OMIT = Object.new
|
42
|
+
|
43
|
+
# @param auto_renew [Boolean] Whether the campaign renews automatically.
|
44
|
+
# @param brand [Integer] Brand id.
|
45
|
+
# @param campaign_id [Integer] Unique identifier for the campaign.
|
46
|
+
# @param description [String] Description of the campaign.
|
47
|
+
# @param keywords [Pinnacle::Types::AutofillDlcResponseKeywords] Keyword response configuration.
|
48
|
+
# @param links [Pinnacle::Types::AutofillDlcResponseLinks] Legal documentation links.
|
49
|
+
# @param message_flow [String] Describe the flow of how users will opt in to this campaign.
|
50
|
+
# @param name [String] Display name of the campaign.
|
51
|
+
# @param options [Pinnacle::Types::AutofillDlcResponseOptions] Campaign configuration options.
|
52
|
+
# @param sample_messages [Array<String>] Example messages for the campaign.
|
53
|
+
# @param use_case [Pinnacle::Types::AutofillDlcResponseUseCase] Use case for the campaign.
|
54
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
55
|
+
# @return [Pinnacle::Types::AutofillDlcCampaignResponse]
|
56
|
+
def initialize(auto_renew:, brand: OMIT, campaign_id: OMIT, description: OMIT, keywords: OMIT, links: OMIT,
|
57
|
+
message_flow: OMIT, name: OMIT, options: OMIT, sample_messages: OMIT, use_case: OMIT, additional_properties: nil)
|
58
|
+
@auto_renew = auto_renew
|
59
|
+
@brand = brand if brand != OMIT
|
60
|
+
@campaign_id = campaign_id if campaign_id != OMIT
|
61
|
+
@description = description if description != OMIT
|
62
|
+
@keywords = keywords if keywords != OMIT
|
63
|
+
@links = links if links != OMIT
|
64
|
+
@message_flow = message_flow if message_flow != OMIT
|
65
|
+
@name = name if name != OMIT
|
66
|
+
@options = options if options != OMIT
|
67
|
+
@sample_messages = sample_messages if sample_messages != OMIT
|
68
|
+
@use_case = use_case if use_case != OMIT
|
69
|
+
@additional_properties = additional_properties
|
70
|
+
@_field_set = {
|
71
|
+
"autoRenew": auto_renew,
|
72
|
+
"brand": brand,
|
73
|
+
"campaignId": campaign_id,
|
74
|
+
"description": description,
|
75
|
+
"keywords": keywords,
|
76
|
+
"links": links,
|
77
|
+
"messageFlow": message_flow,
|
78
|
+
"name": name,
|
79
|
+
"options": options,
|
80
|
+
"sampleMessages": sample_messages,
|
81
|
+
"useCase": use_case
|
82
|
+
}.reject do |_k, v|
|
83
|
+
v == OMIT
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# Deserialize a JSON object to an instance of AutofillDlcCampaignResponse
|
88
|
+
#
|
89
|
+
# @param json_object [String]
|
90
|
+
# @return [Pinnacle::Types::AutofillDlcCampaignResponse]
|
91
|
+
def self.from_json(json_object:)
|
92
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
93
|
+
parsed_json = JSON.parse(json_object)
|
94
|
+
auto_renew = parsed_json["autoRenew"]
|
95
|
+
brand = parsed_json["brand"]
|
96
|
+
campaign_id = parsed_json["campaignId"]
|
97
|
+
description = parsed_json["description"]
|
98
|
+
if parsed_json["keywords"].nil?
|
99
|
+
keywords = nil
|
100
|
+
else
|
101
|
+
keywords = parsed_json["keywords"].to_json
|
102
|
+
keywords = Pinnacle::Types::AutofillDlcResponseKeywords.from_json(json_object: keywords)
|
103
|
+
end
|
104
|
+
if parsed_json["links"].nil?
|
105
|
+
links = nil
|
106
|
+
else
|
107
|
+
links = parsed_json["links"].to_json
|
108
|
+
links = Pinnacle::Types::AutofillDlcResponseLinks.from_json(json_object: links)
|
109
|
+
end
|
110
|
+
message_flow = parsed_json["messageFlow"]
|
111
|
+
name = parsed_json["name"]
|
112
|
+
if parsed_json["options"].nil?
|
113
|
+
options = nil
|
114
|
+
else
|
115
|
+
options = parsed_json["options"].to_json
|
116
|
+
options = Pinnacle::Types::AutofillDlcResponseOptions.from_json(json_object: options)
|
117
|
+
end
|
118
|
+
sample_messages = parsed_json["sampleMessages"]
|
119
|
+
if parsed_json["useCase"].nil?
|
120
|
+
use_case = nil
|
121
|
+
else
|
122
|
+
use_case = parsed_json["useCase"].to_json
|
123
|
+
use_case = Pinnacle::Types::AutofillDlcResponseUseCase.from_json(json_object: use_case)
|
124
|
+
end
|
125
|
+
new(
|
126
|
+
auto_renew: auto_renew,
|
127
|
+
brand: brand,
|
128
|
+
campaign_id: campaign_id,
|
129
|
+
description: description,
|
130
|
+
keywords: keywords,
|
131
|
+
links: links,
|
132
|
+
message_flow: message_flow,
|
133
|
+
name: name,
|
134
|
+
options: options,
|
135
|
+
sample_messages: sample_messages,
|
136
|
+
use_case: use_case,
|
137
|
+
additional_properties: struct
|
138
|
+
)
|
139
|
+
end
|
140
|
+
|
141
|
+
# Serialize an instance of AutofillDlcCampaignResponse to a JSON object
|
142
|
+
#
|
143
|
+
# @return [String]
|
144
|
+
def to_json(*_args)
|
145
|
+
@_field_set&.to_json
|
146
|
+
end
|
147
|
+
|
148
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
149
|
+
# hash and check each fields type against the current object's property
|
150
|
+
# definitions.
|
151
|
+
#
|
152
|
+
# @param obj [Object]
|
153
|
+
# @return [Void]
|
154
|
+
def self.validate_raw(obj:)
|
155
|
+
obj.auto_renew.is_a?(Boolean) != false || raise("Passed value for field obj.auto_renew is not the expected type, validation failed.")
|
156
|
+
obj.brand&.is_a?(Integer) != false || raise("Passed value for field obj.brand is not the expected type, validation failed.")
|
157
|
+
obj.campaign_id&.is_a?(Integer) != false || raise("Passed value for field obj.campaign_id is not the expected type, validation failed.")
|
158
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
159
|
+
obj.keywords.nil? || Pinnacle::Types::AutofillDlcResponseKeywords.validate_raw(obj: obj.keywords)
|
160
|
+
obj.links.nil? || Pinnacle::Types::AutofillDlcResponseLinks.validate_raw(obj: obj.links)
|
161
|
+
obj.message_flow&.is_a?(String) != false || raise("Passed value for field obj.message_flow is not the expected type, validation failed.")
|
162
|
+
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
163
|
+
obj.options.nil? || Pinnacle::Types::AutofillDlcResponseOptions.validate_raw(obj: obj.options)
|
164
|
+
obj.sample_messages&.is_a?(Array) != false || raise("Passed value for field obj.sample_messages is not the expected type, validation failed.")
|
165
|
+
obj.use_case.nil? || Pinnacle::Types::AutofillDlcResponseUseCase.validate_raw(obj: obj.use_case)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "autofill_dlc_response_keywords_help"
|
4
|
+
require_relative "autofill_dlc_response_keywords_opt_in"
|
5
|
+
require_relative "autofill_dlc_response_keywords_opt_out"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module Pinnacle
|
10
|
+
module Types
|
11
|
+
# Keyword response configuration.
|
12
|
+
class AutofillDlcResponseKeywords
|
13
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsHelp] Help keyword settings.
|
14
|
+
attr_reader :help
|
15
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsOptIn] Opt-in keyword settings.
|
16
|
+
attr_reader :opt_in
|
17
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsOptOut] Opt-out keyword settings.
|
18
|
+
attr_reader :opt_out
|
19
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
20
|
+
attr_reader :additional_properties
|
21
|
+
# @return [Object]
|
22
|
+
attr_reader :_field_set
|
23
|
+
protected :_field_set
|
24
|
+
|
25
|
+
OMIT = Object.new
|
26
|
+
|
27
|
+
# @param help [Pinnacle::Types::AutofillDlcResponseKeywordsHelp] Help keyword settings.
|
28
|
+
# @param opt_in [Pinnacle::Types::AutofillDlcResponseKeywordsOptIn] Opt-in keyword settings.
|
29
|
+
# @param opt_out [Pinnacle::Types::AutofillDlcResponseKeywordsOptOut] Opt-out keyword settings.
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywords]
|
32
|
+
def initialize(help: OMIT, opt_in: OMIT, opt_out: OMIT, additional_properties: nil)
|
33
|
+
@help = help if help != OMIT
|
34
|
+
@opt_in = opt_in if opt_in != OMIT
|
35
|
+
@opt_out = opt_out if opt_out != OMIT
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = { "HELP": help, "OPT_IN": opt_in, "OPT_OUT": opt_out }.reject do |_k, v|
|
38
|
+
v == OMIT
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Deserialize a JSON object to an instance of AutofillDlcResponseKeywords
|
43
|
+
#
|
44
|
+
# @param json_object [String]
|
45
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywords]
|
46
|
+
def self.from_json(json_object:)
|
47
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
48
|
+
parsed_json = JSON.parse(json_object)
|
49
|
+
if parsed_json["HELP"].nil?
|
50
|
+
help = nil
|
51
|
+
else
|
52
|
+
help = parsed_json["HELP"].to_json
|
53
|
+
help = Pinnacle::Types::AutofillDlcResponseKeywordsHelp.from_json(json_object: help)
|
54
|
+
end
|
55
|
+
if parsed_json["OPT_IN"].nil?
|
56
|
+
opt_in = nil
|
57
|
+
else
|
58
|
+
opt_in = parsed_json["OPT_IN"].to_json
|
59
|
+
opt_in = Pinnacle::Types::AutofillDlcResponseKeywordsOptIn.from_json(json_object: opt_in)
|
60
|
+
end
|
61
|
+
if parsed_json["OPT_OUT"].nil?
|
62
|
+
opt_out = nil
|
63
|
+
else
|
64
|
+
opt_out = parsed_json["OPT_OUT"].to_json
|
65
|
+
opt_out = Pinnacle::Types::AutofillDlcResponseKeywordsOptOut.from_json(json_object: opt_out)
|
66
|
+
end
|
67
|
+
new(
|
68
|
+
help: help,
|
69
|
+
opt_in: opt_in,
|
70
|
+
opt_out: opt_out,
|
71
|
+
additional_properties: struct
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
75
|
+
# Serialize an instance of AutofillDlcResponseKeywords to a JSON object
|
76
|
+
#
|
77
|
+
# @return [String]
|
78
|
+
def to_json(*_args)
|
79
|
+
@_field_set&.to_json
|
80
|
+
end
|
81
|
+
|
82
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
83
|
+
# hash and check each fields type against the current object's property
|
84
|
+
# definitions.
|
85
|
+
#
|
86
|
+
# @param obj [Object]
|
87
|
+
# @return [Void]
|
88
|
+
def self.validate_raw(obj:)
|
89
|
+
obj.help.nil? || Pinnacle::Types::AutofillDlcResponseKeywordsHelp.validate_raw(obj: obj.help)
|
90
|
+
obj.opt_in.nil? || Pinnacle::Types::AutofillDlcResponseKeywordsOptIn.validate_raw(obj: obj.opt_in)
|
91
|
+
obj.opt_out.nil? || Pinnacle::Types::AutofillDlcResponseKeywordsOptOut.validate_raw(obj: obj.opt_out)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Help keyword settings.
|
9
|
+
class AutofillDlcResponseKeywordsHelp
|
10
|
+
# @return [String] Response message for help keywords.
|
11
|
+
attr_reader :message
|
12
|
+
# @return [Array<String>] Keywords that trigger help response.
|
13
|
+
attr_reader :values
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
|
+
attr_reader :additional_properties
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :_field_set
|
18
|
+
protected :_field_set
|
19
|
+
|
20
|
+
OMIT = Object.new
|
21
|
+
|
22
|
+
# @param message [String] Response message for help keywords.
|
23
|
+
# @param values [Array<String>] Keywords that trigger help response.
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsHelp]
|
26
|
+
def initialize(message: OMIT, values: OMIT, additional_properties: nil)
|
27
|
+
@message = message if message != OMIT
|
28
|
+
@values = values if values != OMIT
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "message": message, "values": values }.reject do |_k, v|
|
31
|
+
v == OMIT
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Deserialize a JSON object to an instance of AutofillDlcResponseKeywordsHelp
|
36
|
+
#
|
37
|
+
# @param json_object [String]
|
38
|
+
# @return [Pinnacle::Types::AutofillDlcResponseKeywordsHelp]
|
39
|
+
def self.from_json(json_object:)
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
+
parsed_json = JSON.parse(json_object)
|
42
|
+
message = parsed_json["message"]
|
43
|
+
values = parsed_json["values"]
|
44
|
+
new(
|
45
|
+
message: message,
|
46
|
+
values: values,
|
47
|
+
additional_properties: struct
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
# Serialize an instance of AutofillDlcResponseKeywordsHelp to a JSON object
|
52
|
+
#
|
53
|
+
# @return [String]
|
54
|
+
def to_json(*_args)
|
55
|
+
@_field_set&.to_json
|
56
|
+
end
|
57
|
+
|
58
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
59
|
+
# hash and check each fields type against the current object's property
|
60
|
+
# definitions.
|
61
|
+
#
|
62
|
+
# @param obj [Object]
|
63
|
+
# @return [Void]
|
64
|
+
def self.validate_raw(obj:)
|
65
|
+
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
66
|
+
obj.values&.is_a?(Array) != false || raise("Passed value for field obj.values is not the expected type, validation failed.")
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|