Method: Propertyware::AccountingApi#create_owner_draw_with_http_info

Defined in:
lib/propertyware/api/accounting_api.rb

#create_owner_draw_with_http_info(save_owner_draw, opts = {}) ⇒ Array<(OwnerDraw, Integer, Hash)>

Create an owner draw (BETA) &lt;p class&#x3D;&quot;betaError&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Creates an owner draw for a specified owner contact.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;PORTFOLIOS&lt;/span&gt; - &lt;code&gt;Write&lt;/code&gt;

Parameters:

  • save_owner_draw (SaveOwnerDraw)

    saveOwnerDraw

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

    the optional parameters

Returns:

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

    OwnerDraw data, response status code and response headers



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/propertyware/api/accounting_api.rb', line 309

def create_owner_draw_with_http_info(save_owner_draw, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.create_owner_draw ...'
  end
  # verify the required parameter 'save_owner_draw' is set
  if @api_client.config.client_side_validation && save_owner_draw.nil?
    fail ArgumentError, "Missing the required parameter 'save_owner_draw' when calling AccountingApi.create_owner_draw"
  end
  # resource path
  local_var_path = '/accounting/ownerdraws'

  # 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'])
  # 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(save_owner_draw)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['organizationId', 'clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"AccountingApi.create_owner_draw",
    :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: AccountingApi#create_owner_draw\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end