rcs 1.0.18 → 2.0.0.pre.rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/environment.rb +1 -1
- data/lib/rcs/brands/client.rb +631 -0
- data/lib/rcs/brands/types/autofill_brand_schema_options.rb +61 -0
- data/lib/rcs/brands/types/brand_contact.rb +84 -0
- data/lib/rcs/campaigns/client.rb +44 -0
- data/lib/rcs/campaigns/dlc/client.rb +480 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords.rb +99 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_help.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_in.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_out.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_links.rb +74 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_options.rb +110 -0
- data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_use_case.rb +76 -0
- data/lib/rcs/campaigns/rcs/client.rb +457 -0
- data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +155 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent.rb +140 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_emails_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_phones_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_websites_item.rb +73 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_links.rb +74 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_in.rb +75 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_out.rb +76 -0
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_use_case.rb +75 -0
- data/lib/rcs/campaigns/toll_free/client.rb +429 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +130 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_opt_in.rb +86 -0
- data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_use_case.rb +75 -0
- data/lib/rcs/contacts/client.rb +275 -0
- data/lib/rcs/conversations/client.rb +273 -0
- data/lib/rcs/message/client.rb +30 -0
- data/lib/rcs/message/sms/client.rb +96 -0
- data/lib/rcs/messages/client.rb +192 -0
- data/lib/rcs/messages/mms/client.rb +98 -0
- data/lib/rcs/messages/rcs/client.rb +94 -0
- data/lib/rcs/messages/send/client.rb +318 -0
- data/lib/rcs/messages/send/types/send_mms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_mms_schema_options.rb +108 -0
- data/lib/rcs/messages/send/types/send_rcs_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_response.rb +60 -0
- data/lib/rcs/messages/send/types/send_sms_schema_options.rb +81 -0
- data/lib/rcs/messages/types/message_reaction_schema_options.rb +71 -0
- data/lib/rcs/phone_numbers/campaign/client.rb +179 -0
- data/lib/rcs/phone_numbers/client.rb +359 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_level.rb +16 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options.rb +93 -0
- data/lib/rcs/phone_numbers/types/phone_details_schema_options_enhanced_contact_info.rb +64 -0
- data/lib/rcs/phone_numbers/types/phone_numbers_get_response.rb +58 -0
- data/lib/rcs/phone_numbers/types/search_schema_location.rb +96 -0
- data/lib/rcs/phone_numbers/types/search_schema_number.rb +81 -0
- data/lib/rcs/phone_numbers/types/search_schema_options.rb +62 -0
- data/lib/rcs/phone_numbers/webhook/client.rb +191 -0
- data/lib/rcs/status/client.rb +30 -0
- data/lib/rcs/status/get/client.rb +367 -0
- data/lib/rcs/tools/client.rb +32 -199
- data/lib/rcs/tools/contact_card/client.rb +285 -0
- data/lib/rcs/tools/contact_card/types/get_v_card_schema_options.rb +67 -0
- data/lib/rcs/tools/file/client.rb +138 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options.rb +70 -0
- data/lib/rcs/tools/file/types/file_upload_schema_options_download.rb +66 -0
- data/lib/rcs/tools/url/client.rb +245 -0
- data/lib/rcs/types/advanced_phone_information.rb +147 -0
- data/lib/rcs/types/advanced_phone_information_carrier.rb +90 -0
- data/lib/rcs/types/advanced_phone_information_contact.rb +146 -0
- data/lib/rcs/types/advanced_phone_information_location.rb +142 -0
- data/lib/rcs/types/advanced_phone_information_location_coordinates.rb +73 -0
- data/lib/rcs/types/advanced_phone_information_location_country.rb +77 -0
- data/lib/rcs/types/advanced_phone_information_type.rb +97 -0
- data/lib/rcs/types/advanced_phone_information_type_recommendation.rb +15 -0
- data/lib/rcs/types/agent.rb +68 -0
- data/lib/rcs/types/attach_webhook_params.rb +60 -0
- data/lib/rcs/types/attach_webhook_response_webhook.rb +86 -0
- data/lib/rcs/types/attach_webhook_schema_name.rb +88 -0
- data/lib/rcs/types/attach_webhook_schema_webhook_id.rb +77 -0
- data/lib/rcs/types/attached_phone_number_result.rb +75 -0
- data/lib/rcs/types/autofill_campaign_params.rb +69 -0
- data/lib/rcs/types/autofill_dlc_campaign_response.rb +169 -0
- data/lib/rcs/types/autofill_dlc_response_keywords.rb +95 -0
- data/lib/rcs/types/autofill_dlc_response_keywords_help.rb +70 -0
- data/lib/rcs/{send/types/send_sms_response.rb → types/autofill_dlc_response_keywords_opt_in.rb} +18 -17
- data/lib/rcs/types/autofill_dlc_response_keywords_opt_out.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_links.rb +70 -0
- data/lib/rcs/types/autofill_dlc_response_options.rb +106 -0
- data/lib/rcs/types/autofill_dlc_response_use_case.rb +72 -0
- data/lib/rcs/types/bad_request_error_body.rb +44 -45
- data/lib/rcs/types/basic_phone_information.rb +127 -0
- data/lib/rcs/{company/types/company_register_response_brand.rb → types/basic_phone_information_contact.rb} +12 -21
- data/lib/rcs/types/basic_phone_information_location.rb +74 -0
- data/lib/rcs/types/basic_phone_information_location_country.rb +75 -0
- data/lib/rcs/types/brand_status.rb +92 -0
- data/lib/rcs/types/brand_status_enum.rb +21 -0
- data/lib/rcs/types/buy_response_capabilities.rb +77 -0
- data/lib/rcs/types/campaign_enum.rb +15 -0
- data/lib/rcs/types/campaign_query.rb +69 -0
- data/lib/rcs/{company/types/company_register_request_company_id.rb → types/campaign_submission_result.rb} +15 -16
- data/lib/rcs/types/campaign_validation_response_errors_item.rb +76 -0
- data/lib/rcs/types/campaign_validation_result.rb +71 -0
- data/lib/rcs/types/click_action.rb +73 -0
- data/lib/rcs/types/click_action_data.rb +56 -0
- data/lib/rcs/types/click_action_data_metadata.rb +69 -0
- data/lib/rcs/types/company_sector_enum.rb +26 -0
- data/lib/rcs/types/company_type_enum.rb +14 -0
- data/lib/rcs/types/configured_webhook.rb +85 -0
- data/lib/rcs/types/contact.rb +105 -0
- data/lib/rcs/types/contact_id.rb +57 -0
- data/lib/rcs/types/conversation.rb +146 -0
- data/lib/rcs/types/conversation_contact.rb +68 -0
- data/lib/rcs/types/conversation_list.rb +79 -0
- data/lib/rcs/types/conversation_sender.rb +60 -0
- data/lib/rcs/types/create_url_options.rb +61 -0
- data/lib/rcs/types/detached_phone_number_result.rb +75 -0
- data/lib/rcs/types/detached_webhook_info.rb +74 -0
- data/lib/rcs/types/detailed_phone_number_enum.rb +25 -0
- data/lib/rcs/types/dlc_assignment_status_enum.rb +19 -0
- data/lib/rcs/types/dlc_campaign_status.rb +107 -0
- data/lib/rcs/types/dlc_campaign_use_case_enum.rb +35 -0
- data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +194 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords.rb +94 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_help.rb +72 -0
- data/lib/rcs/{send/types/send_mms_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_in.rb} +20 -17
- data/lib/rcs/{send/types/send_rcs_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_out.rb} +20 -17
- data/lib/rcs/types/dlc_with_extended_brand_and_status_links.rb +70 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_options.rb +106 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_use_case.rb +72 -0
- data/lib/rcs/types/enhanced_contact.rb +9 -0
- data/lib/rcs/types/enhanced_contact_item.rb +104 -0
- data/lib/rcs/types/error.rb +61 -0
- data/lib/rcs/types/extended_brand.rb +194 -0
- data/lib/rcs/types/extended_brand_with_vetting.rb +226 -0
- data/lib/rcs/types/extended_rcs_campaign.rb +173 -0
- data/lib/rcs/{company/types/company_register_request.rb → types/get_conversation_params.rb} +13 -12
- data/lib/rcs/types/get_conversation_request_id.rb +58 -0
- data/lib/rcs/types/get_conversation_request_recipient.rb +72 -0
- data/lib/rcs/types/get_dlc_campaign_status_response_updates.rb +96 -0
- data/lib/rcs/types/get_toll_free_campaign_status_response_updates.rb +92 -0
- data/lib/rcs/types/inbound_button.rb +56 -0
- data/lib/rcs/types/link_click_event.rb +465 -0
- data/lib/rcs/{company/types/company_update_response.rb → types/location_share_action.rb} +19 -19
- data/lib/rcs/types/location_share_action_data.rb +89 -0
- data/lib/rcs/types/message.rb +174 -0
- data/lib/rcs/types/message_content.rb +85 -0
- data/lib/rcs/types/message_method_enum.rb +12 -0
- data/lib/rcs/types/message_protocol_enum.rb +12 -0
- data/lib/rcs/types/message_schedule.rb +94 -0
- data/lib/rcs/types/message_status_enum.rb +16 -0
- data/lib/rcs/types/message_volume_enum.rb +20 -0
- data/lib/rcs/types/messaging_profile_enum.rb +11 -0
- data/lib/rcs/types/mms_content.rb +74 -0
- data/lib/rcs/types/mms_validation_response_segments.rb +85 -0
- data/lib/rcs/types/mms_validation_response_segments_value_item.rb +75 -0
- data/lib/rcs/types/mms_validation_result.rb +82 -0
- data/lib/rcs/types/nullable_contact.rb +84 -0
- data/lib/rcs/types/number_format.rb +79 -0
- data/lib/rcs/types/opt_in_method_enum.rb +13 -0
- data/lib/rcs/types/optional_brand_info.rb +145 -0
- data/lib/rcs/types/optional_contact.rb +83 -0
- data/lib/rcs/types/optional_contacts.rb +84 -0
- data/lib/rcs/types/phone.rb +101 -0
- data/lib/rcs/types/phone_capabilities.rb +75 -0
- data/lib/rcs/types/phone_enum.rb +13 -0
- data/lib/rcs/types/phone_feature_enum.rb +18 -0
- data/lib/rcs/types/phone_number_campaign_attach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_campaign_detach_failed_item.rb +67 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item.rb +75 -0
- data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +78 -0
- data/lib/rcs/types/phone_number_cost.rb +75 -0
- data/lib/rcs/types/phone_number_details.rb +110 -0
- data/lib/rcs/types/phone_number_enum.rb +18 -0
- data/lib/rcs/types/phone_number_region.rb +91 -0
- data/lib/rcs/types/phone_number_status.rb +90 -0
- data/lib/rcs/types/phone_number_status_enum.rb +16 -0
- data/lib/rcs/types/pinnacle_file_upload_metadata.rb +84 -0
- data/lib/rcs/types/pinnacle_url_config.rb +71 -0
- data/lib/rcs/types/profile_status_enum.rb +17 -0
- data/lib/rcs/types/purchased_number.rb +75 -0
- data/lib/rcs/types/rcs.rb +70 -0
- data/lib/rcs/types/rcs_base.rb +82 -0
- data/lib/rcs/types/rcs_base_options.rb +100 -0
- data/lib/rcs/types/rcs_button_call.rb +68 -0
- data/lib/rcs/types/rcs_button_content.rb +148 -0
- data/lib/rcs/types/rcs_button_open_url.rb +68 -0
- data/lib/rcs/types/rcs_button_request_user_location.rb +58 -0
- data/lib/rcs/types/rcs_button_schedule_event.rb +98 -0
- data/lib/rcs/types/rcs_button_send_location.rb +74 -0
- data/lib/rcs/types/rcs_button_send_location_lat_long.rb +68 -0
- data/lib/rcs/types/rcs_button_trigger.rb +78 -0
- data/lib/rcs/types/rcs_campaign.rb +143 -0
- data/lib/rcs/types/rcs_campaign_opt_in_method_enum.rb +15 -0
- data/lib/rcs/types/rcs_campaign_schema_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_emails_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_phones_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_agent_websites_item.rb +69 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +134 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_emails_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_phones_item.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_agent_websites_item.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_links.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +71 -0
- data/lib/rcs/types/rcs_campaign_schema_opt_out.rb +70 -0
- data/lib/rcs/types/rcs_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/rcs_campaign_status.rb +86 -0
- data/lib/rcs/types/rcs_campaign_use_case_enum.rb +23 -0
- data/lib/rcs/types/rcs_card.rb +110 -0
- data/lib/rcs/types/rcs_cards.rb +79 -0
- data/lib/rcs/types/rcs_cards_cards_item.rb +88 -0
- data/lib/rcs/types/rcs_cards_content.rb +79 -0
- data/lib/rcs/types/rcs_cards_content_cards_item.rb +94 -0
- data/lib/rcs/types/rcs_content.rb +72 -0
- data/lib/rcs/types/rcs_media.rb +110 -0
- data/lib/rcs/types/rcs_media_content.rb +81 -0
- data/lib/rcs/types/rcs_media_details_content.rb +77 -0
- data/lib/rcs/types/rcs_text.rb +106 -0
- data/lib/rcs/types/rcs_text_content.rb +72 -0
- data/lib/rcs/types/rcs_validate_content.rb +70 -0
- data/lib/rcs/{company/types/company_register_response.rb → types/rcs_validate_content_media.rb} +19 -21
- data/lib/rcs/types/rcs_validation_result.rb +76 -0
- data/lib/rcs/types/reaction_result.rb +67 -0
- data/lib/rcs/types/scheduled_messaage.rb +73 -0
- data/lib/rcs/types/scheduled_send_response_config.rb +89 -0
- data/lib/rcs/types/send_sms_response_segments.rb +69 -0
- data/lib/rcs/types/send_sms_response_segments_encoding.rb +11 -0
- data/lib/rcs/types/sent_mms_details.rb +102 -0
- data/lib/rcs/types/sent_rcs_details.rb +105 -0
- data/lib/rcs/types/sent_sms_details.rb +108 -0
- data/lib/rcs/types/shortened_url.rb +77 -0
- data/lib/rcs/types/shortened_url_with_click_data.rb +90 -0
- data/lib/rcs/types/sms_content.rb +58 -0
- data/lib/rcs/types/sms_validation_response_segments.rb +80 -0
- data/lib/rcs/types/sms_validation_response_segments_gsm_7.rb +75 -0
- data/lib/rcs/types/sms_validation_response_segments_utf_16.rb +68 -0
- data/lib/rcs/types/sms_validation_response_total.rb +75 -0
- data/lib/rcs/types/sms_validation_result.rb +102 -0
- data/lib/rcs/types/sub_use_case_enum.rb +19 -0
- data/lib/rcs/types/submission_results.rb +57 -0
- data/lib/rcs/types/successful_conversation_update.rb +58 -0
- data/lib/rcs/types/toll_free_campaign.rb +118 -0
- data/lib/rcs/types/toll_free_campaign_schema_opt_in.rb +78 -0
- data/lib/rcs/types/toll_free_campaign_schema_use_case.rb +71 -0
- data/lib/rcs/types/toll_free_campaign_status.rb +91 -0
- data/lib/rcs/types/toll_free_campaign_use_case_enum.rb +52 -0
- data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +155 -0
- data/lib/rcs/types/toll_free_status_enum.rb +20 -0
- data/lib/rcs/types/tracking.rb +17 -0
- data/lib/rcs/types/updated_contact_id.rb +57 -0
- data/lib/rcs/types/upload_results.rb +80 -0
- data/lib/rcs/types/v_card_address_schema_type_item.rb +15 -0
- data/lib/rcs/types/v_card_data.rb +237 -0
- data/lib/rcs/types/v_card_data_file.rb +74 -0
- data/lib/rcs/types/v_card_data_file_metadata.rb +62 -0
- data/lib/rcs/types/v_card_email_schema_type_item.rb +21 -0
- data/lib/rcs/types/v_card_geo.rb +70 -0
- data/lib/rcs/types/v_card_name.rb +98 -0
- data/lib/rcs/types/v_card_organization.rb +70 -0
- data/lib/rcs/types/v_card_phone_schema_type_item.rb +21 -0
- data/lib/rcs/types/validate_campaign_params.rb +69 -0
- data/lib/rcs/types/validation_error_details.rb +76 -0
- data/lib/rcs/types/validation_results.rb +71 -0
- data/lib/rcs/types/vcard.rb +215 -0
- data/lib/rcs/types/vcard_address.rb +130 -0
- data/lib/rcs/types/vcard_content.rb +223 -0
- data/lib/rcs/types/vcard_email.rb +70 -0
- data/lib/rcs/types/vcard_phone.rb +70 -0
- data/lib/rcs/types/vcard_resource.rb +71 -0
- data/lib/rcs/types/vetting_feedback.rb +81 -0
- data/lib/rcs/types/vetting_history.rb +98 -0
- data/lib/rcs/types/vetting_history_vetting_status.rb +13 -0
- data/lib/rcs/types/vetting_results.rb +57 -0
- data/lib/rcs/types/webhook_event_enum.rb +13 -0
- data/lib/rcs/types/webhook_result.rb +64 -0
- data/lib/rcs/{company/types/company_update_response_brand.rb → types/webhooks.rb} +25 -17
- data/lib/rcs/types/zod_error.rb +73 -0
- data/lib/rcs/webhooks/client.rb +93 -0
- data/lib/rcs.rb +67 -83
- data/lib/requests.rb +4 -4
- data/lib/types_export.rb +252 -46
- metadata +278 -52
- data/lib/rcs/company/client.rb +0 -375
- data/lib/rcs/company/types/company_register_request_company.rb +0 -128
- data/lib/rcs/send/client.rb +0 -382
- data/lib/rcs/send/types/rcs_fallback.rb +0 -84
- data/lib/rcs/tools/types/tools_shorten_url_response.rb +0 -70
- data/lib/rcs/tools/types/tools_upload_url_response.rb +0 -69
- data/lib/rcs/types/action.rb +0 -154
- data/lib/rcs/types/action_lat_long.rb +0 -68
- data/lib/rcs/types/action_type.rb +0 -16
- data/lib/rcs/types/additional_email.rb +0 -65
- data/lib/rcs/types/additional_phone_number.rb +0 -65
- data/lib/rcs/types/additional_website.rb +0 -65
- data/lib/rcs/types/card.rb +0 -90
- data/lib/rcs/types/company.rb +0 -319
- data/lib/rcs/types/company_additional_emails_item.rb +0 -67
- data/lib/rcs/types/company_additional_phone_numbers_item.rb +0 -67
- data/lib/rcs/types/company_additional_websites_item.rb +0 -67
- data/lib/rcs/types/company_category.rb +0 -20
- data/lib/rcs/types/company_contact.rb +0 -117
- data/lib/rcs/types/company_details.rb +0 -120
- data/lib/rcs/types/forbidden_error_body.rb +0 -57
- data/lib/rcs/types/inbound_action_message.rb +0 -117
- data/lib/rcs/types/inbound_location_message.rb +0 -106
- data/lib/rcs/types/inbound_location_message_coordinates.rb +0 -65
- data/lib/rcs/types/inbound_media_message.rb +0 -112
- data/lib/rcs/types/inbound_message.rb +0 -88
- data/lib/rcs/types/inbound_message_message_type.rb +0 -10
- data/lib/rcs/types/inbound_message_metadata.rb +0 -79
- data/lib/rcs/types/inbound_text_message.rb +0 -100
- data/lib/rcs/types/internal_server_error_body.rb +0 -57
- data/lib/rcs/types/media_payload.rb +0 -65
- data/lib/rcs/types/message_metadata.rb +0 -56
- data/lib/rcs/types/messaging.rb +0 -95
- data/lib/rcs/types/optionals.rb +0 -99
- data/lib/rcs/types/payment_required_error_body.rb +0 -57
- data/lib/rcs/types/point_of_contact.rb +0 -72
- data/lib/rcs/types/rcs_functionalities.rb +0 -117
- data/lib/rcs/types/sender_metadata.rb +0 -74
- data/lib/rcs/types/unauthorized_error_body.rb +0 -57
@@ -4,12 +4,11 @@ require "ostruct"
|
|
4
4
|
require "json"
|
5
5
|
|
6
6
|
module Pinnacle
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
module Types
|
8
|
+
# Contact information linked to the phone number registration, if available.
|
9
|
+
class BasicPhoneInformationContact
|
10
|
+
# @return [String] Registered name associated with the phone number.
|
10
11
|
attr_reader :name
|
11
|
-
# @return [Float]
|
12
|
-
attr_reader :id
|
13
12
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
13
|
attr_reader :additional_properties
|
15
14
|
# @return [Object]
|
@@ -18,34 +17,27 @@ module Pinnacle
|
|
18
17
|
|
19
18
|
OMIT = Object.new
|
20
19
|
|
21
|
-
# @param name [String]
|
22
|
-
# @param id [Float]
|
20
|
+
# @param name [String] Registered name associated with the phone number.
|
23
21
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
-
# @return [Pinnacle::
|
25
|
-
def initialize(name:,
|
22
|
+
# @return [Pinnacle::Types::BasicPhoneInformationContact]
|
23
|
+
def initialize(name:, additional_properties: nil)
|
26
24
|
@name = name
|
27
|
-
@id = id
|
28
25
|
@additional_properties = additional_properties
|
29
|
-
@_field_set = { "name": name
|
26
|
+
@_field_set = { "name": name }
|
30
27
|
end
|
31
28
|
|
32
|
-
# Deserialize a JSON object to an instance of
|
29
|
+
# Deserialize a JSON object to an instance of BasicPhoneInformationContact
|
33
30
|
#
|
34
31
|
# @param json_object [String]
|
35
|
-
# @return [Pinnacle::
|
32
|
+
# @return [Pinnacle::Types::BasicPhoneInformationContact]
|
36
33
|
def self.from_json(json_object:)
|
37
34
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
38
35
|
parsed_json = JSON.parse(json_object)
|
39
36
|
name = parsed_json["name"]
|
40
|
-
|
41
|
-
new(
|
42
|
-
name: name,
|
43
|
-
id: id,
|
44
|
-
additional_properties: struct
|
45
|
-
)
|
37
|
+
new(name: name, additional_properties: struct)
|
46
38
|
end
|
47
39
|
|
48
|
-
# Serialize an instance of
|
40
|
+
# Serialize an instance of BasicPhoneInformationContact to a JSON object
|
49
41
|
#
|
50
42
|
# @return [String]
|
51
43
|
def to_json(*_args)
|
@@ -60,7 +52,6 @@ module Pinnacle
|
|
60
52
|
# @return [Void]
|
61
53
|
def self.validate_raw(obj:)
|
62
54
|
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
63
|
-
obj.id.is_a?(Float) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
64
55
|
end
|
65
56
|
end
|
66
57
|
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "basic_phone_information_location_country"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Geographic and political details where the phone number is registered.
|
10
|
+
class BasicPhoneInformationLocation
|
11
|
+
# @return [Pinnacle::Types::BasicPhoneInformationLocationCountry] Information about the country of registration.
|
12
|
+
attr_reader :country
|
13
|
+
# @return [String] Location description including region, state/province, and city.
|
14
|
+
attr_reader :place
|
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 country [Pinnacle::Types::BasicPhoneInformationLocationCountry] Information about the country of registration.
|
24
|
+
# @param place [String] Location description including region, state/province, and city.
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [Pinnacle::Types::BasicPhoneInformationLocation]
|
27
|
+
def initialize(country:, place:, additional_properties: nil)
|
28
|
+
@country = country
|
29
|
+
@place = place
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = { "country": country, "place": place }
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deserialize a JSON object to an instance of BasicPhoneInformationLocation
|
35
|
+
#
|
36
|
+
# @param json_object [String]
|
37
|
+
# @return [Pinnacle::Types::BasicPhoneInformationLocation]
|
38
|
+
def self.from_json(json_object:)
|
39
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
40
|
+
parsed_json = JSON.parse(json_object)
|
41
|
+
if parsed_json["country"].nil?
|
42
|
+
country = nil
|
43
|
+
else
|
44
|
+
country = parsed_json["country"].to_json
|
45
|
+
country = Pinnacle::Types::BasicPhoneInformationLocationCountry.from_json(json_object: country)
|
46
|
+
end
|
47
|
+
place = parsed_json["place"]
|
48
|
+
new(
|
49
|
+
country: country,
|
50
|
+
place: place,
|
51
|
+
additional_properties: struct
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Serialize an instance of BasicPhoneInformationLocation to a JSON object
|
56
|
+
#
|
57
|
+
# @return [String]
|
58
|
+
def to_json(*_args)
|
59
|
+
@_field_set&.to_json
|
60
|
+
end
|
61
|
+
|
62
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
63
|
+
# hash and check each fields type against the current object's property
|
64
|
+
# definitions.
|
65
|
+
#
|
66
|
+
# @param obj [Object]
|
67
|
+
# @return [Void]
|
68
|
+
def self.validate_raw(obj:)
|
69
|
+
Pinnacle::Types::BasicPhoneInformationLocationCountry.validate_raw(obj: obj.country)
|
70
|
+
obj.place.is_a?(String) != false || raise("Passed value for field obj.place is not the expected type, validation failed.")
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Information about the country of registration.
|
9
|
+
class BasicPhoneInformationLocationCountry
|
10
|
+
# @return [String] Two-letter country code where the number is registered.
|
11
|
+
attr_reader :code
|
12
|
+
# @return [String] Full name of the country.
|
13
|
+
attr_reader :name
|
14
|
+
# @return [String] International dialing prefix for the country.
|
15
|
+
attr_reader :prefix
|
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 code [String] Two-letter country code where the number is registered.
|
25
|
+
# @param name [String] Full name of the country.
|
26
|
+
# @param prefix [String] International dialing prefix for the country.
|
27
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
+
# @return [Pinnacle::Types::BasicPhoneInformationLocationCountry]
|
29
|
+
def initialize(code:, name:, prefix:, additional_properties: nil)
|
30
|
+
@code = code
|
31
|
+
@name = name
|
32
|
+
@prefix = prefix
|
33
|
+
@additional_properties = additional_properties
|
34
|
+
@_field_set = { "code": code, "name": name, "prefix": prefix }
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deserialize a JSON object to an instance of BasicPhoneInformationLocationCountry
|
38
|
+
#
|
39
|
+
# @param json_object [String]
|
40
|
+
# @return [Pinnacle::Types::BasicPhoneInformationLocationCountry]
|
41
|
+
def self.from_json(json_object:)
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
44
|
+
code = parsed_json["code"]
|
45
|
+
name = parsed_json["name"]
|
46
|
+
prefix = parsed_json["prefix"]
|
47
|
+
new(
|
48
|
+
code: code,
|
49
|
+
name: name,
|
50
|
+
prefix: prefix,
|
51
|
+
additional_properties: struct
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Serialize an instance of BasicPhoneInformationLocationCountry to a JSON object
|
56
|
+
#
|
57
|
+
# @return [String]
|
58
|
+
def to_json(*_args)
|
59
|
+
@_field_set&.to_json
|
60
|
+
end
|
61
|
+
|
62
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
63
|
+
# hash and check each fields type against the current object's property
|
64
|
+
# definitions.
|
65
|
+
#
|
66
|
+
# @param obj [Object]
|
67
|
+
# @return [Void]
|
68
|
+
def self.validate_raw(obj:)
|
69
|
+
obj.code.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
70
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
71
|
+
obj.prefix.is_a?(String) != false || raise("Passed value for field obj.prefix is not the expected type, validation failed.")
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "brand_status_enum"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Response for get brand status.
|
10
|
+
class BrandStatus
|
11
|
+
# @return [Array<String>] List of errors that occurred.
|
12
|
+
attr_reader :errors
|
13
|
+
# @return [Integer] Id of the brand.
|
14
|
+
attr_reader :id
|
15
|
+
# @return [Pinnacle::Types::BrandStatusEnum] Current review status of the brand. <br>
|
16
|
+
# `INCOMPLETE`: Has not been submitted. Use the [submit
|
17
|
+
# endpoint](../brands/submit). <br>
|
18
|
+
# `PENDING`: Currently being reviewed. <br>
|
19
|
+
# `VERIFIED`: Verified and good to go. <br>
|
20
|
+
# `UNVERIFIED`: No longer verified due to an update in the brand details. Requires
|
21
|
+
# vetting to be reverified. <br>
|
22
|
+
# `VETTED`: Brand has been vetted by an external provider and has received vetting
|
23
|
+
# scores. <br>
|
24
|
+
attr_reader :status
|
25
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
attr_reader :additional_properties
|
27
|
+
# @return [Object]
|
28
|
+
attr_reader :_field_set
|
29
|
+
protected :_field_set
|
30
|
+
|
31
|
+
OMIT = Object.new
|
32
|
+
|
33
|
+
# @param errors [Array<String>] List of errors that occurred.
|
34
|
+
# @param id [Integer] Id of the brand.
|
35
|
+
# @param status [Pinnacle::Types::BrandStatusEnum] Current review status of the brand. <br>
|
36
|
+
# `INCOMPLETE`: Has not been submitted. Use the [submit
|
37
|
+
# endpoint](../brands/submit). <br>
|
38
|
+
# `PENDING`: Currently being reviewed. <br>
|
39
|
+
# `VERIFIED`: Verified and good to go. <br>
|
40
|
+
# `UNVERIFIED`: No longer verified due to an update in the brand details. Requires
|
41
|
+
# vetting to be reverified. <br>
|
42
|
+
# `VETTED`: Brand has been vetted by an external provider and has received vetting
|
43
|
+
# scores. <br>
|
44
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
45
|
+
# @return [Pinnacle::Types::BrandStatus]
|
46
|
+
def initialize(errors:, id:, status:, additional_properties: nil)
|
47
|
+
@errors = errors
|
48
|
+
@id = id
|
49
|
+
@status = status
|
50
|
+
@additional_properties = additional_properties
|
51
|
+
@_field_set = { "errors": errors, "id": id, "status": status }
|
52
|
+
end
|
53
|
+
|
54
|
+
# Deserialize a JSON object to an instance of BrandStatus
|
55
|
+
#
|
56
|
+
# @param json_object [String]
|
57
|
+
# @return [Pinnacle::Types::BrandStatus]
|
58
|
+
def self.from_json(json_object:)
|
59
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
60
|
+
parsed_json = JSON.parse(json_object)
|
61
|
+
errors = parsed_json["errors"]
|
62
|
+
id = parsed_json["id"]
|
63
|
+
status = parsed_json["status"]
|
64
|
+
new(
|
65
|
+
errors: errors,
|
66
|
+
id: id,
|
67
|
+
status: status,
|
68
|
+
additional_properties: struct
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
# Serialize an instance of BrandStatus to a JSON object
|
73
|
+
#
|
74
|
+
# @return [String]
|
75
|
+
def to_json(*_args)
|
76
|
+
@_field_set&.to_json
|
77
|
+
end
|
78
|
+
|
79
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
80
|
+
# hash and check each fields type against the current object's property
|
81
|
+
# definitions.
|
82
|
+
#
|
83
|
+
# @param obj [Object]
|
84
|
+
# @return [Void]
|
85
|
+
def self.validate_raw(obj:)
|
86
|
+
obj.errors.is_a?(Array) != false || raise("Passed value for field obj.errors is not the expected type, validation failed.")
|
87
|
+
obj.id.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
88
|
+
obj.status.is_a?(Pinnacle::Types::BrandStatusEnum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Pinnacle
|
4
|
+
module Types
|
5
|
+
# Current review status of the brand.
|
6
|
+
# `INCOMPLETE`: Has not been submitted.
|
7
|
+
# `PENDING`: Currently being reviewed.
|
8
|
+
# `VERIFIED`: Verified and good to go.
|
9
|
+
# `UNVERIFIED`: No longer verified due to an update in the brand details.
|
10
|
+
# `VETTED`: Brand has been vetted by an external provider and has received vetting
|
11
|
+
# scores.
|
12
|
+
class BrandStatusEnum
|
13
|
+
PENDING = "PENDING"
|
14
|
+
UNVERIFIED = "UNVERIFIED"
|
15
|
+
VERIFIED = "VERIFIED"
|
16
|
+
VETTED = "VETTED"
|
17
|
+
FAILED = "FAILED"
|
18
|
+
INCOMPLETE = "INCOMPLETE"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
# Enabled communication features for the phone number.
|
9
|
+
class BuyResponseCapabilities
|
10
|
+
# @return [Boolean] Indicates if SMS messaging is enabled and functional.
|
11
|
+
attr_reader :sms
|
12
|
+
# @return [Boolean] Indicates if multimedia messaging (images, videos, files) is enabled and
|
13
|
+
# functional.
|
14
|
+
attr_reader :mms
|
15
|
+
# @return [Boolean] Indicates if voice calling is enabled and functional.
|
16
|
+
attr_reader :voice
|
17
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
|
+
attr_reader :additional_properties
|
19
|
+
# @return [Object]
|
20
|
+
attr_reader :_field_set
|
21
|
+
protected :_field_set
|
22
|
+
|
23
|
+
OMIT = Object.new
|
24
|
+
|
25
|
+
# @param sms [Boolean] Indicates if SMS messaging is enabled and functional.
|
26
|
+
# @param mms [Boolean] Indicates if multimedia messaging (images, videos, files) is enabled and
|
27
|
+
# functional.
|
28
|
+
# @param voice [Boolean] Indicates if voice calling is enabled and functional.
|
29
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
# @return [Pinnacle::Types::BuyResponseCapabilities]
|
31
|
+
def initialize(sms:, mms:, voice:, additional_properties: nil)
|
32
|
+
@sms = sms
|
33
|
+
@mms = mms
|
34
|
+
@voice = voice
|
35
|
+
@additional_properties = additional_properties
|
36
|
+
@_field_set = { "sms": sms, "mms": mms, "voice": voice }
|
37
|
+
end
|
38
|
+
|
39
|
+
# Deserialize a JSON object to an instance of BuyResponseCapabilities
|
40
|
+
#
|
41
|
+
# @param json_object [String]
|
42
|
+
# @return [Pinnacle::Types::BuyResponseCapabilities]
|
43
|
+
def self.from_json(json_object:)
|
44
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
45
|
+
parsed_json = JSON.parse(json_object)
|
46
|
+
sms = parsed_json["sms"]
|
47
|
+
mms = parsed_json["mms"]
|
48
|
+
voice = parsed_json["voice"]
|
49
|
+
new(
|
50
|
+
sms: sms,
|
51
|
+
mms: mms,
|
52
|
+
voice: voice,
|
53
|
+
additional_properties: struct
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Serialize an instance of BuyResponseCapabilities to a JSON object
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
def to_json(*_args)
|
61
|
+
@_field_set&.to_json
|
62
|
+
end
|
63
|
+
|
64
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
65
|
+
# hash and check each fields type against the current object's property
|
66
|
+
# definitions.
|
67
|
+
#
|
68
|
+
# @param obj [Object]
|
69
|
+
# @return [Void]
|
70
|
+
def self.validate_raw(obj:)
|
71
|
+
obj.sms.is_a?(Boolean) != false || raise("Passed value for field obj.sms is not the expected type, validation failed.")
|
72
|
+
obj.mms.is_a?(Boolean) != false || raise("Passed value for field obj.mms is not the expected type, validation failed.")
|
73
|
+
obj.voice.is_a?(Boolean) != false || raise("Passed value for field obj.voice is not the expected type, validation failed.")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Pinnacle
|
4
|
+
module Types
|
5
|
+
# The type of campaign:
|
6
|
+
# - TOLL_FREE: Toll-free number campaigns
|
7
|
+
# - 10DLC: 10-digit long code campaigns for A2P messaging
|
8
|
+
# - RCS: Rich Communication Services campaigns
|
9
|
+
class CampaignEnum
|
10
|
+
TOLL_FREE = "TOLL_FREE"
|
11
|
+
TEN_DLC = "10DLC"
|
12
|
+
RCS = "RCS"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "campaign_enum"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
# Information about the campaign associated with a conversation
|
10
|
+
class CampaignQuery
|
11
|
+
# @return [String] Unique identifier for the campaign
|
12
|
+
attr_reader :id
|
13
|
+
# @return [Pinnacle::Types::CampaignEnum]
|
14
|
+
attr_reader :type
|
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 id [String] Unique identifier for the campaign
|
24
|
+
# @param type [Pinnacle::Types::CampaignEnum]
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [Pinnacle::Types::CampaignQuery]
|
27
|
+
def initialize(id:, type:, additional_properties: nil)
|
28
|
+
@id = id
|
29
|
+
@type = type
|
30
|
+
@additional_properties = additional_properties
|
31
|
+
@_field_set = { "id": id, "type": type }
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deserialize a JSON object to an instance of CampaignQuery
|
35
|
+
#
|
36
|
+
# @param json_object [String]
|
37
|
+
# @return [Pinnacle::Types::CampaignQuery]
|
38
|
+
def self.from_json(json_object:)
|
39
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
40
|
+
parsed_json = JSON.parse(json_object)
|
41
|
+
id = parsed_json["id"]
|
42
|
+
type = parsed_json["type"]
|
43
|
+
new(
|
44
|
+
id: id,
|
45
|
+
type: type,
|
46
|
+
additional_properties: struct
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Serialize an instance of CampaignQuery 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.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
65
|
+
obj.type.is_a?(Pinnacle::Types::CampaignEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -4,11 +4,10 @@ require "ostruct"
|
|
4
4
|
require "json"
|
5
5
|
|
6
6
|
module Pinnacle
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
attr_reader :company_id
|
7
|
+
module Types
|
8
|
+
class CampaignSubmissionResult
|
9
|
+
# @return [Boolean] Indicates whether the campaign submission was successful.
|
10
|
+
attr_reader :success
|
12
11
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
13
12
|
attr_reader :additional_properties
|
14
13
|
# @return [Object]
|
@@ -17,27 +16,27 @@ module Pinnacle
|
|
17
16
|
|
18
17
|
OMIT = Object.new
|
19
18
|
|
20
|
-
# @param
|
19
|
+
# @param success [Boolean] Indicates whether the campaign submission was successful.
|
21
20
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
-
# @return [Pinnacle::
|
23
|
-
def initialize(
|
24
|
-
@
|
21
|
+
# @return [Pinnacle::Types::CampaignSubmissionResult]
|
22
|
+
def initialize(success:, additional_properties: nil)
|
23
|
+
@success = success
|
25
24
|
@additional_properties = additional_properties
|
26
|
-
@_field_set = { "
|
25
|
+
@_field_set = { "success": success }
|
27
26
|
end
|
28
27
|
|
29
|
-
# Deserialize a JSON object to an instance of
|
28
|
+
# Deserialize a JSON object to an instance of CampaignSubmissionResult
|
30
29
|
#
|
31
30
|
# @param json_object [String]
|
32
|
-
# @return [Pinnacle::
|
31
|
+
# @return [Pinnacle::Types::CampaignSubmissionResult]
|
33
32
|
def self.from_json(json_object:)
|
34
33
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
34
|
parsed_json = JSON.parse(json_object)
|
36
|
-
|
37
|
-
new(
|
35
|
+
success = parsed_json["success"]
|
36
|
+
new(success: success, additional_properties: struct)
|
38
37
|
end
|
39
38
|
|
40
|
-
# Serialize an instance of
|
39
|
+
# Serialize an instance of CampaignSubmissionResult to a JSON object
|
41
40
|
#
|
42
41
|
# @return [String]
|
43
42
|
def to_json(*_args)
|
@@ -51,7 +50,7 @@ module Pinnacle
|
|
51
50
|
# @param obj [Object]
|
52
51
|
# @return [Void]
|
53
52
|
def self.validate_raw(obj:)
|
54
|
-
obj.
|
53
|
+
obj.success.is_a?(Boolean) != false || raise("Passed value for field obj.success is not the expected type, validation failed.")
|
55
54
|
end
|
56
55
|
end
|
57
56
|
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class CampaignValidationResponseErrorsItem
|
9
|
+
# @return [String] A human-readable description of the error.
|
10
|
+
attr_reader :description
|
11
|
+
# @return [String] An example of a valid value for the field.
|
12
|
+
attr_reader :example
|
13
|
+
# @return [String] The field that is not valid.
|
14
|
+
attr_reader :field
|
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 description [String] A human-readable description of the error.
|
24
|
+
# @param example [String] An example of a valid value for the field.
|
25
|
+
# @param field [String] The field that is not valid.
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [Pinnacle::Types::CampaignValidationResponseErrorsItem]
|
28
|
+
def initialize(description:, field:, example: OMIT, additional_properties: nil)
|
29
|
+
@description = description
|
30
|
+
@example = example if example != OMIT
|
31
|
+
@field = field
|
32
|
+
@additional_properties = additional_properties
|
33
|
+
@_field_set = { "description": description, "example": example, "field": field }.reject do |_k, v|
|
34
|
+
v == OMIT
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# Deserialize a JSON object to an instance of CampaignValidationResponseErrorsItem
|
39
|
+
#
|
40
|
+
# @param json_object [String]
|
41
|
+
# @return [Pinnacle::Types::CampaignValidationResponseErrorsItem]
|
42
|
+
def self.from_json(json_object:)
|
43
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
44
|
+
parsed_json = JSON.parse(json_object)
|
45
|
+
description = parsed_json["description"]
|
46
|
+
example = parsed_json["example"]
|
47
|
+
field = parsed_json["field"]
|
48
|
+
new(
|
49
|
+
description: description,
|
50
|
+
example: example,
|
51
|
+
field: field,
|
52
|
+
additional_properties: struct
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Serialize an instance of CampaignValidationResponseErrorsItem 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.description.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
71
|
+
obj.example&.is_a?(String) != false || raise("Passed value for field obj.example is not the expected type, validation failed.")
|
72
|
+
obj.field.is_a?(String) != false || raise("Passed value for field obj.field is not the expected type, validation failed.")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|