Method: Propertyware::AccountingApi#get_general_ledger_transactions_with_http_info

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

#get_general_ledger_transactions_with_http_info(opts = {}) ⇒ Array<(Array<GLItem>, Integer, Hash)>

Retrieve all general ledger transactions (BETA) &lt;p class&#x3D;&quot;betaWarning&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;This operation is still in beta and might be subject to breaking changes. Production integrations should be avoided at this stage.&lt;/p&gt; Retrieves a list of general ledger transactions.&lt;br /&gt;&lt;br /&gt;At least of the following date ranges must be passed as a filter: * &#x60;lastModifiedDateStart&#x60;-&#x60;lastModifiedDateEnd&#x60; * &#x60;createdDateStart&#x60;-&#x60;createdDateEnd&#x60;&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;GENERAL LEDGER&lt;/span&gt; - &lt;code&gt;Read&lt;/code&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The offset is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 500 and the default is 100. (default to 100)

  • :last_modified_date_time_start (Time)

    Filters results to any item modified on or after the date time specified.

  • :last_modified_date_time_end (Time)

    Filters results to any item modified on or prior to the date time specified.

  • :orderby (String)

    Indicates the field(s) and direction to sort the results in the response.

  • :lease_id (Integer)

    Filters results to transactions associated with a specific lease.

  • :owner_id (Integer)

    Filters results to transactions associated with a specific owner.

  • :vendor_id (Integer)

    Filters results to transactions associated with a specific vendor.

  • :portfolio_id (Integer)

    Filters results to transactions associated with a specific Portfolio.

  • :post_date_start (Date)

    Filters results to any transaction with post date on or after to the date specified.

  • :post_date_end (Date)

    Filters results to any transaction with post date on or prior to the date specified.

Returns:

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

    Array<GLItem> data, response status code and response headers



670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
# File 'lib/propertyware/api/accounting_api.rb', line 670

def get_general_ledger_transactions_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.get_general_ledger_transactions ...'
  end
  # resource path
  local_var_path = '/accounting/generalledger'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'lastModifiedDateTimeStart'] = opts[:'last_modified_date_time_start'] if !opts[:'last_modified_date_time_start'].nil?
  query_params[:'lastModifiedDateTimeEnd'] = opts[:'last_modified_date_time_end'] if !opts[:'last_modified_date_time_end'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'leaseID'] = opts[:'lease_id'] if !opts[:'lease_id'].nil?
  query_params[:'ownerID'] = opts[:'owner_id'] if !opts[:'owner_id'].nil?
  query_params[:'vendorID'] = opts[:'vendor_id'] if !opts[:'vendor_id'].nil?
  query_params[:'portfolioID'] = opts[:'portfolio_id'] if !opts[:'portfolio_id'].nil?
  query_params[:'postDateStart'] = opts[:'post_date_start'] if !opts[:'post_date_start'].nil?
  query_params[:'postDateEnd'] = opts[:'post_date_end'] if !opts[:'post_date_end'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<GLItem>'

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

  new_options = opts.merge(
    :operation => :"AccountingApi.get_general_ledger_transactions",
    :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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AccountingApi#get_general_ledger_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end