ezero-apimatic-sdk 0.0.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 +7 -0
- data/LICENSE +28 -0
- data/README.md +180 -0
- data/bin/console +15 -0
- data/lib/env_zero_api/api_helper.rb +10 -0
- data/lib/env_zero_api/apis/approval_policy_api.rb +107 -0
- data/lib/env_zero_api/apis/base_api.rb +67 -0
- data/lib/env_zero_api/apis/bulk_operations_api.rb +297 -0
- data/lib/env_zero_api/apis/configuration_api.rb +311 -0
- data/lib/env_zero_api/apis/credentials_api.rb +72 -0
- data/lib/env_zero_api/apis/deployment_logs_api.rb +79 -0
- data/lib/env_zero_api/apis/drift_api.rb +201 -0
- data/lib/env_zero_api/apis/environment_outputs_api.rb +39 -0
- data/lib/env_zero_api/apis/environments_api.rb +1082 -0
- data/lib/env_zero_api/apis/notifications_api.rb +149 -0
- data/lib/env_zero_api/apis/organization_api.rb +132 -0
- data/lib/env_zero_api/apis/projects_api.rb +202 -0
- data/lib/env_zero_api/apis/scheduling_api.rb +175 -0
- data/lib/env_zero_api/apis/templates_api.rb +206 -0
- data/lib/env_zero_api/client.rb +145 -0
- data/lib/env_zero_api/configuration.rb +166 -0
- data/lib/env_zero_api/exceptions/api_exception.rb +21 -0
- data/lib/env_zero_api/exceptions/error_exception.rb +46 -0
- data/lib/env_zero_api/http/api_response.rb +19 -0
- data/lib/env_zero_api/http/auth/basic_auth.rb +62 -0
- data/lib/env_zero_api/http/http_call_back.rb +10 -0
- data/lib/env_zero_api/http/http_method_enum.rb +10 -0
- data/lib/env_zero_api/http/http_request.rb +10 -0
- data/lib/env_zero_api/http/http_response.rb +10 -0
- data/lib/env_zero_api/http/proxy_settings.rb +22 -0
- data/lib/env_zero_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/env_zero_api/logging/sdk_logger.rb +17 -0
- data/lib/env_zero_api/models/action.rb +36 -0
- data/lib/env_zero_api/models/action_reason.rb +68 -0
- data/lib/env_zero_api/models/api_key_type.rb +26 -0
- data/lib/env_zero_api/models/api_key_user.rb +150 -0
- data/lib/env_zero_api/models/api_key_user_identity.rb +82 -0
- data/lib/env_zero_api/models/app_metadata.rb +175 -0
- data/lib/env_zero_api/models/app_metadata1.rb +60 -0
- data/lib/env_zero_api/models/approval_policy_type.rb +26 -0
- data/lib/env_zero_api/models/auto_destroy_status.rb +26 -0
- data/lib/env_zero_api/models/auto_destroy_status1.rb +26 -0
- data/lib/env_zero_api/models/auto_destroy_status2.rb +26 -0
- data/lib/env_zero_api/models/auto_destroy_status3.rb +26 -0
- data/lib/env_zero_api/models/base_model.rb +110 -0
- data/lib/env_zero_api/models/blueprint_api_add_blueprint_to_project_request_body.rb +60 -0
- data/lib/env_zero_api/models/blueprint_api_add_blueprint_to_project_response.rb +675 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_assignment.rb +98 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_assignment_request.rb +77 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_scope.rb +44 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_template.rb +375 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_template_with_scope.rb +96 -0
- data/lib/env_zero_api/models/blueprint_api_approval_policy_type.rb +26 -0
- data/lib/env_zero_api/models/blueprint_api_assign_approval_policy_request_body.rb +77 -0
- data/lib/env_zero_api/models/blueprint_api_assign_approval_policy_response.rb +98 -0
- data/lib/env_zero_api/models/blueprint_api_blueprint.rb +675 -0
- data/lib/env_zero_api/models/blueprint_api_blueprint_type.rb +26 -0
- data/lib/env_zero_api/models/blueprint_api_blueprint_type1.rb +26 -0
- data/lib/env_zero_api/models/blueprint_api_create_blueprint_request_body.rb +544 -0
- data/lib/env_zero_api/models/blueprint_api_create_blueprint_response.rb +675 -0
- data/lib/env_zero_api/models/blueprint_api_creation_scope.rb +36 -0
- data/lib/env_zero_api/models/blueprint_api_custom_flow_type.rb +26 -0
- data/lib/env_zero_api/models/blueprint_api_deployable_type.rb +26 -0
- data/lib/env_zero_api/models/blueprint_api_find_all_approval_policies_response.rb +77 -0
- data/lib/env_zero_api/models/blueprint_api_get_blueprint_by_id_response.rb +675 -0
- data/lib/env_zero_api/models/blueprint_api_retry.rb +85 -0
- data/lib/env_zero_api/models/blueprint_api_retry_deploy_or_destroy_config.rb +98 -0
- data/lib/env_zero_api/models/blueprint_api_ssh_key.rb +90 -0
- data/lib/env_zero_api/models/blueprint_api_terragrunt_tf_binary.rb +36 -0
- data/lib/env_zero_api/models/blueprint_api_update_blueprint_request_body.rb +483 -0
- data/lib/env_zero_api/models/blueprint_api_update_blueprint_response.rb +675 -0
- data/lib/env_zero_api/models/bulk_operation_type.rb +72 -0
- data/lib/env_zero_api/models/bulk_operations_api_base_payload.rb +72 -0
- data/lib/env_zero_api/models/bulk_operations_api_base_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_add_tags_request_body.rb +82 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_add_tags_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_archive_request_body.rb +72 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_archive_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_deploy_request_body.rb +80 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_deploy_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_destroy_request_body.rb +80 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_destroy_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_lock_request_body.rb +80 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_lock_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status.rb +26 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status1.rb +26 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status2.rb +26 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_operation_item_status3.rb +26 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_remove_tags_request_body.rb +81 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_remove_tags_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_run_task_request_body.rb +80 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_run_task_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_unlock_request_body.rb +72 -0
- data/lib/env_zero_api/models/bulk_operations_api_bulk_unlock_response.rb +91 -0
- data/lib/env_zero_api/models/bulk_operations_api_get_bulk_operation_item.rb +128 -0
- data/lib/env_zero_api/models/bulk_operations_api_get_bulk_operation_response.rb +106 -0
- data/lib/env_zero_api/models/bulk_operations_api_single_result.rb +79 -0
- data/lib/env_zero_api/models/cause_key_parts.rb +104 -0
- data/lib/env_zero_api/models/cause_key_parts1.rb +74 -0
- data/lib/env_zero_api/models/cause_key_parts2.rb +91 -0
- data/lib/env_zero_api/models/cause_key_parts4.rb +132 -0
- data/lib/env_zero_api/models/cause_key_parts5.rb +92 -0
- data/lib/env_zero_api/models/checkout_updated_code.rb +36 -0
- data/lib/env_zero_api/models/cloud_resource_api_change_event.rb +199 -0
- data/lib/env_zero_api/models/cloud_resource_api_change_event_source.rb +40 -0
- data/lib/env_zero_api/models/cloud_resource_api_management_type.rb +40 -0
- data/lib/env_zero_api/models/configuration_api_create_configuration_set_request_body.rb +108 -0
- data/lib/env_zero_api/models/configuration_api_create_configuration_set_response.rb +200 -0
- data/lib/env_zero_api/models/configuration_api_find_variable_by_id_response.rb +305 -0
- data/lib/env_zero_api/models/configuration_api_find_variables_by_scope_overriding_configuration_property.rb +342 -0
- data/lib/env_zero_api/models/configuration_property_request.rb +284 -0
- data/lib/env_zero_api/models/configuration_property_response.rb +305 -0
- data/lib/env_zero_api/models/configuration_scope.rb +60 -0
- data/lib/env_zero_api/models/configuration_set.rb +200 -0
- data/lib/env_zero_api/models/configuration_set_assignment_scope.rb +52 -0
- data/lib/env_zero_api/models/configuration_type.rb +27 -0
- data/lib/env_zero_api/models/configuration_type1.rb +27 -0
- data/lib/env_zero_api/models/credentials_api_api_key.rb +167 -0
- data/lib/env_zero_api/models/credentials_api_create_api_key_request_body.rb +91 -0
- data/lib/env_zero_api/models/credentials_api_create_api_key_response.rb +167 -0
- data/lib/env_zero_api/models/custom_env0_environment_variables.rb +537 -0
- data/lib/env_zero_api/models/custom_flow_type.rb +26 -0
- data/lib/env_zero_api/models/data.rb +65 -0
- data/lib/env_zero_api/models/data1.rb +73 -0
- data/lib/env_zero_api/models/data2.rb +73 -0
- data/lib/env_zero_api/models/data3.rb +62 -0
- data/lib/env_zero_api/models/data4.rb +61 -0
- data/lib/env_zero_api/models/data5.rb +71 -0
- data/lib/env_zero_api/models/deploy_request.rb +343 -0
- data/lib/env_zero_api/models/deployment_api_plan_attribute_change.rb +94 -0
- data/lib/env_zero_api/models/deployment_api_plan_change_action.rb +48 -0
- data/lib/env_zero_api/models/deployment_api_plan_plan.rb +118 -0
- data/lib/env_zero_api/models/deployment_api_plan_plan_output_change.rb +127 -0
- data/lib/env_zero_api/models/deployment_api_plan_plan_resource_change.rb +240 -0
- data/lib/env_zero_api/models/deployment_api_plan_plan_summary.rb +114 -0
- data/lib/env_zero_api/models/deployment_api_plan_resource_import_data.rb +74 -0
- data/lib/env_zero_api/models/deployment_command.rb +68 -0
- data/lib/env_zero_api/models/deployment_step_api_deployment_step_status.rb +64 -0
- data/lib/env_zero_api/models/deployment_step_api_find_by_deployment_log_id_response.rb +195 -0
- data/lib/env_zero_api/models/deployment_step_api_find_step_log_response.rb +117 -0
- data/lib/env_zero_api/models/deployment_step_api_log_event.rb +131 -0
- data/lib/env_zero_api/models/deployment_type.rb +40 -0
- data/lib/env_zero_api/models/deployment_type1.rb +56 -0
- data/lib/env_zero_api/models/diff.rb +75 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_environment.rb +117 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_group.rb +169 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_group1.rb +169 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_group2.rb +169 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_group4.rb +169 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_group5.rb +169 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_skip.rb +68 -0
- data/lib/env_zero_api/models/drift_api_drift_cause_skip_reason.rb +40 -0
- data/lib/env_zero_api/models/drift_api_get_drift_causes_response.rb +76 -0
- data/lib/env_zero_api/models/drift_api_get_drift_causes_response1.rb +76 -0
- data/lib/env_zero_api/models/drift_api_get_drift_fix_stats_response.rb +81 -0
- data/lib/env_zero_api/models/drift_api_get_drift_fix_stats_response1.rb +81 -0
- data/lib/env_zero_api/models/drift_api_get_ignored_drift_causes_response.rb +76 -0
- data/lib/env_zero_api/models/drift_api_ignore_drift_cause_body.rb +72 -0
- data/lib/env_zero_api/models/drift_api_ignore_drift_cause_request_body.rb +72 -0
- data/lib/env_zero_api/models/drift_api_ignore_drift_cause_response.rb +77 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_environment.rb +140 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group.rb +157 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group1.rb +157 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group2.rb +157 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group4.rb +157 -0
- data/lib/env_zero_api/models/drift_api_ignored_drift_cause_group5.rb +157 -0
- data/lib/env_zero_api/models/drift_api_state_modifying_deployment_type.rb +40 -0
- data/lib/env_zero_api/models/drift_api_un_ignore_drift_cause_request_body.rb +72 -0
- data/lib/env_zero_api/models/drift_api_un_ignore_drift_cause_response.rb +77 -0
- data/lib/env_zero_api/models/drift_api_variable_change_type.rb +40 -0
- data/lib/env_zero_api/models/drift_cause.rb +87 -0
- data/lib/env_zero_api/models/environment_api_auto_drift_remediation_strategy.rb +44 -0
- data/lib/env_zero_api/models/environment_api_cancel_response.rb +60 -0
- data/lib/env_zero_api/models/environment_api_configuration_property_change.rb +255 -0
- data/lib/env_zero_api/models/environment_api_configuration_set_changes.rb +81 -0
- data/lib/env_zero_api/models/environment_api_create_environment_request.rb +356 -0
- data/lib/env_zero_api/models/environment_api_create_request_body.rb +356 -0
- data/lib/env_zero_api/models/environment_api_create_response.rb +539 -0
- data/lib/env_zero_api/models/environment_api_deploy_request_body.rb +343 -0
- data/lib/env_zero_api/models/environment_api_deploy_request_on_create_flow.rb +154 -0
- data/lib/env_zero_api/models/environment_api_deploy_response.rb +796 -0
- data/lib/env_zero_api/models/environment_api_deployment_log.rb +792 -0
- data/lib/env_zero_api/models/environment_api_deployment_log_status.rb +76 -0
- data/lib/env_zero_api/models/environment_api_deployment_type.rb +60 -0
- data/lib/env_zero_api/models/environment_api_destroy_request_body.rb +108 -0
- data/lib/env_zero_api/models/environment_api_destroy_response.rb +60 -0
- data/lib/env_zero_api/models/environment_api_drift_cause_compass_scan_status.rb +48 -0
- data/lib/env_zero_api/models/environment_api_drift_cause_unapplied_commit.rb +111 -0
- data/lib/env_zero_api/models/environment_api_drift_cause_unmanaged_change_type.rb +36 -0
- data/lib/env_zero_api/models/environment_api_drift_detection_request.rb +81 -0
- data/lib/env_zero_api/models/environment_api_drift_status.rb +48 -0
- data/lib/env_zero_api/models/environment_api_environment.rb +539 -0
- data/lib/env_zero_api/models/environment_api_environment_lock_status.rb +119 -0
- data/lib/env_zero_api/models/environment_api_environment_next_scheduled_dates.rb +98 -0
- data/lib/env_zero_api/models/environment_api_environment_resource.rb +123 -0
- data/lib/env_zero_api/models/environment_api_environment_status.rb +84 -0
- data/lib/env_zero_api/models/environment_api_find_by_id_response.rb +539 -0
- data/lib/env_zero_api/models/environment_api_find_deployment_drift_status_response.rb +92 -0
- data/lib/env_zero_api/models/environment_api_find_deployment_log_by_id_response.rb +792 -0
- data/lib/env_zero_api/models/environment_api_get_deployment_plan_json_response.rb +86 -0
- data/lib/env_zero_api/models/environment_api_get_drifted_resource_event_details_response.rb +60 -0
- data/lib/env_zero_api/models/environment_api_get_drifted_resource_events_response.rb +98 -0
- data/lib/env_zero_api/models/environment_api_get_environments_outputs_response.rb +69 -0
- data/lib/env_zero_api/models/environment_api_get_plan_impact_destructive_change.rb +98 -0
- data/lib/env_zero_api/models/environment_api_get_plan_impact_plan_impact.rb +163 -0
- data/lib/env_zero_api/models/environment_api_get_policies_response.rb +298 -0
- data/lib/env_zero_api/models/environment_api_git_metadata.rb +110 -0
- data/lib/env_zero_api/models/environment_api_output_data.rb +103 -0
- data/lib/env_zero_api/models/environment_api_policy.rb +298 -0
- data/lib/env_zero_api/models/environment_api_remediate_drift_response.rb +792 -0
- data/lib/env_zero_api/models/environment_api_resume_response.rb +60 -0
- data/lib/env_zero_api/models/environment_api_reviewer.rb +90 -0
- data/lib/env_zero_api/models/environment_api_reviewer_user.rb +92 -0
- data/lib/env_zero_api/models/environment_api_state_file_hash.rb +87 -0
- data/lib/env_zero_api/models/environment_api_stopped_by_timeout_reason.rb +40 -0
- data/lib/env_zero_api/models/environment_api_terragrunt_run_all_output.rb +96 -0
- data/lib/env_zero_api/models/environment_api_ttl_request.rb +86 -0
- data/lib/env_zero_api/models/environment_api_ttl_request_body.rb +72 -0
- data/lib/env_zero_api/models/environment_api_ttl_response.rb +539 -0
- data/lib/env_zero_api/models/environment_api_ttl_type.rb +40 -0
- data/lib/env_zero_api/models/environment_api_update_environment_lock_request_body.rb +70 -0
- data/lib/env_zero_api/models/environment_api_update_environment_lock_response.rb +97 -0
- data/lib/env_zero_api/models/environment_api_update_policies_request_body.rb +334 -0
- data/lib/env_zero_api/models/environment_api_update_policies_response.rb +298 -0
- data/lib/env_zero_api/models/environment_api_update_request_body.rb +191 -0
- data/lib/env_zero_api/models/environment_api_update_response.rb +539 -0
- data/lib/env_zero_api/models/environment_api_update_tags_response.rb +539 -0
- data/lib/env_zero_api/models/environment_api_variable.rb +241 -0
- data/lib/env_zero_api/models/environment_api_vcs_provider.rb +56 -0
- data/lib/env_zero_api/models/environment_api_vcs_provider1.rb +56 -0
- data/lib/env_zero_api/models/environment_api_vcs_provider3.rb +56 -0
- data/lib/env_zero_api/models/environment_api_workflow_environments_workflow_file.rb +92 -0
- data/lib/env_zero_api/models/environment_api_workflow_environments_workflow_sub_environment.rb +226 -0
- data/lib/env_zero_api/models/environment_discovery_type.rb +26 -0
- data/lib/env_zero_api/models/environment_outputs_api_environment_state_access.rb +154 -0
- data/lib/env_zero_api/models/environment_outputs_api_get_state_access_config_response.rb +154 -0
- data/lib/env_zero_api/models/environment_removal_strategy.rb +36 -0
- data/lib/env_zero_api/models/environments.rb +80 -0
- data/lib/env_zero_api/models/event_name_type.rb +92 -0
- data/lib/env_zero_api/models/external_trigger_name.rb +40 -0
- data/lib/env_zero_api/models/family.rb +36 -0
- data/lib/env_zero_api/models/format.rb +40 -0
- data/lib/env_zero_api/models/git_user_data.rb +92 -0
- data/lib/env_zero_api/models/iac_type.rb +60 -0
- data/lib/env_zero_api/models/infracost_cost_estimation.rb +119 -0
- data/lib/env_zero_api/models/infracost_cost_estimation_project.rb +76 -0
- data/lib/env_zero_api/models/internal_trigger_name.rb +60 -0
- data/lib/env_zero_api/models/is_scheduled_run.rb +36 -0
- data/lib/env_zero_api/models/mode.rb +36 -0
- data/lib/env_zero_api/models/module_type.rb +26 -0
- data/lib/env_zero_api/models/notification_endpoint_type.rb +44 -0
- data/lib/env_zero_api/models/notifications_api_create_notification_endpoint_request_body.rb +122 -0
- data/lib/env_zero_api/models/notifications_api_create_notification_endpoint_response.rb +124 -0
- data/lib/env_zero_api/models/notifications_api_notification_endpoint_without_secret.rb +124 -0
- data/lib/env_zero_api/models/notifications_api_project_notification_setting.rb +102 -0
- data/lib/env_zero_api/models/notifications_api_update_project_notification_settings_request_body.rb +60 -0
- data/lib/env_zero_api/models/notifications_api_update_project_notification_settings_response.rb +102 -0
- data/lib/env_zero_api/models/organization_api_find_organization_by_id_response.rb +393 -0
- data/lib/env_zero_api/models/organization_api_get_organization_limits_response.rb +60 -0
- data/lib/env_zero_api/models/organization_api_ip_allowlist_rule.rb +119 -0
- data/lib/env_zero_api/models/organization_api_ip_allowlist_rule_type.rb +40 -0
- data/lib/env_zero_api/models/organization_api_ip_allowlist_rule_type2.rb +40 -0
- data/lib/env_zero_api/models/organization_api_organization.rb +393 -0
- data/lib/env_zero_api/models/organization_api_organization_limits.rb +60 -0
- data/lib/env_zero_api/models/organization_api_organization_mode.rb +36 -0
- data/lib/env_zero_api/models/organization_api_permissions.rb +82 -0
- data/lib/env_zero_api/models/organization_api_project_custom_flows_policy.rb +36 -0
- data/lib/env_zero_api/models/organization_api_project_permission.rb +69 -0
- data/lib/env_zero_api/models/organization_role.rb +36 -0
- data/lib/env_zero_api/models/organization_user.rb +77 -0
- data/lib/env_zero_api/models/organization_user_status.rb +36 -0
- data/lib/env_zero_api/models/output.rb +153 -0
- data/lib/env_zero_api/models/overwrites.rb +206 -0
- data/lib/env_zero_api/models/partial_json_schema7.rb +81 -0
- data/lib/env_zero_api/models/partial_json_schema72.rb +97 -0
- data/lib/env_zero_api/models/profile_data.rb +81 -0
- data/lib/env_zero_api/models/project_api_create_project_request.rb +102 -0
- data/lib/env_zero_api/models/project_api_create_project_request_body.rb +102 -0
- data/lib/env_zero_api/models/project_api_create_project_response.rb +150 -0
- data/lib/env_zero_api/models/project_api_find_by_id_response.rb +150 -0
- data/lib/env_zero_api/models/project_api_project.rb +150 -0
- data/lib/env_zero_api/models/project_api_user_access_source.rb +40 -0
- data/lib/env_zero_api/models/project_api_user_with_access.rb +148 -0
- data/lib/env_zero_api/models/requires_approval.rb +36 -0
- data/lib/env_zero_api/models/scheduling_api_disabled_reason.rb +36 -0
- data/lib/env_zero_api/models/scheduling_api_get_drift_detection_by_environment_id_response.rb +231 -0
- data/lib/env_zero_api/models/scheduling_api_get_schedule_by_environment_id_response.rb +71 -0
- data/lib/env_zero_api/models/scheduling_api_scheduled_action.rb +219 -0
- data/lib/env_zero_api/models/scheduling_api_set_drift_detection_request_body.rb +82 -0
- data/lib/env_zero_api/models/scheduling_api_set_drift_detection_response.rb +231 -0
- data/lib/env_zero_api/models/scheduling_api_set_environment_schedule_request_body.rb +75 -0
- data/lib/env_zero_api/models/scheduling_api_set_environment_schedule_request_scheduled_action.rb +70 -0
- data/lib/env_zero_api/models/scheduling_api_set_environment_schedule_response.rb +71 -0
- data/lib/env_zero_api/models/scope.rb +44 -0
- data/lib/env_zero_api/models/set_creation_scope.rb +36 -0
- data/lib/env_zero_api/models/settings.rb +76 -0
- data/lib/env_zero_api/models/skip_state_refresh.rb +36 -0
- data/lib/env_zero_api/models/status.rb +36 -0
- data/lib/env_zero_api/models/type.rb +36 -0
- data/lib/env_zero_api/models/user.rb +182 -0
- data/lib/env_zero_api/models/user1.rb +132 -0
- data/lib/env_zero_api/models/user_organization.rb +93 -0
- data/lib/env_zero_api/models/vcs.rb +368 -0
- data/lib/env_zero_api/models/workflow_deployment_options.rb +90 -0
- data/lib/env_zero_api/models/workflow_deployment_options1.rb +92 -0
- data/lib/env_zero_api/models/workflow_partial_deploy_operation.rb +40 -0
- data/lib/env_zero_api/models/workflow_sub_environment_request.rb +164 -0
- data/lib/env_zero_api/utilities/date_time_helper.rb +11 -0
- data/lib/env_zero_api/utilities/file_wrapper.rb +28 -0
- data/lib/env_zero_api/utilities/union_type_lookup.rb +379 -0
- data/lib/env_zero_api.rb +414 -0
- metadata +395 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 2311efd49ea90f87bca860e5c9de4241a6dc4832659533e06c40e2380f811213
|
|
4
|
+
data.tar.gz: ede3f9cf1a12c13597932bb4ce9561c67d27b995c233b7454a2de02979406528
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: '086acf8e81ee25d26ee9b4c3eea7140d7c760d11641f665dfbc23721770a2718aef47a661fa44580d9bba01fa31a17cf953dde91b7910f61c029a2010fef4a08'
|
|
7
|
+
data.tar.gz: a3ed0d2c9dbd34d8d10d177afb13685e92b07232b67c1808c45386e9066a1b3f5369aecffbca3113c73dbeafe536c9f02828493f63732f0328be1761ad2b464c
|
data/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
License:
|
|
2
|
+
========
|
|
3
|
+
The MIT License (MIT)
|
|
4
|
+
http://opensource.org/licenses/MIT
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2014 - 2026 APIMATIC Limited
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
|
25
|
+
|
|
26
|
+
Trade Mark:
|
|
27
|
+
==========
|
|
28
|
+
APIMATIC is a trade mark for APIMATIC Limited
|
data/README.md
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
|
|
2
|
+
# Getting Started with env zero API
|
|
3
|
+
|
|
4
|
+
## Introduction
|
|
5
|
+
|
|
6
|
+
This document describes the resources that make up the official env zero REST API.
|
|
7
|
+
|
|
8
|
+
### Base URL
|
|
9
|
+
|
|
10
|
+
`https://api.env0.com`
|
|
11
|
+
|
|
12
|
+
### Content types
|
|
13
|
+
|
|
14
|
+
All requests should be in JSON format and include the `accept: application/json` header.
|
|
15
|
+
|
|
16
|
+
### Authentication
|
|
17
|
+
|
|
18
|
+
HTTP Basic authentication. Send the **API Key ID** as the username and the **API Key Secret** as the password. Keys are created under *Organization Settings -> API Keys* (Admin or User scope) or *Personal Settings -> API Keys* (Personal scope).
|
|
19
|
+
|
|
20
|
+
### Scope of this document
|
|
21
|
+
|
|
22
|
+
This specification covers the environment drift-governance surface of the env zero API and the environment, deployment, template, configuration and project endpoints that support it. It was reconstructed from the OpenAPI fragments published on https://docs.envzero.com and is a subset of the full API.
|
|
23
|
+
|
|
24
|
+
### Error responses
|
|
25
|
+
|
|
26
|
+
`401` and `403` responses return `{ "message": string }` and are documented on every operation. The upstream documentation does not define response bodies for other non-2xx status codes, so none are asserted here.
|
|
27
|
+
|
|
28
|
+
## Install the Package
|
|
29
|
+
|
|
30
|
+
Install the gem from the command line:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
gem install ezero-apimatic-sdk -v 0.0.1
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Or add the gem to your Gemfile and run `bundle`:
|
|
37
|
+
|
|
38
|
+
```ruby
|
|
39
|
+
gem 'ezero-apimatic-sdk', '0.0.1'
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
For additional gem details, see the [RubyGems page for the ezero-apimatic-sdk gem](https://rubygems.org/gems/ezero-apimatic-sdk/versions/0.0.1).
|
|
43
|
+
|
|
44
|
+
## IRB Console Usage
|
|
45
|
+
|
|
46
|
+
You can explore the SDK interactively using IRB in two ways
|
|
47
|
+
|
|
48
|
+
### 1. Use IRB with Installed Gem
|
|
49
|
+
|
|
50
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and type the following command to start the irb console.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
irb
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Now you can load the SDK in the IRB
|
|
57
|
+
|
|
58
|
+
```ruby
|
|
59
|
+
require 'env_zero_api'
|
|
60
|
+
include EnvZeroApi
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 2. Use IRB within SDK
|
|
64
|
+
|
|
65
|
+
Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and navigate to the root folder of SDK.
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
cd path/to/env_zero_api
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Now you can start the preconfigured irb console by running the following command
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
ruby bin/console
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**_Note:_** This automatically loads the SDK from lib/
|
|
78
|
+
|
|
79
|
+
## Initialize the API Client
|
|
80
|
+
|
|
81
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/client.md)
|
|
82
|
+
|
|
83
|
+
The following parameters are configurable for the API Client:
|
|
84
|
+
|
|
85
|
+
| Parameter | Type | Description |
|
|
86
|
+
| --- | --- | --- |
|
|
87
|
+
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
88
|
+
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
89
|
+
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
|
|
90
|
+
| max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
|
|
91
|
+
| retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
|
|
92
|
+
| backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
|
|
93
|
+
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
94
|
+
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
95
|
+
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
96
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
97
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
98
|
+
| basic_auth_credentials | [`BasicAuthCredentials`](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/auth/basic-authentication.md) | The credential object for Basic Authentication |
|
|
99
|
+
|
|
100
|
+
The API client can be initialized as follows:
|
|
101
|
+
|
|
102
|
+
### Code-Based Client Initialization
|
|
103
|
+
|
|
104
|
+
```ruby
|
|
105
|
+
require 'env_zero_api'
|
|
106
|
+
include EnvZeroApi
|
|
107
|
+
|
|
108
|
+
client = Client.new(
|
|
109
|
+
basic_auth_credentials: BasicAuthCredentials.new(
|
|
110
|
+
username: 'BasicAuthUserName',
|
|
111
|
+
password: 'BasicAuthPassword'
|
|
112
|
+
),
|
|
113
|
+
logging_configuration: LoggingConfiguration.new(
|
|
114
|
+
log_level: Logger::INFO,
|
|
115
|
+
request_logging_config: RequestLoggingConfiguration.new(
|
|
116
|
+
log_body: true
|
|
117
|
+
),
|
|
118
|
+
response_logging_config: ResponseLoggingConfiguration.new(
|
|
119
|
+
log_headers: true
|
|
120
|
+
)
|
|
121
|
+
)
|
|
122
|
+
)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Environment-Based Client Initialization
|
|
126
|
+
|
|
127
|
+
```ruby
|
|
128
|
+
require 'env_zero_api'
|
|
129
|
+
include EnvZeroApi
|
|
130
|
+
|
|
131
|
+
# Create client from environment
|
|
132
|
+
client = Client.from_env
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md) section for details.
|
|
136
|
+
|
|
137
|
+
## Authorization
|
|
138
|
+
|
|
139
|
+
This API uses the following authentication schemes.
|
|
140
|
+
|
|
141
|
+
* [`env0_API_Key (Basic Authentication)`](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/auth/basic-authentication.md)
|
|
142
|
+
|
|
143
|
+
## List of APIs
|
|
144
|
+
|
|
145
|
+
* [Bulk Operations](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/bulk-operations.md)
|
|
146
|
+
* [Deployment Logs](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/deployment-logs.md)
|
|
147
|
+
* [Approval Policy](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/approval-policy.md)
|
|
148
|
+
* [Environment Outputs](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/environment-outputs.md)
|
|
149
|
+
* [Environments](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/environments.md)
|
|
150
|
+
* [Drift](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/drift.md)
|
|
151
|
+
* [Scheduling](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/scheduling.md)
|
|
152
|
+
* [Templates](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/templates.md)
|
|
153
|
+
* [Configuration](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/configuration.md)
|
|
154
|
+
* [Projects](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/projects.md)
|
|
155
|
+
* [Organization](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/organization.md)
|
|
156
|
+
* [Notifications](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/notifications.md)
|
|
157
|
+
* [Credentials](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/credentials.md)
|
|
158
|
+
|
|
159
|
+
## SDK Infrastructure
|
|
160
|
+
|
|
161
|
+
### Configuration
|
|
162
|
+
|
|
163
|
+
* [ProxySettings](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md)
|
|
164
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md)
|
|
165
|
+
* [AbstractLogger](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/abstract-logger.md)
|
|
166
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md)
|
|
167
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/request-logging-configuration.md)
|
|
168
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/response-logging-configuration.md)
|
|
169
|
+
|
|
170
|
+
### HTTP
|
|
171
|
+
|
|
172
|
+
* [HttpResponse](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/http-response.md)
|
|
173
|
+
* [HttpRequest](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/http-request.md)
|
|
174
|
+
|
|
175
|
+
### Utilities
|
|
176
|
+
|
|
177
|
+
* [ApiResponse](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/api-response.md)
|
|
178
|
+
* [ApiHelper](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/api-helper.md)
|
|
179
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/ezero-apimatic-ruby-sdk/tree/0.0.1/doc/date-time-helper.md)
|
|
180
|
+
|
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# Load the lib folder into Ruby's load path
|
|
4
|
+
$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
|
|
5
|
+
|
|
6
|
+
# Require the gem
|
|
7
|
+
require 'env_zero_api'
|
|
8
|
+
|
|
9
|
+
puts 'EnvZeroApi SDK loaded!'
|
|
10
|
+
puts 'You can now create a client with: client = EnvZeroApi::Client.new'
|
|
11
|
+
puts 'Or use from_env: client = EnvZeroApi::Client.from_env'
|
|
12
|
+
|
|
13
|
+
# Start an interactive IRB session
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# env_zero_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module EnvZeroApi
|
|
7
|
+
# ApprovalPolicyApi
|
|
8
|
+
class ApprovalPolicyApi < BaseApi
|
|
9
|
+
# Assigns an approval policy to a scope, so deployments there are evaluated
|
|
10
|
+
# against it after the plan and cost estimation steps. `blueprintId`
|
|
11
|
+
# identifies the policy and `scope` with `scopeId` identifies the target.
|
|
12
|
+
# Returns the created assignment.
|
|
13
|
+
# @param [BlueprintApiAssignApprovalPolicyRequestBody] body Required
|
|
14
|
+
# parameter: TODO: type description here
|
|
15
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
16
|
+
def templates_assign_approval_policy(body)
|
|
17
|
+
@api_call
|
|
18
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
19
|
+
'/approval-policy/assignment',
|
|
20
|
+
Server::DEFAULT)
|
|
21
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
22
|
+
.body_param(new_parameter(body)
|
|
23
|
+
.is_required(true))
|
|
24
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
25
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
26
|
+
.auth(Single.new('env0_API_Key')))
|
|
27
|
+
.response(new_response_handler
|
|
28
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
29
|
+
.deserialize_into(BlueprintApiAssignApprovalPolicyResponse.method(:from_hash))
|
|
30
|
+
.is_api_response(true)
|
|
31
|
+
.local_error('401',
|
|
32
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
33
|
+
' invalid.',
|
|
34
|
+
ErrorException)
|
|
35
|
+
.local_error('403',
|
|
36
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
37
|
+
' the route does not exist for the caller.',
|
|
38
|
+
ErrorException))
|
|
39
|
+
.execute
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns the approval policy assignments in force at the given scope, so a
|
|
43
|
+
# caller can tell whether a deployment it is about to trigger will require
|
|
44
|
+
# approval.
|
|
45
|
+
# @param [String] scope Required parameter: TODO: type description here
|
|
46
|
+
# @param [String] scope_id Required parameter: TODO: type description here
|
|
47
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
48
|
+
def templates_get_approval_policy_by_scope(scope,
|
|
49
|
+
scope_id)
|
|
50
|
+
@api_call
|
|
51
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
52
|
+
'/approval-policy/{scope}/{scopeId}',
|
|
53
|
+
Server::DEFAULT)
|
|
54
|
+
.template_param(new_parameter(scope, key: 'scope')
|
|
55
|
+
.is_required(true)
|
|
56
|
+
.should_encode(true))
|
|
57
|
+
.template_param(new_parameter(scope_id, key: 'scopeId')
|
|
58
|
+
.is_required(true)
|
|
59
|
+
.should_encode(true))
|
|
60
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
61
|
+
.auth(Single.new('env0_API_Key')))
|
|
62
|
+
.response(new_response_handler
|
|
63
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
64
|
+
.deserialize_into(BlueprintApiApprovalPolicyTemplateWithScope.method(:from_hash))
|
|
65
|
+
.is_api_response(true)
|
|
66
|
+
.is_response_array(true)
|
|
67
|
+
.local_error('401',
|
|
68
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
69
|
+
' invalid.',
|
|
70
|
+
ErrorException)
|
|
71
|
+
.local_error('403',
|
|
72
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
73
|
+
' the route does not exist for the caller.',
|
|
74
|
+
ErrorException))
|
|
75
|
+
.execute
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns all approval policies associated with an organization.
|
|
79
|
+
# @param [String] organization_id Required parameter: TODO: type description
|
|
80
|
+
# here
|
|
81
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
82
|
+
def templates_find_all_approval_policies(organization_id)
|
|
83
|
+
@api_call
|
|
84
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
85
|
+
'/approval-policies',
|
|
86
|
+
Server::DEFAULT)
|
|
87
|
+
.query_param(new_parameter(organization_id, key: 'organizationId')
|
|
88
|
+
.is_required(true))
|
|
89
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
90
|
+
.auth(Single.new('env0_API_Key')))
|
|
91
|
+
.response(new_response_handler
|
|
92
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
93
|
+
.deserialize_into(BlueprintApiFindAllApprovalPoliciesResponse.method(:from_hash))
|
|
94
|
+
.is_api_response(true)
|
|
95
|
+
.is_response_array(true)
|
|
96
|
+
.local_error('401',
|
|
97
|
+
'Authentication failed - the API key ID or secret is missing or'\
|
|
98
|
+
' invalid.',
|
|
99
|
+
ErrorException)
|
|
100
|
+
.local_error('403',
|
|
101
|
+
'The authenticated key lacks permission for this resource, or'\
|
|
102
|
+
' the route does not exist for the caller.',
|
|
103
|
+
ErrorException))
|
|
104
|
+
.execute
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# env_zero_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module EnvZeroApi
|
|
7
|
+
# BaseApi.
|
|
8
|
+
class BaseApi
|
|
9
|
+
include CoreLibrary
|
|
10
|
+
attr_accessor :config, :http_call_back
|
|
11
|
+
|
|
12
|
+
def self.user_agent
|
|
13
|
+
'Ruby-SDK/0.0.1 (OS: {os-info}, Engine: {engine}/{engine-version})'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.user_agent_parameters
|
|
17
|
+
{
|
|
18
|
+
'{engine}' => { 'value' => RUBY_ENGINE, 'encode' => false },
|
|
19
|
+
'{engine-version}' => { 'value' => RUBY_ENGINE_VERSION, 'encode' => false },
|
|
20
|
+
'{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false }
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
GLOBAL_ERRORS = {
|
|
25
|
+
'default' => ErrorCase.new
|
|
26
|
+
.error_message('HTTP response not OK.')
|
|
27
|
+
.exception_type(APIException)
|
|
28
|
+
}.freeze
|
|
29
|
+
|
|
30
|
+
# Initialization constructor.
|
|
31
|
+
# @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
|
|
32
|
+
def initialize(global_configuration)
|
|
33
|
+
@global_configuration = global_configuration
|
|
34
|
+
@config = @global_configuration.client_configuration
|
|
35
|
+
@http_call_back = @config.http_callback
|
|
36
|
+
@api_call = ApiCall.new(@global_configuration)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Creates a new instance of the request builder.
|
|
40
|
+
# @param [String] http_method The HTTP method to use in the request.
|
|
41
|
+
# @param [String] path The endpoint path to use in the request.
|
|
42
|
+
# @param [String] server The server to extract the base uri for the request.
|
|
43
|
+
# @return [RequestBuilder] The instance of RequestBuilder.
|
|
44
|
+
def new_request_builder(http_method, path, server)
|
|
45
|
+
RequestBuilder.new
|
|
46
|
+
.http_method(http_method)
|
|
47
|
+
.path(path)
|
|
48
|
+
.server(server)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Creates a new instance of the response handler.
|
|
52
|
+
# @return [ResponseHandler] The instance of ResponseHandler.
|
|
53
|
+
def new_response_handler
|
|
54
|
+
ResponseHandler.new
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Creates a new instance of the parameter.
|
|
58
|
+
# @param [String|optional] key The key of the parameter.
|
|
59
|
+
# @param [Object] value The value of the parameter.
|
|
60
|
+
# @return [Parameter] The instance of Parameter.
|
|
61
|
+
def new_parameter(value, key: nil)
|
|
62
|
+
Parameter.new
|
|
63
|
+
.key(key)
|
|
64
|
+
.value(value)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|