Skip to content

Latest commit

 

History

History
66 lines (49 loc) · 3.68 KB

File metadata and controls

66 lines (49 loc) · 3.68 KB

Accounting.ProfitAndLoss

Overview

Available Operations

  • Get - Get Profit and Loss

Get

Get Profit and Loss

Example Usage

using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
using System.Collections.Generic;

var sdk = new Apideck(
    consumerId: "test-consumer",
    appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
    apiKey: "<YOUR_BEARER_TOKEN_HERE>"
);

AccountingProfitAndLossOneRequest req = new AccountingProfitAndLossOneRequest() {
    ServiceId = "salesforce",
    CompanyId = "12345",
    Filter = new ProfitAndLossFilter() {
        CustomerId = "123abc",
        StartDate = "2021-01-01",
        EndDate = "2021-12-31",
    },
    PassThrough = new Dictionary<string, object>() {
        { "search", "San Francisco" },
    },
    Fields = "id,updated_at",
};

var res = await sdk.Accounting.ProfitAndLoss.GetAsync(req);

// handle response

Parameters

Parameter Type Required Description
request AccountingProfitAndLossOneRequest ✔️ The request object to use for the request.

Response

AccountingProfitAndLossOneResponse

Errors

Error Type Status Code Content Type
ApideckUnifySdk.Models.Errors.BadRequestResponse 400 application/json
ApideckUnifySdk.Models.Errors.UnauthorizedResponse 401 application/json
ApideckUnifySdk.Models.Errors.PaymentRequiredResponse 402 application/json
ApideckUnifySdk.Models.Errors.NotFoundResponse 404 application/json
ApideckUnifySdk.Models.Errors.UnprocessableResponse 422 application/json
ApideckUnifySdk.Models.Errors.APIException 4XX, 5XX */*