Table of Contents

Class OmieContractInfo

Namespace
NuvTools.Payment.Omie.ApiClient.DTOs.Responses
Assembly
NuvTools.Payment.Omie.ApiClient.dll

A Service Contract of Omie as callers consume it: the number the user knows, the validity period and the negotiated value, with the dates already parsed. Projected from the listing so no caller has to deal with Omie's dd/MM/yyyy strings or with which key carries what.

public sealed record OmieContractInfo : IEquatable<OmieContractInfo>
Inheritance
OmieContractInfo
Implements
Inherited Members

Constructors

OmieContractInfo(long, string?, long, DateOnly?, DateOnly?, decimal?, IReadOnlyDictionary<long, decimal>)

A Service Contract of Omie as callers consume it: the number the user knows, the validity period and the negotiated value, with the dates already parsed. Projected from the listing so no caller has to deal with Omie's dd/MM/yyyy strings or with which key carries what.

public OmieContractInfo(long ContractCode, string? ContractNumber, long ClientCode, DateOnly? ValidFrom, DateOnly? ValidTo, decimal? MonthlyValue, IReadOnlyDictionary<long, decimal> UnitValueByServiceCode)

Parameters

ContractCode long

Omie's internal identifier (nCodCtr).

ContractNumber string

The contract number as the user reads it in Omie (cNumCtr).

ClientCode long

Client the contract belongs to (nCodCli).

ValidFrom DateOnly?

Start of the validity period; null when Omie sent none.

ValidTo DateOnly?

End of the validity period; null on contracts with no end date.

MonthlyValue decimal?

Negotiated monthly value; null when Omie sent none.

UnitValueByServiceCode IReadOnlyDictionary<long, decimal>

Negotiated unit price of each service in the contract, keyed by Omie's service identifier (nCodServico) — the same key the service catalog uses, so a caller holding a service code can ask what this client pays for it. Empty when the contract carries no items.

Properties

ClientCode

Client the contract belongs to (nCodCli).

public long ClientCode { get; init; }

Property Value

long

ContractCode

Omie's internal identifier (nCodCtr).

public long ContractCode { get; init; }

Property Value

long

ContractNumber

The contract number as the user reads it in Omie (cNumCtr).

public string? ContractNumber { get; init; }

Property Value

string

MonthlyValue

Negotiated monthly value; null when Omie sent none.

public decimal? MonthlyValue { get; init; }

Property Value

decimal?

UnitValueByServiceCode

Negotiated unit price of each service in the contract, keyed by Omie's service identifier (nCodServico) — the same key the service catalog uses, so a caller holding a service code can ask what this client pays for it. Empty when the contract carries no items.

public IReadOnlyDictionary<long, decimal> UnitValueByServiceCode { get; init; }

Property Value

IReadOnlyDictionary<long, decimal>

ValidFrom

Start of the validity period; null when Omie sent none.

public DateOnly? ValidFrom { get; init; }

Property Value

DateOnly?

ValidTo

End of the validity period; null on contracts with no end date.

public DateOnly? ValidTo { get; init; }

Property Value

DateOnly?

Methods

UnitValueOf(long)

What this contract charges for a service, or null when the service is not in it — which is the normal case: a contract covers the services that were negotiated, and the rest stay on the standard price list.

public decimal? UnitValueOf(long serviceCode)

Parameters

serviceCode long

Returns

decimal?