Skip to content

Commit ad23663

Browse files
committed
SDK regeneration
1 parent 9162324 commit ad23663

File tree

457 files changed

+24299
-1844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

457 files changed

+24299
-1844
lines changed

lib/merge_ruby_client/accounting/accounting_periods/client.rb

+18-4
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@ def initialize(request_client:)
2020
# Returns a list of `AccountingPeriod` objects.
2121
#
2222
# @param cursor [String] The pagination cursor value.
23-
# @param include_deleted_data [Boolean] Whether to include data that was marked as deleted by third party webhooks.
23+
# @param include_deleted_data [Boolean] Indicates whether or not this object has been deleted in the third party
24+
# platform. Full coverage deletion detection is a premium add-on. Native deletion
25+
# detection is offered for free with limited coverage. [Learn
26+
# more](https://docs.merge.dev/integrations/hris/supported-features/).
2427
# @param include_remote_data [Boolean] Whether to include the original data Merge fetched from the third-party to
2528
# produce these models.
29+
# @param include_shell_data [Boolean] Whether to include shell records. Shell records are empty records (they may
30+
# contain some metadata but all other fields are null).
2631
# @param page_size [Integer] Number of results to return per page.
2732
# @param request_options [Merge::RequestOptions]
2833
# @return [Merge::Accounting::PaginatedAccountingPeriodList]
@@ -33,7 +38,8 @@ def initialize(request_client:)
3338
# api_key: "YOUR_AUTH_TOKEN"
3439
# )
3540
# api.accounting.accounting_periods.list
36-
def list(cursor: nil, include_deleted_data: nil, include_remote_data: nil, page_size: nil, request_options: nil)
41+
def list(cursor: nil, include_deleted_data: nil, include_remote_data: nil, include_shell_data: nil,
42+
page_size: nil, request_options: nil)
3743
response = @request_client.conn.get do |req|
3844
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
3945
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
@@ -48,6 +54,7 @@ def list(cursor: nil, include_deleted_data: nil, include_remote_data: nil, page_
4854
"cursor": cursor,
4955
"include_deleted_data": include_deleted_data,
5056
"include_remote_data": include_remote_data,
57+
"include_shell_data": include_shell_data,
5158
"page_size": page_size
5259
}.compact
5360
unless request_options.nil? || request_options&.additional_body_parameters.nil?
@@ -108,9 +115,14 @@ def initialize(request_client:)
108115
# Returns a list of `AccountingPeriod` objects.
109116
#
110117
# @param cursor [String] The pagination cursor value.
111-
# @param include_deleted_data [Boolean] Whether to include data that was marked as deleted by third party webhooks.
118+
# @param include_deleted_data [Boolean] Indicates whether or not this object has been deleted in the third party
119+
# platform. Full coverage deletion detection is a premium add-on. Native deletion
120+
# detection is offered for free with limited coverage. [Learn
121+
# more](https://docs.merge.dev/integrations/hris/supported-features/).
112122
# @param include_remote_data [Boolean] Whether to include the original data Merge fetched from the third-party to
113123
# produce these models.
124+
# @param include_shell_data [Boolean] Whether to include shell records. Shell records are empty records (they may
125+
# contain some metadata but all other fields are null).
114126
# @param page_size [Integer] Number of results to return per page.
115127
# @param request_options [Merge::RequestOptions]
116128
# @return [Merge::Accounting::PaginatedAccountingPeriodList]
@@ -121,7 +133,8 @@ def initialize(request_client:)
121133
# api_key: "YOUR_AUTH_TOKEN"
122134
# )
123135
# api.accounting.accounting_periods.list
124-
def list(cursor: nil, include_deleted_data: nil, include_remote_data: nil, page_size: nil, request_options: nil)
136+
def list(cursor: nil, include_deleted_data: nil, include_remote_data: nil, include_shell_data: nil,
137+
page_size: nil, request_options: nil)
125138
Async do
126139
response = @request_client.conn.get do |req|
127140
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -137,6 +150,7 @@ def list(cursor: nil, include_deleted_data: nil, include_remote_data: nil, page_
137150
"cursor": cursor,
138151
"include_deleted_data": include_deleted_data,
139152
"include_remote_data": include_remote_data,
153+
"include_shell_data": include_shell_data,
140154
"page_size": page_size
141155
}.compact
142156
unless request_options.nil? || request_options&.additional_body_parameters.nil?

lib/merge_ruby_client/accounting/accounts/client.rb

+26-8
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,21 @@ def initialize(request_client:)
2727

2828
# Returns a list of `Account` objects.
2929
#
30+
# @param account_type [String] If provided, will only provide accounts with the passed in enum.
3031
# @param company_id [String] If provided, will only return accounts for this company.
3132
# @param created_after [DateTime] If provided, will only return objects created after this datetime.
3233
# @param created_before [DateTime] If provided, will only return objects created before this datetime.
3334
# @param cursor [String] The pagination cursor value.
3435
# @param expand [String] Which relations should be returned in expanded form. Multiple relation names
3536
# should be comma separated without spaces.
36-
# @param include_deleted_data [Boolean] Whether to include data that was marked as deleted by third party webhooks.
37+
# @param include_deleted_data [Boolean] Indicates whether or not this object has been deleted in the third party
38+
# platform. Full coverage deletion detection is a premium add-on. Native deletion
39+
# detection is offered for free with limited coverage. [Learn
40+
# more](https://docs.merge.dev/integrations/hris/supported-features/).
3741
# @param include_remote_data [Boolean] Whether to include the original data Merge fetched from the third-party to
3842
# produce these models.
43+
# @param include_shell_data [Boolean] Whether to include shell records. Shell records are empty records (they may
44+
# contain some metadata but all other fields are null).
3945
# @param modified_after [DateTime] If provided, only objects synced by Merge after this date time will be returned.
4046
# @param modified_before [DateTime] If provided, only objects synced by Merge before this date time will be
4147
# returned.
@@ -54,8 +60,8 @@ def initialize(request_client:)
5460
# api_key: "YOUR_AUTH_TOKEN"
5561
# )
5662
# api.accounting.accounts.list
57-
def list(company_id: nil, created_after: nil, created_before: nil, cursor: nil, expand: nil,
58-
include_deleted_data: nil, include_remote_data: nil, modified_after: nil, modified_before: nil, page_size: nil, remote_fields: nil, remote_id: nil, show_enum_origins: nil, request_options: nil)
63+
def list(account_type: nil, company_id: nil, created_after: nil, created_before: nil, cursor: nil, expand: nil,
64+
include_deleted_data: nil, include_remote_data: nil, include_shell_data: nil, modified_after: nil, modified_before: nil, page_size: nil, remote_fields: nil, remote_id: nil, show_enum_origins: nil, request_options: nil)
5965
response = @request_client.conn.get do |req|
6066
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
6167
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
@@ -67,13 +73,15 @@ def list(company_id: nil, created_after: nil, created_before: nil, cursor: nil,
6773
}.compact
6874
req.params = {
6975
**(request_options&.additional_query_parameters || {}),
76+
"account_type": account_type,
7077
"company_id": company_id,
7178
"created_after": created_after,
7279
"created_before": created_before,
7380
"cursor": cursor,
7481
"expand": expand,
7582
"include_deleted_data": include_deleted_data,
7683
"include_remote_data": include_remote_data,
84+
"include_shell_data": include_shell_data,
7785
"modified_after": modified_after,
7886
"modified_before": modified_before,
7987
"page_size": page_size,
@@ -98,9 +106,10 @@ def list(company_id: nil, created_after: nil, created_before: nil, cursor: nil,
98106
# * :description (String)
99107
# * :classification (Merge::Accounting::ClassificationEnum)
100108
# * :type (String)
109+
# * :account_type (Merge::Accounting::AccountAccountTypeEnum)
101110
# * :status (Merge::Accounting::AccountStatusEnum)
102111
# * :current_balance (Float)
103-
# * :currency (Merge::Accounting::CurrencyEnum)
112+
# * :currency (Merge::Accounting::TransactionCurrencyEnum)
104113
# * :account_number (String)
105114
# * :parent_account (String)
106115
# * :company (String)
@@ -227,15 +236,21 @@ def initialize(request_client:)
227236

228237
# Returns a list of `Account` objects.
229238
#
239+
# @param account_type [String] If provided, will only provide accounts with the passed in enum.
230240
# @param company_id [String] If provided, will only return accounts for this company.
231241
# @param created_after [DateTime] If provided, will only return objects created after this datetime.
232242
# @param created_before [DateTime] If provided, will only return objects created before this datetime.
233243
# @param cursor [String] The pagination cursor value.
234244
# @param expand [String] Which relations should be returned in expanded form. Multiple relation names
235245
# should be comma separated without spaces.
236-
# @param include_deleted_data [Boolean] Whether to include data that was marked as deleted by third party webhooks.
246+
# @param include_deleted_data [Boolean] Indicates whether or not this object has been deleted in the third party
247+
# platform. Full coverage deletion detection is a premium add-on. Native deletion
248+
# detection is offered for free with limited coverage. [Learn
249+
# more](https://docs.merge.dev/integrations/hris/supported-features/).
237250
# @param include_remote_data [Boolean] Whether to include the original data Merge fetched from the third-party to
238251
# produce these models.
252+
# @param include_shell_data [Boolean] Whether to include shell records. Shell records are empty records (they may
253+
# contain some metadata but all other fields are null).
239254
# @param modified_after [DateTime] If provided, only objects synced by Merge after this date time will be returned.
240255
# @param modified_before [DateTime] If provided, only objects synced by Merge before this date time will be
241256
# returned.
@@ -254,8 +269,8 @@ def initialize(request_client:)
254269
# api_key: "YOUR_AUTH_TOKEN"
255270
# )
256271
# api.accounting.accounts.list
257-
def list(company_id: nil, created_after: nil, created_before: nil, cursor: nil, expand: nil,
258-
include_deleted_data: nil, include_remote_data: nil, modified_after: nil, modified_before: nil, page_size: nil, remote_fields: nil, remote_id: nil, show_enum_origins: nil, request_options: nil)
272+
def list(account_type: nil, company_id: nil, created_after: nil, created_before: nil, cursor: nil, expand: nil,
273+
include_deleted_data: nil, include_remote_data: nil, include_shell_data: nil, modified_after: nil, modified_before: nil, page_size: nil, remote_fields: nil, remote_id: nil, show_enum_origins: nil, request_options: nil)
259274
Async do
260275
response = @request_client.conn.get do |req|
261276
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -268,13 +283,15 @@ def list(company_id: nil, created_after: nil, created_before: nil, cursor: nil,
268283
}.compact
269284
req.params = {
270285
**(request_options&.additional_query_parameters || {}),
286+
"account_type": account_type,
271287
"company_id": company_id,
272288
"created_after": created_after,
273289
"created_before": created_before,
274290
"cursor": cursor,
275291
"expand": expand,
276292
"include_deleted_data": include_deleted_data,
277293
"include_remote_data": include_remote_data,
294+
"include_shell_data": include_shell_data,
278295
"modified_after": modified_after,
279296
"modified_before": modified_before,
280297
"page_size": page_size,
@@ -300,9 +317,10 @@ def list(company_id: nil, created_after: nil, created_before: nil, cursor: nil,
300317
# * :description (String)
301318
# * :classification (Merge::Accounting::ClassificationEnum)
302319
# * :type (String)
320+
# * :account_type (Merge::Accounting::AccountAccountTypeEnum)
303321
# * :status (Merge::Accounting::AccountStatusEnum)
304322
# * :current_balance (Float)
305-
# * :currency (Merge::Accounting::CurrencyEnum)
323+
# * :currency (Merge::Accounting::TransactionCurrencyEnum)
306324
# * :account_number (String)
307325
# * :parent_account (String)
308326
# * :company (String)

lib/merge_ruby_client/accounting/async_passthrough/client.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_relative "../../../requests"
44
require_relative "../types/data_passthrough_request"
55
require_relative "../types/async_passthrough_reciept"
6-
require_relative "../types/remote_response"
6+
require_relative "types/async_passthrough_retrieve_response"
77
require "async"
88

99
module Merge
@@ -61,7 +61,7 @@ def create(request:, request_options: nil)
6161
#
6262
# @param async_passthrough_receipt_id [String]
6363
# @param request_options [Merge::RequestOptions]
64-
# @return [Merge::Accounting::RemoteResponse]
64+
# @return [Merge::Accounting::RemoteResponse, String]
6565
# @example
6666
# api = Merge::Client.new(
6767
# base_url: "https://api.example.com",
@@ -87,7 +87,7 @@ def retrieve(async_passthrough_receipt_id:, request_options: nil)
8787
end
8888
req.url "#{@request_client.get_url(request_options: request_options)}/accounting/v1/async-passthrough/#{async_passthrough_receipt_id}"
8989
end
90-
Merge::Accounting::RemoteResponse.from_json(json_object: response.body)
90+
Merge::Accounting::AsyncPassthrough::AsyncPassthroughRetrieveResponse.from_json(json_object: response.body)
9191
end
9292
end
9393

@@ -146,7 +146,7 @@ def create(request:, request_options: nil)
146146
#
147147
# @param async_passthrough_receipt_id [String]
148148
# @param request_options [Merge::RequestOptions]
149-
# @return [Merge::Accounting::RemoteResponse]
149+
# @return [Merge::Accounting::RemoteResponse, String]
150150
# @example
151151
# api = Merge::Client.new(
152152
# base_url: "https://api.example.com",
@@ -173,7 +173,7 @@ def retrieve(async_passthrough_receipt_id:, request_options: nil)
173173
end
174174
req.url "#{@request_client.get_url(request_options: request_options)}/accounting/v1/async-passthrough/#{async_passthrough_receipt_id}"
175175
end
176-
Merge::Accounting::RemoteResponse.from_json(json_object: response.body)
176+
Merge::Accounting::AsyncPassthrough::AsyncPassthroughRetrieveResponse.from_json(json_object: response.body)
177177
end
178178
end
179179
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# frozen_string_literal: true
2+
3+
require "json"
4+
require_relative "../../types/remote_response"
5+
6+
module Merge
7+
module Accounting
8+
class AsyncPassthrough
9+
class AsyncPassthroughRetrieveResponse
10+
# Deserialize a JSON object to an instance of AsyncPassthroughRetrieveResponse
11+
#
12+
# @param json_object [String]
13+
# @return [Merge::Accounting::AsyncPassthrough::AsyncPassthroughRetrieveResponse]
14+
def self.from_json(json_object:)
15+
struct = JSON.parse(json_object, object_class: OpenStruct)
16+
begin
17+
Merge::Accounting::RemoteResponse.validate_raw(obj: struct)
18+
return Merge::Accounting::RemoteResponse.from_json(json_object: struct) unless struct.nil?
19+
20+
return nil
21+
rescue StandardError
22+
# noop
23+
end
24+
begin
25+
struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
26+
return struct unless struct.nil?
27+
28+
return nil
29+
rescue StandardError
30+
# noop
31+
end
32+
struct
33+
end
34+
35+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
36+
# hash and check each fields type against the current object's property
37+
# definitions.
38+
#
39+
# @param obj [Object]
40+
# @return [Void]
41+
def self.validate_raw(obj:)
42+
begin
43+
return Merge::Accounting::RemoteResponse.validate_raw(obj: obj)
44+
rescue StandardError
45+
# noop
46+
end
47+
begin
48+
return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
49+
rescue StandardError
50+
# noop
51+
end
52+
raise("Passed value matched no type within the union, validation failed.")
53+
end
54+
end
55+
end
56+
end
57+
end

0 commit comments

Comments
 (0)