Class: Buildium::GeneralLedgerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/buildium-ruby/api/general_ledger_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ GeneralLedgerApi

Returns a new instance of GeneralLedgerApi.



19
20
21
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_general_journal_entry(general_journal_entry_post_message, opts = {}) ⇒ GeneralLedgerTransactionMessage

Create a general journal entry Creates a general journal entry. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Transactions</span> - ‘View` `Edit`

Parameters:

Returns:



27
28
29
30
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 27

def create_general_journal_entry(general_journal_entry_post_message, opts = {})
  data, _status_code, _headers = create_general_journal_entry_with_http_info(general_journal_entry_post_message, opts)
  data
end

#create_general_journal_entry_with_http_info(general_journal_entry_post_message, opts = {}) ⇒ Array<(GeneralLedgerTransactionMessage, Integer, Hash)>

Create a general journal entry Creates a general journal entry. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; General Ledger Transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 37

def create_general_journal_entry_with_http_info(general_journal_entry_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralLedgerApi.create_general_journal_entry ...'
  end
  # verify the required parameter 'general_journal_entry_post_message' is set
  if @api_client.config.client_side_validation && general_journal_entry_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'general_journal_entry_post_message' when calling GeneralLedgerApi.create_general_journal_entry"
  end
  # resource path
  local_var_path = '/v1/generalledger/journalentries'

  # 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(general_journal_entry_post_message)

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

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

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

#create_general_ledger_account(gl_account_post_message, opts = {}) ⇒ GLAccountMessage

Create a general ledger account Creates a general ledger account. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Accounts</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:



95
96
97
98
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 95

def (, opts = {})
  data, _status_code, _headers = (, opts)
  data
end

#create_general_ledger_account_with_http_info(gl_account_post_message, opts = {}) ⇒ Array<(GLAccountMessage, Integer, Hash)>

Create a general ledger account Creates a general ledger account. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    GLAccountMessage data, response status code and response headers



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 105

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralLedgerApi.create_general_ledger_account ...'
  end
  # verify the required parameter 'gl_account_post_message' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'gl_account_post_message' when calling GeneralLedgerApi.create_general_ledger_account"
  end
  # resource path
  local_var_path = '/v1/glaccounts'

  # 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()

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

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

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

#get_all_gl_accounts(opts = {}) ⇒ Array<GLAccountMessage>

Retrieve all general ledger accounts Retrieves a list of general ledger accounts.<br /><br />General ledger accounts are used to categorize transactions for accounting purposes. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Accounts</span> - ‘View`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :accounttypes (Array<String>)

    Filters results by the specified general ledger account types.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:



166
167
168
169
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 166

def get_all_gl_accounts(opts = {})
  data, _status_code, _headers = get_all_gl_accounts_with_http_info(opts)
  data
end

#get_all_gl_accounts_with_http_info(opts = {}) ⇒ Array<(Array<GLAccountMessage>, Integer, Hash)>

Retrieve all general ledger accounts Retrieves a list of general ledger accounts.&lt;br /&gt;&lt;br /&gt;General ledger accounts are used to categorize transactions for accounting purposes. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :accounttypes (Array<String>)

    Filters results by the specified general ledger account types.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:

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

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



179
180
181
182
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
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 179

def get_all_gl_accounts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralLedgerApi.get_all_gl_accounts ...'
  end
  allowable_values = ["Asset", "Liability", "Equity", "Income", "Expense"]
  if @api_client.config.client_side_validation && opts[:'accounttypes'] && !opts[:'accounttypes'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"accounttypes\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/glaccounts'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accounttypes'] = @api_client.build_collection_param(opts[:'accounttypes'], :multi) if !opts[:'accounttypes'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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<GLAccountMessage>'

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

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

#get_all_transactions(startdate, enddate, glaccountids, opts = {}) ⇒ Array<GeneralLedgerTransactionMessage>

Retrieve all general ledger transactions Retrieves a list of general ledger transactions. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Transactions</span> - ‘View`

Parameters:

  • startdate (Date)

    Filters results to any transaction whose date is greater than or equal to the specified value.

  • enddate (Date)

    Filters results to any transaction whose date is less than or equal to the specified value.

  • glaccountids (Array<Integer>)

    Filters results to transactions whose general ledger account belongs to the specified set of general ledger account ids.

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

    the optional parameters

Options Hash (opts):

  • :selectionentityid (Integer)

    Filters results to any transaction containing journal lines for an entity associated with the specified entity id value. The id must be of the type specified in SelectionEntityType.

  • :selectionentitytype (String)

    Specifies the type of entity that SelectionEntityId refers to.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:



243
244
245
246
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 243

def get_all_transactions(startdate, enddate, glaccountids, opts = {})
  data, _status_code, _headers = get_all_transactions_with_http_info(startdate, enddate, glaccountids, opts)
  data
end

#get_all_transactions_with_http_info(startdate, enddate, glaccountids, opts = {}) ⇒ Array<(Array<GeneralLedgerTransactionMessage>, Integer, Hash)>

Retrieve all general ledger transactions Retrieves a list of general ledger transactions. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; General Ledger Transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • startdate (Date)

    Filters results to any transaction whose date is greater than or equal to the specified value.

  • enddate (Date)

    Filters results to any transaction whose date is less than or equal to the specified value.

  • glaccountids (Array<Integer>)

    Filters results to transactions whose general ledger account belongs to the specified set of general ledger account ids.

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

    the optional parameters

Options Hash (opts):

  • :selectionentityid (Integer)

    Filters results to any transaction containing journal lines for an entity associated with the specified entity id value. The id must be of the type specified in SelectionEntityType.

  • :selectionentitytype (String)

    Specifies the type of entity that SelectionEntityId refers to.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:

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

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



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 260

def get_all_transactions_with_http_info(startdate, enddate, glaccountids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralLedgerApi.get_all_transactions ...'
  end
  # verify the required parameter 'startdate' is set
  if @api_client.config.client_side_validation && startdate.nil?
    fail ArgumentError, "Missing the required parameter 'startdate' when calling GeneralLedgerApi.get_all_transactions"
  end
  # verify the required parameter 'enddate' is set
  if @api_client.config.client_side_validation && enddate.nil?
    fail ArgumentError, "Missing the required parameter 'enddate' when calling GeneralLedgerApi.get_all_transactions"
  end
  # verify the required parameter 'glaccountids' is set
  if @api_client.config.client_side_validation && glaccountids.nil?
    fail ArgumentError, "Missing the required parameter 'glaccountids' when calling GeneralLedgerApi.get_all_transactions"
  end
  allowable_values = ["Rental", "RentalOwner", "Association"]
  if @api_client.config.client_side_validation && opts[:'selectionentitytype'] && !allowable_values.include?(opts[:'selectionentitytype'])
    fail ArgumentError, "invalid value for \"selectionentitytype\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/generalledger/transactions'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'startdate'] = startdate
  query_params[:'enddate'] = enddate
  query_params[:'glaccountids'] = @api_client.build_collection_param(glaccountids, :multi)
  query_params[:'selectionentityid'] = opts[:'selectionentityid'] if !opts[:'selectionentityid'].nil?
  query_params[:'selectionentitytype'] = opts[:'selectionentitytype'] if !opts[:'selectionentitytype'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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<GeneralLedgerTransactionMessage>'

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

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

#get_general_ledger_entries(accountingbasis, glaccountids, startdate, enddate, opts = {}) ⇒ Array<GeneralLedgerMessage>

Retrieve all general ledger entries Retrieves all general ledger entries <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Transactions</span> - ‘View`

Parameters:

  • accountingbasis (String)

    The methodology in which revenues and expenses are recognized when calculating the balances. Specifying &#x60;Cash&#x60; calculates balances based on when money changes hands. Specifying &#x60;Accrual&#x60; calculates balances based on the period in which the transaction originally happened.

  • glaccountids (Array<Integer>)

    Filters results to entries whose general ledger account belongs to the specified set of general ledger account ids.

  • startdate (Date)

    Filters results to any entries whose start date is greater than or equal to the specified value.

  • enddate (Date)

    Filters results to any entries whose end date is less than or equal to the specified value.

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

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that &#x60;EntityId&#x60; field refers to.

  • :entityid (Integer)

    Filters results to any general ledger entry containing line items associated with the specified entity identifier. This filter is used in conjunction with the &#x60;EntityType&#x60; field which must be set to the type of entity this identifier references.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:



341
342
343
344
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 341

def get_general_ledger_entries(accountingbasis, glaccountids, startdate, enddate, opts = {})
  data, _status_code, _headers = get_general_ledger_entries_with_http_info(accountingbasis, glaccountids, startdate, enddate, opts)
  data
end

#get_general_ledger_entries_with_http_info(accountingbasis, glaccountids, startdate, enddate, opts = {}) ⇒ Array<(Array<GeneralLedgerMessage>, Integer, Hash)>

Retrieve all general ledger entries Retrieves all general ledger entries &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; General Ledger Transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • accountingbasis (String)

    The methodology in which revenues and expenses are recognized when calculating the balances. Specifying &#x60;Cash&#x60; calculates balances based on when money changes hands. Specifying &#x60;Accrual&#x60; calculates balances based on the period in which the transaction originally happened.

  • glaccountids (Array<Integer>)

    Filters results to entries whose general ledger account belongs to the specified set of general ledger account ids.

  • startdate (Date)

    Filters results to any entries whose start date is greater than or equal to the specified value.

  • enddate (Date)

    Filters results to any entries whose end date is less than or equal to the specified value.

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

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that &#x60;EntityId&#x60; field refers to.

  • :entityid (Integer)

    Filters results to any general ledger entry containing line items associated with the specified entity identifier. This filter is used in conjunction with the &#x60;EntityType&#x60; field which must be set to the type of entity this identifier references.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:

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

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



359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 359

def get_general_ledger_entries_with_http_info(accountingbasis, glaccountids, startdate, enddate, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralLedgerApi.get_general_ledger_entries ...'
  end
  # verify the required parameter 'accountingbasis' is set
  if @api_client.config.client_side_validation && accountingbasis.nil?
    fail ArgumentError, "Missing the required parameter 'accountingbasis' when calling GeneralLedgerApi.get_general_ledger_entries"
  end
  # verify enum value
  allowable_values = ["Accrual", "Cash"]
  if @api_client.config.client_side_validation && !allowable_values.include?(accountingbasis)
    fail ArgumentError, "invalid value for \"accountingbasis\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'glaccountids' is set
  if @api_client.config.client_side_validation && glaccountids.nil?
    fail ArgumentError, "Missing the required parameter 'glaccountids' when calling GeneralLedgerApi.get_general_ledger_entries"
  end
  # verify the required parameter 'startdate' is set
  if @api_client.config.client_side_validation && startdate.nil?
    fail ArgumentError, "Missing the required parameter 'startdate' when calling GeneralLedgerApi.get_general_ledger_entries"
  end
  # verify the required parameter 'enddate' is set
  if @api_client.config.client_side_validation && enddate.nil?
    fail ArgumentError, "Missing the required parameter 'enddate' when calling GeneralLedgerApi.get_general_ledger_entries"
  end
  allowable_values = ["Company", "Rental", "RentalOwner", "Association"]
  if @api_client.config.client_side_validation && opts[:'entitytype'] && !allowable_values.include?(opts[:'entitytype'])
    fail ArgumentError, "invalid value for \"entitytype\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/generalledger'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountingbasis'] = accountingbasis
  query_params[:'glaccountids'] = @api_client.build_collection_param(glaccountids, :multi)
  query_params[:'startdate'] = startdate
  query_params[:'enddate'] = enddate
  query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil?
  query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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<GeneralLedgerMessage>'

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

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

#get_gl_account_balances(accountingbasis, asofdate, opts = {}) ⇒ Array<GLAccountBalanceMessage>

Retrieve all general ledger account balances Retrieves all general ledger account balances as of a given date. The response includes the total balance of each account along with the subtotals for any accounting entities (company, associations or rental properties) that have transactions assigned to the account. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Accounts</span> - ‘View`

Parameters:

  • accountingbasis (String)

    The methodology in which revenues and expenses are recognized when calculating the balances. Specifying &#x60;Cash&#x60; calculates balances based on when money changes hands. Specifying &#x60;Accrual&#x60; calculates balances based on the period in which the transaction originally happened.

  • asofdate (Date)

    Indicates the end date through which the balances will be calculated. This will include all transactions in your account until this specified date.

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

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that &#x60;EntityId&#x60; field refers to.

  • :entityid (Integer)

    Filters transactions used in calculating the general ledger account balances to only those containing journal lines for with the specified entity id value. The entity id specified must be of the type specified in &#x60;EntityType&#x60;.

  • :glaccountids (Array<Integer>)

    Filters results to the specified set of general ledger account identifiers.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:



449
450
451
452
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 449

def (accountingbasis, asofdate, opts = {})
  data, _status_code, _headers = (accountingbasis, asofdate, opts)
  data
end

#get_gl_account_balances_with_http_info(accountingbasis, asofdate, opts = {}) ⇒ Array<(Array<GLAccountBalanceMessage>, Integer, Hash)>

Retrieve all general ledger account balances Retrieves all general ledger account balances as of a given date. The response includes the total balance of each account along with the subtotals for any accounting entities (company, associations or rental properties) that have transactions assigned to the account. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • accountingbasis (String)

    The methodology in which revenues and expenses are recognized when calculating the balances. Specifying &#x60;Cash&#x60; calculates balances based on when money changes hands. Specifying &#x60;Accrual&#x60; calculates balances based on the period in which the transaction originally happened.

  • asofdate (Date)

    Indicates the end date through which the balances will be calculated. This will include all transactions in your account until this specified date.

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

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that &#x60;EntityId&#x60; field refers to.

  • :entityid (Integer)

    Filters transactions used in calculating the general ledger account balances to only those containing journal lines for with the specified entity id value. The entity id specified must be of the type specified in &#x60;EntityType&#x60;.

  • :glaccountids (Array<Integer>)

    Filters results to the specified set of general ledger account identifiers.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; 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 1000 and the default is 50.

Returns:

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

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



466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 466

def (accountingbasis, asofdate, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralLedgerApi.get_gl_account_balances ...'
  end
  # verify the required parameter 'accountingbasis' is set
  if @api_client.config.client_side_validation && accountingbasis.nil?
    fail ArgumentError, "Missing the required parameter 'accountingbasis' when calling GeneralLedgerApi.get_gl_account_balances"
  end
  # verify enum value
  allowable_values = ["Accrual", "Cash"]
  if @api_client.config.client_side_validation && !allowable_values.include?(accountingbasis)
    fail ArgumentError, "invalid value for \"accountingbasis\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'asofdate' is set
  if @api_client.config.client_side_validation && asofdate.nil?
    fail ArgumentError, "Missing the required parameter 'asofdate' when calling GeneralLedgerApi.get_gl_account_balances"
  end
  allowable_values = ["Association", "Rental", "RentalOwner"]
  if @api_client.config.client_side_validation && opts[:'entitytype'] && !allowable_values.include?(opts[:'entitytype'])
    fail ArgumentError, "invalid value for \"entitytype\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/glaccounts/balances'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'accountingbasis'] = accountingbasis
  query_params[:'asofdate'] = asofdate
  query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil?
  query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil?
  query_params[:'glaccountids'] = @api_client.build_collection_param(opts[:'glaccountids'], :multi) if !opts[:'glaccountids'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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<GLAccountBalanceMessage>'

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

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

#get_gl_account_by_id(gl_account_id, opts = {}) ⇒ GLAccountMessage

Retrieve a general ledger account Retrieves a specific general ledger account. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Accounts</span> - ‘View`

Parameters:

  • gl_account_id (Integer)

    The general ledger account identifier.

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

    the optional parameters

Returns:



540
541
542
543
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 540

def (, opts = {})
  data, _status_code, _headers = (, opts)
  data
end

#get_gl_account_by_id_with_http_info(gl_account_id, opts = {}) ⇒ Array<(GLAccountMessage, Integer, Hash)>

Retrieve a general ledger account Retrieves a specific general ledger account. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • gl_account_id (Integer)

    The general ledger account identifier.

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

    the optional parameters

Returns:

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

    GLAccountMessage data, response status code and response headers



550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 550

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralLedgerApi.get_gl_account_by_id ...'
  end
  # verify the required parameter 'gl_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'gl_account_id' when calling GeneralLedgerApi.get_gl_account_by_id"
  end
  # resource path
  local_var_path = '/v1/glaccounts/{glAccountId}'.sub('{' + 'glAccountId' + '}', CGI.escape(.to_s))

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

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

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

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

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

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

#get_transaction_by_id(transaction_id, opts = {}) ⇒ GeneralLedgerTransactionMessage

Retrieve a general ledger transaction Retrieves a specific general ledger transaction. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Transactions</span> - ‘View`

Parameters:

  • transaction_id (Integer)

    The general ledger transaction identifier.

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

    the optional parameters

Returns:



603
604
605
606
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 603

def get_transaction_by_id(transaction_id, opts = {})
  data, _status_code, _headers = get_transaction_by_id_with_http_info(transaction_id, opts)
  data
end

#get_transaction_by_id_with_http_info(transaction_id, opts = {}) ⇒ Array<(GeneralLedgerTransactionMessage, Integer, Hash)>

Retrieve a general ledger transaction Retrieves a specific general ledger transaction. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; General Ledger Transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • transaction_id (Integer)

    The general ledger transaction identifier.

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

    the optional parameters

Returns:



613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 613

def get_transaction_by_id_with_http_info(transaction_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralLedgerApi.get_transaction_by_id ...'
  end
  # verify the required parameter 'transaction_id' is set
  if @api_client.config.client_side_validation && transaction_id.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_id' when calling GeneralLedgerApi.get_transaction_by_id"
  end
  # resource path
  local_var_path = '/v1/generalledger/transactions/{transactionId}'.sub('{' + 'transactionId' + '}', CGI.escape(transaction_id.to_s))

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

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

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

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

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

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

#update_general_journal_entry(journal_entry_id, general_journal_entry_put_message, opts = {}) ⇒ GeneralLedgerTransactionMessage

Update a general journal entry Updates a general journal entry. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Transactions</span> - ‘View` `Edit`

Parameters:

  • journal_entry_id (Integer)
  • general_journal_entry_put_message (GeneralJournalEntryPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



667
668
669
670
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 667

def update_general_journal_entry(journal_entry_id, general_journal_entry_put_message, opts = {})
  data, _status_code, _headers = update_general_journal_entry_with_http_info(journal_entry_id, general_journal_entry_put_message, opts)
  data
end

#update_general_journal_entry_with_http_info(journal_entry_id, general_journal_entry_put_message, opts = {}) ⇒ Array<(GeneralLedgerTransactionMessage, Integer, Hash)>

Update a general journal entry Updates a general journal entry. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; General Ledger Transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • journal_entry_id (Integer)
  • general_journal_entry_put_message (GeneralJournalEntryPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
724
725
726
727
728
729
730
731
732
733
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 678

def update_general_journal_entry_with_http_info(journal_entry_id, general_journal_entry_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralLedgerApi.update_general_journal_entry ...'
  end
  # verify the required parameter 'journal_entry_id' is set
  if @api_client.config.client_side_validation && journal_entry_id.nil?
    fail ArgumentError, "Missing the required parameter 'journal_entry_id' when calling GeneralLedgerApi.update_general_journal_entry"
  end
  # verify the required parameter 'general_journal_entry_put_message' is set
  if @api_client.config.client_side_validation && general_journal_entry_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'general_journal_entry_put_message' when calling GeneralLedgerApi.update_general_journal_entry"
  end
  # resource path
  local_var_path = '/v1/generalledger/journalentries/{journalEntryId}'.sub('{' + 'journalEntryId' + '}', CGI.escape(journal_entry_id.to_s))

  # 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(general_journal_entry_put_message)

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

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

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

#update_gl_account(gl_account_id, gl_account_put_message, opts = {}) ⇒ GLAccountMessage

Update a general ledger account Updates a general ledger account. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; General Ledger Accounts</span> - ‘View` `Edit`

Parameters:

  • gl_account_id (Integer)
  • gl_account_put_message (GLAccountPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



741
742
743
744
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 741

def (, , opts = {})
  data, _status_code, _headers = (, , opts)
  data
end

#update_gl_account_with_http_info(gl_account_id, gl_account_put_message, opts = {}) ⇒ Array<(GLAccountMessage, Integer, Hash)>

Update a general ledger account Updates a general ledger account. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Accounting &amp;gt; General Ledger Accounts&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • gl_account_id (Integer)
  • gl_account_put_message (GLAccountPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    GLAccountMessage data, response status code and response headers



752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
# File 'lib/buildium-ruby/api/general_ledger_api.rb', line 752

def (, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GeneralLedgerApi.update_gl_account ...'
  end
  # verify the required parameter 'gl_account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'gl_account_id' when calling GeneralLedgerApi.update_gl_account"
  end
  # verify the required parameter 'gl_account_put_message' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'gl_account_put_message' when calling GeneralLedgerApi.update_gl_account"
  end
  # resource path
  local_var_path = '/v1/glaccounts/{glAccountId}'.sub('{' + 'glAccountId' + '}', CGI.escape(.to_s))

  # 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()

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

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

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