=begin #Cloudsmith API #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 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 [OrgsInvitesCreate] :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 [OrgsInvitesCreate] :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 '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 = {} # 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 # @option opts [OrgsInvitesExtend] :data # @return [OrganizationInvite] 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 # @option opts [OrgsInvitesExtend] :data # @return [Array<(OrganizationInvite, Fixnum, Hash)>] OrganizationInvite 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 '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_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 = {} # 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 # 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 = {} # 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 = {} # 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. # @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. # @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? # header parameters header_params = {} # 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 = {} # 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 # 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 = {} # 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 = {} # 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 [OrgsSamlgroupsyncCreate] :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 [OrgsSamlgroupsyncCreate] :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 '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 = {} # 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 = {} # 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 team for this organization. # Create a team for this organization. # @param org # @param [Hash] opts the optional parameters # @option opts [OrgsTeamsCreate] :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 [OrgsTeamsCreate] :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 '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 = {} # 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 = {} # 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 [OrgsTeamsMembersCreate] :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 [OrgsTeamsMembersCreate] :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 '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 = {} # 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 # @option opts [OrgsTeamsMembersUpdate] :data # @return [nil] def orgs_teams_members_update(org, team, opts = {}) orgs_teams_members_update_with_http_info(org, team, opts) nil end # Replace all team members. # Replace all team members. # @param org # @param team # @param [Hash] opts the optional parameters # @option opts [OrgsTeamsMembersUpdate] :data # @return [Array<(nil, Fixnum, Hash)>] nil, 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 '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) 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 [OrgsTeamsPartialUpdate] :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 [OrgsTeamsPartialUpdate] :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 '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 for the specific team. # Get the details for the specific team. # @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 for the specific team. # Get the details for the specific team. # @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 = {} # 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 end end