coss 0.1.0
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 +7 -0
- data/.fernignore +11 -0
- data/.rubocop.yml +103 -0
- data/CHANGELOG.md +7 -0
- data/CONTRIBUTING.md +120 -0
- data/LICENSE +21 -0
- data/README.md +29 -0
- data/Rakefile +20 -0
- data/custom.gemspec.rb +11 -0
- data/lib/coss/api_key/client.rb +50 -0
- data/lib/coss/audit_events/client.rb +110 -0
- data/lib/coss/audit_events/types/get_audit_events_request.rb +11 -0
- data/lib/coss/audit_events/types/list_audit_events_request.rb +27 -0
- data/lib/coss/billing/client.rb +114 -0
- data/lib/coss/billing/credits/client.rb +63 -0
- data/lib/coss/billing/credits/types/list_credits_request.rb +17 -0
- data/lib/coss/billing/credits/types/list_credits_request_status.rb +16 -0
- data/lib/coss/billing/invoices/client.rb +99 -0
- data/lib/coss/billing/invoices/types/get_invoices_request.rb +13 -0
- data/lib/coss/billing/invoices/types/list_invoices_request.rb +17 -0
- data/lib/coss/billing/invoices/types/list_invoices_request_status.rb +18 -0
- data/lib/coss/billing/types/usage_billing_request.rb +19 -0
- data/lib/coss/billing/types/usage_billing_request_granularity.rb +15 -0
- data/lib/coss/billing/types/usage_billing_request_group_by.rb +16 -0
- data/lib/coss/billing/types/usage_billing_request_meter.rb +20 -0
- data/lib/coss/client.rb +100 -0
- data/lib/coss/domains/client.rb +223 -0
- data/lib/coss/domains/dmarc/client.rb +61 -0
- data/lib/coss/domains/dmarc/reports/client.rb +107 -0
- data/lib/coss/domains/dmarc/reports/types/get_reports_request.rb +17 -0
- data/lib/coss/domains/dmarc/reports/types/list_reports_request.rb +19 -0
- data/lib/coss/domains/dmarc/types/get_dmarc_request.rb +13 -0
- data/lib/coss/domains/receiving/client.rb +105 -0
- data/lib/coss/domains/receiving/types/create_receiving_domain_request.rb +15 -0
- data/lib/coss/domains/receiving/types/delete_receiving_request.rb +13 -0
- data/lib/coss/domains/tracking/client.rb +105 -0
- data/lib/coss/domains/tracking/types/create_tracking_domain_request.rb +15 -0
- data/lib/coss/domains/tracking/types/delete_tracking_request.rb +13 -0
- data/lib/coss/domains/types/create_domain_request.rb +11 -0
- data/lib/coss/domains/types/delete_domains_request.rb +11 -0
- data/lib/coss/domains/types/get_domains_request.rb +11 -0
- data/lib/coss/domains/types/verify_domains_request.rb +11 -0
- data/lib/coss/email/audiences/client.rb +343 -0
- data/lib/coss/email/audiences/types/add_audience_contacts_request.rb +15 -0
- data/lib/coss/email/audiences/types/create_audience_request.rb +13 -0
- data/lib/coss/email/audiences/types/get_audiences_request.rb +13 -0
- data/lib/coss/email/audiences/types/list_audiences_request.rb +15 -0
- data/lib/coss/email/audiences/types/list_contacts_audiences_request.rb +17 -0
- data/lib/coss/email/audiences/types/remove_audiences_request.rb +13 -0
- data/lib/coss/email/audiences/types/remove_contact_audiences_request.rb +15 -0
- data/lib/coss/email/audiences/types/remove_contact_audiences_response.rb +19 -0
- data/lib/coss/email/audiences/types/remove_contact_audiences_response_object.rb +15 -0
- data/lib/coss/email/audiences/types/update_audience_request.rb +15 -0
- data/lib/coss/email/broadcasts/client.rb +495 -0
- data/lib/coss/email/broadcasts/types/cancel_broadcasts_request.rb +13 -0
- data/lib/coss/email/broadcasts/types/create_broadcast_request.rb +41 -0
- data/lib/coss/email/broadcasts/types/create_broadcast_request_tracking.rb +15 -0
- data/lib/coss/email/broadcasts/types/get_broadcasts_request.rb +13 -0
- data/lib/coss/email/broadcasts/types/list_broadcasts_request.rb +17 -0
- data/lib/coss/email/broadcasts/types/list_broadcasts_request_status.rb +21 -0
- data/lib/coss/email/broadcasts/types/list_emails_broadcasts_request.rb +17 -0
- data/lib/coss/email/broadcasts/types/pause_broadcasts_request.rb +13 -0
- data/lib/coss/email/broadcasts/types/remove_broadcasts_request.rb +13 -0
- data/lib/coss/email/broadcasts/types/resume_broadcasts_request.rb +13 -0
- data/lib/coss/email/broadcasts/types/send_broadcast_request.rb +15 -0
- data/lib/coss/email/broadcasts/types/test_broadcast_request.rb +17 -0
- data/lib/coss/email/broadcasts/types/update_broadcast_request.rb +37 -0
- data/lib/coss/email/broadcasts/types/update_broadcast_request_tracking.rb +15 -0
- data/lib/coss/email/client.rb +509 -0
- data/lib/coss/email/contacts/client.rb +511 -0
- data/lib/coss/email/contacts/properties/client.rb +214 -0
- data/lib/coss/email/contacts/properties/types/create_contact_property_request.rb +19 -0
- data/lib/coss/email/contacts/properties/types/create_contact_property_request_fallback.rb +21 -0
- data/lib/coss/email/contacts/properties/types/create_contact_property_request_type.rb +20 -0
- data/lib/coss/email/contacts/properties/types/get_properties_request.rb +15 -0
- data/lib/coss/email/contacts/properties/types/remove_properties_request.rb +15 -0
- data/lib/coss/email/contacts/properties/types/update_contact_property_request.rb +17 -0
- data/lib/coss/email/contacts/properties/types/update_contact_property_request_fallback.rb +21 -0
- data/lib/coss/email/contacts/types/create_preference_links_request.rb +15 -0
- data/lib/coss/email/contacts/types/export_contacts_request.rb +15 -0
- data/lib/coss/email/contacts/types/export_contacts_request_status.rb +17 -0
- data/lib/coss/email/contacts/types/get_contacts_request.rb +13 -0
- data/lib/coss/email/contacts/types/get_topics_contacts_request.rb +13 -0
- data/lib/coss/email/contacts/types/import_contacts_request.rb +15 -0
- data/lib/coss/email/contacts/types/import_contacts_request_contacts_item.rb +21 -0
- data/lib/coss/email/contacts/types/import_contacts_request_contacts_item_properties_value.rb +19 -0
- data/lib/coss/email/contacts/types/list_contacts_request.rb +21 -0
- data/lib/coss/email/contacts/types/list_contacts_request_status.rb +17 -0
- data/lib/coss/email/contacts/types/remove_contacts_request.rb +13 -0
- data/lib/coss/email/contacts/types/resend_confirmation_contacts_request.rb +13 -0
- data/lib/coss/email/contacts/types/update_contact_request.rb +23 -0
- data/lib/coss/email/contacts/types/update_contact_request_properties_value.rb +19 -0
- data/lib/coss/email/contacts/types/update_contact_request_status.rb +16 -0
- data/lib/coss/email/contacts/types/update_contact_request_topics_item.rb +15 -0
- data/lib/coss/email/contacts/types/update_contact_request_topics_item_status.rb +16 -0
- data/lib/coss/email/contacts/types/update_contact_topics_request.rb +15 -0
- data/lib/coss/email/contacts/types/update_contact_topics_request_topics_item.rb +15 -0
- data/lib/coss/email/contacts/types/update_contact_topics_request_topics_item_status.rb +16 -0
- data/lib/coss/email/contacts/types/upsert_contact_request.rb +27 -0
- data/lib/coss/email/contacts/types/upsert_contact_request_properties_value.rb +19 -0
- data/lib/coss/email/contacts/types/upsert_contact_request_status.rb +16 -0
- data/lib/coss/email/contacts/types/upsert_contact_request_topics_item.rb +15 -0
- data/lib/coss/email/contacts/types/upsert_contact_request_topics_item_status.rb +16 -0
- data/lib/coss/email/dedicated_ips/client.rb +54 -0
- data/lib/coss/email/marketing_settings/client.rb +88 -0
- data/lib/coss/email/marketing_settings/types/update_marketing_settings_request.rb +27 -0
- data/lib/coss/email/received/client.rb +249 -0
- data/lib/coss/email/received/types/delete_received_request.rb +13 -0
- data/lib/coss/email/received/types/get_attachment_received_request.rb +15 -0
- data/lib/coss/email/received/types/get_raw_received_request.rb +13 -0
- data/lib/coss/email/received/types/get_received_request.rb +13 -0
- data/lib/coss/email/received/types/list_received_request.rb +15 -0
- data/lib/coss/email/segments/client.rb +284 -0
- data/lib/coss/email/segments/types/create_segment_request.rb +15 -0
- data/lib/coss/email/segments/types/get_segments_request.rb +13 -0
- data/lib/coss/email/segments/types/list_contacts_segments_request.rb +17 -0
- data/lib/coss/email/segments/types/list_segments_request.rb +15 -0
- data/lib/coss/email/segments/types/remove_segments_request.rb +13 -0
- data/lib/coss/email/segments/types/update_segment_request.rb +17 -0
- data/lib/coss/email/storage/client.rb +95 -0
- data/lib/coss/email/storage/types/update_storage_settings_request.rb +13 -0
- data/lib/coss/email/storage/types/update_storage_settings_request_content_storage.rb +16 -0
- data/lib/coss/email/suppressions/client.rb +316 -0
- data/lib/coss/email/suppressions/types/check_suppressions_request.rb +17 -0
- data/lib/coss/email/suppressions/types/check_suppressions_request_stream.rb +16 -0
- data/lib/coss/email/suppressions/types/create_suppression_request.rb +15 -0
- data/lib/coss/email/suppressions/types/create_suppression_request_scope.rb +20 -0
- data/lib/coss/email/suppressions/types/create_suppression_request_scope_one.rb +15 -0
- data/lib/coss/email/suppressions/types/create_suppression_request_scope_zero.rb +15 -0
- data/lib/coss/email/suppressions/types/export_suppressions_request.rb +15 -0
- data/lib/coss/email/suppressions/types/export_suppressions_request_reason.rb +19 -0
- data/lib/coss/email/suppressions/types/get_suppressions_request.rb +13 -0
- data/lib/coss/email/suppressions/types/import_suppressions_request.rb +13 -0
- data/lib/coss/email/suppressions/types/import_suppressions_request_suppressions_item.rb +15 -0
- data/lib/coss/email/suppressions/types/list_suppressions_request.rb +19 -0
- data/lib/coss/email/suppressions/types/remove_suppressions_request.rb +13 -0
- data/lib/coss/email/templates/client.rb +455 -0
- data/lib/coss/email/templates/types/create_email_template_request.rb +25 -0
- data/lib/coss/email/templates/types/delete_templates_request.rb +13 -0
- data/lib/coss/email/templates/types/get_draft_templates_request.rb +13 -0
- data/lib/coss/email/templates/types/get_templates_request.rb +13 -0
- data/lib/coss/email/templates/types/list_templates_request.rb +15 -0
- data/lib/coss/email/templates/types/publish_email_template_request.rb +15 -0
- data/lib/coss/email/templates/types/render_email_template_request.rb +19 -0
- data/lib/coss/email/templates/types/update_email_template_draft_request.rb +23 -0
- data/lib/coss/email/templates/types/update_email_template_request.rb +19 -0
- data/lib/coss/email/templates/versions/client.rb +149 -0
- data/lib/coss/email/templates/versions/types/get_versions_request.rb +17 -0
- data/lib/coss/email/templates/versions/types/list_versions_request.rb +19 -0
- data/lib/coss/email/templates/versions/types/restore_versions_request.rb +17 -0
- data/lib/coss/email/topics/client.rb +222 -0
- data/lib/coss/email/topics/types/create_topic_request.rb +23 -0
- data/lib/coss/email/topics/types/create_topic_request_default_subscription.rb +16 -0
- data/lib/coss/email/topics/types/create_topic_request_visibility.rb +16 -0
- data/lib/coss/email/topics/types/get_topics_request.rb +13 -0
- data/lib/coss/email/topics/types/list_topics_request.rb +15 -0
- data/lib/coss/email/topics/types/remove_topics_request.rb +13 -0
- data/lib/coss/email/topics/types/update_topic_request.rb +23 -0
- data/lib/coss/email/topics/types/update_topic_request_default_subscription.rb +16 -0
- data/lib/coss/email/topics/types/update_topic_request_visibility.rb +16 -0
- data/lib/coss/email/tracking/client.rb +221 -0
- data/lib/coss/email/tracking/types/remove_category_tracking_request.rb +13 -0
- data/lib/coss/email/tracking/types/update_category_tracking_request.rb +15 -0
- data/lib/coss/email/types/cancel_email_request.rb +11 -0
- data/lib/coss/email/types/get_batch_email_request.rb +11 -0
- data/lib/coss/email/types/get_email_request.rb +11 -0
- data/lib/coss/email/types/list_email_request.rb +29 -0
- data/lib/coss/email/types/list_events_email_request.rb +11 -0
- data/lib/coss/email/types/list_links_email_request.rb +11 -0
- data/lib/coss/email/types/reschedule_email_request.rb +13 -0
- data/lib/coss/email/types/send_email_batch_request.rb +13 -0
- data/lib/coss/email/types/send_email_body.rb +13 -0
- data/lib/coss/environment/client.rb +50 -0
- data/lib/coss/environment.rb +7 -0
- data/lib/coss/errors/api_error.rb +8 -0
- data/lib/coss/errors/client_error.rb +17 -0
- data/lib/coss/errors/redirect_error.rb +8 -0
- data/lib/coss/errors/response_error.rb +42 -0
- data/lib/coss/errors/server_error.rb +11 -0
- data/lib/coss/errors/timeout_error.rb +8 -0
- data/lib/coss/hooks/applications/client.rb +228 -0
- data/lib/coss/hooks/applications/types/create_hook_application_request.rb +17 -0
- data/lib/coss/hooks/applications/types/delete_applications_request.rb +13 -0
- data/lib/coss/hooks/applications/types/get_applications_request.rb +13 -0
- data/lib/coss/hooks/applications/types/list_applications_request.rb +15 -0
- data/lib/coss/hooks/applications/types/update_hook_application_request.rb +19 -0
- data/lib/coss/hooks/client.rb +44 -0
- data/lib/coss/hooks/deliveries/client.rb +143 -0
- data/lib/coss/hooks/deliveries/types/get_deliveries_request.rb +15 -0
- data/lib/coss/hooks/deliveries/types/list_attempts_deliveries_request.rb +15 -0
- data/lib/coss/hooks/deliveries/types/retry_deliveries_request.rb +15 -0
- data/lib/coss/hooks/endpoints/client.rb +522 -0
- data/lib/coss/hooks/endpoints/types/create_hook_endpoint_request.rb +27 -0
- data/lib/coss/hooks/endpoints/types/delete_endpoints_request.rb +15 -0
- data/lib/coss/hooks/endpoints/types/get_endpoints_request.rb +15 -0
- data/lib/coss/hooks/endpoints/types/get_recovery_endpoints_request.rb +17 -0
- data/lib/coss/hooks/endpoints/types/get_secret_endpoints_request.rb +15 -0
- data/lib/coss/hooks/endpoints/types/list_deliveries_endpoints_request.rb +21 -0
- data/lib/coss/hooks/endpoints/types/list_deliveries_endpoints_request_status.rb +17 -0
- data/lib/coss/hooks/endpoints/types/list_endpoints_request.rb +13 -0
- data/lib/coss/hooks/endpoints/types/recover_hook_endpoint_request.rb +17 -0
- data/lib/coss/hooks/endpoints/types/roll_hook_endpoint_secret_request.rb +17 -0
- data/lib/coss/hooks/endpoints/types/send_hook_test_request.rb +19 -0
- data/lib/coss/hooks/endpoints/types/update_hook_endpoint_request.rb +27 -0
- data/lib/coss/hooks/event_types/client.rb +232 -0
- data/lib/coss/hooks/event_types/types/archive_event_types_request.rb +13 -0
- data/lib/coss/hooks/event_types/types/create_hook_event_type_request.rb +19 -0
- data/lib/coss/hooks/event_types/types/get_event_types_request.rb +13 -0
- data/lib/coss/hooks/event_types/types/list_event_types_request.rb +17 -0
- data/lib/coss/hooks/event_types/types/list_event_types_request_include_archived.rb +16 -0
- data/lib/coss/hooks/event_types/types/update_hook_event_type_request.rb +21 -0
- data/lib/coss/hooks/messages/client.rb +205 -0
- data/lib/coss/hooks/messages/types/get_messages_request.rb +15 -0
- data/lib/coss/hooks/messages/types/list_deliveries_messages_request.rb +15 -0
- data/lib/coss/hooks/messages/types/list_messages_request.rb +19 -0
- data/lib/coss/hooks/messages/types/send_hook_message_request.rb +19 -0
- data/lib/coss/hooks/portal/client.rb +66 -0
- data/lib/coss/hooks/portal/types/create_hook_portal_session_request.rb +17 -0
- data/lib/coss/internal/errors/constraint_error.rb +10 -0
- data/lib/coss/internal/errors/type_error.rb +10 -0
- data/lib/coss/internal/http/base_request.rb +53 -0
- data/lib/coss/internal/http/raw_client.rb +271 -0
- data/lib/coss/internal/idempotency_key.rb +17 -0
- data/lib/coss/internal/iterators/cursor_item_iterator.rb +28 -0
- data/lib/coss/internal/iterators/cursor_page_iterator.rb +63 -0
- data/lib/coss/internal/iterators/item_iterator.rb +65 -0
- data/lib/coss/internal/iterators/offset_item_iterator.rb +30 -0
- data/lib/coss/internal/iterators/offset_page_iterator.rb +103 -0
- data/lib/coss/internal/json/request.rb +42 -0
- data/lib/coss/internal/json/serializable.rb +25 -0
- data/lib/coss/internal/multipart/multipart_encoder.rb +141 -0
- data/lib/coss/internal/multipart/multipart_form_data.rb +83 -0
- data/lib/coss/internal/multipart/multipart_form_data_part.rb +51 -0
- data/lib/coss/internal/multipart/multipart_request.rb +41 -0
- data/lib/coss/internal/types/array.rb +47 -0
- data/lib/coss/internal/types/boolean.rb +34 -0
- data/lib/coss/internal/types/enum.rb +56 -0
- data/lib/coss/internal/types/hash.rb +36 -0
- data/lib/coss/internal/types/model/field.rb +38 -0
- data/lib/coss/internal/types/model.rb +218 -0
- data/lib/coss/internal/types/type.rb +35 -0
- data/lib/coss/internal/types/union.rb +161 -0
- data/lib/coss/internal/types/unknown.rb +15 -0
- data/lib/coss/internal/types/utils.rb +116 -0
- data/lib/coss/log_drains/batches/client.rb +105 -0
- data/lib/coss/log_drains/batches/types/get_batches_request.rb +15 -0
- data/lib/coss/log_drains/batches/types/list_batches_request.rb +19 -0
- data/lib/coss/log_drains/batches/types/list_batches_request_status.rb +17 -0
- data/lib/coss/log_drains/client.rb +226 -0
- data/lib/coss/log_drains/types/create_log_drain_request.rb +15 -0
- data/lib/coss/log_drains/types/delete_log_drains_request.rb +11 -0
- data/lib/coss/log_drains/types/get_log_drains_request.rb +11 -0
- data/lib/coss/log_drains/types/update_log_drain_request.rb +19 -0
- data/lib/coss/logs/client.rb +119 -0
- data/lib/coss/logs/types/get_logs_request.rb +11 -0
- data/lib/coss/logs/types/list_logs_request.rb +37 -0
- data/lib/coss/reputation/client.rb +52 -0
- data/lib/coss/risk/assessments/client.rb +106 -0
- data/lib/coss/risk/assessments/types/get_assessments_request.rb +13 -0
- data/lib/coss/risk/assessments/types/list_assessments_request.rb +23 -0
- data/lib/coss/risk/assessments/types/list_assessments_request_review_status.rb +16 -0
- data/lib/coss/risk/client.rb +371 -0
- data/lib/coss/risk/limit_buckets/client.rb +214 -0
- data/lib/coss/risk/limit_buckets/types/create_risk_limit_bucket_request.rb +21 -0
- data/lib/coss/risk/limit_buckets/types/create_risk_limit_bucket_request_on_failure.rb +16 -0
- data/lib/coss/risk/limit_buckets/types/delete_limit_buckets_request.rb +13 -0
- data/lib/coss/risk/limit_buckets/types/get_limit_buckets_request.rb +13 -0
- data/lib/coss/risk/limit_buckets/types/update_risk_limit_bucket_request.rb +21 -0
- data/lib/coss/risk/limit_buckets/types/update_risk_limit_bucket_request_on_failure.rb +16 -0
- data/lib/coss/risk/lists/client.rb +181 -0
- data/lib/coss/risk/lists/types/create_risk_list_entry_request.rb +21 -0
- data/lib/coss/risk/lists/types/get_lists_request.rb +13 -0
- data/lib/coss/risk/lists/types/list_lists_request.rb +19 -0
- data/lib/coss/risk/lists/types/remove_lists_request.rb +13 -0
- data/lib/coss/risk/rules/client.rb +222 -0
- data/lib/coss/risk/rules/types/create_risk_rule_request.rb +25 -0
- data/lib/coss/risk/rules/types/create_risk_rule_request_match.rb +16 -0
- data/lib/coss/risk/rules/types/delete_rules_request.rb +13 -0
- data/lib/coss/risk/rules/types/get_rules_request.rb +13 -0
- data/lib/coss/risk/rules/types/update_risk_rule_request.rb +27 -0
- data/lib/coss/risk/rules/types/update_risk_rule_request_match.rb +16 -0
- data/lib/coss/risk/settings/client.rb +99 -0
- data/lib/coss/risk/settings/types/update_risk_settings_request.rb +23 -0
- data/lib/coss/risk/settings/types/update_risk_settings_request_captcha.rb +17 -0
- data/lib/coss/risk/settings/types/update_risk_settings_request_captcha_provider.rb +16 -0
- data/lib/coss/risk/settings/types/update_risk_settings_request_content_thresholds.rb +20 -0
- data/lib/coss/risk/settings/types/update_risk_settings_request_disabled_reasons_item.rb +57 -0
- data/lib/coss/risk/settings/types/update_risk_settings_request_reason_weights.rb +106 -0
- data/lib/coss/risk/types/check_risk_limit_request.rb +17 -0
- data/lib/coss/risk/types/create_risk_assessment_request.rb +29 -0
- data/lib/coss/risk/types/create_risk_assessment_request_captcha.rb +11 -0
- data/lib/coss/risk/types/create_risk_assessment_request_content.rb +13 -0
- data/lib/coss/risk/types/create_risk_assessment_request_device.rb +13 -0
- data/lib/coss/risk/types/create_risk_assessment_request_user.rb +13 -0
- data/lib/coss/risk/types/create_risk_feedback_request.rb +15 -0
- data/lib/coss/risk/types/risk_content_classify_request.rb +11 -0
- data/lib/coss/risk/types/risk_email_check_request.rb +11 -0
- data/lib/coss/risk/types/risk_ip_check_request.rb +11 -0
- data/lib/coss/risk/users/client.rb +55 -0
- data/lib/coss/risk/users/types/forget_users_request.rb +13 -0
- data/lib/coss/sms/client.rb +256 -0
- data/lib/coss/sms/numbers/client.rb +53 -0
- data/lib/coss/sms/received/client.rb +102 -0
- data/lib/coss/sms/received/types/get_received_request.rb +13 -0
- data/lib/coss/sms/received/types/list_received_request.rb +23 -0
- data/lib/coss/sms/suppressions/client.rb +214 -0
- data/lib/coss/sms/suppressions/types/check_suppressions_request.rb +13 -0
- data/lib/coss/sms/suppressions/types/create_sms_suppression_request.rb +13 -0
- data/lib/coss/sms/suppressions/types/get_suppressions_request.rb +13 -0
- data/lib/coss/sms/suppressions/types/list_suppressions_request.rb +17 -0
- data/lib/coss/sms/suppressions/types/remove_suppressions_request.rb +13 -0
- data/lib/coss/sms/types/cancel_sms_request.rb +11 -0
- data/lib/coss/sms/types/get_sms_request.rb +11 -0
- data/lib/coss/sms/types/list_events_sms_request.rb +11 -0
- data/lib/coss/sms/types/list_sms_request.rb +21 -0
- data/lib/coss/sms/types/send_sms_request.rb +21 -0
- data/lib/coss/sms/types/send_sms_request_tags_item.rb +13 -0
- data/lib/coss/types/account_webhook_event.rb +19 -0
- data/lib/coss/types/account_webhook_event_data.rb +21 -0
- data/lib/coss/types/account_webhook_event_data_previous_status.rb +13 -0
- data/lib/coss/types/account_webhook_event_data_status.rb +13 -0
- data/lib/coss/types/account_webhook_event_object.rb +11 -0
- data/lib/coss/types/account_webhook_event_type.rb +16 -0
- data/lib/coss/types/audience.rb +19 -0
- data/lib/coss/types/audience_contacts_added.rb +15 -0
- data/lib/coss/types/audience_contacts_added_object.rb +11 -0
- data/lib/coss/types/audience_list.rb +13 -0
- data/lib/coss/types/audience_list_object.rb +11 -0
- data/lib/coss/types/audience_object.rb +11 -0
- data/lib/coss/types/audit_actor_type.rb +13 -0
- data/lib/coss/types/audit_event.rb +37 -0
- data/lib/coss/types/audit_event_list.rb +13 -0
- data/lib/coss/types/audit_event_list_object.rb +11 -0
- data/lib/coss/types/audit_event_object.rb +11 -0
- data/lib/coss/types/billing.rb +41 -0
- data/lib/coss/types/billing_add_ons_item.rb +17 -0
- data/lib/coss/types/billing_add_ons_item_interval.rb +13 -0
- data/lib/coss/types/billing_contract.rb +20 -0
- data/lib/coss/types/billing_contract_kind.rb +13 -0
- data/lib/coss/types/billing_currency.rb +11 -0
- data/lib/coss/types/billing_estimate.rb +16 -0
- data/lib/coss/types/billing_features.rb +19 -0
- data/lib/coss/types/billing_holds_item.rb +11 -0
- data/lib/coss/types/billing_holds_item_reason.rb +13 -0
- data/lib/coss/types/billing_limits.rb +16 -0
- data/lib/coss/types/billing_object.rb +11 -0
- data/lib/coss/types/billing_payment_method.rb +13 -0
- data/lib/coss/types/billing_period.rb +12 -0
- data/lib/coss/types/billing_plan.rb +14 -0
- data/lib/coss/types/billing_scheduled_change.rb +12 -0
- data/lib/coss/types/billing_scheduled_change_plan.rb +14 -0
- data/lib/coss/types/billing_status.rb +13 -0
- data/lib/coss/types/billing_usage_item.rb +13 -0
- data/lib/coss/types/billing_usage_item_meter.rb +18 -0
- data/lib/coss/types/billing_webhook_event.rb +25 -0
- data/lib/coss/types/billing_webhook_event_five.rb +19 -0
- data/lib/coss/types/billing_webhook_event_five_data.rb +13 -0
- data/lib/coss/types/billing_webhook_event_five_object.rb +11 -0
- data/lib/coss/types/billing_webhook_event_five_type.rb +11 -0
- data/lib/coss/types/billing_webhook_event_four.rb +19 -0
- data/lib/coss/types/billing_webhook_event_four_data.rb +13 -0
- data/lib/coss/types/billing_webhook_event_four_data_reason.rb +13 -0
- data/lib/coss/types/billing_webhook_event_four_object.rb +11 -0
- data/lib/coss/types/billing_webhook_event_four_type.rb +12 -0
- data/lib/coss/types/billing_webhook_event_one.rb +19 -0
- data/lib/coss/types/billing_webhook_event_one_data.rb +15 -0
- data/lib/coss/types/billing_webhook_event_one_data_failure.rb +9 -0
- data/lib/coss/types/billing_webhook_event_one_object.rb +11 -0
- data/lib/coss/types/billing_webhook_event_one_type.rb +11 -0
- data/lib/coss/types/billing_webhook_event_seven.rb +19 -0
- data/lib/coss/types/billing_webhook_event_seven_data.rb +15 -0
- data/lib/coss/types/billing_webhook_event_seven_data_scope.rb +13 -0
- data/lib/coss/types/billing_webhook_event_seven_object.rb +11 -0
- data/lib/coss/types/billing_webhook_event_seven_type.rb +12 -0
- data/lib/coss/types/billing_webhook_event_six.rb +19 -0
- data/lib/coss/types/billing_webhook_event_six_data.rb +23 -0
- data/lib/coss/types/billing_webhook_event_six_data_period.rb +11 -0
- data/lib/coss/types/billing_webhook_event_six_data_scope.rb +13 -0
- data/lib/coss/types/billing_webhook_event_six_object.rb +11 -0
- data/lib/coss/types/billing_webhook_event_six_type.rb +11 -0
- data/lib/coss/types/billing_webhook_event_three.rb +19 -0
- data/lib/coss/types/billing_webhook_event_three_data.rb +19 -0
- data/lib/coss/types/billing_webhook_event_three_data_meter.rb +18 -0
- data/lib/coss/types/billing_webhook_event_three_data_of.rb +12 -0
- data/lib/coss/types/billing_webhook_event_three_data_period.rb +11 -0
- data/lib/coss/types/billing_webhook_event_three_object.rb +11 -0
- data/lib/coss/types/billing_webhook_event_three_type.rb +11 -0
- data/lib/coss/types/billing_webhook_event_two.rb +19 -0
- data/lib/coss/types/billing_webhook_event_two_data.rb +19 -0
- data/lib/coss/types/billing_webhook_event_two_data_change.rb +15 -0
- data/lib/coss/types/billing_webhook_event_two_data_plan.rb +14 -0
- data/lib/coss/types/billing_webhook_event_two_data_previous_plan.rb +14 -0
- data/lib/coss/types/billing_webhook_event_two_object.rb +11 -0
- data/lib/coss/types/billing_webhook_event_two_type.rb +11 -0
- data/lib/coss/types/billing_webhook_event_zero.rb +19 -0
- data/lib/coss/types/billing_webhook_event_zero_data.rb +13 -0
- data/lib/coss/types/billing_webhook_event_zero_object.rb +11 -0
- data/lib/coss/types/billing_webhook_event_zero_type.rb +13 -0
- data/lib/coss/types/broadcast.rb +57 -0
- data/lib/coss/types/broadcast_email_list.rb +13 -0
- data/lib/coss/types/broadcast_email_list_object.rb +11 -0
- data/lib/coss/types/broadcast_error.rb +11 -0
- data/lib/coss/types/broadcast_list.rb +13 -0
- data/lib/coss/types/broadcast_list_object.rb +11 -0
- data/lib/coss/types/broadcast_object.rb +11 -0
- data/lib/coss/types/broadcast_stats.rb +25 -0
- data/lib/coss/types/broadcast_status.rb +17 -0
- data/lib/coss/types/broadcast_test.rb +11 -0
- data/lib/coss/types/broadcast_test_object.rb +11 -0
- data/lib/coss/types/broadcast_tracking.rb +11 -0
- data/lib/coss/types/broadcast_webhook_event.rb +19 -0
- data/lib/coss/types/broadcast_webhook_event_data.rb +17 -0
- data/lib/coss/types/broadcast_webhook_event_data_broadcast.rb +13 -0
- data/lib/coss/types/broadcast_webhook_event_data_broadcast_status.rb +17 -0
- data/lib/coss/types/broadcast_webhook_event_data_error.rb +11 -0
- data/lib/coss/types/broadcast_webhook_event_object.rb +11 -0
- data/lib/coss/types/broadcast_webhook_event_type.rb +15 -0
- data/lib/coss/types/contact.rb +33 -0
- data/lib/coss/types/contact_confirmation.rb +13 -0
- data/lib/coss/types/contact_confirmation_object.rb +11 -0
- data/lib/coss/types/contact_confirmation_status.rb +14 -0
- data/lib/coss/types/contact_import.rb +17 -0
- data/lib/coss/types/contact_import_invalid_item.rb +13 -0
- data/lib/coss/types/contact_import_object.rb +11 -0
- data/lib/coss/types/contact_list.rb +13 -0
- data/lib/coss/types/contact_list_object.rb +11 -0
- data/lib/coss/types/contact_object.rb +11 -0
- data/lib/coss/types/contact_properties_value.rb +15 -0
- data/lib/coss/types/contact_property.rb +21 -0
- data/lib/coss/types/contact_property_fallback.rb +16 -0
- data/lib/coss/types/contact_property_list.rb +13 -0
- data/lib/coss/types/contact_property_list_object.rb +11 -0
- data/lib/coss/types/contact_property_object.rb +11 -0
- data/lib/coss/types/contact_property_type.rb +14 -0
- data/lib/coss/types/contact_source.rb +14 -0
- data/lib/coss/types/contact_status.rb +13 -0
- data/lib/coss/types/contact_topics.rb +13 -0
- data/lib/coss/types/contact_topics_object.rb +11 -0
- data/lib/coss/types/contact_topics_topics_item.rb +15 -0
- data/lib/coss/types/contact_topics_topics_item_choice.rb +12 -0
- data/lib/coss/types/contact_webhook_event.rb +19 -0
- data/lib/coss/types/contact_webhook_event_data.rb +15 -0
- data/lib/coss/types/contact_webhook_event_data_contact.rb +13 -0
- data/lib/coss/types/contact_webhook_event_data_contact_status.rb +13 -0
- data/lib/coss/types/contact_webhook_event_data_source.rb +14 -0
- data/lib/coss/types/contact_webhook_event_object.rb +11 -0
- data/lib/coss/types/contact_webhook_event_type.rb +15 -0
- data/lib/coss/types/credit.rb +35 -0
- data/lib/coss/types/credit_applies_to.rb +12 -0
- data/lib/coss/types/credit_kind.rb +12 -0
- data/lib/coss/types/credit_list.rb +13 -0
- data/lib/coss/types/credit_list_object.rb +11 -0
- data/lib/coss/types/credit_meter.rb +18 -0
- data/lib/coss/types/credit_meters_item.rb +18 -0
- data/lib/coss/types/credit_object.rb +11 -0
- data/lib/coss/types/credit_source.rb +16 -0
- data/lib/coss/types/dedicated_ip_pool.rb +22 -0
- data/lib/coss/types/dedicated_ip_pool_ips_item.rb +11 -0
- data/lib/coss/types/dedicated_ip_pool_object.rb +11 -0
- data/lib/coss/types/dedicated_ip_pool_status.rb +16 -0
- data/lib/coss/types/deleted_api_key.rb +13 -0
- data/lib/coss/types/deleted_api_key_object.rb +11 -0
- data/lib/coss/types/deleted_audience.rb +13 -0
- data/lib/coss/types/deleted_audience_object.rb +11 -0
- data/lib/coss/types/deleted_broadcast.rb +13 -0
- data/lib/coss/types/deleted_broadcast_object.rb +11 -0
- data/lib/coss/types/deleted_contact.rb +13 -0
- data/lib/coss/types/deleted_contact_object.rb +11 -0
- data/lib/coss/types/deleted_contact_property.rb +13 -0
- data/lib/coss/types/deleted_contact_property_object.rb +11 -0
- data/lib/coss/types/deleted_domain.rb +13 -0
- data/lib/coss/types/deleted_domain_object.rb +11 -0
- data/lib/coss/types/deleted_email_template.rb +13 -0
- data/lib/coss/types/deleted_email_template_object.rb +11 -0
- data/lib/coss/types/deleted_hook_application.rb +13 -0
- data/lib/coss/types/deleted_hook_application_object.rb +11 -0
- data/lib/coss/types/deleted_hook_endpoint.rb +13 -0
- data/lib/coss/types/deleted_hook_endpoint_object.rb +11 -0
- data/lib/coss/types/deleted_log_drain.rb +13 -0
- data/lib/coss/types/deleted_log_drain_object.rb +11 -0
- data/lib/coss/types/deleted_received_email.rb +13 -0
- data/lib/coss/types/deleted_received_email_object.rb +11 -0
- data/lib/coss/types/deleted_risk_limit_bucket.rb +13 -0
- data/lib/coss/types/deleted_risk_limit_bucket_object.rb +11 -0
- data/lib/coss/types/deleted_risk_list_entry.rb +13 -0
- data/lib/coss/types/deleted_risk_list_entry_object.rb +11 -0
- data/lib/coss/types/deleted_risk_rule.rb +13 -0
- data/lib/coss/types/deleted_risk_rule_object.rb +11 -0
- data/lib/coss/types/deleted_segment.rb +13 -0
- data/lib/coss/types/deleted_segment_object.rb +11 -0
- data/lib/coss/types/deleted_sms_suppression.rb +13 -0
- data/lib/coss/types/deleted_sms_suppression_object.rb +11 -0
- data/lib/coss/types/deleted_suppression.rb +13 -0
- data/lib/coss/types/deleted_suppression_object.rb +11 -0
- data/lib/coss/types/deleted_topic.rb +13 -0
- data/lib/coss/types/deleted_topic_object.rb +11 -0
- data/lib/coss/types/deleted_tracking_rule.rb +15 -0
- data/lib/coss/types/deleted_tracking_rule_object.rb +11 -0
- data/lib/coss/types/deleted_webhook_endpoint.rb +13 -0
- data/lib/coss/types/deleted_webhook_endpoint_object.rb +11 -0
- data/lib/coss/types/deleted_webhook_listener.rb +13 -0
- data/lib/coss/types/deleted_webhook_listener_object.rb +11 -0
- data/lib/coss/types/dmarc_published_record.rb +26 -0
- data/lib/coss/types/dmarc_published_record_adkim.rb +12 -0
- data/lib/coss/types/dmarc_published_record_aspf.rb +12 -0
- data/lib/coss/types/dmarc_published_record_np.rb +13 -0
- data/lib/coss/types/dmarc_published_record_p.rb +13 -0
- data/lib/coss/types/dmarc_published_record_sp.rb +13 -0
- data/lib/coss/types/dmarc_published_record_t.rb +12 -0
- data/lib/coss/types/dmarc_report.rb +33 -0
- data/lib/coss/types/dmarc_report_list.rb +13 -0
- data/lib/coss/types/dmarc_report_list_object.rb +11 -0
- data/lib/coss/types/dmarc_report_object.rb +11 -0
- data/lib/coss/types/dmarc_report_policy_published.rb +24 -0
- data/lib/coss/types/dmarc_report_record.rb +29 -0
- data/lib/coss/types/dmarc_report_record_auth_results.rb +11 -0
- data/lib/coss/types/dmarc_report_record_auth_results_dkim_item.rb +13 -0
- data/lib/coss/types/dmarc_report_record_auth_results_spf_item.rb +13 -0
- data/lib/coss/types/dmarc_report_record_disposition.rb +13 -0
- data/lib/coss/types/dmarc_report_record_dkim.rb +12 -0
- data/lib/coss/types/dmarc_report_record_reasons_item.rb +11 -0
- data/lib/coss/types/dmarc_report_record_spf.rb +12 -0
- data/lib/coss/types/dmarc_report_reporter.rb +11 -0
- data/lib/coss/types/dmarc_report_summary.rb +31 -0
- data/lib/coss/types/dmarc_report_summary_object.rb +11 -0
- data/lib/coss/types/dmarc_report_summary_policy_published.rb +24 -0
- data/lib/coss/types/dmarc_report_summary_reporter.rb +11 -0
- data/lib/coss/types/dmarc_source.rb +17 -0
- data/lib/coss/types/domain.rb +39 -0
- data/lib/coss/types/domain_bimi.rb +23 -0
- data/lib/coss/types/domain_bimi_dmarc_policy.rb +13 -0
- data/lib/coss/types/domain_bimi_issues_item.rb +11 -0
- data/lib/coss/types/domain_bimi_issues_item_code.rb +19 -0
- data/lib/coss/types/domain_bimi_status.rb +14 -0
- data/lib/coss/types/domain_dmarc.rb +37 -0
- data/lib/coss/types/domain_dmarc_checks_item.rb +13 -0
- data/lib/coss/types/domain_dmarc_checks_item_id.rb +17 -0
- data/lib/coss/types/domain_dmarc_next.rb +13 -0
- data/lib/coss/types/domain_dmarc_next_kind.rb +14 -0
- data/lib/coss/types/domain_dmarc_next_policy.rb +13 -0
- data/lib/coss/types/domain_dmarc_object.rb +11 -0
- data/lib/coss/types/domain_dmarc_policy.rb +13 -0
- data/lib/coss/types/domain_dmarc_report_summary.rb +27 -0
- data/lib/coss/types/domain_dmarc_stage.rb +15 -0
- data/lib/coss/types/domain_list.rb +13 -0
- data/lib/coss/types/domain_list_object.rb +11 -0
- data/lib/coss/types/domain_mail_from_status.rb +14 -0
- data/lib/coss/types/domain_object.rb +11 -0
- data/lib/coss/types/domain_record.rb +23 -0
- data/lib/coss/types/domain_record_purpose.rb +14 -0
- data/lib/coss/types/domain_record_status.rb +14 -0
- data/lib/coss/types/domain_record_type.rb +13 -0
- data/lib/coss/types/domain_status.rb +15 -0
- data/lib/coss/types/domain_webhook_event.rb +19 -0
- data/lib/coss/types/domain_webhook_event_data.rb +27 -0
- data/lib/coss/types/domain_webhook_event_object.rb +11 -0
- data/lib/coss/types/domain_webhook_event_type.rb +11 -0
- data/lib/coss/types/email.rb +61 -0
- data/lib/coss/types/email_attachment.rb +17 -0
- data/lib/coss/types/email_batch.rb +15 -0
- data/lib/coss/types/email_batch_object.rb +11 -0
- data/lib/coss/types/email_content_storage.rb +12 -0
- data/lib/coss/types/email_content_storage_mode.rb +12 -0
- data/lib/coss/types/email_event.rb +21 -0
- data/lib/coss/types/email_event_data.rb +27 -0
- data/lib/coss/types/email_event_data_bounce.rb +13 -0
- data/lib/coss/types/email_event_data_bounce_type.rb +13 -0
- data/lib/coss/types/email_event_data_click.rb +14 -0
- data/lib/coss/types/email_event_data_complaint.rb +11 -0
- data/lib/coss/types/email_event_data_delay.rb +13 -0
- data/lib/coss/types/email_event_data_delivery.rb +9 -0
- data/lib/coss/types/email_event_data_failure.rb +11 -0
- data/lib/coss/types/email_event_data_open.rb +10 -0
- data/lib/coss/types/email_event_data_reschedule.rb +12 -0
- data/lib/coss/types/email_event_data_suppression.rb +14 -0
- data/lib/coss/types/email_event_data_suppression_reason.rb +15 -0
- data/lib/coss/types/email_event_data_unsubscribe.rb +13 -0
- data/lib/coss/types/email_event_list.rb +13 -0
- data/lib/coss/types/email_event_list_object.rb +11 -0
- data/lib/coss/types/email_event_object.rb +11 -0
- data/lib/coss/types/email_event_type.rb +23 -0
- data/lib/coss/types/email_failure.rb +11 -0
- data/lib/coss/types/email_link.rb +23 -0
- data/lib/coss/types/email_link_list.rb +13 -0
- data/lib/coss/types/email_link_list_object.rb +11 -0
- data/lib/coss/types/email_link_object.rb +11 -0
- data/lib/coss/types/email_object.rb +11 -0
- data/lib/coss/types/email_recipient.rb +15 -0
- data/lib/coss/types/email_recipient_status.rb +19 -0
- data/lib/coss/types/email_recipient_type.rb +13 -0
- data/lib/coss/types/email_status.rb +15 -0
- data/lib/coss/types/email_stream.rb +12 -0
- data/lib/coss/types/email_summary.rb +54 -0
- data/lib/coss/types/email_summary_list.rb +13 -0
- data/lib/coss/types/email_summary_list_object.rb +11 -0
- data/lib/coss/types/email_summary_object.rb +11 -0
- data/lib/coss/types/email_summary_status.rb +15 -0
- data/lib/coss/types/email_summary_stream.rb +12 -0
- data/lib/coss/types/email_summary_tags_item.rb +11 -0
- data/lib/coss/types/email_tags_item.rb +11 -0
- data/lib/coss/types/email_template.rb +27 -0
- data/lib/coss/types/email_template_list.rb +13 -0
- data/lib/coss/types/email_template_list_object.rb +11 -0
- data/lib/coss/types/email_template_object.rb +11 -0
- data/lib/coss/types/email_template_reference.rb +13 -0
- data/lib/coss/types/email_template_version.rb +31 -0
- data/lib/coss/types/email_template_version_list.rb +13 -0
- data/lib/coss/types/email_template_version_list_object.rb +11 -0
- data/lib/coss/types/email_template_version_object.rb +11 -0
- data/lib/coss/types/email_tracking.rb +27 -0
- data/lib/coss/types/email_webhook_event.rb +19 -0
- data/lib/coss/types/email_webhook_event_data.rb +45 -0
- data/lib/coss/types/email_webhook_event_data_bounce.rb +13 -0
- data/lib/coss/types/email_webhook_event_data_bounce_type.rb +13 -0
- data/lib/coss/types/email_webhook_event_data_click.rb +14 -0
- data/lib/coss/types/email_webhook_event_data_complaint.rb +11 -0
- data/lib/coss/types/email_webhook_event_data_delay.rb +13 -0
- data/lib/coss/types/email_webhook_event_data_delivery.rb +9 -0
- data/lib/coss/types/email_webhook_event_data_failure.rb +11 -0
- data/lib/coss/types/email_webhook_event_data_open.rb +10 -0
- data/lib/coss/types/email_webhook_event_data_reschedule.rb +12 -0
- data/lib/coss/types/email_webhook_event_data_suppression.rb +14 -0
- data/lib/coss/types/email_webhook_event_data_suppression_reason.rb +15 -0
- data/lib/coss/types/email_webhook_event_data_tags_item.rb +11 -0
- data/lib/coss/types/email_webhook_event_data_unsubscribe.rb +13 -0
- data/lib/coss/types/email_webhook_event_object.rb +11 -0
- data/lib/coss/types/email_webhook_event_type.rb +23 -0
- data/lib/coss/types/environment.rb +24 -0
- data/lib/coss/types/environment_api_key.rb +18 -0
- data/lib/coss/types/environment_api_key_access.rb +12 -0
- data/lib/coss/types/environment_mode.rb +12 -0
- data/lib/coss/types/environment_object.rb +11 -0
- data/lib/coss/types/environment_organization.rb +15 -0
- data/lib/coss/types/environment_project.rb +13 -0
- data/lib/coss/types/error.rb +9 -0
- data/lib/coss/types/error_body.rb +19 -0
- data/lib/coss/types/error_body_issues_item.rb +11 -0
- data/lib/coss/types/error_body_type.rb +18 -0
- data/lib/coss/types/export_suppressions_request_scope.rb +16 -0
- data/lib/coss/types/export_suppressions_request_scope_one.rb +11 -0
- data/lib/coss/types/export_suppressions_request_scope_zero.rb +11 -0
- data/lib/coss/types/forgotten_risk_user.rb +13 -0
- data/lib/coss/types/forgotten_risk_user_object.rb +11 -0
- data/lib/coss/types/hook_application.rb +21 -0
- data/lib/coss/types/hook_application_list.rb +13 -0
- data/lib/coss/types/hook_application_list_object.rb +11 -0
- data/lib/coss/types/hook_application_object.rb +11 -0
- data/lib/coss/types/hook_attempt.rb +25 -0
- data/lib/coss/types/hook_attempt_list.rb +13 -0
- data/lib/coss/types/hook_attempt_list_object.rb +11 -0
- data/lib/coss/types/hook_attempt_object.rb +11 -0
- data/lib/coss/types/hook_delivery.rb +31 -0
- data/lib/coss/types/hook_delivery_list.rb +13 -0
- data/lib/coss/types/hook_delivery_list_object.rb +11 -0
- data/lib/coss/types/hook_delivery_object.rb +11 -0
- data/lib/coss/types/hook_delivery_status.rb +13 -0
- data/lib/coss/types/hook_endpoint.rb +37 -0
- data/lib/coss/types/hook_endpoint_disabled_reason.rb +12 -0
- data/lib/coss/types/hook_endpoint_list.rb +13 -0
- data/lib/coss/types/hook_endpoint_list_object.rb +11 -0
- data/lib/coss/types/hook_endpoint_object.rb +11 -0
- data/lib/coss/types/hook_endpoint_recovery.rb +25 -0
- data/lib/coss/types/hook_endpoint_recovery_object.rb +11 -0
- data/lib/coss/types/hook_endpoint_recovery_status.rb +12 -0
- data/lib/coss/types/hook_endpoint_secret.rb +11 -0
- data/lib/coss/types/hook_endpoint_secret_object.rb +11 -0
- data/lib/coss/types/hook_endpoint_webhook_event.rb +19 -0
- data/lib/coss/types/hook_endpoint_webhook_event_data.rb +19 -0
- data/lib/coss/types/hook_endpoint_webhook_event_object.rb +11 -0
- data/lib/coss/types/hook_endpoint_webhook_event_type.rb +11 -0
- data/lib/coss/types/hook_endpoint_with_secret.rb +39 -0
- data/lib/coss/types/hook_endpoint_with_secret_disabled_reason.rb +12 -0
- data/lib/coss/types/hook_endpoint_with_secret_object.rb +11 -0
- data/lib/coss/types/hook_event_type.rb +23 -0
- data/lib/coss/types/hook_event_type_list.rb +13 -0
- data/lib/coss/types/hook_event_type_list_object.rb +11 -0
- data/lib/coss/types/hook_event_type_object.rb +11 -0
- data/lib/coss/types/hook_message.rb +19 -0
- data/lib/coss/types/hook_message_list.rb +13 -0
- data/lib/coss/types/hook_message_list_object.rb +11 -0
- data/lib/coss/types/hook_message_object.rb +11 -0
- data/lib/coss/types/hook_portal_session.rb +21 -0
- data/lib/coss/types/hook_portal_session_object.rb +11 -0
- data/lib/coss/types/inbound_address.rb +13 -0
- data/lib/coss/types/inbound_address_object.rb +11 -0
- data/lib/coss/types/invoice.rb +51 -0
- data/lib/coss/types/invoice_collection_method.rb +12 -0
- data/lib/coss/types/invoice_currency.rb +11 -0
- data/lib/coss/types/invoice_kind.rb +14 -0
- data/lib/coss/types/invoice_line.rb +29 -0
- data/lib/coss/types/invoice_line_kind.rb +20 -0
- data/lib/coss/types/invoice_line_meter.rb +18 -0
- data/lib/coss/types/invoice_line_object.rb +11 -0
- data/lib/coss/types/invoice_line_period.rb +11 -0
- data/lib/coss/types/invoice_list.rb +13 -0
- data/lib/coss/types/invoice_list_object.rb +11 -0
- data/lib/coss/types/invoice_object.rb +11 -0
- data/lib/coss/types/invoice_period.rb +11 -0
- data/lib/coss/types/invoice_status.rb +14 -0
- data/lib/coss/types/invoice_summary.rb +49 -0
- data/lib/coss/types/invoice_summary_collection_method.rb +12 -0
- data/lib/coss/types/invoice_summary_currency.rb +11 -0
- data/lib/coss/types/invoice_summary_kind.rb +14 -0
- data/lib/coss/types/invoice_summary_object.rb +11 -0
- data/lib/coss/types/invoice_summary_period.rb +11 -0
- data/lib/coss/types/invoice_summary_status.rb +14 -0
- data/lib/coss/types/list_suppressions_request_scope.rb +16 -0
- data/lib/coss/types/list_suppressions_request_scope_one.rb +11 -0
- data/lib/coss/types/list_suppressions_request_scope_zero.rb +11 -0
- data/lib/coss/types/log.rb +49 -0
- data/lib/coss/types/log_drain.rb +27 -0
- data/lib/coss/types/log_drain_attempt.rb +21 -0
- data/lib/coss/types/log_drain_attempt_object.rb +11 -0
- data/lib/coss/types/log_drain_batch.rb +33 -0
- data/lib/coss/types/log_drain_batch_list.rb +13 -0
- data/lib/coss/types/log_drain_batch_list_object.rb +11 -0
- data/lib/coss/types/log_drain_batch_object.rb +11 -0
- data/lib/coss/types/log_drain_batch_status.rb +13 -0
- data/lib/coss/types/log_drain_disabled_reason.rb +12 -0
- data/lib/coss/types/log_drain_list.rb +13 -0
- data/lib/coss/types/log_drain_list_object.rb +11 -0
- data/lib/coss/types/log_drain_object.rb +11 -0
- data/lib/coss/types/log_drain_source.rb +17 -0
- data/lib/coss/types/log_drain_with_secret.rb +29 -0
- data/lib/coss/types/log_drain_with_secret_disabled_reason.rb +12 -0
- data/lib/coss/types/log_drain_with_secret_object.rb +11 -0
- data/lib/coss/types/log_level.rb +13 -0
- data/lib/coss/types/log_list.rb +13 -0
- data/lib/coss/types/log_list_object.rb +11 -0
- data/lib/coss/types/log_object.rb +11 -0
- data/lib/coss/types/log_source.rb +16 -0
- data/lib/coss/types/marketing_settings.rb +25 -0
- data/lib/coss/types/marketing_settings_object.rb +11 -0
- data/lib/coss/types/marketing_standing.rb +13 -0
- data/lib/coss/types/marketing_standing_status.rb +12 -0
- data/lib/coss/types/preference_links.rb +15 -0
- data/lib/coss/types/preference_links_object.rb +11 -0
- data/lib/coss/types/received_email.rb +57 -0
- data/lib/coss/types/received_email_attachment.rb +19 -0
- data/lib/coss/types/received_email_attachment_disposition.rb +12 -0
- data/lib/coss/types/received_email_blocked_reason.rb +11 -0
- data/lib/coss/types/received_email_headers_item.rb +11 -0
- data/lib/coss/types/received_email_list.rb +13 -0
- data/lib/coss/types/received_email_list_object.rb +11 -0
- data/lib/coss/types/received_email_object.rb +11 -0
- data/lib/coss/types/received_email_status.rb +12 -0
- data/lib/coss/types/received_email_summary.rb +41 -0
- data/lib/coss/types/received_email_summary_blocked_reason.rb +11 -0
- data/lib/coss/types/received_email_summary_object.rb +11 -0
- data/lib/coss/types/received_email_summary_status.rb +12 -0
- data/lib/coss/types/received_email_verdicts.rb +21 -0
- data/lib/coss/types/received_email_verdicts_dkim.rb +14 -0
- data/lib/coss/types/received_email_verdicts_dmarc.rb +14 -0
- data/lib/coss/types/received_email_verdicts_spam.rb +14 -0
- data/lib/coss/types/received_email_verdicts_spf.rb +14 -0
- data/lib/coss/types/received_email_verdicts_virus.rb +14 -0
- data/lib/coss/types/received_email_webhook_event.rb +19 -0
- data/lib/coss/types/received_email_webhook_event_data.rb +31 -0
- data/lib/coss/types/received_email_webhook_event_object.rb +11 -0
- data/lib/coss/types/received_email_webhook_event_type.rb +11 -0
- data/lib/coss/types/received_sms.rb +25 -0
- data/lib/coss/types/received_sms_keyword.rb +13 -0
- data/lib/coss/types/received_sms_list.rb +13 -0
- data/lib/coss/types/received_sms_list_object.rb +11 -0
- data/lib/coss/types/received_sms_object.rb +11 -0
- data/lib/coss/types/received_sms_webhook_event.rb +19 -0
- data/lib/coss/types/received_sms_webhook_event_data.rb +19 -0
- data/lib/coss/types/received_sms_webhook_event_data_keyword.rb +13 -0
- data/lib/coss/types/received_sms_webhook_event_object.rb +11 -0
- data/lib/coss/types/received_sms_webhook_event_type.rb +13 -0
- data/lib/coss/types/receiving_domain.rb +18 -0
- data/lib/coss/types/receiving_domain_record.rb +21 -0
- data/lib/coss/types/receiving_domain_record_status.rb +14 -0
- data/lib/coss/types/receiving_domain_record_type.rb +11 -0
- data/lib/coss/types/rendered_email_template.rb +21 -0
- data/lib/coss/types/rendered_email_template_object.rb +11 -0
- data/lib/coss/types/reputation.rb +23 -0
- data/lib/coss/types/reputation_check.rb +25 -0
- data/lib/coss/types/reputation_check_severity.rb +13 -0
- data/lib/coss/types/reputation_object.rb +11 -0
- data/lib/coss/types/reputation_status.rb +13 -0
- data/lib/coss/types/reputation_window.rb +12 -0
- data/lib/coss/types/risk_assessment.rb +35 -0
- data/lib/coss/types/risk_assessment_degraded_item.rb +17 -0
- data/lib/coss/types/risk_assessment_list.rb +13 -0
- data/lib/coss/types/risk_assessment_list_object.rb +11 -0
- data/lib/coss/types/risk_assessment_object.rb +11 -0
- data/lib/coss/types/risk_assessment_review_status.rb +12 -0
- data/lib/coss/types/risk_assessment_signals.rb +23 -0
- data/lib/coss/types/risk_assessment_user.rb +11 -0
- data/lib/coss/types/risk_calibration.rb +21 -0
- data/lib/coss/types/risk_calibration_object.rb +11 -0
- data/lib/coss/types/risk_calibration_reason.rb +23 -0
- data/lib/coss/types/risk_calibration_reason_code.rb +57 -0
- data/lib/coss/types/risk_calibration_rule.rb +19 -0
- data/lib/coss/types/risk_captcha_signals.rb +11 -0
- data/lib/coss/types/risk_checkout_request.rb +18 -0
- data/lib/coss/types/risk_checkout_request_card.rb +14 -0
- data/lib/coss/types/risk_checkout_request_card_funding.rb +14 -0
- data/lib/coss/types/risk_checkout_signals.rb +20 -0
- data/lib/coss/types/risk_checkout_signals_card_funding.rb +14 -0
- data/lib/coss/types/risk_content_classification.rb +14 -0
- data/lib/coss/types/risk_content_classification_object.rb +11 -0
- data/lib/coss/types/risk_content_signals.rb +17 -0
- data/lib/coss/types/risk_decision.rb +13 -0
- data/lib/coss/types/risk_device_signals.rb +22 -0
- data/lib/coss/types/risk_email_check.rb +31 -0
- data/lib/coss/types/risk_email_check_degraded_item.rb +12 -0
- data/lib/coss/types/risk_email_check_deliverability.rb +13 -0
- data/lib/coss/types/risk_email_check_object.rb +11 -0
- data/lib/coss/types/risk_email_signals.rb +23 -0
- data/lib/coss/types/risk_email_signals_deliverability.rb +13 -0
- data/lib/coss/types/risk_event.rb +15 -0
- data/lib/coss/types/risk_ip_check.rb +33 -0
- data/lib/coss/types/risk_ip_check_degraded_item.rb +12 -0
- data/lib/coss/types/risk_ip_check_hosting_kind.rb +13 -0
- data/lib/coss/types/risk_ip_check_object.rb +11 -0
- data/lib/coss/types/risk_ip_privacy.rb +15 -0
- data/lib/coss/types/risk_ip_signals.rb +27 -0
- data/lib/coss/types/risk_ip_signals_hosting_kind.rb +13 -0
- data/lib/coss/types/risk_limit.rb +23 -0
- data/lib/coss/types/risk_limit_bucket.rb +25 -0
- data/lib/coss/types/risk_limit_bucket_list.rb +14 -0
- data/lib/coss/types/risk_limit_bucket_list_object.rb +11 -0
- data/lib/coss/types/risk_limit_bucket_object.rb +11 -0
- data/lib/coss/types/risk_limit_bucket_on_failure.rb +12 -0
- data/lib/coss/types/risk_limit_object.rb +11 -0
- data/lib/coss/types/risk_list.rb +12 -0
- data/lib/coss/types/risk_list_entry.rb +23 -0
- data/lib/coss/types/risk_list_entry_list.rb +13 -0
- data/lib/coss/types/risk_list_entry_list_object.rb +11 -0
- data/lib/coss/types/risk_list_entry_object.rb +11 -0
- data/lib/coss/types/risk_list_entry_type.rb +16 -0
- data/lib/coss/types/risk_login_signals.rb +12 -0
- data/lib/coss/types/risk_outcome.rb +13 -0
- data/lib/coss/types/risk_reason.rb +33 -0
- data/lib/coss/types/risk_reason_code.rb +60 -0
- data/lib/coss/types/risk_reason_type.rb +16 -0
- data/lib/coss/types/risk_reason_window.rb +12 -0
- data/lib/coss/types/risk_rule.rb +29 -0
- data/lib/coss/types/risk_rule_condition.rb +14 -0
- data/lib/coss/types/risk_rule_condition_field.rb +62 -0
- data/lib/coss/types/risk_rule_condition_operator.rb +19 -0
- data/lib/coss/types/risk_rule_condition_value.rb +17 -0
- data/lib/coss/types/risk_rule_list.rb +14 -0
- data/lib/coss/types/risk_rule_list_object.rb +11 -0
- data/lib/coss/types/risk_rule_match.rb +12 -0
- data/lib/coss/types/risk_rule_object.rb +11 -0
- data/lib/coss/types/risk_settings.rb +23 -0
- data/lib/coss/types/risk_settings_captcha.rb +11 -0
- data/lib/coss/types/risk_settings_captcha_provider.rb +12 -0
- data/lib/coss/types/risk_settings_content_thresholds.rb +17 -0
- data/lib/coss/types/risk_settings_disabled_reasons_item.rb +53 -0
- data/lib/coss/types/risk_settings_object.rb +11 -0
- data/lib/coss/types/risk_settings_reason_weights.rb +103 -0
- data/lib/coss/types/risk_velocity_signals.rb +23 -0
- data/lib/coss/types/risk_webhook_event.rb +19 -0
- data/lib/coss/types/risk_webhook_event_data.rb +25 -0
- data/lib/coss/types/risk_webhook_event_object.rb +11 -0
- data/lib/coss/types/risk_webhook_event_type.rb +12 -0
- data/lib/coss/types/segment.rb +19 -0
- data/lib/coss/types/segment_filter.rb +15 -0
- data/lib/coss/types/segment_filter_conditions_item.rb +21 -0
- data/lib/coss/types/segment_filter_conditions_item_audience_id.rb +13 -0
- data/lib/coss/types/segment_filter_conditions_item_audience_id_field.rb +11 -0
- data/lib/coss/types/segment_filter_conditions_item_audience_id_op.rb +12 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions.rb +11 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item.rb +21 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_audience.rb +11 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_audience_op.rb +12 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_created_at.rb +11 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_created_at_op.rb +13 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_created_at_value.rb +14 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_email.rb +11 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_email_op.rb +13 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_property.rb +13 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_property_op.rb +22 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_property_value.rb +18 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_property_value_three_item.rb +15 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_topic.rb +11 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_conditions_item_topic_op.rb +12 -0
- data/lib/coss/types/segment_filter_conditions_item_conditions_match.rb +12 -0
- data/lib/coss/types/segment_filter_conditions_item_field.rb +13 -0
- data/lib/coss/types/segment_filter_conditions_item_field_field.rb +11 -0
- data/lib/coss/types/segment_filter_conditions_item_field_op.rb +13 -0
- data/lib/coss/types/segment_filter_conditions_item_field_value.rb +14 -0
- data/lib/coss/types/segment_filter_conditions_item_key.rb +15 -0
- data/lib/coss/types/segment_filter_conditions_item_key_field.rb +11 -0
- data/lib/coss/types/segment_filter_conditions_item_key_op.rb +22 -0
- data/lib/coss/types/segment_filter_conditions_item_key_value.rb +18 -0
- data/lib/coss/types/segment_filter_conditions_item_key_value_three_item.rb +15 -0
- data/lib/coss/types/segment_filter_conditions_item_one.rb +13 -0
- data/lib/coss/types/segment_filter_conditions_item_one_field.rb +11 -0
- data/lib/coss/types/segment_filter_conditions_item_one_op.rb +13 -0
- data/lib/coss/types/segment_filter_conditions_item_topic.rb +13 -0
- data/lib/coss/types/segment_filter_conditions_item_topic_field.rb +11 -0
- data/lib/coss/types/segment_filter_conditions_item_topic_op.rb +12 -0
- data/lib/coss/types/segment_filter_match.rb +12 -0
- data/lib/coss/types/segment_list.rb +13 -0
- data/lib/coss/types/segment_list_object.rb +11 -0
- data/lib/coss/types/segment_object.rb +11 -0
- data/lib/coss/types/send_email_attachment.rb +15 -0
- data/lib/coss/types/send_email_request.rb +45 -0
- data/lib/coss/types/send_email_request_bcc.rb +13 -0
- data/lib/coss/types/send_email_request_cc.rb +13 -0
- data/lib/coss/types/send_email_request_reply_to.rb +13 -0
- data/lib/coss/types/send_email_request_stream.rb +12 -0
- data/lib/coss/types/send_email_request_tags_item.rb +11 -0
- data/lib/coss/types/send_email_request_to.rb +13 -0
- data/lib/coss/types/sms.rb +39 -0
- data/lib/coss/types/sms_encoding.rb +12 -0
- data/lib/coss/types/sms_event.rb +19 -0
- data/lib/coss/types/sms_event_data.rb +13 -0
- data/lib/coss/types/sms_event_data_failure.rb +12 -0
- data/lib/coss/types/sms_event_data_suppression.rb +12 -0
- data/lib/coss/types/sms_event_data_suppression_reason.rb +13 -0
- data/lib/coss/types/sms_event_list.rb +13 -0
- data/lib/coss/types/sms_event_list_object.rb +11 -0
- data/lib/coss/types/sms_event_object.rb +11 -0
- data/lib/coss/types/sms_event_type.rb +17 -0
- data/lib/coss/types/sms_failure.rb +12 -0
- data/lib/coss/types/sms_list.rb +13 -0
- data/lib/coss/types/sms_list_object.rb +11 -0
- data/lib/coss/types/sms_number.rb +27 -0
- data/lib/coss/types/sms_number_kind.rb +12 -0
- data/lib/coss/types/sms_number_list.rb +13 -0
- data/lib/coss/types/sms_number_list_object.rb +11 -0
- data/lib/coss/types/sms_number_object.rb +11 -0
- data/lib/coss/types/sms_number_registration_status.rb +16 -0
- data/lib/coss/types/sms_number_status.rb +13 -0
- data/lib/coss/types/sms_object.rb +11 -0
- data/lib/coss/types/sms_status.rb +17 -0
- data/lib/coss/types/sms_suppression.rb +19 -0
- data/lib/coss/types/sms_suppression_check.rb +15 -0
- data/lib/coss/types/sms_suppression_check_object.rb +11 -0
- data/lib/coss/types/sms_suppression_check_suppression.rb +19 -0
- data/lib/coss/types/sms_suppression_check_suppression_object.rb +11 -0
- data/lib/coss/types/sms_suppression_check_suppression_reason.rb +13 -0
- data/lib/coss/types/sms_suppression_list.rb +13 -0
- data/lib/coss/types/sms_suppression_list_object.rb +11 -0
- data/lib/coss/types/sms_suppression_object.rb +11 -0
- data/lib/coss/types/sms_suppression_reason.rb +13 -0
- data/lib/coss/types/sms_tags_item.rb +11 -0
- data/lib/coss/types/sms_webhook_event.rb +19 -0
- data/lib/coss/types/sms_webhook_event_data.rb +29 -0
- data/lib/coss/types/sms_webhook_event_data_failure.rb +12 -0
- data/lib/coss/types/sms_webhook_event_data_suppression.rb +12 -0
- data/lib/coss/types/sms_webhook_event_data_suppression_reason.rb +13 -0
- data/lib/coss/types/sms_webhook_event_data_tags_item.rb +11 -0
- data/lib/coss/types/sms_webhook_event_object.rb +11 -0
- data/lib/coss/types/sms_webhook_event_type.rb +17 -0
- data/lib/coss/types/storage_settings.rb +15 -0
- data/lib/coss/types/storage_settings_content_storage.rb +12 -0
- data/lib/coss/types/storage_settings_object.rb +11 -0
- data/lib/coss/types/suppression.rb +21 -0
- data/lib/coss/types/suppression_check.rb +15 -0
- data/lib/coss/types/suppression_check_object.rb +11 -0
- data/lib/coss/types/suppression_import.rb +15 -0
- data/lib/coss/types/suppression_import_invalid_item.rb +13 -0
- data/lib/coss/types/suppression_import_object.rb +11 -0
- data/lib/coss/types/suppression_list.rb +13 -0
- data/lib/coss/types/suppression_list_object.rb +11 -0
- data/lib/coss/types/suppression_object.rb +11 -0
- data/lib/coss/types/suppression_reason.rb +15 -0
- data/lib/coss/types/template_content.rb +15 -0
- data/lib/coss/types/template_content_input.rb +15 -0
- data/lib/coss/types/template_problem.rb +17 -0
- data/lib/coss/types/template_problem_field.rb +13 -0
- data/lib/coss/types/template_variable.rb +19 -0
- data/lib/coss/types/template_variable_default.rb +15 -0
- data/lib/coss/types/template_variable_fields_item.rb +13 -0
- data/lib/coss/types/template_variable_fields_item_type.rb +13 -0
- data/lib/coss/types/template_variable_input.rb +19 -0
- data/lib/coss/types/template_variable_input_default.rb +16 -0
- data/lib/coss/types/template_variable_input_fields_item.rb +13 -0
- data/lib/coss/types/template_variable_input_fields_item_type.rb +13 -0
- data/lib/coss/types/template_variable_input_type.rb +14 -0
- data/lib/coss/types/template_variable_type.rb +14 -0
- data/lib/coss/types/topic.rb +27 -0
- data/lib/coss/types/topic_default_subscription.rb +12 -0
- data/lib/coss/types/topic_list.rb +13 -0
- data/lib/coss/types/topic_list_object.rb +11 -0
- data/lib/coss/types/topic_object.rb +11 -0
- data/lib/coss/types/topic_visibility.rb +12 -0
- data/lib/coss/types/tracking_domain.rb +25 -0
- data/lib/coss/types/tracking_domain_record.rb +18 -0
- data/lib/coss/types/tracking_domain_record_status.rb +14 -0
- data/lib/coss/types/tracking_domain_record_type.rb +11 -0
- data/lib/coss/types/tracking_domain_status.rb +15 -0
- data/lib/coss/types/tracking_options.rb +15 -0
- data/lib/coss/types/tracking_rule.rb +25 -0
- data/lib/coss/types/tracking_rule_object.rb +11 -0
- data/lib/coss/types/tracking_settings.rb +16 -0
- data/lib/coss/types/tracking_settings_object.rb +11 -0
- data/lib/coss/types/update_tracking_rule_request.rb +15 -0
- data/lib/coss/types/usage.rb +27 -0
- data/lib/coss/types/usage_list.rb +13 -0
- data/lib/coss/types/usage_list_object.rb +11 -0
- data/lib/coss/types/usage_meter.rb +18 -0
- data/lib/coss/types/usage_object.rb +11 -0
- data/lib/coss/types/webhook_attempt.rb +21 -0
- data/lib/coss/types/webhook_attempt_object.rb +11 -0
- data/lib/coss/types/webhook_delivery.rb +35 -0
- data/lib/coss/types/webhook_delivery_list.rb +13 -0
- data/lib/coss/types/webhook_delivery_list_object.rb +11 -0
- data/lib/coss/types/webhook_delivery_object.rb +11 -0
- data/lib/coss/types/webhook_delivery_status.rb +13 -0
- data/lib/coss/types/webhook_endpoint.rb +33 -0
- data/lib/coss/types/webhook_endpoint_disabled_reason.rb +12 -0
- data/lib/coss/types/webhook_endpoint_list.rb +13 -0
- data/lib/coss/types/webhook_endpoint_list_object.rb +11 -0
- data/lib/coss/types/webhook_endpoint_object.rb +11 -0
- data/lib/coss/types/webhook_endpoint_recovery.rb +15 -0
- data/lib/coss/types/webhook_endpoint_recovery_object.rb +11 -0
- data/lib/coss/types/webhook_endpoint_with_secret.rb +35 -0
- data/lib/coss/types/webhook_endpoint_with_secret_disabled_reason.rb +12 -0
- data/lib/coss/types/webhook_endpoint_with_secret_object.rb +11 -0
- data/lib/coss/types/webhook_listener.rb +21 -0
- data/lib/coss/types/webhook_listener_ack.rb +17 -0
- data/lib/coss/types/webhook_listener_delivery.rb +23 -0
- data/lib/coss/types/webhook_listener_delivery_object.rb +11 -0
- data/lib/coss/types/webhook_listener_object.rb +11 -0
- data/lib/coss/types/webhook_listener_poll.rb +15 -0
- data/lib/coss/types/webhook_listener_poll_object.rb +11 -0
- data/lib/coss/types/webhook_test_event.rb +15 -0
- data/lib/coss/types/webhook_test_event_event.rb +26 -0
- data/lib/coss/types/webhook_test_event_object.rb +11 -0
- data/lib/coss/version.rb +5 -0
- data/lib/coss/webhook_endpoints/client.rb +325 -0
- data/lib/coss/webhook_endpoints/deliveries/client.rb +153 -0
- data/lib/coss/webhook_endpoints/deliveries/types/get_deliveries_request.rb +15 -0
- data/lib/coss/webhook_endpoints/deliveries/types/list_deliveries_request.rb +21 -0
- data/lib/coss/webhook_endpoints/deliveries/types/list_deliveries_request_status.rb +17 -0
- data/lib/coss/webhook_endpoints/deliveries/types/retry_deliveries_request.rb +15 -0
- data/lib/coss/webhook_endpoints/types/create_webhook_endpoint_request.rb +17 -0
- data/lib/coss/webhook_endpoints/types/create_webhook_endpoint_request_api_version.rb +13 -0
- data/lib/coss/webhook_endpoints/types/create_webhook_endpoint_request_event_types_item.rb +68 -0
- data/lib/coss/webhook_endpoints/types/delete_webhook_endpoints_request.rb +11 -0
- data/lib/coss/webhook_endpoints/types/get_webhook_endpoints_request.rb +11 -0
- data/lib/coss/webhook_endpoints/types/recover_webhook_endpoint_request.rb +13 -0
- data/lib/coss/webhook_endpoints/types/roll_webhook_endpoint_secret_request.rb +13 -0
- data/lib/coss/webhook_endpoints/types/update_webhook_endpoint_request.rb +21 -0
- data/lib/coss/webhook_endpoints/types/update_webhook_endpoint_request_api_version.rb +13 -0
- data/lib/coss/webhook_endpoints/types/update_webhook_endpoint_request_event_types_item.rb +68 -0
- data/lib/coss/webhook_events/client.rb +63 -0
- data/lib/coss/webhook_events/types/create_test_webhook_event_request.rb +13 -0
- data/lib/coss/webhook_events/types/create_test_webhook_event_request_type.rb +68 -0
- data/lib/coss/webhook_listeners/client.rb +157 -0
- data/lib/coss/webhook_listeners/types/create_webhook_listener_request.rb +15 -0
- data/lib/coss/webhook_listeners/types/create_webhook_listener_request_api_version.rb +13 -0
- data/lib/coss/webhook_listeners/types/create_webhook_listener_request_event_types_item.rb +68 -0
- data/lib/coss/webhook_listeners/types/delete_webhook_listeners_request.rb +11 -0
- data/lib/coss/webhook_listeners/types/poll_webhook_listener_request.rb +17 -0
- data/lib/coss/webhooks.rb +98 -0
- data/lib/coss.rb +1050 -0
- data/reference.md +15152 -0
- metadata +1097 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Coss
|
|
4
|
+
module Internal
|
|
5
|
+
module Types
|
|
6
|
+
class Model
|
|
7
|
+
# Definition of a field on a model
|
|
8
|
+
class Field
|
|
9
|
+
SENSITIVE_FIELD_NAMES = %i[
|
|
10
|
+
password secret token api_key apikey access_token refresh_token
|
|
11
|
+
client_secret client_id credential bearer authorization
|
|
12
|
+
].freeze
|
|
13
|
+
|
|
14
|
+
attr_reader :name, :type, :optional, :nullable, :api_name, :value, :default
|
|
15
|
+
|
|
16
|
+
def initialize(name:, type:, optional: false, nullable: false, api_name: nil, value: nil, default: nil)
|
|
17
|
+
@name = name.to_sym
|
|
18
|
+
@type = type
|
|
19
|
+
@optional = optional
|
|
20
|
+
@nullable = nullable
|
|
21
|
+
@api_name = api_name || name.to_s
|
|
22
|
+
@value = value
|
|
23
|
+
@default = default
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def literal?
|
|
27
|
+
!value.nil?
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def sensitive?
|
|
31
|
+
SENSITIVE_FIELD_NAMES.include?(@name) ||
|
|
32
|
+
SENSITIVE_FIELD_NAMES.any? { |sensitive| @name.to_s.include?(sensitive.to_s) }
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Coss
|
|
4
|
+
module Internal
|
|
5
|
+
module Types
|
|
6
|
+
# @abstract
|
|
7
|
+
#
|
|
8
|
+
# An abstract model that all data objects will inherit from
|
|
9
|
+
class Model
|
|
10
|
+
include Type
|
|
11
|
+
|
|
12
|
+
class << self
|
|
13
|
+
# The defined fields for this model
|
|
14
|
+
#
|
|
15
|
+
# @api private
|
|
16
|
+
#
|
|
17
|
+
# @return [Hash<Symbol, Field>]
|
|
18
|
+
def fields
|
|
19
|
+
@fields ||= if self < Coss::Internal::Types::Model
|
|
20
|
+
superclass.fields.dup
|
|
21
|
+
else
|
|
22
|
+
{}
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Any extra fields that have been created from instantiation
|
|
27
|
+
#
|
|
28
|
+
# @api private
|
|
29
|
+
#
|
|
30
|
+
# @return [Hash<Symbol, Field>]
|
|
31
|
+
def extra_fields
|
|
32
|
+
@extra_fields ||= {}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Define a new field on this model
|
|
36
|
+
#
|
|
37
|
+
# @param name [Symbol] The name of the field
|
|
38
|
+
# @param type [Class] Type of the field
|
|
39
|
+
# @option optional [Boolean] If it is an optional field
|
|
40
|
+
# @option nullable [Boolean] If it is a nullable field
|
|
41
|
+
# @option api_name [Symbol, String] Name in the API of this field. When serializing/deserializing, will use
|
|
42
|
+
# this field name
|
|
43
|
+
# @return [void]
|
|
44
|
+
def field(name, type, optional: false, nullable: false, api_name: nil, default: nil)
|
|
45
|
+
add_field_definition(name: name, type: type, optional: optional, nullable: nullable, api_name: api_name,
|
|
46
|
+
default: default)
|
|
47
|
+
|
|
48
|
+
define_accessor(name)
|
|
49
|
+
define_setter(name)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Define a new literal for this model
|
|
53
|
+
#
|
|
54
|
+
# @param name [Symbol]
|
|
55
|
+
# @param value [Object]
|
|
56
|
+
# @option api_name [Symbol, String]
|
|
57
|
+
# @return [void]
|
|
58
|
+
def literal(name, value, api_name: nil)
|
|
59
|
+
add_field_definition(name: name, type: value.class, optional: false, nullable: false, api_name: api_name,
|
|
60
|
+
value: value)
|
|
61
|
+
|
|
62
|
+
define_accessor(name)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Adds a new field definition into the class's fields registry
|
|
66
|
+
#
|
|
67
|
+
# @api private
|
|
68
|
+
#
|
|
69
|
+
# @param name [Symbol]
|
|
70
|
+
# @param type [Class]
|
|
71
|
+
# @option optional [Boolean]
|
|
72
|
+
# @return [void]
|
|
73
|
+
private def add_field_definition(name:, type:, optional:, nullable:, api_name:, default: nil, value: nil)
|
|
74
|
+
fields[name.to_sym] =
|
|
75
|
+
Field.new(name: name, type: type, optional: optional, nullable: nullable, api_name: api_name,
|
|
76
|
+
value: value, default: default)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Adds a new field definition into the class's extra fields registry
|
|
80
|
+
#
|
|
81
|
+
# @api private
|
|
82
|
+
#
|
|
83
|
+
# @param name [Symbol]
|
|
84
|
+
# @param type [Class]
|
|
85
|
+
# @option required [Boolean]
|
|
86
|
+
# @option optional [Boolean]
|
|
87
|
+
# @return [void]
|
|
88
|
+
def add_extra_field_definition(name:, type:)
|
|
89
|
+
return if extra_fields.key?(name.to_sym)
|
|
90
|
+
|
|
91
|
+
extra_fields[name.to_sym] = Field.new(name: name, type: type, optional: true, nullable: false)
|
|
92
|
+
|
|
93
|
+
define_accessor(name)
|
|
94
|
+
define_setter(name)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @api private
|
|
98
|
+
private def define_accessor(name)
|
|
99
|
+
method_name = name.to_sym
|
|
100
|
+
|
|
101
|
+
define_method(method_name) do
|
|
102
|
+
@data[name]
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @api private
|
|
107
|
+
private def define_setter(name)
|
|
108
|
+
method_name = :"#{name}="
|
|
109
|
+
|
|
110
|
+
define_method(method_name) do |val|
|
|
111
|
+
@data[name] = val
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def coerce(value, strict: (respond_to?(:strict?) ? strict? : false)) # rubocop:disable Lint/UnusedMethodArgument
|
|
116
|
+
return value if value.is_a?(self)
|
|
117
|
+
|
|
118
|
+
return value unless value.is_a?(::Hash)
|
|
119
|
+
|
|
120
|
+
new(value)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def load(str)
|
|
124
|
+
coerce(::JSON.parse(str, symbolize_names: true))
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
def ===(instance)
|
|
128
|
+
instance.class.ancestors.include?(self)
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Creates a new instance of this model
|
|
133
|
+
# TODO: Should all this logic be in `#coerce` instead?
|
|
134
|
+
#
|
|
135
|
+
# @param values [Hash]
|
|
136
|
+
# @option strict [Boolean]
|
|
137
|
+
# @return [self]
|
|
138
|
+
def initialize(values = {})
|
|
139
|
+
@data = {}
|
|
140
|
+
@given = []
|
|
141
|
+
|
|
142
|
+
values = Utils.symbolize_keys(values.dup)
|
|
143
|
+
|
|
144
|
+
self.class.fields.each do |field_name, field|
|
|
145
|
+
value = nil
|
|
146
|
+
[field.api_name.to_sym, field_name].uniq.each do |key|
|
|
147
|
+
next unless values.key?(key)
|
|
148
|
+
|
|
149
|
+
candidate = values.delete(key)
|
|
150
|
+
@given << field_name
|
|
151
|
+
value = candidate if value.nil?
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
field_value = if !value.nil?
|
|
155
|
+
value
|
|
156
|
+
elsif field.literal?
|
|
157
|
+
field.value
|
|
158
|
+
elsif !field.default.nil?
|
|
159
|
+
field.default
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@data[field_name] = Utils.coerce(field.type, field_value)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Any remaining values in the input become extra fields
|
|
166
|
+
values.each do |name, value|
|
|
167
|
+
self.class.add_extra_field_definition(name: name, type: value.class)
|
|
168
|
+
|
|
169
|
+
@data[name.to_sym] = value
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
def to_h
|
|
174
|
+
result = self.class.fields.merge(self.class.extra_fields).each_with_object({}) do |(name, field), acc|
|
|
175
|
+
# If there is a value present in the data, use that value
|
|
176
|
+
# If there is a `nil` value present in the data, and it is optional but NOT nullable, exclude key altogether
|
|
177
|
+
# If there is a `nil` value present in the data, and it is optional and nullable, use the nil value
|
|
178
|
+
|
|
179
|
+
value = @data[name]
|
|
180
|
+
|
|
181
|
+
next if value.nil? && field.optional && !field.nullable && !@given&.include?(name)
|
|
182
|
+
|
|
183
|
+
if value.is_a?(::Array)
|
|
184
|
+
value = value.map { |item| item.respond_to?(:to_h) ? item.to_h : item }
|
|
185
|
+
elsif !value.nil? && value.respond_to?(:to_h)
|
|
186
|
+
value = value.to_h
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
acc[field.api_name] = value
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Inject union discriminant if this instance was coerced from a discriminated union
|
|
193
|
+
# and the discriminant key is not already present in the result
|
|
194
|
+
discriminant_key = instance_variable_get(:@_fern_union_discriminant_key)
|
|
195
|
+
discriminant_value = instance_variable_get(:@_fern_union_discriminant_value)
|
|
196
|
+
result[discriminant_key] = discriminant_value if discriminant_key && discriminant_value && !result.key?(discriminant_key)
|
|
197
|
+
|
|
198
|
+
result
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
def ==(other)
|
|
202
|
+
self.class == other.class && to_h == other.to_h
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# @return [String]
|
|
206
|
+
def inspect
|
|
207
|
+
attrs = @data.map do |name, value|
|
|
208
|
+
field = self.class.fields[name] || self.class.extra_fields[name]
|
|
209
|
+
display_value = field&.sensitive? ? "[REDACTED]" : value.inspect
|
|
210
|
+
"#{name}=#{display_value}"
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
"#<#{self.class.name}:0x#{object_id&.to_s(16)} #{attrs.join(" ")}>"
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Coss
|
|
4
|
+
module Internal
|
|
5
|
+
module Types
|
|
6
|
+
# @abstract
|
|
7
|
+
module Type
|
|
8
|
+
include Coss::Internal::JSON::Serializable
|
|
9
|
+
|
|
10
|
+
# Coerces a value to this type
|
|
11
|
+
#
|
|
12
|
+
# @param value [unknown]
|
|
13
|
+
# @option strict [Boolean] If we should strictly coerce this value
|
|
14
|
+
def coerce(value, strict: strict?)
|
|
15
|
+
raise NotImplementedError
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Returns if strictness is on for this type, defaults to `false`
|
|
19
|
+
#
|
|
20
|
+
# @return [Boolean]
|
|
21
|
+
def strict?
|
|
22
|
+
@strict ||= false
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Enable strictness by default for this type
|
|
26
|
+
#
|
|
27
|
+
# @return [void]
|
|
28
|
+
def strict!
|
|
29
|
+
@strict = true
|
|
30
|
+
self
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Coss
|
|
4
|
+
module Internal
|
|
5
|
+
module Types
|
|
6
|
+
# Define a union between two types
|
|
7
|
+
module Union
|
|
8
|
+
include Coss::Internal::Types::Type
|
|
9
|
+
|
|
10
|
+
def members
|
|
11
|
+
@members ||= []
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Add a member to this union
|
|
15
|
+
#
|
|
16
|
+
# @param type [Object]
|
|
17
|
+
# @option key [Symbol, String]
|
|
18
|
+
# @return [void]
|
|
19
|
+
def member(type, key: nil)
|
|
20
|
+
members.push([key, Utils.wrap_type(type)])
|
|
21
|
+
self
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def type_member?(type)
|
|
25
|
+
members.any? { |_key, type_fn| type == type_fn.call }
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Set the discriminant for this union
|
|
29
|
+
#
|
|
30
|
+
# @param key [Symbol, String]
|
|
31
|
+
# @return [void]
|
|
32
|
+
def discriminant(key)
|
|
33
|
+
@discriminant = key
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @api private
|
|
37
|
+
private def discriminated?
|
|
38
|
+
!@discriminant.nil?
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Check if value matches a type, handling type wrapper instances
|
|
42
|
+
# (Internal::Types::Hash and Internal::Types::Array instances)
|
|
43
|
+
#
|
|
44
|
+
# @param value [Object]
|
|
45
|
+
# @param member_type [Object]
|
|
46
|
+
# @return [Boolean]
|
|
47
|
+
private def type_matches?(value, member_type)
|
|
48
|
+
case member_type
|
|
49
|
+
when Coss::Internal::Types::Hash
|
|
50
|
+
value.is_a?(::Hash)
|
|
51
|
+
when Coss::Internal::Types::Array
|
|
52
|
+
value.is_a?(::Array)
|
|
53
|
+
when Class, Module
|
|
54
|
+
value.is_a?(member_type)
|
|
55
|
+
else
|
|
56
|
+
false
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Resolves the type of a value to be one of the members
|
|
61
|
+
#
|
|
62
|
+
# @param value [Object]
|
|
63
|
+
# @return [Class]
|
|
64
|
+
private def resolve_member(value)
|
|
65
|
+
if discriminated? && value.is_a?(::Hash)
|
|
66
|
+
# Try both symbol and string keys for the discriminant
|
|
67
|
+
discriminant_value = value.fetch(@discriminant, nil) || value.fetch(@discriminant.to_s, nil)
|
|
68
|
+
|
|
69
|
+
return if discriminant_value.nil?
|
|
70
|
+
|
|
71
|
+
# Convert to string for consistent comparison
|
|
72
|
+
discriminant_str = discriminant_value.to_s
|
|
73
|
+
|
|
74
|
+
# First try exact match
|
|
75
|
+
members_hash = members.to_h
|
|
76
|
+
result = members_hash[discriminant_str]&.call
|
|
77
|
+
return result if result
|
|
78
|
+
|
|
79
|
+
# Try case-insensitive match as fallback
|
|
80
|
+
discriminant_lower = discriminant_str.downcase
|
|
81
|
+
matching_keys = members_hash.keys.select { |k| k.to_s.downcase == discriminant_lower }
|
|
82
|
+
|
|
83
|
+
# Only use case-insensitive match if exactly one key matches (avoid ambiguity)
|
|
84
|
+
return members_hash[matching_keys.first]&.call if matching_keys.length == 1
|
|
85
|
+
|
|
86
|
+
nil
|
|
87
|
+
else
|
|
88
|
+
# First try exact type matching
|
|
89
|
+
result = members.find do |_key, mem|
|
|
90
|
+
member_type = Utils.unwrap_type(mem)
|
|
91
|
+
type_matches?(value, member_type)
|
|
92
|
+
end&.last&.call
|
|
93
|
+
|
|
94
|
+
return result if result
|
|
95
|
+
|
|
96
|
+
# For Hash values, try to coerce into Model member types
|
|
97
|
+
if value.is_a?(::Hash)
|
|
98
|
+
members.find do |_key, mem|
|
|
99
|
+
member_type = Utils.unwrap_type(mem)
|
|
100
|
+
# Check if member_type is a Model class
|
|
101
|
+
next unless member_type.is_a?(Class) && member_type <= Model
|
|
102
|
+
|
|
103
|
+
# Try to coerce the hash into this model type with strict mode
|
|
104
|
+
begin
|
|
105
|
+
candidate = Utils.coerce(member_type, value, strict: true)
|
|
106
|
+
|
|
107
|
+
# Validate that all required (non-optional) fields are present
|
|
108
|
+
# This ensures undiscriminated unions properly distinguish between member types
|
|
109
|
+
member_type.fields.each do |field_name, field|
|
|
110
|
+
raise Errors::TypeError, "Required field `#{field_name}` missing for union member #{member_type.name}" if candidate.instance_variable_get(:@data)[field_name].nil? && !field.optional
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
true
|
|
114
|
+
rescue Errors::TypeError
|
|
115
|
+
false
|
|
116
|
+
end
|
|
117
|
+
end&.last&.call
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def coerce(value, strict: strict?)
|
|
123
|
+
type = resolve_member(value)
|
|
124
|
+
|
|
125
|
+
unless type
|
|
126
|
+
return value unless strict
|
|
127
|
+
|
|
128
|
+
if discriminated?
|
|
129
|
+
raise Errors::TypeError,
|
|
130
|
+
"value of type `#{value.class}` not member of union #{self}"
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
raise Errors::TypeError, "could not resolve to member of union #{self}"
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
coerced = Utils.coerce(type, value, strict: strict)
|
|
137
|
+
|
|
138
|
+
# For discriminated unions, store the discriminant info on the coerced instance
|
|
139
|
+
# so it can be injected back during serialization (to_h)
|
|
140
|
+
if discriminated? && value.is_a?(::Hash) && coerced.is_a?(Model)
|
|
141
|
+
discriminant_value = value.fetch(@discriminant, nil) || value.fetch(@discriminant.to_s, nil)
|
|
142
|
+
if discriminant_value
|
|
143
|
+
coerced.instance_variable_set(:@_fern_union_discriminant_key, @discriminant.to_s)
|
|
144
|
+
coerced.instance_variable_set(:@_fern_union_discriminant_value, discriminant_value)
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
coerced
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Parse JSON string and coerce to the correct union member type
|
|
152
|
+
#
|
|
153
|
+
# @param str [String] JSON string to parse
|
|
154
|
+
# @return [Object] Coerced value matching a union member
|
|
155
|
+
def load(str)
|
|
156
|
+
coerce(::JSON.parse(str, symbolize_names: true))
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Coss
|
|
4
|
+
module Internal
|
|
5
|
+
module Types
|
|
6
|
+
# Utilities for dealing with and checking types
|
|
7
|
+
module Utils
|
|
8
|
+
# Wraps a type into a type function
|
|
9
|
+
#
|
|
10
|
+
# @param type [Proc, Object]
|
|
11
|
+
# @return [Proc]
|
|
12
|
+
def self.wrap_type(type)
|
|
13
|
+
case type
|
|
14
|
+
when Proc
|
|
15
|
+
type
|
|
16
|
+
else
|
|
17
|
+
-> { type }
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Resolves a type or type function into a type
|
|
22
|
+
#
|
|
23
|
+
# @param type [Proc, Object]
|
|
24
|
+
# @return [Object]
|
|
25
|
+
def self.unwrap_type(type)
|
|
26
|
+
type.is_a?(Proc) ? type.call : type
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.coerce(target, value, strict: false)
|
|
30
|
+
type = unwrap_type(target)
|
|
31
|
+
|
|
32
|
+
case type
|
|
33
|
+
in Array
|
|
34
|
+
case value
|
|
35
|
+
when ::Array
|
|
36
|
+
return type.coerce(value, strict: strict)
|
|
37
|
+
when Set, ::Hash
|
|
38
|
+
return coerce(type, value.to_a)
|
|
39
|
+
end
|
|
40
|
+
in Hash
|
|
41
|
+
case value
|
|
42
|
+
when ::Hash
|
|
43
|
+
return type.coerce(value, strict: strict)
|
|
44
|
+
when ::Array
|
|
45
|
+
return coerce(type, value.to_h)
|
|
46
|
+
end
|
|
47
|
+
in ->(t) { t <= NilClass }
|
|
48
|
+
return nil
|
|
49
|
+
in ->(t) { t <= String }
|
|
50
|
+
case value
|
|
51
|
+
when String, Symbol, Numeric, TrueClass, FalseClass
|
|
52
|
+
return value.to_s
|
|
53
|
+
end
|
|
54
|
+
in ->(t) { t <= Symbol }
|
|
55
|
+
case value
|
|
56
|
+
when Symbol, String
|
|
57
|
+
return value.to_sym
|
|
58
|
+
end
|
|
59
|
+
in ->(t) { t <= Integer }
|
|
60
|
+
case value
|
|
61
|
+
when Numeric, String, Time
|
|
62
|
+
return value.to_i
|
|
63
|
+
end
|
|
64
|
+
in ->(t) { t <= Float }
|
|
65
|
+
case value
|
|
66
|
+
when Numeric, Time, String
|
|
67
|
+
return value.to_f
|
|
68
|
+
end
|
|
69
|
+
in ->(t) { t <= Model }
|
|
70
|
+
case value
|
|
71
|
+
when type
|
|
72
|
+
return value
|
|
73
|
+
when ::Hash
|
|
74
|
+
return type.coerce(value, strict: strict)
|
|
75
|
+
end
|
|
76
|
+
in Module
|
|
77
|
+
case type
|
|
78
|
+
in ->(t) {
|
|
79
|
+
t.singleton_class.included_modules.include?(Enum) ||
|
|
80
|
+
t.singleton_class.included_modules.include?(Union)
|
|
81
|
+
}
|
|
82
|
+
return type.coerce(value, strict: strict)
|
|
83
|
+
else
|
|
84
|
+
value # rubocop:disable Lint/Void
|
|
85
|
+
end
|
|
86
|
+
else
|
|
87
|
+
value # rubocop:disable Lint/Void
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
raise Errors::TypeError, "cannot coerce value of type `#{value.class}` to `#{target}`" if strict
|
|
91
|
+
|
|
92
|
+
value
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def self.symbolize_keys(hash)
|
|
96
|
+
hash.transform_keys(&:to_sym)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Converts camelCase keys to snake_case symbols
|
|
100
|
+
# This allows SDK methods to accept both snake_case and camelCase keys
|
|
101
|
+
# e.g., { refundMethod: ... } becomes { refund_method: ... }
|
|
102
|
+
#
|
|
103
|
+
# @param hash [Hash]
|
|
104
|
+
# @return [Hash]
|
|
105
|
+
def self.normalize_keys(hash)
|
|
106
|
+
hash.transform_keys do |key|
|
|
107
|
+
key_str = key.to_s
|
|
108
|
+
# Convert camelCase to snake_case
|
|
109
|
+
snake_case = key_str.gsub(/([a-z\d])([A-Z])/, '\1_\2').downcase
|
|
110
|
+
snake_case.to_sym
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Coss
|
|
4
|
+
module LogDrains
|
|
5
|
+
module Batches
|
|
6
|
+
class Client
|
|
7
|
+
# @param client [Coss::Internal::Http::RawClient]
|
|
8
|
+
#
|
|
9
|
+
# @return [void]
|
|
10
|
+
def initialize(client:)
|
|
11
|
+
@client = client
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The drain's delivery log, newest first: one batch per NDJSON request, with every HTTP attempt. A failing batch
|
|
15
|
+
# is retried with backoff for about a day (10 attempts); if every attempt fails, the drain is disabled. Pass the
|
|
16
|
+
# last `id` as `after` to get the next page while `has_more` is true.
|
|
17
|
+
#
|
|
18
|
+
# @param request_options [Hash]
|
|
19
|
+
# @param params [Hash]
|
|
20
|
+
# @option request_options [String] :base_url
|
|
21
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
22
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
23
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
24
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
25
|
+
# @option params [String] :id
|
|
26
|
+
# @option params [Coss::LogDrains::Batches::Types::ListBatchesRequestStatus, nil] :status
|
|
27
|
+
# @option params [Integer, nil] :limit
|
|
28
|
+
# @option params [String, nil] :after
|
|
29
|
+
#
|
|
30
|
+
# @example
|
|
31
|
+
# client.log_drains.batches.list(id: "drain_01k7c8m4q2f3e9v6t5r1n0p8yz")
|
|
32
|
+
#
|
|
33
|
+
# @return [Coss::Types::LogDrainBatchList]
|
|
34
|
+
def list(request_options: {}, **params)
|
|
35
|
+
params = Coss::Internal::Types::Utils.normalize_keys(params)
|
|
36
|
+
query_params = {}
|
|
37
|
+
query_params["status"] = params[:status] if params.key?(:status)
|
|
38
|
+
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
39
|
+
query_params["after"] = params[:after] if params.key?(:after)
|
|
40
|
+
|
|
41
|
+
request = Coss::Internal::JSON::Request.new(
|
|
42
|
+
base_url: request_options[:base_url],
|
|
43
|
+
method: "GET",
|
|
44
|
+
path: "v1/log_drains/#{URI.encode_uri_component(params[:id].to_s)}/batches",
|
|
45
|
+
query: query_params,
|
|
46
|
+
request_options: request_options
|
|
47
|
+
)
|
|
48
|
+
begin
|
|
49
|
+
response = @client.send(request)
|
|
50
|
+
rescue Net::HTTPRequestTimeout
|
|
51
|
+
raise Coss::Errors::TimeoutError
|
|
52
|
+
end
|
|
53
|
+
code = response.code.to_i
|
|
54
|
+
if code.between?(200, 299)
|
|
55
|
+
(response.body.to_s.empty? ? nil : Coss::Types::LogDrainBatchList.load(response.body))
|
|
56
|
+
else
|
|
57
|
+
error_class = Coss::Errors::ResponseError.subclass_for_code(code)
|
|
58
|
+
raise error_class.new(response.body, code: code)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# One batch of the drain, with every HTTP attempt.
|
|
63
|
+
#
|
|
64
|
+
# @param request_options [Hash]
|
|
65
|
+
# @param params [Hash]
|
|
66
|
+
# @option request_options [String] :base_url
|
|
67
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
68
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
69
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
70
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
71
|
+
# @option params [String] :id
|
|
72
|
+
# @option params [String] :batch_id
|
|
73
|
+
#
|
|
74
|
+
# @example
|
|
75
|
+
# client.log_drains.batches.get(
|
|
76
|
+
# id: "drain_01k7c8m4q2f3e9v6t5r1n0p8yz",
|
|
77
|
+
# batch_id: "drainbat_01k7c8n2b5d7f9h1k3m5p7r9tv"
|
|
78
|
+
# )
|
|
79
|
+
#
|
|
80
|
+
# @return [Coss::Types::LogDrainBatch]
|
|
81
|
+
def get(request_options: {}, **params)
|
|
82
|
+
params = Coss::Internal::Types::Utils.normalize_keys(params)
|
|
83
|
+
request = Coss::Internal::JSON::Request.new(
|
|
84
|
+
base_url: request_options[:base_url],
|
|
85
|
+
method: "GET",
|
|
86
|
+
path: "v1/log_drains/#{URI.encode_uri_component(params[:id].to_s)}/batches/#{URI.encode_uri_component(params[:batch_id].to_s)}",
|
|
87
|
+
request_options: request_options
|
|
88
|
+
)
|
|
89
|
+
begin
|
|
90
|
+
response = @client.send(request)
|
|
91
|
+
rescue Net::HTTPRequestTimeout
|
|
92
|
+
raise Coss::Errors::TimeoutError
|
|
93
|
+
end
|
|
94
|
+
code = response.code.to_i
|
|
95
|
+
if code.between?(200, 299)
|
|
96
|
+
(response.body.to_s.empty? ? nil : Coss::Types::LogDrainBatch.load(response.body))
|
|
97
|
+
else
|
|
98
|
+
error_class = Coss::Errors::ResponseError.subclass_for_code(code)
|
|
99
|
+
raise error_class.new(response.body, code: code)
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|