Skip to content

Commit c03fb33

Browse files
authored
Merge pull request #25 from merge-api/fern-bot/06-28-2024-0256PM
(fix): update enum serialization
2 parents a676365 + dc47b46 commit c03fb33

File tree

194 files changed

+1080
-1000
lines changed

Some content is hidden

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

194 files changed

+1080
-1000
lines changed

src/Merge.Client.sln

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client", "Merge.Client\Merge.Client.csproj", "{7C85A18D-E005-41C3-B45E-741361D6A8A3}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client", "Merge.Client\Merge.Client.csproj", "{27AD8103-97AD-423F-BC71-E9BCB0969C7A}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{D3A437A0-C43E-4356-A33D-6BCEDF5AD119}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{5BFBB886-1761-46AD-84F0-6AA9D284B3FE}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -16,13 +16,13 @@ Global
1616
HideSolutionNode = FALSE
1717
EndGlobalSection
1818
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19-
{7C85A18D-E005-41C3-B45E-741361D6A8A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20-
{7C85A18D-E005-41C3-B45E-741361D6A8A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
21-
{7C85A18D-E005-41C3-B45E-741361D6A8A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
22-
{7C85A18D-E005-41C3-B45E-741361D6A8A3}.Release|Any CPU.Build.0 = Release|Any CPU
23-
{D3A437A0-C43E-4356-A33D-6BCEDF5AD119}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24-
{D3A437A0-C43E-4356-A33D-6BCEDF5AD119}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{D3A437A0-C43E-4356-A33D-6BCEDF5AD119}.Release|Any CPU.ActiveCfg = Release|Any CPU
26-
{D3A437A0-C43E-4356-A33D-6BCEDF5AD119}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{27AD8103-97AD-423F-BC71-E9BCB0969C7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{27AD8103-97AD-423F-BC71-E9BCB0969C7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{27AD8103-97AD-423F-BC71-E9BCB0969C7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{27AD8103-97AD-423F-BC71-E9BCB0969C7A}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{5BFBB886-1761-46AD-84F0-6AA9D284B3FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{5BFBB886-1761-46AD-84F0-6AA9D284B3FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{5BFBB886-1761-46AD-84F0-6AA9D284B3FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{5BFBB886-1761-46AD-84F0-6AA9D284B3FE}.Release|Any CPU.Build.0 = Release|Any CPU
2727
EndGlobalSection
2828
EndGlobal

src/Merge.Client/Accounting/AccountDetails/AccountDetailsClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ public AccountDetailsClient(RawClient client)
2121
public async Task<AccountDetails> RetrieveAsync()
2222
{
2323
var response = await _client.MakeRequestAsync(
24-
new RawClient.ApiRequest
24+
new RawClient.JsonApiRequest
2525
{
2626
Method = HttpMethod.Get,
27-
Path = "/accounting/v1/account-details"
27+
Path = "accounting/v1/account-details"
2828
}
2929
);
3030
string responseBody = await response.Raw.Content.ReadAsStringAsync();

src/Merge.Client/Accounting/AccountToken/AccountTokenClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ public AccountTokenClient(RawClient client)
2121
public async Task<AccountToken> RetrieveAsync(string publicToken)
2222
{
2323
var response = await _client.MakeRequestAsync(
24-
new RawClient.ApiRequest
24+
new RawClient.JsonApiRequest
2525
{
2626
Method = HttpMethod.Get,
27-
Path = $"/accounting/v1/account-token/{publicToken}"
27+
Path = $"accounting/v1/account-token/{publicToken}"
2828
}
2929
);
3030
string responseBody = await response.Raw.Content.ReadAsStringAsync();

src/Merge.Client/Accounting/AccountingPeriods/AccountingPeriodsClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public async Task<PaginatedAccountingPeriodList> ListAsync(AccountingPeriodsList
3838
_query["page_size"] = request.PageSize.ToString();
3939
}
4040
var response = await _client.MakeRequestAsync(
41-
new RawClient.ApiRequest
41+
new RawClient.JsonApiRequest
4242
{
4343
Method = HttpMethod.Get,
44-
Path = "/accounting/v1/accounting-periods",
44+
Path = "accounting/v1/accounting-periods",
4545
Query = _query
4646
}
4747
);
@@ -67,10 +67,10 @@ AccountingPeriodsRetrieveRequest request
6767
_query["include_remote_data"] = request.IncludeRemoteData.ToString();
6868
}
6969
var response = await _client.MakeRequestAsync(
70-
new RawClient.ApiRequest
70+
new RawClient.JsonApiRequest
7171
{
7272
Method = HttpMethod.Get,
73-
Path = $"/accounting/v1/accounting-periods/{id}",
73+
Path = $"accounting/v1/accounting-periods/{id}",
7474
Query = _query
7575
}
7676
);

src/Merge.Client/Accounting/Accounts/AccountsClient.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,21 @@ public async Task<PaginatedAccountList> ListAsync(AccountsListRequest request)
6363
}
6464
if (request.RemoteFields != null)
6565
{
66-
_query["remote_fields"] = request.RemoteFields.ToString();
66+
_query["remote_fields"] = JsonSerializer.Serialize(request.RemoteFields.Value);
6767
}
6868
if (request.RemoteId != null)
6969
{
7070
_query["remote_id"] = request.RemoteId;
7171
}
7272
if (request.ShowEnumOrigins != null)
7373
{
74-
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
74+
_query["show_enum_origins"] = JsonSerializer.Serialize(request.ShowEnumOrigins.Value);
7575
}
7676
var response = await _client.MakeRequestAsync(
77-
new RawClient.ApiRequest
77+
new RawClient.JsonApiRequest
7878
{
7979
Method = HttpMethod.Get,
80-
Path = "/accounting/v1/accounts",
80+
Path = "accounting/v1/accounts",
8181
Query = _query
8282
}
8383
);
@@ -104,10 +104,10 @@ public async Task<AccountResponse> CreateAsync(AccountEndpointRequest request)
104104
_query["run_async"] = request.RunAsync.ToString();
105105
}
106106
var response = await _client.MakeRequestAsync(
107-
new RawClient.ApiRequest
107+
new RawClient.JsonApiRequest
108108
{
109109
Method = HttpMethod.Post,
110-
Path = "/accounting/v1/accounts",
110+
Path = "accounting/v1/accounts",
111111
Query = _query
112112
}
113113
);
@@ -135,17 +135,17 @@ public async Task<Account> RetrieveAsync(string id, AccountsRetrieveRequest requ
135135
}
136136
if (request.RemoteFields != null)
137137
{
138-
_query["remote_fields"] = request.RemoteFields.ToString();
138+
_query["remote_fields"] = JsonSerializer.Serialize(request.RemoteFields.Value);
139139
}
140140
if (request.ShowEnumOrigins != null)
141141
{
142-
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
142+
_query["show_enum_origins"] = JsonSerializer.Serialize(request.ShowEnumOrigins.Value);
143143
}
144144
var response = await _client.MakeRequestAsync(
145-
new RawClient.ApiRequest
145+
new RawClient.JsonApiRequest
146146
{
147147
Method = HttpMethod.Get,
148-
Path = $"/accounting/v1/accounts/{id}",
148+
Path = $"accounting/v1/accounts/{id}",
149149
Query = _query
150150
}
151151
);
@@ -163,10 +163,10 @@ public async Task<Account> RetrieveAsync(string id, AccountsRetrieveRequest requ
163163
public async Task<MetaResponse> MetaPostRetrieveAsync()
164164
{
165165
var response = await _client.MakeRequestAsync(
166-
new RawClient.ApiRequest
166+
new RawClient.JsonApiRequest
167167
{
168168
Method = HttpMethod.Get,
169-
Path = "/accounting/v1/accounts/meta/post"
169+
Path = "accounting/v1/accounts/meta/post"
170170
}
171171
);
172172
string responseBody = await response.Raw.Content.ReadAsStringAsync();

src/Merge.Client/Accounting/Addresses/AddressesClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ public async Task<Address> RetrieveAsync(string id, AddressesRetrieveRequest req
3434
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
3535
}
3636
var response = await _client.MakeRequestAsync(
37-
new RawClient.ApiRequest
37+
new RawClient.JsonApiRequest
3838
{
3939
Method = HttpMethod.Get,
40-
Path = $"/accounting/v1/addresses/{id}",
40+
Path = $"accounting/v1/addresses/{id}",
4141
Query = _query
4242
}
4343
);

src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ public AsyncPassthroughClient(RawClient client)
2121
public async Task<AsyncPassthroughReciept> CreateAsync(DataPassthroughRequest request)
2222
{
2323
var response = await _client.MakeRequestAsync(
24-
new RawClient.ApiRequest
24+
new RawClient.JsonApiRequest
2525
{
2626
Method = HttpMethod.Post,
27-
Path = "/accounting/v1/async-passthrough",
27+
Path = "accounting/v1/async-passthrough",
2828
Body = request
2929
}
3030
);
@@ -42,10 +42,10 @@ public async Task<AsyncPassthroughReciept> CreateAsync(DataPassthroughRequest re
4242
public async Task<RemoteResponse> RetrieveAsync(string asyncPassthroughReceiptId)
4343
{
4444
var response = await _client.MakeRequestAsync(
45-
new RawClient.ApiRequest
45+
new RawClient.JsonApiRequest
4646
{
4747
Method = HttpMethod.Get,
48-
Path = $"/accounting/v1/async-passthrough/{asyncPassthroughReceiptId}"
48+
Path = $"accounting/v1/async-passthrough/{asyncPassthroughReceiptId}"
4949
}
5050
);
5151
string responseBody = await response.Raw.Content.ReadAsStringAsync();

src/Merge.Client/Accounting/Attachments/AttachmentsClient.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ public async Task<PaginatedAccountingAttachmentList> ListAsync(AttachmentsListRe
6262
_query["remote_id"] = request.RemoteId;
6363
}
6464
var response = await _client.MakeRequestAsync(
65-
new RawClient.ApiRequest
65+
new RawClient.JsonApiRequest
6666
{
6767
Method = HttpMethod.Get,
68-
Path = "/accounting/v1/attachments",
68+
Path = "accounting/v1/attachments",
6969
Query = _query
7070
}
7171
);
@@ -94,10 +94,10 @@ AccountingAttachmentEndpointRequest request
9494
_query["run_async"] = request.RunAsync.ToString();
9595
}
9696
var response = await _client.MakeRequestAsync(
97-
new RawClient.ApiRequest
97+
new RawClient.JsonApiRequest
9898
{
9999
Method = HttpMethod.Post,
100-
Path = "/accounting/v1/attachments",
100+
Path = "accounting/v1/attachments",
101101
Query = _query
102102
}
103103
);
@@ -123,10 +123,10 @@ AttachmentsRetrieveRequest request
123123
_query["include_remote_data"] = request.IncludeRemoteData.ToString();
124124
}
125125
var response = await _client.MakeRequestAsync(
126-
new RawClient.ApiRequest
126+
new RawClient.JsonApiRequest
127127
{
128128
Method = HttpMethod.Get,
129-
Path = $"/accounting/v1/attachments/{id}",
129+
Path = $"accounting/v1/attachments/{id}",
130130
Query = _query
131131
}
132132
);
@@ -144,10 +144,10 @@ AttachmentsRetrieveRequest request
144144
public async Task<MetaResponse> MetaPostRetrieveAsync()
145145
{
146146
var response = await _client.MakeRequestAsync(
147-
new RawClient.ApiRequest
147+
new RawClient.JsonApiRequest
148148
{
149149
Method = HttpMethod.Get,
150-
Path = "/accounting/v1/attachments/meta/post"
150+
Path = "accounting/v1/attachments/meta/post"
151151
}
152152
);
153153
string responseBody = await response.Raw.Content.ReadAsStringAsync();

src/Merge.Client/Accounting/AuditTrail/AuditTrailClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ public async Task<PaginatedAuditLogEventList> ListAsync(AuditTrailListRequest re
4646
_query["user_email"] = request.UserEmail;
4747
}
4848
var response = await _client.MakeRequestAsync(
49-
new RawClient.ApiRequest
49+
new RawClient.JsonApiRequest
5050
{
5151
Method = HttpMethod.Get,
52-
Path = "/accounting/v1/audit-trail",
52+
Path = "accounting/v1/audit-trail",
5353
Query = _query
5454
}
5555
);

src/Merge.Client/Accounting/AvailableActions/AvailableActionsClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ public AvailableActionsClient(RawClient client)
2121
public async Task<AvailableActions> RetrieveAsync()
2222
{
2323
var response = await _client.MakeRequestAsync(
24-
new RawClient.ApiRequest
24+
new RawClient.JsonApiRequest
2525
{
2626
Method = HttpMethod.Get,
27-
Path = "/accounting/v1/available-actions"
27+
Path = "accounting/v1/available-actions"
2828
}
2929
);
3030
string responseBody = await response.Raw.Content.ReadAsStringAsync();

0 commit comments

Comments
 (0)