C# client for the ComboCurve REST API
View the Project on GitHub insidepetroleum/combocurve-client-csharp
All URIs are relative to https://api.combocurve.com
| Method | HTTP request | Description |
|---|---|---|
| DeleteInventoryScenarioQualifiers | DELETE /v1/projects/{projectId}/inventory/scenarios/{scenarioId}/qualifiers | Deletes qualifiers of an inventory scenario. A regular scenario is not found. |
| GetInventoryScenarioQualifiers | GET /v1/projects/{projectId}/inventory/scenarios/{scenarioId}/qualifiers | Returns the qualifiers of an inventory scenario, grouped by econ model. A regular scenario is not found. |
| PostInventoryScenarioQualifiers | POST /v1/projects/{projectId}/inventory/scenarios/{scenarioId}/qualifiers | Adds qualifiers to an inventory scenario. A regular scenario is not found. |
| PutInventoryScenarioQualifiers | PUT /v1/projects/{projectId}/inventory/scenarios/{scenarioId}/qualifiers | Renames qualifiers of an inventory scenario. A regular scenario is not found. |
void DeleteInventoryScenarioQualifiers (string scenarioId, string projectId, string econNames, string qualifierNames)
Deletes qualifiers of an inventory scenario. A regular scenario is not found.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;
namespace Example
{
public class DeleteInventoryScenarioQualifiersExample
{
public static void Main()
{
// Use this to create your service account manually
var serviceAccount = new ServiceAccount
{
ClientEmail = "YOUR_CLIENT_EMAIL",
ClientId = "YOUR_CLIENT_ID",
PrivateKey = "YOUR_PRIVATE_KEY"
};
// Or use this to load it from a JSON file
// var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");
// Set your API key
var apiKey = "YOUR_API_KEY";
var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);
// Or use the specific API class (Recommended)
// var apiInstance = new InventoryScenarioQualifiersApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
var econNames = new string[] { "econNames_example" }; // IEnumerable<string> |
var qualifierNames = new string[] { "qualifierNames_example" }; // IEnumerable<string> |
try
{
// Deletes qualifiers of an inventory scenario. A regular scenario is not found.
apiInstance.DeleteInventoryScenarioQualifiers(scenarioId, projectId, econNames, qualifierNames);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InventoryScenarioQualifiersApi.DeleteInventoryScenarioQualifiers: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| scenarioId | string | ||
| projectId | string | ||
| econNames | string | ||
| qualifierNames | string |
void (empty response body)
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 204 | NoContent Response | * x-delete-count - | | 400 | BadRequest Response | - | | 404 | NotFound Response | - | | 409 | Conflict Response. The scenario changed while the request was processed. Retry the request. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InventoryScenarioQualifiersReadOKResponse GetInventoryScenarioQualifiers (string scenarioId, string projectId, string econName = null)
Returns the qualifiers of an inventory scenario, grouped by econ model. A regular scenario is not found.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;
namespace Example
{
public class GetInventoryScenarioQualifiersExample
{
public static void Main()
{
// Use this to create your service account manually
var serviceAccount = new ServiceAccount
{
ClientEmail = "YOUR_CLIENT_EMAIL",
ClientId = "YOUR_CLIENT_ID",
PrivateKey = "YOUR_PRIVATE_KEY"
};
// Or use this to load it from a JSON file
// var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");
// Set your API key
var apiKey = "YOUR_API_KEY";
var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);
// Or use the specific API class (Recommended)
// var apiInstance = new InventoryScenarioQualifiersApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
var econName = new string[] { "econName_example" }; // IEnumerable<string> | (optional)
try
{
// Returns the qualifiers of an inventory scenario, grouped by econ model. A regular scenario is not found.
InventoryScenarioQualifiersReadOKResponse result = apiInstance.GetInventoryScenarioQualifiers(scenarioId, projectId, econName);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InventoryScenarioQualifiersApi.GetInventoryScenarioQualifiers: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| scenarioId | string | ||
| projectId | string | ||
| econName | string | [optional] |
InventoryScenarioQualifiersReadOKResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 200 | OK Response | - | | 404 | NotFound Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InventoryScenarioQualifiersUpsertMultiStatusResponse PostInventoryScenarioQualifiers (string scenarioId, string projectId, List
payload)
Adds qualifiers to an inventory scenario. A regular scenario is not found.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;
namespace Example
{
public class PostInventoryScenarioQualifiersExample
{
public static void Main()
{
// Use this to create your service account manually
var serviceAccount = new ServiceAccount
{
ClientEmail = "YOUR_CLIENT_EMAIL",
ClientId = "YOUR_CLIENT_ID",
PrivateKey = "YOUR_PRIVATE_KEY"
};
// Or use this to load it from a JSON file
// var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");
// Set your API key
var apiKey = "YOUR_API_KEY";
var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);
// Or use the specific API class (Recommended)
// var apiInstance = new InventoryScenarioQualifiersApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
var payload = new List<InventoryScenarioQualifierUpsertPayload>(); // List<InventoryScenarioQualifierUpsertPayload> |
try
{
// Adds qualifiers to an inventory scenario. A regular scenario is not found.
InventoryScenarioQualifiersUpsertMultiStatusResponse result = apiInstance.PostInventoryScenarioQualifiers(scenarioId, projectId, payload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InventoryScenarioQualifiersApi.PostInventoryScenarioQualifiers: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| scenarioId | string | ||
| projectId | string | ||
| payload | List<InventoryScenarioQualifierUpsertPayload> |
InventoryScenarioQualifiersUpsertMultiStatusResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | MultiStatus Response | - | | 404 | NotFound Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InventoryScenarioQualifiersUpsertMultiStatusResponse PutInventoryScenarioQualifiers (string scenarioId, string projectId, List
payload)
Renames qualifiers of an inventory scenario. A regular scenario is not found.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using ComboCurve.Api.Api;
using ComboCurve.Api.Auth;
using ComboCurve.Api.Client;
using ComboCurve.Api.Model;
namespace Example
{
public class PutInventoryScenarioQualifiersExample
{
public static void Main()
{
// Use this to create your service account manually
var serviceAccount = new ServiceAccount
{
ClientEmail = "YOUR_CLIENT_EMAIL",
ClientId = "YOUR_CLIENT_ID",
PrivateKey = "YOUR_PRIVATE_KEY"
};
// Or use this to load it from a JSON file
// var serviceAccount = ServiceAccount.FromFile("PATH_TO_JSON_FILE");
// Set your API key
var apiKey = "YOUR_API_KEY";
var apiInstance = new ComboCurveV1Api(serviceAccount, apiKey);
// Or use the specific API class (Recommended)
// var apiInstance = new InventoryScenarioQualifiersApi(serviceAccount, apiKey);
var scenarioId = "scenarioId_example"; // string |
var projectId = "projectId_example"; // string |
var payload = new List<InventoryScenarioQualifierUpsertPayload>(); // List<InventoryScenarioQualifierUpsertPayload> |
try
{
// Renames qualifiers of an inventory scenario. A regular scenario is not found.
InventoryScenarioQualifiersUpsertMultiStatusResponse result = apiInstance.PutInventoryScenarioQualifiers(scenarioId, projectId, payload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InventoryScenarioQualifiersApi.PutInventoryScenarioQualifiers: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
| Name | Type | Description | Notes |
|---|---|---|---|
| scenarioId | string | ||
| projectId | string | ||
| payload | List<InventoryScenarioQualifierUpsertPayload> |
InventoryScenarioQualifiersUpsertMultiStatusResponse
API Key, Service Account
| Status code | Description | Response headers | |————-|————-|——————| | 207 | MultiStatus Response | - | | 404 | NotFound Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]