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 "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class ValidateCampaignParams
|
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::ValidateCampaignParams]
|
25
|
+
def initialize(campaign_id:, additional_info: OMIT, additional_properties: nil)
|
26
|
+
@additional_info = additional_info if additional_info != OMIT
|
27
|
+
@campaign_id = campaign_id
|
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 ValidateCampaignParams
|
35
|
+
#
|
36
|
+
# @param json_object [String]
|
37
|
+
# @return [Pinnacle::Types::ValidateCampaignParams]
|
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 ValidateCampaignParams 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,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
module Types
|
8
|
+
class ValidationErrorDetails
|
9
|
+
# @return [String] Description of the validation error.
|
10
|
+
attr_reader :description
|
11
|
+
# @return [String] Optional example of valid input for the field.
|
12
|
+
attr_reader :example
|
13
|
+
# @return [String] The field that failed validation.
|
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] Description of the validation error.
|
24
|
+
# @param example [String] Optional example of valid input for the field.
|
25
|
+
# @param field [String] The field that failed validation.
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [Pinnacle::Types::ValidationErrorDetails]
|
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 ValidationErrorDetails
|
39
|
+
#
|
40
|
+
# @param json_object [String]
|
41
|
+
# @return [Pinnacle::Types::ValidationErrorDetails]
|
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 ValidationErrorDetails 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
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "validation_error_details"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
class ValidationResults
|
10
|
+
# @return [Array<Pinnacle::Types::ValidationErrorDetails>] List of validation errors, if any.
|
11
|
+
attr_reader :errors
|
12
|
+
# @return [Boolean] Whether the brand data is valid.
|
13
|
+
attr_reader :is_valid
|
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 errors [Array<Pinnacle::Types::ValidationErrorDetails>] List of validation errors, if any.
|
23
|
+
# @param is_valid [Boolean] Whether the brand data is valid.
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [Pinnacle::Types::ValidationResults]
|
26
|
+
def initialize(errors:, is_valid:, additional_properties: nil)
|
27
|
+
@errors = errors
|
28
|
+
@is_valid = is_valid
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "errors": errors, "isValid": is_valid }
|
31
|
+
end
|
32
|
+
|
33
|
+
# Deserialize a JSON object to an instance of ValidationResults
|
34
|
+
#
|
35
|
+
# @param json_object [String]
|
36
|
+
# @return [Pinnacle::Types::ValidationResults]
|
37
|
+
def self.from_json(json_object:)
|
38
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
39
|
+
parsed_json = JSON.parse(json_object)
|
40
|
+
errors = parsed_json["errors"]&.map do |item|
|
41
|
+
item = item.to_json
|
42
|
+
Pinnacle::Types::ValidationErrorDetails.from_json(json_object: item)
|
43
|
+
end
|
44
|
+
is_valid = parsed_json["isValid"]
|
45
|
+
new(
|
46
|
+
errors: errors,
|
47
|
+
is_valid: is_valid,
|
48
|
+
additional_properties: struct
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Serialize an instance of ValidationResults to a JSON object
|
53
|
+
#
|
54
|
+
# @return [String]
|
55
|
+
def to_json(*_args)
|
56
|
+
@_field_set&.to_json
|
57
|
+
end
|
58
|
+
|
59
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
60
|
+
# hash and check each fields type against the current object's property
|
61
|
+
# definitions.
|
62
|
+
#
|
63
|
+
# @param obj [Object]
|
64
|
+
# @return [Void]
|
65
|
+
def self.validate_raw(obj:)
|
66
|
+
obj.errors.is_a?(Array) != false || raise("Passed value for field obj.errors is not the expected type, validation failed.")
|
67
|
+
obj.is_valid.is_a?(Boolean) != false || raise("Passed value for field obj.is_valid is not the expected type, validation failed.")
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,215 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "v_card_name"
|
4
|
+
require_relative "vcard_address"
|
5
|
+
require_relative "vcard_phone"
|
6
|
+
require_relative "vcard_email"
|
7
|
+
require_relative "v_card_geo"
|
8
|
+
require_relative "v_card_organization"
|
9
|
+
require "ostruct"
|
10
|
+
require "json"
|
11
|
+
|
12
|
+
module Pinnacle
|
13
|
+
module Types
|
14
|
+
class Vcard
|
15
|
+
# @return [Integer] Unique identifier for the contact.
|
16
|
+
attr_reader :id
|
17
|
+
# @return [String] Full display name for the vCard.
|
18
|
+
attr_reader :formatted_name
|
19
|
+
# @return [Pinnacle::Types::VCardName] Structured name components.
|
20
|
+
attr_reader :name
|
21
|
+
# @return [Array<String>] Nicknames or aliases.
|
22
|
+
attr_reader :nickname
|
23
|
+
# @return [String] Birthday in ISO 8601 date format (YYYY-MM-DD).
|
24
|
+
attr_reader :birthday
|
25
|
+
# @return [Array<Pinnacle::Types::VcardAddress>] Physical addresses.
|
26
|
+
attr_reader :addresses
|
27
|
+
# @return [String] Website URL.
|
28
|
+
attr_reader :url
|
29
|
+
# @return [Array<Pinnacle::Types::VcardPhone>] Phone numbers.
|
30
|
+
attr_reader :phones
|
31
|
+
# @return [Array<Pinnacle::Types::VcardEmail>] Email addresses.
|
32
|
+
attr_reader :emails
|
33
|
+
# @return [String] Timezone (e.g., "America/New_York").
|
34
|
+
attr_reader :timezone
|
35
|
+
# @return [Pinnacle::Types::VCardGeo] Geographic coordinates.
|
36
|
+
attr_reader :geo
|
37
|
+
# @return [String] Job title or position.
|
38
|
+
attr_reader :title
|
39
|
+
# @return [String] Role or function within the organization.
|
40
|
+
attr_reader :role
|
41
|
+
# @return [Pinnacle::Types::VCardOrganization] Organization or company information.
|
42
|
+
attr_reader :organization
|
43
|
+
# @return [Array<String>] Categories or tags for organizing contacts.
|
44
|
+
attr_reader :categories
|
45
|
+
# @return [String] Additional notes or comments.
|
46
|
+
attr_reader :note
|
47
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
48
|
+
attr_reader :additional_properties
|
49
|
+
# @return [Object]
|
50
|
+
attr_reader :_field_set
|
51
|
+
protected :_field_set
|
52
|
+
|
53
|
+
OMIT = Object.new
|
54
|
+
|
55
|
+
# @param id [Integer] Unique identifier for the contact.
|
56
|
+
# @param formatted_name [String] Full display name for the vCard.
|
57
|
+
# @param name [Pinnacle::Types::VCardName] Structured name components.
|
58
|
+
# @param nickname [Array<String>] Nicknames or aliases.
|
59
|
+
# @param birthday [String] Birthday in ISO 8601 date format (YYYY-MM-DD).
|
60
|
+
# @param addresses [Array<Pinnacle::Types::VcardAddress>] Physical addresses.
|
61
|
+
# @param url [String] Website URL.
|
62
|
+
# @param phones [Array<Pinnacle::Types::VcardPhone>] Phone numbers.
|
63
|
+
# @param emails [Array<Pinnacle::Types::VcardEmail>] Email addresses.
|
64
|
+
# @param timezone [String] Timezone (e.g., "America/New_York").
|
65
|
+
# @param geo [Pinnacle::Types::VCardGeo] Geographic coordinates.
|
66
|
+
# @param title [String] Job title or position.
|
67
|
+
# @param role [String] Role or function within the organization.
|
68
|
+
# @param organization [Pinnacle::Types::VCardOrganization] Organization or company information.
|
69
|
+
# @param categories [Array<String>] Categories or tags for organizing contacts.
|
70
|
+
# @param note [String] Additional notes or comments.
|
71
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
72
|
+
# @return [Pinnacle::Types::Vcard]
|
73
|
+
def initialize(id: OMIT, formatted_name: OMIT, name: OMIT, nickname: OMIT, birthday: OMIT, addresses: OMIT,
|
74
|
+
url: OMIT, phones: OMIT, emails: OMIT, timezone: OMIT, geo: OMIT, title: OMIT, role: OMIT, organization: OMIT, categories: OMIT, note: OMIT, additional_properties: nil)
|
75
|
+
@id = id if id != OMIT
|
76
|
+
@formatted_name = formatted_name if formatted_name != OMIT
|
77
|
+
@name = name if name != OMIT
|
78
|
+
@nickname = nickname if nickname != OMIT
|
79
|
+
@birthday = birthday if birthday != OMIT
|
80
|
+
@addresses = addresses if addresses != OMIT
|
81
|
+
@url = url if url != OMIT
|
82
|
+
@phones = phones if phones != OMIT
|
83
|
+
@emails = emails if emails != OMIT
|
84
|
+
@timezone = timezone if timezone != OMIT
|
85
|
+
@geo = geo if geo != OMIT
|
86
|
+
@title = title if title != OMIT
|
87
|
+
@role = role if role != OMIT
|
88
|
+
@organization = organization if organization != OMIT
|
89
|
+
@categories = categories if categories != OMIT
|
90
|
+
@note = note if note != OMIT
|
91
|
+
@additional_properties = additional_properties
|
92
|
+
@_field_set = {
|
93
|
+
"id": id,
|
94
|
+
"formattedName": formatted_name,
|
95
|
+
"name": name,
|
96
|
+
"nickname": nickname,
|
97
|
+
"birthday": birthday,
|
98
|
+
"addresses": addresses,
|
99
|
+
"url": url,
|
100
|
+
"phones": phones,
|
101
|
+
"emails": emails,
|
102
|
+
"timezone": timezone,
|
103
|
+
"geo": geo,
|
104
|
+
"title": title,
|
105
|
+
"role": role,
|
106
|
+
"organization": organization,
|
107
|
+
"categories": categories,
|
108
|
+
"note": note
|
109
|
+
}.reject do |_k, v|
|
110
|
+
v == OMIT
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
# Deserialize a JSON object to an instance of Vcard
|
115
|
+
#
|
116
|
+
# @param json_object [String]
|
117
|
+
# @return [Pinnacle::Types::Vcard]
|
118
|
+
def self.from_json(json_object:)
|
119
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
120
|
+
parsed_json = JSON.parse(json_object)
|
121
|
+
id = parsed_json["id"]
|
122
|
+
formatted_name = parsed_json["formattedName"]
|
123
|
+
if parsed_json["name"].nil?
|
124
|
+
name = nil
|
125
|
+
else
|
126
|
+
name = parsed_json["name"].to_json
|
127
|
+
name = Pinnacle::Types::VCardName.from_json(json_object: name)
|
128
|
+
end
|
129
|
+
nickname = parsed_json["nickname"]
|
130
|
+
birthday = parsed_json["birthday"]
|
131
|
+
addresses = parsed_json["addresses"]&.map do |item|
|
132
|
+
item = item.to_json
|
133
|
+
Pinnacle::Types::VcardAddress.from_json(json_object: item)
|
134
|
+
end
|
135
|
+
url = parsed_json["url"]
|
136
|
+
phones = parsed_json["phones"]&.map do |item|
|
137
|
+
item = item.to_json
|
138
|
+
Pinnacle::Types::VcardPhone.from_json(json_object: item)
|
139
|
+
end
|
140
|
+
emails = parsed_json["emails"]&.map do |item|
|
141
|
+
item = item.to_json
|
142
|
+
Pinnacle::Types::VcardEmail.from_json(json_object: item)
|
143
|
+
end
|
144
|
+
timezone = parsed_json["timezone"]
|
145
|
+
if parsed_json["geo"].nil?
|
146
|
+
geo = nil
|
147
|
+
else
|
148
|
+
geo = parsed_json["geo"].to_json
|
149
|
+
geo = Pinnacle::Types::VCardGeo.from_json(json_object: geo)
|
150
|
+
end
|
151
|
+
title = parsed_json["title"]
|
152
|
+
role = parsed_json["role"]
|
153
|
+
if parsed_json["organization"].nil?
|
154
|
+
organization = nil
|
155
|
+
else
|
156
|
+
organization = parsed_json["organization"].to_json
|
157
|
+
organization = Pinnacle::Types::VCardOrganization.from_json(json_object: organization)
|
158
|
+
end
|
159
|
+
categories = parsed_json["categories"]
|
160
|
+
note = parsed_json["note"]
|
161
|
+
new(
|
162
|
+
id: id,
|
163
|
+
formatted_name: formatted_name,
|
164
|
+
name: name,
|
165
|
+
nickname: nickname,
|
166
|
+
birthday: birthday,
|
167
|
+
addresses: addresses,
|
168
|
+
url: url,
|
169
|
+
phones: phones,
|
170
|
+
emails: emails,
|
171
|
+
timezone: timezone,
|
172
|
+
geo: geo,
|
173
|
+
title: title,
|
174
|
+
role: role,
|
175
|
+
organization: organization,
|
176
|
+
categories: categories,
|
177
|
+
note: note,
|
178
|
+
additional_properties: struct
|
179
|
+
)
|
180
|
+
end
|
181
|
+
|
182
|
+
# Serialize an instance of Vcard to a JSON object
|
183
|
+
#
|
184
|
+
# @return [String]
|
185
|
+
def to_json(*_args)
|
186
|
+
@_field_set&.to_json
|
187
|
+
end
|
188
|
+
|
189
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
190
|
+
# hash and check each fields type against the current object's property
|
191
|
+
# definitions.
|
192
|
+
#
|
193
|
+
# @param obj [Object]
|
194
|
+
# @return [Void]
|
195
|
+
def self.validate_raw(obj:)
|
196
|
+
obj.id&.is_a?(Integer) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
197
|
+
obj.formatted_name&.is_a?(String) != false || raise("Passed value for field obj.formatted_name is not the expected type, validation failed.")
|
198
|
+
obj.name.nil? || Pinnacle::Types::VCardName.validate_raw(obj: obj.name)
|
199
|
+
obj.nickname&.is_a?(Array) != false || raise("Passed value for field obj.nickname is not the expected type, validation failed.")
|
200
|
+
obj.birthday&.is_a?(String) != false || raise("Passed value for field obj.birthday is not the expected type, validation failed.")
|
201
|
+
obj.addresses&.is_a?(Array) != false || raise("Passed value for field obj.addresses is not the expected type, validation failed.")
|
202
|
+
obj.url&.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
|
203
|
+
obj.phones&.is_a?(Array) != false || raise("Passed value for field obj.phones is not the expected type, validation failed.")
|
204
|
+
obj.emails&.is_a?(Array) != false || raise("Passed value for field obj.emails is not the expected type, validation failed.")
|
205
|
+
obj.timezone&.is_a?(String) != false || raise("Passed value for field obj.timezone is not the expected type, validation failed.")
|
206
|
+
obj.geo.nil? || Pinnacle::Types::VCardGeo.validate_raw(obj: obj.geo)
|
207
|
+
obj.title&.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
208
|
+
obj.role&.is_a?(String) != false || raise("Passed value for field obj.role is not the expected type, validation failed.")
|
209
|
+
obj.organization.nil? || Pinnacle::Types::VCardOrganization.validate_raw(obj: obj.organization)
|
210
|
+
obj.categories&.is_a?(Array) != false || raise("Passed value for field obj.categories is not the expected type, validation failed.")
|
211
|
+
obj.note&.is_a?(String) != false || raise("Passed value for field obj.note is not the expected type, validation failed.")
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
@@ -0,0 +1,130 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "v_card_address_schema_type_item"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module Pinnacle
|
8
|
+
module Types
|
9
|
+
class VcardAddress
|
10
|
+
# @return [String] Country name.
|
11
|
+
attr_reader :country_name
|
12
|
+
# @return [String] Extended address information (apartment, suite, etc.).
|
13
|
+
attr_reader :extended_address
|
14
|
+
# @return [String] Complete formatted address as a single string.
|
15
|
+
attr_reader :fulladdress
|
16
|
+
# @return [String] City or locality.
|
17
|
+
attr_reader :locality
|
18
|
+
# @return [String] ZIP code or postal code.
|
19
|
+
attr_reader :postal_code
|
20
|
+
# @return [String] P.O. Box number.
|
21
|
+
attr_reader :post_office_box
|
22
|
+
# @return [String] State, province, or region.
|
23
|
+
attr_reader :region
|
24
|
+
# @return [String] Street address or street name and number.
|
25
|
+
attr_reader :street_address
|
26
|
+
# @return [Array<Pinnacle::Types::VCardAddressSchemaTypeItem>] Address type classifications.
|
27
|
+
attr_reader :type
|
28
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
attr_reader :additional_properties
|
30
|
+
# @return [Object]
|
31
|
+
attr_reader :_field_set
|
32
|
+
protected :_field_set
|
33
|
+
|
34
|
+
OMIT = Object.new
|
35
|
+
|
36
|
+
# @param country_name [String] Country name.
|
37
|
+
# @param extended_address [String] Extended address information (apartment, suite, etc.).
|
38
|
+
# @param fulladdress [String] Complete formatted address as a single string.
|
39
|
+
# @param locality [String] City or locality.
|
40
|
+
# @param postal_code [String] ZIP code or postal code.
|
41
|
+
# @param post_office_box [String] P.O. Box number.
|
42
|
+
# @param region [String] State, province, or region.
|
43
|
+
# @param street_address [String] Street address or street name and number.
|
44
|
+
# @param type [Array<Pinnacle::Types::VCardAddressSchemaTypeItem>] Address type classifications.
|
45
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
46
|
+
# @return [Pinnacle::Types::VcardAddress]
|
47
|
+
def initialize(country_name: OMIT, extended_address: OMIT, fulladdress: OMIT, locality: OMIT, postal_code: OMIT,
|
48
|
+
post_office_box: OMIT, region: OMIT, street_address: OMIT, type: OMIT, additional_properties: nil)
|
49
|
+
@country_name = country_name if country_name != OMIT
|
50
|
+
@extended_address = extended_address if extended_address != OMIT
|
51
|
+
@fulladdress = fulladdress if fulladdress != OMIT
|
52
|
+
@locality = locality if locality != OMIT
|
53
|
+
@postal_code = postal_code if postal_code != OMIT
|
54
|
+
@post_office_box = post_office_box if post_office_box != OMIT
|
55
|
+
@region = region if region != OMIT
|
56
|
+
@street_address = street_address if street_address != OMIT
|
57
|
+
@type = type if type != OMIT
|
58
|
+
@additional_properties = additional_properties
|
59
|
+
@_field_set = {
|
60
|
+
"countryName": country_name,
|
61
|
+
"extendedAddress": extended_address,
|
62
|
+
"fulladdress": fulladdress,
|
63
|
+
"locality": locality,
|
64
|
+
"postalCode": postal_code,
|
65
|
+
"postOfficeBox": post_office_box,
|
66
|
+
"region": region,
|
67
|
+
"streetAddress": street_address,
|
68
|
+
"type": type
|
69
|
+
}.reject do |_k, v|
|
70
|
+
v == OMIT
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Deserialize a JSON object to an instance of VcardAddress
|
75
|
+
#
|
76
|
+
# @param json_object [String]
|
77
|
+
# @return [Pinnacle::Types::VcardAddress]
|
78
|
+
def self.from_json(json_object:)
|
79
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
80
|
+
parsed_json = JSON.parse(json_object)
|
81
|
+
country_name = parsed_json["countryName"]
|
82
|
+
extended_address = parsed_json["extendedAddress"]
|
83
|
+
fulladdress = parsed_json["fulladdress"]
|
84
|
+
locality = parsed_json["locality"]
|
85
|
+
postal_code = parsed_json["postalCode"]
|
86
|
+
post_office_box = parsed_json["postOfficeBox"]
|
87
|
+
region = parsed_json["region"]
|
88
|
+
street_address = parsed_json["streetAddress"]
|
89
|
+
type = parsed_json["type"]
|
90
|
+
new(
|
91
|
+
country_name: country_name,
|
92
|
+
extended_address: extended_address,
|
93
|
+
fulladdress: fulladdress,
|
94
|
+
locality: locality,
|
95
|
+
postal_code: postal_code,
|
96
|
+
post_office_box: post_office_box,
|
97
|
+
region: region,
|
98
|
+
street_address: street_address,
|
99
|
+
type: type,
|
100
|
+
additional_properties: struct
|
101
|
+
)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Serialize an instance of VcardAddress to a JSON object
|
105
|
+
#
|
106
|
+
# @return [String]
|
107
|
+
def to_json(*_args)
|
108
|
+
@_field_set&.to_json
|
109
|
+
end
|
110
|
+
|
111
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
112
|
+
# hash and check each fields type against the current object's property
|
113
|
+
# definitions.
|
114
|
+
#
|
115
|
+
# @param obj [Object]
|
116
|
+
# @return [Void]
|
117
|
+
def self.validate_raw(obj:)
|
118
|
+
obj.country_name&.is_a?(String) != false || raise("Passed value for field obj.country_name is not the expected type, validation failed.")
|
119
|
+
obj.extended_address&.is_a?(String) != false || raise("Passed value for field obj.extended_address is not the expected type, validation failed.")
|
120
|
+
obj.fulladdress&.is_a?(String) != false || raise("Passed value for field obj.fulladdress is not the expected type, validation failed.")
|
121
|
+
obj.locality&.is_a?(String) != false || raise("Passed value for field obj.locality is not the expected type, validation failed.")
|
122
|
+
obj.postal_code&.is_a?(String) != false || raise("Passed value for field obj.postal_code is not the expected type, validation failed.")
|
123
|
+
obj.post_office_box&.is_a?(String) != false || raise("Passed value for field obj.post_office_box is not the expected type, validation failed.")
|
124
|
+
obj.region&.is_a?(String) != false || raise("Passed value for field obj.region is not the expected type, validation failed.")
|
125
|
+
obj.street_address&.is_a?(String) != false || raise("Passed value for field obj.street_address is not the expected type, validation failed.")
|
126
|
+
obj.type&.is_a?(Array) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|