Method: OryClient::ProjectApi#create_project_with_http_info

Defined in:
lib/ory-client/api/project_api.rb

#create_project_with_http_info(opts = {}) ⇒ Array<(Project, Integer, Hash)>

Create a Project Creates a new project.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Project, Integer, Hash)>)

    Project data, response status code and response headers



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/ory-client/api/project_api.rb', line 183

def create_project_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.create_project ...'
  end
  # resource path
  local_var_path = '/projects'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_project_body'])

  # return_type
  return_type = opts[:debug_return_type] || 'Project'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryWorkspaceApiKey']

  new_options = opts.merge(
    :operation => :"ProjectApi.create_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end