merge_ruby_client 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/lib/merge_ruby_client/accounting/accounts/client.rb +16 -8
  3. data/lib/merge_ruby_client/accounting/audit_trail/client.rb +6 -4
  4. data/lib/merge_ruby_client/accounting/client.rb +7 -0
  5. data/lib/merge_ruby_client/accounting/contacts/client.rb +14 -6
  6. data/lib/merge_ruby_client/accounting/expenses/client.rb +12 -4
  7. data/lib/merge_ruby_client/accounting/invoices/client.rb +12 -4
  8. data/lib/merge_ruby_client/accounting/items/client.rb +332 -0
  9. data/lib/merge_ruby_client/accounting/journal_entries/client.rb +12 -4
  10. data/lib/merge_ruby_client/accounting/payments/client.rb +12 -4
  11. data/lib/merge_ruby_client/accounting/projects/client.rb +224 -0
  12. data/lib/merge_ruby_client/accounting/projects/types/projects_list_request_expand.rb +13 -0
  13. data/lib/merge_ruby_client/accounting/projects/types/projects_retrieve_request_expand.rb +13 -0
  14. data/lib/merge_ruby_client/accounting/purchase_orders/client.rb +12 -4
  15. data/lib/merge_ruby_client/accounting/tracking_categories/client.rb +16 -8
  16. data/lib/merge_ruby_client/accounting/types/account_details_and_actions.rb +10 -2
  17. data/lib/merge_ruby_client/accounting/types/audit_log_event.rb +2 -0
  18. data/lib/merge_ruby_client/accounting/types/credit_note_line_item.rb +29 -1
  19. data/lib/merge_ruby_client/accounting/types/credit_note_line_item_contact.rb +56 -0
  20. data/lib/merge_ruby_client/accounting/types/credit_note_line_item_project.rb +55 -0
  21. data/lib/merge_ruby_client/accounting/types/credit_note_line_item_request.rb +29 -1
  22. data/lib/merge_ruby_client/accounting/types/credit_note_line_item_request_contact.rb +56 -0
  23. data/lib/merge_ruby_client/accounting/types/credit_note_line_item_request_project.rb +55 -0
  24. data/lib/merge_ruby_client/accounting/types/event_type_enum.rb +2 -0
  25. data/lib/merge_ruby_client/accounting/types/expense_line.rb +15 -1
  26. data/lib/merge_ruby_client/accounting/types/expense_line_project.rb +55 -0
  27. data/lib/merge_ruby_client/accounting/types/expense_line_request.rb +15 -1
  28. data/lib/merge_ruby_client/accounting/types/expense_line_request_project.rb +55 -0
  29. data/lib/merge_ruby_client/accounting/types/external_target_field_api_response.rb +12 -1
  30. data/lib/merge_ruby_client/accounting/types/field_mapping_api_instance_response.rb +12 -1
  31. data/lib/merge_ruby_client/accounting/types/general_ledger_transaction_line.rb +15 -1
  32. data/lib/merge_ruby_client/accounting/types/general_ledger_transaction_line_project.rb +55 -0
  33. data/lib/merge_ruby_client/accounting/types/invoice_line_item.rb +29 -1
  34. data/lib/merge_ruby_client/accounting/types/invoice_line_item_contact.rb +56 -0
  35. data/lib/merge_ruby_client/accounting/types/invoice_line_item_project.rb +55 -0
  36. data/lib/merge_ruby_client/accounting/types/invoice_line_item_request.rb +29 -1
  37. data/lib/merge_ruby_client/accounting/types/invoice_line_item_request_contact.rb +56 -0
  38. data/lib/merge_ruby_client/accounting/types/invoice_line_item_request_project.rb +55 -0
  39. data/lib/merge_ruby_client/accounting/types/item_request_request.rb +202 -0
  40. data/lib/merge_ruby_client/accounting/types/item_request_request_company.rb +56 -0
  41. data/lib/merge_ruby_client/accounting/types/item_request_request_purchase_account.rb +56 -0
  42. data/lib/merge_ruby_client/accounting/types/item_request_request_purchase_tax_rate.rb +56 -0
  43. data/lib/merge_ruby_client/accounting/types/item_request_request_sales_account.rb +56 -0
  44. data/lib/merge_ruby_client/accounting/types/item_request_request_sales_tax_rate.rb +56 -0
  45. data/lib/merge_ruby_client/accounting/types/item_response.rb +101 -0
  46. data/lib/merge_ruby_client/accounting/types/journal_line.rb +15 -1
  47. data/lib/merge_ruby_client/accounting/types/journal_line_project.rb +55 -0
  48. data/lib/merge_ruby_client/accounting/types/journal_line_request.rb +15 -1
  49. data/lib/merge_ruby_client/accounting/types/journal_line_request_project.rb +55 -0
  50. data/lib/merge_ruby_client/accounting/types/paginated_project_list.rb +80 -0
  51. data/lib/merge_ruby_client/accounting/types/patched_item_request_request.rb +172 -0
  52. data/lib/merge_ruby_client/accounting/types/project.rb +162 -0
  53. data/lib/merge_ruby_client/accounting/types/project_company.rb +56 -0
  54. data/lib/merge_ruby_client/accounting/types/project_contact.rb +56 -0
  55. data/lib/merge_ruby_client/accounting/types/remote_field_api_response.rb +12 -1
  56. data/lib/merge_ruby_client/accounting/types/type_2_bb_enum.rb +16 -0
  57. data/lib/merge_ruby_client/accounting/types/vendor_credit_line.rb +29 -1
  58. data/lib/merge_ruby_client/accounting/types/vendor_credit_line_contact.rb +55 -0
  59. data/lib/merge_ruby_client/accounting/types/vendor_credit_line_project.rb +55 -0
  60. data/lib/merge_ruby_client/accounting/types/vendor_credit_line_request.rb +29 -1
  61. data/lib/merge_ruby_client/accounting/types/vendor_credit_line_request_contact.rb +55 -0
  62. data/lib/merge_ruby_client/accounting/types/vendor_credit_line_request_project.rb +55 -0
  63. data/lib/merge_ruby_client/ats/audit_trail/client.rb +6 -4
  64. data/lib/merge_ruby_client/ats/types/account_details_and_actions.rb +10 -2
  65. data/lib/merge_ruby_client/ats/types/audit_log_event.rb +2 -0
  66. data/lib/merge_ruby_client/ats/types/event_type_enum.rb +1 -0
  67. data/lib/merge_ruby_client/crm/accounts/client.rb +6 -2
  68. data/lib/merge_ruby_client/crm/audit_trail/client.rb +6 -4
  69. data/lib/merge_ruby_client/crm/contacts/client.rb +6 -2
  70. data/lib/merge_ruby_client/crm/custom_objects/client.rb +10 -2
  71. data/lib/merge_ruby_client/crm/engagement_types/client.rb +6 -2
  72. data/lib/merge_ruby_client/crm/engagements/client.rb +6 -2
  73. data/lib/merge_ruby_client/crm/leads/client.rb +6 -2
  74. data/lib/merge_ruby_client/crm/notes/client.rb +6 -2
  75. data/lib/merge_ruby_client/crm/opportunities/client.rb +6 -2
  76. data/lib/merge_ruby_client/crm/stages/client.rb +6 -2
  77. data/lib/merge_ruby_client/crm/sync_status/client.rb +20 -6
  78. data/lib/merge_ruby_client/crm/tasks/client.rb +6 -2
  79. data/lib/merge_ruby_client/crm/types/audit_log_event.rb +2 -0
  80. data/lib/merge_ruby_client/crm/types/custom_object_request.rb +26 -3
  81. data/lib/merge_ruby_client/crm/types/event_type_enum.rb +2 -0
  82. data/lib/merge_ruby_client/crm/users/client.rb +6 -2
  83. data/lib/merge_ruby_client/filestorage/audit_trail/client.rb +6 -4
  84. data/lib/merge_ruby_client/filestorage/files/client.rb +48 -12
  85. data/lib/merge_ruby_client/filestorage/files/types/files_download_request_meta_list_request_order_by.rb +14 -0
  86. data/lib/merge_ruby_client/filestorage/files/types/files_list_request_order_by.rb +14 -0
  87. data/lib/merge_ruby_client/filestorage/sync_status/client.rb +20 -6
  88. data/lib/merge_ruby_client/filestorage/types/account_details_and_actions.rb +10 -2
  89. data/lib/merge_ruby_client/filestorage/types/audit_log_event.rb +2 -0
  90. data/lib/merge_ruby_client/filestorage/types/download_request_meta.rb +2 -9
  91. data/lib/merge_ruby_client/filestorage/types/event_type_enum.rb +2 -0
  92. data/lib/merge_ruby_client/filestorage/types/file.rb +13 -1
  93. data/lib/merge_ruby_client/filestorage/types/file_request.rb +13 -1
  94. data/lib/merge_ruby_client/hris/audit_trail/client.rb +6 -4
  95. data/lib/merge_ruby_client/hris/types/account_details_and_actions.rb +10 -2
  96. data/lib/merge_ruby_client/hris/types/audit_log_event.rb +2 -0
  97. data/lib/merge_ruby_client/hris/types/event_type_enum.rb +2 -0
  98. data/lib/merge_ruby_client/ticketing/audit_trail/client.rb +6 -4
  99. data/lib/merge_ruby_client/ticketing/tickets/client.rb +26 -10
  100. data/lib/merge_ruby_client/ticketing/types/account_details_and_actions.rb +10 -2
  101. data/lib/merge_ruby_client/ticketing/types/audit_log_event.rb +2 -0
  102. data/lib/merge_ruby_client/ticketing/types/collection.rb +18 -16
  103. data/lib/merge_ruby_client/ticketing/types/{access_level_enum.rb → collection_access_level_enum.rb} +3 -1
  104. data/lib/merge_ruby_client/ticketing/types/event_type_enum.rb +2 -0
  105. data/lib/merge_ruby_client/ticketing/types/patched_ticket_request.rb +20 -1
  106. data/lib/merge_ruby_client/ticketing/types/ticket.rb +20 -1
  107. data/lib/merge_ruby_client/ticketing/types/ticket_access_level_enum.rb +16 -0
  108. data/lib/merge_ruby_client/ticketing/types/ticket_request.rb +20 -1
  109. data/lib/merge_ruby_client.rb +7 -7
  110. data/lib/requests.rb +2 -2
  111. data/lib/types_export.rb +243 -208
  112. metadata +39 -3
@@ -4,8 +4,12 @@ require_relative "../../../requests"
4
4
  require "date"
5
5
  require_relative "types/items_list_request_expand"
6
6
  require_relative "../types/paginated_item_list"
7
+ require_relative "../types/item_request_request"
8
+ require_relative "../types/item_response"
7
9
  require_relative "types/items_retrieve_request_expand"
8
10
  require_relative "../types/item"
11
+ require_relative "../types/patched_item_request_request"
12
+ require_relative "../types/meta_response"
9
13
  require "async"
10
14
 
11
15
  module Merge
@@ -90,6 +94,53 @@ module Merge
90
94
  Merge::Accounting::PaginatedItemList.from_json(json_object: response.body)
91
95
  end
92
96
 
97
+ # Creates an `Item` object with the given values.
98
+ #
99
+ # @param is_debug_mode [Boolean] Whether to include debug fields (such as log file links) in the response.
100
+ # @param run_async [Boolean] Whether or not third-party updates should be run asynchronously.
101
+ # @param model [Hash] Request of type Merge::Accounting::ItemRequestRequest, as a Hash
102
+ # * :name (String)
103
+ # * :status (Merge::Accounting::Status7D1Enum)
104
+ # * :type (Merge::Accounting::Type2BbEnum)
105
+ # * :unit_price (Float)
106
+ # * :purchase_price (Float)
107
+ # * :purchase_account (Hash)
108
+ # * :sales_account (Hash)
109
+ # * :company (Hash)
110
+ # * :purchase_tax_rate (Hash)
111
+ # * :sales_tax_rate (Hash)
112
+ # * :integration_params (Hash{String => Object})
113
+ # * :linked_account_params (Hash{String => Object})
114
+ # @param request_options [Merge::RequestOptions]
115
+ # @return [Merge::Accounting::ItemResponse]
116
+ # @example
117
+ # api = Merge::Client.new(
118
+ # base_url: "https://api.example.com",
119
+ # environment: Merge::Environment::PRODUCTION,
120
+ # api_key: "YOUR_AUTH_TOKEN"
121
+ # )
122
+ # api.accounting.items.create(model: { })
123
+ def create(model:, is_debug_mode: nil, run_async: nil, request_options: nil)
124
+ response = @request_client.conn.post do |req|
125
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
126
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
127
+ req.headers["X-Account-Token"] = request_options.account_token unless request_options&.account_token.nil?
128
+ req.headers = {
129
+ **(req.headers || {}),
130
+ **@request_client.get_headers,
131
+ **(request_options&.additional_headers || {})
132
+ }.compact
133
+ req.params = {
134
+ **(request_options&.additional_query_parameters || {}),
135
+ "is_debug_mode": is_debug_mode,
136
+ "run_async": run_async
137
+ }.compact
138
+ req.body = { **(request_options&.additional_body_parameters || {}), model: model }.compact
139
+ req.url "#{@request_client.get_url(request_options: request_options)}/accounting/v1/items"
140
+ end
141
+ Merge::Accounting::ItemResponse.from_json(json_object: response.body)
142
+ end
143
+
93
144
  # Returns an `Item` object with the given `id`.
94
145
  #
95
146
  # @param id [String]
@@ -138,6 +189,119 @@ module Merge
138
189
  end
139
190
  Merge::Accounting::Item.from_json(json_object: response.body)
140
191
  end
192
+
193
+ # Updates an `Item` object with the given `id`.
194
+ #
195
+ # @param id [String]
196
+ # @param is_debug_mode [Boolean] Whether to include debug fields (such as log file links) in the response.
197
+ # @param run_async [Boolean] Whether or not third-party updates should be run asynchronously.
198
+ # @param model [Hash] Request of type Merge::Accounting::PatchedItemRequestRequest, as a Hash
199
+ # * :name (String)
200
+ # * :status (Merge::Accounting::Status7D1Enum)
201
+ # * :type (Merge::Accounting::Type2BbEnum)
202
+ # * :unit_price (Float)
203
+ # * :purchase_price (Float)
204
+ # * :purchase_account (String)
205
+ # * :sales_account (String)
206
+ # * :company (String)
207
+ # * :purchase_tax_rate (String)
208
+ # * :sales_tax_rate (String)
209
+ # * :integration_params (Hash{String => Object})
210
+ # * :linked_account_params (Hash{String => Object})
211
+ # @param request_options [Merge::RequestOptions]
212
+ # @return [Merge::Accounting::ItemResponse]
213
+ # @example
214
+ # api = Merge::Client.new(
215
+ # base_url: "https://api.example.com",
216
+ # environment: Merge::Environment::PRODUCTION,
217
+ # api_key: "YOUR_AUTH_TOKEN"
218
+ # )
219
+ # api.accounting.items.partial_update(id: "id", model: { })
220
+ def partial_update(id:, model:, is_debug_mode: nil, run_async: nil, request_options: nil)
221
+ response = @request_client.conn.patch do |req|
222
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
223
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
224
+ req.headers["X-Account-Token"] = request_options.account_token unless request_options&.account_token.nil?
225
+ req.headers = {
226
+ **(req.headers || {}),
227
+ **@request_client.get_headers,
228
+ **(request_options&.additional_headers || {})
229
+ }.compact
230
+ req.params = {
231
+ **(request_options&.additional_query_parameters || {}),
232
+ "is_debug_mode": is_debug_mode,
233
+ "run_async": run_async
234
+ }.compact
235
+ req.body = { **(request_options&.additional_body_parameters || {}), model: model }.compact
236
+ req.url "#{@request_client.get_url(request_options: request_options)}/accounting/v1/items/#{id}"
237
+ end
238
+ Merge::Accounting::ItemResponse.from_json(json_object: response.body)
239
+ end
240
+
241
+ # Returns metadata for `Item` PATCHs.
242
+ #
243
+ # @param id [String]
244
+ # @param request_options [Merge::RequestOptions]
245
+ # @return [Merge::Accounting::MetaResponse]
246
+ # @example
247
+ # api = Merge::Client.new(
248
+ # base_url: "https://api.example.com",
249
+ # environment: Merge::Environment::PRODUCTION,
250
+ # api_key: "YOUR_AUTH_TOKEN"
251
+ # )
252
+ # api.accounting.items.meta_patch_retrieve(id: "id")
253
+ def meta_patch_retrieve(id:, request_options: nil)
254
+ response = @request_client.conn.get do |req|
255
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
256
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
257
+ req.headers["X-Account-Token"] = request_options.account_token unless request_options&.account_token.nil?
258
+ req.headers = {
259
+ **(req.headers || {}),
260
+ **@request_client.get_headers,
261
+ **(request_options&.additional_headers || {})
262
+ }.compact
263
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
264
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
265
+ end
266
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
267
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
268
+ end
269
+ req.url "#{@request_client.get_url(request_options: request_options)}/accounting/v1/items/meta/patch/#{id}"
270
+ end
271
+ Merge::Accounting::MetaResponse.from_json(json_object: response.body)
272
+ end
273
+
274
+ # Returns metadata for `Item` POSTs.
275
+ #
276
+ # @param request_options [Merge::RequestOptions]
277
+ # @return [Merge::Accounting::MetaResponse]
278
+ # @example
279
+ # api = Merge::Client.new(
280
+ # base_url: "https://api.example.com",
281
+ # environment: Merge::Environment::PRODUCTION,
282
+ # api_key: "YOUR_AUTH_TOKEN"
283
+ # )
284
+ # api.accounting.items.meta_post_retrieve
285
+ def meta_post_retrieve(request_options: nil)
286
+ response = @request_client.conn.get do |req|
287
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
288
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
289
+ req.headers["X-Account-Token"] = request_options.account_token unless request_options&.account_token.nil?
290
+ req.headers = {
291
+ **(req.headers || {}),
292
+ **@request_client.get_headers,
293
+ **(request_options&.additional_headers || {})
294
+ }.compact
295
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
296
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
297
+ end
298
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
299
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
300
+ end
301
+ req.url "#{@request_client.get_url(request_options: request_options)}/accounting/v1/items/meta/post"
302
+ end
303
+ Merge::Accounting::MetaResponse.from_json(json_object: response.body)
304
+ end
141
305
  end
142
306
 
143
307
  class AsyncItemsClient
@@ -222,6 +386,55 @@ module Merge
222
386
  end
223
387
  end
224
388
 
389
+ # Creates an `Item` object with the given values.
390
+ #
391
+ # @param is_debug_mode [Boolean] Whether to include debug fields (such as log file links) in the response.
392
+ # @param run_async [Boolean] Whether or not third-party updates should be run asynchronously.
393
+ # @param model [Hash] Request of type Merge::Accounting::ItemRequestRequest, as a Hash
394
+ # * :name (String)
395
+ # * :status (Merge::Accounting::Status7D1Enum)
396
+ # * :type (Merge::Accounting::Type2BbEnum)
397
+ # * :unit_price (Float)
398
+ # * :purchase_price (Float)
399
+ # * :purchase_account (Hash)
400
+ # * :sales_account (Hash)
401
+ # * :company (Hash)
402
+ # * :purchase_tax_rate (Hash)
403
+ # * :sales_tax_rate (Hash)
404
+ # * :integration_params (Hash{String => Object})
405
+ # * :linked_account_params (Hash{String => Object})
406
+ # @param request_options [Merge::RequestOptions]
407
+ # @return [Merge::Accounting::ItemResponse]
408
+ # @example
409
+ # api = Merge::Client.new(
410
+ # base_url: "https://api.example.com",
411
+ # environment: Merge::Environment::PRODUCTION,
412
+ # api_key: "YOUR_AUTH_TOKEN"
413
+ # )
414
+ # api.accounting.items.create(model: { })
415
+ def create(model:, is_debug_mode: nil, run_async: nil, request_options: nil)
416
+ Async do
417
+ response = @request_client.conn.post do |req|
418
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
419
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
420
+ req.headers["X-Account-Token"] = request_options.account_token unless request_options&.account_token.nil?
421
+ req.headers = {
422
+ **(req.headers || {}),
423
+ **@request_client.get_headers,
424
+ **(request_options&.additional_headers || {})
425
+ }.compact
426
+ req.params = {
427
+ **(request_options&.additional_query_parameters || {}),
428
+ "is_debug_mode": is_debug_mode,
429
+ "run_async": run_async
430
+ }.compact
431
+ req.body = { **(request_options&.additional_body_parameters || {}), model: model }.compact
432
+ req.url "#{@request_client.get_url(request_options: request_options)}/accounting/v1/items"
433
+ end
434
+ Merge::Accounting::ItemResponse.from_json(json_object: response.body)
435
+ end
436
+ end
437
+
225
438
  # Returns an `Item` object with the given `id`.
226
439
  #
227
440
  # @param id [String]
@@ -272,6 +485,125 @@ module Merge
272
485
  Merge::Accounting::Item.from_json(json_object: response.body)
273
486
  end
274
487
  end
488
+
489
+ # Updates an `Item` object with the given `id`.
490
+ #
491
+ # @param id [String]
492
+ # @param is_debug_mode [Boolean] Whether to include debug fields (such as log file links) in the response.
493
+ # @param run_async [Boolean] Whether or not third-party updates should be run asynchronously.
494
+ # @param model [Hash] Request of type Merge::Accounting::PatchedItemRequestRequest, as a Hash
495
+ # * :name (String)
496
+ # * :status (Merge::Accounting::Status7D1Enum)
497
+ # * :type (Merge::Accounting::Type2BbEnum)
498
+ # * :unit_price (Float)
499
+ # * :purchase_price (Float)
500
+ # * :purchase_account (String)
501
+ # * :sales_account (String)
502
+ # * :company (String)
503
+ # * :purchase_tax_rate (String)
504
+ # * :sales_tax_rate (String)
505
+ # * :integration_params (Hash{String => Object})
506
+ # * :linked_account_params (Hash{String => Object})
507
+ # @param request_options [Merge::RequestOptions]
508
+ # @return [Merge::Accounting::ItemResponse]
509
+ # @example
510
+ # api = Merge::Client.new(
511
+ # base_url: "https://api.example.com",
512
+ # environment: Merge::Environment::PRODUCTION,
513
+ # api_key: "YOUR_AUTH_TOKEN"
514
+ # )
515
+ # api.accounting.items.partial_update(id: "id", model: { })
516
+ def partial_update(id:, model:, is_debug_mode: nil, run_async: nil, request_options: nil)
517
+ Async do
518
+ response = @request_client.conn.patch do |req|
519
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
520
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
521
+ req.headers["X-Account-Token"] = request_options.account_token unless request_options&.account_token.nil?
522
+ req.headers = {
523
+ **(req.headers || {}),
524
+ **@request_client.get_headers,
525
+ **(request_options&.additional_headers || {})
526
+ }.compact
527
+ req.params = {
528
+ **(request_options&.additional_query_parameters || {}),
529
+ "is_debug_mode": is_debug_mode,
530
+ "run_async": run_async
531
+ }.compact
532
+ req.body = { **(request_options&.additional_body_parameters || {}), model: model }.compact
533
+ req.url "#{@request_client.get_url(request_options: request_options)}/accounting/v1/items/#{id}"
534
+ end
535
+ Merge::Accounting::ItemResponse.from_json(json_object: response.body)
536
+ end
537
+ end
538
+
539
+ # Returns metadata for `Item` PATCHs.
540
+ #
541
+ # @param id [String]
542
+ # @param request_options [Merge::RequestOptions]
543
+ # @return [Merge::Accounting::MetaResponse]
544
+ # @example
545
+ # api = Merge::Client.new(
546
+ # base_url: "https://api.example.com",
547
+ # environment: Merge::Environment::PRODUCTION,
548
+ # api_key: "YOUR_AUTH_TOKEN"
549
+ # )
550
+ # api.accounting.items.meta_patch_retrieve(id: "id")
551
+ def meta_patch_retrieve(id:, request_options: nil)
552
+ Async do
553
+ response = @request_client.conn.get do |req|
554
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
555
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
556
+ req.headers["X-Account-Token"] = request_options.account_token unless request_options&.account_token.nil?
557
+ req.headers = {
558
+ **(req.headers || {}),
559
+ **@request_client.get_headers,
560
+ **(request_options&.additional_headers || {})
561
+ }.compact
562
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
563
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
564
+ end
565
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
566
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
567
+ end
568
+ req.url "#{@request_client.get_url(request_options: request_options)}/accounting/v1/items/meta/patch/#{id}"
569
+ end
570
+ Merge::Accounting::MetaResponse.from_json(json_object: response.body)
571
+ end
572
+ end
573
+
574
+ # Returns metadata for `Item` POSTs.
575
+ #
576
+ # @param request_options [Merge::RequestOptions]
577
+ # @return [Merge::Accounting::MetaResponse]
578
+ # @example
579
+ # api = Merge::Client.new(
580
+ # base_url: "https://api.example.com",
581
+ # environment: Merge::Environment::PRODUCTION,
582
+ # api_key: "YOUR_AUTH_TOKEN"
583
+ # )
584
+ # api.accounting.items.meta_post_retrieve
585
+ def meta_post_retrieve(request_options: nil)
586
+ Async do
587
+ response = @request_client.conn.get do |req|
588
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
589
+ req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
590
+ req.headers["X-Account-Token"] = request_options.account_token unless request_options&.account_token.nil?
591
+ req.headers = {
592
+ **(req.headers || {}),
593
+ **@request_client.get_headers,
594
+ **(request_options&.additional_headers || {})
595
+ }.compact
596
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
597
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
598
+ end
599
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
600
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
601
+ end
602
+ req.url "#{@request_client.get_url(request_options: request_options)}/accounting/v1/items/meta/post"
603
+ end
604
+ Merge::Accounting::MetaResponse.from_json(json_object: response.body)
605
+ end
606
+ end
275
607
  end
276
608
  end
277
609
  end
@@ -203,6 +203,7 @@ module Merge
203
203
  # contain some metadata but all other fields are null).
204
204
  # @param is_common_model_field [Boolean] If provided, will only return remote field classes with this
205
205
  # is_common_model_field value
206
+ # @param is_custom [Boolean] If provided, will only return remote fields classes with this is_custom value
206
207
  # @param page_size [Integer] Number of results to return per page.
207
208
  # @param request_options [Merge::RequestOptions]
208
209
  # @return [Merge::Accounting::PaginatedRemoteFieldClassList]
@@ -214,7 +215,7 @@ module Merge
214
215
  # )
215
216
  # api.accounting.journal_entries.lines_remote_field_classes_list
216
217
  def lines_remote_field_classes_list(cursor: nil, include_deleted_data: nil, include_remote_data: nil,
217
- include_shell_data: nil, is_common_model_field: nil, page_size: nil, request_options: nil)
218
+ include_shell_data: nil, is_common_model_field: nil, is_custom: nil, page_size: nil, request_options: nil)
218
219
  response = @request_client.conn.get do |req|
219
220
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
220
221
  req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
@@ -231,6 +232,7 @@ module Merge
231
232
  "include_remote_data": include_remote_data,
232
233
  "include_shell_data": include_shell_data,
233
234
  "is_common_model_field": is_common_model_field,
235
+ "is_custom": is_custom,
234
236
  "page_size": page_size
235
237
  }.compact
236
238
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
@@ -286,6 +288,7 @@ module Merge
286
288
  # contain some metadata but all other fields are null).
287
289
  # @param is_common_model_field [Boolean] If provided, will only return remote field classes with this
288
290
  # is_common_model_field value
291
+ # @param is_custom [Boolean] If provided, will only return remote fields classes with this is_custom value
289
292
  # @param page_size [Integer] Number of results to return per page.
290
293
  # @param request_options [Merge::RequestOptions]
291
294
  # @return [Merge::Accounting::PaginatedRemoteFieldClassList]
@@ -297,7 +300,7 @@ module Merge
297
300
  # )
298
301
  # api.accounting.journal_entries.remote_field_classes_list
299
302
  def remote_field_classes_list(cursor: nil, include_deleted_data: nil, include_remote_data: nil,
300
- include_shell_data: nil, is_common_model_field: nil, page_size: nil, request_options: nil)
303
+ include_shell_data: nil, is_common_model_field: nil, is_custom: nil, page_size: nil, request_options: nil)
301
304
  response = @request_client.conn.get do |req|
302
305
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
303
306
  req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
@@ -314,6 +317,7 @@ module Merge
314
317
  "include_remote_data": include_remote_data,
315
318
  "include_shell_data": include_shell_data,
316
319
  "is_common_model_field": is_common_model_field,
320
+ "is_custom": is_custom,
317
321
  "page_size": page_size
318
322
  }.compact
319
323
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
@@ -520,6 +524,7 @@ module Merge
520
524
  # contain some metadata but all other fields are null).
521
525
  # @param is_common_model_field [Boolean] If provided, will only return remote field classes with this
522
526
  # is_common_model_field value
527
+ # @param is_custom [Boolean] If provided, will only return remote fields classes with this is_custom value
523
528
  # @param page_size [Integer] Number of results to return per page.
524
529
  # @param request_options [Merge::RequestOptions]
525
530
  # @return [Merge::Accounting::PaginatedRemoteFieldClassList]
@@ -531,7 +536,7 @@ module Merge
531
536
  # )
532
537
  # api.accounting.journal_entries.lines_remote_field_classes_list
533
538
  def lines_remote_field_classes_list(cursor: nil, include_deleted_data: nil, include_remote_data: nil,
534
- include_shell_data: nil, is_common_model_field: nil, page_size: nil, request_options: nil)
539
+ include_shell_data: nil, is_common_model_field: nil, is_custom: nil, page_size: nil, request_options: nil)
535
540
  Async do
536
541
  response = @request_client.conn.get do |req|
537
542
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -549,6 +554,7 @@ module Merge
549
554
  "include_remote_data": include_remote_data,
550
555
  "include_shell_data": include_shell_data,
551
556
  "is_common_model_field": is_common_model_field,
557
+ "is_custom": is_custom,
552
558
  "page_size": page_size
553
559
  }.compact
554
560
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
@@ -607,6 +613,7 @@ module Merge
607
613
  # contain some metadata but all other fields are null).
608
614
  # @param is_common_model_field [Boolean] If provided, will only return remote field classes with this
609
615
  # is_common_model_field value
616
+ # @param is_custom [Boolean] If provided, will only return remote fields classes with this is_custom value
610
617
  # @param page_size [Integer] Number of results to return per page.
611
618
  # @param request_options [Merge::RequestOptions]
612
619
  # @return [Merge::Accounting::PaginatedRemoteFieldClassList]
@@ -618,7 +625,7 @@ module Merge
618
625
  # )
619
626
  # api.accounting.journal_entries.remote_field_classes_list
620
627
  def remote_field_classes_list(cursor: nil, include_deleted_data: nil, include_remote_data: nil,
621
- include_shell_data: nil, is_common_model_field: nil, page_size: nil, request_options: nil)
628
+ include_shell_data: nil, is_common_model_field: nil, is_custom: nil, page_size: nil, request_options: nil)
622
629
  Async do
623
630
  response = @request_client.conn.get do |req|
624
631
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -636,6 +643,7 @@ module Merge
636
643
  "include_remote_data": include_remote_data,
637
644
  "include_shell_data": include_shell_data,
638
645
  "is_common_model_field": is_common_model_field,
646
+ "is_custom": is_custom,
639
647
  "page_size": page_size
640
648
  }.compact
641
649
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
@@ -260,6 +260,7 @@ module Merge
260
260
  # contain some metadata but all other fields are null).
261
261
  # @param is_common_model_field [Boolean] If provided, will only return remote field classes with this
262
262
  # is_common_model_field value
263
+ # @param is_custom [Boolean] If provided, will only return remote fields classes with this is_custom value
263
264
  # @param page_size [Integer] Number of results to return per page.
264
265
  # @param request_options [Merge::RequestOptions]
265
266
  # @return [Merge::Accounting::PaginatedRemoteFieldClassList]
@@ -271,7 +272,7 @@ module Merge
271
272
  # )
272
273
  # api.accounting.payments.line_items_remote_field_classes_list
273
274
  def line_items_remote_field_classes_list(cursor: nil, include_deleted_data: nil, include_remote_data: nil,
274
- include_shell_data: nil, is_common_model_field: nil, page_size: nil, request_options: nil)
275
+ include_shell_data: nil, is_common_model_field: nil, is_custom: nil, page_size: nil, request_options: nil)
275
276
  response = @request_client.conn.get do |req|
276
277
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
277
278
  req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
@@ -288,6 +289,7 @@ module Merge
288
289
  "include_remote_data": include_remote_data,
289
290
  "include_shell_data": include_shell_data,
290
291
  "is_common_model_field": is_common_model_field,
292
+ "is_custom": is_custom,
291
293
  "page_size": page_size
292
294
  }.compact
293
295
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
@@ -376,6 +378,7 @@ module Merge
376
378
  # contain some metadata but all other fields are null).
377
379
  # @param is_common_model_field [Boolean] If provided, will only return remote field classes with this
378
380
  # is_common_model_field value
381
+ # @param is_custom [Boolean] If provided, will only return remote fields classes with this is_custom value
379
382
  # @param page_size [Integer] Number of results to return per page.
380
383
  # @param request_options [Merge::RequestOptions]
381
384
  # @return [Merge::Accounting::PaginatedRemoteFieldClassList]
@@ -387,7 +390,7 @@ module Merge
387
390
  # )
388
391
  # api.accounting.payments.remote_field_classes_list
389
392
  def remote_field_classes_list(cursor: nil, include_deleted_data: nil, include_remote_data: nil,
390
- include_shell_data: nil, is_common_model_field: nil, page_size: nil, request_options: nil)
393
+ include_shell_data: nil, is_common_model_field: nil, is_custom: nil, page_size: nil, request_options: nil)
391
394
  response = @request_client.conn.get do |req|
392
395
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
393
396
  req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
@@ -404,6 +407,7 @@ module Merge
404
407
  "include_remote_data": include_remote_data,
405
408
  "include_shell_data": include_shell_data,
406
409
  "is_common_model_field": is_common_model_field,
410
+ "is_custom": is_custom,
407
411
  "page_size": page_size
408
412
  }.compact
409
413
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
@@ -668,6 +672,7 @@ module Merge
668
672
  # contain some metadata but all other fields are null).
669
673
  # @param is_common_model_field [Boolean] If provided, will only return remote field classes with this
670
674
  # is_common_model_field value
675
+ # @param is_custom [Boolean] If provided, will only return remote fields classes with this is_custom value
671
676
  # @param page_size [Integer] Number of results to return per page.
672
677
  # @param request_options [Merge::RequestOptions]
673
678
  # @return [Merge::Accounting::PaginatedRemoteFieldClassList]
@@ -679,7 +684,7 @@ module Merge
679
684
  # )
680
685
  # api.accounting.payments.line_items_remote_field_classes_list
681
686
  def line_items_remote_field_classes_list(cursor: nil, include_deleted_data: nil, include_remote_data: nil,
682
- include_shell_data: nil, is_common_model_field: nil, page_size: nil, request_options: nil)
687
+ include_shell_data: nil, is_common_model_field: nil, is_custom: nil, page_size: nil, request_options: nil)
683
688
  Async do
684
689
  response = @request_client.conn.get do |req|
685
690
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -697,6 +702,7 @@ module Merge
697
702
  "include_remote_data": include_remote_data,
698
703
  "include_shell_data": include_shell_data,
699
704
  "is_common_model_field": is_common_model_field,
705
+ "is_custom": is_custom,
700
706
  "page_size": page_size
701
707
  }.compact
702
708
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
@@ -790,6 +796,7 @@ module Merge
790
796
  # contain some metadata but all other fields are null).
791
797
  # @param is_common_model_field [Boolean] If provided, will only return remote field classes with this
792
798
  # is_common_model_field value
799
+ # @param is_custom [Boolean] If provided, will only return remote fields classes with this is_custom value
793
800
  # @param page_size [Integer] Number of results to return per page.
794
801
  # @param request_options [Merge::RequestOptions]
795
802
  # @return [Merge::Accounting::PaginatedRemoteFieldClassList]
@@ -801,7 +808,7 @@ module Merge
801
808
  # )
802
809
  # api.accounting.payments.remote_field_classes_list
803
810
  def remote_field_classes_list(cursor: nil, include_deleted_data: nil, include_remote_data: nil,
804
- include_shell_data: nil, is_common_model_field: nil, page_size: nil, request_options: nil)
811
+ include_shell_data: nil, is_common_model_field: nil, is_custom: nil, page_size: nil, request_options: nil)
805
812
  Async do
806
813
  response = @request_client.conn.get do |req|
807
814
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -819,6 +826,7 @@ module Merge
819
826
  "include_remote_data": include_remote_data,
820
827
  "include_shell_data": include_shell_data,
821
828
  "is_common_model_field": is_common_model_field,
829
+ "is_custom": is_custom,
822
830
  "page_size": page_size
823
831
  }.compact
824
832
  unless request_options.nil? || request_options&.additional_body_parameters.nil?