Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/Merge.Client.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client", "Merge.Client\Merge.Client.csproj", "{7C85A18D-E005-41C3-B45E-741361D6A8A3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client", "Merge.Client\Merge.Client.csproj", "{27AD8103-97AD-423F-BC71-E9BCB0969C7A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{D3A437A0-C43E-4356-A33D-6BCEDF5AD119}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{5BFBB886-1761-46AD-84F0-6AA9D284B3FE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -16,13 +16,13 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7C85A18D-E005-41C3-B45E-741361D6A8A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C85A18D-E005-41C3-B45E-741361D6A8A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C85A18D-E005-41C3-B45E-741361D6A8A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C85A18D-E005-41C3-B45E-741361D6A8A3}.Release|Any CPU.Build.0 = Release|Any CPU
{D3A437A0-C43E-4356-A33D-6BCEDF5AD119}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3A437A0-C43E-4356-A33D-6BCEDF5AD119}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3A437A0-C43E-4356-A33D-6BCEDF5AD119}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3A437A0-C43E-4356-A33D-6BCEDF5AD119}.Release|Any CPU.Build.0 = Release|Any CPU
{27AD8103-97AD-423F-BC71-E9BCB0969C7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27AD8103-97AD-423F-BC71-E9BCB0969C7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27AD8103-97AD-423F-BC71-E9BCB0969C7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27AD8103-97AD-423F-BC71-E9BCB0969C7A}.Release|Any CPU.Build.0 = Release|Any CPU
{5BFBB886-1761-46AD-84F0-6AA9D284B3FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BFBB886-1761-46AD-84F0-6AA9D284B3FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BFBB886-1761-46AD-84F0-6AA9D284B3FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BFBB886-1761-46AD-84F0-6AA9D284B3FE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public AccountDetailsClient(RawClient client)
public async Task<AccountDetails> RetrieveAsync()
{
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = "/accounting/v1/account-details"
Path = "accounting/v1/account-details"
}
);
string responseBody = await response.Raw.Content.ReadAsStringAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public AccountTokenClient(RawClient client)
public async Task<AccountToken> RetrieveAsync(string publicToken)
{
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = $"/accounting/v1/account-token/{publicToken}"
Path = $"accounting/v1/account-token/{publicToken}"
}
);
string responseBody = await response.Raw.Content.ReadAsStringAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ public async Task<PaginatedAccountingPeriodList> ListAsync(AccountingPeriodsList
_query["page_size"] = request.PageSize.ToString();
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = "/accounting/v1/accounting-periods",
Path = "accounting/v1/accounting-periods",
Query = _query
}
);
Expand All @@ -67,10 +67,10 @@ AccountingPeriodsRetrieveRequest request
_query["include_remote_data"] = request.IncludeRemoteData.ToString();
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = $"/accounting/v1/accounting-periods/{id}",
Path = $"accounting/v1/accounting-periods/{id}",
Query = _query
}
);
Expand Down
24 changes: 12 additions & 12 deletions src/Merge.Client/Accounting/Accounts/AccountsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@ public async Task<PaginatedAccountList> ListAsync(AccountsListRequest request)
}
if (request.RemoteFields != null)
{
_query["remote_fields"] = request.RemoteFields.ToString();
_query["remote_fields"] = JsonSerializer.Serialize(request.RemoteFields.Value);
}
if (request.RemoteId != null)
{
_query["remote_id"] = request.RemoteId;
}
if (request.ShowEnumOrigins != null)
{
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
_query["show_enum_origins"] = JsonSerializer.Serialize(request.ShowEnumOrigins.Value);
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = "/accounting/v1/accounts",
Path = "accounting/v1/accounts",
Query = _query
}
);
Expand All @@ -104,10 +104,10 @@ public async Task<AccountResponse> CreateAsync(AccountEndpointRequest request)
_query["run_async"] = request.RunAsync.ToString();
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Post,
Path = "/accounting/v1/accounts",
Path = "accounting/v1/accounts",
Query = _query
}
);
Expand Down Expand Up @@ -135,17 +135,17 @@ public async Task<Account> RetrieveAsync(string id, AccountsRetrieveRequest requ
}
if (request.RemoteFields != null)
{
_query["remote_fields"] = request.RemoteFields.ToString();
_query["remote_fields"] = JsonSerializer.Serialize(request.RemoteFields.Value);
}
if (request.ShowEnumOrigins != null)
{
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
_query["show_enum_origins"] = JsonSerializer.Serialize(request.ShowEnumOrigins.Value);
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = $"/accounting/v1/accounts/{id}",
Path = $"accounting/v1/accounts/{id}",
Query = _query
}
);
Expand All @@ -163,10 +163,10 @@ public async Task<Account> RetrieveAsync(string id, AccountsRetrieveRequest requ
public async Task<MetaResponse> MetaPostRetrieveAsync()
{
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = "/accounting/v1/accounts/meta/post"
Path = "accounting/v1/accounts/meta/post"
}
);
string responseBody = await response.Raw.Content.ReadAsStringAsync();
Expand Down
4 changes: 2 additions & 2 deletions src/Merge.Client/Accounting/Addresses/AddressesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public async Task<Address> RetrieveAsync(string id, AddressesRetrieveRequest req
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = $"/accounting/v1/addresses/{id}",
Path = $"accounting/v1/addresses/{id}",
Query = _query
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public AsyncPassthroughClient(RawClient client)
public async Task<AsyncPassthroughReciept> CreateAsync(DataPassthroughRequest request)
{
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Post,
Path = "/accounting/v1/async-passthrough",
Path = "accounting/v1/async-passthrough",
Body = request
}
);
Expand All @@ -42,10 +42,10 @@ public async Task<AsyncPassthroughReciept> CreateAsync(DataPassthroughRequest re
public async Task<RemoteResponse> RetrieveAsync(string asyncPassthroughReceiptId)
{
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = $"/accounting/v1/async-passthrough/{asyncPassthroughReceiptId}"
Path = $"accounting/v1/async-passthrough/{asyncPassthroughReceiptId}"
}
);
string responseBody = await response.Raw.Content.ReadAsStringAsync();
Expand Down
16 changes: 8 additions & 8 deletions src/Merge.Client/Accounting/Attachments/AttachmentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ public async Task<PaginatedAccountingAttachmentList> ListAsync(AttachmentsListRe
_query["remote_id"] = request.RemoteId;
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = "/accounting/v1/attachments",
Path = "accounting/v1/attachments",
Query = _query
}
);
Expand Down Expand Up @@ -94,10 +94,10 @@ AccountingAttachmentEndpointRequest request
_query["run_async"] = request.RunAsync.ToString();
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Post,
Path = "/accounting/v1/attachments",
Path = "accounting/v1/attachments",
Query = _query
}
);
Expand All @@ -123,10 +123,10 @@ AttachmentsRetrieveRequest request
_query["include_remote_data"] = request.IncludeRemoteData.ToString();
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = $"/accounting/v1/attachments/{id}",
Path = $"accounting/v1/attachments/{id}",
Query = _query
}
);
Expand All @@ -144,10 +144,10 @@ AttachmentsRetrieveRequest request
public async Task<MetaResponse> MetaPostRetrieveAsync()
{
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = "/accounting/v1/attachments/meta/post"
Path = "accounting/v1/attachments/meta/post"
}
);
string responseBody = await response.Raw.Content.ReadAsStringAsync();
Expand Down
4 changes: 2 additions & 2 deletions src/Merge.Client/Accounting/AuditTrail/AuditTrailClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public async Task<PaginatedAuditLogEventList> ListAsync(AuditTrailListRequest re
_query["user_email"] = request.UserEmail;
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = "/accounting/v1/audit-trail",
Path = "accounting/v1/audit-trail",
Query = _query
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public AvailableActionsClient(RawClient client)
public async Task<AvailableActions> RetrieveAsync()
{
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = "/accounting/v1/available-actions"
Path = "accounting/v1/available-actions"
}
);
string responseBody = await response.Raw.Content.ReadAsStringAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ public async Task<PaginatedBalanceSheetList> ListAsync(BalanceSheetsListRequest
_query["remote_id"] = request.RemoteId;
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = "/accounting/v1/balance-sheets",
Path = "accounting/v1/balance-sheets",
Query = _query
}
);
Expand All @@ -96,10 +96,10 @@ public async Task<BalanceSheet> RetrieveAsync(string id, BalanceSheetsRetrieveRe
_query["include_remote_data"] = request.IncludeRemoteData.ToString();
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = $"/accounting/v1/balance-sheets/{id}",
Path = $"accounting/v1/balance-sheets/{id}",
Query = _query
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ CashFlowStatementsListRequest request
_query["remote_id"] = request.RemoteId;
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = "/accounting/v1/cash-flow-statements",
Path = "accounting/v1/cash-flow-statements",
Query = _query
}
);
Expand Down Expand Up @@ -101,10 +101,10 @@ CashFlowStatementsRetrieveRequest request
_query["include_remote_data"] = request.IncludeRemoteData.ToString();
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = $"/accounting/v1/cash-flow-statements/{id}",
Path = $"accounting/v1/cash-flow-statements/{id}",
Query = _query
}
);
Expand Down
12 changes: 6 additions & 6 deletions src/Merge.Client/Accounting/CompanyInfo/CompanyInfoClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task<PaginatedCompanyInfoList> ListAsync(CompanyInfoListRequest req
}
if (request.Expand != null)
{
_query["expand"] = request.Expand.ToString();
_query["expand"] = JsonSerializer.Serialize(request.Expand.Value);
}
if (request.IncludeDeletedData != null)
{
Expand All @@ -62,10 +62,10 @@ public async Task<PaginatedCompanyInfoList> ListAsync(CompanyInfoListRequest req
_query["remote_id"] = request.RemoteId;
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = "/accounting/v1/company-info",
Path = "accounting/v1/company-info",
Query = _query
}
);
Expand All @@ -85,17 +85,17 @@ public async Task<CompanyInfo> RetrieveAsync(string id, CompanyInfoRetrieveReque
var _query = new Dictionary<string, object>() { };
if (request.Expand != null)
{
_query["expand"] = request.Expand.ToString();
_query["expand"] = JsonSerializer.Serialize(request.Expand.Value);
}
if (request.IncludeRemoteData != null)
{
_query["include_remote_data"] = request.IncludeRemoteData.ToString();
}
var response = await _client.MakeRequestAsync(
new RawClient.ApiRequest
new RawClient.JsonApiRequest
{
Method = HttpMethod.Get,
Path = $"/accounting/v1/company-info/{id}",
Path = $"accounting/v1/company-info/{id}",
Query = _query
}
);
Expand Down
Loading