=begin #Cloudsmith API (v1) #The API to the Cloudsmith Service OpenAPI spec version: v1 Contact: support@cloudsmith.io Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.26 =end require 'uri' module CloudsmithApi class OrgsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Create a package deny policy. # Create a package deny policy. # @param org # @param [Hash] opts the optional parameters # @option opts [PackageDenyPolicyRequest] :data # @return [PackageDenyPolicy] def orgs_deny_policy_create(org, opts = {}) data, _status_code, _headers = orgs_deny_policy_create_with_http_info(org, opts) data end # Create a package deny policy. # Create a package deny policy. # @param org # @param [Hash] opts the optional parameters # @option opts [PackageDenyPolicyRequest] :data # @return [Array<(PackageDenyPolicy, Fixnum, Hash)>] PackageDenyPolicy data, response status code and response headers def orgs_deny_policy_create_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_deny_policy_create ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_deny_policy_create" end # resource path local_var_path = '/orgs/{org}/deny-policy/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PackageDenyPolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_deny_policy_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a package deny policy. # Delete a package deny policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [nil] def orgs_deny_policy_delete(org, slug_perm, opts = {}) orgs_deny_policy_delete_with_http_info(org, slug_perm, opts) nil end # Delete a package deny policy. # Delete a package deny policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def orgs_deny_policy_delete_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_deny_policy_delete ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_deny_policy_delete" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_deny_policy_delete" end # resource path local_var_path = '/orgs/{org}/deny-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_deny_policy_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of all package deny policies. # Get a list of all package deny policies. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array] def orgs_deny_policy_list(org, opts = {}) data, _status_code, _headers = orgs_deny_policy_list_with_http_info(org, opts) data end # Get a list of all package deny policies. # Get a list of all package deny policies. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def orgs_deny_policy_list_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_deny_policy_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_deny_policy_list" end # resource path local_var_path = '/orgs/{org}/deny-policy/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_deny_policy_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Partially update a package deny policy. # Partially update a package deny policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [PackageDenyPolicyRequestPatch] :data # @return [PackageDenyPolicy] def orgs_deny_policy_partial_update(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_deny_policy_partial_update_with_http_info(org, slug_perm, opts) data end # Partially update a package deny policy. # Partially update a package deny policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [PackageDenyPolicyRequestPatch] :data # @return [Array<(PackageDenyPolicy, Fixnum, Hash)>] PackageDenyPolicy data, response status code and response headers def orgs_deny_policy_partial_update_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_deny_policy_partial_update ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_deny_policy_partial_update" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_deny_policy_partial_update" end # resource path local_var_path = '/orgs/{org}/deny-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PackageDenyPolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_deny_policy_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a package deny policy. # Get a package deny policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [PackageDenyPolicy] def orgs_deny_policy_read(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_deny_policy_read_with_http_info(org, slug_perm, opts) data end # Get a package deny policy. # Get a package deny policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(PackageDenyPolicy, Fixnum, Hash)>] PackageDenyPolicy data, response status code and response headers def orgs_deny_policy_read_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_deny_policy_read ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_deny_policy_read" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_deny_policy_read" end # resource path local_var_path = '/orgs/{org}/deny-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PackageDenyPolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_deny_policy_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a package deny policy. # Update a package deny policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [PackageDenyPolicyRequest] :data # @return [PackageDenyPolicy] def orgs_deny_policy_update(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_deny_policy_update_with_http_info(org, slug_perm, opts) data end # Update a package deny policy. # Update a package deny policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [PackageDenyPolicyRequest] :data # @return [Array<(PackageDenyPolicy, Fixnum, Hash)>] PackageDenyPolicy data, response status code and response headers def orgs_deny_policy_update_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_deny_policy_update ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_deny_policy_update" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_deny_policy_update" end # resource path local_var_path = '/orgs/{org}/deny-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PackageDenyPolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_deny_policy_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create an organization invite for a specific user # Create an organization invite for a specific user # @param org # @param [Hash] opts the optional parameters # @option opts [OrganizationInviteRequest] :data # @return [OrganizationInvite] def orgs_invites_create(org, opts = {}) data, _status_code, _headers = orgs_invites_create_with_http_info(org, opts) data end # Create an organization invite for a specific user # Create an organization invite for a specific user # @param org # @param [Hash] opts the optional parameters # @option opts [OrganizationInviteRequest] :data # @return [Array<(OrganizationInvite, Fixnum, Hash)>] OrganizationInvite data, response status code and response headers def orgs_invites_create_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_invites_create ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_invites_create" end # resource path local_var_path = '/orgs/{org}/invites/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationInvite') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_invites_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a specific organization invite # Delete a specific organization invite # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [nil] def orgs_invites_delete(org, slug_perm, opts = {}) orgs_invites_delete_with_http_info(org, slug_perm, opts) nil end # Delete a specific organization invite # Delete a specific organization invite # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def orgs_invites_delete_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_invites_delete ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_invites_delete" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_invites_delete" end # resource path local_var_path = '/orgs/{org}/invites/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_invites_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Extend an organization invite. # Extend an organization invite. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [OrganizationInviteExtend] def orgs_invites_extend(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_invites_extend_with_http_info(org, slug_perm, opts) data end # Extend an organization invite. # Extend an organization invite. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(OrganizationInviteExtend, Fixnum, Hash)>] OrganizationInviteExtend data, response status code and response headers def orgs_invites_extend_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_invites_extend ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_invites_extend" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_invites_extend" end # resource path local_var_path = '/orgs/{org}/invites/{slug_perm}/extend/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationInviteExtend') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_invites_extend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of all invites for an organization. # Get a list of all invites for an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array] def orgs_invites_list(org, opts = {}) data, _status_code, _headers = orgs_invites_list_with_http_info(org, opts) data end # Get a list of all invites for an organization. # Get a list of all invites for an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def orgs_invites_list_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_invites_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_invites_list" end # resource path local_var_path = '/orgs/{org}/invites/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_invites_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a specific organization invite. # Update a specific organization invite. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [OrganizationInviteUpdateRequestPatch] :data # @return [OrganizationInvite] def orgs_invites_partial_update(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_invites_partial_update_with_http_info(org, slug_perm, opts) data end # Update a specific organization invite. # Update a specific organization invite. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [OrganizationInviteUpdateRequestPatch] :data # @return [Array<(OrganizationInvite, Fixnum, Hash)>] OrganizationInvite data, response status code and response headers def orgs_invites_partial_update_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_invites_partial_update ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_invites_partial_update" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_invites_partial_update" end # resource path local_var_path = '/orgs/{org}/invites/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationInvite') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_invites_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Resend an organization invite. # Resend an organization invite. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [OrganizationInviteExtend] def orgs_invites_resend(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_invites_resend_with_http_info(org, slug_perm, opts) data end # Resend an organization invite. # Resend an organization invite. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(OrganizationInviteExtend, Fixnum, Hash)>] OrganizationInviteExtend data, response status code and response headers def orgs_invites_resend_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_invites_resend ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_invites_resend" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_invites_resend" end # resource path local_var_path = '/orgs/{org}/invites/{slug_perm}/resend/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationInviteExtend') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_invites_resend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a package license policy. # Create a package license policy. # @param org # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageLicensePolicyRequest] :data # @return [OrganizationPackageLicensePolicy] def orgs_license_policy_create(org, opts = {}) data, _status_code, _headers = orgs_license_policy_create_with_http_info(org, opts) data end # Create a package license policy. # Create a package license policy. # @param org # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageLicensePolicyRequest] :data # @return [Array<(OrganizationPackageLicensePolicy, Fixnum, Hash)>] OrganizationPackageLicensePolicy data, response status code and response headers def orgs_license_policy_create_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_create ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_create" end # resource path local_var_path = '/orgs/{org}/license-policy/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationPackageLicensePolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a package license policy. # Delete a package license policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [nil] def orgs_license_policy_delete(org, slug_perm, opts = {}) orgs_license_policy_delete_with_http_info(org, slug_perm, opts) nil end # Delete a package license policy. # Delete a package license policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def orgs_license_policy_delete_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_delete ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_delete" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_license_policy_delete" end # resource path local_var_path = '/orgs/{org}/license-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create an evaluation request for this policy. # Create an evaluation request for this policy. # @param org # @param policy_slug_perm # @param [Hash] opts the optional parameters # @option opts [PackageLicensePolicyEvaluationRequestRequest] :data # @return [PackageLicensePolicyEvaluationRequest] def orgs_license_policy_evaluation_create(org, policy_slug_perm, opts = {}) data, _status_code, _headers = orgs_license_policy_evaluation_create_with_http_info(org, policy_slug_perm, opts) data end # Create an evaluation request for this policy. # Create an evaluation request for this policy. # @param org # @param policy_slug_perm # @param [Hash] opts the optional parameters # @option opts [PackageLicensePolicyEvaluationRequestRequest] :data # @return [Array<(PackageLicensePolicyEvaluationRequest, Fixnum, Hash)>] PackageLicensePolicyEvaluationRequest data, response status code and response headers def orgs_license_policy_evaluation_create_with_http_info(org, policy_slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_evaluation_create ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_evaluation_create" end # verify the required parameter 'policy_slug_perm' is set if @api_client.config.client_side_validation && policy_slug_perm.nil? fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_license_policy_evaluation_create" end # resource path local_var_path = '/orgs/{org}/license-policy/{policy_slug_perm}/evaluation/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PackageLicensePolicyEvaluationRequest') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_evaluation_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List evaluation requests for this policy. # List evaluation requests for this policy. # @param org # @param policy_slug_perm # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array] def orgs_license_policy_evaluation_list(org, policy_slug_perm, opts = {}) data, _status_code, _headers = orgs_license_policy_evaluation_list_with_http_info(org, policy_slug_perm, opts) data end # List evaluation requests for this policy. # List evaluation requests for this policy. # @param org # @param policy_slug_perm # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def orgs_license_policy_evaluation_list_with_http_info(org, policy_slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_evaluation_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_evaluation_list" end # verify the required parameter 'policy_slug_perm' is set if @api_client.config.client_side_validation && policy_slug_perm.nil? fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_license_policy_evaluation_list" end # resource path local_var_path = '/orgs/{org}/license-policy/{policy_slug_perm}/evaluation/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s) # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_evaluation_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve an evaluation request for this policy. # Retrieve an evaluation request for this policy. # @param org # @param policy_slug_perm # @param slug_perm # @param [Hash] opts the optional parameters # @return [PackageLicensePolicyEvaluationRequest] def orgs_license_policy_evaluation_read(org, policy_slug_perm, slug_perm, opts = {}) data, _status_code, _headers = orgs_license_policy_evaluation_read_with_http_info(org, policy_slug_perm, slug_perm, opts) data end # Retrieve an evaluation request for this policy. # Retrieve an evaluation request for this policy. # @param org # @param policy_slug_perm # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(PackageLicensePolicyEvaluationRequest, Fixnum, Hash)>] PackageLicensePolicyEvaluationRequest data, response status code and response headers def orgs_license_policy_evaluation_read_with_http_info(org, policy_slug_perm, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_evaluation_read ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_evaluation_read" end # verify the required parameter 'policy_slug_perm' is set if @api_client.config.client_side_validation && policy_slug_perm.nil? fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_license_policy_evaluation_read" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_license_policy_evaluation_read" end # resource path local_var_path = '/orgs/{org}/license-policy/{policy_slug_perm}/evaluation/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PackageLicensePolicyEvaluationRequest') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_evaluation_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of all package license policies. # Get a list of all package license policies. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array] def orgs_license_policy_list(org, opts = {}) data, _status_code, _headers = orgs_license_policy_list_with_http_info(org, opts) data end # Get a list of all package license policies. # Get a list of all package license policies. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def orgs_license_policy_list_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_list" end # resource path local_var_path = '/orgs/{org}/license-policy/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Partially update a package license policy. # Partially update a package license policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageLicensePolicyRequestPatch] :data # @return [OrganizationPackageLicensePolicy] def orgs_license_policy_partial_update(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_license_policy_partial_update_with_http_info(org, slug_perm, opts) data end # Partially update a package license policy. # Partially update a package license policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageLicensePolicyRequestPatch] :data # @return [Array<(OrganizationPackageLicensePolicy, Fixnum, Hash)>] OrganizationPackageLicensePolicy data, response status code and response headers def orgs_license_policy_partial_update_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_partial_update ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_partial_update" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_license_policy_partial_update" end # resource path local_var_path = '/orgs/{org}/license-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationPackageLicensePolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a package license policy. # Get a package license policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [OrganizationPackageLicensePolicy] def orgs_license_policy_read(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_license_policy_read_with_http_info(org, slug_perm, opts) data end # Get a package license policy. # Get a package license policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(OrganizationPackageLicensePolicy, Fixnum, Hash)>] OrganizationPackageLicensePolicy data, response status code and response headers def orgs_license_policy_read_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_read ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_read" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_license_policy_read" end # resource path local_var_path = '/orgs/{org}/license-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationPackageLicensePolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a package license policy. # Update a package license policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageLicensePolicyRequest] :data # @return [OrganizationPackageLicensePolicy] def orgs_license_policy_update(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_license_policy_update_with_http_info(org, slug_perm, opts) data end # Update a package license policy. # Update a package license policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageLicensePolicyRequest] :data # @return [Array<(OrganizationPackageLicensePolicy, Fixnum, Hash)>] OrganizationPackageLicensePolicy data, response status code and response headers def orgs_license_policy_update_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_update ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_update" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_license_policy_update" end # resource path local_var_path = '/orgs/{org}/license-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationPackageLicensePolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List all current license policy violations for this Organization. # List all current license policy violations for this Organization. # @param org # @param [Hash] opts the optional parameters # @option opts [String] :cursor The pagination cursor value. # @option opts [Integer] :page_size Number of results to return per page. # @return [PackageLicensePolicyViolationLogCursorPage] def orgs_license_policy_violation_list(org, opts = {}) data, _status_code, _headers = orgs_license_policy_violation_list_with_http_info(org, opts) data end # List all current license policy violations for this Organization. # List all current license policy violations for this Organization. # @param org # @param [Hash] opts the optional parameters # @option opts [String] :cursor The pagination cursor value. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(PackageLicensePolicyViolationLogCursorPage, Fixnum, Hash)>] PackageLicensePolicyViolationLogCursorPage data, response status code and response headers def orgs_license_policy_violation_list_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_violation_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_violation_list" end # resource path local_var_path = '/orgs/{org}/license-policy-violation/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PackageLicensePolicyViolationLogCursorPage') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_violation_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of all the organizations you are associated with. # Get a list of all the organizations you are associated with. # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array] def orgs_list(opts = {}) data, _status_code, _headers = orgs_list_with_http_info(opts) data end # Get a list of all the organizations you are associated with. # Get a list of all the organizations you are associated with. # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def orgs_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_list ...' end # resource path local_var_path = '/orgs/' # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Removes a member from the organization. # Removes a member from the organization. # @param org # @param member # @param [Hash] opts the optional parameters # @return [nil] def orgs_members_delete(org, member, opts = {}) orgs_members_delete_with_http_info(org, member, opts) nil end # Removes a member from the organization. # Removes a member from the organization. # @param org # @param member # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def orgs_members_delete_with_http_info(org, member, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_members_delete ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_members_delete" end # verify the required parameter 'member' is set if @api_client.config.client_side_validation && member.nil? fail ArgumentError, "Missing the required parameter 'member' when calling OrgsApi.orgs_members_delete" end # resource path local_var_path = '/orgs/{org}/members/{member}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'member' + '}', member.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_members_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the details for all organization members. # Get the details for all organization members. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @option opts [BOOLEAN] :is_active Filter for active/inactive users. (default to false) # @return [Array] def orgs_members_list(org, opts = {}) data, _status_code, _headers = orgs_members_list_with_http_info(org, opts) data end # Get the details for all organization members. # Get the details for all organization members. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @option opts [BOOLEAN] :is_active Filter for active/inactive users. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def orgs_members_list_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_members_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_members_list" end # resource path local_var_path = '/orgs/{org}/members/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'is_active'] = opts[:'is_active'] if !opts[:'is_active'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_members_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the details for a specific organization member. # Get the details for a specific organization member. # @param org # @param member # @param [Hash] opts the optional parameters # @return [OrganizationMembership] def orgs_members_read(org, member, opts = {}) data, _status_code, _headers = orgs_members_read_with_http_info(org, member, opts) data end # Get the details for a specific organization member. # Get the details for a specific organization member. # @param org # @param member # @param [Hash] opts the optional parameters # @return [Array<(OrganizationMembership, Fixnum, Hash)>] OrganizationMembership data, response status code and response headers def orgs_members_read_with_http_info(org, member, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_members_read ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_members_read" end # verify the required parameter 'member' is set if @api_client.config.client_side_validation && member.nil? fail ArgumentError, "Missing the required parameter 'member' when calling OrgsApi.orgs_members_read" end # resource path local_var_path = '/orgs/{org}/members/{member}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'member' + '}', member.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationMembership') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_members_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Refresh a member of the organization's API key. # Refresh a member of the organization's API key. # @param org # @param member # @param [Hash] opts the optional parameters # @return [nil] def orgs_members_refresh(org, member, opts = {}) orgs_members_refresh_with_http_info(org, member, opts) nil end # Refresh a member of the organization's API key. # Refresh a member of the organization's API key. # @param org # @param member # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def orgs_members_refresh_with_http_info(org, member, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_members_refresh ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_members_refresh" end # verify the required parameter 'member' is set if @api_client.config.client_side_validation && member.nil? fail ArgumentError, "Missing the required parameter 'member' when calling OrgsApi.orgs_members_refresh" end # resource path local_var_path = '/orgs/{org}/members/{member}/refresh/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'member' + '}', member.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_members_refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Removes a member from the organization (deprecated, use DELETE instead). # Removes a member from the organization (deprecated, use DELETE instead). # @param org # @param member # @param [Hash] opts the optional parameters # @return [nil] def orgs_members_remove(org, member, opts = {}) orgs_members_remove_with_http_info(org, member, opts) nil end # Removes a member from the organization (deprecated, use DELETE instead). # Removes a member from the organization (deprecated, use DELETE instead). # @param org # @param member # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def orgs_members_remove_with_http_info(org, member, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_members_remove ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_members_remove" end # verify the required parameter 'member' is set if @api_client.config.client_side_validation && member.nil? fail ArgumentError, "Missing the required parameter 'member' when calling OrgsApi.orgs_members_remove" end # resource path local_var_path = '/orgs/{org}/members/{member}/remove/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'member' + '}', member.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_members_remove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the details for the specific organization. # Get the details for the specific organization. # @param org # @param [Hash] opts the optional parameters # @return [Organization] def orgs_read(org, opts = {}) data, _status_code, _headers = orgs_read_with_http_info(org, opts) data end # Get the details for the specific organization. # Get the details for the specific organization. # @param org # @param [Hash] opts the optional parameters # @return [Array<(Organization, Fixnum, Hash)>] Organization data, response status code and response headers def orgs_read_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_read ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_read" end # resource path local_var_path = '/orgs/{org}/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Organization') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new SAML Group Sync mapping within an organization. # Create a new SAML Group Sync mapping within an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [OrganizationGroupSyncRequest] :data # @return [OrganizationGroupSync] def orgs_saml_group_sync_create(org, opts = {}) data, _status_code, _headers = orgs_saml_group_sync_create_with_http_info(org, opts) data end # Create a new SAML Group Sync mapping within an organization. # Create a new SAML Group Sync mapping within an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [OrganizationGroupSyncRequest] :data # @return [Array<(OrganizationGroupSync, Fixnum, Hash)>] OrganizationGroupSync data, response status code and response headers def orgs_saml_group_sync_create_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_saml_group_sync_create ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_saml_group_sync_create" end # resource path local_var_path = '/orgs/{org}/saml-group-sync/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationGroupSync') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_saml_group_sync_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a SAML Group Sync mapping from an organization. # Delete a SAML Group Sync mapping from an organization. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [nil] def orgs_saml_group_sync_delete(org, slug_perm, opts = {}) orgs_saml_group_sync_delete_with_http_info(org, slug_perm, opts) nil end # Delete a SAML Group Sync mapping from an organization. # Delete a SAML Group Sync mapping from an organization. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def orgs_saml_group_sync_delete_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_saml_group_sync_delete ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_saml_group_sync_delete" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_saml_group_sync_delete" end # resource path local_var_path = '/orgs/{org}/saml-group-sync/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_saml_group_sync_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the details of all SAML Group Sync mapping within an organization. # Get the details of all SAML Group Sync mapping within an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array] def orgs_saml_group_sync_list(org, opts = {}) data, _status_code, _headers = orgs_saml_group_sync_list_with_http_info(org, opts) data end # Get the details of all SAML Group Sync mapping within an organization. # Get the details of all SAML Group Sync mapping within an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def orgs_saml_group_sync_list_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_saml_group_sync_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_saml_group_sync_list" end # resource path local_var_path = '/orgs/{org}/saml-group-sync/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_saml_group_sync_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a service within an organization. # Create a service within an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [ServiceRequest] :data # @return [Service] def orgs_services_create(org, opts = {}) data, _status_code, _headers = orgs_services_create_with_http_info(org, opts) data end # Create a service within an organization. # Create a service within an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [ServiceRequest] :data # @return [Array<(Service, Fixnum, Hash)>] Service data, response status code and response headers def orgs_services_create_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_services_create ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_services_create" end # resource path local_var_path = '/orgs/{org}/services/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Service') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_services_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a specific service # Delete a specific service # @param org # @param service # @param [Hash] opts the optional parameters # @return [nil] def orgs_services_delete(org, service, opts = {}) orgs_services_delete_with_http_info(org, service, opts) nil end # Delete a specific service # Delete a specific service # @param org # @param service # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def orgs_services_delete_with_http_info(org, service, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_services_delete ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_services_delete" end # verify the required parameter 'service' is set if @api_client.config.client_side_validation && service.nil? fail ArgumentError, "Missing the required parameter 'service' when calling OrgsApi.orgs_services_delete" end # resource path local_var_path = '/orgs/{org}/services/{service}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'service' + '}', service.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_services_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of all services within an organization. # Get a list of all services within an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array] def orgs_services_list(org, opts = {}) data, _status_code, _headers = orgs_services_list_with_http_info(org, opts) data end # Get a list of all services within an organization. # Get a list of all services within an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def orgs_services_list_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_services_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_services_list" end # resource path local_var_path = '/orgs/{org}/services/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_services_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a service within an organization. # Update a service within an organization. # @param org # @param service # @param [Hash] opts the optional parameters # @option opts [ServiceRequestPatch] :data # @return [Service] def orgs_services_partial_update(org, service, opts = {}) data, _status_code, _headers = orgs_services_partial_update_with_http_info(org, service, opts) data end # Update a service within an organization. # Update a service within an organization. # @param org # @param service # @param [Hash] opts the optional parameters # @option opts [ServiceRequestPatch] :data # @return [Array<(Service, Fixnum, Hash)>] Service data, response status code and response headers def orgs_services_partial_update_with_http_info(org, service, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_services_partial_update ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_services_partial_update" end # verify the required parameter 'service' is set if @api_client.config.client_side_validation && service.nil? fail ArgumentError, "Missing the required parameter 'service' when calling OrgsApi.orgs_services_partial_update" end # resource path local_var_path = '/orgs/{org}/services/{service}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'service' + '}', service.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Service') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_services_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve details of a single service within an organization. # Retrieve details of a single service within an organization. # @param org # @param service # @param [Hash] opts the optional parameters # @return [Service] def orgs_services_read(org, service, opts = {}) data, _status_code, _headers = orgs_services_read_with_http_info(org, service, opts) data end # Retrieve details of a single service within an organization. # Retrieve details of a single service within an organization. # @param org # @param service # @param [Hash] opts the optional parameters # @return [Array<(Service, Fixnum, Hash)>] Service data, response status code and response headers def orgs_services_read_with_http_info(org, service, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_services_read ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_services_read" end # verify the required parameter 'service' is set if @api_client.config.client_side_validation && service.nil? fail ArgumentError, "Missing the required parameter 'service' when calling OrgsApi.orgs_services_read" end # resource path local_var_path = '/orgs/{org}/services/{service}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'service' + '}', service.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Service') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_services_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Refresh service API token. # Refresh service API token. # @param org # @param service # @param [Hash] opts the optional parameters # @return [Service] def orgs_services_refresh(org, service, opts = {}) data, _status_code, _headers = orgs_services_refresh_with_http_info(org, service, opts) data end # Refresh service API token. # Refresh service API token. # @param org # @param service # @param [Hash] opts the optional parameters # @return [Array<(Service, Fixnum, Hash)>] Service data, response status code and response headers def orgs_services_refresh_with_http_info(org, service, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_services_refresh ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_services_refresh" end # verify the required parameter 'service' is set if @api_client.config.client_side_validation && service.nil? fail ArgumentError, "Missing the required parameter 'service' when calling OrgsApi.orgs_services_refresh" end # resource path local_var_path = '/orgs/{org}/services/{service}/refresh/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'service' + '}', service.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Service') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_services_refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a team for this organization. # Create a team for this organization. # @param org # @param [Hash] opts the optional parameters # @option opts [OrganizationTeamRequest] :data # @return [OrganizationTeam] def orgs_teams_create(org, opts = {}) data, _status_code, _headers = orgs_teams_create_with_http_info(org, opts) data end # Create a team for this organization. # Create a team for this organization. # @param org # @param [Hash] opts the optional parameters # @option opts [OrganizationTeamRequest] :data # @return [Array<(OrganizationTeam, Fixnum, Hash)>] OrganizationTeam data, response status code and response headers def orgs_teams_create_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_teams_create ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_teams_create" end # resource path local_var_path = '/orgs/{org}/teams/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationTeam') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_teams_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a specific team in a organization. # Delete a specific team in a organization. # @param org # @param team # @param [Hash] opts the optional parameters # @return [nil] def orgs_teams_delete(org, team, opts = {}) orgs_teams_delete_with_http_info(org, team, opts) nil end # Delete a specific team in a organization. # Delete a specific team in a organization. # @param org # @param team # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def orgs_teams_delete_with_http_info(org, team, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_teams_delete ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_teams_delete" end # verify the required parameter 'team' is set if @api_client.config.client_side_validation && team.nil? fail ArgumentError, "Missing the required parameter 'team' when calling OrgsApi.orgs_teams_delete" end # resource path local_var_path = '/orgs/{org}/teams/{team}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'team' + '}', team.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_teams_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the details of all teams within an organization. # Get the details of all teams within an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array] def orgs_teams_list(org, opts = {}) data, _status_code, _headers = orgs_teams_list_with_http_info(org, opts) data end # Get the details of all teams within an organization. # Get the details of all teams within an organization. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def orgs_teams_list_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_teams_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_teams_list" end # resource path local_var_path = '/orgs/{org}/teams/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_teams_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add users to a team. # Add users to a team. # @param org # @param team # @param [Hash] opts the optional parameters # @option opts [OrganizationTeamMembers] :data # @return [OrganizationTeamMembers] def orgs_teams_members_create(org, team, opts = {}) data, _status_code, _headers = orgs_teams_members_create_with_http_info(org, team, opts) data end # Add users to a team. # Add users to a team. # @param org # @param team # @param [Hash] opts the optional parameters # @option opts [OrganizationTeamMembers] :data # @return [Array<(OrganizationTeamMembers, Fixnum, Hash)>] OrganizationTeamMembers data, response status code and response headers def orgs_teams_members_create_with_http_info(org, team, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_teams_members_create ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_teams_members_create" end # verify the required parameter 'team' is set if @api_client.config.client_side_validation && team.nil? fail ArgumentError, "Missing the required parameter 'team' when calling OrgsApi.orgs_teams_members_create" end # resource path local_var_path = '/orgs/{org}/teams/{team}/members'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'team' + '}', team.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationTeamMembers') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_teams_members_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List all members for the team. # List all members for the team. # @param org # @param team # @param [Hash] opts the optional parameters # @return [OrganizationTeamMembers] def orgs_teams_members_list(org, team, opts = {}) data, _status_code, _headers = orgs_teams_members_list_with_http_info(org, team, opts) data end # List all members for the team. # List all members for the team. # @param org # @param team # @param [Hash] opts the optional parameters # @return [Array<(OrganizationTeamMembers, Fixnum, Hash)>] OrganizationTeamMembers data, response status code and response headers def orgs_teams_members_list_with_http_info(org, team, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_teams_members_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_teams_members_list" end # verify the required parameter 'team' is set if @api_client.config.client_side_validation && team.nil? fail ArgumentError, "Missing the required parameter 'team' when calling OrgsApi.orgs_teams_members_list" end # resource path local_var_path = '/orgs/{org}/teams/{team}/members'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'team' + '}', team.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationTeamMembers') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_teams_members_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Replace all team members. # Replace all team members. # @param org # @param team # @param [Hash] opts the optional parameters # @return [OrganizationTeamMembers] def orgs_teams_members_update(org, team, opts = {}) data, _status_code, _headers = orgs_teams_members_update_with_http_info(org, team, opts) data end # Replace all team members. # Replace all team members. # @param org # @param team # @param [Hash] opts the optional parameters # @return [Array<(OrganizationTeamMembers, Fixnum, Hash)>] OrganizationTeamMembers data, response status code and response headers def orgs_teams_members_update_with_http_info(org, team, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_teams_members_update ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_teams_members_update" end # verify the required parameter 'team' is set if @api_client.config.client_side_validation && team.nil? fail ArgumentError, "Missing the required parameter 'team' when calling OrgsApi.orgs_teams_members_update" end # resource path local_var_path = '/orgs/{org}/teams/{team}/members'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'team' + '}', team.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationTeamMembers') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_teams_members_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a specific team in a organization. # Update a specific team in a organization. # @param org # @param team # @param [Hash] opts the optional parameters # @option opts [OrganizationTeamRequestPatch] :data # @return [OrganizationTeam] def orgs_teams_partial_update(org, team, opts = {}) data, _status_code, _headers = orgs_teams_partial_update_with_http_info(org, team, opts) data end # Update a specific team in a organization. # Update a specific team in a organization. # @param org # @param team # @param [Hash] opts the optional parameters # @option opts [OrganizationTeamRequestPatch] :data # @return [Array<(OrganizationTeam, Fixnum, Hash)>] OrganizationTeam data, response status code and response headers def orgs_teams_partial_update_with_http_info(org, team, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_teams_partial_update ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_teams_partial_update" end # verify the required parameter 'team' is set if @api_client.config.client_side_validation && team.nil? fail ArgumentError, "Missing the required parameter 'team' when calling OrgsApi.orgs_teams_partial_update" end # resource path local_var_path = '/orgs/{org}/teams/{team}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'team' + '}', team.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationTeam') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_teams_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the details of a specific team within an organization. # Get the details of a specific team within an organization. # @param org # @param team # @param [Hash] opts the optional parameters # @return [OrganizationTeam] def orgs_teams_read(org, team, opts = {}) data, _status_code, _headers = orgs_teams_read_with_http_info(org, team, opts) data end # Get the details of a specific team within an organization. # Get the details of a specific team within an organization. # @param org # @param team # @param [Hash] opts the optional parameters # @return [Array<(OrganizationTeam, Fixnum, Hash)>] OrganizationTeam data, response status code and response headers def orgs_teams_read_with_http_info(org, team, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_teams_read ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_teams_read" end # verify the required parameter 'team' is set if @api_client.config.client_side_validation && team.nil? fail ArgumentError, "Missing the required parameter 'team' when calling OrgsApi.orgs_teams_read" end # resource path local_var_path = '/orgs/{org}/teams/{team}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'team' + '}', team.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationTeam') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_teams_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a package vulnerability policy. # Create a package vulnerability policy. # @param org # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageVulnerabilityPolicyRequest] :data # @return [OrganizationPackageVulnerabilityPolicy] def orgs_vulnerability_policy_create(org, opts = {}) data, _status_code, _headers = orgs_vulnerability_policy_create_with_http_info(org, opts) data end # Create a package vulnerability policy. # Create a package vulnerability policy. # @param org # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageVulnerabilityPolicyRequest] :data # @return [Array<(OrganizationPackageVulnerabilityPolicy, Fixnum, Hash)>] OrganizationPackageVulnerabilityPolicy data, response status code and response headers def orgs_vulnerability_policy_create_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_create ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_create" end # resource path local_var_path = '/orgs/{org}/vulnerability-policy/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationPackageVulnerabilityPolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a package vulnerability policy. # Delete a package vulnerability policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [nil] def orgs_vulnerability_policy_delete(org, slug_perm, opts = {}) orgs_vulnerability_policy_delete_with_http_info(org, slug_perm, opts) nil end # Delete a package vulnerability policy. # Delete a package vulnerability policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def orgs_vulnerability_policy_delete_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_delete ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_delete" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_vulnerability_policy_delete" end # resource path local_var_path = '/orgs/{org}/vulnerability-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create an evaluation request for this policy. # Create an evaluation request for this policy. # @param org # @param policy_slug_perm # @param [Hash] opts the optional parameters # @option opts [PackageVulnerabilityPolicyEvaluationRequestRequest] :data # @return [PackageVulnerabilityPolicyEvaluationRequest] def orgs_vulnerability_policy_evaluation_create(org, policy_slug_perm, opts = {}) data, _status_code, _headers = orgs_vulnerability_policy_evaluation_create_with_http_info(org, policy_slug_perm, opts) data end # Create an evaluation request for this policy. # Create an evaluation request for this policy. # @param org # @param policy_slug_perm # @param [Hash] opts the optional parameters # @option opts [PackageVulnerabilityPolicyEvaluationRequestRequest] :data # @return [Array<(PackageVulnerabilityPolicyEvaluationRequest, Fixnum, Hash)>] PackageVulnerabilityPolicyEvaluationRequest data, response status code and response headers def orgs_vulnerability_policy_evaluation_create_with_http_info(org, policy_slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_evaluation_create ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_evaluation_create" end # verify the required parameter 'policy_slug_perm' is set if @api_client.config.client_side_validation && policy_slug_perm.nil? fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_vulnerability_policy_evaluation_create" end # resource path local_var_path = '/orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PackageVulnerabilityPolicyEvaluationRequest') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_evaluation_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List evaluation requests for this policy. # List evaluation requests for this policy. # @param org # @param policy_slug_perm # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array] def orgs_vulnerability_policy_evaluation_list(org, policy_slug_perm, opts = {}) data, _status_code, _headers = orgs_vulnerability_policy_evaluation_list_with_http_info(org, policy_slug_perm, opts) data end # List evaluation requests for this policy. # List evaluation requests for this policy. # @param org # @param policy_slug_perm # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def orgs_vulnerability_policy_evaluation_list_with_http_info(org, policy_slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_evaluation_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_evaluation_list" end # verify the required parameter 'policy_slug_perm' is set if @api_client.config.client_side_validation && policy_slug_perm.nil? fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_vulnerability_policy_evaluation_list" end # resource path local_var_path = '/orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s) # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_evaluation_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve an evaluation request for this policy. # Retrieve an evaluation request for this policy. # @param org # @param policy_slug_perm # @param slug_perm # @param [Hash] opts the optional parameters # @return [PackageVulnerabilityPolicyEvaluationRequest] def orgs_vulnerability_policy_evaluation_read(org, policy_slug_perm, slug_perm, opts = {}) data, _status_code, _headers = orgs_vulnerability_policy_evaluation_read_with_http_info(org, policy_slug_perm, slug_perm, opts) data end # Retrieve an evaluation request for this policy. # Retrieve an evaluation request for this policy. # @param org # @param policy_slug_perm # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(PackageVulnerabilityPolicyEvaluationRequest, Fixnum, Hash)>] PackageVulnerabilityPolicyEvaluationRequest data, response status code and response headers def orgs_vulnerability_policy_evaluation_read_with_http_info(org, policy_slug_perm, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_evaluation_read ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_evaluation_read" end # verify the required parameter 'policy_slug_perm' is set if @api_client.config.client_side_validation && policy_slug_perm.nil? fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_vulnerability_policy_evaluation_read" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_vulnerability_policy_evaluation_read" end # resource path local_var_path = '/orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PackageVulnerabilityPolicyEvaluationRequest') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_evaluation_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of all package vulnerability policies. # Get a list of all package vulnerability policies. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array] def orgs_vulnerability_policy_list(org, opts = {}) data, _status_code, _headers = orgs_vulnerability_policy_list_with_http_info(org, opts) data end # Get a list of all package vulnerability policies. # Get a list of all package vulnerability policies. # @param org # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def orgs_vulnerability_policy_list_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_list" end # resource path local_var_path = '/orgs/{org}/vulnerability-policy/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Partially update a package vulnerability policy. # Partially update a package vulnerability policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageVulnerabilityPolicyRequestPatch] :data # @return [OrganizationPackageVulnerabilityPolicy] def orgs_vulnerability_policy_partial_update(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_vulnerability_policy_partial_update_with_http_info(org, slug_perm, opts) data end # Partially update a package vulnerability policy. # Partially update a package vulnerability policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageVulnerabilityPolicyRequestPatch] :data # @return [Array<(OrganizationPackageVulnerabilityPolicy, Fixnum, Hash)>] OrganizationPackageVulnerabilityPolicy data, response status code and response headers def orgs_vulnerability_policy_partial_update_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_partial_update ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_partial_update" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_vulnerability_policy_partial_update" end # resource path local_var_path = '/orgs/{org}/vulnerability-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationPackageVulnerabilityPolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a package vulnerability policy. # Get a package vulnerability policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [OrganizationPackageVulnerabilityPolicy] def orgs_vulnerability_policy_read(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_vulnerability_policy_read_with_http_info(org, slug_perm, opts) data end # Get a package vulnerability policy. # Get a package vulnerability policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @return [Array<(OrganizationPackageVulnerabilityPolicy, Fixnum, Hash)>] OrganizationPackageVulnerabilityPolicy data, response status code and response headers def orgs_vulnerability_policy_read_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_read ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_read" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_vulnerability_policy_read" end # resource path local_var_path = '/orgs/{org}/vulnerability-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationPackageVulnerabilityPolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a package vulnerability policy. # Update a package vulnerability policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageVulnerabilityPolicyRequest] :data # @return [OrganizationPackageVulnerabilityPolicy] def orgs_vulnerability_policy_update(org, slug_perm, opts = {}) data, _status_code, _headers = orgs_vulnerability_policy_update_with_http_info(org, slug_perm, opts) data end # Update a package vulnerability policy. # Update a package vulnerability policy. # @param org # @param slug_perm # @param [Hash] opts the optional parameters # @option opts [OrganizationPackageVulnerabilityPolicyRequest] :data # @return [Array<(OrganizationPackageVulnerabilityPolicy, Fixnum, Hash)>] OrganizationPackageVulnerabilityPolicy data, response status code and response headers def orgs_vulnerability_policy_update_with_http_info(org, slug_perm, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_update ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_update" end # verify the required parameter 'slug_perm' is set if @api_client.config.client_side_validation && slug_perm.nil? fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_vulnerability_policy_update" end # resource path local_var_path = '/orgs/{org}/vulnerability-policy/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationPackageVulnerabilityPolicy') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List all current vulnerability policy violations for this Organization. # List all current vulnerability policy violations for this Organization. # @param org # @param [Hash] opts the optional parameters # @option opts [String] :cursor The pagination cursor value. # @option opts [Integer] :page_size Number of results to return per page. # @return [PackageVulnerabilityPolicyViolationLogCursorPage] def orgs_vulnerability_policy_violation_list(org, opts = {}) data, _status_code, _headers = orgs_vulnerability_policy_violation_list_with_http_info(org, opts) data end # List all current vulnerability policy violations for this Organization. # List all current vulnerability policy violations for this Organization. # @param org # @param [Hash] opts the optional parameters # @option opts [String] :cursor The pagination cursor value. # @option opts [Integer] :page_size Number of results to return per page. # @return [Array<(PackageVulnerabilityPolicyViolationLogCursorPage, Fixnum, Hash)>] PackageVulnerabilityPolicyViolationLogCursorPage data, response status code and response headers def orgs_vulnerability_policy_violation_list_with_http_info(org, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_violation_list ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_violation_list" end # resource path local_var_path = '/orgs/{org}/vulnerability-policy-violation/'.sub('{' + 'org' + '}', org.to_s) # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['apikey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PackageVulnerabilityPolicyViolationLogCursorPage') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_violation_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end