Lithium Accounting Automation Service (AAS) Client Library

Provides operations for integrating Accounting Automation with cloud-based products.

REST Service Client

Class Description
AccountingAutomationClient The entry point of the Accounting Automation Service client library.

Client Controllers

Class Description
Access Provides actions that allow managing requests to access existing subscriptions.
AccountingOffices Provides operations on accounting offices.
ClientSecrets Provides operations to generate client secrets.
DigitalArchive Provides operations on digital archive.
DigitalArchiveProvisioning Provides actions to manage operations in Digital Archive Provisioning.
Management Provides operations on management.
Notifications Provides actions to send notifications.
ThirdParties Provides operations on third parties.
Users Provides actions that allow managing the users registered for a subscription.

Models

Class Description
AccessRequestData Describes the response to a request to create a client or recreate a client secret.
AccessRequestStateData Describes an access request state.
AccessRequestStateResponse Describes the response to a request to get the state of a request to access an existing workspace/organization/appInstance.
AccountingOfficeCustomerData Describes an accounting office client.
AccountingOfficeData Describes an accounting office.
ClientSecretResponseData Describes the response to a request to create a client or recreate a client secret.
CompanyData Describes a company.
CompanyInfo The Company Information.
GetAccoutingOfficesResponse Describes a get accouting offices response.
GetUsersResponseData Describes a get users response.
IdentityClientData Describes an identity client entity.
IdentitySecretData Describes an identity secret.
IdentityUserData Describes an identity user entity.
NotificationData Describes a notification.
NotificationEmailData Describes a notification email.
NotificationEmailReceiverData Describes a notification email receiver.
NotificationParameterData Describes a notification parameter.
ProvisioningParameter Describes a provisioning parameter.
RequestLogData Describes a log message for a request.
SubscriptionUserData Describes a subscription user.
UpdateUsersRequestData Describes a request to update the users configured to receive notifications for a subscription.

Enumerations

Class Description
AccessRequestState Describes the state of a request to access an existing subscription.

Authorization Policies

Policy Description Scope
DefaultScope Defines an authorization policy that requires the default scope. lithium-accauto
AccessSubscriptions Defines the scope required to access the endpoints that allow requesting access to existing subscriptions. lithium-accauto-access
AccountingOffices Scope for Pollen Customers. lithium-accoffices
AccountingOfficesManagement Scope for Pollen Management Api Access. lithium-accoffices-management
AccountingOfficesThirdParty Scope for Pollen Thrid Party Api Access. lithium-accoffices-thirdparty
CreateClients Defines the scope required to access the endpoints that allow creating clients and client secrets. lithium-accauto-clients
DigitalArchive Defines the scope required to access the digital archive operations. lithium-accauto-digitalarchive
DigitalArchiveProvisioning Defines the scope required for the digital archive provisioning. lithium-accauto-digitalarchiveprovisioning
SendNotifications Defines the scope required to access the endpoints that allow sending notifications. lithium-accauto-notifications

Reference

REST Service Client Classes

AccountingAutomationClient

Constructors
AccountingAutomationClient(Uri, BearerTokenCredential)
Parameter Type Description
serviceUri Uri The service URI.
credential BearerTokenCredential The credential that should be used to access the service.
AccountingAutomationClient(Uri, BearerTokenCredential, AccountingAutomationClientOptions)
Parameter Type Description
serviceUri Uri The service URI.
credential BearerTokenCredential The credential that should be used to access the service.
clientOptions AccountingAutomationClientOptions The client options.
Example
Uri address = new Uri("[service-address]");
string clientId = "[client-id]"
string clientSecret = "[client-secret]"

AccountingAutomationClient client = new AccountingAutomationClient(
    new Uri(address),
    new ChallengeCredential(
        async (args, cancellationToken) =>
        {
            ClientSecretCredential innerCredential = new ClientSecretCredential(
                args.AuthorizationUri,
                clientId,
                clientSecret);

            return await innerCredential.GetTokenAsync(cancellationToken).ConfigureAwait(false);
        }));

^ Back to top

Client Controllers Classes

AccessClientController

Provides actions that allow managing requests to access existing subscriptions.

Methods
CancelAccessRequestAsync()

Cancel a request to access an existing subscription.

public async Task<RestServiceResult> CancelAccessRequestAsync(string requestId, CancellationToken cancellationToken = default);

public RestServiceResult CancelAccessRequest(string requestId);
Parameters
Parameter Type Description Rules
requestId string The request id. Required.
Returns
Return Type Description
None The operation has no return value.
Status Codes
Status Code Description
HttpStatusCode.NoContent Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

GetAccessRequestsStateAsync()

Returns the state of a request to access an existing subscription." returns="The state of a request to access an existing subscription.

public async Task<RestServiceResult<System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestStateData>>> GetAccessRequestsStateAsync(System.Collections.Generic.IEnumerable<string> requestIds, CancellationToken cancellationToken = default);

public RestServiceResult<System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestStateData>> GetAccessRequestsState(System.Collections.Generic.IEnumerable<string> requestIds);
Parameters
Parameter Type Description Rules
requestIds System.Collections.Generic.IEnumerable<string> The request ids. Required. Not empty.
Returns
Return Type Description
System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestStateData> The state of a request to access an existing subscription." returns="The state of a request to access an existing subscription.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

GetAccessRequestStateAsync()

Returns the state of a request to access an existing subscription." returns="The state of a request to access an existing subscription.

public async Task<RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestStateData>> GetAccessRequestStateAsync(string requestId, CancellationToken cancellationToken = default);

public RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestStateData> GetAccessRequestState(string requestId);
Parameters
Parameter Type Description Rules
requestId string The request id. Required.
Returns
Return Type Description
Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestStateData The state of a request to access an existing subscription." returns="The state of a request to access an existing subscription.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

RequestAccessAsync()

Creates a request to access to an existing subscription.

public async Task<RestServiceResult<string>> RequestAccessAsync(Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestData request, CancellationToken cancellationToken = default);

public RestServiceResult<string> RequestAccess(Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestData request);
Parameters
Parameter Type Description Rules
request Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestData The request to access an existing subscription. Required.
Returns
Return Type Description
string The request identifier.
Status Codes
Status Code Description
HttpStatusCode.Created Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

AccountingOfficesClientController

Provides operations on accounting offices.

Methods
IsRegisteredAsync()

Checks if an accounting office is registered on the Pollen program.

public async Task<RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeData>> IsRegisteredAsync(string accountKey, string subscriptionAlias, string taxId, CancellationToken cancellationToken = default);

public RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeData> IsRegistered(string accountKey, string subscriptionAlias, string taxId);
Parameters
Parameter Type Description Rules
accountKey string The account key. Required.
subscriptionAlias string The subscription alias. Required.
taxId string The tax id. Required.
Returns
Return Type Description
Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeData Returns ok if accounting office is registered on the Pollen program, otherwise returns not found.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

RegisterCustomersAsync()

Creates/Register a list of customers for the accounting office specified.

public async Task<RestServiceResult> RegisterCustomersAsync(string accountKey, string subscriptionAlias, string taxId, System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeCustomerData> clients, CancellationToken cancellationToken = default);

public RestServiceResult RegisterCustomers(string accountKey, string subscriptionAlias, string taxId, System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeCustomerData> clients);
Parameters
Parameter Type Description Rules
accountKey string The account key. Required.
subscriptionAlias string The subscription alias. Required.
taxId string The tax id. Required.
clients System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeCustomerData> The clients. Required.
Returns
Return Type Description
None The operation has no return value.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

ClientSecretsClientController

Provides operations to generate client secrets.

Methods
CreateAsync()

Creates a client id and client secret to access the service from a PAA V9 installation.

public async Task<RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ClientSecretResponseData>> CreateAsync(int clientNumber, CancellationToken cancellationToken = default);

public RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ClientSecretResponseData> Create(int clientNumber);
Parameters
Parameter Type Description Rules
clientNumber int The PAA V9 license client number for which the new client secret will be created. Required. > 0.
Returns
Return Type Description
Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ClientSecretResponseData The response received.
Status Codes
Status Code Description
HttpStatusCode.Created Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

HasExpiredAsync()

Returns a value indicating whether the client secret for the specified client id has expired." returns="A value indicating whether the client secret for the specified client id has expired.

public async Task<RestServiceResult<bool>> HasExpiredAsync(string clientId, CancellationToken cancellationToken = default);

public RestServiceResult<bool> HasExpired(string clientId);
Parameters
Parameter Type Description Rules
clientId string The client id. Required.
Returns
Return Type Description
bool A value indicating whether the client secret for the specified client id has expired." returns="A value indicating whether the client secret for the specified client id has expired.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

RecreateAsync()

Recreates a client secret to access the service from a PAA V9 installation using the specified client id.

public async Task<RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ClientSecretResponseData>> RecreateAsync(string clientId, CancellationToken cancellationToken = default);

public RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ClientSecretResponseData> Recreate(string clientId);
Parameters
Parameter Type Description Rules
clientId string The client id. Required.
Returns
Return Type Description
Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ClientSecretResponseData The response received.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

DigitalArchiveClientController

Provides operations on digital archive.

Methods
CancelRequestAccessAsync()

Cancels a not yet accepted request access.

public async Task<RestServiceResult<bool>> CancelRequestAccessAsync(string workspace, string organization, string appInstance, string requestId, CancellationToken cancellationToken = default);

public RestServiceResult<bool> CancelRequestAccess(string workspace, string organization, string appInstance, string requestId);
Parameters
Parameter Type Description Rules
workspace string The workspace. Required.
organization string The organization. Required.
appInstance string The app instance. Required.
requestId string The request id. Required.
Returns
Return Type Description
bool Whether request was canceled.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

CreateCompanyV2Async()

Creates a company for the digital archive.

public async Task<RestServiceResult> CreateCompanyV2Async(string workspace, string organization, string appInstance, Primavera.Lithium.AccountingAutomation.Client.Rest.Models.CompanyData company, CancellationToken cancellationToken = default);

public RestServiceResult CreateCompanyV2(string workspace, string organization, string appInstance, Primavera.Lithium.AccountingAutomation.Client.Rest.Models.CompanyData company);
Parameters
Parameter Type Description Rules
workspace string The workspace. Required.
organization string The organization. Required.
appInstance string The app instance. Required.
company Primavera.Lithium.AccountingAutomation.Client.Rest.Models.CompanyData The company. Required.
Returns
Return Type Description
None The operation has no return value.
Status Codes
Status Code Description
HttpStatusCode.Created Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

DeleteCompanyV2Async()

Deletes a company in the digital archive.

public async Task<RestServiceResult> DeleteCompanyV2Async(string workspace, string organization, string appInstance, string containerKey, CancellationToken cancellationToken = default);

public RestServiceResult DeleteCompanyV2(string workspace, string organization, string appInstance, string containerKey);
Parameters
Parameter Type Description Rules
workspace string The workspace. Required.
organization string The organization. Required.
appInstance string The app instance. Required.
containerKey string The container key. Required.
Returns
Return Type Description
None The operation has no return value.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

GetRequestAccessStateAsync()

Returns the state of a request to access an existing workspace/organization/appInstance.

public async Task<RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestStateResponse>> GetRequestAccessStateAsync(string workspace, string organization, string appInstance, string requestId, CancellationToken cancellationToken = default);

public RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestStateResponse> GetRequestAccessState(string workspace, string organization, string appInstance, string requestId);
Parameters
Parameter Type Description Rules
workspace string The workspace. Required.
organization string The organization. Required.
appInstance string The app instance. Required.
requestId string The request id. Required.
Returns
Return Type Description
Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestStateResponse The state of a request to access an existing existing workspace/organization/appInstance.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

RequestAccessAsync()

Sends a request to access the digital archive.

public async Task<RestServiceResult<string>> RequestAccessAsync(string workspace, string organization, string appInstance, CancellationToken cancellationToken = default);

public RestServiceResult<string> RequestAccess(string workspace, string organization, string appInstance);
Parameters
Parameter Type Description Rules
workspace string The workspace. Required.
organization string The organization. Required.
appInstance string The app instance. Required.
Returns
Return Type Description
string Returns the id to retrieve the information to the digital archive access request.
Status Codes
Status Code Description
HttpStatusCode.Created Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

DigitalArchiveProvisioningClientController

Provides actions to manage operations in Digital Archive Provisioning.

Methods
CreateProvisioningResourcesAsync()

Creates the provisioning for request to access the digital archive.

public async Task<RestServiceResult<System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ProvisioningParameter>>> CreateProvisioningResourcesAsync(System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ProvisioningParameter> provisioningParameters, CancellationToken cancellationToken = default);

public RestServiceResult<System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ProvisioningParameter>> CreateProvisioningResources(System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ProvisioningParameter> provisioningParameters);
Parameters
Parameter Type Description Rules
provisioningParameters System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ProvisioningParameter> The provisioning parameters. Required.
Returns
Return Type Description
System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.ProvisioningParameter> Returns a list of provisioning paramaters containing the route for the workspace/organization/application to the digital archive access request.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

ManagementClientController

Provides operations on management.

Methods
GetAccoutingOfficesAsync()

Gets a list of the accounting offices registered in the Pollen program.

public async Task<RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.GetAccoutingOfficesResponse>> GetAccoutingOfficesAsync(string continuationToken, CancellationToken cancellationToken = default);

public RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.GetAccoutingOfficesResponse> GetAccoutingOffices(string continuationToken);
Parameters
Parameter Type Description Rules
continuationToken string The continuation token used to retrive the next page of clients. Required.
Returns
Return Type Description
Primavera.Lithium.AccountingAutomation.Client.Rest.Models.GetAccoutingOfficesResponse A list of the accounting offices registered in the Pollen program.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

GetCustomersAsync()

Lists all clients for the given office.

public async Task<RestServiceResult<System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeCustomerData>>> GetCustomersAsync(string accountKey, string csaSubscriptionAlias, string taxId, System.DateTime referenceDate, CancellationToken cancellationToken = default);

public RestServiceResult<System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeCustomerData>> GetCustomers(string accountKey, string csaSubscriptionAlias, string taxId, System.DateTime referenceDate);
Parameters
Parameter Type Description Rules
accountKey string The account key. Required.
csaSubscriptionAlias string The subscription alias for the continuity contract (CSA). Required.
taxId string The tax id. Required.
referenceDate System.DateTime The date to consider when retrieving the customers list. Filters out customers created after this date. Required.
Returns
Return Type Description
System.Collections.Generic.IEnumerable<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeCustomerData> The list of clients for a given office.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

NotificationsClientController

Provides actions to send notifications.

Methods
SendAsync()

Sends a notification to the users of a subscription.

public async Task<RestServiceResult> SendAsync(Primavera.Lithium.AccountingAutomation.Client.Rest.Models.NotificationData notification, CancellationToken cancellationToken = default);

public RestServiceResult Send(Primavera.Lithium.AccountingAutomation.Client.Rest.Models.NotificationData notification);
Parameters
Parameter Type Description Rules
notification Primavera.Lithium.AccountingAutomation.Client.Rest.Models.NotificationData The notification that should be sent. Required.
Returns
Return Type Description
None The operation has no return value.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

ThirdPartiesClientController

Provides operations on third parties.

Methods
RegisterAsync()

Registers an accounting office that has applied for the Pollen program.

public async Task<RestServiceResult> RegisterAsync(Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeData accoutingOffice, CancellationToken cancellationToken = default);

public RestServiceResult Register(Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeData accoutingOffice);
Parameters
Parameter Type Description Rules
accoutingOffice Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeData The accouting office information. Required.
Returns
Return Type Description
None The operation has no return value.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

UsersClientController

Provides actions that allow managing the users registered for a subscription.

Methods
GetUsersAsync()

Retrieves the users configured to receive notifications for a subscription.

public async Task<RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.GetUsersResponseData>> GetUsersAsync(string accountKey, string subscriptionKey, CancellationToken cancellationToken = default);

public RestServiceResult<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.GetUsersResponseData> GetUsers(string accountKey, string subscriptionKey);
Parameters
Parameter Type Description Rules
accountKey string The account key. Required.
subscriptionKey string The subscription key. Required.
Returns
Return Type Description
Primavera.Lithium.AccountingAutomation.Client.Rest.Models.GetUsersResponseData The users configured to receive notifications for a subscription.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

UpdateUsersAsync()

Updates the users configured to receive notifications for a subscription.

public async Task<RestServiceResult> UpdateUsersAsync(Primavera.Lithium.AccountingAutomation.Client.Rest.Models.UpdateUsersRequestData request, CancellationToken cancellationToken = default);

public RestServiceResult UpdateUsers(Primavera.Lithium.AccountingAutomation.Client.Rest.Models.UpdateUsersRequestData request);
Parameters
Parameter Type Description Rules
request Primavera.Lithium.AccountingAutomation.Client.Rest.Models.UpdateUsersRequestData The request that should be executed. Required.
Returns
Return Type Description
None The operation has no return value.
Status Codes
Status Code Description
HttpStatusCode.Ok Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

Models Classes

AccessRequestData

Describes the response to a request to create a client or recreate a client secret.

Properties
Property Type Description Rules
AccountKey string The account key identifier. Required.
SubscriptionKey string Gets or sets the subscription key. Required.
Requester string Get or sets the requester identifier. Required.

^ Back to top

AccessRequestStateData

Describes an access request state.

Properties
Property Type Description Rules
RequestId string Gets or sets the request id. Required.
State Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestState Gets or sets the state. Required.
Reason string The reason associated with the request state. Required.
AccountKey string The account key identifier. Required.
SubscriptionKey string Gets or sets the subscription key. Required.
Log System.Collections.Generic.IList<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.RequestLogData> Gets or sets the log. Required.

^ Back to top

AccessRequestStateResponse

Describes the response to a request to get the state of a request to access an existing workspace/organization/appInstance.

Properties
Property Type Description Rules
Reason string Gets or sets the reason associated with the request state. Required.
CreatedOn System.DateTime Gets or sets the created on. Required.
Requester string Gets or sets the requester. Required.
ClientId string Gets or sets the client id. Required.
State Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccessRequestState Gets or sets the state. Required.
LastEntryDate System.DateTime Gets or sets the last entry date. Required.

^ Back to top

AccountingOfficeCustomerData

Describes an accounting office client.

Properties
Property Type Description Rules
AccountingOfficeTaxId string The accounting office tax identifier. Required.
Country string The country identifier. Required.
TaxId string The tax identifier. Required.
LastDocument System.DateTime The last time this client had a document processed. Required.
SaftSwId string? SAFT Software Id.
SaftSwName string? SAFT Software Name.
CreatedOn System.DateTime The date at which this customer was added. Required.

^ Back to top

AccountingOfficeData

Describes an accounting office.

Properties
Property Type Description Rules
AccountKey string The account key identifier. Required.
AccountCisReference string Account Client Reference. Required.
CsaSubscriptionAlias string? The subscription alias for the continuity contract (CSA).
Description string The description of the accounting office. Required.
SubscriptionAlias string Gets or sets the subscription alias. Required.
TaxId string The tax identifier. Required.
RegisteredOn System.DateTime The date that it registered on the V10 Pollen program. Required.

^ Back to top

ClientSecretResponseData

Describes the response to a request to create a client or recreate a client secret.

Properties
Property Type Description Rules
ClientId string The client identifier. Required.
ClientSecret string Gets or sets the client secret. Required.
ClientScopes System.Collections.Generic.IList<string> The scopes configured for the client. Required. Not empty.

^ Back to top

CompanyData

Describes a company.

Properties
Property Type Description Rules
CountryCode string Gets or sets the country code. Required.
TaxId string Gets or sets the tax id. Required.
Description string Gets or sets the description. Required.
IsDemo bool Whetaher the company is for demonstration. Required.
IsExternalManaged bool Whether the company is managed by a third party. Required.
MyContainer bool Whether the company is the main one. Required.
ContainerKey string? Gets or sets the container key.

^ Back to top

CompanyInfo

The Company Information.

Properties
Property Type Description Rules
CountryCode string The country code (2 digits). Required.
NIF string The tax number. Required.

^ Back to top

GetAccoutingOfficesResponse

Describes a get accouting offices response.

Properties
Property Type Description Rules
ContinuationToken string The continuation token used for pagged get. Required.
AccountingOffices System.Collections.Generic.IList<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.AccountingOfficeData> The list of accounting offices. Required.

^ Back to top

GetUsersResponseData

Describes a get users response.

Properties
Property Type Description Rules
AccountKey string The account key identifier. Required.
SubscriptionKey string Gets or sets the subscription key. Required.
Users System.Collections.Generic.IList<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.SubscriptionUserData> Gets or sets the list of users. Required.

^ Back to top

IdentityClientData

Describes an identity client entity.

Properties
Property Type Description Rules
ClientId string Gets or sets the client id. Required.
ClientName string Gets or sets the client name. Required.
Secrets System.Collections.Generic.IList<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.IdentitySecretData> Gets or sets the secrets. Required.

^ Back to top

IdentitySecretData

Describes an identity secret.

Properties
Property Type Description Rules
CreatedOn System.DateTime Gets or sets the created on. Required.
Description string Gets or sets the description. Required.
Expiration System.DateTime? Gets or sets the expiration.

^ Back to top

IdentityUserData

Describes an identity user entity.

Properties
Property Type Description Rules
Id string The user identifier. Required.
Culture string The user culture. Required.
DisplayName string The user display name. Required.
PictureUri string? The user picture URI.
EmailVerified bool If user email is verified. Required.
Email string Gets or sets the identity user email. Required.

^ Back to top

NotificationData

Describes a notification.

Properties
Property Type Description Rules
AccountKey string The account key identifier. Required.
SubscriptionKey string Gets or sets the subscription key. Required.
Parameters System.Collections.Generic.IList<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.NotificationParameterData> Gets or sets the notification parameters. Required.

^ Back to top

NotificationEmailData

Describes a notification email.

Properties
Property Type Description Rules
Id System.Guid Gets or sets the id. Required. Not empty.
EmailTemplateId string Gets or sets the email template id. Required.
Parameters System.Collections.Generic.IList<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.NotificationParameterData> Gets or sets the notification parameters. Required.
Receivers System.Collections.Generic.IList<Primavera.Lithium.AccountingAutomation.Client.Rest.Models.NotificationEmailReceiverData> Gets or sets the receivers. Required.

^ Back to top

NotificationEmailReceiverData

Describes a notification email receiver.

Properties
Property Type Description Rules
Address string Gets or sets the address. Required.
Name string Gets or sets the name. Required.

^ Back to top

NotificationParameterData

Describes a notification parameter.

Properties
Property Type Description Rules
Name string Gets or sets the name. Required.
Value string Gets or sets the value. Required.

^ Back to top

ProvisioningParameter

Describes a provisioning parameter.

Properties
Property Type Description Rules
Parameter string Gets or sets the parameter. Required.
Value string Gets or sets the value. Required.
IsProtected bool The parameter protection validation. Required.

^ Back to top

RequestLogData

Describes a log message for a request.

Properties
Property Type Description Rules
Error bool A value indicating whether the log record is an error. Required.
Message string Gets or sets the log message. Required.
Details string? Gets or sets the log message details.
Timestamp System.DateTime Gets or sets the log message timestamp. Required.

^ Back to top

SubscriptionUserData

Describes a subscription user.

Properties
Property Type Description Rules
Id string Gets or sets the user id. Required.
Email string Gets or sets the user email. Required.
DisplayName string Gets or sets the user display name. Required.
IsManager bool A value indicating whether the user is a manager. Required.
IsSelected bool A value indicating whether the user is selected to receive notifications. Required.

^ Back to top

UpdateUsersRequestData

Describes a request to update the users configured to receive notifications for a subscription.

Properties
Property Type Description Rules
AccountKey string The account key identifier. Required.
SubscriptionKey string Gets or sets the subscription key. Required.
Users System.Collections.Generic.IList<string> A list containing the identifiers of the users that should received notifications. Required. Not empty.

^ Back to top

Enumerations Classes

AccessRequestState

Describes the state of a request to access an existing subscription.

Members
Member Value Description
Queued 3 The request has been queued but not yet sent to the user(s).
Pending 0 The request has been sent to the user(s) but was not responded yet.
Rejected 1 The request has been rejected by the user(s).
Accepted 2 The request has been accepted by the user(s).
Canceled 5 The request has been cancelled by the client.
Failed 6 The request has failed.
Completed 7 The request is completed and the subscription is ready to use.
Expired 4 The request has expired without any response from the user(s).

^ Back to top