Referencia Pública de API .NETL1 Modelado de Dominio y ConsultasEstableAOT: Parcial

EricksonLopez.ValueObjects

Zero-allocation, immutable DDD Value Objects and multi-country fiscal satellites for modern .NET with NativeAOT, EF Core, Dapper, and System.Text.Json.

18 namespaces220 tipos1909 miembrosGenerado desde XML docs y ensamblados · UTC 2026-12-01

Mostrando 220 de 220 tipos (1909 miembros)

EricksonLopez.ValueObjects#

89
record

Address

Ensamblado: EricksonLopez.ValueObjects
public sealed record Address : ValueObject
Hereda de: ValueObject

Represents a structured physical address composed of street, city, province, country, and postal code.

Miembros (7)

  • methodCreate
    public static Result<Address> Create(string? street, string? city, string? province, Country country, PostalCode? postalCode = null)

    Creates a validated `Address` instance from normalized address components.

    street: string?
    The street address component.
    city: string?
    The city name component.
    province: string?
    The province or state component.
    country: Country
    The country value object.
    postalCode: PostalCode?
    The optional postal code value object.

    Retorna: A successful `Result<T>` containing the validated address, or a validation failure.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • propertyCity
    public string City { get; }

    Gets the city or municipality component.

  • propertyCountry
    public Country Country { get; }

    Gets the ISO 3166-1 alpha-2 country component.

  • propertyPostalCode
    public PostalCode? PostalCode { get; }

    Gets the optional postal or ZIP code component.

  • propertyProvince
    public string Province { get; }

    Gets the state, province, or department component.

  • propertyStreet
    public string Street { get; }

    Gets the street address component.

record

Barcode

Ensamblado: EricksonLopez.ValueObjects
public sealed partial record Barcode : StringValueObject<Barcode>
Hereda de: StringValueObject<Barcode>

Represents a commercial or industrial barcode supporting GS1 Modulo-10 validated symbologies (GTIN-8, UPC-A / GTIN-12, EAN-13 / GTIN-13, retail variable-weight prefix 20–29, GTIN-14) and alphanumeric Code 128.

Miembros (8)

  • methodCreate
    public static Result<Barcode> Create(string? value)

    Creates a new `Barcode` instance after normalizing to uppercase and validating format rules. Numeric 8/12/13/14-digit strings validate their GS1 Modulo-10 check digit when `CreateGtin` or `Create(string?, bool)` with `enforceGs1CheckDigitForNumeric = true` is invoked.

    value: string?
    The raw barcode string representation.

    Retorna: A `Result<Barcode>` containing the created instance or a validation error.

  • methodCreate
    public static Result<Barcode> Create(string? value, bool enforceGs1CheckDigitForNumeric)

    Creates a `Barcode` optionally enforcing strict GS1 Modulo-10 check-digit verification on 8, 12, 13, and 14-digit numeric barcodes.

    value: string?
    The raw barcode string representation.
    enforceGs1CheckDigitForNumeric: bool
    When `true`, rejects 8/12/13/14-digit numeric barcodes with invalid Modulo-10 check digits.

    Retorna: A `Result<Barcode>` containing the validated instance or an error.

  • methodCreateGtin
    public static Result<Barcode> CreateGtin(ReadOnlySpan<char> digits)

    Creates a strictly validated numeric GS1 GTIN barcode (GTIN-8, UPC-A/12, EAN-13, or GTIN-14) verifying the Modulo-10 check digit.

    digits: ReadOnlySpan<char>
    The 8, 12, 13, or 14-digit GTIN span.

    Retorna: A `Result<Barcode>` containing the validated GTIN barcode or an error.

  • methodCreateWeighted
    public static Result<Barcode> CreateWeighted(ReadOnlySpan<char> digits)

    Creates a validated 13-digit GS1 prefix 20–29 retail scale barcode after verifying its Modulo-10 check digit.

    digits: ReadOnlySpan<char>
    The 13-digit retail scale barcode span.

    Retorna: A `Result<Barcode>` containing the validated scale barcode or an error.

  • methodIsValidGs1CheckDigit
    public static bool IsValidGs1CheckDigit(ReadOnlySpan<char> digits)

    Verifies the GS1 Modulo-10 check digit for an 8, 12, 13, or 14-digit numeric barcode span.

    digits: ReadOnlySpan<char>
    The candidate numeric barcode span.

    Retorna: `true` if valid; otherwise `false`.

  • methodTryParseRetailScale
    public bool TryParseRetailScale(out RetailScaleBarcodeData scaleData, RetailScaleEncodingMode mode = RetailScaleEncodingMode.AutoByPrefix29)

    Attempts to extract retail scale PLU and embedded weight/price data when this barcode is a 13-digit prefix 20–29 EAN-13.

    scaleData: out RetailScaleBarcodeData
    When successful, receives the parsed `RetailScaleBarcodeData`.
    mode: RetailScaleEncodingMode
    The scale measure encoding mode.

    Retorna: `true` if this barcode is a valid prefix 20–29 scale EAN-13; otherwise `false`.

  • propertyIsRetailScaleBarcode
    public bool IsRetailScaleBarcode { get; }

    Gets a value indicating whether this barcode is a 13-digit GS1 prefix 20–29 retail variable-weight or variable-price label.

  • propertySymbology
    public BarcodeSymbology Symbology { get; }

    Gets the detected barcode symbology.

enum

BarcodeSymbology

Ensamblado: EricksonLopez.ValueObjects
public enum BarcodeSymbology

Identifies the detected barcode symbology for a validated `Barcode`.

Miembros (6)

  • fieldCode128
    Code128 = 0

    Alphanumeric industrial symbology (Code 128, GS1-128, Code 39).

  • fieldEan13
    Ean13 = 3

    13-digit GS1 GTIN-13 / EAN-13 standard item barcode with Modulo-10 check digit.

  • fieldGtin14
    Gtin14 = 5

    14-digit GS1 GTIN-14 logistics case/pallet barcode with Modulo-10 check digit.

  • fieldGtin8
    Gtin8 = 1

    8-digit GS1 GTIN-8 / EAN-8 with Modulo-10 check digit.

  • fieldRetailScaleEan13
    RetailScaleEan13 = 4

    13-digit GS1 EAN-13 in-store variable-weight / variable-price scale barcode (prefix 20–29) with Modulo-10 check digit.

  • fieldUpcA
    UpcA = 2

    12-digit GS1 GTIN-12 / UPC-A with Modulo-10 check digit.

record

BatchNumber

Ensamblado: EricksonLopez.ValueObjects
public sealed record BatchNumber : StringValueObject<BatchNumber>
Hereda de: StringValueObject<BatchNumber>

Represents a manufacturing batch or production lot identifier for traceability. Normalized to uppercase. Rules: Required, 1–80 characters, uppercase alphanumeric with separators (`. _ / -`). Used by: Manufacturing, Quality Control, Inventory, Food & Beverage, Pharmaceuticals.

Miembros (1)

  • methodCreate
    public static Result<BatchNumber> Create(string? value)

    Creates a new `BatchNumber` instance after validating and normalizing to uppercase.

    value: string?
    The raw batch/lot identifier string.

    Retorna: A `Result<BatchNumber>` containing the created instance or a validation error.

record

BusinessDate

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct BusinessDate : IValueObject<BusinessDate>, IComparable<BusinessDate>, IComparable, IParsable<BusinessDate>, ISpanParsable<BusinessDate>, IFormattable, ISpanFormattable
Implementa: IComparable, IComparable<BusinessDate>, IFormattable, IParsable<BusinessDate>, ISpanFormattable, ISpanParsable<BusinessDate>, IValueObject<BusinessDate>

Represents a calendar date in a business domain without time or time zone components.

Miembros (17)

  • methodCompareTo
    public int CompareTo(BusinessDate other)

    Compares this business date with another business date.

    other: BusinessDate
    The other business date to compare against.

    Retorna: A value indicating the relative order of the dates being compared.

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `BusinessDate`

  • methodCreate
    public static Result<BusinessDate> Create(DateOnly value)

    Creates a validated `BusinessDate` instance from a `DateOnly`.

    value: DateOnly
    The date value to encapsulate.

    Retorna: A successful `Result<T>` containing the validated business date, or a validation failure.

  • methodFromDateTimeOffset
    public static Result<BusinessDate> FromDateTimeOffset(DateTimeOffset value)

    Creates a `BusinessDate` instance from the UTC date component of a `DateTimeOffset`.

    value: DateTimeOffset
    The date and time value to extract the UTC date from.

    Retorna: A successful `Result<T>` containing the validated business date.

  • methodParse
    public static BusinessDate Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a span of characters into a `BusinessDate`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `BusinessDate`.

    Exceptions: FormatException: `s` is not in a valid date format

  • methodParse
    public static BusinessDate Parse(string s, IFormatProvider? provider = null)

    Parses a string into a `BusinessDate`.

    s: string
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `BusinessDate`.

    Exceptions: FormatException: `s` is not in a valid date format

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodToString
    public string ToString(string? format, IFormatProvider? formatProvider)

    Inherits documentation from `IFormattable.ToString(string?, IFormatProvider?)`.

    format: string?
    formatProvider: IFormatProvider?
  • methodTryFormat
    public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)

    Inherits documentation from base type or interface.

    destination: Span<char>
    charsWritten: out int
    format: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out BusinessDate result)

    Attempts to parse a span of characters into a `BusinessDate`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out BusinessDate
    When this method returns, contains the parsed business date if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out BusinessDate result)

    Attempts to parse a string into a `BusinessDate`.

    s: string?
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out BusinessDate
    When this method returns, contains the parsed business date if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodoperator <
    public static bool operator <(BusinessDate left, BusinessDate right)

    Determines whether the left business date is earlier than the right business date.

    left: BusinessDate
    The first business date to compare.
    right: BusinessDate
    The second business date to compare.

    Retorna: `true` if `left` is earlier than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(BusinessDate left, BusinessDate right)

    Determines whether the left business date is earlier than or equal to the right business date.

    left: BusinessDate
    The first business date to compare.
    right: BusinessDate
    The second business date to compare.

    Retorna: `true` if `left` is earlier than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(BusinessDate left, BusinessDate right)

    Determines whether the left business date is later than the right business date.

    left: BusinessDate
    The first business date to compare.
    right: BusinessDate
    The second business date to compare.

    Retorna: `true` if `left` is later than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(BusinessDate left, BusinessDate right)

    Determines whether the left business date is later than or equal to the right business date.

    left: BusinessDate
    The first business date to compare.
    right: BusinessDate
    The second business date to compare.

    Retorna: `true` if `left` is later than or equal to `right`; otherwise, `false`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

  • propertyValue
    public DateOnly Value { get; }

    Gets the underlying `DateOnly` value.

record

Code

Ensamblado: EricksonLopez.ValueObjects
public sealed record Code : StringValueObject<Code>
Hereda de: StringValueObject<Code>

Represents a generic entity code — an uppercase alphanumeric identifier with separators. Normalized to uppercase. Rules: Required, 1–60 characters, uppercase alphanumeric with `. _ / -` separators (code pattern). Stored uppercase. Used by: ERP, Inventory, POS, SaaS, Property Management, Financial ⚠️ Usage guidance (read before using): `Code` is a deliberately generic VO for domain concepts where the ubiquitous language uses the word "code" without further specificity (e.g., a department code, a category code, a warehouse location code). If your domain concept has a more specific name, prefer a purpose-built VO: - `SKU` — product stock-keeping unit - `TenantCode` — multi-tenant identifier - `DocumentNumber` — numbered document - `ReferenceNumber` — internal reference Using `Code` when a more specific VO exists weakens the Ubiquitous Language. Only use `Code` when the concept genuinely crosses multiple domains with no specific semantic.

Miembros (1)

  • methodCreate
    public static Result<Code> Create(string? value)

    Creates a new `Code` instance after validating and normalizing to uppercase.

    value: string?
    The raw entity code string representation.

    Retorna: A `Result ` containing the created instance or a validation error.

record

Comment

Ensamblado: EricksonLopez.ValueObjects
public sealed record Comment : StringValueObject<Comment>
Hereda de: StringValueObject<Comment>

Represents a collaborative comment or remark on tasks, tickets, and domain entities. Rules: Required, 1–5,000 characters. Allows standard multiline whitespace (newlines, tabs) while rejecting non-printable control characters. Used by: CRM, Project Management, Issue Tracking, Social Feeds, Approvals.

Miembros (1)

  • methodCreate
    public static Result<Comment> Create(string? value)

    Creates a new `Comment` instance after trimming and validating.

    value: string?
    The raw comment text.

    Retorna: A `Result<Comment>` containing the created instance or a validation error.

record

CompanyName

Ensamblado: EricksonLopez.ValueObjects
public sealed record CompanyName : StringValueObject<CompanyName>
Hereda de: StringValueObject<CompanyName>

Represents the legal or commercial name of a company, organization, or institution. Rules: Required, 2–180 chars, business name characters (letters, digits, spaces, `& . , ' ( ) / # @ + -`), whitespace collapsed. Used by: ERP, E-Invoicing, CRM, SaaS, Payroll, Property Management, Financial, Donations.

Miembros (1)

  • methodCreate
    public static Result<CompanyName> Create(string? value)

    Creates a new `CompanyName` instance after validating and normalizing whitespace and punctuation.

    value: string?
    The raw company name string.

    Retorna: A `Result<CompanyName>` containing the created instance or a validation error.

record

ContactInfo

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct ContactInfo : IValueObject<ContactInfo>, IEquatable<ContactInfo>
Implementa: IEquatable<ContactInfo>, IValueObject<ContactInfo>

Represents validated corporate or customer contact channels (email, primary/secondary phone, and HTTP/HTTPS website), preventing invalid addresses and dangerous URI schemes (`javascript:`, `data:`, `file:`) from entering domain aggregates.

Miembros (12)

  • methodCreate
    public static Result<ContactInfo> Create(string? email = null, string? phone = null, string? secondaryPhone = null, string? website = null)

    Creates a validated `ContactInfo` instance from optional email, primary/secondary phone numbers, and HTTP/HTTPS website.

    email: string?
    Optional email address.
    phone: string?
    Optional primary phone number.
    secondaryPhone: string?
    Optional secondary/mobile phone number.
    website: string?
    Optional HTTP/HTTPS website URL.

    Retorna: A `Result<ContactInfo>` containing the validated contact channels or a structured error.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodWithEmail
    public Result<ContactInfo> WithEmail(string? email)

    Returns a copy of this `ContactInfo` with a newly validated email address.

    email: string?
    The new email address (or `null` to clear).

    Retorna: A `Result<ContactInfo>` with the updated email.

  • methodWithPhone
    public Result<ContactInfo> WithPhone(string? phone)

    Returns a copy of this `ContactInfo` with a newly validated primary phone number.

    phone: string?
    The new primary phone number (or `null` to clear).

    Retorna: A `Result<ContactInfo>` with the updated phone number.

  • propertyEmail
    public Email? Email { get; }

    Gets the validated email address, if provided.

  • propertyEmpty
    public static ContactInfo Empty { get; }

    Gets an empty initialized `ContactInfo` with no contact channels set.

  • propertyHasAnyContact
    public bool HasAnyContact { get; }

    Gets a value indicating whether at least one contact channel is populated.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this struct was initialized via `Create` or `Empty`.

  • propertyPhone
    public PhoneNumber? Phone { get; }

    Gets the validated primary phone number, if provided.

  • propertyPrimaryPhone
    public PhoneNumber? PrimaryPhone { get; }

    Gets the preferred phone number (`SecondaryPhone` if present, otherwise `Phone`).

  • propertySecondaryPhone
    public PhoneNumber? SecondaryPhone { get; }

    Gets the validated secondary or mobile phone number, if provided.

  • propertyWebsite
    public string? Website { get; }

    Gets the validated normalized `http` or `https` website URL, if provided.

record

ContentType

Ensamblado: EricksonLopez.ValueObjects
public sealed partial record ContentType : StringValueObject<ContentType>
Hereda de: StringValueObject<ContentType>

Represents a MIME content type (e.g. "application/pdf", "image/png"). Rules: 3–255 chars, lowercase media/subtype format. Used by: Document management, uploads, APIs.

Miembros (1)

  • methodCreate
    public static Result<ContentType> Create(string? value)

    Creates a new `ContentType` instance after validating and normalizing the MIME type to lowercase.

    value: string?
    The raw MIME content type string.

    Retorna: A `Result<ContentType>` containing the created instance or a validation error.

record

Country

Ensamblado: EricksonLopez.ValueObjects
public sealed partial record Country : StringValueObject<Country>
Hereda de: StringValueObject<Country>

Represents an ISO 3166-1 alpha-2 two-letter country code.

Miembros (3)

  • methodCreate
    public static Result<Country> Create(string? value)

    Creates a validated `Country` instance from an ISO 3166-1 alpha-2 code string.

    value: string?
    The two-letter country code string.

    Retorna: A successful `Result<T>` containing the validated country code, or a validation failure.

  • methodCreateNormalized
    public static Result<Country> CreateNormalized(ReadOnlySpan<char> value)

    Creates a validated `Country` instance from a character span after normalizing common localized country names and ISO 3166-1 alpha-3 codes to their canonical ISO 3166-1 alpha-2 code without intermediate allocations.

    value: ReadOnlySpan<char>
    The country name or code character span.

    Retorna: A successful `Result<T>` containing the normalized country code, or a validation failure.

  • methodCreateNormalized
    public static Result<Country> CreateNormalized(string? value)

    Creates a validated `Country` instance after normalizing common localized country names and ISO 3166-1 alpha-3 codes (such as `República Dominicana`, `Dominican Republic`, `DOM`, `United States`, `Estados Unidos`, `USA`) to their canonical ISO 3166-1 alpha-2 code.

    value: string?
    The country name or code string.

    Retorna: A successful `Result<T>` containing the normalized country code, or a validation failure.

record

CountryCode

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct CountryCode : IValueObject<CountryCode>, IComparable<CountryCode>, IComparable, IParsable<CountryCode>, ISpanParsable<CountryCode>
Implementa: IComparable, IComparable<CountryCode>, IParsable<CountryCode>, ISpanParsable<CountryCode>, IValueObject<CountryCode>

Represents a validated ISO 3166-1 alpha-2 country code with seamless resolution to ISO alpha-3, numeric-3, and Dominican Republic DGII Formato 609 country codes via `IsoCountry`.

Miembros (34)

  • methodCompareTo
    public int CompareTo(CountryCode other)

    Inherits documentation from base type or interface.

    other: CountryCode
  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?
  • methodCreate
    public static Result<CountryCode> Create(ReadOnlySpan<char> value)

    Creates a validated `CountryCode` from a character span.

    value: ReadOnlySpan<char>
    The character span containing an ISO 3166-1 code or alias.

    Retorna: A `Result<CountryCode>` containing the validated code or a validation error.

  • methodCreate
    public static Result<CountryCode> Create(string? value)

    Creates a validated `CountryCode` from an ISO 3166-1 alpha-2, alpha-3, numeric-3 / DGII 609 code, or common country name.

    value: string?
    The raw country code or alias.

    Retorna: A `Result<CountryCode>` containing the validated code or a validation error.

  • methodParse
    public static CountryCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a character span into a `CountryCode`.

    s: ReadOnlySpan<char>
    The character span to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `CountryCode`.

    Exceptions: FormatException: Thrown when `s` is invalid.

  • methodParse
    public static CountryCode Parse(string s, IFormatProvider? provider = null)

    Parses a string into a `CountryCode`.

    s: string
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `CountryCode`.

    Exceptions: FormatException: Thrown when `s` is invalid.

  • methodToIsoCountry
    public IsoCountry? ToIsoCountry()

    Resolves full `IsoCountry` metadata when this code exists in the standard ISO-3166 catalog.

    Retorna: The matching `IsoCountry` entry, or `null` if not in the catalog.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out CountryCode result)

    Attempts to parse a character span into a `CountryCode`.

    s: ReadOnlySpan<char>
    The character span to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out CountryCode
    When this method returns, contains the parsed code if valid; otherwise `default`.

    Retorna: `true` if valid; otherwise `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out CountryCode result)

    Attempts to parse a string into a `CountryCode`.

    s: string?
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out CountryCode
    When this method returns, contains the parsed code if valid; otherwise `default`.

    Retorna: `true` if valid; otherwise `false`.

  • methodoperator <
    public static bool operator <(CountryCode left, CountryCode right)

    Determines whether `left` precedes `right` ordinally.

    left: CountryCode
    right: CountryCode
  • methodoperator <=
    public static bool operator <=(CountryCode left, CountryCode right)

    Determines whether `left` precedes or equals `right` ordinally.

    left: CountryCode
    right: CountryCode
  • methodoperator >
    public static bool operator >(CountryCode left, CountryCode right)

    Determines whether `left` follows `right` ordinally.

    left: CountryCode
    right: CountryCode
  • methodoperator >=
    public static bool operator >=(CountryCode left, CountryCode right)

    Determines whether `left` follows or equals `right` ordinally.

    left: CountryCode
    right: CountryCode
  • propertyAR
    public static CountryCode AR { get; }

    Gets the Argentina (`AR`, DGII `032`) country code.

  • propertyAlpha2
    public string Alpha2 { get; }

    Gets the ISO 3166-1 alpha-2 code (alias for `Value`).

  • propertyAlpha3
    public string Alpha3 { get; }

    Gets the ISO 3166-1 alpha-3 code when known in `IsoCountry.All`, or `string.Empty`.

  • propertyBR
    public static CountryCode BR { get; }

    Gets the Brazil (`BR`, DGII `076`) country code.

  • propertyCA
    public static CountryCode CA { get; }

    Gets the Canada (`CA`, DGII `124`) country code.

  • propertyCL
    public static CountryCode CL { get; }

    Gets the Chile (`CL`, DGII `152`) country code.

  • propertyCN
    public static CountryCode CN { get; }

    Gets the China (`CN`, DGII `156`) country code.

  • propertyCO
    public static CountryCode CO { get; }

    Gets the Colombia (`CO`, DGII `170`) country code.

  • propertyDO
    public static CountryCode DO { get; }

    Gets the Dominican Republic (`DO`, DGII `214`) country code.

  • propertyDgiiCode
    public string DgiiCode { get; }

    Gets the three-digit DGII Formato 609 country code for Dominican Republic tax reporting when known, or `string.Empty`.

  • propertyES
    public static CountryCode ES { get; }

    Gets the Spain (`ES`, DGII `724`) country code.

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this `CountryCode` is uninitialized (`default(CountryCode)`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `CountryCode` was initialized via a factory rather than `default(CountryCode)`.

  • propertyMX
    public static CountryCode MX { get; }

    Gets the Mexico (`MX`, DGII `484`) country code.

  • propertyNumericCode
    public string NumericCode { get; }

    Gets the three-digit ISO 3166-1 numeric code when known in `IsoCountry.All`, or `string.Empty`.

  • propertyPA
    public static CountryCode PA { get; }

    Gets the Panama (`PA`, DGII `591`) country code.

  • propertyPE
    public static CountryCode PE { get; }

    Gets the Peru (`PE`, DGII `604`) country code.

  • propertyPR
    public static CountryCode PR { get; }

    Gets the Puerto Rico (`PR`, DGII `630`) country code.

  • propertyUS
    public static CountryCode US { get; }

    Gets the United States (`US`, DGII `840`) country code.

  • propertyValue
    public string Value { get; }

    Gets the canonical two-letter uppercase ISO 3166-1 alpha-2 country code (e.g., `"DO"`, `"US"`).

record

CreatedBy

Ensamblado: EricksonLopez.ValueObjects
public sealed record CreatedBy : StringValueObject<CreatedBy>
Hereda de: StringValueObject<CreatedBy>

Represents the identity of the actor who created an entity or record. Normalized to uppercase. Rules: Required, 1–120 characters, uppercase alphanumeric or human/system identifier characters. Stored uppercase. Used by: All bounded contexts (Audit trail, Multi-tenant compliance, Event Sourcing).

Miembros (1)

  • methodCreate
    public static Result<CreatedBy> Create(string? value)

    Creates a new `CreatedBy` instance after validating and normalizing the actor identifier.

    value: string?
    The raw actor identifier string.

    Retorna: A `Result<CreatedBy>` containing the created instance or a validation error.

record

CurrencyCode

Ensamblado: EricksonLopez.ValueObjects
public readonly partial record struct CurrencyCode : IValueObject<CurrencyCode>, IComparable<CurrencyCode>, IComparable, IParsable<CurrencyCode>, ISpanParsable<CurrencyCode>
Implementa: IComparable, IComparable<CurrencyCode>, IParsable<CurrencyCode>, ISpanParsable<CurrencyCode>, IValueObject<CurrencyCode>

Represents an ISO 4217 three-letter currency code.

Notas:

Encapsulates currency formatting, standard decimal scale information, and relational comparison.

Miembros (22)

  • methodCompareTo
    public int CompareTo(CurrencyCode other)

    Compares this currency code with another currency code based on ordinal character order.

    other: CurrencyCode
    The other currency code to compare with.

    Retorna: A value indicating the relative order of the currency codes being compared.

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `CurrencyCode`

  • methodCreate
    public static Result<CurrencyCode> Create(string? value)

    Creates a validated `CurrencyCode` instance from an ISO 4217 code string.

    value: string?
    The raw three-letter currency string.

    Retorna: A successful `Result<T>` containing the validated currency code, or a validation failure.

  • methodParse
    public static CurrencyCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a span of characters into a `CurrencyCode`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `CurrencyCode`.

    Exceptions: FormatException: `s` is not in a valid currency code format

  • methodParse
    public static CurrencyCode Parse(string s, IFormatProvider? provider = null)

    Parses a string into a `CurrencyCode`.

    s: string
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `CurrencyCode`.

    Exceptions: FormatException: `s` is not in a valid currency code format

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out CurrencyCode result)

    Attempts to parse a span of characters into a `CurrencyCode`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out CurrencyCode
    When this method returns, contains the parsed currency code if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out CurrencyCode result)

    Attempts to parse a string into a `CurrencyCode`.

    s: string?
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out CurrencyCode
    When this method returns, contains the parsed currency code if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodoperator <
    public static bool operator <(CurrencyCode left, CurrencyCode right)

    Determines whether the left currency code is less than the right currency code.

    left: CurrencyCode
    The first currency code to compare.
    right: CurrencyCode
    The second currency code to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(CurrencyCode left, CurrencyCode right)

    Determines whether the left currency code is less than or equal to the right currency code.

    left: CurrencyCode
    The first currency code to compare.
    right: CurrencyCode
    The second currency code to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(CurrencyCode left, CurrencyCode right)

    Determines whether the left currency code is greater than the right currency code.

    left: CurrencyCode
    The first currency code to compare.
    right: CurrencyCode
    The second currency code to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(CurrencyCode left, CurrencyCode right)

    Determines whether the left currency code is greater than or equal to the right currency code.

    left: CurrencyCode
    The first currency code to compare.
    right: CurrencyCode
    The second currency code to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyBHD
    public static CurrencyCode BHD { get; }

    Gets the Bahraini Dinar (BHD) currency code.

  • propertyDOP
    public static CurrencyCode DOP { get; }

    Gets the Dominican Peso (DOP) currency code.

  • propertyDecimalPlaces
    public int DecimalPlaces { get; }

    Gets the standard number of decimal places defined by ISO 4217 for this currency.

  • propertyEUR
    public static CurrencyCode EUR { get; }

    Gets the Euro (EUR) currency code.

  • propertyGBP
    public static CurrencyCode GBP { get; }

    Gets the British Pound Sterling (GBP) currency code.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `CurrencyCode` instance was initialized through a factory rather than `default(CurrencyCode)`.

  • propertyJPY
    public static CurrencyCode JPY { get; }

    Gets the Japanese Yen (JPY) currency code.

  • propertyKWD
    public static CurrencyCode KWD { get; }

    Gets the Kuwaiti Dinar (KWD) currency code.

  • propertyUSD
    public static CurrencyCode USD { get; }

    Gets the United States Dollar (USD) currency code.

  • propertyValue
    public string Value { get; }

    Gets the three-letter ISO 4217 currency code string.

record

CustomerCode

Ensamblado: EricksonLopez.ValueObjects
public sealed record CustomerCode : StringValueObject<CustomerCode>
Hereda de: StringValueObject<CustomerCode>

Represents a unique customer, client, or account master data code. Normalized to uppercase. Rules: Required, 1–40 characters, uppercase alphanumeric with separators (`. _ / -`). Used by: ERP, CRM, POS, Electronic Invoicing, Subscriptions.

Miembros (1)

  • methodCreate
    public static Result<CustomerCode> Create(string? value)

    Creates a new `CustomerCode` instance after validating and normalizing to uppercase.

    value: string?
    The raw customer code string.

    Retorna: A `Result<CustomerCode>` containing the created instance or a validation error.

record

DateRange

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct DateRange : IValueObject<DateRange>, IComparable<DateRange>, IComparable, IParsable<DateRange>, ISpanParsable<DateRange>
Implementa: IComparable, IComparable<DateRange>, IParsable<DateRange>, ISpanParsable<DateRange>, IValueObject<DateRange>

Represents an inclusive calendar date range defined by start and end dates.

Notas:

Comparison is performed by `Start` date first; when start dates are equal, comparison is determined by `End` date.

Miembros (20)

  • methodCompareTo
    public int CompareTo(DateRange other)

    Compares this date range with another date range.

    other: DateRange
    The other date range to compare against.

    Retorna: A value indicating the relative order of the date ranges being compared.

    Comparison is first by `Start`; when start dates are equal, comparison falls back to `End`.

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `DateRange`

  • methodContains
    public bool Contains(DateOnly date)

    Determines whether the specified date is contained within this date range.

    date: DateOnly
    The date to check.

    Retorna: `true` if the date is within the inclusive range; otherwise, `false`.

  • methodCreate
    public static Result<DateRange> Create(DateOnly start, DateOnly end)

    Creates a validated `DateRange` instance with specified start and end dates.

    start: DateOnly
    The start date of the range.
    end: DateOnly
    The end date of the range.

    Retorna: A successful `Result<T>` containing the validated date range, or a validation failure.

  • methodOverlaps
    public bool Overlaps(DateRange other)

    Determines whether this date range overlaps with another date range.

    other: DateRange
    The other date range to check for overlap.

    Retorna: `true` if the ranges overlap; otherwise, `false`.

  • methodParse
    public static DateRange Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a span of characters into a `DateRange`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `DateRange`.

    Exceptions: FormatException: `s` is not in a valid format

  • methodParse
    public static DateRange Parse(string s, IFormatProvider? provider = null)

    Parses a string into a `DateRange`.

    s: string
    The string to parse (e.g. `"[2026-01-01 .. 2026-12-31]"` or `"2026-01-01..2026-12-31"`).
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `DateRange`.

    Exceptions: FormatException: `s` is not in a valid format

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out DateRange result)

    Attempts to parse a span of characters into a `DateRange`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out DateRange
    When this method returns, contains the parsed range if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out DateRange result)

    Attempts to parse a string into a `DateRange`.

    s: string?
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out DateRange
    When this method returns, contains the parsed range if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodoperator <
    public static bool operator <(DateRange left, DateRange right)

    Determines whether the left date range is earlier than the right date range.

    left: DateRange
    The first date range to compare.
    right: DateRange
    The second date range to compare.

    Retorna: `true` if `left` is earlier than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(DateRange left, DateRange right)

    Determines whether the left date range is earlier than or equal to the right date range.

    left: DateRange
    The first date range to compare.
    right: DateRange
    The second date range to compare.

    Retorna: `true` if `left` is earlier than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(DateRange left, DateRange right)

    Determines whether the left date range is later than the right date range.

    left: DateRange
    The first date range to compare.
    right: DateRange
    The second date range to compare.

    Retorna: `true` if `left` is later than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(DateRange left, DateRange right)

    Determines whether the left date range is later than or equal to the right date range.

    left: DateRange
    The first date range to compare.
    right: DateRange
    The second date range to compare.

    Retorna: `true` if `left` is later than or equal to `right`; otherwise, `false`.

  • propertyDaysDifference
    public int DaysDifference { get; }

    Gets the difference in calendar days between start and end (exclusive of boundary point).

  • propertyDurationInDays
    public int DurationInDays { get; }

    Gets the total number of calendar days spanned by the range (inclusive).

  • propertyEnd
    public DateOnly End { get; }

    Gets the ending date of the range.

  • propertyInclusiveDays
    public int InclusiveDays { get; }

    Gets the inclusive number of calendar days spanned by the range (equivalent to `DurationInDays`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

  • propertyStart
    public DateOnly Start { get; }

    Gets the starting date of the range.

record

DecimalQuantity

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct DecimalQuantity : IValueObject<DecimalQuantity>, IEquatable<DecimalQuantity>, IComparable<DecimalQuantity>, IParsable<DecimalQuantity>, ISpanParsable<DecimalQuantity>
Implementa: IComparable<DecimalQuantity>, IEquatable<DecimalQuantity>, IParsable<DecimalQuantity>, ISpanParsable<DecimalQuantity>, IValueObject<DecimalQuantity>

Represents a fractional decimal quantity (e.g., `1.500` kg, `0.250` L, `2.75` m) for commercial, inventory, retail scale, and bill-of-materials domains where discrete integer `Quantity` is insufficient.

Miembros (20)

  • methodAdd
    public Result<DecimalQuantity> Add(DecimalQuantity other)

    Adds another `DecimalQuantity` to this instance.

    other: DecimalQuantity
    The quantity to add.

    Retorna: A `Result<DecimalQuantity>` containing the sum.

  • methodCompareTo
    public int CompareTo(DecimalQuantity other)

    Inherits documentation from base type or interface.

    other: DecimalQuantity
  • methodCreate
    public static Result<DecimalQuantity> Create(decimal value, int maxScale = 6)

    Creates a validated non-negative `DecimalQuantity` (>= 0) with at most `maxScale` decimal places.

    value: decimal
    The non-negative decimal quantity.
    maxScale: int
    Maximum allowed decimal scale (0–6, defaults to 6).

    Retorna: A `Result<DecimalQuantity>` containing the validated quantity or an error.

  • methodCreatePositive
    public static Result<DecimalQuantity> CreatePositive(decimal value, int maxScale = 6)

    Creates a validated strictly positive `DecimalQuantity` (> 0).

    value: decimal
    The strictly positive decimal quantity.
    maxScale: int
    Maximum allowed decimal scale (0–6, defaults to 6).

    Retorna: A `Result<DecimalQuantity>` containing the validated quantity or an error.

  • methodParse
    public static DecimalQuantity Parse(ReadOnlySpan<char> s, IFormatProvider? provider)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static DecimalQuantity Parse(string s, IFormatProvider? provider)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodSubtract
    public Result<DecimalQuantity> Subtract(DecimalQuantity other)

    Subtracts another `DecimalQuantity` from this instance, failing if the result would become negative.

    other: DecimalQuantity
    The quantity to subtract.

    Retorna: A `Result<DecimalQuantity>` containing the non-negative difference or an insufficient quantity error.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out DecimalQuantity result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out DecimalQuantity
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out DecimalQuantity result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out DecimalQuantity
  • methodoperator <
    public static bool operator <(DecimalQuantity left, DecimalQuantity right)

    Determines whether `left` is strictly less than `right`.

    left: DecimalQuantity
    right: DecimalQuantity
  • methodoperator <=
    public static bool operator <=(DecimalQuantity left, DecimalQuantity right)

    Determines whether `left` is less than or equal to `right`.

    left: DecimalQuantity
    right: DecimalQuantity
  • methodoperator >
    public static bool operator >(DecimalQuantity left, DecimalQuantity right)

    Determines whether `left` is strictly greater than `right`.

    left: DecimalQuantity
    right: DecimalQuantity
  • methodoperator >=
    public static bool operator >=(DecimalQuantity left, DecimalQuantity right)

    Determines whether `left` is greater than or equal to `right`.

    left: DecimalQuantity
    right: DecimalQuantity
  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this instance is uninitialized (`default(DecimalQuantity)`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance was initialized via a factory or `Zero`.

  • propertyIsPositive
    public bool IsPositive { get; }

    Gets a value indicating whether `Value` is strictly positive (> 0).

  • propertyIsZero
    public bool IsZero { get; }

    Gets a value indicating whether `Value` is zero.

  • propertyValue
    public decimal Value { get; }

    Gets the fractional decimal value.

  • propertyZero
    public static DecimalQuantity Zero { get; }

    Gets an initialized zero `DecimalQuantity`.

record

DeletedBy

Ensamblado: EricksonLopez.ValueObjects
public sealed record DeletedBy : StringValueObject<DeletedBy>
Hereda de: StringValueObject<DeletedBy>

Represents the identity of the actor who marked an entity as deleted (soft delete). Normalized to uppercase. Rules: Required, 1–120 characters, uppercase alphanumeric or human/system identifier characters. Stored uppercase. Used by: All bounded contexts (Soft delete audit trail).

Miembros (1)

  • methodCreate
    public static Result<DeletedBy> Create(string? value)

    Creates a new `DeletedBy` instance after validating and normalizing the actor identifier.

    value: string?
    The raw actor identifier string.

    Retorna: A `Result<DeletedBy>` containing the created instance or a validation error.

record

DepartmentName

Ensamblado: EricksonLopez.ValueObjects
public sealed record DepartmentName : StringValueObject<DepartmentName>
Hereda de: StringValueObject<DepartmentName>

Represents the name of a business department, division, or organizational unit. Normalized by collapsing excessive whitespace. Rules: Required, 2–120 characters, business name characters. Used by: Human Resources, Payroll, Organization Structure, ERP, Budgeting.

Miembros (1)

  • methodCreate
    public static Result<DepartmentName> Create(string? value)

    Creates a new `DepartmentName` instance after validating and collapsing whitespace.

    value: string?
    The raw department name string.

    Retorna: A `Result<DepartmentName>` containing the created instance or a validation error.

record

Description

Ensamblado: EricksonLopez.ValueObjects
public sealed record Description : StringValueObject<Description>
Hereda de: StringValueObject<Description>

Generic description Value Object for entities across all bounded contexts. Suitable for product descriptions, task descriptions, meeting summaries, etc. Accepts any printable content; whitespace is collapsed. Rules: Required, 1–1000 chars, whitespace collapsed, no control characters. Used by: ERP, POS, E-Invoicing, Payroll, Inventory, Manufacturing, CRM, HR, Property Management, Tasks, Financial, Donations, SaaS.

Miembros (1)

  • methodCreate
    public static Result<Description> Create(string? value)

    Creates a new `Description` instance after validating and collapsing whitespace.

    value: string?
    The raw description string.

    Retorna: A `Result` containing the created instance or a validation error.

enum

DimensionUnit

Ensamblado: EricksonLopez.ValueObjects
public enum DimensionUnit

Supported linear dimension units for packaging, warehousing, and freight volumetrics.

Miembros (5)

  • fieldCentimeter
    Centimeter = 1

    Centimeter (`cm`).

  • fieldFoot
    Foot = 4

    Foot (`ft`, 30.48 cm).

  • fieldInch
    Inch = 3

    Inch (`in`, 2.54 cm).

  • fieldMeter
    Meter = 2

    Meter (`m`, 100 cm).

  • fieldMillimeter
    Millimeter = 0

    Millimeter (`mm`, 0.1 cm).

record

DiscountRate

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct DiscountRate : IValueObject<DiscountRate>, IComparable<DiscountRate>, IComparable, IParsable<DiscountRate>, ISpanParsable<DiscountRate>, IFormattable, ISpanFormattable
Implementa: IComparable, IComparable<DiscountRate>, IFormattable, IParsable<DiscountRate>, ISpanFormattable, ISpanParsable<DiscountRate>, IValueObject<DiscountRate>

Represents a commercial discount rate percentage value between 0 and 100 inclusive.

Miembros (24)

  • methodApplyTo
    public Money ApplyTo(Money baseAmount)

    Calculates the net monetary amount remaining after applying the discount using banker's rounding.

    baseAmount: Money
    The base monetary amount before discount.

    Retorna: The net `Money` remaining after discount.

  • methodApplyTo
    public decimal ApplyTo(decimal baseAmount)

    Calculates the net amount remaining after applying the discount to a base numeric value.

    baseAmount: decimal
    The base numeric amount before discount.

    Retorna: The net amount remaining after applying the discount, rounded to 6 decimal places.

  • methodCalculateDiscount
    public Money CalculateDiscount(Money baseAmount)

    Calculates the absolute discount monetary amount for a specified base monetary value using banker's rounding.

    baseAmount: Money
    The base monetary value before discount.

    Retorna: The calculated discount `Money` amount.

  • methodCalculateDiscount
    public decimal CalculateDiscount(decimal baseAmount)

    Calculates the absolute discount amount for a specified base numeric value.

    baseAmount: decimal
    The base monetary or numeric value.

    Retorna: The calculated discount amount rounded to 6 decimal places.

  • methodCompareTo
    public int CompareTo(DiscountRate other)

    Compares this discount rate with another discount rate.

    other: DiscountRate
    The other discount rate to compare against.

    Retorna: A value indicating the relative order of the discount rates being compared.

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `DiscountRate`

  • methodCreate
    public static Result<DiscountRate> Create(decimal value)

    Creates a validated `DiscountRate` instance from a percentage value in the range [0, 100].

    value: decimal
    The discount percentage amount.

    Retorna: A successful `Result<T>` containing the validated discount rate, or a validation failure.

  • methodParse
    public static DiscountRate Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a span of characters into a `DiscountRate`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `DiscountRate`.

    Exceptions: FormatException: `s` is not in a valid discount rate format

  • methodParse
    public static DiscountRate Parse(string s, IFormatProvider? provider = null)

    Parses a string into a `DiscountRate`.

    s: string
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `DiscountRate`.

    Exceptions: FormatException: `s` is not in a valid discount rate format

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodToString
    public string ToString(string? format, IFormatProvider? formatProvider)

    Inherits documentation from `IFormattable.ToString(string?, IFormatProvider?)`.

    format: string?
    formatProvider: IFormatProvider?
  • methodTryFormat
    public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)

    Inherits documentation from base type or interface.

    destination: Span<char>
    charsWritten: out int
    format: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out DiscountRate result)

    Attempts to parse a span of characters into a `DiscountRate`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out DiscountRate
    When this method returns, contains the parsed discount rate if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out DiscountRate result)

    Attempts to parse a string into a `DiscountRate`.

    s: string?
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out DiscountRate
    When this method returns, contains the parsed discount rate if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodoperator <
    public static bool operator <(DiscountRate left, DiscountRate right)

    Determines whether the left discount rate is less than the right discount rate.

    left: DiscountRate
    The first discount rate to compare.
    right: DiscountRate
    The second discount rate to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(DiscountRate left, DiscountRate right)

    Determines whether the left discount rate is less than or equal to the right discount rate.

    left: DiscountRate
    The first discount rate to compare.
    right: DiscountRate
    The second discount rate to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(DiscountRate left, DiscountRate right)

    Determines whether the left discount rate is greater than the right discount rate.

    left: DiscountRate
    The first discount rate to compare.
    right: DiscountRate
    The second discount rate to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(DiscountRate left, DiscountRate right)

    Determines whether the left discount rate is greater than or equal to the right discount rate.

    left: DiscountRate
    The first discount rate to compare.
    right: DiscountRate
    The second discount rate to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyAsFraction
    public decimal AsFraction { get; }

    Gets the fractional representation of the discount rate.

  • propertyFraction
    public decimal Fraction { get; }

    Gets the fractional representation of the discount rate (value divided by 100).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `DiscountRate` instance was initialized through a factory rather than `default(DiscountRate)`.

  • propertyIsZero
    public bool IsZero { get; }

    Gets a value indicating whether the discount rate is zero.

  • propertyValue
    public decimal Value { get; }

    Gets the numerical discount rate percentage.

  • fieldNone
    public static readonly DiscountRate None

    Gets a discount rate representing zero discount (0%).

record

DisplayName

Ensamblado: EricksonLopez.ValueObjects
public sealed record DisplayName : StringValueObject<DisplayName>
Hereda de: StringValueObject<DisplayName>

Represents a user-facing display name or alias for UI presentation.

Miembros (1)

  • methodCreate
    public static Result<DisplayName> Create(string? value)

    Creates a validated `DisplayName` instance after normalizing business whitespace.

    value: string?
    The raw display name string.

    Retorna: A successful `Result<T>` containing the validated display name, or a validation failure.

record

DocumentNumber

Ensamblado: EricksonLopez.ValueObjects
public sealed record DocumentNumber : StringValueObject<DocumentNumber>
Hereda de: StringValueObject<DocumentNumber>

Represents a structured document number — the primary identity of a business document. This is the number printed on the document itself (e.g., the invoice number, purchase order number). Normalized to uppercase. Rules: Required, 1–60 chars, uppercase alphanumeric with `. _ / -` separators. Used by: E-Invoicing, ERP, Inventory, Manufacturing, Financial, Audit When to use DocumentNumber vs ReferenceNumber vs ExternalReference: - DocumentNumber: The document's OWN identifier. E.g., invoice `FAC-2026-0001`, purchase order `OC-2026-0042`, NCF sequence `B0100000001`. - ReferenceNumber: A POINTER to another document or operation within the organization. E.g., "this payment references invoice `FAC-2026-0001`", bank transfer `REF-987654`, check number `CHK-001234`. - ExternalReference: An identifier from a THIRD PARTY that the organization does not control. E.g., supplier invoice number, DGII authorization code, bank transaction ID.

Miembros (1)

  • methodCreate
    public static Result<DocumentNumber> Create(string? value)

    Creates a new `DocumentNumber` instance after validating and normalizing the document number.

    value: string?
    The raw document number string.

    Retorna: A `Result<DocumentNumber>` containing the created instance or a validation error.

class

DomainException

Ensamblado: EricksonLopez.ValueObjects
public sealed class DomainException : Exception
Hereda de: Exception

Represents errors caused by value object invariant violations and invalid domain states resulting from caller programming errors.

Notas:

Reserved for programmer errors at the domain boundary rather than standard operational or business validation failures.

Miembros (3)

  • constructorDomainException
    public DomainException(string message)

    Initializes a new instance of the `DomainException` class with a specified error message.

    message: string
    The message that describes the error.
  • constructorDomainException
    public DomainException(string message, Exception innerException)

    Initializes a new instance of the `DomainException` class with a specified error message and a reference to the inner exception that is the cause of this exception.

    message: string
    The message that describes the error.
    innerException: Exception
    The exception that is the cause of the current exception.
  • methodThrowIf
    public static void ThrowIf(bool condition, string message)

    Throws a `DomainException` if the specified condition is `true`.

    condition: bool
    The condition to evaluate.
    message: string
    The message to include in the exception if thrown.

    Exceptions: DomainException: `condition` is `true`

record

Email

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct Email : IValueObject<Email>, IComparable<Email>, IComparable, IParsable<Email>, ISpanParsable<Email>, IFormattable
Implementa: IComparable, IComparable<Email>, IFormattable, IParsable<Email>, ISpanParsable<Email>, IValueObject<Email>

Represents a validated RFC 5321 email address normalized to lowercase.

Miembros (24)

  • methodCompareTo
    public int CompareTo(Email other)

    Compares this email address with another email address using ordinal string comparison.

    other: Email
    The other email address to compare against.

    Retorna: A value indicating the relative order of the email addresses being compared.

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `Email`

  • methodCreate
    public static Result<Email> Create(ReadOnlySpan<char> value)

    Creates a validated `Email` instance from an email address character span.

    value: ReadOnlySpan<char>
    The raw email address character span.

    Retorna: A successful `Result<T>` containing the validated email, or a validation failure.

  • methodCreate
    public static Result<Email> Create(string? value)

    Creates a validated `Email` instance from an email address string.

    value: string?
    The raw email address string.

    Retorna: A successful `Result<T>` containing the validated email, or a validation failure.

  • methodCreateWithBlindIndex
    public static Result<Email> CreateWithBlindIndex(string? value, Func<string, string>? blindIndexFactory)

    Creates a validated `Email` instance and computes its deterministic blind index using the provided hash function.

    value: string?
    The raw email address string.
    blindIndexFactory: Func<string, string>?
    A deterministic hash function (such as HMAC-SHA256) that computes the blind index from the normalized email string.

    Retorna: A successful `Result<T>` containing the validated email and its blind index, or a validation failure.

  • methodEquals
    public bool Equals(Email other)

    Determines whether this email address is equal to another email address by comparing their canonical normalized values.

    other: Email
    The other email address to compare against.

    Retorna: `true` if both email addresses have the same canonical value; otherwise, `false`.

  • methodGetHashCode
    public override int GetHashCode()

    Inherits documentation from base type or interface.

  • methodMasked
    public string Masked()

    Returns the email address with the local mailbox portion masked for secure diagnostic logging.

    Retorna: The masked email address string.

  • methodParse
    public static Email Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a span of characters into an `Email`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `Email`.

    Exceptions: FormatException: `s` is not in a valid email format

  • methodParse
    public static Email Parse(string s, IFormatProvider? provider = null)

    Parses a string into an `Email`.

    s: string
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `Email`.

    Exceptions: FormatException: `s` is not in a valid email format

  • methodToMaskedString
    public string ToMaskedString()

    Returns the email address with the local mailbox portion masked for secure diagnostic logging per ADR-013.

    Retorna: The masked email address string.

  • methodToString
    public override string ToString()

    Returns the canonical normalized email address string, ensuring round-trip fidelity with `Parse(string, IFormatProvider?)`.

    Retorna: The canonical normalized email address string, or an empty string if uninitialized.

  • methodToString
    public string ToString(string? format, IFormatProvider? formatProvider = null)

    Formats the email address according to the specified format specifier. When `format` is "M" or "m", returns the masked email address per ADR-013. Otherwise, returns the canonical normalized email address string.

    format: string?
    The format specifier (e.g., "M" for masked, "G" or null for general canonical).
    formatProvider: IFormatProvider?
    An optional format provider.

    Retorna: The formatted email address string.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Email result)

    Attempts to parse a span of characters into an `Email`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out Email
    When this method returns, contains the parsed email if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Email result)

    Attempts to parse a string into an `Email`.

    s: string?
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out Email
    When this method returns, contains the parsed email if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodoperator <
    public static bool operator <(Email left, Email right)

    Determines whether the left email address is less than the right email address.

    left: Email
    The first email address to compare.
    right: Email
    The second email address to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Email left, Email right)

    Determines whether the left email address is less than or equal to the right email address.

    left: Email
    The first email address to compare.
    right: Email
    The second email address to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Email left, Email right)

    Determines whether the left email address is greater than the right email address.

    left: Email
    The first email address to compare.
    right: Email
    The second email address to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Email left, Email right)

    Determines whether the left email address is greater than or equal to the right email address.

    left: Email
    The first email address to compare.
    right: Email
    The second email address to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyBlindIndex
    public string BlindIndex { get; }

    Gets the deterministic cryptographic blind index (e.g., HMAC-SHA256) associated with the normalized email address for searchable encryption, or an empty string if not computed.

  • propertyDomain
    public string Domain { get; }

    Gets the domain portion of the email address succeeding the `@` sign.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Email` instance was initialized through a factory rather than `default(Email)`.

  • propertyLocalPart
    public string LocalPart { get; }

    Gets the local mailbox portion of the email address preceding the `@` sign.

  • propertyValue
    public string Value { get; }

    Gets the normalized email address string.

record

EmployeeCode

Ensamblado: EricksonLopez.ValueObjects
public sealed record EmployeeCode : StringValueObject<EmployeeCode>
Hereda de: StringValueObject<EmployeeCode>

Represents a unique employee, staff, or payroll identifier code. Normalized to uppercase. Rules: Required, 1–40 characters, uppercase alphanumeric with separators (`. _ / -`). Used by: Human Resources, Payroll, Time & Attendance, ERP, Identity.

Miembros (1)

  • methodCreate
    public static Result<EmployeeCode> Create(string? value)

    Creates a new `EmployeeCode` instance after validating and normalizing to uppercase.

    value: string?
    The raw employee code string.

    Retorna: A `Result<EmployeeCode>` containing the created instance or a validation error.

record

ExchangeRate

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct ExchangeRate : IValueObject<ExchangeRate>
Implementa: IValueObject<ExchangeRate>

Represents an exchange rate between two ISO 4217 currencies.

Notas:

Does not encapsulate temporal validity; temporal context should be managed by the aggregate or repository.

Miembros (9)

  • methodConvert
    public Result<Money> Convert(Money amount)

    Converts a `Money` amount from the source currency to the target currency, applying banker's rounding to the target currency's standard decimal places.

    amount: Money
    The monetary amount in the source currency to convert.

    Retorna: A successful `Result<Money>` containing the converted amount, or a validation failure.

  • methodConvert
    public Result<Money> Convert(Money amount, int decimals)

    Converts a `Money` amount from the source currency to the target currency, applying banker's rounding to the specified target decimal scale.

    amount: Money
    The monetary amount in the source currency to convert.
    decimals: int
    The decimal scale override for the target monetary amount (between 0 and 28).

    Retorna: A successful `Result<Money>` containing the converted amount in the target currency, or a validation failure.

  • methodCreate
    public static Result<ExchangeRate> Create(CurrencyCode fromCurrency, CurrencyCode toCurrency, decimal rate)

    Creates a validated `ExchangeRate` instance between two distinct currencies.

    fromCurrency: CurrencyCode
    The source currency code.
    toCurrency: CurrencyCode
    The target currency code.
    rate: decimal
    The positive exchange rate factor.

    Retorna: A successful `Result<T>` containing the validated exchange rate, or a validation failure.

  • methodInverse
    public Result<ExchangeRate> Inverse()

    Calculates the inverse exchange rate converting from the target currency back to the source currency.

    Retorna: A successful `Result<T>` containing the inverted exchange rate.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • propertyFromCurrency
    public CurrencyCode FromCurrency { get; }

    Gets the source ISO 4217 currency code.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `ExchangeRate` instance was initialized through a factory rather than `default(ExchangeRate)`.

  • propertyRate
    public decimal Rate { get; }

    Gets the numerical exchange conversion rate from source to target currency.

  • propertyToCurrency
    public CurrencyCode ToCurrency { get; }

    Gets the target ISO 4217 currency code.

record

ExternalReference

Ensamblado: EricksonLopez.ValueObjects
public sealed record ExternalReference : StringValueObject<ExternalReference>
Hereda de: StringValueObject<ExternalReference>

Represents a reference code assigned by an external system (e.g., third-party API ID, payment gateway reference, bank transaction ID, integration correlation key). Case is preserved as-is. External systems may be case-sensitive; normalizing to uppercase would destroy information and break reconciliation with those systems. Rules: Required, 1–200 chars, leading/trailing whitespace trimmed, no control characters. No pattern restriction — external references may be UUIDs, tokens, numeric IDs, base64 strings, or any format defined by the third party. Used by: ERP, FE, CRM, SaaS, Treasury.

Miembros (1)

  • methodCreate
    public static Result<ExternalReference> Create(string? value)

    Creates a new `ExternalReference` instance after trimming leading and trailing whitespace.

    value: string?
    The raw external reference string.

    Retorna: A `Result<ExternalReference>` containing the created instance or a validation error.

record

FileName

Ensamblado: EricksonLopez.ValueObjects
public sealed record FileName : StringValueObject<FileName>
Hereda de: StringValueObject<FileName>

Represents a file system-safe file name. Rules: 1–255 chars, no characters that are invalid on Windows NTFS, Linux ext4, or common cloud storage providers (Azure Blob, S3). Used by: Document management, uploads, storage Design note: This VO does not use `System.IO.Path.GetInvalidFileNameChars()` because that method returns OS-specific results (different on Windows vs Linux), which would make domain validation non-deterministic across environments. Instead, a curated explicit set of characters is defined here that covers the union of restrictions across all target platforms. Prohibited characters (platform-union set): - ASCII control characters (0x00–0x1F) — invalid everywhere - `\ / : * ? " < > |` — invalid on Windows NTFS and many cloud providers - Null byte (0x00) — invalid on all POSIX file systems .

Miembros (2)

  • methodCreate
    public static Result<FileName> Create(string? value)

    Creates a new `FileName` instance after validating that it contains no prohibited characters.

    value: string?
    The raw file name string.

    Retorna: A `Result<FileName>` containing the created instance or a validation error.

  • propertyExtension
    public string Extension { get; }

    Returns the file extension including the dot (e.g., `.pdf`).

record

FirstName

Ensamblado: EricksonLopez.ValueObjects
public sealed record FirstName : StringValueObject<FirstName>
Hereda de: StringValueObject<FirstName>

Represents an individual's first or given name.

Miembros (1)

  • methodCreate
    public static Result<FirstName> Create(string? value)

    Creates a validated `FirstName` instance after normalizing whitespace and unicode characters.

    value: string?
    The raw first name string.

    Retorna: A successful `Result<T>` containing the validated first name, or a validation failure.

record

FullName

Ensamblado: EricksonLopez.ValueObjects
public sealed record FullName : ValueObject
Hereda de: ValueObject

Represents an individual's composite full name consisting of first, optional middle, and last name.

Miembros (7)

  • methodCreate
    public static Result<FullName> Create(FirstName? firstName, LastName? lastName, MiddleName? middleName = null)

    Creates a `FullName` instance from strongly typed name components.

    firstName: FirstName?
    The validated first name.
    lastName: LastName?
    The validated last name.
    middleName: MiddleName?
    The optional validated middle name.

    Retorna: A successful `Result<T>` containing the composite full name, or a validation failure.

  • methodCreate
    public static Result<FullName> Create(string? firstName, string? lastName, string? middleName = null)

    Creates a `FullName` instance from raw name strings, validating each component.

    firstName: string?
    The raw first name string.
    lastName: string?
    The raw last name string.
    middleName: string?
    The optional raw middle name string.

    Retorna: A successful `Result<T>` containing the composite full name, or a validation failure.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • propertyFirstName
    public FirstName FirstName { get; }

    Gets the first name component.

  • propertyLastName
    public LastName LastName { get; }

    Gets the last name component.

  • propertyMiddleName
    public MiddleName? MiddleName { get; }

    Gets the optional middle name component.

  • propertyValue
    public string Value { get; }

    Gets the complete formatted full name string.

record

GeoCoordinate

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct GeoCoordinate : IValueObject<GeoCoordinate>, IParsable<GeoCoordinate>, ISpanParsable<GeoCoordinate>
Implementa: IParsable<GeoCoordinate>, ISpanParsable<GeoCoordinate>, IValueObject<GeoCoordinate>

Immutable Value Object representing geographic coordinates on the WGS 84 ellipsoid.

Miembros (11)

  • methodCreate
    public static Result<GeoCoordinate> Create(double latitude, double longitude)

    Creates a validated `GeoCoordinate` instance.

    latitude: double
    Latitude in decimal degrees (-90 to 90).
    longitude: double
    Longitude in decimal degrees (-180 to 180).

    Retorna: A `Result<GeoCoordinate>` containing the validated coordinate or a validation error.

  • methodDistanceToKilometers
    public double DistanceToKilometers(GeoCoordinate target)

    Calculates the great-circle distance to another coordinate using the Haversine formula in kilometers.

    target: GeoCoordinate
    The target coordinate.

    Retorna: The distance in kilometers.

  • methodDistanceToMeters
    public double DistanceToMeters(GeoCoordinate target)

    Calculates the great-circle distance to another coordinate in meters.

    target: GeoCoordinate
    The destination coordinate.

    Retorna: The calculated geodesic distance in meters.

  • methodParse
    public static GeoCoordinate Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a span of characters into a `GeoCoordinate`.

    s: ReadOnlySpan<char>
    The span of characters to parse in "latitude, longitude" format.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `GeoCoordinate`.

    Exceptions: FormatException: `s` is not in a valid coordinate format

  • methodParse
    public static GeoCoordinate Parse(string s, IFormatProvider? provider = null)

    Parses a string into a `GeoCoordinate`.

    s: string
    The string to parse in "latitude, longitude" format.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `GeoCoordinate`.

    Exceptions: ArgumentNullException: `s` is `null`; FormatException: `s` is not in a valid coordinate format

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out GeoCoordinate result)

    Attempts to parse a span of characters into a `GeoCoordinate`.

    s: ReadOnlySpan<char>
    The span of characters to parse in "latitude, longitude" format.
    provider: IFormatProvider?
    An optional format provider.
    result: out GeoCoordinate
    When this method returns, contains the parsed coordinate if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out GeoCoordinate result)

    Attempts to parse a string into a `GeoCoordinate`.

    s: string?
    The string to parse in "latitude, longitude" format.
    provider: IFormatProvider?
    An optional format provider.
    result: out GeoCoordinate
    When this method returns, contains the parsed coordinate if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `GeoCoordinate` instance was initialized through a factory rather than `default(GeoCoordinate)`.

  • propertyLatitude
    public double Latitude { get; }

    Gets the latitude component in decimal degrees (-90.0 to 90.0).

  • propertyLongitude
    public double Longitude { get; }

    Gets the longitude component in decimal degrees (-180.0 to 180.0).

record

HierarchyPath

Ensamblado: EricksonLopez.ValueObjects
public sealed record HierarchyPath : StringValueObject<HierarchyPath>
Hereda de: StringValueObject<HierarchyPath>

Immutable Value Object representing a hierarchical tree node path using the Materialized Path pattern (e.g. `/1/4/12/`).

Miembros (12)

  • methodAppend
    public HierarchyPath Append(string childSegment)

    Appends a validated child segment to the current path, returning a new `HierarchyPath`.

    childSegment: string
    The child segment to append.

    Retorna: A new `HierarchyPath` with the appended segment.

    Exceptions: ArgumentException: Thrown when `childSegment` is null, whitespace, or contains invalid characters

  • methodCreate
    public static Result<HierarchyPath> Create(string? value)

    Creates a validated `HierarchyPath` instance from a materialized path string.

    value: string?
    The path string formatted as `/segment1/segment2/.../`.

    Retorna: A `Result<HierarchyPath>` containing the validated instance or a domain validation error.

  • methodIsAncestorOf
    public bool IsAncestorOf(HierarchyPath other)

    Determines whether this path is an ancestor of the specified child path.

    other: HierarchyPath
    The target path to evaluate.

    Retorna: `true` if this path is an ancestor of `other`; otherwise, `false`.

  • methodIsDescendantOf
    public bool IsDescendantOf(HierarchyPath other)

    Determines whether this path is a descendant of the specified parent path.

    other: HierarchyPath
    The target path to evaluate.

    Retorna: `true` if this path is a descendant of `other`; otherwise, `false`.

  • methodIsDirectChildOf
    public bool IsDirectChildOf(HierarchyPath parent)

    Determines whether this path is a direct child of the specified parent path.

    parent: HierarchyPath
    The parent path to evaluate.

    Retorna: `true` if this path is a direct child of `parent`; otherwise, `false`.

  • methodRoot
    public static HierarchyPath Root(string? initialSegment = null)

    Creates a root-level `HierarchyPath`, optionally initializing with the specified child segment.

    initialSegment: string?
    An optional root child segment (e.g. `"dept_1"` producing `"/dept_1/"`).

    Retorna: A new `HierarchyPath`.

  • methodSanitize
    public static string Sanitize(string segment)

    Sanitizes an input string to be a valid path segment.

    segment: string
    The path segment to sanitize.

    Retorna: The sanitized path segment string.

  • methodTryAppend
    public Result<HierarchyPath> TryAppend(string? childSegment)

    Attempts to append a child segment to the current path, returning a `Result<HierarchyPath>`.

    childSegment: string?
    The child segment to append.

    Retorna: A `Result<HierarchyPath>` containing the new path or a validation error.

  • propertyDepth
    public int Depth { get; }

    Gets the hierarchy depth level (root is 0, /1/ is 1, /1/4/ is 2).

  • propertyIsRoot
    public bool IsRoot { get; }

    Gets a value indicating whether this path represents the root node.

  • propertyParent
    public HierarchyPath? Parent { get; }

    Gets the parent `HierarchyPath`, or `null` if this is the root path.

  • propertyRootConstant
    public static HierarchyPath RootConstant { get; }

    Represents the root level path constant (`/`).

record

HmacSha256Hash

Ensamblado: EricksonLopez.ValueObjects
public sealed partial record HmacSha256Hash : StringValueObject<HmacSha256Hash>
Hereda de: StringValueObject<HmacSha256Hash>

Represents a cryptographically secure 64-character hexadecimal HMAC-SHA256 hash (e.g. for API key signatures or webhook payloads). Invariant: Must be exactly 64 hexadecimal characters, normalized to lowercase. Masked by default via `SensitiveDataAttribute` and `object.ToString()`.

Miembros (1)

  • methodCreate
    public static Result<HmacSha256Hash> Create(string? value)

    Creates a new `HmacSha256Hash` instance after validating format and length.

    value: string?
    The raw HMAC-SHA256 hash hexadecimal string.

    Retorna: A `Result<HmacSha256Hash>` containing the created instance or a validation error.

interface

IValueObject

Ensamblado: EricksonLopez.ValueObjects
public interface IValueObject

Defines a marker interface identifying a Domain-Driven Design value object.

Notas:

A value object has no conceptual identity and is defined exclusively by its attributes and invariants.

Miembros (0)

Este tipo declara 0 miembros públicos (por ejemplo, interfaz marcadora o enum/record vacío).

interface

IValueObject<TSelf>

Ensamblado: EricksonLopez.ValueObjects
public interface IValueObject<TSelf> : IValueObject, IEquatable<TSelf> where TSelf : IValueObject<TSelf>
Implementa: IEquatable<TSelf>, IValueObject

Defines a strongly-typed contract for value objects enforcing value-based equality.

Notas:

Type parameters: TSelf: The concrete value object type implementing this interface.

Miembros (0)

Este tipo declara 0 miembros públicos (por ejemplo, interfaz marcadora o enum/record vacío).

record

IsoCountry

Ensamblado: EricksonLopez.ValueObjects
public sealed record IsoCountry

Immutable ISO 3166-1 country descriptor enriched with Dominican Republic DGII Formato 609 foreign-payment country codes, ITU-T E.164 calling prefixes, and ISO 4217 currency codes.

Miembros (19)

  • methodFromCode
    public static Result<IsoCountry> FromCode(string? codeOrName)

    Resolves an `IsoCountry` by ISO alpha-2, alpha-3, numeric/DGII 609 code, or localized country name.

    codeOrName: string?
    The code or name to resolve.

    Retorna: A `Result<IsoCountry>` containing the matched entry or a NotFound/Validation error.

  • methodTryGetByAlpha2
    public static bool TryGetByAlpha2(string? alpha2, out IsoCountry? country)

    Attempts to find an `IsoCountry` by its ISO 3166-1 alpha-2 code.

    alpha2: string?
    country: out IsoCountry?
  • methodTryGetByAlpha3
    public static bool TryGetByAlpha3(string? alpha3, out IsoCountry? country)

    Attempts to find an `IsoCountry` by its ISO 3166-1 alpha-3 code.

    alpha3: string?
    country: out IsoCountry?
  • methodTryGetByDgiiCode
    public static bool TryGetByDgiiCode(string? dgiiCode, out IsoCountry? country)

    Attempts to find an `IsoCountry` by its three-digit DGII Formato 609 / ISO numeric code.

    dgiiCode: string?
    country: out IsoCountry?
  • methodTryGetByName
    public static bool TryGetByName(string? name, out IsoCountry? country)

    Attempts to find an `IsoCountry` by its English or Spanish name.

    name: string?
    country: out IsoCountry?
  • propertyAll
    public static IReadOnlyList<IsoCountry> All { get; }

    Gets the immutable catalog of standard ISO 3166-1 countries with DGII Formato 609 codes.

  • propertyAlpha2
    public string Alpha2 { get; }

    Gets the two-letter ISO 3166-1 alpha-2 code (e.g., `"DO"`).

  • propertyAlpha3
    public string Alpha3 { get; }

    Gets the three-letter ISO 3166-1 alpha-3 code (e.g., `"DOM"`).

  • propertyCallingCode
    public string CallingCode { get; }

    Gets the ITU-T E.164 international dialing code (e.g., `"+1-809"`, `"+1"`, `"+34"`).

  • propertyCode
    public CountryCode Code { get; }

    Gets the strongly-typed `CountryCode` (`Alpha2`).

  • propertyCurrencyCode
    public string CurrencyCode { get; }

    Gets the primary ISO 4217 three-letter currency code (e.g., `"DOP"`, `"USD"`).

  • propertyDgiiCode
    public string DgiiCode { get; }

    Gets the three-digit DGII Formato 609 country code used in Dominican Republic tax filings (e.g., `"214"`).

  • propertyDominicanRepublic
    public static IsoCountry DominicanRepublic { get; }

    Gets the Dominican Republic (`DO` / `DOM` / DGII `214`) catalog entry.

  • propertyEnglishName
    public string EnglishName { get; }

    Gets the official English country name.

  • propertyNumericCode
    public string NumericCode { get; }

    Gets the three-digit ISO 3166-1 numeric code (e.g., `"214"`).

  • propertyPuertoRico
    public static IsoCountry PuertoRico { get; }

    Gets the Puerto Rico (`PR` / `PRI` / DGII `630`) catalog entry.

  • propertySpain
    public static IsoCountry Spain { get; }

    Gets the Spain (`ES` / `ESP` / DGII `724`) catalog entry.

  • propertySpanishName
    public string SpanishName { get; }

    Gets the official Spanish country name.

  • propertyUnitedStates
    public static IsoCountry UnitedStates { get; }

    Gets the United States (`US` / `USA` / DGII `840`) catalog entry.

record

LanguageCode

Ensamblado: EricksonLopez.ValueObjects
public sealed partial record LanguageCode : StringValueObject<LanguageCode>
Hereda de: StringValueObject<LanguageCode>

Represents an ISO 639-1 or ISO 639-2 language code.

Miembros (1)

  • methodCreate
    public static Result<LanguageCode> Create(string? value)

    Creates a validated `LanguageCode` instance after normalizing to lowercase.

    value: string?
    The ISO 639 language code string.

    Retorna: A successful `Result<T>` containing the validated language code, or a validation failure.

record

LastName

Ensamblado: EricksonLopez.ValueObjects
public sealed record LastName : StringValueObject<LastName>
Hereda de: StringValueObject<LastName>

Represents an individual's last name or surname.

Miembros (1)

  • methodCreate
    public static Result<LastName> Create(string? value)

    Creates a validated `LastName` instance after normalizing whitespace and unicode characters.

    value: string?
    The raw last name string.

    Retorna: A successful `Result<T>` containing the validated last name, or a validation failure.

record

LicenseKey

Ensamblado: EricksonLopez.ValueObjects
public sealed partial record LicenseKey : StringValueObject<LicenseKey>
Hereda de: StringValueObject<LicenseKey>

Represents a software license key. Format: grouped uppercase alphanumeric segments separated by hyphens (e.g., `AAAA-BBBB-CCCC`). Rules: 2–9 groups, each 4–8 uppercase alphanumeric characters, separated by hyphens. Used by: SaaS BC — licensing only. Not a shared kernel VO. Security note: Use `Masked` when logging or displaying license keys to avoid exposing the full key in logs or UIs.

Miembros (2)

  • methodCreate
    public static Result<LicenseKey> Create(string? value)

    Creates a new `LicenseKey` instance after validating format and normalizing to uppercase.

    value: string?
    The raw license key string.

    Retorna: A `Result<LicenseKey>` containing the created instance or a validation error.

  • methodMasked
    public string Masked()

    Returns a masked version of the license key showing only the last segment group.

    Retorna: The masked license key string.

record

LocaleCode

Ensamblado: EricksonLopez.ValueObjects
public sealed partial record LocaleCode : StringValueObject<LocaleCode>
Hereda de: StringValueObject<LocaleCode>

Represents a locale or culture code identifier.

Miembros (1)

  • methodCreate
    public static Result<LocaleCode> Create(string? value)

    Creates a validated `LocaleCode` instance after normalizing language and region casing.

    value: string?
    The locale identifier string.

    Retorna: A successful `Result<T>` containing the validated locale code, or a validation failure.

record

MassWeight

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct MassWeight : IValueObject<MassWeight>, IComparable<MassWeight>, IComparable, IParsable<MassWeight>, ISpanParsable<MassWeight>
Implementa: IComparable, IComparable<MassWeight>, IParsable<MassWeight>, ISpanParsable<MassWeight>, IValueObject<MassWeight>

Represents a validated non-negative physical mass/weight with lossless SI and imperial unit conversions.

Miembros (28)

  • methodAdd
    public Result<MassWeight> Add(MassWeight other)

    Adds another `MassWeight` and returns the result in this instance's `Unit`.

    other: MassWeight
  • methodCompareTo
    public int CompareTo(MassWeight other)

    Inherits documentation from base type or interface.

    other: MassWeight
  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?
  • methodConvertTo
    public MassWeight ConvertTo(WeightUnit targetUnit)

    Converts this weight into `targetUnit`.

    targetUnit: WeightUnit
  • methodCreate
    public static Result<MassWeight> Create(decimal value, WeightUnit unit = WeightUnit.Kilogram)

    Creates a validated `MassWeight` instance.

    value: decimal
    Non-negative weight magnitude.
    unit: WeightUnit
    Unit of weight (defaults to `WeightUnit.Kilogram`).

    Retorna: A `Result<MassWeight>` containing the validated weight or a validation failure.

  • methodFromGrams
    public static Result<MassWeight> FromGrams(decimal grams)

    Creates a validated `MassWeight` in grams.

    grams: decimal
  • methodFromKilograms
    public static Result<MassWeight> FromKilograms(decimal kilograms)

    Creates a validated `MassWeight` in kilograms.

    kilograms: decimal
  • methodFromOunces
    public static Result<MassWeight> FromOunces(decimal ounces)

    Creates a validated `MassWeight` in ounces.

    ounces: decimal
  • methodFromPounds
    public static Result<MassWeight> FromPounds(decimal pounds)

    Creates a validated `MassWeight` in pounds.

    pounds: decimal
  • methodParse
    public static MassWeight Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a character span into a `MassWeight`.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static MassWeight Parse(string s, IFormatProvider? provider = null)

    Parses a string (e.g., `"12.5 kg"`, `"10 lb"`, `"500 g"`) into a `MassWeight`.

    s: string
    provider: IFormatProvider?
  • methodSubtract
    public Result<MassWeight> Subtract(MassWeight other)

    Subtracts another `MassWeight` and returns the result in this instance's `Unit`.

    other: MassWeight
  • methodToGrams
    public decimal ToGrams()

    Converts this weight to grams (`g`).

  • methodToKilograms
    public decimal ToKilograms()

    Converts this weight to kilograms (`kg`).

  • methodToOunces
    public decimal ToOunces()

    Converts this weight to ounces (`oz`).

  • methodToPounds
    public decimal ToPounds()

    Converts this weight to pounds (`lb`).

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out MassWeight result)

    Attempts to parse a character span into a `MassWeight`.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out MassWeight
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out MassWeight result)

    Attempts to parse a string into a `MassWeight`.

    s: string?
    provider: IFormatProvider?
    result: out MassWeight
  • methodoperator <
    public static bool operator <(MassWeight left, MassWeight right)

    Determines whether `left` is lighter than `right`.

    left: MassWeight
    right: MassWeight
  • methodoperator <=
    public static bool operator <=(MassWeight left, MassWeight right)

    Determines whether `left` is lighter than or equal to `right`.

    left: MassWeight
    right: MassWeight
  • methodoperator >
    public static bool operator >(MassWeight left, MassWeight right)

    Determines whether `left` is heavier than `right`.

    left: MassWeight
    right: MassWeight
  • methodoperator >=
    public static bool operator >=(MassWeight left, MassWeight right)

    Determines whether `left` is heavier than or equal to `right`.

    left: MassWeight
    right: MassWeight
  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this instance is uninitialized (`default(MassWeight)`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance was initialized through a factory.

  • propertyUnit
    public WeightUnit Unit { get; }

    Gets the measurement unit.

  • propertyValue
    public decimal Value { get; }

    Gets the numeric magnitude in `Unit`.

  • propertyZero
    public static MassWeight Zero { get; }

    Gets a zero-kilogram weight instance.

record

MessageBody

Ensamblado: EricksonLopez.ValueObjects
public sealed record MessageBody : StringValueObject<MessageBody>
Hereda de: StringValueObject<MessageBody>

Represents a rich or multiline message body for emails, CRM communications, and notifications. Rules: Required, 1–20,000 characters. Allows standard multiline whitespace (newlines, tabs) while rejecting non-printable control characters. Used by: CRM, Email Communications, Customer Service, Notifications.

Miembros (1)

  • methodCreate
    public static Result<MessageBody> Create(string? value)

    Creates a new `MessageBody` instance after trimming and validating.

    value: string?
    The raw message body text.

    Retorna: A `Result<MessageBody>` containing the created instance or a validation error.

record

MiddleName

Ensamblado: EricksonLopez.ValueObjects
public sealed record MiddleName : StringValueObject<MiddleName>
Hereda de: StringValueObject<MiddleName>

Represents an individual's middle name.

Miembros (2)

  • methodCreate
    public static Result<MiddleName> Create(string? value)

    Creates a validated `MiddleName` instance after normalizing whitespace and unicode characters.

    value: string?
    The raw middle name string.

    Retorna: A successful `Result<T>` containing the validated middle name, or a validation failure.

  • methodCreateOptional
    public static Result<MiddleName?> CreateOptional(string? value)

    Creates an optional `MiddleName` instance, returning `null` if empty or whitespace.

    value: string?
    The optional raw middle name string.

    Retorna: A successful `Result<T>` containing the optional middle name, or a validation failure if invalid.

record

ModifiedBy

Ensamblado: EricksonLopez.ValueObjects
public sealed record ModifiedBy : StringValueObject<ModifiedBy>
Hereda de: StringValueObject<ModifiedBy>

Represents the identity of the actor who last modified an entity or record. Normalized to uppercase. Rules: Required, 1–120 characters, uppercase alphanumeric or human/system identifier characters. Stored uppercase. Used by: All bounded contexts (Audit trail, Multi-tenant compliance).

Miembros (1)

  • methodCreate
    public static Result<ModifiedBy> Create(string? value)

    Creates a new `ModifiedBy` instance after validating and normalizing the actor identifier.

    value: string?
    The raw actor identifier string.

    Retorna: A `Result<ModifiedBy>` containing the created instance or a validation error.

record

Money

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct Money : IValueObject<Money>, IComparable<Money>, IComparable, IFormattable, ISpanFormattable, IParsable<Money>, ISpanParsable<Money>
Implementa: IComparable, IComparable<Money>, IFormattable, IParsable<Money>, ISpanFormattable, ISpanParsable<Money>, IValueObject<Money>

Represents a monetary amount denominated in a specific ISO 4217 currency.

Notas:

Enforces same-currency arithmetic and canonical rounding at domain boundaries. Caution on Value Type Defaults: As a value type (`readonly record struct`), C# permits uninitialized instances via `default(Money)`. In an uninitialized instance, `Currency` is unassigned, which violates domain invariants. Always create instances via `Create(decimal, CurrencyCode, int?)`, `Zero(CurrencyCode)`, or designated domain factories.

Miembros (55)

  • methodAbs
    public Money Abs()

    Returns the absolute value of this monetary amount.

    Retorna: A new `Money` instance with a non-negative amount.

    Exceptions: DomainException: Currency is uninitialized.

  • methodAdd
    public Result<Money> Add(Money other)

    Adds another monetary amount to this instance, ensuring both amounts share the same currency.

    other: Money
    The monetary amount to add.

    Retorna: A successful `Result<T>` containing the sum, or a currency mismatch error.

  • methodAllocate
    public Money[] Allocate(params ReadOnlySpan<int> ratios)

    Allocates the monetary amount proportionally across the specified integer ratios without fractional currency loss.

    ratios: params ReadOnlySpan<int>
    The positive integer ratios used to divide the amount.

    Retorna: An array of `Money` instances representing each allocated portion, one per ratio. Returns an empty array if `ratios` is empty.

    Implements Martin Fowler's proportional allocation algorithm. Each share is truncated to the currency's standard decimal precision (as defined by `CurrencyCode.DecimalPlaces`), and any indivisible remainder is distributed one minimum unit at a time to the earliest shares. Returns an empty array when `ratios` is empty. The minimum distribution unit respects the currency's decimal precision: 1 for zero-decimal currencies (e.g. JPY), 0.01 for two-decimal currencies (e.g. USD), 0.001 for three-decimal currencies (e.g. KWD). Exceptions: DomainException: Currency is uninitialized.; ArgumentException: `ratios` contains a value less than or equal to zero

  • methodApplyDiscount
    public Money ApplyDiscount(decimal percentage)

    Applies a percentage discount to this monetary amount using commercial rounding (away from zero).

    percentage: decimal
    The discount percentage (e.g. 10 for 10%).

    Retorna: A new `Money` instance representing the discounted amount.

  • methodApplyPercentage
    public Money ApplyPercentage(Percentage percentage)

    Applies a percentage to this monetary amount using banker's rounding.

    percentage: Percentage
    The percentage to apply.

    Retorna: The calculated monetary share.

    Exceptions: DomainException: Currency is uninitialized or amount is outside supported range.

  • methodCalculateTax
    public Money CalculateTax(decimal taxRate)

    Calculates the tax amount based on the specified tax rate using commercial rounding (away from zero).

    taxRate: decimal
    The tax rate percentage (e.g. 18 for 18% ITBIS).

    Retorna: A new `Money` instance representing the tax amount.

  • methodCompareTo
    public int CompareTo(Money other)

    Compares this monetary amount to another amount denominated in the same currency.

    other: Money
    The monetary amount to compare against.

    Retorna: A value indicating the relative order of the amounts being compared.

    Exceptions: DomainException: `other` has a different currency

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `Money`

  • methodCreate
    public static Result<Money> Create(decimal amount, CurrencyCode currency, int? decimals = null)

    Creates a `Money` instance rounded to the specified decimal places using banker's rounding.

    amount: decimal
    The numeric monetary amount.
    currency: CurrencyCode
    The currency code value object.
    decimals: int?
    The optional number of decimal places to round to. If omitted, uses the currency's standard decimal places.

    Retorna: A successful `Result<T>` containing the created monetary value, or a validation failure.

  • methodCreate
    public static Result<Money> Create(decimal amount, string currency, int? decimals = null)

    Creates a `Money` instance using a string currency code.

    amount: decimal
    The numeric monetary amount.
    currency: string
    The ISO 4217 three-letter currency string.
    decimals: int?
    The optional number of decimal places to round to.

    Retorna: A successful `Result<T>` containing the created monetary value, or a validation failure.

  • methodCreateNonNegative
    public static Result<Money> CreateNonNegative(decimal amount, CurrencyCode currency)

    Creates a `Money` instance that requires a non-negative amount (greater than or equal to zero).

    amount: decimal
    The non-negative numeric amount.
    currency: CurrencyCode
    The currency code value object.

    Retorna: A successful `Result<T>` containing the created monetary value, or a validation failure.

  • methodDOP
    public static Money DOP(decimal amount)

    Creates a `Money` instance denominated in Dominican Pesos (DOP).

    amount: decimal
    The numeric monetary amount.

    Retorna: A `Money` instance in DOP.

  • methodDistribute
    public Money[] Distribute(int parts)

    Splits the monetary amount into equal parts, distributing any remainder pennies across initial parts.

    parts: int
    The positive number of parts to divide into.

    Retorna: An array of `Money` instances representing the divided parts.

    Exceptions: DomainException: `parts` is less than or equal to zero

  • methodDivide
    public Result<Money> Divide(decimal divisor)

    Divides the monetary amount by a scalar divisor using monadic error handling.

    divisor: decimal
    The divisor to divide by.

    Retorna: A successful `Result<Money>` containing the quotient, or a validation/division-by-zero error.

  • methodEUR
    public static Money EUR(decimal amount)

    Creates a `Money` instance denominated in Euros (EUR).

    amount: decimal
    The numeric monetary amount.

    Retorna: A `Money` instance in EUR.

  • methodIsGreaterThan
    public bool IsGreaterThan(Money other)

    Determines whether this amount is strictly greater than another amount in the same currency.

    other: Money
    The monetary amount to compare with.

    Retorna: `true` if this amount is greater; otherwise, `false`.

    Exceptions: DomainException: `other` has a different currency

  • methodIsGreaterThanOrEqual
    public bool IsGreaterThanOrEqual(Money other)

    Determines whether this amount is greater than or equal to another amount in the same currency.

    other: Money
    The monetary amount to compare with.

    Retorna: `true` if this amount is greater than or equal; otherwise, `false`.

    Exceptions: DomainException: `other` has a different currency

  • methodIsLessThan
    public bool IsLessThan(Money other)

    Determines whether this amount is strictly less than another amount in the same currency.

    other: Money
    The monetary amount to compare with.

    Retorna: `true` if this amount is less; otherwise, `false`.

    Exceptions: DomainException: `other` has a different currency

  • methodIsLessThanOrEqual
    public bool IsLessThanOrEqual(Money other)

    Determines whether this amount is less than or equal to another amount in the same currency.

    other: Money
    The monetary amount to compare with.

    Retorna: `true` if this amount is less than or equal; otherwise, `false`.

    Exceptions: DomainException: `other` has a different currency

  • methodMultiply
    public Money Multiply(decimal factor)

    Multiplies the monetary amount by a scalar factor using banker's rounding.

    factor: decimal
    The multiplier factor.

    Retorna: The product rounded to the currency's standard decimal places.

    Exceptions: DomainException: Currency is uninitialized or amount is outside supported range.

  • methodNegate
    public Money Negate()

    Returns the negated monetary amount.

    Retorna: A new `Money` instance with the negated amount.

    Exceptions: DomainException: Currency is uninitialized.

  • methodParse
    public static Money Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Money Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodRound
    public Money Round(int? decimals = null)

    Rounds the monetary amount to the specified number of decimal places using banker's rounding (to nearest even).

    decimals: int?
    The optional decimal places to round to. If omitted, uses the currency's standard decimal places.

    Retorna: A new `Money` instance with the rounded amount.

  • methodRoundCommercial
    public Money RoundCommercial(int? decimals = null)

    Rounds the monetary amount to the specified number of decimal places using commercial rounding (away from zero).

    decimals: int?
    The optional decimal places to round to. If omitted, uses the currency's standard decimal places.

    Retorna: A new `Money` instance with the rounded amount.

  • methodRoundDop
    public Money RoundDop()

    Rounds Dominican Peso (DOP) amounts to 2 decimal places using `MidpointRounding.AwayFromZero` per Dominican fiscal regulations (DGII), returning non-DOP amounts unchanged.

    Retorna: A new `Money` instance rounded to 2 decimal places when denominated in DOP; otherwise, this instance.

  • methodSubtract
    public Result<Money> Subtract(Money other)

    Subtracts another monetary amount from this instance, ensuring both amounts share the same currency.

    other: Money
    The monetary amount to subtract.

    Retorna: A successful `Result<T>` containing the difference, or a currency mismatch error.

  • methodToFormattedString
    public string ToFormattedString()

    Formats the monetary amount using cultural currency symbols (RD$ for DOP, US$ for USD, € for EUR).

    Retorna: A formatted currency string.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodToString
    public string ToString(string? format, IFormatProvider? formatProvider)

    Inherits documentation from `IFormattable.ToString(string?, IFormatProvider?)`.

    format: string?
    formatProvider: IFormatProvider?
  • methodTryApplyPercentage
    public Result<Money> TryApplyPercentage(Percentage percentage)

    Attempts to apply a percentage to this monetary amount using banker's rounding without throwing exceptions.

    percentage: Percentage
    The percentage to apply.

    Retorna: A successful `Result<T>` containing the calculated share, or a validation error.

  • methodTryFormat
    public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)

    Inherits documentation from base type or interface.

    destination: Span<char>
    charsWritten: out int
    format: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodTryMultiply
    public Result<Money> TryMultiply(decimal factor)

    Attempts to multiply the monetary amount by a scalar factor using banker's rounding without throwing exceptions.

    factor: decimal
    The multiplier factor.

    Retorna: A successful `Result<T>` containing the product, or a validation error if out of range or uninitialized.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Money result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Money
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Money result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Money
  • methodUSD
    public static Money USD(decimal amount)

    Creates a `Money` instance denominated in US Dollars (USD).

    amount: decimal
    The numeric monetary amount.

    Retorna: A `Money` instance in USD.

  • methodWithTax
    public Money WithTax(decimal taxRate)

    Returns a new monetary amount with the calculated tax added using commercial rounding.

    taxRate: decimal
    The tax rate percentage (e.g. 18 for 18% ITBIS).

    Retorna: A new `Money` instance representing the total amount including tax.

  • methodZero
    public static Money Zero(CurrencyCode currency)

    Creates a zero-value `Money` instance in the specified currency.

    currency: CurrencyCode
    The target currency code.

    Retorna: A zero-value monetary amount in the specified currency.

  • methodoperator *
    public static Money operator *(Money a, decimal b)

    Multiplies a monetary amount by a decimal scalar factor.

    a: Money
    The monetary amount.
    b: decimal
    The scalar multiplier.

    Retorna: The product rounded to the currency's standard decimal places.

  • methodoperator *
    public static Money operator *(decimal a, Money b)

    Multiplies a decimal scalar factor by a monetary amount.

    a: decimal
    The scalar multiplier.
    b: Money
    The monetary amount.

    Retorna: The product rounded to the currency's standard decimal places.

  • methodoperator +
    public static Money operator +(Money a, Money b)

    Adds two monetary amounts having the same currency.

    a: Money
    The first monetary amount.
    b: Money
    The second monetary amount.

    Retorna: The resulting sum.

    Use `Add(Money)` for defensive workflows returning `Result<T>`. The `+` operator is designed for ergonomic expressions where invariants are assumed to hold; a currency mismatch is treated as an unrecoverable domain error throwing `DomainException`. Exceptions: DomainException: The currencies of `a` and `b` do not match

  • methodoperator -
    public static Money operator -(Money a)

    Negates the specified monetary amount.

    a: Money
    The monetary amount to negate.

    Retorna: The negated monetary amount.

  • methodoperator -
    public static Money operator -(Money a, Money b)

    Subtracts the second monetary amount from the first when both have the same currency.

    a: Money
    The first monetary amount.
    b: Money
    The second monetary amount to subtract.

    Retorna: The resulting difference.

    Use `Subtract(Money)` for defensive workflows returning `Result<T>`. The `-` operator is designed for ergonomic expressions where invariants are assumed to hold; a currency mismatch is treated as an unrecoverable domain error throwing `DomainException`. Exceptions: DomainException: The currencies of `a` and `b` do not match

  • methodoperator <
    public static bool operator <(Money a, Money b)

    Determines whether the left monetary amount is less than the right monetary amount.

    a: Money
    The first monetary amount to compare.
    b: Money
    The second monetary amount to compare.

    Retorna: `true` if `a` is less than `b`; otherwise, `false`.

    Exceptions: DomainException: The currencies of `a` and `b` do not match

  • methodoperator <=
    public static bool operator <=(Money a, Money b)

    Determines whether the left monetary amount is less than or equal to the right monetary amount.

    a: Money
    The first monetary amount to compare.
    b: Money
    The second monetary amount to compare.

    Retorna: `true` if `a` is less than or equal to `b`; otherwise, `false`.

    Exceptions: DomainException: The currencies of `a` and `b` do not match

  • methodoperator >
    public static bool operator >(Money a, Money b)

    Determines whether the left monetary amount is greater than the right monetary amount.

    a: Money
    The first monetary amount to compare.
    b: Money
    The second monetary amount to compare.

    Retorna: `true` if `a` is greater than `b`; otherwise, `false`.

    Exceptions: DomainException: The currencies of `a` and `b` do not match

  • methodoperator >=
    public static bool operator >=(Money a, Money b)

    Determines whether the left monetary amount is greater than or equal to the right monetary amount.

    a: Money
    The first monetary amount to compare.
    b: Money
    The second monetary amount to compare.

    Retorna: `true` if `a` is greater than or equal to `b`; otherwise, `false`.

    Exceptions: DomainException: The currencies of `a` and `b` do not match

  • propertyAmount
    public decimal Amount { get; }

    Gets the numerical monetary amount.

  • propertyCurrency
    public CurrencyCode Currency { get; }

    Gets the ISO 4217 currency code.

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this `Money` instance is uninitialized (`default(Money)`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Money` instance was initialized through a factory or constructor rather than `default(Money)`.

  • propertyIsNegative
    public bool IsNegative { get; }

    Gets a value indicating whether the monetary amount is strictly negative.

  • propertyIsPositive
    public bool IsPositive { get; }

    Gets a value indicating whether the monetary amount is strictly positive.

  • propertyIsZero
    public bool IsZero { get; }

    Gets a value indicating whether the monetary amount is zero.

  • fieldZeroUsd
    public static readonly Money ZeroUsd

    Gets a zero-value `Money` instance denominated in US Dollars (USD).

record

Name

Ensamblado: EricksonLopez.ValueObjects
public sealed record Name : StringValueObject<Name>
Hereda de: StringValueObject<Name>

Represents a generic business or entity name identifier.

Miembros (1)

  • methodCreate
    public static Result<Name> Create(string? value)

    Creates a validated `Name` instance after normalizing business whitespace.

    value: string?
    The raw name string.

    Retorna: A successful `Result<T>` containing the validated name, or a validation failure.

record

NationalId

Ensamblado: EricksonLopez.ValueObjects
public sealed record NationalId : StringValueObject<NationalId>
Hereda de: StringValueObject<NationalId>

Represents a generic national identity document number for any country. Case is normalized to uppercase; format varies by country. For Dominican Cedula (11 digits) or RNC (9 digits), use `Rnc` from `EricksonLopez.ValueObjects.Fiscal.DominicanRepublic`. Rules: Required, 1–30 chars, alphanumeric with hyphens, uppercase. Used by: ERP, Payroll, CRM, HR, Property Management, KYC PII Protection: `ToString()` returns the mask string configured in `SensitiveDataAttribute` to prevent leakage in logs and traces. Access the raw value explicitly via the `Value` property.

Miembros (1)

  • methodCreate
    public static Result<NationalId> Create(string? value)

    Creates a new `NationalId` instance after validating and normalizing to uppercase.

    value: string?
    The raw national identity document number.

    Retorna: A `Result<NationalId>` containing the created instance or a validation error.

record

Note

Ensamblado: EricksonLopez.ValueObjects
public sealed record Note : StringValueObject<Note>
Hereda de: StringValueObject<Note>

Represents an internal administrative note, audit comment, or operational remark. Rules: Required, 1–5,000 characters. Allows standard multiline whitespace (newlines, tabs) while rejecting non-printable control characters. Used by: ERP, Audit, Customer Support, Project Tasks, Collections.

Miembros (1)

  • methodCreate
    public static Result<Note> Create(string? value)

    Creates a new `Note` instance after trimming and validating.

    value: string?
    The raw note text.

    Retorna: A `Result` containing the created instance or a validation error.

record

OrderNumber

Ensamblado: EricksonLopez.ValueObjects
public sealed record OrderNumber : StringValueObject<OrderNumber>
Hereda de: StringValueObject<OrderNumber>

Represents a commercial order identifier (sales order, purchase order, service order). Normalized to uppercase. Rules: Required, 1–60 characters, uppercase alphanumeric with separators (`. _ / -`). Used by: ERP, POS, E-commerce, Procurement, Electronic Invoicing.

Miembros (1)

  • methodCreate
    public static Result<OrderNumber> Create(string? value)

    Creates a new `OrderNumber` instance after validating and normalizing to uppercase.

    value: string?
    The raw order number string.

    Retorna: A `Result<OrderNumber>` containing the created instance or a validation error.

record

PassportNumber

Ensamblado: EricksonLopez.ValueObjects
public sealed partial record PassportNumber : StringValueObject<PassportNumber>
Hereda de: StringValueObject<PassportNumber>

Represents an international passport identifier. Normalized to uppercase. Rules: Required, 5–20 uppercase alphanumeric characters. Used by: Human Resources, KYC, Travel, CRM, Immigration, Global Identity.

Miembros (1)

  • methodCreate
    public static Result<PassportNumber> Create(string? value)

    Creates a new `PassportNumber` instance after validating and normalizing to uppercase.

    value: string?
    The raw passport number string.

    Retorna: A `Result<PassportNumber>` containing the created instance or a validation error.

record

PasswordHash

Ensamblado: EricksonLopez.ValueObjects
public sealed record PasswordHash : StringValueObject<PasswordHash>
Hereda de: StringValueObject<PasswordHash>

Represents a cryptographically hashed password (argon2, bcrypt, scrypt, pbkdf2, etc.). Guarantees that raw plaintext passwords are never stored or logged in domain aggregates. Masked by default via `SensitiveDataAttribute` and `object.ToString()`.

Miembros (1)

  • methodCreate
    public static Result<PasswordHash> Create(string? value)

    Creates a new `PasswordHash` instance after validating format and length.

    value: string?
    The raw password hash string.

    Retorna: A `Result<PasswordHash>` containing the created instance or a validation error.

record

Percentage

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct Percentage : IValueObject<Percentage>, IComparable<Percentage>, IComparable, IParsable<Percentage>, ISpanParsable<Percentage>, IFormattable, ISpanFormattable
Implementa: IComparable, IComparable<Percentage>, IFormattable, IParsable<Percentage>, ISpanFormattable, ISpanParsable<Percentage>, IValueObject<Percentage>

Represents a bounded percentage value between 0 and 100 inclusive.

Notas:

Caution on Value Type Defaults: As a value type (`readonly record struct`), C# permits uninitialized instances via `default(Percentage)`. While its value is 0%, always favor explicit creation via `Create(decimal)`, `FromFraction(decimal)`, or `Zero` to express intent.

Miembros (25)

  • methodApplyTo
    public decimal ApplyTo(decimal baseAmount)

    Calculates the percentage share of a specified base amount.

    baseAmount: decimal
    The base amount to apply the percentage to.

    Retorna: The calculated portion rounded to 6 decimal places.

  • methodCompareTo
    public int CompareTo(Percentage other)

    Compares this percentage with another percentage.

    other: Percentage
    The other percentage to compare against.

    Retorna: A value indicating the relative order of the percentages being compared.

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `Percentage`

  • methodCreate
    public static Result<Percentage> Create(decimal value)

    Creates a validated `Percentage` instance from a numeric value in the range [0, 100].

    value: decimal
    The percentage amount between 0 and 100.

    Retorna: A successful `Result<T>` containing the validated percentage, or a validation failure.

  • methodFromFraction
    public static Result<Percentage> FromFraction(decimal fraction)

    Creates a validated `Percentage` instance from a fractional value in the range [0.0, 1.0].

    fraction: decimal
    The fraction multiplier between 0.0 and 1.0.

    Retorna: A successful `Result<T>` containing the validated percentage, or a validation failure.

  • methodParse
    public static Percentage Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a span of characters into a `Percentage`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `Percentage`.

    Exceptions: FormatException: `s` is not in a valid percentage format

  • methodParse
    public static Percentage Parse(string s, IFormatProvider? provider = null)

    Parses a string into a `Percentage`.

    s: string
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `Percentage`.

    Exceptions: FormatException: `s` is not in a valid percentage format

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodToString
    public string ToString(string? format, IFormatProvider? formatProvider)

    Inherits documentation from `IFormattable.ToString(string?, IFormatProvider?)`.

    format: string?
    formatProvider: IFormatProvider?
  • methodTryFormat
    public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)

    Inherits documentation from base type or interface.

    destination: Span<char>
    charsWritten: out int
    format: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Percentage result)

    Attempts to parse a span of characters into a `Percentage`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out Percentage
    When this method returns, contains the parsed percentage if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Percentage result)

    Attempts to parse a string into a `Percentage`.

    s: string?
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out Percentage
    When this method returns, contains the parsed percentage if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodValidatePercentage
    public static global::EricksonLopez.Result.Result ValidatePercentage(decimal value, string fieldName)

    Validates that a decimal percentage value falls between 0 and 100 with at most 6 decimal places.

    value: decimal
    The numeric percentage value to validate.
    fieldName: string
    The name of the field used for error reporting.

    Retorna: A successful `Result.Result` if valid; otherwise, a validation failure.

  • methodoperator <
    public static bool operator <(Percentage left, Percentage right)

    Determines whether the left percentage is less than the right percentage.

    left: Percentage
    The first percentage to compare.
    right: Percentage
    The second percentage to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Percentage left, Percentage right)

    Determines whether the left percentage is less than or equal to the right percentage.

    left: Percentage
    The first percentage to compare.
    right: Percentage
    The second percentage to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Percentage left, Percentage right)

    Determines whether the left percentage is greater than the right percentage.

    left: Percentage
    The first percentage to compare.
    right: Percentage
    The second percentage to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Percentage left, Percentage right)

    Determines whether the left percentage is greater than or equal to the right percentage.

    left: Percentage
    The first percentage to compare.
    right: Percentage
    The second percentage to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyAsFraction
    public decimal AsFraction { get; }

    Gets the fractional representation of the percentage.

    This property is an alias of `Fraction` provided for fluent readability.

  • propertyFraction
    public decimal Fraction { get; }

    Gets the fractional representation of the percentage (value divided by 100).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Percentage` instance was initialized through a factory rather than `default(Percentage)`.

  • propertyIsZero
    public bool IsZero { get; }

    Gets a value indicating whether the percentage is zero.

  • propertyValue
    public decimal Value { get; }

    Gets the numerical percentage value between 0 and 100.

  • fieldFull
    public static readonly Percentage Full

    Gets a percentage instance representing 100%.

  • fieldHundred
    public static readonly Percentage Hundred

    Gets a percentage instance representing 100%.

  • fieldZero
    public static readonly Percentage Zero

    Gets a percentage instance representing 0%.

record

PhoneNumber

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct PhoneNumber : IValueObject<PhoneNumber>, IComparable<PhoneNumber>, IComparable, IParsable<PhoneNumber>, ISpanParsable<PhoneNumber>
Implementa: IComparable, IComparable<PhoneNumber>, IParsable<PhoneNumber>, ISpanParsable<PhoneNumber>, IValueObject<PhoneNumber>

Represents a telephone number formatted according to the E.164 international standard.

Miembros (17)

  • methodCompareTo
    public int CompareTo(PhoneNumber other)

    Compares this phone number with another phone number using ordinal string comparison.

    other: PhoneNumber
    The other phone number to compare against.

    Retorna: A value indicating the relative order of the phone numbers being compared.

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `PhoneNumber`

  • methodCreate
    public static Result<PhoneNumber> Create(ReadOnlySpan<char> value)

    Creates a validated `PhoneNumber` instance from an input telephone character span.

    value: ReadOnlySpan<char>
    The raw telephone character span.

    Retorna: A successful `Result<T>` containing the validated phone number, or a validation failure.

  • methodCreate
    public static Result<PhoneNumber> Create(string? value)

    Creates a validated `PhoneNumber` instance from an input telephone string.

    value: string?
    The raw telephone string.

    Retorna: A successful `Result<T>` containing the validated phone number, or a validation failure.

  • methodParse
    public static PhoneNumber Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a span of characters into a `PhoneNumber`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `PhoneNumber`.

    Exceptions: FormatException: `s` is not in a valid phone number format

  • methodParse
    public static PhoneNumber Parse(string s, IFormatProvider? provider = null)

    Parses a string into a `PhoneNumber`.

    s: string
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `PhoneNumber`.

    Exceptions: FormatException: `s` is not in a valid phone number format

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out PhoneNumber result)

    Attempts to parse a span of characters into a `PhoneNumber`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out PhoneNumber
    When this method returns, contains the parsed phone number if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out PhoneNumber result)

    Attempts to parse a string into a `PhoneNumber`.

    s: string?
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out PhoneNumber
    When this method returns, contains the parsed phone number if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodoperator <
    public static bool operator <(PhoneNumber left, PhoneNumber right)

    Determines whether the left phone number is less than the right phone number.

    left: PhoneNumber
    The first phone number to compare.
    right: PhoneNumber
    The second phone number to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(PhoneNumber left, PhoneNumber right)

    Determines whether the left phone number is less than or equal to the right phone number.

    left: PhoneNumber
    The first phone number to compare.
    right: PhoneNumber
    The second phone number to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(PhoneNumber left, PhoneNumber right)

    Determines whether the left phone number is greater than the right phone number.

    left: PhoneNumber
    The first phone number to compare.
    right: PhoneNumber
    The second phone number to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(PhoneNumber left, PhoneNumber right)

    Determines whether the left phone number is greater than or equal to the right phone number.

    left: PhoneNumber
    The first phone number to compare.
    right: PhoneNumber
    The second phone number to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyDigitsOnly
    public string DigitsOnly { get; }

    Gets the numerical telephone digits excluding the leading `+` prefix.

  • propertyFormatted
    public string Formatted { get; }

    Gets a human-readable formatted representation of the phone number when applicable.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `PhoneNumber` instance was initialized through a factory rather than `default(PhoneNumber)`.

  • propertyValue
    public string Value { get; }

    Gets the international telephone number string including the leading `+` prefix.

record

PhysicalDimensions

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct PhysicalDimensions : IValueObject<PhysicalDimensions>, IEquatable<PhysicalDimensions>
Implementa: IEquatable<PhysicalDimensions>, IValueObject<PhysicalDimensions>

Represents multi-unit physical package/product dimensions (`Length × Width × Height`) with optional `MassWeight`, cubic volume conversions, and IATA courier volumetric/chargeable weight calculation.

Miembros (15)

  • methodCalculateChargeableWeight
    public Result<MassWeight> CalculateChargeableWeight(decimal dimensionalDivisor = 5000m)

    Calculates the freight chargeable weight (the greater of `GrossWeight` and volumetric weight) in kilograms.

    dimensionalDivisor: decimal
    Courier dimensional divisor in `cm³/kg` (defaults to `5000`).

    Retorna: A `Result<MassWeight>` containing the chargeable weight in kilograms.

  • methodCalculateVolumetricWeight
    public Result<MassWeight> CalculateVolumetricWeight(decimal dimensionalDivisor = 5000m)

    Calculates IATA / courier volumetric weight (`VolumeCm3 / dimensionalDivisor`) as a `MassWeight` in kilograms.

    dimensionalDivisor: decimal
    Courier dimensional divisor in `cm³/kg` (defaults to `5000`).

    Retorna: A `Result<MassWeight>` containing the volumetric weight in kilograms.

  • methodConvertTo
    public PhysicalDimensions ConvertTo(DimensionUnit targetUnit)

    Converts linear dimensions to `targetUnit` while preserving `GrossWeight`.

    targetUnit: DimensionUnit
  • methodCreate
    public static Result<PhysicalDimensions> Create(decimal length, decimal width, decimal height, DimensionUnit unit = DimensionUnit.Centimeter, MassWeight? grossWeight = null)

    Creates a validated `PhysicalDimensions` instance.

    length: decimal
    Non-negative length.
    width: decimal
    Non-negative width.
    height: decimal
    Non-negative height.
    unit: DimensionUnit
    Linear dimension unit (defaults to `DimensionUnit.Centimeter`).
    grossWeight: MassWeight?
    Optional validated `MassWeight`.

    Retorna: A `Result<PhysicalDimensions>` containing the validated dimensions or a validation error.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • propertyGrossWeight
    public MassWeight? GrossWeight { get; }

    Gets the optional gross physical weight.

  • propertyHeight
    public decimal Height { get; }

    Gets the height in `Unit`.

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this struct is uninitialized (`default(PhysicalDimensions)`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this struct was initialized through `Create`.

  • propertyLength
    public decimal Length { get; }

    Gets the length in `Unit`.

  • propertyUnit
    public DimensionUnit Unit { get; }

    Gets the linear measurement unit.

  • propertyVolume
    public decimal Volume { get; }

    Gets the cubic volume in `Unit³`.

  • propertyVolumeCm3
    public decimal VolumeCm3 { get; }

    Gets the cubic volume normalized to cubic centimeters (`cm³`).

  • propertyVolumeM3
    public decimal VolumeM3 { get; }

    Gets the cubic volume normalized to cubic meters (`m³`).

  • propertyWidth
    public decimal Width { get; }

    Gets the width in `Unit`.

record

PositionTitle

Ensamblado: EricksonLopez.ValueObjects
public sealed record PositionTitle : StringValueObject<PositionTitle>
Hereda de: StringValueObject<PositionTitle>

Represents a job title, job role, or organizational position. Normalized by collapsing excessive whitespace. Rules: Required, 2–120 characters, human and business title characters. Used by: Human Resources, Payroll, Organization Chart, ERP, CRM.

Miembros (1)

  • methodCreate
    public static Result<PositionTitle> Create(string? value)

    Creates a new `PositionTitle` instance after validating and collapsing whitespace.

    value: string?
    The raw position or job title string.

    Retorna: A `Result<PositionTitle>` containing the created instance or a validation error.

record

PostalCode

Ensamblado: EricksonLopez.ValueObjects
public sealed partial record PostalCode : StringValueObject<PostalCode>
Hereda de: StringValueObject<PostalCode>

Represents an international postal or ZIP code.

Miembros (1)

  • methodCreate
    public static Result<PostalCode> Create(string? value)

    Creates a validated `PostalCode` instance after normalizing to uppercase.

    value: string?
    The raw postal code string.

    Retorna: A successful `Result<T>` containing the validated postal code, or a validation failure.

record

ProductDimensions

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct ProductDimensions : IValueObject<ProductDimensions>, IEquatable<ProductDimensions>
Implementa: IEquatable<ProductDimensions>, IValueObject<ProductDimensions>

Represents physical product dimensions (length, width, height in centimeters and gross weight in kilograms) for warehouse bin capacity checks, courier shipping quotes, and volumetric landed-cost proration.

Miembros (12)

  • methodCalculateVolumetricWeightKg
    public Result<decimal> CalculateVolumetricWeightKg(decimal dimensionalDivisor = 5000m)

    Calculates IATA / courier volumetric weight in kilograms (`VolumeCm3 / dimensionalDivisor`).

    dimensionalDivisor: decimal
    The courier dimensional divisor (defaults to `5000` cm³/kg).

    Retorna: A `Result<Decimal>` containing the volumetric weight in kilograms.

  • methodCreate
    public static Result<ProductDimensions> Create(decimal lengthCm, decimal widthCm, decimal heightCm, decimal grossWeightKg)

    Creates a validated `ProductDimensions` instance ensuring non-negative physical measurements.

    lengthCm: decimal
    Length in centimeters (>= 0).
    widthCm: decimal
    Width in centimeters (>= 0).
    heightCm: decimal
    Height in centimeters (>= 0).
    grossWeightKg: decimal
    Gross weight in kilograms (>= 0).

    Retorna: A `Result<ProductDimensions>` containing the validated struct or an error.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • propertyGrossWeightKg
    public decimal GrossWeightKg { get; }

    Gets the gross weight in kilograms.

  • propertyGrossWeightLbs
    public decimal GrossWeightLbs { get; }

    Gets the gross weight converted to pounds (`lb`).

  • propertyHeightCm
    public decimal HeightCm { get; }

    Gets the height in centimeters.

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this struct is uninitialized (`default(ProductDimensions)`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this struct was initialized through `Create`.

  • propertyLengthCm
    public decimal LengthCm { get; }

    Gets the length in centimeters.

  • propertyVolumeCm3
    public decimal VolumeCm3 { get; }

    Gets the computed cubic volume in cubic centimeters (`cm³`).

  • propertyVolumeM3
    public decimal VolumeM3 { get; }

    Gets the computed cubic volume in cubic meters (`m³`).

  • propertyWidthCm
    public decimal WidthCm { get; }

    Gets the width in centimeters.

record

Quantity

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct Quantity : IValueObject<Quantity>, IComparable<Quantity>, IComparable, IParsable<Quantity>, ISpanParsable<Quantity>, IFormattable, ISpanFormattable
Implementa: IComparable, IComparable<Quantity>, IFormattable, IParsable<Quantity>, ISpanFormattable, ISpanParsable<Quantity>, IValueObject<Quantity>

Represents a discrete, non-negative integer quantity.

Notas:

Caution on Value Type Defaults: As a value type (`readonly record struct`), C# permits uninitialized instances via `default(Quantity)`. In an uninitialized instance, `Value` defaults to 0. While 0 is technically non-negative, always favor explicit creation via `Create(int)` or `Zero` for clear domain intent.

Miembros (20)

  • methodAdd
    public Result<Quantity> Add(Quantity other)

    Adds another quantity to this instance.

    other: Quantity
    The quantity to add.

    Retorna: A successful `Result<T>` containing the resulting sum.

  • methodCompareTo
    public int CompareTo(Quantity other)

    Compares this quantity with another quantity.

    other: Quantity
    The other quantity to compare against.

    Retorna: A value indicating the relative order of the quantities being compared.

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `Quantity`

  • methodCreate
    public static Result<Quantity> Create(int value)

    Creates a validated `Quantity` instance from a non-negative integer value.

    value: int
    The discrete quantity value (greater than or equal to zero).

    Retorna: A successful `Result<T>` containing the validated quantity, or a validation failure.

  • methodParse
    public static Quantity Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a span of characters into a `Quantity`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `Quantity`.

    Exceptions: FormatException: `s` is not in a valid quantity format

  • methodParse
    public static Quantity Parse(string s, IFormatProvider? provider = null)

    Parses a string into a `Quantity`.

    s: string
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `Quantity`.

    Exceptions: FormatException: `s` is not in a valid quantity format

  • methodSubtract
    public Result<Quantity> Subtract(Quantity other)

    Subtracts another quantity from this instance.

    other: Quantity
    The quantity to subtract.

    Retorna: A successful `Result<T>` containing the resulting quantity, or a failure if insufficient quantity.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodToString
    public string ToString(string? format, IFormatProvider? formatProvider)

    Inherits documentation from `IFormattable.ToString(string?, IFormatProvider?)`.

    format: string?
    formatProvider: IFormatProvider?
  • methodTryFormat
    public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)

    Inherits documentation from base type or interface.

    destination: Span<char>
    charsWritten: out int
    format: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Quantity result)

    Attempts to parse a span of characters into a `Quantity`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out Quantity
    When this method returns, contains the parsed quantity if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Quantity result)

    Attempts to parse a string into a `Quantity`.

    s: string?
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out Quantity
    When this method returns, contains the parsed quantity if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodoperator <
    public static bool operator <(Quantity left, Quantity right)

    Determines whether the left quantity is less than the right quantity.

    left: Quantity
    The first quantity to compare.
    right: Quantity
    The second quantity to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Quantity left, Quantity right)

    Determines whether the left quantity is less than or equal to the right quantity.

    left: Quantity
    The first quantity to compare.
    right: Quantity
    The second quantity to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Quantity left, Quantity right)

    Determines whether the left quantity is greater than the right quantity.

    left: Quantity
    The first quantity to compare.
    right: Quantity
    The second quantity to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Quantity left, Quantity right)

    Determines whether the left quantity is greater than or equal to the right quantity.

    left: Quantity
    The first quantity to compare.
    right: Quantity
    The second quantity to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Quantity` instance was initialized through a factory rather than `default(Quantity)`.

  • propertyIsZero
    public bool IsZero { get; }

    Gets a value indicating whether the quantity is zero.

  • propertyValue
    public int Value { get; }

    Gets the integer quantity value.

  • propertyZero
    public static Quantity Zero { get; }

    Gets a zero quantity instance.

class

RangeExtensions

Ensamblado: EricksonLopez.ValueObjects
public static class RangeExtensions

Provides extension methods for `Range<T>` instances.

Miembros (2)

  • methodDays
    public static int Days(this Range<DateOnly> range)

    Calculates the total number of days spanned by the date range.

    range: this Range<DateOnly>
    The date range to evaluate.

    Retorna: The total number of days elapsed between start and end dates.

  • methodDuration
    public static TimeSpan Duration(this Range<DateTimeOffset> range)

    Calculates the total duration spanned by the date and time range.

    range: this Range<DateTimeOffset>
    The date and time range to calculate duration for.

    Retorna: The `TimeSpan` duration between start and end timestamps.

record

Range<T>

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct Range<T> : IValueObject, IComparable<Range<T>>, IComparable where T : struct, IComparable<T>, IEquatable<T>
Implementa: IComparable, IComparable<Range<T>>, IValueObject

Represents an immutable interval value object defined by inclusive start and end boundaries.

Notas:

Guarantees the invariant that `Start` is less than or equal to `End`. Type parameters: T: The scalar type defining the interval boundaries.

Miembros (18)

  • methodCompareTo
    public int CompareTo(Range<T> other)

    Compares this range with another range based on start boundary, followed by end boundary.

    other: Range<T>
    The other range to compare against.

    Retorna: A value indicating the relative order of the ranges being compared.

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `Range<T>`

  • methodContains
    public bool Contains(Range<T> other)

    Determines whether another range is entirely contained within this range.

    other: Range<T>
    The other range to evaluate.

    Retorna: `true` if `other` is completely contained within this range; otherwise, `false`.

  • methodContains
    public bool Contains(T value)

    Determines whether the specified value is contained within the range.

    value: T
    The value to test for containment.

    Retorna: `true` if the value falls within the inclusive range boundaries; otherwise, `false`.

  • methodContainsHalfOpen
    public bool ContainsHalfOpen(T value)

    Determines whether the specified value is strictly contained within the range, excluding the upper boundary [Start, End).

    value: T
    The value to test for containment.

    Retorna: `true` if `value` falls within the half-open interval [Start, End); otherwise, `false`.

  • methodCreate
    public static Result<Range<T>> Create(T start, T end)

    Creates a validated `Range<T>` instance with the specified inclusive bounds.

    start: T
    The lower boundary of the range.
    end: T
    The upper boundary of the range.

    Retorna: A successful `Result<T>` containing the created range, or a validation error if `start` is greater than `end`.

  • methodIntersects
    public bool Intersects(Range<T> other, out Range<T> intersection)

    Calculates the intersection between this range and another range, if one exists.

    other: Range<T>
    The other range to intersect with.
    intersection: out Range<T>
    When this method returns, contains the overlapping range if an intersection exists; otherwise, the default value.

    Retorna: `true` if an intersection exists; otherwise, `false`.

  • methodOverlaps
    public bool Overlaps(Range<T> other)

    Determines whether this range overlaps with another range.

    other: Range<T>
    The other range to check for overlap.

    Retorna: `true` if the ranges share at least one common value; otherwise, `false`.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodoperator <
    public static bool operator <(Range<T> left, Range<T> right)

    Determines whether the left range is less than the right range.

    left: Range<T>
    The first range to compare.
    right: Range<T>
    The second range to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Range<T> left, Range<T> right)

    Determines whether the left range is less than or equal to the right range.

    left: Range<T>
    The first range to compare.
    right: Range<T>
    The second range to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Range<T> left, Range<T> right)

    Determines whether the left range is greater than the right range.

    left: Range<T>
    The first range to compare.
    right: Range<T>
    The second range to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Range<T> left, Range<T> right)

    Determines whether the left range is greater than or equal to the right range.

    left: Range<T>
    The first range to compare.
    right: Range<T>
    The second range to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyEnd
    public T End { get; }

    Gets the upper inclusive boundary of the range.

  • propertyIsDegenerate
    public bool IsDegenerate { get; }

    Gets a value indicating whether this range is degenerate (i.e. `Start` equals `End`). In an inclusive closed interval, a degenerate range contains exactly one point.

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this range has zero measure / is degenerate (`Start` equals `End`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Range<T>` instance was initialized through a factory rather than `default(Range{T})`.

  • propertyStart
    public T Start { get; }

    Gets the lower inclusive boundary of the range.

record

ReceiptNumber

Ensamblado: EricksonLopez.ValueObjects
public sealed record ReceiptNumber : StringValueObject<ReceiptNumber>
Hereda de: StringValueObject<ReceiptNumber>

Represents a payment or POS transaction receipt identifier. Normalized to uppercase. Rules: Required, 1–60 characters, uppercase alphanumeric with separators (`. _ / -`). Used by: POS, Treasury, Cash Register, ERP, Billing.

Miembros (1)

  • methodCreate
    public static Result<ReceiptNumber> Create(string? value)

    Creates a new `ReceiptNumber` instance after validating and normalizing to uppercase.

    value: string?
    The raw receipt identifier string.

    Retorna: A `Result<ReceiptNumber>` containing the created instance or a validation error.

record

ReferenceNumber

Ensamblado: EricksonLopez.ValueObjects
public sealed record ReferenceNumber : StringValueObject<ReferenceNumber>
Hereda de: StringValueObject<ReferenceNumber>

Represents an internal reference number used to correlate related documents or operations within the organization. Unlike `DocumentNumber` which is a document's own identity, a ReferenceNumber points to another entity or process. Normalized to uppercase. Rules: Required, 1–80 chars, uppercase alphanumeric with `. _ / -` separators. Used by: ERP, POS, E-Invoicing, Inventory, Manufacturing, CRM, Financial Examples: - A payment's `ReferenceNumber` = the invoice `DocumentNumber` it pays. - A bank transfer reference (e.g., `REF-987654`). - A check number (e.g., `CHK-001234`). - An ACH authorization code used to correlate a batch of payments. Key distinction: `DocumentNumber` = "I am document X." `ReferenceNumber` = "I reference document/operation X." `ExternalReference` = "A third party calls me X.".

Miembros (1)

  • methodCreate
    public static Result<ReferenceNumber> Create(string? value)

    Creates a new `ReferenceNumber` instance after validating and normalizing the reference number.

    value: string?
    The raw reference number string.

    Retorna: A `Result<ReferenceNumber>` containing the created instance or a validation error.

class

RegulatoryRuleAttribute

Ensamblado: EricksonLopez.ValueObjects
public class RegulatoryRuleAttribute : Attribute
Hereda de: Attribute

Specifies the regulatory rule identifier that governs the invariants and algorithms of a value object.

Notas:

Evaluated by compliance verification gates to ensure domain rules trace back to official legal statutes or technical resolutions.

Miembros (2)

  • constructorRegulatoryRuleAttribute
    public RegulatoryRuleAttribute(string ruleId)

    Initializes a new instance of the `RegulatoryRuleAttribute` class with the specified rule identifier.

    ruleId: string
    The formal identifier of the regulatory rule.

    Exceptions: ArgumentException: `ruleId` is `null` or whitespace

  • propertyRuleId
    public string RuleId { get; }

    Gets the formal identifier of the regulatory rule.

record

RetailScaleBarcodeData

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct RetailScaleBarcodeData

Represents the zero-allocation parsed fields of a 13-digit GS1 prefix 20–29 variable-weight or variable-price retail scale barcode.

Miembros (8)

  • propertyCheckDigit
    public int CheckDigit { get; }

    Gets the verified Modulo-10 check digit (position 13).

  • propertyEmbeddedPrice
    public decimal? EmbeddedPrice { get; }

    Gets the decoded monetary price when `IsPriceEncoded` is `true`; otherwise `null`.

  • propertyEmbeddedWeight
    public decimal? EmbeddedWeight { get; }

    Gets the decoded weight (in kg or lb depending on mode) when `IsPriceEncoded` is `false`; otherwise `null`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this struct was initialized by `RetailScaleBarcodeParser`.

  • propertyIsPriceEncoded
    public bool IsPriceEncoded { get; }

    Gets a value indicating whether the embedded payload represents a monetary price rather than a physical weight.

  • propertyItemPlu
    public string ItemPlu { get; }

    Gets the 5-digit item PLU / internal article code (positions 3–7).

  • propertyPrefix
    public int Prefix { get; }

    Gets the 2-digit in-store restricted circulation prefix (`20`–`29`).

  • propertyRawMeasureValue
    public int RawMeasureValue { get; }

    Gets the raw integer value encoded in positions 8–12 (0–99999).

class

RetailScaleBarcodeParser

Ensamblado: EricksonLopez.ValueObjects
public static class RetailScaleBarcodeParser

Zero-allocation parser and GS1 Modulo-10 checksum calculator for GTIN-8/12/13/14 and retail variable-weight/variable-price scale barcodes (EAN-13 prefixes `20`–`29`).

Miembros (3)

  • methodComputeGs1CheckDigit
    public static int ComputeGs1CheckDigit(ReadOnlySpan<char> payloadWithoutCheckDigit)

    Computes the GS1 Modulo-10 check digit (0–9) for a data payload span (7, 11, 12, or 13 digits).

    payloadWithoutCheckDigit: ReadOnlySpan<char>
    The numeric GTIN payload excluding the trailing check digit.

    Retorna: The GS1 Modulo-10 check digit between 0 and 9, or `-1` if the input is empty or non-numeric.

  • methodIsValidGs1CheckDigit
    public static bool IsValidGs1CheckDigit(ReadOnlySpan<char> digits)

    Verifies the standard GS1 Modulo-10 check digit for 8, 12, 13, or 14-digit GTIN spans.

    digits: ReadOnlySpan<char>
    The candidate numeric GTIN span.

    Retorna: `true` if `digits` has a valid length, contains only ASCII digits, and matches its GS1 Modulo-10 check digit.

  • methodParse
    public static Result<RetailScaleBarcodeData> Parse(ReadOnlySpan<char> rawBarcode, RetailScaleEncodingMode mode = RetailScaleEncodingMode.AutoByPrefix29)

    Parses a 13-digit EAN-13 retail scale barcode (prefixes `20`–`29`) after verifying its GS1 Modulo-10 check digit.

    rawBarcode: ReadOnlySpan<char>
    The raw 13-digit scale barcode span.
    mode: RetailScaleEncodingMode
    The weight/price encoding mode (defaults to `RetailScaleEncodingMode.AutoByPrefix29`).

    Retorna: A `Result<RetailScaleBarcodeData>` containing the extracted PLU and embedded weight/price or a validation error.

enum

RetailScaleEncodingMode

Ensamblado: EricksonLopez.ValueObjects
public enum RetailScaleEncodingMode

Specifies how the 5-digit measure payload (positions 8–12) in a prefix 20–29 retail scale EAN-13 barcode is interpreted.

Miembros (4)

  • fieldAutoByPrefix29
    AutoByPrefix29 = 0

    Interprets prefixes 20–28 as weight in grams (`value / 1000` kg) and prefix 29 as price in cents (`value / 100`).

  • fieldPriceCents
    PriceCents = 3

    Interprets the 5-digit payload as monetary price in minor currency units / cents (`0.01` precision).

  • fieldWeightGrams
    WeightGrams = 1

    Interprets the 5-digit payload as weight in grams (`0.001` kg precision).

  • fieldWeightHundredthsPound
    WeightHundredthsPound = 2

    Interprets the 5-digit payload as weight in hundredths of a pound (`0.01` lb precision).

record

SKU

Ensamblado: EricksonLopez.ValueObjects
public sealed record SKU : StringValueObject<SKU>
Hereda de: StringValueObject<SKU>

Represents a Stock Keeping Unit — the unique product identifier for inventory tracking. Normalized to uppercase, zero embedded whitespace, with deterministic prefix+sequence generation.

Miembros (4)

  • methodCreate
    public static Result<SKU> Create(string? value)

    Creates a new `SKU` instance after validating and normalizing to uppercase.

    value: string?
    The raw stock keeping unit string.

    Retorna: A `Result<SKU>` containing the created instance or a validation error.

  • methodGenerate
    public static Result<SKU> Generate(ReadOnlySpan<char> categoryPrefix, int sequence, int padWidth = 6)

    Deterministically generates an uppercase `SKU` from a category prefix span and positive sequence number.

    categoryPrefix: ReadOnlySpan<char>
    The alphanumeric category prefix span (1–16 characters).
    sequence: int
    The positive sequence number (>= 1).
    padWidth: int
    Zero-padded numeric width (1–12, defaults to 6).

    Retorna: A `Result<SKU>` containing the generated SKU or a validation error.

  • methodGenerate
    public static Result<SKU> Generate(string? categoryPrefix, int sequence, int padWidth = 6)

    Deterministically generates an uppercase `SKU` from a category prefix and positive sequence number (e.g., `ELEC-000042`).

    categoryPrefix: string?
    The alphanumeric category prefix (1–16 characters).
    sequence: int
    The positive sequence number (>= 1).
    padWidth: int
    Zero-padded numeric width (1–12, defaults to 6).

    Retorna: A `Result<SKU>` containing the generated SKU or a validation error.

  • propertyIsAutoGenerated
    public bool IsAutoGenerated { get; }

    Gets a value indicating whether this SKU matches an auto-generated `PREFIX-000001` numeric suffix pattern.

record

SalesChannelCode

Ensamblado: EricksonLopez.ValueObjects
public sealed record SalesChannelCode : StringValueObject<SalesChannelCode>
Hereda de: StringValueObject<SalesChannelCode>

Represents a commercial sales channel identifier (e.g., "WEB", "POS_STORE_01", "MOBILE_APP", "B2B_PORTAL"). Normalized to uppercase. Rules: Required, 1–40 characters, uppercase alphanumeric with separators (`. _ / -`). Used by: POS, E-commerce, ERP, Omnichannel Sales, Analytics.

Miembros (1)

  • methodCreate
    public static Result<SalesChannelCode> Create(string? value)

    Creates a new `SalesChannelCode` instance after validating and normalizing to uppercase.

    value: string?
    The raw sales channel code string.

    Retorna: A `Result<SalesChannelCode>` containing the created instance or a validation error.

class

SensitiveDataAttribute

Ensamblado: EricksonLopez.ValueObjects
public sealed class SensitiveDataAttribute : Attribute
Hereda de: Attribute

Marks a value object, class, or property as containing sensitive data requiring redaction or masking.

Notas:

Governs formatting behavior to prevent accidental leakage in diagnostic logs and traces.

Miembros (2)

  • constructorSensitiveDataAttribute
    public SensitiveDataAttribute(string mask = "")

    Initializes a new instance of the `SensitiveDataAttribute` class with an optional mask pattern.

    mask: string
    The mask string to display in place of the sensitive value. Defaults to `"***"`.
  • propertyMask
    public string Mask { get; }

    Gets the mask pattern used when displaying sensitive values.

record

SerialNumber

Ensamblado: EricksonLopez.ValueObjects
public sealed record SerialNumber : StringValueObject<SerialNumber>
Hereda de: StringValueObject<SerialNumber>

Represents a unique manufacturing or inventory item serial number. Normalized to uppercase. Rules: Required, 1–80 characters, uppercase alphanumeric with separators (`. _ / -`). Used by: Inventory, Fixed Assets, Manufacturing, Warranty, After-Sales Service.

Miembros (1)

  • methodCreate
    public static Result<SerialNumber> Create(string? value)

    Creates a new `SerialNumber` instance after validating and normalizing to uppercase.

    value: string?
    The raw serial number string.

    Retorna: A `Result<SerialNumber>` containing the created instance or a validation error.

record

SingleValueObject<TSelf, TValue>

Ensamblado: EricksonLopez.ValueObjects
public abstract record SingleValueObject<TSelf, TValue> : IValueObject<TSelf>, IComparable<TSelf>, IComparable where TSelf : SingleValueObject<TSelf, TValue> where TValue : notnull
Implementa: IComparable, IComparable<TSelf>, IValueObject<TSelf>

Provides a base record for value objects encapsulating a single underlying value.

Notas:

Encapsulates structural value-based equality, type safety, formatted output, and domain invariant infrastructure. Type parameters: TSelf: The concrete value object type deriving from this base. This type parameter is annotated with `DynamicallyAccessedMemberTypes.All` to ensure full Native AOT and trimmer compatibility. Deriving types must be concrete, non-abstract classes or records.; TValue: The underlying primitive or complex value type.

Miembros (11)

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `TSelf`

  • methodCompareTo
    public int CompareTo(TSelf? other)

    Compares the current instance with another instance of the same type.

    other: TSelf?
    The other value object to compare with this instance.

    Retorna: A value indicating the relative order of the instances being compared.

    Exceptions: NotSupportedException: The underlying type `TValue` does not implement `IComparable<T>` or `IComparable`

  • methodEquals
    public virtual bool Equals(TSelf? other)

    Determines whether the current instance is equal to another instance of the same type based on value equality.

    other: TSelf?
    The other value object to compare with this instance.

    Retorna: `true` if the underlying values are equal; otherwise, `false`.

  • methodGetHashCode
    public override int GetHashCode()

    Inherits documentation from base type or interface.

  • methodToString
    public sealed override string ToString()

    Inherits documentation from base type or interface.

  • methodexplicit operator TValue
    public static explicit operator TValue(SingleValueObject<TSelf, TValue> valueObject)

    Converts a `SingleValueObject<TSelf, TValue>` instance explicitly to its underlying value.

    valueObject: SingleValueObject<TSelf, TValue>
    The value object to extract the value from.

    Retorna: The underlying wrapped value.

    Exceptions: ArgumentNullException: `valueObject` is `null`

  • methodoperator <
    public static bool operator <(SingleValueObject<TSelf, TValue>? left, SingleValueObject<TSelf, TValue>? right)

    Determines whether the left operand is less than the right operand.

    left: SingleValueObject<TSelf, TValue>?
    The left value object to compare.
    right: SingleValueObject<TSelf, TValue>?
    The right value object to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(SingleValueObject<TSelf, TValue>? left, SingleValueObject<TSelf, TValue>? right)

    Determines whether the left operand is less than or equal to the right operand.

    left: SingleValueObject<TSelf, TValue>?
    The left value object to compare.
    right: SingleValueObject<TSelf, TValue>?
    The right value object to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(SingleValueObject<TSelf, TValue>? left, SingleValueObject<TSelf, TValue>? right)

    Determines whether the left operand is greater than the right operand.

    left: SingleValueObject<TSelf, TValue>?
    The left value object to compare.
    right: SingleValueObject<TSelf, TValue>?
    The right value object to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(SingleValueObject<TSelf, TValue>? left, SingleValueObject<TSelf, TValue>? right)

    Determines whether the left operand is greater than or equal to the right operand.

    left: SingleValueObject<TSelf, TValue>?
    The left value object to compare.
    right: SingleValueObject<TSelf, TValue>?
    The right value object to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyValue
    public TValue Value { get; }

    Gets the encapsulated underlying value.

record

StringValueObject<TSelf>

Ensamblado: EricksonLopez.ValueObjects
public abstract record StringValueObject<TSelf> : SingleValueObject<TSelf, string> where TSelf : StringValueObject<TSelf>
Hereda de: SingleValueObject<TSelf, string>

Provides a base record for value objects whose encapsulated state is a single normalized string.

Notas:

Eliminates boilerplate by inheriting value equality, comparison semantics, and string representation from `SingleValueObject<TSelf, TValue>`. Type parameters: TSelf: The concrete string value object type deriving from this base. This type parameter is annotated with `DynamicallyAccessedMemberTypes.All` to ensure full Native AOT and trimmer compatibility. Deriving types must be concrete, non-abstract records.

Miembros (0)

Este tipo declara 0 miembros públicos (por ejemplo, interfaz marcadora o enum/record vacío).

record

Subject

Ensamblado: EricksonLopez.ValueObjects
public sealed record Subject : StringValueObject<Subject>
Hereda de: StringValueObject<Subject>

Represents a single-line subject, title, or topic for messages, tickets, and notifications. Normalized by collapsing excessive whitespace. Rules: Required, 1–250 characters, single-line text without control characters. Used by: CRM, Ticketing, Notifications, Email, Task Management.

Miembros (1)

  • methodCreate
    public static Result<Subject> Create(string? value)

    Creates a new `Subject` instance after validating and collapsing whitespace.

    value: string?
    The raw subject line string.

    Retorna: A `Result<Subject>` containing the created instance or a validation error.

record

SupplierCode

Ensamblado: EricksonLopez.ValueObjects
public sealed record SupplierCode : StringValueObject<SupplierCode>
Hereda de: StringValueObject<SupplierCode>

Represents a unique supplier, vendor, or contractor master data code. Normalized to uppercase. Rules: Required, 1–40 characters, uppercase alphanumeric with separators (`. _ / -`). Used by: ERP, Purchasing, Accounts Payable, Inventory, Logistics.

Miembros (1)

  • methodCreate
    public static Result<SupplierCode> Create(string? value)

    Creates a new `SupplierCode` instance after validating and normalizing to uppercase.

    value: string?
    The raw supplier code string.

    Retorna: A `Result<SupplierCode>` containing the created instance or a validation error.

record

SwiftBic

Ensamblado: EricksonLopez.ValueObjects
public sealed record SwiftBic : StringValueObject<SwiftBic>
Hereda de: StringValueObject<SwiftBic>

Represents a Business Identifier Code (SWIFT/BIC) compliant with ISO 9362. Formats: 8 characters (primary/head office) or 11 characters (specific branch).

Miembros (6)

  • methodCreate
    public static Result<SwiftBic> Create(string? value)

    Creates a validated `SwiftBic` instance conforming to ISO 9362 specifications.

    value: string?
    The raw 8- or 11-character SWIFT/BIC string.

    Retorna: A `Result<SwiftBic>` containing the validated instance or a domain validation error.

  • propertyBankCode
    public string BankCode { get; }

    Gets the 4-letter bank identifier code.

  • propertyBranchCode
    public string? BranchCode { get; }

    Gets the 3-character branch code, or `null` if this is an 8-character head office code.

  • propertyCountryCode
    public string CountryCode { get; }

    Gets the 2-letter ISO 3166-1 alpha-2 country code.

  • propertyIsHeadOffice
    public bool IsHeadOffice { get; }

    Gets a value indicating whether this BIC represents a primary or head office (8 characters).

  • propertyLocationCode
    public string LocationCode { get; }

    Gets the 2-character location code.

record

TaxRate

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct TaxRate : IValueObject<TaxRate>, IComparable<TaxRate>, IComparable, IParsable<TaxRate>, ISpanParsable<TaxRate>, IFormattable, ISpanFormattable
Implementa: IComparable, IComparable<TaxRate>, IFormattable, IParsable<TaxRate>, ISpanFormattable, ISpanParsable<TaxRate>, IValueObject<TaxRate>

Represents a tax rate percentage value between 0 and 100 inclusive.

Miembros (22)

  • methodCalculateTax
    public Money CalculateTax(Money baseAmount)

    Calculates the tax amount for a specified monetary value using banker's rounding.

    baseAmount: Money
    The base monetary value.

    Retorna: The calculated tax `Money` amount.

  • methodCalculateTax
    public decimal CalculateTax(decimal baseAmount)

    Calculates the tax amount for a specified base numeric value.

    baseAmount: decimal
    The base monetary or numeric value.

    Retorna: The calculated tax amount rounded to 6 decimal places.

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `TaxRate`

  • methodCompareTo
    public int CompareTo(TaxRate other)

    Compares this tax rate with another tax rate.

    other: TaxRate
    The other tax rate to compare against.

    Retorna: A value indicating the relative order of the tax rates being compared.

  • methodCreate
    public static Result<TaxRate> Create(decimal value)

    Creates a validated `TaxRate` instance from a percentage value in the range [0, 100].

    value: decimal
    The tax percentage amount.

    Retorna: A successful `Result<T>` containing the validated tax rate, or a validation failure.

  • methodParse
    public static TaxRate Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a span of characters into a `TaxRate`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `TaxRate`.

    Exceptions: FormatException: `s` is not in a valid tax rate format

  • methodParse
    public static TaxRate Parse(string s, IFormatProvider? provider = null)

    Parses a string into a `TaxRate`.

    s: string
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `TaxRate`.

    Exceptions: FormatException: `s` is not in a valid tax rate format

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodToString
    public string ToString(string? format, IFormatProvider? formatProvider)

    Inherits documentation from `IFormattable.ToString(string?, IFormatProvider?)`.

    format: string?
    formatProvider: IFormatProvider?
  • methodTryFormat
    public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider)

    Inherits documentation from base type or interface.

    destination: Span<char>
    charsWritten: out int
    format: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out TaxRate result)

    Attempts to parse a span of characters into a `TaxRate`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out TaxRate
    When this method returns, contains the parsed tax rate if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out TaxRate result)

    Attempts to parse a string into a `TaxRate`.

    s: string?
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out TaxRate
    When this method returns, contains the parsed tax rate if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodoperator <
    public static bool operator <(TaxRate left, TaxRate right)

    Determines whether the left tax rate is less than the right tax rate.

    left: TaxRate
    The first tax rate to compare.
    right: TaxRate
    The second tax rate to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(TaxRate left, TaxRate right)

    Determines whether the left tax rate is less than or equal to the right tax rate.

    left: TaxRate
    The first tax rate to compare.
    right: TaxRate
    The second tax rate to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(TaxRate left, TaxRate right)

    Determines whether the left tax rate is greater than the right tax rate.

    left: TaxRate
    The first tax rate to compare.
    right: TaxRate
    The second tax rate to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(TaxRate left, TaxRate right)

    Determines whether the left tax rate is greater than or equal to the right tax rate.

    left: TaxRate
    The first tax rate to compare.
    right: TaxRate
    The second tax rate to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyAsFraction
    public decimal AsFraction { get; }

    Gets the fractional representation of the tax rate.

    This property is an alias of `Fraction` provided for fluent readability.

  • propertyFraction
    public decimal Fraction { get; }

    Gets the fractional representation of the tax rate (value divided by 100).

  • propertyIsExempt
    public bool IsExempt { get; }

    Gets a value indicating whether the tax rate is zero (tax exempt).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `TaxRate` instance was initialized through a factory rather than `default(TaxRate)`.

  • propertyValue
    public decimal Value { get; }

    Gets the numerical tax rate percentage.

  • fieldExempt
    public static readonly TaxRate Exempt

    Gets a tax rate representing full tax exemption (0%).

record

TenantCode

Ensamblado: EricksonLopez.ValueObjects
public sealed partial record TenantCode : StringValueObject<TenantCode>
Hereda de: StringValueObject<TenantCode>

Represents a tenant identifier in a multi-tenant SaaS system. DNS-friendly: lowercase letters, digits, and hyphens only. Architectural note: `TenantCode` is placed in `Shared/` (not `SaaS/`) because it is used by every bounded context (13/13 systems) as the primary multi-tenancy discriminator, making it a universal cross-cutting concern rather than a SaaS-specific concept. Rules: 3–64 chars, DNS-friendly lowercase slug (letters, digits, hyphens), must start and end with a letter or digit. Used by: All bounded contexts — universal tenancy discriminator.

Miembros (1)

  • methodCreate
    public static Result<TenantCode> Create(string? value)

    Creates a new `TenantCode` instance after validating DNS format and normalizing to lowercase.

    value: string?
    The raw tenant code string.

    Retorna: A `Result<TenantCode>` containing the created instance or a validation error.

record

TimeRange

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct TimeRange : IValueObject<TimeRange>, IComparable<TimeRange>, IComparable, IParsable<TimeRange>, ISpanParsable<TimeRange>
Implementa: IComparable, IComparable<TimeRange>, IParsable<TimeRange>, ISpanParsable<TimeRange>, IValueObject<TimeRange>

Represents an immutable time-of-day interval supporting standard and overnight intervals.

Miembros (20)

  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?

    Exceptions: ArgumentException: `obj` is not of type `TimeRange`

  • methodCompareTo
    public int CompareTo(TimeRange other)

    Compares this time range with another time range.

    other: TimeRange
    The other time range to compare against.

    Retorna: A value indicating the relative order of the time ranges being compared.

    Comparison is first by `Start`; when start times are equal, comparison falls back to `End`.

  • methodContains
    public bool Contains(TimeOnly time)

    Determines whether the specified time falls within this range.

    time: TimeOnly
    The time to evaluate.

    Retorna: `true` if the time falls within the range; otherwise, `false`.

  • methodCreate
    public static Result<TimeRange> Create(TimeOnly start, TimeOnly end, bool allowOvernight = false)

    Creates a validated `TimeRange` instance with specified start and end times.

    start: TimeOnly
    The starting time of the interval.
    end: TimeOnly
    The ending time of the interval.
    allowOvernight: bool
    A value indicating whether overnight intervals (where start is after end) are permitted.

    Retorna: A successful `Result<T>` containing the validated time range, or a validation failure.

  • methodOverlaps
    public bool Overlaps(TimeRange other)

    Determines whether this time range overlaps with another time range.

    other: TimeRange
    The other time range to check for overlap.

    Retorna: `true` if the ranges overlap; otherwise, `false`.

  • methodParse
    public static TimeRange Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Parses a span of characters into a `TimeRange`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `TimeRange`.

  • methodParse
    public static TimeRange Parse(string s, IFormatProvider? provider = null)

    Parses a string into a `TimeRange`.

    s: string
    The string to parse (e.g. `"[08:00:00 .. 17:00:00]"` or `"22:00:00..06:00:00"`).
    provider: IFormatProvider?
    An optional format provider.

    Retorna: The parsed `TimeRange`.

    Exceptions: FormatException: `s` is not in a valid format

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out TimeRange result)

    Attempts to parse a span of characters into a `TimeRange`.

    s: ReadOnlySpan<char>
    The span of characters to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out TimeRange
    When this method returns, contains the parsed range if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out TimeRange result)

    Attempts to parse a string into a `TimeRange`.

    s: string?
    The string to parse.
    provider: IFormatProvider?
    An optional format provider.
    result: out TimeRange
    When this method returns, contains the parsed range if successful; otherwise, default.

    Retorna: `true` if parsed successfully; otherwise, `false`.

  • methodoperator <
    public static bool operator <(TimeRange left, TimeRange right)

    Determines whether the left time range is earlier than the right time range.

    left: TimeRange
    right: TimeRange
  • methodoperator <=
    public static bool operator <=(TimeRange left, TimeRange right)

    Determines whether the left time range is earlier than or equal to the right time range.

    left: TimeRange
    right: TimeRange
  • methodoperator >
    public static bool operator >(TimeRange left, TimeRange right)

    Determines whether the left time range is later than the right time range.

    left: TimeRange
    right: TimeRange
  • methodoperator >=
    public static bool operator >=(TimeRange left, TimeRange right)

    Determines whether the left time range is later than or equal to the right time range.

    left: TimeRange
    right: TimeRange
  • propertyCrossesMidnight
    public bool CrossesMidnight { get; }

    Gets a value indicating whether this range spans across midnight.

  • propertyDuration
    public TimeSpan Duration { get; }

    Gets the total elapsed duration of the time range.

  • propertyEnd
    public TimeOnly End { get; }

    Gets the ending time of the interval.

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this time range is degenerate (i.e. `Start` equals `End` and does not span across midnight).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

  • propertyStart
    public TimeOnly Start { get; }

    Gets the starting time of the interval.

record

TimeZoneCode

Ensamblado: EricksonLopez.ValueObjects
public sealed partial record TimeZoneCode : StringValueObject<TimeZoneCode>
Hereda de: StringValueObject<TimeZoneCode>

Represents an IANA or Windows time zone identifier.

Miembros (1)

  • methodCreate
    public static Result<TimeZoneCode> Create(string? value)

    Creates a validated `TimeZoneCode` instance after normalizing whitespace.

    value: string?
    The time zone identifier string.

    Retorna: A successful `Result<T>` containing the validated time zone code, or a validation failure.

record

TripleMoney

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct TripleMoney : IEquatable<TripleMoney>
Implementa: IEquatable<TripleMoney>

Represents a multi-currency monetary triplet containing Local Currency (LC), Foreign Currency (FC), and System/Consolidation Currency (SC) amounts for international multi-company accounting.

Miembros (9)

  • methodAdd
    public TripleMoney Add(TripleMoney other)

    Adds another `TripleMoney` instance to this instance component-wise.

    other: TripleMoney
    The other `TripleMoney` to add.

    Retorna: The component-wise sum.

  • methodCreate
    public static Result<TripleMoney> Create(Money localCurrency, Money foreignCurrency, Money systemCurrency)

    Creates a validated `TripleMoney` instance from its three monetary components.

    localCurrency: Money
    The Local Currency monetary amount.
    foreignCurrency: Money
    The Foreign Currency monetary amount.
    systemCurrency: Money
    The System Currency monetary amount.

    Retorna: A successful `Result<T>` containing the created `TripleMoney`, or a validation failure.

  • methodReconstitute
    public static TripleMoney Reconstitute(decimal lcAmount, string lcCurrency, decimal fcAmount, string fcCurrency, decimal scAmount, string scCurrency)

    Reconstitutes a `TripleMoney` instance from six persisted database columns (3 amounts + 3 ISO currency codes).

    lcAmount: decimal
    The Local Currency numeric amount.
    lcCurrency: string
    The Local Currency ISO 4217 code.
    fcAmount: decimal
    The Foreign Currency numeric amount.
    fcCurrency: string
    The Foreign Currency ISO 4217 code.
    scAmount: decimal
    The System Currency numeric amount.
    scCurrency: string
    The System Currency ISO 4217 code.

    Retorna: The reconstituted `TripleMoney` instance.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodZero
    public static TripleMoney Zero(CurrencyCode lc, CurrencyCode fc, CurrencyCode sc)

    Creates a zero-valued `TripleMoney` instance for the three specified currencies.

    lc: CurrencyCode
    The Local Currency code.
    fc: CurrencyCode
    The Foreign Currency code.
    sc: CurrencyCode
    The System Currency code.

    Retorna: A zero-valued `TripleMoney` instance.

  • propertyForeignCurrency
    public Money ForeignCurrency { get; }

    Gets the amount denominated in Foreign/Transaction Currency (e.g., USD, EUR).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether all three monetary components are initialized.

  • propertyLocalCurrency
    public Money LocalCurrency { get; }

    Gets the amount denominated in Local Currency (e.g., DOP).

  • propertySystemCurrency
    public Money SystemCurrency { get; }

    Gets the amount denominated in System/Consolidation Currency.

record

UnitConversionFactor

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct UnitConversionFactor : IValueObject<UnitConversionFactor>, IEquatable<UnitConversionFactor>
Implementa: IEquatable<UnitConversionFactor>, IValueObject<UnitConversionFactor>

Represents an exact rational unit-of-measure conversion factor (`Numerator / Denominator`) eliminating repeating-decimal truncation drift across packaging, inventory, and recipe conversions.

Miembros (10)

  • methodConvert
    public Result<decimal> Convert(decimal quantity, int decimals = 6)

    Converts a source quantity to the target unit using exact rational multiplication prior to rounding.

    quantity: decimal
    The quantity in source units.
    decimals: int
    The target decimal scale (0–6, defaults to 6).

    Retorna: A `Result<Decimal>` containing the converted quantity.

  • methodCreate
    public static Result<UnitConversionFactor> Create(decimal numerator, decimal denominator = 1m)

    Creates a validated rational `UnitConversionFactor` from positive `numerator` and `denominator`.

    numerator: decimal
    The positive numerator.
    denominator: decimal
    The positive denominator (defaults to `1`).

    Retorna: A `Result<UnitConversionFactor>` containing the validated factor or an error.

  • methodInvert
    public Result<UnitConversionFactor> Invert()

    Returns the multiplicative inverse (`Denominator / Numerator`) of this conversion factor.

    Retorna: A `Result<UnitConversionFactor>` containing the inverted factor.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • propertyDenominator
    public decimal Denominator { get; }

    Gets the positive rational denominator.

  • propertyIdentity
    public static UnitConversionFactor Identity { get; }

    Gets the identity 1:1 conversion factor (`1 / 1`).

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this factor is uninitialized (`default(UnitConversionFactor)`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this factor was initialized via a factory.

  • propertyNumerator
    public decimal Numerator { get; }

    Gets the positive rational numerator.

  • propertyRatio
    public decimal Ratio { get; }

    Gets the decimal ratio (`Numerator / Denominator`), or `0` if uninitialized.

record

ValueObject

Ensamblado: EricksonLopez.ValueObjects
public abstract record ValueObject : DomainPrimitives.ValueObject, IValueObject
Hereda de: DomainPrimitives.ValueObjectImplementa: IValueObject

Provides a base record for composite value objects composed of multiple domain attributes.

Notas:

Inheriting records achieve structural value-based equality through C# record semantics. Derived types should be sealed, maintain private constructors, and expose static factory methods returning `Result<T>`.

Miembros (0)

Este tipo declara 0 miembros públicos (por ejemplo, interfaz marcadora o enum/record vacío).

class

ValueObjectAttribute

Ensamblado: EricksonLopez.ValueObjects
public sealed class ValueObjectAttribute : Attribute
Hereda de: Attribute

Instructs the source generator to synthesize factories, parsers, formatters, and equality for this value object.

Miembros (2)

  • propertyGenerateConversionOperators
    public bool GenerateConversionOperators { get; set; }

    Gets or sets a value indicating whether to generate implicit and explicit conversion operators to and from the underlying value.

  • propertyGeneratePersistenceHooks
    public bool GeneratePersistenceHooks { get; set; }

    Gets or sets a value indicating whether to generate persistence type handler hooks. Reserved for persistence hook synthesis in an upcoming release.

record

VehicleVin

Ensamblado: EricksonLopez.ValueObjects
public sealed record VehicleVin : StringValueObject<VehicleVin>
Hereda de: StringValueObject<VehicleVin>

Represents a Vehicle Identification Number (VIN) compliant with ISO 3779 and ISO 3780 standards. Exactly 17 alphanumeric characters (excluding letters I, O, Q) with Modulo 11 check-digit verification at position 9.

Miembros (8)

  • methodCreate
    public static Result<VehicleVin> Create(string? value)

    Creates a validated `VehicleVin` instance according to ISO 3779 check digit specifications.

    value: string?
    The raw 17-character VIN string.

    Retorna: A `Result<VehicleVin>` containing the validated instance or a domain validation error.

  • propertyModelYear
    public int ModelYear { get; }

    Gets the decoded model year from position 10, or `0` if unrecognized.

  • propertyVds
    public string Vds { get; }

    Gets the Vehicle Descriptor Section (VDS) occupying positions 4 to 9.

  • propertyVehicleDescriptorSection
    public string VehicleDescriptorSection { get; }

    Alias for `Vds`.

  • propertyVehicleIdentifierSection
    public string VehicleIdentifierSection { get; }

    Alias for `Vis`.

  • propertyVis
    public string Vis { get; }

    Gets the Vehicle Identifier Section (VIS) occupying positions 10 to 17.

  • propertyWmi
    public string Wmi { get; }

    Gets the World Manufacturer Identifier (WMI) occupying positions 1 to 3.

  • propertyWorldManufacturerIdentifier
    public string WorldManufacturerIdentifier { get; }

    Alias for `Wmi`.

record

WarehouseCode

Ensamblado: EricksonLopez.ValueObjects
public sealed record WarehouseCode : StringValueObject<WarehouseCode>
Hereda de: StringValueObject<WarehouseCode>

Represents a warehouse, storage location, or distribution center identifier. Normalized to uppercase. Rules: Required, 1–40 characters, uppercase alphanumeric with separators (`. _ / -`). Used by: Inventory, Logistics, Supply Chain, ERP, POS.

Miembros (1)

  • methodCreate
    public static Result<WarehouseCode> Create(string? value)

    Creates a new `WarehouseCode` instance after validating and normalizing to uppercase.

    value: string?
    The raw warehouse code string.

    Retorna: A `Result<WarehouseCode>` containing the created instance or a validation error.

record

WebsiteUrl

Ensamblado: EricksonLopez.ValueObjects
public sealed record WebsiteUrl : StringValueObject<WebsiteUrl>
Hereda de: StringValueObject<WebsiteUrl>

Represents an absolute HTTP or HTTPS website URL.

Miembros (2)

  • methodCreate
    public static Result<WebsiteUrl> Create(string? value)

    Creates a validated `WebsiteUrl` instance from an absolute HTTP or HTTPS URL string.

    value: string?
    The raw website URL string.

    Retorna: A successful `Result<T>` containing the validated website URL, or a validation failure.

  • propertyHost
    public string Host { get; }

    Gets the host component of the URL.

enum

WeightUnit

Ensamblado: EricksonLopez.ValueObjects
public enum WeightUnit

Supported mass/weight units for industrial, retail scale, and logistics operations.

Miembros (6)

  • fieldGram
    Gram = 1

    Gram (`g`, 0.001 kg).

  • fieldKilogram
    Kilogram = 2

    Kilogram (`kg`, SI base unit).

  • fieldMetricTon
    MetricTon = 3

    Metric ton (`t`, 1000 kg).

  • fieldMilligram
    Milligram = 0

    Milligram (`mg`, 0.000001 kg).

  • fieldOunce
    Ounce = 4

    Avoirdupois ounce (`oz`, 0.028349523125 kg).

  • fieldPound
    Pound = 5

    Avoirdupois pound (`lb`, 0.45359237 kg).

EricksonLopez.ValueObjects.Analyzers#

4
class

ValueObjectConstructorAnalyzer

Ensamblado: EricksonLopez.ValueObjects.Analyzers
public sealed class ValueObjectConstructorAnalyzer : DiagnosticAnalyzer
Hereda de: DiagnosticAnalyzer

Provides a Roslyn diagnostic analyzer that enforces Value Objects declare private or protected constructors.

Miembros (3)

  • methodInitialize
    public override void Initialize(AnalysisContext context)

    Inherits documentation from base type or interface.

    context: AnalysisContext
  • propertySupportedDiagnostics
    public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }

    Inherits documentation from base type or interface.

  • fieldDiagnosticId
    public const string DiagnosticId

    Represents the diagnostic identifier for this rule (`ELVO001`).

class

ValueObjectDefaultInitializationAnalyzer

Ensamblado: EricksonLopez.ValueObjects.Analyzers
public sealed class ValueObjectDefaultInitializationAnalyzer : DiagnosticAnalyzer
Hereda de: DiagnosticAnalyzer

Provides a Roslyn diagnostic analyzer that enforces Value Objects are not initialized with default.

Miembros (3)

  • methodInitialize
    public override void Initialize(AnalysisContext context)

    Inherits documentation from base type or interface.

    context: AnalysisContext
  • propertySupportedDiagnostics
    public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }

    Inherits documentation from base type or interface.

  • fieldDiagnosticId
    public const string DiagnosticId

    Represents the diagnostic identifier for this rule (`ELVO004`).

class

ValueObjectFactoryAnalyzer

Ensamblado: EricksonLopez.ValueObjects.Analyzers
public sealed class ValueObjectFactoryAnalyzer : DiagnosticAnalyzer
Hereda de: DiagnosticAnalyzer

Provides a Roslyn diagnostic analyzer that enforces Value Objects declare at least one public static factory method named 'Create'.

Miembros (3)

  • methodInitialize
    public override void Initialize(AnalysisContext context)

    Inherits documentation from base type or interface.

    context: AnalysisContext
  • propertySupportedDiagnostics
    public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }

    Inherits documentation from base type or interface.

  • fieldDiagnosticId
    public const string DiagnosticId

    Represents the diagnostic identifier for this rule (`ELVO002`).

class

ValueObjectImmutabilityAnalyzer

Ensamblado: EricksonLopez.ValueObjects.Analyzers
public sealed class ValueObjectImmutabilityAnalyzer : DiagnosticAnalyzer
Hereda de: DiagnosticAnalyzer

Provides a Roslyn diagnostic analyzer that enforces Value Object properties and fields are immutable.

Miembros (3)

  • methodInitialize
    public override void Initialize(AnalysisContext context)

    Inherits documentation from base type or interface.

    context: AnalysisContext
  • propertySupportedDiagnostics
    public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }

    Inherits documentation from base type or interface.

  • fieldDiagnosticId
    public const string DiagnosticId

    Represents the diagnostic identifier for this rule (`ELVO003`).

EricksonLopez.ValueObjects.Attributes#

1
class

RegulatoryRuleAttribute

Ensamblado: EricksonLopez.ValueObjects
public sealed class RegulatoryRuleAttribute : EricksonLopez.ValueObjects.RegulatoryRuleAttribute
Hereda de: EricksonLopez.ValueObjects.RegulatoryRuleAttribute

Backward-compatible alias for `ValueObjects.RegulatoryRuleAttribute`.

Miembros (1)

  • constructorRegulatoryRuleAttribute
    public RegulatoryRuleAttribute(string ruleId)

    Initializes a new instance of the `RegulatoryRuleAttribute` class.

    ruleId: string
    The formal identifier of the regulatory rule.

EricksonLopez.ValueObjects.Commercial#

3
record

DateDrivenPaymentTerm

Ensamblado: EricksonLopez.ValueObjects
public sealed record DateDrivenPaymentTerm : PaymentTermSchedule
Hereda de: PaymentTermSchedule

Represents a calendar-date-driven commercial payment term (e.g., due on the 15th of the month with a 5-day cutoff rollover, or End-Of-Month).

Miembros (10)

  • methodCalculateDiscountAmount
    public override decimal CalculateDiscountAmount(decimal grossAmount, DateOnly paymentDate, DateOnly invoiceDate, int decimals = 2)

    Calculates the early-payment cash discount amount earned when settled on `paymentDate`.

    grossAmount: decimal
    The gross invoice amount.
    paymentDate: DateOnly
    The settlement date.
    invoiceDate: DateOnly
    The invoice issuance date.
    decimals: int
    Decimal rounding precision (defaults to 2).

    Retorna: The rounded early-payment discount amount (>= 0).

  • methodCalculateDiscountExpirationDate
    public override DateOnly? CalculateDiscountExpirationDate(DateOnly invoiceDate)

    Calculates the last date on which an early-payment discount is valid, or `null` if no prompt-payment discount applies.

    invoiceDate: DateOnly
    The invoice issuance date.

    Retorna: The discount expiration date, or `null`.

  • methodCalculateDueDate
    public override DateOnly CalculateDueDate(DateOnly invoiceDate)

    Calculates the deterministic maturity due date for an invoice issued on `invoiceDate`.

    invoiceDate: DateOnly
    The invoice issuance date.

    Retorna: The calculated due date.

  • methodCreate
    public static Result<DateDrivenPaymentTerm> Create(int dueDayOfMonth, int cutoffDays = 0, int monthsAfterInvoice = 0, int? discountDayOfMonth = null, decimal? discountPercentage = null, bool isEndOfMonth = false, decimal paymentPercentage = 100m)

    Creates a validated `DateDrivenPaymentTerm` instance.

    dueDayOfMonth: int
    Target day of month (1–31; ignored when `isEndOfMonth` is `true`).
    cutoffDays: int
    Cutoff rollover threshold in days (0–30).
    monthsAfterInvoice: int
    Additional calendar months after invoice month (0–120).
    discountDayOfMonth: int?
    Optional early-payment discount day of month (1–31).
    discountPercentage: decimal?
    Optional early-payment discount percentage (0 < p <= 100).
    isEndOfMonth: bool
    When `true`, anchors maturity to the last calendar day of the target month.
    paymentPercentage: decimal
    Percentage of gross invoice covered by this schedule slice (0 < p <= 100).

    Retorna: A `Result<DateDrivenPaymentTerm>` containing the validated schedule or an error.

  • propertyCutoffDays
    public int CutoffDays { get; }

    Gets the minimum cutoff days before `DueDayOfMonth`; invoices within the cutoff window roll over by one additional month.

  • propertyDiscountDayOfMonth
    public int? DiscountDayOfMonth { get; }

    Gets the optional day of the month by which early-payment discount applies.

  • propertyDiscountPercentage
    public decimal? DiscountPercentage { get; }

    Gets the optional early-payment discount percentage (0–100).

  • propertyDueDayOfMonth
    public int DueDayOfMonth { get; }

    Gets the target day of the month (1–31), or `31` when `IsEndOfMonth` is `true`.

  • propertyIsEndOfMonth
    public bool IsEndOfMonth { get; }

    Gets a value indicating whether payment falls on the last calendar day of the target month.

  • propertyMonthsAfterInvoice
    public int MonthsAfterInvoice { get; }

    Gets the number of base calendar months added after the invoice month (>= 0).

record

PaymentTermSchedule

Ensamblado: EricksonLopez.ValueObjects
public abstract record PaymentTermSchedule

Abstract base Value Object modeling commercial Accounts Receivable / Accounts Payable payment term schedules, prompt-payment discount expiration dates, and net payable amounts.

Miembros (5)

  • methodCalculateDiscountAmount
    public abstract decimal CalculateDiscountAmount(decimal grossAmount, DateOnly paymentDate, DateOnly invoiceDate, int decimals = 2)

    Calculates the early-payment cash discount amount earned when settled on `paymentDate`.

    grossAmount: decimal
    The gross invoice amount.
    paymentDate: DateOnly
    The settlement date.
    invoiceDate: DateOnly
    The invoice issuance date.
    decimals: int
    Decimal rounding precision (defaults to 2).

    Retorna: The rounded early-payment discount amount (>= 0).

  • methodCalculateDiscountExpirationDate
    public abstract DateOnly? CalculateDiscountExpirationDate(DateOnly invoiceDate)

    Calculates the last date on which an early-payment discount is valid, or `null` if no prompt-payment discount applies.

    invoiceDate: DateOnly
    The invoice issuance date.

    Retorna: The discount expiration date, or `null`.

  • methodCalculateDueDate
    public abstract DateOnly CalculateDueDate(DateOnly invoiceDate)

    Calculates the deterministic maturity due date for an invoice issued on `invoiceDate`.

    invoiceDate: DateOnly
    The invoice issuance date.

    Retorna: The calculated due date.

  • methodCalculateNetPayableAmount
    public decimal CalculateNetPayableAmount(decimal grossAmount, DateOnly paymentDate, DateOnly invoiceDate, int decimals = 2)

    Calculates the net payable amount for this schedule slice on `paymentDate` after any applicable early-payment discount.

    grossAmount: decimal
    The gross invoice amount.
    paymentDate: DateOnly
    The settlement date.
    invoiceDate: DateOnly
    The invoice issuance date.
    decimals: int
    Decimal rounding precision (defaults to 2).

    Retorna: The rounded net payable amount.

  • propertyPaymentPercentage
    public decimal PaymentPercentage { get; }

    Gets the percentage of the gross invoice amount governed by this schedule slice (0 < percentage <= 100).

record

StandardPaymentTerm

Ensamblado: EricksonLopez.ValueObjects
public sealed record StandardPaymentTerm : PaymentTermSchedule
Hereda de: PaymentTermSchedule

Represents a standard elapsed-days commercial payment term (e.g., `Net 30`, `2/10 Net 30`).

Miembros (7)

  • methodCalculateDiscountAmount
    public override decimal CalculateDiscountAmount(decimal grossAmount, DateOnly paymentDate, DateOnly invoiceDate, int decimals = 2)

    Calculates the early-payment cash discount amount earned when settled on `paymentDate`.

    grossAmount: decimal
    The gross invoice amount.
    paymentDate: DateOnly
    The settlement date.
    invoiceDate: DateOnly
    The invoice issuance date.
    decimals: int
    Decimal rounding precision (defaults to 2).

    Retorna: The rounded early-payment discount amount (>= 0).

  • methodCalculateDiscountExpirationDate
    public override DateOnly? CalculateDiscountExpirationDate(DateOnly invoiceDate)

    Calculates the last date on which an early-payment discount is valid, or `null` if no prompt-payment discount applies.

    invoiceDate: DateOnly
    The invoice issuance date.

    Retorna: The discount expiration date, or `null`.

  • methodCalculateDueDate
    public override DateOnly CalculateDueDate(DateOnly invoiceDate)

    Calculates the deterministic maturity due date for an invoice issued on `invoiceDate`.

    invoiceDate: DateOnly
    The invoice issuance date.

    Retorna: The calculated due date.

  • methodCreate
    public static Result<StandardPaymentTerm> Create(int dueDays, int? discountDays = null, decimal? discountPercentage = null, decimal paymentPercentage = 100m)

    Creates a validated `StandardPaymentTerm` instance.

    dueDays: int
    Days until invoice maturity (>= 0).
    discountDays: int?
    Optional prompt-payment discount window in days (>= 0 and < `dueDays`).
    discountPercentage: decimal?
    Optional prompt-payment discount percentage (0–100).
    paymentPercentage: decimal
    Percentage of gross invoice covered by this installment (0 < p <= 100, defaults to 100).

    Retorna: A `Result<StandardPaymentTerm>` containing the validated term or an error.

  • propertyDiscountDays
    public int? DiscountDays { get; }

    Gets the optional number of days within which early-payment discount applies.

  • propertyDiscountPercentage
    public decimal? DiscountPercentage { get; }

    Gets the optional early-payment discount percentage (0–100).

  • propertyDueDays
    public int DueDays { get; }

    Gets the number of calendar days after invoice date until maturity (>= 0).

EricksonLopez.ValueObjects.Dapper#

6
class

CountryCodeTypeHandler

Ensamblado: EricksonLopez.ValueObjects.Dapper
public sealed class CountryCodeTypeHandler : SqlMapper.TypeHandler<CountryCode>
Hereda de: SqlMapper.TypeHandler<CountryCode>

Dapper `SqlMapper.TypeHandler<T>` mapping `CountryCode` to its two-letter ISO 3166-1 alpha-2 string.

Miembros (2)

  • methodParse
    public override CountryCode Parse(object value)

    Inherits documentation from base type or interface.

    value: object
  • methodSetValue
    public override void SetValue(IDbDataParameter parameter, CountryCode value)

    Inherits documentation from base type or interface.

    parameter: IDbDataParameter
    value: CountryCode
class

MassWeightTypeHandler

Ensamblado: EricksonLopez.ValueObjects.Dapper
public sealed class MassWeightTypeHandler : SqlMapper.TypeHandler<MassWeight>
Hereda de: SqlMapper.TypeHandler<MassWeight>

Dapper `SqlMapper.TypeHandler<T>` mapping `MassWeight` to canonical invariant strings or numeric kilograms.

Miembros (2)

  • methodParse
    public override MassWeight Parse(object value)

    Inherits documentation from base type or interface.

    value: object
  • methodSetValue
    public override void SetValue(IDbDataParameter parameter, MassWeight value)

    Inherits documentation from base type or interface.

    parameter: IDbDataParameter
    value: MassWeight
class

PhysicalDimensionsTypeHandler

Ensamblado: EricksonLopez.ValueObjects.Dapper
public sealed class PhysicalDimensionsTypeHandler : SqlMapper.TypeHandler<PhysicalDimensions>
Hereda de: SqlMapper.TypeHandler<PhysicalDimensions>

Dapper `SqlMapper.TypeHandler<T>` mapping `PhysicalDimensions` to a canonical delimited representation (`L|W|H|Unit|GrossWeight`).

Miembros (2)

  • methodParse
    public override PhysicalDimensions Parse(object value)

    Inherits documentation from base type or interface.

    value: object
  • methodSetValue
    public override void SetValue(IDbDataParameter parameter, PhysicalDimensions value)

    Inherits documentation from base type or interface.

    parameter: IDbDataParameter
    value: PhysicalDimensions
class

SingleValueObjectTypeHandler<TVO, TPrimitive>

Ensamblado: EricksonLopez.ValueObjects.Dapper
public sealed class SingleValueObjectTypeHandler<TVO, TPrimitive> : SqlMapper.TypeHandler<TVO> where TVO : SingleValueObject<TVO, TPrimitive> where TPrimitive : notnull
Hereda de: SqlMapper.TypeHandler<TVO>

Provides a Dapper type handler for `SingleValueObject<TSelf, TValue>` types.

Notas:

Type parameters: TVO: The Value Object type.; TPrimitive: The underlying database primitive type.

Miembros (3)

  • constructorSingleValueObjectTypeHandler
    public SingleValueObjectTypeHandler(Func<TPrimitive, Result<TVO>> factory)

    Initializes a new instance of the `SingleValueObjectTypeHandler<TVO, TPrimitive>` class.

    factory: Func<TPrimitive, Result<TVO>>
    The factory function that creates a Value Object from a primitive value.
  • methodParse
    public override TVO? Parse(object value)

    Inherits documentation from base type or interface.

    value: object
  • methodSetValue
    public override void SetValue(IDbDataParameter parameter, TVO? value)

    Inherits documentation from base type or interface.

    parameter: IDbDataParameter
    value: TVO?
class

StructValueObjectTypeHandler<TVO, TPrimitive>

Ensamblado: EricksonLopez.ValueObjects.Dapper
public sealed class StructValueObjectTypeHandler<TVO, TPrimitive> : SqlMapper.TypeHandler<TVO> where TVO : struct, IValueObject where TPrimitive : notnull
Hereda de: SqlMapper.TypeHandler<TVO>

Provides a Dapper type handler for struct-based Value Object types.

Notas:

Type parameters: TVO: The Value Object struct type.; TPrimitive: The underlying database primitive type.

Miembros (3)

  • constructorStructValueObjectTypeHandler
    public StructValueObjectTypeHandler(Func<TPrimitive, Result<TVO>> factory, Func<TVO, TPrimitive> valueSelector)

    Initializes a new instance of the `StructValueObjectTypeHandler<TVO, TPrimitive>` class.

    factory: Func<TPrimitive, Result<TVO>>
    The factory function that creates a Value Object struct from a primitive value.
    valueSelector: Func<TVO, TPrimitive>
    The function that extracts the underlying primitive value from the Value Object struct.
  • methodParse
    public override TVO Parse(object value)

    Inherits documentation from base type or interface.

    value: object
  • methodSetValue
    public override void SetValue(IDbDataParameter parameter, TVO value)

    Inherits documentation from base type or interface.

    parameter: IDbDataParameter
    value: TVO
class

ValueObjectTypeHandler

Ensamblado: EricksonLopez.ValueObjects.Dapper
public static class ValueObjectTypeHandler

Provides methods for registering Dapper type handlers for Value Objects.

Miembros (2)

  • methodRegister<TVO, TPrimitive>
    public static void Register<TVO, TPrimitive>(Func<TPrimitive, Result<TVO>> factory) where TVO : SingleValueObject<TVO, TPrimitive> where TPrimitive : notnull

    Registers a Dapper type handler for a `SingleValueObject<TSelf, TValue>` type.

    factory: Func<TPrimitive, Result<TVO>>
    The factory method to create instances of the Value Object.

    Type parameters: TVO: The Value Object type.; TPrimitive: The underlying primitive type.

  • methodRegisterStruct<TVO, TPrimitive>
    public static void RegisterStruct<TVO, TPrimitive>(Func<TPrimitive, Result<TVO>> factory, Func<TVO, TPrimitive> valueSelector) where TVO : struct, IValueObject where TPrimitive : notnull

    Registers a Dapper type handler for a struct-based Value Object type.

    factory: Func<TPrimitive, Result<TVO>>
    The factory method to create instances of the Value Object.
    valueSelector: Func<TVO, TPrimitive>
    The delegate extracting the primitive value from the Value Object struct.

    Type parameters: TVO: The struct Value Object type.; TPrimitive: The underlying primitive type.

EricksonLopez.ValueObjects.DomainPrimitives#

2
class

DomainPrimitiveErrorExtensions

Ensamblado: EricksonLopez.ValueObjects.DomainPrimitives
public static class DomainPrimitiveErrorExtensions

Provides extension methods for converting between `PrimitiveError` and `Error`.

Miembros (2)

  • methodToError
    public static Error? ToError(this PrimitiveError primitiveError)

    Converts a `PrimitiveError` into an `Error`, or returns `null` if `primitiveError` represents `PrimitiveError.None`.

    primitiveError: this PrimitiveError
    The primitive error to convert.

    Retorna: The corresponding `Error`, or `null` if no error occurred.

  • methodToPrimitiveError
    public static PrimitiveError ToPrimitiveError(this Error? error)

    Converts an `Error` into a `PrimitiveError`.

    error: this Error?
    The error to convert, or `null` for success.

    Retorna: The corresponding `PrimitiveError`.

class

ValueObjectDomainPrimitiveExtensions

Ensamblado: EricksonLopez.ValueObjects.DomainPrimitives
public static class ValueObjectDomainPrimitiveExtensions

Provides extension methods for converting `SingleValueObject<TSelf, TValue>` instances to `IDomainPrimitive<TSelf, TValue>`.

Miembros (2)

  • methodToDomainPrimitive<TSelf, TValue, TPrimitive>
    public static Result<TPrimitive> ToDomainPrimitive<TSelf, TValue, TPrimitive>(this SingleValueObject<TSelf, TValue> valueObject) where TSelf : SingleValueObject<TSelf, TValue> where TValue : notnull where TPrimitive : IDomainPrimitive<TPrimitive, TValue>

    Attempts to instantiate a domain primitive from the raw value of a single-value value object.

    valueObject: this SingleValueObject<TSelf, TValue>
    The source value object to convert.

    Retorna: A `Result<TPrimitive>` containing the created primitive or a validation error.

    Type parameters: TSelf: The concrete value object type.; TValue: The underlying value type.; TPrimitive: The target domain primitive type.

  • methodToStrongId<TSelf, TValue, TStrongId>
    public static Result<TStrongId> ToStrongId<TSelf, TValue, TStrongId>(this SingleValueObject<TSelf, TValue> valueObject) where TSelf : SingleValueObject<TSelf, TValue> where TValue : notnull where TStrongId : IStrongId<TStrongId, TValue>

    Converts a strongly-typed ID value object to an `IStrongId<TSelf, TValue>`.

    valueObject: this SingleValueObject<TSelf, TValue>
    The source value object to convert.

    Retorna: A `Result<TStrongId>` containing the created strong ID or a validation error.

    Type parameters: TSelf: The concrete value object type.; TValue: The underlying ID value type.; TStrongId: The target strong ID type.

EricksonLopez.ValueObjects.EntityFrameworkCore#

9
class

CurrencyCodeValueConverter

Ensamblado: EricksonLopez.ValueObjects.EntityFrameworkCore
public sealed class CurrencyCodeValueConverter : ValueConverter<CurrencyCode, string>
Hereda de: ValueConverter<CurrencyCode, string>

Provides an Entity Framework Core `ValueConverter<TModel, TProvider>` for `CurrencyCode`.

Miembros (1)

  • constructorCurrencyCodeValueConverter
    public CurrencyCodeValueConverter()

    Initializes a new instance of the `CurrencyCodeValueConverter` class.

class

EmailValueConverter

Ensamblado: EricksonLopez.ValueObjects.EntityFrameworkCore
public sealed class EmailValueConverter : ValueConverter<Email, string>
Hereda de: ValueConverter<Email, string>

Provides an Entity Framework Core `ValueConverter<TModel, TProvider>` for `Email`.

Miembros (1)

  • constructorEmailValueConverter
    public EmailValueConverter()

    Initializes a new instance of the `EmailValueConverter` class.

class

PercentageValueConverter

Ensamblado: EricksonLopez.ValueObjects.EntityFrameworkCore
public sealed class PercentageValueConverter : ValueConverter<Percentage, decimal>
Hereda de: ValueConverter<Percentage, decimal>

Provides an Entity Framework Core `ValueConverter<TModel, TProvider>` for `Percentage`.

Miembros (1)

  • constructorPercentageValueConverter
    public PercentageValueConverter()

    Initializes a new instance of the `PercentageValueConverter` class.

class

PhoneNumberValueConverter

Ensamblado: EricksonLopez.ValueObjects.EntityFrameworkCore
public sealed class PhoneNumberValueConverter : ValueConverter<PhoneNumber, string>
Hereda de: ValueConverter<PhoneNumber, string>

Provides an Entity Framework Core `ValueConverter<TModel, TProvider>` for `PhoneNumber`.

Miembros (1)

  • constructorPhoneNumberValueConverter
    public PhoneNumberValueConverter()

    Initializes a new instance of the `PhoneNumberValueConverter` class.

class

PostalCodeValueConverter

Ensamblado: EricksonLopez.ValueObjects.EntityFrameworkCore
public sealed class PostalCodeValueConverter : ValueConverter<PostalCode, string>
Hereda de: ValueConverter<PostalCode, string>

Provides an Entity Framework Core `ValueConverter<TModel, TProvider>` for `PostalCode`.

Miembros (1)

  • constructorPostalCodeValueConverter
    public PostalCodeValueConverter()

    Initializes a new instance of the `PostalCodeValueConverter` class.

class

QuantityValueConverter

Ensamblado: EricksonLopez.ValueObjects.EntityFrameworkCore
public sealed class QuantityValueConverter : ValueConverter<Quantity, int>
Hereda de: ValueConverter<Quantity, int>

Provides an Entity Framework Core `ValueConverter<TModel, TProvider>` for `Quantity`.

Miembros (1)

  • constructorQuantityValueConverter
    public QuantityValueConverter()

    Initializes a new instance of the `QuantityValueConverter` class.

class

SingleValueObjectValueConverter<TVO, TValue>

Ensamblado: EricksonLopez.ValueObjects.EntityFrameworkCore
public class SingleValueObjectValueConverter<TVO, TValue> : ValueConverter<TVO, TValue> where TVO : SingleValueObject<TVO, TValue> where TValue : notnull
Hereda de: ValueConverter<TVO, TValue>

Provides an Entity Framework Core `ValueConverter<TModel, TProvider>` for `SingleValueObject<TSelf, TValue>` types.

Notas:

Type parameters: TVO: The concrete SingleValueObject type.; TValue: The underlying database primitive type.

Miembros (2)

  • constructorSingleValueObjectValueConverter
    public SingleValueObjectValueConverter()

    Initializes a new instance of the `SingleValueObjectValueConverter<TVO, TValue>` class using default factory resolution.

  • constructorSingleValueObjectValueConverter
    public SingleValueObjectValueConverter(Func<TValue, TVO> factory)

    Initializes a new instance of the `SingleValueObjectValueConverter<TVO, TValue>` class with a custom factory delegate.

    factory: Func<TValue, TVO>
    The delegate used to instantiate the value object from its underlying primitive value.

    Exceptions: ArgumentNullException: `factory` is `null`

class

StringValueObjectValueConverter<TVO>

Ensamblado: EricksonLopez.ValueObjects.EntityFrameworkCore
public class StringValueObjectValueConverter<TVO> : ValueConverter<TVO, string> where TVO : StringValueObject<TVO>
Hereda de: ValueConverter<TVO, string>

Provides an Entity Framework Core `ValueConverter<TModel, TProvider>` for `StringValueObject<TSelf>` types.

Notas:

Type parameters: TVO: The concrete StringValueObject type.

Miembros (2)

  • constructorStringValueObjectValueConverter
    public StringValueObjectValueConverter()

    Initializes a new instance of the `StringValueObjectValueConverter<TVO>` class using default factory resolution.

  • constructorStringValueObjectValueConverter
    public StringValueObjectValueConverter(Func<string, TVO> factory)

    Initializes a new instance of the `StringValueObjectValueConverter<TVO>` class with a custom factory delegate.

    factory: Func<string, TVO>
    The delegate used to instantiate the string value object from its underlying string value.

    Exceptions: ArgumentNullException: `factory` is `null`

class

TaxRateValueConverter

Ensamblado: EricksonLopez.ValueObjects.EntityFrameworkCore
public sealed class TaxRateValueConverter : ValueConverter<TaxRate, decimal>
Hereda de: ValueConverter<TaxRate, decimal>

Provides an Entity Framework Core `ValueConverter<TModel, TProvider>` for `TaxRate`.

Miembros (1)

  • constructorTaxRateValueConverter
    public TaxRateValueConverter()

    Initializes a new instance of the `TaxRateValueConverter` class.

EricksonLopez.ValueObjects.Fiscal.Argentina#

14
record

Cae

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct Cae : ISpanParsable<Cae>, IEquatable<Cae>
Implementa: IEquatable<Cae>, ISpanParsable<Cae>

Represents an Argentine CAE (Código de Autorización Electrónico) granted by ARCA/AFIP for standard electronic invoices (RG 4291/18). Structure: Exactly 14 numeric digits and an associated expiration date (`ExpirationDate`).

Miembros (13)

  • methodCreate
    public static Result<Cae> Create(ReadOnlySpan<char> input)

    Creates a validated `Cae` instance from a character span, which may be either a bare 14-digit code or a canonical formatted string with an expiration date (e.g. "12345678901234 (Vto: 2026-12-31)").

    input: ReadOnlySpan<char>
    The character span representing the authorization string.

    Retorna: A `Result<T>` containing the created `Cae` or a validation error.

  • methodCreate
    public static Result<Cae> Create(ReadOnlySpan<char> input, DateOnly expirationDate)

    Creates a validated `Cae` instance from a character span and an expiration date.

    input: ReadOnlySpan<char>
    The character span representing the 14-digit authorization code (bare or formatted).
    expirationDate: DateOnly
    The authorization expiration date.

    Retorna: A `Result<T>` containing the created `Cae` or a validation error.

  • methodCreate
    public static Result<Cae> Create(string? input)

    Creates a validated `Cae` instance from a string, which may be either a bare 14-digit code or a canonical formatted string with an expiration date (e.g. "12345678901234 (Vto: 2026-12-31)").

    input: string?
    The authorization string to validate and construct.

    Retorna: A `Result<T>` containing the created `Cae` or a validation error.

  • methodCreate
    public static Result<Cae> Create(string? code, DateOnly expirationDate)

    Creates a validated `Cae` instance from a 14-digit code and an expiration date.

    code: string?
    The 14-digit authorization code string (bare or formatted).
    expirationDate: DateOnly
    The authorization expiration date.

    Retorna: A `Result<T>` containing the created `Cae` or a validation error.

  • methodIsExpired
    public bool IsExpired(DateOnly currentDate)

    Determines whether this CAE authorization is expired relative to the specified date.

    currentDate: DateOnly
    The reference date to evaluate expiration against.

    Retorna: `true` if the authorization is expired; otherwise, `false`.

  • methodParse
    public static Cae Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Cae Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Cae result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Cae
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Cae result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Cae
  • propertyCode
    public string Code { get; }

    Gets the 14-digit CAE code.

  • propertyExpirationDate
    public DateOnly ExpirationDate { get; }

    Gets the authorization expiration date.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

record

Caea

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct Caea : ISpanParsable<Caea>, IEquatable<Caea>
Implementa: IEquatable<Caea>, ISpanParsable<Caea>

Represents an Argentine CAEA (Código de Autorización Electrónico Anticipado) granted by ARCA/AFIP for the anticipated authorization regime (RG 2926). Structure: Exactly 14 numeric digits and an associated expiration date.

Miembros (13)

  • methodCreate
    public static Result<Caea> Create(ReadOnlySpan<char> input)

    Creates a validated `Caea` instance from a character span, which may be either a bare 14-digit code or a canonical formatted string with an expiration date (e.g. "12345678901234 (Vto: 2026-12-31)").

    input: ReadOnlySpan<char>
    The character span representing the authorization string.

    Retorna: A `Result<T>` containing the created `Caea` or a validation error.

  • methodCreate
    public static Result<Caea> Create(ReadOnlySpan<char> input, DateOnly expirationDate)

    Creates a validated `Caea` instance from a character span and an expiration date.

    input: ReadOnlySpan<char>
    The character span representing the 14-digit authorization code (bare or formatted).
    expirationDate: DateOnly
    The authorization expiration date.

    Retorna: A `Result<T>` containing the created `Caea` or a validation error.

  • methodCreate
    public static Result<Caea> Create(string? input)

    Creates a validated `Caea` instance from a string, which may be either a bare 14-digit code or a canonical formatted string with an expiration date (e.g. "12345678901234 (Vto: 2026-12-31)").

    input: string?
    The authorization string to validate and construct.

    Retorna: A `Result<T>` containing the created `Caea` or a validation error.

  • methodCreate
    public static Result<Caea> Create(string? code, DateOnly expirationDate)

    Creates a validated `Caea` instance from a 14-digit code and an expiration date.

    code: string?
    The 14-digit authorization code string (bare or formatted).
    expirationDate: DateOnly
    The authorization expiration date.

    Retorna: A `Result<T>` containing the created `Caea` or a validation error.

  • methodIsExpired
    public bool IsExpired(DateOnly currentDate)

    Determines whether this CAEA authorization is expired relative to the specified date.

    currentDate: DateOnly
    The reference date to evaluate expiration against.

    Retorna: `true` if the authorization is expired; otherwise, `false`.

  • methodParse
    public static Caea Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Caea Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Caea result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Caea
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Caea result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Caea
  • propertyCode
    public string Code { get; }

    Gets the 14-digit CAEA code.

  • propertyExpirationDate
    public DateOnly ExpirationDate { get; }

    Gets the authorization expiration date.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

record

Cai

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct Cai : ISpanParsable<Cai>, IEquatable<Cai>
Implementa: IEquatable<Cai>, ISpanParsable<Cai>

Represents an Argentine CAI (Código de Autorización de Impresión) for traditional paper/pre-printed backup vouchers (RG 100/98). Structure: Exactly 14 numeric digits and an associated expiration date.

Miembros (13)

  • methodCreate
    public static Result<Cai> Create(ReadOnlySpan<char> input)

    Creates a validated `Cai` instance from a character span, which may be either a bare 14-digit code or a canonical formatted string with an expiration date (e.g. "12345678901234 (Vto: 2026-12-31)").

    input: ReadOnlySpan<char>
    The character span representing the authorization string.

    Retorna: A `Result<T>` containing the created `Cai` or a validation error.

  • methodCreate
    public static Result<Cai> Create(ReadOnlySpan<char> input, DateOnly expirationDate)

    Creates a validated `Cai` instance from a character span and an expiration date.

    input: ReadOnlySpan<char>
    The character span representing the 14-digit authorization code (bare or formatted).
    expirationDate: DateOnly
    The authorization expiration date.

    Retorna: A `Result<T>` containing the created `Cai` or a validation error.

  • methodCreate
    public static Result<Cai> Create(string? input)

    Creates a validated `Cai` instance from a string, which may be either a bare 14-digit code or a canonical formatted string with an expiration date (e.g. "12345678901234 (Vto: 2026-12-31)").

    input: string?
    The authorization string to validate and construct.

    Retorna: A `Result<T>` containing the created `Cai` or a validation error.

  • methodCreate
    public static Result<Cai> Create(string? code, DateOnly expirationDate)

    Creates a validated `Cai` instance from a 14-digit code and an expiration date.

    code: string?
    The 14-digit authorization code string (bare or formatted).
    expirationDate: DateOnly
    The authorization expiration date.

    Retorna: A `Result<T>` containing the created `Cai` or a validation error.

  • methodIsExpired
    public bool IsExpired(DateOnly currentDate)

    Determines whether this CAI authorization is expired relative to the specified date.

    currentDate: DateOnly
    The reference date to evaluate expiration against.

    Retorna: `true` if the authorization is expired; otherwise, `false`.

  • methodParse
    public static Cai Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Cai Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Cai result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Cai
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Cai result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Cai
  • propertyCode
    public string Code { get; }

    Gets the 14-digit CAI code.

  • propertyExpirationDate
    public DateOnly ExpirationDate { get; }

    Gets the authorization expiration date.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

record

Cbu

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct Cbu : ISpanParsable<Cbu>, IUtf8SpanParsable<Cbu>, IComparable<Cbu>
Implementa: IComparable<Cbu>, ISpanParsable<Cbu>, IUtf8SpanParsable<Cbu>

Represents an Argentine CBU (Clave Bancaria Uniforme) standardized by the Central Bank of Argentina (BCRA Comunicación "A" 2622). Structure: Exactly 22 numeric digits divided into two blocks with double Modulo 10 check digits: - **Block 1 (8 digits)**: Bank Code (3), Branch Code (4), Check Digit 1 (1) weighted by `[7, 1, 3, 9, 7, 1, 3]`. - **Block 2 (14 digits)**: Account Identifier (13), Check Digit 2 (1) weighted by `[3, 9, 7, 1, 3, 9, 7, 1, 3, 9, 7, 1, 3]`.

Miembros (21)

  • methodCalculateBlock1CheckDigit
    public static int CalculateBlock1CheckDigit(ReadOnlySpan<char> digits7)

    Computes the Modulo 10 check digit for the first 7 digits (Bank + Branch).

    digits7: ReadOnlySpan<char>
    A 7-character span containing the bank and branch digits.

    Retorna: The computed check digit (0 to 9).

  • methodCalculateBlock2CheckDigit
    public static int CalculateBlock2CheckDigit(ReadOnlySpan<char> digits13)

    Computes the Modulo 10 check digit for the middle 13 digits (Account).

    digits13: ReadOnlySpan<char>
    A 13-character span containing the account identifier digits.

    Retorna: The computed check digit (0 to 9).

  • methodCompareTo
    public int CompareTo(Cbu other)

    Inherits documentation from base type or interface.

    other: Cbu
  • methodCreate
    public static Result<Cbu> Create(ReadOnlySpan<char> input)

    Creates a validated `Cbu` from a character span.

    input: ReadOnlySpan<char>
    A character span containing the 22-digit CBU digits.

    Retorna: A `Result<Cbu>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Cbu> Create(string? value)

    Creates a validated `Cbu` from a 22-digit numeric string.

    value: string?
    The 22-digit CBU string, optionally containing hyphens or spaces that will be stripped.

    Retorna: A `Result<Cbu>` containing the validated instance or a domain validation error.

  • methodParse
    public static Cbu Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
  • methodParse
    public static Cbu Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Cbu Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out Cbu result)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
    result: out Cbu
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Cbu result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Cbu
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Cbu result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Cbu
  • methodoperator <
    public static bool operator <(Cbu left, Cbu right)

    Determines whether the left `Cbu` is less than the right `Cbu`.

    left: Cbu
    The first `Cbu` to compare.
    right: Cbu
    The second `Cbu` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Cbu left, Cbu right)

    Determines whether the left `Cbu` is less than or equal to the right `Cbu`.

    left: Cbu
    The first `Cbu` to compare.
    right: Cbu
    The second `Cbu` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Cbu left, Cbu right)

    Determines whether the left `Cbu` is greater than the right `Cbu`.

    left: Cbu
    The first `Cbu` to compare.
    right: Cbu
    The second `Cbu` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Cbu left, Cbu right)

    Determines whether the left `Cbu` is greater than or equal to the right `Cbu`.

    left: Cbu
    The first `Cbu` to compare.
    right: Cbu
    The second `Cbu` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyAccountNumber
    public string AccountNumber { get; }

    Gets the 13-digit account identifier.

  • propertyBankCode
    public string BankCode { get; }

    Gets the 3-digit bank code.

  • propertyBranchCode
    public string BranchCode { get; }

    Gets the 4-digit branch code.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Cbu` instance was initialized through a factory rather than `default(Cbu)`.

  • propertyValue
    public string Value { get; }

    Gets the raw 22-digit CBU string.

record

Cdi

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct Cdi : ISpanParsable<Cdi>, IComparable<Cdi>
Implementa: IComparable<Cdi>, ISpanParsable<Cdi>

Represents an Argentine CDI (Clave de Identificación) issued by ARCA/AFIP to individuals or entities who do not have a CUIT or CUIL (e.g. non-residents opening bank accounts or acquiring property).

Miembros (15)

  • methodCompareTo
    public int CompareTo(Cdi other)

    Inherits documentation from base type or interface.

    other: Cdi
  • methodCreate
    public static Result<Cdi> Create(ReadOnlySpan<char> input)

    Creates a validated `Cdi` from a character span.

    input: ReadOnlySpan<char>
    A character span containing the raw or formatted CDI digits.

    Retorna: A `Result<Cdi>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Cdi> Create(string? value)

    Creates a validated `Cdi` from an 11-digit raw string or formatted `XX-XXXXXXXX-X`.

    value: string?
    The raw or formatted 11-digit CDI string.

    Retorna: A `Result<Cdi>` containing the validated instance or a domain validation error.

  • methodParse
    public static Cdi Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Cdi Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Cdi result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Cdi
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Cdi result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Cdi
  • methodoperator <
    public static bool operator <(Cdi left, Cdi right)

    Determines whether the left `Cdi` is less than the right `Cdi`.

    left: Cdi
    The first `Cdi` to compare.
    right: Cdi
    The second `Cdi` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Cdi left, Cdi right)

    Determines whether the left `Cdi` is less than or equal to the right `Cdi`.

    left: Cdi
    The first `Cdi` to compare.
    right: Cdi
    The second `Cdi` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Cdi left, Cdi right)

    Determines whether the left `Cdi` is greater than the right `Cdi`.

    left: Cdi
    The first `Cdi` to compare.
    right: Cdi
    The second `Cdi` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Cdi left, Cdi right)

    Determines whether the left `Cdi` is greater than or equal to the right `Cdi`.

    left: Cdi
    The first `Cdi` to compare.
    right: Cdi
    The second `Cdi` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyFormatted
    public string Formatted { get; }

    Formats the CDI in standard format: `XX-XXXXXXXX-X`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

  • propertyValue
    public string Value { get; }

    Gets the raw 11-digit numeric value of the CDI.

record

Cuil

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct Cuil : ISpanParsable<Cuil>, IUtf8SpanParsable<Cuil>, IComparable<Cuil>
Implementa: IComparable<Cuil>, ISpanParsable<Cuil>, IUtf8SpanParsable<Cuil>

Represents an Argentine CUIL (Código Único de Identificación Laboral) administered by ANSES and ARCA for individuals in labor, social security, and tax relationships. Structure: Exactly 11 numeric digits structured as `XY-XXXXXXXX-Z` with personal prefixes `20, 23, 24, 27`.

Miembros (18)

  • methodCompareTo
    public int CompareTo(Cuil other)

    Inherits documentation from base type or interface.

    other: Cuil
  • methodCreate
    public static Result<Cuil> Create(ReadOnlySpan<char> input)

    Creates a validated `Cuil` from a character span.

    input: ReadOnlySpan<char>
    A character span containing the raw or formatted CUIL digits.

    Retorna: A `Result<Cuil>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Cuil> Create(string? value)

    Creates a validated `Cuil` from an 11-digit raw string or formatted `XX-XXXXXXXX-X`.

    value: string?
    The raw or formatted 11-digit CUIL string.

    Retorna: A `Result<Cuil>` containing the validated instance or a domain validation error.

  • methodParse
    public static Cuil Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
  • methodParse
    public static Cuil Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Cuil Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out Cuil result)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
    result: out Cuil
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Cuil result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Cuil
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Cuil result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Cuil
  • methodoperator <
    public static bool operator <(Cuil left, Cuil right)

    Determines whether the left `Cuil` is less than the right `Cuil`.

    left: Cuil
    The first `Cuil` to compare.
    right: Cuil
    The second `Cuil` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Cuil left, Cuil right)

    Determines whether the left `Cuil` is less than or equal to the right `Cuil`.

    left: Cuil
    The first `Cuil` to compare.
    right: Cuil
    The second `Cuil` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Cuil left, Cuil right)

    Determines whether the left `Cuil` is greater than the right `Cuil`.

    left: Cuil
    The first `Cuil` to compare.
    right: Cuil
    The second `Cuil` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Cuil left, Cuil right)

    Determines whether the left `Cuil` is greater than or equal to the right `Cuil`.

    left: Cuil
    The first `Cuil` to compare.
    right: Cuil
    The second `Cuil` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyAsCuit
    public Cuit AsCuit { get; }

    Gets the underlying `Cuit` representation.

  • propertyFormatted
    public string Formatted { get; }

    Formats the CUIL in standard format: `XX-XXXXXXXX-X`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

  • propertyValue
    public string Value { get; }

    Gets the raw 11-digit numeric value of the CUIL.

record

Cuit

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct Cuit : ISpanParsable<Cuit>, IUtf8SpanParsable<Cuit>, IComparable<Cuit>
Implementa: IComparable<Cuit>, ISpanParsable<Cuit>, IUtf8SpanParsable<Cuit>

Represents an Argentine CUIT (Clave Única de Identificación Tributaria) administered by ARCA (Agencia de Recaudación y Control Aduanero, formerly AFIP). Structure: Exactly 11 numeric digits structured as `XY-XXXXXXXX-Z`: - **XY (Prefix)**: 20, 23, 24, 27 (Physical persons) or 30, 33, 34 (Legal entities). - **XXXXXXXX (Document)**: 8-digit national identity number or corporate registration. - **Z (Check digit)**: Modulo 11 verification digit computed with weights `[5, 4, 3, 2, 7, 6, 5, 4, 3, 2]`.

Miembros (23)

  • methodCalculateVerificationDigit
    public static int CalculateVerificationDigit(ReadOnlySpan<char> first10Digits)

    Calculates the Modulo 11 check digit for the first 10 digits of a CUIT.

    first10Digits: ReadOnlySpan<char>
    A 10-character span containing the first 10 CUIT digits.

    Retorna: The computed Modulo 11 verification digit (0 to 9).

  • methodCompareTo
    public int CompareTo(Cuit other)

    Inherits documentation from base type or interface.

    other: Cuit
  • methodCreate
    public static Result<Cuit> Create(ReadOnlySpan<char> input)

    Creates a validated `Cuit` from a character span.

    input: ReadOnlySpan<char>
    A character span containing the raw or formatted CUIT digits.

    Retorna: A `Result<Cuit>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Cuit> Create(string? value)

    Creates a validated `Cuit` from an 11-digit raw string or formatted `XX-XXXXXXXX-X`.

    value: string?
    The raw or formatted 11-digit CUIT string.

    Retorna: A `Result<Cuit>` containing the validated instance or a domain validation error.

  • methodParse
    public static Cuit Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
  • methodParse
    public static Cuit Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Cuit Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out Cuit result)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
    result: out Cuit
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Cuit result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Cuit
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Cuit result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Cuit
  • methodoperator <
    public static bool operator <(Cuit left, Cuit right)

    Determines whether the left `Cuit` is less than the right `Cuit`.

    left: Cuit
    The first `Cuit` to compare.
    right: Cuit
    The second `Cuit` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Cuit left, Cuit right)

    Determines whether the left `Cuit` is less than or equal to the right `Cuit`.

    left: Cuit
    The first `Cuit` to compare.
    right: Cuit
    The second `Cuit` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Cuit left, Cuit right)

    Determines whether the left `Cuit` is greater than the right `Cuit`.

    left: Cuit
    The first `Cuit` to compare.
    right: Cuit
    The second `Cuit` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Cuit left, Cuit right)

    Determines whether the left `Cuit` is greater than or equal to the right `Cuit`.

    left: Cuit
    The first `Cuit` to compare.
    right: Cuit
    The second `Cuit` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyDocumentNumber
    public string DocumentNumber { get; }

    Gets the middle 8-digit document sequence.

  • propertyFormatted
    public string Formatted { get; }

    Formats the CUIT in its standard canonical ARCA format: `XX-XXXXXXXX-X`.

  • propertyIsCompany
    public bool IsCompany { get; }

    Gets a value indicating whether this CUIT belongs to a legal entity (prefixes 30, 33, 34).

  • propertyIsIndividual
    public bool IsIndividual { get; }

    Gets a value indicating whether this CUIT belongs to a physical person (prefixes 20, 23, 24, 27).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

  • propertyTypePrefix
    public int TypePrefix { get; }

    Gets the 2-digit type prefix (e.g. 20, 27, 30).

  • propertyValue
    public string Value { get; }

    Gets the raw 11-digit numeric value of the CUIT.

  • propertyVerificationDigit
    public int VerificationDigit { get; }

    Gets the verification check digit.

record

Cvu

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct Cvu : ISpanParsable<Cvu>, IUtf8SpanParsable<Cvu>, IComparable<Cvu>
Implementa: IComparable<Cvu>, ISpanParsable<Cvu>, IUtf8SpanParsable<Cvu>

Represents an Argentine CVU (Clave Virtual Uniforme) standardized by the Central Bank of Argentina (BCRA Comunicación "A" 6586) for Payment Service Providers (PSP / Fintechs). Structure: Exactly 22 numeric digits starting with `"000"` (PSP identifier), structured into two blocks with double Modulo 10 verification check digits.

Miembros (18)

  • methodCompareTo
    public int CompareTo(Cvu other)

    Inherits documentation from base type or interface.

    other: Cvu
  • methodCreate
    public static Result<Cvu> Create(ReadOnlySpan<char> input)

    Creates a validated `Cvu` from a character span.

    input: ReadOnlySpan<char>
    A character span containing the 22-digit CVU digits.

    Retorna: A `Result<Cvu>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Cvu> Create(string? value)

    Creates a validated `Cvu` from a 22-digit numeric string.

    value: string?
    The 22-digit CVU string starting with `"000"`.

    Retorna: A `Result<Cvu>` containing the validated instance or a domain validation error.

  • methodParse
    public static Cvu Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
  • methodParse
    public static Cvu Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Cvu Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out Cvu result)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
    result: out Cvu
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Cvu result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Cvu
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Cvu result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Cvu
  • methodoperator <
    public static bool operator <(Cvu left, Cvu right)

    Determines whether the left `Cvu` is less than the right `Cvu`.

    left: Cvu
    The first `Cvu` to compare.
    right: Cvu
    The second `Cvu` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Cvu left, Cvu right)

    Determines whether the left `Cvu` is less than or equal to the right `Cvu`.

    left: Cvu
    The first `Cvu` to compare.
    right: Cvu
    The second `Cvu` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Cvu left, Cvu right)

    Determines whether the left `Cvu` is greater than the right `Cvu`.

    left: Cvu
    The first `Cvu` to compare.
    right: Cvu
    The second `Cvu` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Cvu left, Cvu right)

    Determines whether the left `Cvu` is greater than or equal to the right `Cvu`.

    left: Cvu
    The first `Cvu` to compare.
    right: Cvu
    The second `Cvu` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyAccountNumber
    public string AccountNumber { get; }

    Gets the 14-digit virtual account block.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Cvu` instance was initialized through a factory rather than `default(Cvu)`.

  • propertyPspCode
    public string PspCode { get; }

    Gets the 8-digit PSP routing block.

  • propertyValue
    public string Value { get; }

    Gets the raw 22-digit CVU string.

record

JurisdictionCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct JurisdictionCode : ISpanParsable<JurisdictionCode>, IComparable<JurisdictionCode>
Implementa: IComparable<JurisdictionCode>, ISpanParsable<JurisdictionCode>

Represents an Argentine Provincial Tax Jurisdiction Code (Código de Jurisdicción SIFERE / Convenio Multilateral). Range: Strictly between `901` (CABA) and `924` (Tucumán).

Miembros (21)

  • methodCompareTo
    public int CompareTo(JurisdictionCode other)

    Inherits documentation from base type or interface.

    other: JurisdictionCode
  • methodCreate
    public static Result<JurisdictionCode> Create(ReadOnlySpan<char> input)

    Creates a validated `JurisdictionCode` from a text span. Accepts bare code ("901") or canonical formatted string ("901 - Ciudad Autónoma de Buenos Aires").

    input: ReadOnlySpan<char>
    A character span containing the numeric jurisdiction code or canonical string.

    Retorna: A `Result<JurisdictionCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<JurisdictionCode> Create(int code)

    Creates a validated `JurisdictionCode` from an integer value.

    code: int
    The 3-digit integer jurisdiction code (between 901 and 924).

    Retorna: A `Result<JurisdictionCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<JurisdictionCode> Create(string? input)

    Creates a validated `JurisdictionCode` from a nullable string.

    input: string?
    A string containing the numeric jurisdiction code.

    Retorna: A `Result<JurisdictionCode>` containing the validated instance or a domain validation error.

  • methodParse
    public static JurisdictionCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static JurisdictionCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out JurisdictionCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out JurisdictionCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out JurisdictionCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out JurisdictionCode
  • methodoperator <
    public static bool operator <(JurisdictionCode left, JurisdictionCode right)

    Determines whether the left `JurisdictionCode` is less than the right `JurisdictionCode`.

    left: JurisdictionCode
    The first `JurisdictionCode` to compare.
    right: JurisdictionCode
    The second `JurisdictionCode` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(JurisdictionCode left, JurisdictionCode right)

    Determines whether the left `JurisdictionCode` is less than or equal to the right `JurisdictionCode`.

    left: JurisdictionCode
    The first `JurisdictionCode` to compare.
    right: JurisdictionCode
    The second `JurisdictionCode` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(JurisdictionCode left, JurisdictionCode right)

    Determines whether the left `JurisdictionCode` is greater than the right `JurisdictionCode`.

    left: JurisdictionCode
    The first `JurisdictionCode` to compare.
    right: JurisdictionCode
    The second `JurisdictionCode` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(JurisdictionCode left, JurisdictionCode right)

    Determines whether the left `JurisdictionCode` is greater than or equal to the right `JurisdictionCode`.

    left: JurisdictionCode
    The first `JurisdictionCode` to compare.
    right: JurisdictionCode
    The second `JurisdictionCode` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyBuenosAires
    public static JurisdictionCode BuenosAires { get; }

    Gets the Buenos Aires province jurisdiction (902).

  • propertyCaba
    public static JurisdictionCode Caba { get; }

    Gets the Ciudad Autónoma de Buenos Aires jurisdiction (901).

  • propertyCode
    public int Code { get; }

    Gets the 3-digit integer jurisdiction code (e.g. 901).

  • propertyCordoba
    public static JurisdictionCode Cordoba { get; }

    Gets the Córdoba province jurisdiction (904).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `JurisdictionCode` instance was initialized through a factory rather than `default(JurisdictionCode)`.

  • propertyMendoza
    public static JurisdictionCode Mendoza { get; }

    Gets the Mendoza province jurisdiction (913).

  • propertyName
    public string Name { get; }

    Gets the jurisdiction name.

  • propertySantaFe
    public static JurisdictionCode SantaFe { get; }

    Gets the Santa Fe province jurisdiction (921).

record

PointOfSale

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct PointOfSale : ISpanParsable<PointOfSale>, IComparable<PointOfSale>
Implementa: IComparable<PointOfSale>, ISpanParsable<PointOfSale>

Represents an Argentine Fiscal Point of Sale (Punto de Venta) registered before ARCA/AFIP (Resolución General 1415/2003). Rules: Numeric value strictly between 1 and 99,999. Standard format is 5 digits zero-padded (`00001`).

Miembros (16)

  • methodCompareTo
    public int CompareTo(PointOfSale other)

    Inherits documentation from base type or interface.

    other: PointOfSale
  • methodCreate
    public static Result<PointOfSale> Create(ReadOnlySpan<char> input)

    Creates a validated `PointOfSale` from a numeric text span.

    input: ReadOnlySpan<char>
    A character span containing the numeric point of sale value.

    Retorna: A `Result<PointOfSale>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<PointOfSale> Create(int value)

    Creates a validated `PointOfSale` from an integer value.

    value: int
    The point of sale integer value (between 1 and 99,999).

    Retorna: A `Result<PointOfSale>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<PointOfSale> Create(string? input)

    Creates a validated `PointOfSale` from a nullable string.

    input: string?
    A string containing the numeric point of sale value.

    Retorna: A `Result<PointOfSale>` containing the validated instance or a domain validation error.

  • methodParse
    public static PointOfSale Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static PointOfSale Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out PointOfSale result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out PointOfSale
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out PointOfSale result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out PointOfSale
  • methodoperator <
    public static bool operator <(PointOfSale left, PointOfSale right)

    Determines whether the left `PointOfSale` is less than the right `PointOfSale`.

    left: PointOfSale
    The first `PointOfSale` to compare.
    right: PointOfSale
    The second `PointOfSale` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(PointOfSale left, PointOfSale right)

    Determines whether the left `PointOfSale` is less than or equal to the right `PointOfSale`.

    left: PointOfSale
    The first `PointOfSale` to compare.
    right: PointOfSale
    The second `PointOfSale` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(PointOfSale left, PointOfSale right)

    Determines whether the left `PointOfSale` is greater than the right `PointOfSale`.

    left: PointOfSale
    The first `PointOfSale` to compare.
    right: PointOfSale
    The second `PointOfSale` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(PointOfSale left, PointOfSale right)

    Determines whether the left `PointOfSale` is greater than or equal to the right `PointOfSale`.

    left: PointOfSale
    The first `PointOfSale` to compare.
    right: PointOfSale
    The second `PointOfSale` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyFormatted
    public string Formatted { get; }

    Formats the point of sale as a 5-digit zero-padded string (`00001`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `PointOfSale` instance was initialized through a factory rather than `default(PointOfSale)`.

  • propertyValue
    public int Value { get; }

    Gets the integer value of the point of sale.

record

VatRate

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct VatRate : ISpanParsable<VatRate>, IComparable<VatRate>
Implementa: IComparable<VatRate>, ISpanParsable<VatRate>

Represents a statutory Argentine VAT Rate (Alícuota de IVA) under the Value Added Tax Law (Ley de Impuesto al Valor Agregado N° 23.349, Art. 28). Legal Rates: - **0%**: Exempt / Not subject (Exento / No alcanzado) - **2.5%**: Differential rate for capital goods (Alícuota diferencial bienes de capital) - **5%**: Special reduced rate (Alícuota reducida especial) - **10.5%**: Reduced rate (foodstuffs, artwork, capital goods) (Alícuota reducida) - **21%**: Standard general rate (Alícuota general) - **27%**: Increased rate (utilities, telecommunications, energy) (Alícuota incrementada) .

Miembros (23)

  • methodCompareTo
    public int CompareTo(VatRate other)

    Inherits documentation from base type or interface.

    other: VatRate
  • methodCreate
    public static Result<VatRate> Create(ReadOnlySpan<char> input)

    Creates a validated `VatRate` from a text span.

    input: ReadOnlySpan<char>
    A character span containing the percentage value, optionally suffixed with `%`.

    Retorna: A `Result<VatRate>` containing the matched statutory rate or a validation error.

  • methodCreate
    public static Result<VatRate> Create(decimal percentage)

    Creates a validated `VatRate` from a numeric percentage.

    percentage: decimal
    The statutory VAT percentage (0, 2.5, 5, 10.5, 21, or 27).

    Retorna: A `Result<VatRate>` containing the matched statutory rate or a validation error.

  • methodCreate
    public static Result<VatRate> Create(string? input)

    Creates a validated `VatRate` from a nullable string.

    input: string?
    A string containing the percentage value, optionally suffixed with `%`.

    Retorna: A `Result<VatRate>` containing the matched statutory rate or a validation error.

  • methodParse
    public static VatRate Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static VatRate Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out VatRate result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out VatRate
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out VatRate result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out VatRate
  • methodoperator <
    public static bool operator <(VatRate left, VatRate right)

    Determines whether the left `VatRate` is less than the right `VatRate`.

    left: VatRate
    The first `VatRate` to compare.
    right: VatRate
    The second `VatRate` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(VatRate left, VatRate right)

    Determines whether the left `VatRate` is less than or equal to the right `VatRate`.

    left: VatRate
    The first `VatRate` to compare.
    right: VatRate
    The second `VatRate` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(VatRate left, VatRate right)

    Determines whether the left `VatRate` is greater than the right `VatRate`.

    left: VatRate
    The first `VatRate` to compare.
    right: VatRate
    The second `VatRate` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(VatRate left, VatRate right)

    Determines whether the left `VatRate` is greater than or equal to the right `VatRate`.

    left: VatRate
    The first `VatRate` to compare.
    right: VatRate
    The second `VatRate` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyDescription
    public string Description { get; }

    Gets the official rate description.

  • propertyFraction
    public decimal Fraction { get; }

    Gets the fractional rate for direct calculation (e.g. 0.21m).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `VatRate` instance was initialized through a factory rather than `default(VatRate)`.

  • propertyPercentage
    public decimal Percentage { get; }

    Gets the decimal percentage value (e.g. 21m).

  • propertyRate10_5
    public static VatRate Rate10_5 { get; }

    Gets the 10.5% reduced VAT rate.

  • propertyRate21
    public static VatRate Rate21 { get; }

    Gets the 21% standard general VAT rate.

  • propertyRate27
    public static VatRate Rate27 { get; }

    Gets the 27% increased VAT rate for utilities.

  • propertyRate2_5
    public static VatRate Rate2_5 { get; }

    Gets the 2.5% differential VAT rate.

  • propertyRate5
    public static VatRate Rate5 { get; }

    Gets the 5% special reduced VAT rate.

  • propertyZero
    public static VatRate Zero { get; }

    Gets the 0% exempt VAT rate.

record

VoucherLetter

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct VoucherLetter : ISpanParsable<VoucherLetter>, IComparable<VoucherLetter>
Implementa: IComparable<VoucherLetter>, ISpanParsable<VoucherLetter>

Represents an Argentine Fiscal Voucher Class Letter (Letra de Comprobante: A, B, C, E, M, T, R) defined by ARCA/AFIP (Resolución General 1415/2003).

Miembros (22)

  • methodCompareTo
    public int CompareTo(VoucherLetter other)

    Inherits documentation from base type or interface.

    other: VoucherLetter
  • methodCreate
    public static Result<VoucherLetter> Create(ReadOnlySpan<char> input)

    Creates a validated `VoucherLetter` from a text span.

    input: ReadOnlySpan<char>
    A character span containing a single voucher letter character.

    Retorna: A `Result<VoucherLetter>` containing the matched letter or a domain validation error.

  • methodCreate
    public static Result<VoucherLetter> Create(char letter)

    Creates a validated `VoucherLetter` from a character.

    letter: char
    The voucher class letter character (A, B, C, E, M, T, or R).

    Retorna: A `Result<VoucherLetter>` containing the matched letter or a domain validation error.

  • methodCreate
    public static Result<VoucherLetter> Create(string? input)

    Creates a validated `VoucherLetter` from a nullable string.

    input: string?
    A string containing a single voucher letter character.

    Retorna: A `Result<VoucherLetter>` containing the matched letter or a domain validation error.

  • methodParse
    public static VoucherLetter Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static VoucherLetter Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out VoucherLetter result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out VoucherLetter
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out VoucherLetter result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out VoucherLetter
  • methodoperator <
    public static bool operator <(VoucherLetter left, VoucherLetter right)

    Determines whether the left `VoucherLetter` is less than the right `VoucherLetter`.

    left: VoucherLetter
    The first `VoucherLetter` to compare.
    right: VoucherLetter
    The second `VoucherLetter` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(VoucherLetter left, VoucherLetter right)

    Determines whether the left `VoucherLetter` is less than or equal to the right `VoucherLetter`.

    left: VoucherLetter
    The first `VoucherLetter` to compare.
    right: VoucherLetter
    The second `VoucherLetter` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(VoucherLetter left, VoucherLetter right)

    Determines whether the left `VoucherLetter` is greater than the right `VoucherLetter`.

    left: VoucherLetter
    The first `VoucherLetter` to compare.
    right: VoucherLetter
    The second `VoucherLetter` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(VoucherLetter left, VoucherLetter right)

    Determines whether the left `VoucherLetter` is greater than or equal to the right `VoucherLetter`.

    left: VoucherLetter
    The first `VoucherLetter` to compare.
    right: VoucherLetter
    The second `VoucherLetter` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyA
    public static VoucherLetter A { get; }

    Gets voucher letter 'A'.

  • propertyB
    public static VoucherLetter B { get; }

    Gets voucher letter 'B'.

  • propertyC
    public static VoucherLetter C { get; }

    Gets voucher letter 'C'.

  • propertyE
    public static VoucherLetter E { get; }

    Gets voucher letter 'E'.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `VoucherLetter` instance was initialized through a factory rather than `default(VoucherLetter)`.

  • propertyLetter
    public char Letter { get; }

    Gets the character representation of the voucher letter.

  • propertyM
    public static VoucherLetter M { get; }

    Gets voucher letter 'M'.

  • propertyR
    public static VoucherLetter R { get; }

    Gets voucher letter 'R'.

  • propertyT
    public static VoucherLetter T { get; }

    Gets voucher letter 'T'.

record

VoucherNumber

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct VoucherNumber : ISpanParsable<VoucherNumber>, IComparable<VoucherNumber>
Implementa: IComparable<VoucherNumber>, ISpanParsable<VoucherNumber>

Represents an Argentine Fiscal Voucher Sequential Number (Número de Comprobante) authorized by ARCA/AFIP (Resolución General 1415/2003). Rules: Numeric value strictly between 1 and 99,999,999. Standard format is 8 digits zero-padded (`00000001`).

Miembros (16)

  • methodCompareTo
    public int CompareTo(VoucherNumber other)

    Inherits documentation from base type or interface.

    other: VoucherNumber
  • methodCreate
    public static Result<VoucherNumber> Create(ReadOnlySpan<char> input)

    Creates a validated `VoucherNumber` from a numeric text span.

    input: ReadOnlySpan<char>
    A character span containing the numeric voucher number.

    Retorna: A `Result<VoucherNumber>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<VoucherNumber> Create(int value)

    Creates a validated `VoucherNumber` from an integer value.

    value: int
    The sequential voucher number (between 1 and 99,999,999).

    Retorna: A `Result<VoucherNumber>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<VoucherNumber> Create(string? input)

    Creates a validated `VoucherNumber` from a nullable string.

    input: string?
    A string containing the numeric voucher number.

    Retorna: A `Result<VoucherNumber>` containing the validated instance or a domain validation error.

  • methodParse
    public static VoucherNumber Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static VoucherNumber Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out VoucherNumber result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out VoucherNumber
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out VoucherNumber result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out VoucherNumber
  • methodoperator <
    public static bool operator <(VoucherNumber left, VoucherNumber right)

    Determines whether the left `VoucherNumber` is less than the right `VoucherNumber`.

    left: VoucherNumber
    The first `VoucherNumber` to compare.
    right: VoucherNumber
    The second `VoucherNumber` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(VoucherNumber left, VoucherNumber right)

    Determines whether the left `VoucherNumber` is less than or equal to the right `VoucherNumber`.

    left: VoucherNumber
    The first `VoucherNumber` to compare.
    right: VoucherNumber
    The second `VoucherNumber` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(VoucherNumber left, VoucherNumber right)

    Determines whether the left `VoucherNumber` is greater than the right `VoucherNumber`.

    left: VoucherNumber
    The first `VoucherNumber` to compare.
    right: VoucherNumber
    The second `VoucherNumber` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(VoucherNumber left, VoucherNumber right)

    Determines whether the left `VoucherNumber` is greater than or equal to the right `VoucherNumber`.

    left: VoucherNumber
    The first `VoucherNumber` to compare.
    right: VoucherNumber
    The second `VoucherNumber` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyFormatted
    public string Formatted { get; }

    Formats the voucher number as an 8-digit zero-padded string (`00000001`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `VoucherNumber` instance was initialized through a factory rather than `default(VoucherNumber)`.

  • propertyValue
    public int Value { get; }

    Gets the integer sequential value.

record

VoucherType

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Argentina
public readonly record struct VoucherType : ISpanParsable<VoucherType>, IComparable<VoucherType>
Implementa: IComparable<VoucherType>, ISpanParsable<VoucherType>

Represents an official ARCA/AFIP Voucher Type Code (Tipo de Comprobante, Tabla AFIP). Common Types: - **1**: Factura A - **2**: Nota de Débito A - **3**: Nota de Crédito A - **6**: Factura B - **7**: Nota de Débito B - **8**: Nota de Crédito B - **11**: Factura C - **12**: Nota de Débito C - **13**: Nota de Crédito C - **19**: Factura de Exportación E - **201**: Factura de Crédito Electrónica MiPyME A - **206**: Factura de Crédito Electrónica MiPyME B - **211**: Factura de Crédito Electrónica MiPyME C .

Miembros (30)

  • methodCompareTo
    public int CompareTo(VoucherType other)

    Inherits documentation from base type or interface.

    other: VoucherType
  • methodCreate
    public static Result<VoucherType> Create(ReadOnlySpan<char> input)

    Creates a validated `VoucherType` from a numeric text span. Accepts bare code ("1") or canonical formatted string ("1 - Factura A").

    input: ReadOnlySpan<char>
    A character span containing the numeric voucher type code or canonical string.

    Retorna: A `Result<VoucherType>` containing the matched type or a domain validation error.

  • methodCreate
    public static Result<VoucherType> Create(int code)

    Creates a validated `VoucherType` from an integer code.

    code: int
    The integer ARCA/AFIP voucher type code.

    Retorna: A `Result<VoucherType>` containing the matched type or a domain validation error.

  • methodCreate
    public static Result<VoucherType> Create(string? input)

    Creates a validated `VoucherType` from a nullable string.

    input: string?
    A string containing the numeric voucher type code.

    Retorna: A `Result<VoucherType>` containing the matched type or a domain validation error.

  • methodParse
    public static VoucherType Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static VoucherType Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out VoucherType result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out VoucherType
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out VoucherType result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out VoucherType
  • methodoperator <
    public static bool operator <(VoucherType left, VoucherType right)

    Determines whether the left `VoucherType` is less than the right `VoucherType`.

    left: VoucherType
    The first `VoucherType` to compare.
    right: VoucherType
    The second `VoucherType` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(VoucherType left, VoucherType right)

    Determines whether the left `VoucherType` is less than or equal to the right `VoucherType`.

    left: VoucherType
    The first `VoucherType` to compare.
    right: VoucherType
    The second `VoucherType` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(VoucherType left, VoucherType right)

    Determines whether the left `VoucherType` is greater than the right `VoucherType`.

    left: VoucherType
    The first `VoucherType` to compare.
    right: VoucherType
    The second `VoucherType` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(VoucherType left, VoucherType right)

    Determines whether the left `VoucherType` is greater than or equal to the right `VoucherType`.

    left: VoucherType
    The first `VoucherType` to compare.
    right: VoucherType
    The second `VoucherType` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCode
    public int Code { get; }

    Gets the integer ARCA voucher type code.

  • propertyCreditNoteA
    public static VoucherType CreditNoteA { get; }

    Gets voucher type Nota de Crédito A (3).

  • propertyCreditNoteB
    public static VoucherType CreditNoteB { get; }

    Gets voucher type Nota de Crédito B (8).

  • propertyCreditNoteC
    public static VoucherType CreditNoteC { get; }

    Gets voucher type Nota de Crédito C (13).

  • propertyDebitNoteA
    public static VoucherType DebitNoteA { get; }

    Gets voucher type Nota de Débito A (2).

  • propertyDebitNoteB
    public static VoucherType DebitNoteB { get; }

    Gets voucher type Nota de Débito B (7).

  • propertyDebitNoteC
    public static VoucherType DebitNoteC { get; }

    Gets voucher type Nota de Débito C (12).

  • propertyDescription
    public string Description { get; }

    Gets the official description.

  • propertyFceInvoiceA
    public static VoucherType FceInvoiceA { get; }

    Gets voucher type Factura de Crédito Electrónica MiPyME A (201).

  • propertyFceInvoiceB
    public static VoucherType FceInvoiceB { get; }

    Gets voucher type Factura de Crédito Electrónica MiPyME B (206).

  • propertyFceInvoiceC
    public static VoucherType FceInvoiceC { get; }

    Gets voucher type Factura de Crédito Electrónica MiPyME C (211).

  • propertyInvoiceA
    public static VoucherType InvoiceA { get; }

    Gets voucher type Factura A (1).

  • propertyInvoiceB
    public static VoucherType InvoiceB { get; }

    Gets voucher type Factura B (6).

  • propertyInvoiceC
    public static VoucherType InvoiceC { get; }

    Gets voucher type Factura C (11).

  • propertyInvoiceE
    public static VoucherType InvoiceE { get; }

    Gets voucher type Factura de Exportación E (19).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `VoucherType` instance was initialized through a factory rather than `default(VoucherType)`.

  • propertyLetter
    public char Letter { get; }

    Gets the fiscal voucher letter ('A', 'B', 'C', 'E', etc.).

EricksonLopez.ValueObjects.Fiscal.Chile#

6
record

DocumentReference

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Chile
public readonly record struct DocumentReference : IEquatable<DocumentReference>
Implementa: IEquatable<DocumentReference>

Represents a formal Chilean DTE Document Reference (Referencia DTE, Ley 19.983 / SII) used in Credit/Debit Notes to reference the original document. Reference Codes (`ReferenceCode`): - **1**: Cancels Reference Document (Anula Documento de Referencia) - **2**: Corrects Reference Document Text (Corrige Texto Documento de Referencia) - **3**: Corrects Amounts (Corrige Montos) .

Miembros (8)

  • methodCreate
    public static Result<DocumentReference> Create(DteTypeCode targetType, FiscalFolio folio, DateOnly date, byte referenceCode, string? reason = null)

    Creates a validated `DocumentReference` instance.

    targetType: DteTypeCode
    The DTE document type being referenced.
    folio: FiscalFolio
    The fiscal folio number of the referenced document.
    date: DateOnly
    The emission date of the referenced document.
    referenceCode: byte
    The reason code: 1 (Anula), 2 (Corrige Texto), or 3 (Corrige Montos).
    reason: string?
    An optional free-text reason for the reference.

    Retorna: A `Result<DocumentReference>` containing the validated instance or a domain validation error.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • propertyDate
    public DateOnly Date { get; }

    Gets the issue date of the referenced document.

  • propertyFolio
    public FiscalFolio Folio { get; }

    Gets the fiscal folio number of the referenced document.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `DocumentReference` instance was initialized through a factory rather than `default(DocumentReference)`.

  • propertyReason
    public string? Reason { get; }

    Gets the optional descriptive reason for the reference.

  • propertyReferenceCode
    public byte ReferenceCode { get; }

    Gets the reference reason code (1 = Cancel, 2 = Correct text, 3 = Correct amounts).

  • propertyTargetType
    public DteTypeCode TargetType { get; }

    Gets the target DTE document type code.

record

DteTypeCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Chile
public readonly record struct DteTypeCode : ISpanParsable<DteTypeCode>, IComparable<DteTypeCode>
Implementa: IComparable<DteTypeCode>, ISpanParsable<DteTypeCode>

Represents an official Chilean DTE Type Code (Tipo de Documento Tributario Electrónico) recognized by the SII (Resolución Exenta N° 45/2003 y modificatorias). Official Codes: - **33**: Factura Electrónica - **34**: Factura No Afecta o Exenta Electrónica - **39**: Boleta Electrónica - **41**: Boleta Exenta Electrónica - **46**: Factura de Compra Electrónica - **52**: Guía de Despacho Electrónica - **56**: Nota de Débito Electrónica - **61**: Nota de Crédito Electrónica - **110**: Factura de Exportación Electrónica - **111**: Nota de Débito de Exportación Electrónica - **112**: Nota de Crédito de Exportación Electrónica .

Miembros (27)

  • methodCompareTo
    public int CompareTo(DteTypeCode other)

    Inherits documentation from base type or interface.

    other: DteTypeCode
  • methodCreate
    public static Result<DteTypeCode> Create(ReadOnlySpan<char> input)

    Creates a validated `DteTypeCode` from a character span. Accepts bare code ("33") or canonical formatted string ("33 - Factura Electrónica").

    input: ReadOnlySpan<char>
    A character span containing the numeric DTE type code or canonical string.

    Retorna: A `Result<DteTypeCode>` containing the matched type or a domain validation error.

  • methodCreate
    public static Result<DteTypeCode> Create(int code)

    Creates a validated `DteTypeCode` from an integer code.

    code: int
    The integer SII DTE type code (e.g. 33, 34, 39).

    Retorna: A `Result<DteTypeCode>` containing the matched type or a domain validation error.

  • methodCreate
    public static Result<DteTypeCode> Create(string? input)

    Creates a validated `DteTypeCode` from a nullable string.

    input: string?
    A string containing the numeric DTE type code.

    Retorna: A `Result<DteTypeCode>` containing the matched type or a domain validation error.

  • methodParse
    public static DteTypeCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static DteTypeCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out DteTypeCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out DteTypeCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out DteTypeCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out DteTypeCode
  • methodoperator <
    public static bool operator <(DteTypeCode left, DteTypeCode right)

    Determines whether the left `DteTypeCode` is less than the right `DteTypeCode`.

    left: DteTypeCode
    The first `DteTypeCode` to compare.
    right: DteTypeCode
    The second `DteTypeCode` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(DteTypeCode left, DteTypeCode right)

    Determines whether the left `DteTypeCode` is less than or equal to the right `DteTypeCode`.

    left: DteTypeCode
    The first `DteTypeCode` to compare.
    right: DteTypeCode
    The second `DteTypeCode` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(DteTypeCode left, DteTypeCode right)

    Determines whether the left `DteTypeCode` is greater than the right `DteTypeCode`.

    left: DteTypeCode
    The first `DteTypeCode` to compare.
    right: DteTypeCode
    The second `DteTypeCode` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(DteTypeCode left, DteTypeCode right)

    Determines whether the left `DteTypeCode` is greater than or equal to the right `DteTypeCode`.

    left: DteTypeCode
    The first `DteTypeCode` to compare.
    right: DteTypeCode
    The second `DteTypeCode` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCode
    public int Code { get; }

    Gets the integer DTE code (e.g. 33).

  • propertyCreditNote
    public static DteTypeCode CreditNote { get; }

    Gets DTE code 61 (Nota de Crédito Electrónica).

  • propertyDebitNote
    public static DteTypeCode DebitNote { get; }

    Gets DTE code 56 (Nota de Débito Electrónica).

  • propertyDispatchGuide
    public static DteTypeCode DispatchGuide { get; }

    Gets DTE code 52 (Guía de Despacho Electrónica).

  • propertyElectronicInvoice
    public static DteTypeCode ElectronicInvoice { get; }

    Gets DTE code 33 (Factura Electrónica).

  • propertyElectronicReceipt
    public static DteTypeCode ElectronicReceipt { get; }

    Gets DTE code 39 (Boleta Electrónica).

  • propertyExemptInvoice
    public static DteTypeCode ExemptInvoice { get; }

    Gets DTE code 34 (Factura No Afecta o Exenta Electrónica).

  • propertyExemptReceipt
    public static DteTypeCode ExemptReceipt { get; }

    Gets DTE code 41 (Boleta Exenta Electrónica).

  • propertyExportCreditNote
    public static DteTypeCode ExportCreditNote { get; }

    Gets DTE code 112 (Nota de Crédito de Exportación Electrónica).

  • propertyExportDebitNote
    public static DteTypeCode ExportDebitNote { get; }

    Gets DTE code 111 (Nota de Débito de Exportación Electrónica).

  • propertyExportInvoice
    public static DteTypeCode ExportInvoice { get; }

    Gets DTE code 110 (Factura de Exportación Electrónica).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `DteTypeCode` instance was initialized through a factory rather than `default(DteTypeCode)`.

  • propertyName
    public string Name { get; }

    Gets the official name of the DTE.

  • propertyPurchaseInvoice
    public static DteTypeCode PurchaseInvoice { get; }

    Gets DTE code 46 (Factura de Compra Electrónica).

record

FiscalFolio

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Chile
public readonly record struct FiscalFolio : ISpanParsable<FiscalFolio>, IComparable<FiscalFolio>
Implementa: IComparable<FiscalFolio>, ISpanParsable<FiscalFolio>

Represents a Chilean Fiscal Folio Number (Folio DTE) authorized by the SII via CAF (Código de Autorización de Folios). Rules: Strictly positive integer between 1 and 2,147,483,647 (`int.MaxValue`).

Miembros (15)

  • methodCompareTo
    public int CompareTo(FiscalFolio other)

    Inherits documentation from base type or interface.

    other: FiscalFolio
  • methodCreate
    public static Result<FiscalFolio> Create(ReadOnlySpan<char> input)

    Creates a validated `FiscalFolio` from a text span.

    input: ReadOnlySpan<char>
    A character span containing the numeric folio value.

    Retorna: A `Result<FiscalFolio>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<FiscalFolio> Create(int value)

    Creates a validated `FiscalFolio` from an integer value.

    value: int
    The strictly positive folio integer value.

    Retorna: A `Result<FiscalFolio>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<FiscalFolio> Create(string? input)

    Creates a validated `FiscalFolio` from a nullable string.

    input: string?
    A string containing the numeric folio value.

    Retorna: A `Result<FiscalFolio>` containing the validated instance or a domain validation error.

  • methodParse
    public static FiscalFolio Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static FiscalFolio Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out FiscalFolio result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out FiscalFolio
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out FiscalFolio result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out FiscalFolio
  • methodoperator <
    public static bool operator <(FiscalFolio left, FiscalFolio right)

    Determines whether the left `FiscalFolio` is less than the right `FiscalFolio`.

    left: FiscalFolio
    The first `FiscalFolio` to compare.
    right: FiscalFolio
    The second `FiscalFolio` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(FiscalFolio left, FiscalFolio right)

    Determines whether the left `FiscalFolio` is less than or equal to the right `FiscalFolio`.

    left: FiscalFolio
    The first `FiscalFolio` to compare.
    right: FiscalFolio
    The second `FiscalFolio` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(FiscalFolio left, FiscalFolio right)

    Determines whether the left `FiscalFolio` is greater than the right `FiscalFolio`.

    left: FiscalFolio
    The first `FiscalFolio` to compare.
    right: FiscalFolio
    The second `FiscalFolio` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(FiscalFolio left, FiscalFolio right)

    Determines whether the left `FiscalFolio` is greater than or equal to the right `FiscalFolio`.

    left: FiscalFolio
    The first `FiscalFolio` to compare.
    right: FiscalFolio
    The second `FiscalFolio` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `FiscalFolio` instance was initialized through a factory rather than `default(FiscalFolio)`.

  • propertyValue
    public int Value { get; }

    Gets the integer folio value.

record

Rut

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Chile
public readonly record struct Rut : ISpanParsable<Rut>, IUtf8SpanParsable<Rut>, IComparable<Rut>
Implementa: IComparable<Rut>, ISpanParsable<Rut>, IUtf8SpanParsable<Rut>

Represents a Chilean RUT (Rol Único Tributario) / RUN (Rol Único Nacional) administered by the SII (Servicio de Impuestos Internos) and Registro Civil. Structure: A base number between 1 and 99,999,999 and a Modulo 11 verification digit (`'0'`-`'9'` or `'K'`). Formats: Canonical `"12345678-K"`, formatted with thousands dots `"12.345.678-K"`.

Miembros (21)

  • methodCalculateVerificationDigit
    public static char CalculateVerificationDigit(int body)

    Calculates the official Modulo 11 check digit for a Chilean RUT body.

    body: int
    The integer body of the RUT.

    Retorna: The calculated check digit character ('0'-'9' or 'K').

  • methodCompareTo
    public int CompareTo(Rut other)

    Inherits documentation from base type or interface.

    other: Rut
  • methodCreate
    public static Result<Rut> Create(ReadOnlySpan<char> input)

    Creates a validated `Rut` from a raw or formatted text span (e.g. `"12.345.678-K"` or `"12345678-K"` or `"12345678K"`).

    input: ReadOnlySpan<char>
    A character span containing the RUT in any recognized format.

    Retorna: A `Result<Rut>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Rut> Create(int body)

    Creates a validated `Rut` from a numeric body value, computing its check digit.

    body: int
    The RUT body (cuerpo) integer value between 1 and 99,999,999.

    Retorna: A `Result<Rut>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Rut> Create(string? input)

    Creates a validated `Rut` from a nullable string.

    input: string?
    A string containing the RUT in any recognized format.

    Retorna: A `Result<Rut>` containing the validated instance or a domain validation error.

  • methodParse
    public static Rut Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
  • methodParse
    public static Rut Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Rut Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToCanonicalString
    public string ToCanonicalString()

    Formats the RUT in canonical format without dots: `12345678-K`.

    Retorna: The canonically formatted RUT string.

  • methodToFormattedString
    public string ToFormattedString()

    Formats the RUT with thousands separators: `12.345.678-K`.

    Retorna: The formatted RUT string with thousands separators.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out Rut result)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
    result: out Rut
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Rut result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Rut
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Rut result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Rut
  • methodoperator <
    public static bool operator <(Rut left, Rut right)

    Determines whether the left `Rut` is less than the right `Rut`.

    left: Rut
    The first `Rut` to compare.
    right: Rut
    The second `Rut` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Rut left, Rut right)

    Determines whether the left `Rut` is less than or equal to the right `Rut`.

    left: Rut
    The first `Rut` to compare.
    right: Rut
    The second `Rut` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Rut left, Rut right)

    Determines whether the left `Rut` is greater than the right `Rut`.

    left: Rut
    The first `Rut` to compare.
    right: Rut
    The second `Rut` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Rut left, Rut right)

    Determines whether the left `Rut` is greater than or equal to the right `Rut`.

    left: Rut
    The first `Rut` to compare.
    right: Rut
    The second `Rut` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyBody
    public int Body { get; }

    Gets the base numeric sequence of the RUT (Cuerpo).

  • propertyDv
    public char Dv { get; }

    Gets the uppercase verification check digit (DV, '0'-'9' or 'K').

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

record

TaxRateVat

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Chile
public readonly record struct TaxRateVat : ISpanParsable<TaxRateVat>, IComparable<TaxRateVat>
Implementa: IComparable<TaxRateVat>, ISpanParsable<TaxRateVat>

Represents a Chilean statutory VAT Rate (Tasa de Impuesto al Valor Agregado - IVA) under Decreto Ley N° 825 de 1974 (Ley sobre Impuesto a las Ventas y Servicios). Legal Rates: - **19%**: Standard General VAT Rate (Art. 14 DL 825) (Tasa General de IVA) - **0%**: Exempt or Non-Taxable Operations (Operaciones Exentas o No Gravadas) .

Miembros (19)

  • methodCompareTo
    public int CompareTo(TaxRateVat other)

    Inherits documentation from base type or interface.

    other: TaxRateVat
  • methodCreate
    public static Result<TaxRateVat> Create(ReadOnlySpan<char> input)

    Creates a validated `TaxRateVat` from a text span.

    input: ReadOnlySpan<char>
    A character span containing the percentage value, optionally suffixed with `%`.

    Retorna: A `Result<TaxRateVat>` containing the matched statutory rate or a domain validation error.

  • methodCreate
    public static Result<TaxRateVat> Create(decimal percentage)

    Creates a validated `TaxRateVat` from a percentage rate (must be 19 or 0).

    percentage: decimal
    The statutory VAT percentage (19 for general rate or 0 for exempt).

    Retorna: A `Result<TaxRateVat>` containing the matched statutory rate or a domain validation error.

  • methodCreate
    public static Result<TaxRateVat> Create(string? input)

    Creates a validated `TaxRateVat` from a nullable string.

    input: string?
    A string containing the percentage value, optionally suffixed with `%`.

    Retorna: A `Result<TaxRateVat>` containing the matched statutory rate or a domain validation error.

  • methodParse
    public static TaxRateVat Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static TaxRateVat Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out TaxRateVat result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out TaxRateVat
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out TaxRateVat result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out TaxRateVat
  • methodoperator <
    public static bool operator <(TaxRateVat left, TaxRateVat right)

    Determines whether the left `TaxRateVat` is less than the right `TaxRateVat`.

    left: TaxRateVat
    The first `TaxRateVat` to compare.
    right: TaxRateVat
    The second `TaxRateVat` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(TaxRateVat left, TaxRateVat right)

    Determines whether the left `TaxRateVat` is less than or equal to the right `TaxRateVat`.

    left: TaxRateVat
    The first `TaxRateVat` to compare.
    right: TaxRateVat
    The second `TaxRateVat` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(TaxRateVat left, TaxRateVat right)

    Determines whether the left `TaxRateVat` is greater than the right `TaxRateVat`.

    left: TaxRateVat
    The first `TaxRateVat` to compare.
    right: TaxRateVat
    The second `TaxRateVat` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(TaxRateVat left, TaxRateVat right)

    Determines whether the left `TaxRateVat` is greater than or equal to the right `TaxRateVat`.

    left: TaxRateVat
    The first `TaxRateVat` to compare.
    right: TaxRateVat
    The second `TaxRateVat` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyDescription
    public string Description { get; }

    Gets the official description.

  • propertyExempt0
    public static TaxRateVat Exempt0 { get; }

    Gets the 0% exempt VAT rate in Chile.

  • propertyFraction
    public decimal Fraction { get; }

    Gets the fractional rate (0.19m or 0.00m).

  • propertyGeneral19
    public static TaxRateVat General19 { get; }

    Gets the 19% general VAT rate in Chile.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `TaxRateVat` instance was initialized through a factory rather than `default(TaxRateVat)`.

  • propertyPercentage
    public decimal Percentage { get; }

    Gets the numeric percentage (19m or 0m).

record

WithholdingRate

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Chile
public readonly record struct WithholdingRate : ISpanParsable<WithholdingRate>, IComparable<WithholdingRate>
Implementa: IComparable<WithholdingRate>, ISpanParsable<WithholdingRate>

Represents a Chilean Professional Service Fee Withholding Rate (Retención de Honorarios) governed by the gradual increase established in Ley 21.133. Statutory Rate Schedule: - 2019: 10.00% - 2020: 10.75% - 2021: 11.50% - 2022: 12.25% - 2023: 13.00% - 2024: 13.75% - 2025: 14.50% - 2026: 15.25% - 2027: 16.00% - 2028+: 17.00% .

Miembros (17)

  • methodCompareTo
    public int CompareTo(WithholdingRate other)

    Inherits documentation from base type or interface.

    other: WithholdingRate
  • methodCreate
    public static Result<WithholdingRate> Create(ReadOnlySpan<char> input)

    Creates a validated `WithholdingRate` from a text span.

    input: ReadOnlySpan<char>
    A character span containing the percentage value, optionally suffixed with `%`.

    Retorna: A `Result<WithholdingRate>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<WithholdingRate> Create(decimal percentage)

    Creates a validated `WithholdingRate` from a percentage rate.

    percentage: decimal
    The statutory withholding percentage under Ley 21.133 (e.g. 10.75, 13.75).

    Retorna: A `Result<WithholdingRate>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<WithholdingRate> Create(string? input)

    Creates a validated `WithholdingRate` from a nullable string.

    input: string?
    A string containing the percentage value, optionally suffixed with `%`.

    Retorna: A `Result<WithholdingRate>` containing the validated instance or a domain validation error.

  • methodForYear
    public static WithholdingRate ForYear(int year)

    Gets the statutory withholding rate for a given calendar year under Ley 21.133.

    year: int
    The calendar year to evaluate.

    Retorna: The statutory `WithholdingRate` for the specified year.

  • methodParse
    public static WithholdingRate Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static WithholdingRate Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out WithholdingRate result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out WithholdingRate
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out WithholdingRate result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out WithholdingRate
  • methodoperator <
    public static bool operator <(WithholdingRate left, WithholdingRate right)

    Determines whether the left `WithholdingRate` is less than the right `WithholdingRate`.

    left: WithholdingRate
    The first `WithholdingRate` to compare.
    right: WithholdingRate
    The second `WithholdingRate` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(WithholdingRate left, WithholdingRate right)

    Determines whether the left `WithholdingRate` is less than or equal to the right `WithholdingRate`.

    left: WithholdingRate
    The first `WithholdingRate` to compare.
    right: WithholdingRate
    The second `WithholdingRate` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(WithholdingRate left, WithholdingRate right)

    Determines whether the left `WithholdingRate` is greater than the right `WithholdingRate`.

    left: WithholdingRate
    The first `WithholdingRate` to compare.
    right: WithholdingRate
    The second `WithholdingRate` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(WithholdingRate left, WithholdingRate right)

    Determines whether the left `WithholdingRate` is greater than or equal to the right `WithholdingRate`.

    left: WithholdingRate
    The first `WithholdingRate` to compare.
    right: WithholdingRate
    The second `WithholdingRate` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyFraction
    public decimal Fraction { get; }

    Gets the fractional rate for direct calculation (e.g. 0.1375m).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `WithholdingRate` instance was initialized through a factory rather than `default(WithholdingRate)`.

  • propertyPercentage
    public decimal Percentage { get; }

    Gets the percentage value (e.g. 13.75m).

EricksonLopez.ValueObjects.Fiscal.Colombia#

9
record

AuthorizationRange

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Colombia
public readonly record struct AuthorizationRange : IEquatable<AuthorizationRange>, ISpanParsable<AuthorizationRange>
Implementa: IEquatable<AuthorizationRange>, ISpanParsable<AuthorizationRange>

Represents an immutable numbering authorization range granted by the DIAN for electronic invoicing. Rules: - `From` must be strictly greater than zero. - `To` must be greater than or equal to `From`.

Miembros (13)

  • methodContains
    public bool Contains(long sequenceNumber)

    Determines whether a specific invoice sequence number is within this authorized range.

    sequenceNumber: long
    The invoice sequence number to check.

    Retorna: `true` if the sequence number is within the authorized range; otherwise, `false`.

  • methodCreate
    public static Result<AuthorizationRange> Create(ReadOnlySpan<char> input)

    Creates a validated `AuthorizationRange` from a string representation like "[1..100]" or "1..100".

    input: ReadOnlySpan<char>
    The span representation of the authorization range.

    Retorna: A `Result<AuthorizationRange>` containing the validated instance or a validation error.

  • methodCreate
    public static Result<AuthorizationRange> Create(long from, long to)

    Creates a validated `AuthorizationRange` instance.

    from: long
    The starting authorized sequence number.
    to: long
    The ending authorized sequence number.

    Retorna: A `Result<AuthorizationRange>` containing the validated instance or a validation error.

  • methodCreate
    public static Result<AuthorizationRange> Create(string? input)

    Creates a validated `AuthorizationRange` from a string representation like "[1..100]" or "1..100".

    input: string?
    The string representation of the authorization range.

    Retorna: A `Result<AuthorizationRange>` containing the validated instance or a validation error.

  • methodParse
    public static AuthorizationRange Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static AuthorizationRange Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out AuthorizationRange result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out AuthorizationRange
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out AuthorizationRange result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out AuthorizationRange
  • propertyFrom
    public long From { get; }

    Gets the starting sequence number of the authorized range.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `AuthorizationRange` instance was initialized through a factory rather than `default(AuthorizationRange)`.

  • propertyTo
    public long To { get; }

    Gets the ending sequence number of the authorized range.

  • propertyTotalCount
    public long TotalCount { get; }

    Gets the total capacity of sequences in this range.

record

CiiuCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Colombia
public readonly record struct CiiuCode : ISpanParsable<CiiuCode>, IEquatable<CiiuCode>
Implementa: IEquatable<CiiuCode>, ISpanParsable<CiiuCode>

Represents a 4-digit Colombian CIIU economic activity code (Clasificación Industrial Internacional Uniforme, Revisión 4 adaptada para Colombia). Required by the DIAN in the RUT (Registro Único Tributario) and electronic documents.

Miembros (9)

  • methodCreate
    public static Result<CiiuCode> Create(ReadOnlySpan<char> input)

    Creates a validated `CiiuCode` instance from a character span.

    input: ReadOnlySpan<char>
    A character span containing the CIIU activity code.

    Retorna: A `Result<CiiuCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<CiiuCode> Create(string? code)

    Creates a validated `CiiuCode` instance from a 4-digit string.

    code: string?
    The CIIU activity code string (e.g. `"6201"`).

    Retorna: A `Result<CiiuCode>` containing the validated instance or a domain validation error.

  • methodParse
    public static CiiuCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static CiiuCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out CiiuCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out CiiuCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out CiiuCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out CiiuCode
  • propertyCode
    public string Code { get; }

    Gets the 4-digit CIIU code.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `CiiuCode` instance was initialized through a factory rather than `default(CiiuCode)`.

record

Cude

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Colombia
public readonly record struct Cude : ISpanParsable<Cude>, IEquatable<Cude>
Implementa: IEquatable<Cude>, ISpanParsable<Cude>

Represents a Colombian CUDE (Código Único de Documento Electrónico), the mandatory cryptographic identifier for Credit Notes, Debit Notes, Support Documents, and Electronic POS (Resolución 000165/2023). Structure: A 96-character lowercase hexadecimal string generated via SHA-384 hashing using the software provider PIN (SoftwarePin).

Miembros (9)

  • methodCreate
    public static Result<Cude> Create(ReadOnlySpan<char> input)

    Creates a validated `Cude` instance from a character span.

    input: ReadOnlySpan<char>
    A character span containing the 96-hex-character SHA-384 CUDE code.

    Retorna: A `Result<Cude>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Cude> Create(string? value)

    Creates a validated `Cude` instance from a 96-character hexadecimal string.

    value: string?
    A string containing the 96-hex-character SHA-384 CUDE code.

    Retorna: A `Result<Cude>` containing the validated instance or a domain validation error.

  • methodParse
    public static Cude Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Cude Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Cude result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Cude
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Cude result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Cude
  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Cude` instance was initialized through a factory rather than `default(Cude)`.

  • propertyValue
    public string Value { get; }

    Gets the raw 96-character hexadecimal CUDE value.

record

Cufe

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Colombia
public readonly record struct Cufe : ISpanParsable<Cufe>, IEquatable<Cufe>
Implementa: IEquatable<Cufe>, ISpanParsable<Cufe>

Represents a Colombian CUFE (Código Único de Factura Electrónica), the mandatory cryptographic identifier for Electronic Sales Invoices (Resolución 000165/2023). Structure: A 96-character lowercase hexadecimal string generated via SHA-384 hashing concatenating invoice fields and the technical key (TechnicalKey).

Miembros (9)

  • methodCreate
    public static Result<Cufe> Create(ReadOnlySpan<char> input)

    Creates a validated `Cufe` instance from a character span.

    input: ReadOnlySpan<char>
    A character span containing the 96-hex-character SHA-384 CUFE code.

    Retorna: A `Result<Cufe>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Cufe> Create(string? value)

    Creates a validated `Cufe` instance from a 96-character hexadecimal string.

    value: string?
    A string containing the 96-hex-character SHA-384 CUFE code.

    Retorna: A `Result<Cufe>` containing the validated instance or a domain validation error.

  • methodParse
    public static Cufe Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Cufe Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Cufe result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Cufe
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Cufe result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Cufe
  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Cufe` instance was initialized through a factory rather than `default(Cufe)`.

  • propertyValue
    public string Value { get; }

    Gets the raw 96-character hexadecimal CUFE value.

record

Cune

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Colombia
public readonly record struct Cune : ISpanParsable<Cune>, IEquatable<Cune>
Implementa: IEquatable<Cune>, ISpanParsable<Cune>

Represents a Colombian CUNE (Código Único de Nómina Electrónica), the mandatory cryptographic identifier for Electronic Payroll Support Documents (Resolución 000013/2021). Structure: A 96-character lowercase hexadecimal string generated via SHA-384 hashing concatenating employer NIT, employee identification, payroll dates, amounts, and software PIN.

Miembros (9)

  • methodCreate
    public static Result<Cune> Create(ReadOnlySpan<char> input)

    Creates a validated `Cune` instance from a character span.

    input: ReadOnlySpan<char>
    A character span containing the 96-hex-character SHA-384 CUNE code.

    Retorna: A `Result<Cune>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Cune> Create(string? value)

    Creates a validated `Cune` instance from a 96-character hexadecimal string.

    value: string?
    A string containing the 96-hex-character SHA-384 CUNE code.

    Retorna: A `Result<Cune>` containing the validated instance or a domain validation error.

  • methodParse
    public static Cune Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Cune Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Cune result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Cune
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Cune result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Cune
  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Cune` instance was initialized through a factory rather than `default(Cune)`.

  • propertyValue
    public string Value { get; }

    Gets the raw 96-character hexadecimal CUNE value.

record

DaneMunicipalityCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Colombia
public readonly record struct DaneMunicipalityCode : ISpanParsable<DaneMunicipalityCode>, IEquatable<DaneMunicipalityCode>
Implementa: IEquatable<DaneMunicipalityCode>, ISpanParsable<DaneMunicipalityCode>

Represents a Colombian 5-digit DANE Municipal Code (División Político-Administrativa de Colombia - DIVIPOLA), required by DIAN for territorial tax reporting (ICA) and electronic invoicing addresses. Format: Exactly 5 numeric digits: first 2 digits represent the Department (`DepartmentCode`), and the last 3 digits represent the Municipality (`MunicipalityCode`), e.g. `"11001"` (Bogotá, D.C.).

Miembros (11)

  • methodCreate
    public static Result<DaneMunicipalityCode> Create(ReadOnlySpan<char> input)

    Creates a validated `DaneMunicipalityCode` instance from a character span.

    input: ReadOnlySpan<char>
    A character span containing the 5-digit DANE municipality code.

    Retorna: A `Result<DaneMunicipalityCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<DaneMunicipalityCode> Create(string? code)

    Creates a validated `DaneMunicipalityCode` instance from a 5-digit string.

    code: string?
    The 5-digit DANE municipality code (2-digit department + 3-digit municipality).

    Retorna: A `Result<DaneMunicipalityCode>` containing the validated instance or a domain validation error.

  • methodParse
    public static DaneMunicipalityCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static DaneMunicipalityCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out DaneMunicipalityCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out DaneMunicipalityCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out DaneMunicipalityCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out DaneMunicipalityCode
  • propertyCode
    public string Code { get; }

    Gets the 5-digit DANE municipal code.

  • propertyDepartmentCode
    public string DepartmentCode { get; }

    Gets the 2-digit department component.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `DaneMunicipalityCode` instance was initialized through a factory rather than `default(DaneMunicipalityCode)`.

  • propertyMunicipalityCode
    public string MunicipalityCode { get; }

    Gets the 3-digit municipality component.

record

Nit

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Colombia
public readonly record struct Nit : ISpanParsable<Nit>, IUtf8SpanParsable<Nit>, IComparable<Nit>
Implementa: IComparable<Nit>, ISpanParsable<Nit>, IUtf8SpanParsable<Nit>

Represents a Colombian Tax Identification Number (NIT - Número de Identificación Tributaria) issued by the DIAN (Dirección de Impuestos y Aduanas Nacionales). Structure: A base numeric sequence of 7 to 15 digits and an integrated Verification Digit (DV) calculated using the official DIAN Modulo 11 weighted algorithm (Orden Administrativa 004/1989). Rules: - Base number must be between 1,000,000 and 999,999,999,999,999. - Verification digit is derived deterministically from the 15 prime factors: `[71, 67, 59, 53, 47, 43, 41, 37, 29, 23, 19, 17, 13, 7, 3]`. - Canonical format: `{BaseNumber}-{DV}` (e.g. `830099999-1`).

Miembros (20)

  • methodCalculateVerificationDigit
    public static byte CalculateVerificationDigit(long baseNumber)

    Calculates the official DIAN Modulo 11 verification digit for a given base number.

    baseNumber: long
    The base numeric NIT value.

    Retorna: The verification digit (0 to 9).

  • methodCompareTo
    public int CompareTo(Nit other)

    Inherits documentation from base type or interface.

    other: Nit
  • methodCreate
    public static Result<Nit> Create(ReadOnlySpan<char> input)

    Creates a validated `Nit` instance from a text representation (e.g. `"830099999-1"` or `"830099999"`).

    input: ReadOnlySpan<char>
    The text containing the NIT.

    Retorna: A `Result<T>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Nit> Create(long baseNumber)

    Creates a validated `Nit` instance from a numeric base value, computing its verification digit.

    baseNumber: long
    The base numeric NIT value.

    Retorna: A `Result<T>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Nit> Create(string? input)

    Creates a validated `Nit` instance from a nullable string.

    input: string?
    A string containing the NIT in raw or formatted (`NNNNNNNNN-D`) form.

    Retorna: A `Result<Nit>` containing the validated instance or a domain validation error.

  • methodParse
    public static Nit Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
  • methodParse
    public static Nit Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Nit Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToCanonicalString
    public string ToCanonicalString()

    Formats the NIT in its canonical DIAN representation: `{BaseNumber}-{DV}`.

    Retorna: The canonical NIT string representation.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out Nit result)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
    result: out Nit
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Nit result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Nit
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Nit result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Nit
  • methodoperator <
    public static bool operator <(Nit left, Nit right)

    Determines whether the left `Nit` is less than the right `Nit`.

    left: Nit
    The first `Nit` to compare.
    right: Nit
    The second `Nit` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Nit left, Nit right)

    Determines whether the left `Nit` is less than or equal to the right `Nit`.

    left: Nit
    The first `Nit` to compare.
    right: Nit
    The second `Nit` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Nit left, Nit right)

    Determines whether the left `Nit` is greater than the right `Nit`.

    left: Nit
    The first `Nit` to compare.
    right: Nit
    The second `Nit` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Nit left, Nit right)

    Determines whether the left `Nit` is greater than or equal to the right `Nit`.

    left: Nit
    The first `Nit` to compare.
    right: Nit
    The second `Nit` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyBaseNumber
    public long BaseNumber { get; }

    Gets the base numeric component of the NIT (excluding the verification digit).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

  • propertyVerificationDigit
    public byte VerificationDigit { get; }

    Gets the computed DIAN Modulo 11 verification digit (DV, between 0 and 9).

record

RejectionReasonCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Colombia
public readonly record struct RejectionReasonCode : ISpanParsable<RejectionReasonCode>, IEquatable<RejectionReasonCode>
Implementa: IEquatable<RejectionReasonCode>, ISpanParsable<RejectionReasonCode>

Represents an official DIAN rejection reason code for RADIAN Event 031 (Reclamo de la Factura Electrónica como Título Valor, Resolución 000085/2022). Official Codes: - **01**: Document with inconsistencies (Documento con inconsistencias) - **02**: Merchandise not fully delivered (Mercancía no entregada totalmente) - **03**: Merchandise partially not delivered (Mercancía no entregada parcialmente) - **04**: Service not rendered (Servicio no prestado) .

Miembros (14)

  • methodCreate
    public static Result<RejectionReasonCode> Create(ReadOnlySpan<char> input)

    Creates a validated `RejectionReasonCode` from a character span. Accepts bare code ("01") or canonical formatted string ("01 - Documento con inconsistencias").

    input: ReadOnlySpan<char>
    A character span containing the rejection reason code.

    Retorna: A `Result<RejectionReasonCode>` containing the matched reason or a domain validation error.

  • methodCreate
    public static Result<RejectionReasonCode> Create(string? code)

    Creates a validated `RejectionReasonCode` from an official code ("01", "02", "03", "04").

    code: string?
    The 2-digit RADIAN rejection reason code.

    Retorna: A `Result<RejectionReasonCode>` containing the matched reason or a domain validation error.

  • methodParse
    public static RejectionReasonCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static RejectionReasonCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out RejectionReasonCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out RejectionReasonCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out RejectionReasonCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out RejectionReasonCode
  • propertyCode
    public string Code { get; }

    Gets the 2-digit official DIAN rejection code.

  • propertyDescription
    public string Description { get; }

    Gets the official DIAN description for the rejection reason.

  • propertyGoodsNotDeliveredPartially
    public static RejectionReasonCode GoodsNotDeliveredPartially { get; }

    Gets rejection reason 03 (Mercancía no entregada parcialmente).

  • propertyGoodsNotDeliveredTotally
    public static RejectionReasonCode GoodsNotDeliveredTotally { get; }

    Gets rejection reason 02 (Mercancía no entregada totalmente).

  • propertyInconsistencies
    public static RejectionReasonCode Inconsistencies { get; }

    Gets rejection reason 01 (Documento con inconsistencias).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `RejectionReasonCode` instance was initialized through a factory rather than `default(RejectionReasonCode)`.

  • propertyServiceNotRendered
    public static RejectionReasonCode ServiceNotRendered { get; }

    Gets rejection reason 04 (Servicio no prestado).

record

TaxTypeCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Colombia
public readonly record struct TaxTypeCode : ISpanParsable<TaxTypeCode>, IEquatable<TaxTypeCode>
Implementa: IEquatable<TaxTypeCode>, ISpanParsable<TaxTypeCode>

Represents an official DIAN Tax Type Code (Tributos DIAN, Anexo Técnico 1.9). Official Codes: - **01**: IVA (Impuesto sobre las Ventas) - **02**: INC (Impuesto Nacional al Consumo) - **03**: ICA (Impuesto de Industria y Comercio) - **22**: IBUA (Impuesto a las Bebidas Ultraprocesadas Azucaradas) - **23**: ICUI (Impuesto a los Productos Comestibles Ultraprocesados) .

Miembros (20)

  • methodCreate
    public static Result<TaxTypeCode> Create(ReadOnlySpan<char> input)

    Creates a validated `TaxTypeCode` from a character span. Accepts bare code ("01") or canonical formatted string ("01 - IVA (Impuesto sobre las Ventas)").

    input: ReadOnlySpan<char>
    A character span containing the DIAN tax type code.

    Retorna: A `Result<TaxTypeCode>` containing the matched tax type or a domain validation error.

  • methodCreate
    public static Result<TaxTypeCode> Create(string? code)

    Creates a validated `TaxTypeCode` from an official 2-digit DIAN code.

    code: string?
    The 2-digit DIAN tax type code (e.g. `"01"` for IVA, `"03"` for ICA).

    Retorna: A `Result<TaxTypeCode>` containing the matched tax type or a domain validation error.

  • methodParse
    public static TaxTypeCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static TaxTypeCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out TaxTypeCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out TaxTypeCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out TaxTypeCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out TaxTypeCode
  • propertyCode
    public string Code { get; }

    Gets the official 2-digit DIAN tax code.

  • propertyDescription
    public string Description { get; }

    Gets the official tax description.

  • propertyIbua
    public static TaxTypeCode Ibua { get; }

    Gets tax type 22 (IBUA - Bebidas Ultraprocesadas Azucaradas).

  • propertyIca
    public static TaxTypeCode Ica { get; }

    Gets tax type 03 (ICA - Impuesto de Industria y Comercio).

  • propertyIcui
    public static TaxTypeCode Icui { get; }

    Gets tax type 23 (ICUI - Comestibles Ultraprocesados).

  • propertyInc
    public static TaxTypeCode Inc { get; }

    Gets tax type 02 (INC - Impuesto Nacional al Consumo).

  • propertyIsIbua
    public bool IsIbua { get; }

    Gets a value indicating whether this tax represents IBUA.

  • propertyIsIca
    public bool IsIca { get; }

    Gets a value indicating whether this tax represents ICA.

  • propertyIsIcui
    public bool IsIcui { get; }

    Gets a value indicating whether this tax represents ICUI.

  • propertyIsInc
    public bool IsInc { get; }

    Gets a value indicating whether this tax represents INC.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `TaxTypeCode` instance was initialized through a factory rather than `default(TaxTypeCode)`.

  • propertyIsIva
    public bool IsIva { get; }

    Gets a value indicating whether this tax represents IVA.

  • propertyIva
    public static TaxTypeCode Iva { get; }

    Gets tax type 01 (IVA - Impuesto sobre las Ventas).

EricksonLopez.ValueObjects.Fiscal.DominicanRepublic#

41
record

Cedula

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public sealed record Cedula : StringValueObject<Cedula>
Hereda de: StringValueObject<Cedula>

Represents a validated Dominican Republic Cedula de Identidad y Electoral. Exactly 11 numeric digits validated against the official Modulo 10 checksum algorithm.

Miembros (2)

  • methodCreate
    public static Result<Cedula> Create(string? value)

    Creates a validated `Cedula` instance from a raw or formatted 11-digit string.

    value: string?
    The raw or formatted 11-digit Cedula string (hyphens and non-digit characters are stripped).

    Retorna: A `Result<Cedula>` containing the validated instance or a domain validation error.

  • propertyFormatted
    public string Formatted { get; }

    Formats the Cedula in the official format: `XXX-XXXXXXX-X`.

class

CedulaChecksum

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public static class CedulaChecksum

High-performance, zero-allocation implementation of the Modulo 10 (Luhn variant) check-digit verification algorithm for 11-digit Dominican Cédulas.

Miembros (4)

  • methodCalculateCheckDigit
    public static int CalculateCheckDigit(ReadOnlySpan<char> first10Digits)

    Computes the JCE/DGII Modulo 10 (Luhn) check digit for the first 10 numeric digits of a Dominican Cédula.

    first10Digits: ReadOnlySpan<char>
    Exact 10 numeric characters representing the Cédula base.

    Retorna: The calculated check digit (0 through 9).

    Exceptions: ArgumentException: Thrown when `first10Digits` is not a 10-digit numeric sequence.

  • methodNormalize
    public static string Normalize(string? cedula)

    Normalizes a raw Cédula string by trimming whitespace and removing hyphens and spaces.

    cedula: string?
    The raw Cédula string to normalize.

    Retorna: A normalized string without hyphens or spaces, or `string.Empty` if `cedula` is null or whitespace.

  • methodValidateCedula
    public static bool ValidateCedula(ReadOnlySpan<char> digits)

    Validates whether the 11-digit sequence has a valid Modulo 10 check digit.

    digits: ReadOnlySpan<char>
    Exact 11 numeric characters.

    Retorna: `true` if the check digit matches official JCE/DGII specification; otherwise `false`.

  • methodValidateSeries
    public static bool ValidateSeries(ReadOnlySpan<char> digits)

    Validates whether the 11-digit Cédula has an official JCE municipal series (001-155) or overseas series (402).

    digits: ReadOnlySpan<char>
    Exact 11 numeric characters.

    Retorna: `true` if the first three characters represent a valid JCE series; otherwise, `false`.

enum

CurrencyLanguage

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public enum CurrencyLanguage

Supported output languages for currency amount-to-words decomposition.

Miembros (2)

  • fieldEnglish
    English = 1033

    English (US Dollars - USD), LCID 1033.

  • fieldSpanish
    Spanish = 1034

    Spanish (Dominican Pesos - DOP), LCID 1034.

class

CurrencyToWordsConverter

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public static class CurrencyToWordsConverter

Domain service implementing currency-to-words decomposition ("ATexto") in Spanish (DOP - Dominican Pesos) and English (USD - US Dollars).

Miembros (1)

  • methodConvert
    public static string Convert(decimal amount, CurrencyLanguage language = CurrencyLanguage.Spanish, bool bankFormatWithAsterisks = true)

    Converts a numeric monetary amount into formal written words for checks and fiscal documents.

    amount: decimal
    The numeric amount to spell out.
    language: CurrencyLanguage
    Spanish (default) or English.
    bankFormatWithAsterisks: bool
    Whether to wrap the text in `*** {TEXT} ***` for bank check vouchers.

    Retorna: The formatted amount in words.

class

DgiiChecksum

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public static class DgiiChecksum

High-performance, zero-allocation implementation of the DGII Modulo 11 check-digit verification algorithm for 9-digit Dominican RNCs.

Miembros (3)

  • methodCalculateCheckDigit
    public static int CalculateCheckDigit(ReadOnlySpan<char> first8Digits)

    Computes the DGII Modulo 11 check digit for the first 8 numeric digits of a Dominican RNC.

    first8Digits: ReadOnlySpan<char>
    Exact 8 numeric characters representing the RNC base.

    Retorna: The calculated check digit (1 through 9).

    Exceptions: ArgumentException: Thrown when `first8Digits` is not an 8-digit numeric sequence.

  • methodNormalize
    public static string Normalize(string? rnc)

    Normalizes a raw RNC string by trimming whitespace and removing hyphens and spaces.

    rnc: string?
    The raw RNC string to normalize.

    Retorna: A normalized string without hyphens or spaces, or `string.Empty` if `rnc` is null or whitespace.

  • methodValidateRnc
    public static bool ValidateRnc(ReadOnlySpan<char> digits)

    Validates whether the 9-digit sequence has a valid DGII Modulo 11 check digit.

    digits: ReadOnlySpan<char>
    Exact 9 numeric characters.

    Retorna: `true` if the check digit matches DGII specification; otherwise, `false`.

enum

DgiiClassification

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public enum DgiiClassification

DGII taxpayer classification for Dominican Republic fiscal reporting purposes. Determines applicable fiscal obligations and permitted document types.

Miembros (5)

  • fieldGovernment
    Government = 3

    Government entity (exempt from ITBIS).

  • fieldInformalTaxpayer
    InformalTaxpayer = 5

    Informal taxpayer (without RNC, informal suppliers).

  • fieldLegalEntity
    LegalEntity = 1

    Legal entity with RNC (Persona Jurídica).

  • fieldPhysicalPerson
    PhysicalPerson = 2

    Individual with Cédula (Persona Física).

  • fieldSpecialRegimes
    SpecialRegimes = 4

    Special taxation regime (Zona Franca, PROINDUSTRIA).

class

DgiiEcfSeedSigner

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public static class DgiiEcfSeedSigner

Statutory cryptographic service for signing and verifying DGII e-CF authentication challenge seeds (`Semilla`) and validating X.509 digital certificates according to Dominican Republic DGII e-CF technical specifications (RSA-SHA256 PKCS#1 v1.5).

Miembros (4)

  • methodSignRawSeed
    public static Result<string> SignRawSeed(string? seedValue, X509Certificate2? certificate)

    Signs a raw seed string using RSA-SHA256 (PKCS#1 v1.5 padding) and returns the Base64-encoded signature.

    seedValue: string?
    The raw seed string to sign.
    certificate: X509Certificate2?
    The X.509 certificate containing the RSA private key.

    Retorna: A `Result<T>` containing the Base64-encoded RSA-SHA256 signature.

  • methodSignSeed
    public static Result<string> SignSeed(EcfAuthSeed? seed, X509Certificate2? certificate)

    Signs a validated `EcfAuthSeed` using RSA-SHA256 (PKCS#1 v1.5 padding) and returns the Base64-encoded signature.

    seed: EcfAuthSeed?
    The authentication challenge seed to sign.
    certificate: X509Certificate2?
    The X.509 certificate containing the RSA private key.

    Retorna: A `Result<T>` containing the Base64-encoded RSA-SHA256 signature.

  • methodValidateSigningCertificate
    public static Result<bool> ValidateSigningCertificate(X509Certificate2? certificate, DateTimeOffset? asOf = null)

    Validates whether an X.509 certificate satisfies DGII requirements for digital signing (private key presence, validity window, and DigitalSignature key usage).

    certificate: X509Certificate2?
    The X.509 certificate to validate.
    asOf: DateTimeOffset?
    Optional reference timestamp; defaults to `EcfAuthSeed.AmbientTimeProvider` UTC now.

    Retorna: A `Result<T>` indicating whether the certificate is valid for signing.

  • methodVerifySeedSignature
    public static Result<bool> VerifySeedSignature(string? seedValue, string? base64Signature, X509Certificate2? certificate)

    Verifies a Base64-encoded RSA-SHA256 signature against a raw seed string using the public key of the specified X.509 certificate.

    seedValue: string?
    The original seed string.
    base64Signature: string?
    The Base64-encoded RSA-SHA256 signature.
    certificate: X509Certificate2?
    The X.509 certificate containing the RSA public key.

    Retorna: A `Result<T>` indicating whether the signature is authentic.

enum

DgiiExpenseType

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public enum DgiiExpenseType

Official cost and expense classification categories for DGII Formato 606 (Norma 07-2018).

Miembros (11)

  • fieldAssetAcquisitions
    AssetAcquisitions = 10

    10 - Asset Acquisitions (Adquisiciones de Activos).

  • fieldCostOfSalesPurchasesAndExpenses
    CostOfSalesPurchasesAndExpenses = 9

    09 - Cost of Sales Purchases and Expenses (Compras y Gastos que forman parte del Costo de Venta).

  • fieldExtraordinaryExpenses
    ExtraordinaryExpenses = 8

    08 - Extraordinary Expenses (Gastos Extraordinarios).

  • fieldFinancialExpenses
    FinancialExpenses = 7

    07 - Financial Expenses (Gastos Financieros).

  • fieldFixedAssetExpenses
    FixedAssetExpenses = 4

    04 - Fixed Asset Expenses (Gastos de Activos Fijos).

  • fieldInsuranceExpenses
    InsuranceExpenses = 11

    11 - Insurance Expenses (Gastos de Seguros).

  • fieldLeasing
    Leasing = 3

    03 - Leasing / Rentals (Arrendamientos).

  • fieldOtherAdmittedDeductions
    OtherAdmittedDeductions = 6

    06 - Other Admitted Deductions (Otras Deducciones Admitidas).

  • fieldPersonnelExpenses
    PersonnelExpenses = 1

    01 - Personnel Expenses (Gastos de Personal).

  • fieldRepresentationExpenses
    RepresentationExpenses = 5

    05 - Representation Expenses (Gastos de Representación).

  • fieldWorkSuppliesAndServices
    WorkSuppliesAndServices = 2

    02 - Work, Supplies and Services Expenses (Gastos por Trabajos, Suministros y Servicios).

enum

DgiiIncomeType

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public enum DgiiIncomeType

DGII Formato 607 income classification types (Norma General 07-2018).

Miembros (6)

  • fieldDepreciableAssetSale
    DepreciableAssetSale = 5

    05 - Depreciable Asset Sale Income (Ingresos por Venta de Activos Depreciables).

  • fieldExtraordinary
    Extraordinary = 3

    03 - Extraordinary Income (Ingresos Extraordinarios).

  • fieldFinancial
    Financial = 2

    02 - Financial Income (Ingresos Financieros).

  • fieldLeasing
    Leasing = 4

    04 - Leasing Income (Ingresos por Arrendamientos).

  • fieldOperational
    Operational = 1

    01 - Operational Income (Ingresos por Operaciones / No Financieros).

  • fieldOther
    Other = 6

    06 - Other Income (Otros Ingresos).

class

DgiiNcfValidator

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public static class DgiiNcfValidator

Domain compliance validator implementing Dominican Republic DGII Comprobante Fiscal (NCF Serie B, e-CF Serie E, and historical Series A/P/Q) structural rules, modified NCF reference invariants (Credit/Debit Notes), ITBIS ceiling limits, and Norma General 07-2018 Final Consumer Anonymity Threshold (RD$250,000.00) enforcement.

Miembros (7)

  • methodGetDocumentTypeName
    public static string GetDocumentTypeName(string? documentType)

    Returns the official Spanish descriptive name of a DGII NCF or e-CF document type code.

    documentType: string?
    The 2-digit document type code (e.g., "01", "31").

    Retorna: The official DGII document type name, or "Desconocido" if unrecognized.

  • methodIsValid
    public static bool IsValid(string? ncf)

    Checks whether an NCF string is valid according to DGII structural, series, type, and length rules.

    ncf: string?
    The NCF string to validate.

    Retorna: `true` if valid; otherwise, `false`.

  • methodValidate
    public static string? Validate(string? ncf)

    Validates an NCF string against DGII series, length, document type, and numeric sequence constraints.

    ncf: string?
    The NCF string to validate.

    Retorna: `null` if valid; otherwise, a descriptive Spanish validation error message.

  • methodValidateConsumerAnonymity
    public static string? ValidateConsumerAnonymity(string? ncf, decimal totalAmount, string? customerTaxId)

    Enforces DGII Norma General 07-2018 Final Consumer Anonymity Threshold (RD$250,000.00): Invoices for final consumers (type 02 or 32) with total >= RD$250,000.00 must include a valid customer RNC or Cédula.

    ncf: string?
    The invoice NCF.
    totalAmount: decimal
    The invoice total amount in DOP.
    customerTaxId: string?
    The buyer's RNC or Cédula.

    Retorna: `null` if valid; otherwise, a descriptive validation error message.

  • methodValidateItbisCeiling
    public static string? ValidateItbisCeiling(decimal itbis, decimal taxableAmount, decimal itbisRate = 0.18m, decimal tolerance = 0.05m)

    Validates ITBIS billed ceiling: billed ITBIS cannot exceed `(taxableAmount * itbisRate) + tolerance` (default 5 cents).

    itbis: decimal
    The billed ITBIS tax amount.
    taxableAmount: decimal
    The base taxable invoice amount.
    itbisRate: decimal
    The applicable ITBIS rate (default 0.18m / 18%).
    tolerance: decimal
    Rounding tolerance in currency units (default 0.05m).

    Retorna: `null` if valid; otherwise, a descriptive validation error message.

  • methodValidateModifiedNcf
    public static string? ValidateModifiedNcf(string? documentNcf, string? modifiedNcf)

    Validates modified NCF reference rules: - Credit Notes (04, 34) and Debit Notes (03, 33) MUST modify another valid NCF. - Other invoice types CANNOT modify another NCF.

    documentNcf: string?
    The primary document NCF.
    modifiedNcf: string?
    The referenced modified NCF, if any.

    Retorna: `null` if valid; otherwise, a descriptive validation error message.

  • fieldConsumerAnonymityThresholdDop
    public const decimal ConsumerAnonymityThresholdDop

    Statutory threshold in Dominican Pesos (RD$250,000.00) under DGII Norma General 07-2018 above which final consumer invoices (Types 02 and 32) require buyer RNC or Cédula identification.

enum

DgiiPaymentMethod

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public enum DgiiPaymentMethod

DGII official payment method codes for Formato 606 and 607 (Norma General 07-2018).

Miembros (7)

  • fieldBarter
    Barter = 5

    05 - Barter or Exchange (Permuta).

  • fieldCash
    Cash = 1

    01 - Cash (Efectivo).

  • fieldCheckOrTransfer
    CheckOrTransfer = 2

    02 - Check or Bank Transfer (Cheque / Transferencia / Depósito).

  • fieldCredit
    Credit = 4

    04 - Credit (A Crédito / Cuentas por Cobrar).

  • fieldCreditNote
    CreditNote = 6

    06 - Credit Note (Nota de Crédito).

  • fieldCreditOrDebitCard
    CreditOrDebitCard = 3

    03 - Credit or Debit Card (Tarjeta de Débito / Crédito).

  • fieldMixed
    Mixed = 7

    07 - Mixed Payments (Mixto).

class

DgiiPrevalidador

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public static class DgiiPrevalidador

Offline deterministic validation and `.DES` packaging engine matching DGII Prevalidador v4.0.0.9 rules for Dominican statutory tax formats `606` (23 columns), `607` (23 columns), `608` (3 columns), `609` (13 columns), and `623` (7 columns), backed by canonical `RncStruct` and `Cedula` checksums.

Miembros (6)

  • methodBuildDesPackage
    public static Result<byte[]> BuildDesPackage(string? entryFileName, string? validatedTextContent)

    Builds a DGII Prevalidador `.DES` submission package (ZIP archive obfuscated with byte-wise XOR `0x05`).

    entryFileName: string?
    The inner text file name (e.g., `DGII_F_606_101010101_202610.TXT`).
    validatedTextContent: string?
    The validated pipe-delimited text content.

    Retorna: A `Result<T>` containing the `.DES` binary payload.

  • methodValidate606
    public static Result<DgiiPrevalidationReport> Validate606(string? fileContent, string? expectedIssuerTaxId = null)

    Validates a pipe-delimited DGII Format 606 (Purchases of Goods and Services, 23 detail columns) submission text.

    fileContent: string?
    The full pipe-delimited 606 text content.
    expectedIssuerTaxId: string?
    Optional expected issuer RNC/Cédula.

    Retorna: A `Result<DgiiPrevalidationReport>` containing the validation report.

  • methodValidate607
    public static Result<DgiiPrevalidationReport> Validate607(string? fileContent, string? expectedIssuerTaxId = null)

    Validates a pipe-delimited DGII Format 607 (Sales of Goods and Services, 23 detail columns) submission text.

    fileContent: string?
    The full pipe-delimited 607 text content.
    expectedIssuerTaxId: string?
    Optional expected issuer RNC/Cédula.

    Retorna: A `Result<DgiiPrevalidationReport>` containing the validation report.

  • methodValidate608
    public static Result<DgiiPrevalidationReport> Validate608(string? fileContent, string? expectedIssuerTaxId = null)

    Validates a pipe-delimited DGII Format 608 (Cancelled NCFs, 3 detail columns, annulment types `01`–`10`) submission text.

    fileContent: string?
    The full pipe-delimited 608 text content.
    expectedIssuerTaxId: string?
    Optional expected issuer RNC/Cédula.

    Retorna: A `Result<DgiiPrevalidationReport>` containing the validation report.

  • methodValidate609
    public static Result<DgiiPrevalidationReport> Validate609(string? fileContent, string? expectedIssuerTaxId = null)

    Validates a pipe-delimited DGII Format 609 (Foreign Payments, 13 detail columns) submission text.

    fileContent: string?
    The full pipe-delimited 609 text content.
    expectedIssuerTaxId: string?
    Optional expected issuer RNC/Cédula.

    Retorna: A `Result<DgiiPrevalidationReport>` containing the validation report.

  • methodValidate623
    public static Result<DgiiPrevalidationReport> Validate623(string? fileContent, string? expectedIssuerTaxId = null)

    Validates a pipe-delimited DGII Format 623 (State Withholdings, 7 detail columns) submission text.

    fileContent: string?
    The full pipe-delimited 623 text content.
    expectedIssuerTaxId: string?
    Optional expected issuer RNC/Cédula.

    Retorna: A `Result<DgiiPrevalidationReport>` containing the validation report.

record

DgiiPrevalidationReport

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public sealed record DgiiPrevalidationReport

Represents the statutory Dominican Republic DGII validation result produced by `DgiiPrevalidador`.

Miembros (6)

  • propertyErrors
    public System.Collections.Generic.IReadOnlyList<string> Errors { get; }

    Gets the immutable list of deterministic validation error messages.

  • propertyFormatCode
    public string FormatCode { get; }

    Gets the DGII format identifier (e.g., `606`, `607`, `608`, `609`, `623`).

  • propertyIsValid
    public bool IsValid { get; }

    Gets a value indicating whether all header and row invariants passed without errors.

  • propertyIssuerTaxId
    public string IssuerTaxId { get; }

    Gets the validated issuer RNC or Cédula from the header.

  • propertyPeriod
    public string Period { get; }

    Gets the validated fiscal period (`YYYYMM` or `YYYY`).

  • propertyValidatedRowCount
    public int ValidatedRowCount { get; }

    Gets the number of detail rows validated.

record

DgiiWithholdingRate

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public readonly record struct DgiiWithholdingRate : IValueObject<DgiiWithholdingRate>, IEquatable<DgiiWithholdingRate>, IComparable<DgiiWithholdingRate>
Implementa: IComparable<DgiiWithholdingRate>, IEquatable<DgiiWithholdingRate>, IValueObject<DgiiWithholdingRate>

Represents a Dominican Republic statutory tax withholding rate (ISR / ITBIS retention) per Ley 11-92 Código Tributario (Art. 309) and Norma General DGII 02-05 / 07-07 / 01-11.

Miembros (20)

  • methodCompareTo
    public int CompareTo(DgiiWithholdingRate other)

    Inherits documentation from base type or interface.

    other: DgiiWithholdingRate
  • methodComputeWithholding
    public Result<decimal> ComputeWithholding(decimal baseAmount, int decimals = 2)

    Computes the rounded withholding amount for a given base amount.

    baseAmount: decimal
    The non-negative taxable base or ITBIS amount.
    decimals: int
    Decimal rounding precision (defaults to 2).

    Retorna: A `Result<Decimal>` with the computed withholding amount.

  • methodCreate
    public static Result<DgiiWithholdingRate> Create(decimal percentage, bool requireStatutoryRate = false)

    Creates a `DgiiWithholdingRate` from a percentage in [0, 100].

    percentage: decimal
    The percentage rate (e.g., `10m` for 10%).
    requireStatutoryRate: bool
    When `true`, rejects rates outside canonical DGII norms.

    Retorna: A `Result<DgiiWithholdingRate>` containing the validated rate or an error.

  • methodFromFraction
    public static Result<DgiiWithholdingRate> FromFraction(decimal fraction, bool requireStatutoryRate = false)

    Creates a `DgiiWithholdingRate` from a decimal fraction in [0.00, 1.00].

    fraction: decimal
    The fractional retention rate (e.g., `0.10m` for 10%).
    requireStatutoryRate: bool
    When `true`, rejects rates outside canonical DGII norms.

    Retorna: A `Result<DgiiWithholdingRate>` containing the validated rate or an error.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodoperator <
    public static bool operator <(DgiiWithholdingRate left, DgiiWithholdingRate right)

    Determines whether `left` is strictly less than `right`.

    left: DgiiWithholdingRate
    right: DgiiWithholdingRate
  • methodoperator <=
    public static bool operator <=(DgiiWithholdingRate left, DgiiWithholdingRate right)

    Determines whether `left` is less than or equal to `right`.

    left: DgiiWithholdingRate
    right: DgiiWithholdingRate
  • methodoperator >
    public static bool operator >(DgiiWithholdingRate left, DgiiWithholdingRate right)

    Determines whether `left` is strictly greater than `right`.

    left: DgiiWithholdingRate
    right: DgiiWithholdingRate
  • methodoperator >=
    public static bool operator >=(DgiiWithholdingRate left, DgiiWithholdingRate right)

    Determines whether `left` is greater than or equal to `right`.

    left: DgiiWithholdingRate
    right: DgiiWithholdingRate
  • propertyFraction
    public decimal Fraction { get; }

    Gets the fractional retention rate in [0.00, 1.00].

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this struct was initialized through a factory or statutory constant.

  • propertyIsStatutory
    public bool IsStatutory { get; }

    Gets a value indicating whether this instance represents a statutory DGII rate.

  • propertyIsrNonResidentTwentySevenPercent
    public static DgiiWithholdingRate IsrNonResidentTwentySevenPercent { get; }

    27% — Payments abroad to non-residents (Art. 305 Ley 11-92).

  • propertyIsrProfessionalTenPercent
    public static DgiiWithholdingRate IsrProfessionalTenPercent { get; }

    10% — Professional fees, commissions, and property rentals paid to individuals (Art. 309 Ley 11-92).

  • propertyIsrStateFivePercent
    public static DgiiWithholdingRate IsrStateFivePercent { get; }

    5% — State payments to suppliers of goods and services (Ley 253-12 Art. 10).

  • propertyIsrTwoPercent
    public static DgiiWithholdingRate IsrTwoPercent { get; }

    2% — Technical/transport/construction payments to individuals or state contractor retention (Norma 07-07 / Ley 253-12).

  • propertyItbisOneHundredPercent
    public static DgiiWithholdingRate ItbisOneHundredPercent { get; }

    100% — Full ITBIS retention on informal/unregistered providers or security services (Norma 02-05 / 07-09).

  • propertyItbisThirtyPercent
    public static DgiiWithholdingRate ItbisThirtyPercent { get; }

    30% — ITBIS retention on professional services between corporate entities (Norma 02-05).

  • propertyPercentage
    public decimal Percentage { get; }

    Gets the percentage representation in [0, 100].

  • propertyZero
    public static DgiiWithholdingRate Zero { get; }

    0% — Exempt / no withholding.

enum

DominicanDeclarationType

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public enum DominicanDeclarationType

Identifies a Dominican Republic DGII tax return or informational report type.

Miembros (11)

  • fieldFormat606
    Format606 = 1

    Format 606 — Purchases of Goods and Services.

  • fieldFormat607
    Format607 = 2

    Format 607 — Sales of Goods and Services.

  • fieldFormat608
    Format608 = 3

    Format 608 — Cancelled Fiscal Receipts.

  • fieldFormat609
    Format609 = 4

    Format 609 — Foreign Payments.

  • fieldIr1
    Ir1 = 6

    IR-1 — Annual Individual Income Tax Return.

  • fieldIr17
    Ir17 = 9

    IR-17 — Monthly Other Withholdings and Fringe Benefits Return.

  • fieldIr2
    Ir2 = 7

    IR-2 — Annual Corporate Income Tax Return.

  • fieldIr3
    Ir3 = 8

    IR-3 — Monthly Payroll Withholding Return.

  • fieldIt1
    It1 = 5

    IT-1 — Monthly Value-Added Tax (ITBIS) Return.

  • fieldRstAnnual
    RstAnnual = 10

    Annual Simplified Taxation Regime (RST) Return.

  • fieldTaxableAssets
    TaxableAssets = 11

    Taxable Corporate Assets Declaration (Impuesto a los Activos).

class

DominicanTaxObligationResolver

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public static class DominicanTaxObligationResolver

Pure statutory resolver determining DGII filing obligations and exemptions across Ordinary, RST (Decree 265-19), and Export Free Zone (Law 8-90) regimes.

Miembros (1)

  • methodResolve
    public static Result<TaxObligationResolution> Resolve(DominicanTaxRegime regime, DominicanDeclarationType declarationType, FiscalPeriod? period)

    Resolves the statutory filing status for a `declarationType` under `regime` in `period`.

    regime: DominicanTaxRegime
    The taxpayer's active tax regime.
    declarationType: DominicanDeclarationType
    The target DGII declaration or informational report.
    period: FiscalPeriod?
    The validated fiscal period.

    Retorna: A `Result<TaxObligationResolution>` detailing whether the filing is mandatory, conditional, or exempt.

enum

DominicanTaxRegime

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public enum DominicanTaxRegime

Identifies the Dominican Republic taxpayer regime for DGII statutory obligation resolution.

Miembros (3)

  • fieldFreeZone
    FreeZone = 3

    Export Free Zone Regime (Zonas Francas de Exportación — Ley 8-90).

  • fieldOrdinary
    Ordinary = 1

    Ordinary taxpayer regime (Régimen Ordinario).

  • fieldRst
    Rst = 2

    Simplified Taxation Regime (Régimen Simplificado de Tributación — Decreto 265-19).

record

EcfAuthSeed

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public sealed record EcfAuthSeed : IValueObject<EcfAuthSeed>
Implementa: IValueObject<EcfAuthSeed>

Immutable Value Object representing a DGII e-CF authentication challenge seed token (`Semilla`). Used in the DGII Web Services authentication handshake flow for digital signature exchange.

Miembros (21)

  • methodCreate
    public static Result<EcfAuthSeed> Create(string? seedValue, Rnc taxpayerRnc, DateTimeOffset generatedAt, DateTimeOffset expiresAt)

    Creates a validated `EcfAuthSeed` instance accepting strongly typed `Rnc`.

    seedValue: string?
    taxpayerRnc: Rnc
    generatedAt: DateTimeOffset
    expiresAt: DateTimeOffset
  • methodCreate
    public static Result<EcfAuthSeed> Create(string? seedValue, string? receiverRnc, DateTimeOffset generatedAt, DateTimeOffset expiresAt)

    Creates a validated `EcfAuthSeed` instance.

    seedValue: string?
    receiverRnc: string?
    generatedAt: DateTimeOffset
    expiresAt: DateTimeOffset
  • methodCreateWithExpiration
    public static EcfAuthSeed CreateWithExpiration(string seedValue, string receiverRnc, int expirationMinutes = DefaultExpirationMinutes)

    Creates a new validated seed with the specified expiration in minutes.

    seedValue: string
    The challenge seed string.
    receiverRnc: string
    The receiver taxpayer identification number.
    expirationMinutes: int
    The expiration duration in minutes.

    Retorna: A new `EcfAuthSeed` instance.

  • methodCreateWithStandardExpiration
    public static Result<EcfAuthSeed> CreateWithStandardExpiration(string? seedValue, Rnc taxpayerRnc, DateTimeOffset generatedAt, int expirationMinutes = DefaultExpirationMinutes)

    Creates a validated seed with standard expiration duration (5 minutes).

    seedValue: string?
    taxpayerRnc: Rnc
    generatedAt: DateTimeOffset
    expirationMinutes: int
  • methodFromXml
    public static EcfAuthSeed FromXml(string seedValue, string receiverRnc, DateTimeOffset generatedAt, DateTimeOffset expiresAt)

    Reconstitutes a seed from external XML data.

    seedValue: string
    The challenge seed string.
    receiverRnc: string
    The receiver taxpayer identification number.
    generatedAt: DateTimeOffset
    The generation timestamp.
    expiresAt: DateTimeOffset
    The expiration timestamp.

    Retorna: A reconstituted `EcfAuthSeed` instance.

  • methodGenerate
    public static EcfAuthSeed Generate(string receiverRnc, int expirationMinutes = DefaultExpirationMinutes, TimeProvider? timeProvider = null)

    Generates a new fresh seed challenge for the specified receiver RNC.

    receiverRnc: string
    The receiver taxpayer identification number.
    expirationMinutes: int
    The expiration duration in minutes.
    timeProvider: TimeProvider?
    An optional time provider.

    Retorna: A newly generated `EcfAuthSeed` instance.

  • methodIsExpiredAsOf
    public bool IsExpiredAsOf(DateTimeOffset asOf)

    Checks whether the seed is expired as of a specific timestamp.

    asOf: DateTimeOffset
    The timestamp to evaluate.

    Retorna: `true` if the seed is expired as of the specified timestamp; otherwise, `false`.

  • methodIsExpiredAt
    public bool IsExpiredAt(DateTimeOffset asOf)

    Alias overload for compatibility with older tests.

    asOf: DateTimeOffset
    The timestamp to evaluate.

    Retorna: `true` if the seed is expired as of the specified timestamp; otherwise, `false`.

  • methodReconstitute
    public static EcfAuthSeed Reconstitute(string seedValue, string receiverRnc, DateTimeOffset generatedAt, DateTimeOffset expiresAt)

    Reconstitutes an instance from persistence storage without validation.

    seedValue: string
    The challenge seed string.
    receiverRnc: string
    The receiver taxpayer identification number.
    generatedAt: DateTimeOffset
    The generation timestamp.
    expiresAt: DateTimeOffset
    The expiration timestamp.

    Retorna: A reconstituted `EcfAuthSeed` instance.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodValidateExpiration
    public void ValidateExpiration()

    Validates that the seed has not expired.

  • propertyAmbientTimeProvider
    public static TimeProvider AmbientTimeProvider { get; set; }

    Sets or gets the ambient TimeProvider for expiration checks.

  • propertyExpiresAt
    public DateTimeOffset ExpiresAt { get; }

    Gets the expiration timestamp (UTC).

  • propertyGeneratedAt
    public DateTimeOffset GeneratedAt { get; }

    Gets the generation timestamp (UTC).

  • propertyIsExpired
    public bool IsExpired { get; }

    Gets a value indicating whether the seed challenge token has expired based on current UTC time.

  • propertyRNC
    public string RNC { get; }

    Alias for `ReceiverRnc`.

  • propertyReceiverRnc
    public string ReceiverRnc { get; }

    Gets the RNC of the receiver/issuer requesting or receiving the seed.

  • propertyRemainingTime
    public TimeSpan RemainingTime { get; }

    Gets the remaining validity time before expiration.

  • propertySeedValue
    public string SeedValue { get; }

    Gets the raw cryptographic seed string value.

  • propertyTaxpayerRnc
    public string TaxpayerRnc { get; }

    Alias for `ReceiverRnc`.

  • propertyValue
    public string Value { get; }

    Alias for `SeedValue`.

record

EcfDocumentReference

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public readonly record struct EcfDocumentReference : IValueObject<EcfDocumentReference>, IEquatable<EcfDocumentReference>
Implementa: IEquatable<EcfDocumentReference>, IValueObject<EcfDocumentReference>

Represents DGII e-CF `InformacionReferencia` modification metadata required on Credit Notes (`E34`/`B04`), Debit Notes (`E33`/`B03`), and replacement invoices per General Norm 05-2019 and DGII e-CF Technical Specification v1.0.

Miembros (7)

  • methodCreate
    public static Result<EcfDocumentReference> Create(string? referencedNcf, DateOnly referenceDate, string? modificationCode, DateOnly? evaluationDate = null)

    Creates a validated `EcfDocumentReference` enforcing DGII Modification Code rules (including exclusive `05` applicability to `E32` consumer electronic invoices).

    referencedNcf: string?
    The original NCF or e-NCF being modified.
    referenceDate: DateOnly
    The date of the referenced document.
    modificationCode: string?
    DGII modification code (`01`=Cancel Total, `02`=Correct Text, `03`=Correct Amount, `04`=Contingency Replacement, `05`=E32 Consumer Reference).
    evaluationDate: DateOnly?
    Optional current UTC/local date to guard against future-dated references.

    Retorna: A `Result<EcfDocumentReference>` containing the validated struct or an error.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this instance is uninitialized (`default(EcfDocumentReference)`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance was initialized through `Create`.

  • propertyModificationCode
    public string ModificationCode { get; }

    Gets the normalized 2-digit DGII modification code (`01`.. `05`).

  • propertyReferenceDate
    public DateOnly ReferenceDate { get; }

    Gets the emission date of the referenced fiscal document.

  • propertyReferencedNcf
    public string ReferencedNcf { get; }

    Gets the referenced original NCF or e-NCF string (11-character Serie B or 13-character Serie E).

record

EcfInformationalSubtotal

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public sealed record EcfInformationalSubtotal : ValueObject
Hereda de: ValueObject

DGII-required informational subtotals and balance invariant for electronic invoice (e-CF) documents according to Norma General 05-2019 and Law 32-23.

Miembros (12)

  • methodCreate
    public static Result<EcfInformationalSubtotal> Create(Money taxedAmountTotal, Money taxedAmountReduced, Money exemptAmount, Money totalItbis, Money totalItbisReduced, Money nonBillableAmount, Money totalAmount, Money nonTaxableAmount, Money iscAmount, Money otherTaxesAmount)

    Creates a validated `EcfInformationalSubtotal` instance enforcing DGII balance invariants.

    taxedAmountTotal: Money
    taxedAmountReduced: Money
    exemptAmount: Money
    totalItbis: Money
    totalItbisReduced: Money
    nonBillableAmount: Money
    totalAmount: Money
    nonTaxableAmount: Money
    iscAmount: Money
    otherTaxesAmount: Money
  • propertyExemptAmount
    public Money ExemptAmount { get; }

    Sum of exempt items (Monto Exento).

  • propertyIscAmount
    public Money IscAmount { get; }

    Impuesto Selectivo al Consumo (ISC - Excise tax).

  • propertyNonBillableAmount
    public Money NonBillableAmount { get; }

    Non-billable amount (tips, deposits, retenciones legales informativas).

  • propertyNonTaxableAmount
    public Money NonTaxableAmount { get; }

    Non-taxable amount (Monto No Gravado).

  • propertyOtherTaxesAmount
    public Money OtherTaxesAmount { get; }

    Other taxes not classified in standard buckets (Otros Impuestos / Tasas).

  • propertyTaxedAmountReduced
    public Money TaxedAmountReduced { get; }

    Sum of items taxed at reduced 16% ITBIS rate (tourism / food service).

  • propertyTaxedAmountTotal
    public Money TaxedAmountTotal { get; }

    Sum of items taxed at standard 18% ITBIS rate.

  • propertyTotalAmount
    public Money TotalAmount { get; }

    Grand total of the document (Monto Total).

  • propertyTotalItbis
    public Money TotalItbis { get; }

    Total ITBIS on 18% items.

  • propertyTotalItbisReduced
    public Money TotalItbisReduced { get; }

    Total ITBIS on 16% items.

  • fieldDgiiTolerance
    public static readonly decimal DgiiTolerance

    Maximum allowed rounding tolerance in DGII tax calculations (RD$ 0.50).

record

EcfType

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public readonly record struct EcfType : IComparable<EcfType>, IComparable, ISpanParsable<EcfType>
Implementa: IComparable, IComparable<EcfType>, ISpanParsable<EcfType>

Represents the Dominican Republic Electronic NCF (e-CF) Type (Serie E) established under Law 32-23.

Miembros (28)

  • methodCompareTo
    public int CompareTo(EcfType other)

    Inherits documentation from base type or interface.

    other: EcfType
  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?
  • methodCreate
    public static Result<EcfType> Create(string? code)

    Creates a validated `EcfType` from a 2-digit code string.

    code: string?
    The 2-digit e-CF type code.

    Retorna: A `Result<EcfType>` containing the created instance or a validation error.

  • methodParse
    public static EcfType Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static EcfType Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out EcfType result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out EcfType
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out EcfType result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out EcfType
  • methodoperator <
    public static bool operator <(EcfType left, EcfType right)

    Determines whether the left `EcfType` is less than the right `EcfType`.

    left: EcfType
    The first `EcfType` to compare.
    right: EcfType
    The second `EcfType` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(EcfType left, EcfType right)

    Determines whether the left `EcfType` is less than or equal to the right `EcfType`.

    left: EcfType
    The first `EcfType` to compare.
    right: EcfType
    The second `EcfType` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(EcfType left, EcfType right)

    Determines whether the left `EcfType` is greater than the right `EcfType`.

    left: EcfType
    The first `EcfType` to compare.
    right: EcfType
    The second `EcfType` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(EcfType left, EcfType right)

    Determines whether the left `EcfType` is greater than or equal to the right `EcfType`.

    left: EcfType
    The first `EcfType` to compare.
    right: EcfType
    The second `EcfType` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCode
    public string Code { get; }

    Gets the 2-digit e-CF type code (e.g. "31").

  • propertyDescription
    public string Description { get; }

    Gets the description and statutory purpose of the e-CF type.

  • propertyElectronicConsumer
    public static EcfType ElectronicConsumer { get; }

    Gets e-CF type 32 (Factura de Consumo Electrónica).

  • propertyElectronicCreditFiscal
    public static EcfType ElectronicCreditFiscal { get; }

    Gets e-CF type 31 (Factura de Crédito Fiscal Electrónica).

  • propertyElectronicCreditNote
    public static EcfType ElectronicCreditNote { get; }

    Gets e-CF type 34 (Nota de Crédito Electrónica).

  • propertyElectronicDebitNote
    public static EcfType ElectronicDebitNote { get; }

    Gets e-CF type 33 (Nota de Débito Electrónica).

  • propertyElectronicExports
    public static EcfType ElectronicExports { get; }

    Gets e-CF type 46 (Exportaciones Electrónico).

  • propertyElectronicForeignPayments
    public static EcfType ElectronicForeignPayments { get; }

    Gets e-CF type 47 (Pagos al Exterior Electrónico).

  • propertyElectronicGovernmental
    public static EcfType ElectronicGovernmental { get; }

    Gets e-CF type 45 (Gubernamental Electrónico).

  • propertyElectronicMinorExpenses
    public static EcfType ElectronicMinorExpenses { get; }

    Gets e-CF type 43 (Gastos Menores Electrónico).

  • propertyElectronicPurchases
    public static EcfType ElectronicPurchases { get; }

    Gets e-CF type 41 (Compras Electrónico).

  • propertyElectronicSpecialRegimes
    public static EcfType ElectronicSpecialRegimes { get; }

    Gets e-CF type 44 (Regímenes Especiales Electrónico).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `EcfType` instance was initialized through a factory rather than `default(EcfType)`.

  • propertyName
    public string Name { get; }

    Gets the official name of the e-CF type.

  • propertyRequiresBuyerTaxpayerId
    public bool RequiresBuyerTaxpayerId { get; }

    Indicates if the buyer's RNC/Cédula is legally mandatory on this invoice type.

  • propertyTaxCreditEligible
    public bool TaxCreditEligible { get; }

    Indicates if this electronic invoice type confers tax credit (deductible for ITBIS and ISR).

record

ElectronicNcf

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public sealed record ElectronicNcf : StringValueObject<ElectronicNcf>
Hereda de: StringValueObject<ElectronicNcf>

Represents a Dominican Republic Electronic NCF (e-CF) Serie E governed by Law 32-23. Format: 13 characters: `E` + 2 digits type + 10 digits sequential number (e.g. `E310000000001`).

Miembros (11)

  • methodCreate
    public static Result<ElectronicNcf> Create(EcfType type, long sequence, SecurityCode? securityCode = null)

    Creates an `ElectronicNcf` from a strongly-typed `EcfType` and 10-digit sequential number.

    type: EcfType
    The electronic NCF document type.
    sequence: long
    The sequential number between 1 and 9,999,999,999.
    securityCode: SecurityCode?
    The optional DGII security code to associate with the NCF.

    Retorna: A `Result<ElectronicNcf>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<ElectronicNcf> Create(string? value, SecurityCode? securityCode = null)

    Creates an `ElectronicNcf` from a raw 13-character string (e.g. `E310000000001`).

    value: string?
    The raw 13-character electronic NCF string.
    securityCode: SecurityCode?
    The optional DGII security code to associate with the NCF.

    Retorna: A `Result<ElectronicNcf>` containing the validated instance or a domain validation error.

  • methodFromStruct
    public static ElectronicNcf FromStruct(EncfStruct encfStruct)

    Creates an `ElectronicNcf` class instance from an `EncfStruct`.

    encfStruct: EncfStruct
  • methodToStruct
    public EncfStruct ToStruct()

    Converts this class instance to a zero-allocation `EncfStruct` value type.

  • methodWithSecurityCode
    public ElectronicNcf WithSecurityCode(SecurityCode securityCode)

    Returns a new instance associated with the provided DGII `SecurityCode`.

    securityCode: SecurityCode
    The DGII security code to associate.

    Retorna: A new `ElectronicNcf` instance with the specified security code.

    Exceptions: ArgumentException: `securityCode` is empty or uninitialized.

  • methodexplicit operator EncfStruct
    public static explicit operator EncfStruct(ElectronicNcf? ncf)

    Explicit conversion from `ElectronicNcf` class to `EncfStruct`.

    ncf: ElectronicNcf?
  • methodimplicit operator ElectronicNcf
    public static implicit operator ElectronicNcf(EncfStruct encfStruct)

    Implicit conversion from `EncfStruct` to `ElectronicNcf` class.

    encfStruct: EncfStruct
  • propertySecurityCode
    public SecurityCode? SecurityCode { get; }

    Gets the associated DGII security code, if present.

  • propertySequence
    public long Sequence { get; }

    Gets the 10-digit sequential number.

  • propertyType
    public EcfType Type { get; }

    Gets the electronic NCF type.

  • fieldSeries
    public const char Series

    Gets the electronic NCF series prefix ('E').

record

EncfStruct

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public readonly record struct EncfStruct : IEquatable<EncfStruct>, IComparable<EncfStruct>
Implementa: IComparable<EncfStruct>, IEquatable<EncfStruct>

High-performance, zero-allocation readonly record struct representing a Dominican Republic Electronic NCF (e-CF) Serie E governed by Law 32-23. Format: 13 characters (`E` + 2-digit type + 10-digit sequence, e.g. `E310000000001`). Stack-allocated value type designed for high-throughput electronic invoicing pipelines without GC pressure.

Miembros (26)

  • methodCompareTo
    public int CompareTo(EncfStruct other)

    Inherits documentation from base type or interface.

    other: EncfStruct
  • methodCreate
    public static Result<EncfStruct> Create(EcfType type, long sequence)

    Creates an `EncfStruct` from a strongly-typed `EcfType` and 10-digit sequential number.

    type: EcfType
    The electronic NCF document type.
    sequence: long
    The sequential number between 1 and 9,999,999,999.

    Retorna: A `Result<EncfStruct>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<EncfStruct> Create(string? value)

    Creates a validated `EncfStruct` from a raw 13-character or 21-character string (e.g. `E310000000001`).

    value: string?
    The raw 13-character or 21-character electronic NCF string.

    Retorna: A `Result<EncfStruct>` containing the validated struct or a domain validation error.

  • methodFromClass
    public static EncfStruct FromClass(ElectronicNcf? ncf)

    Creates an `EncfStruct` from an existing `ElectronicNcf` class instance.

    ncf: ElectronicNcf?
    The class instance to convert from.

    Retorna: An `EncfStruct` instance.

  • methodToClass
    public ElectronicNcf? ToClass()

    Converts this struct to the heap-allocated `ElectronicNcf` class instance.

    Retorna: A new `ElectronicNcf` class instance.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(string? value, out EncfStruct result)

    Tries to parse and validate an e-NCF string.

    value: string?
    The e-NCF string to validate and parse.
    result: out EncfStruct
    When this method returns, contains the parsed struct if successful, or default.

    Retorna: `true` if successfully parsed and valid; otherwise, `false`.

  • methodUnsafe
    public static EncfStruct Unsafe(string? value)

    Creates an `EncfStruct` from a pre-validated value without re-validation.

    value: string?
    A pre-validated e-NCF string.

    Retorna: An `EncfStruct` instance.

  • methodexplicit operator ElectronicNcf
    public static explicit operator ElectronicNcf(EncfStruct encf)

    Explicit conversion from `EncfStruct` to `ElectronicNcf` class.

    encf: EncfStruct
  • methodimplicit operator EncfStruct
    public static implicit operator EncfStruct(ElectronicNcf? ncf)

    Implicit conversion from `ElectronicNcf` class to zero-allocation `EncfStruct`.

    ncf: ElectronicNcf?
  • methodimplicit operator string
    public static implicit operator string(EncfStruct encf)

    Implicit conversion to string representation.

    encf: EncfStruct
  • methodoperator <
    public static bool operator <(EncfStruct left, EncfStruct right)

    Compares two `EncfStruct` instances for less-than relation.

    left: EncfStruct
    right: EncfStruct
  • methodoperator <=
    public static bool operator <=(EncfStruct left, EncfStruct right)

    Compares two `EncfStruct` instances for less-than-or-equal relation.

    left: EncfStruct
    right: EncfStruct
  • methodoperator >
    public static bool operator >(EncfStruct left, EncfStruct right)

    Compares two `EncfStruct` instances for greater-than relation.

    left: EncfStruct
    right: EncfStruct
  • methodoperator >=
    public static bool operator >=(EncfStruct left, EncfStruct right)

    Compares two `EncfStruct` instances for greater-than-or-equal relation.

    left: EncfStruct
    right: EncfStruct
  • propertyEmpty
    public static EncfStruct Empty { get; }

    Represents an empty or uninitialized `EncfStruct`.

  • propertyHasSecurityCode
    public bool HasSecurityCode { get; }

    Gets a value indicating whether this e-NCF includes an 8-character extended security code.

  • propertyHasValue
    public bool HasValue { get; }

    Gets a value indicating whether this e-NCF has a valid, non-empty value.

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this e-NCF is empty or uninitialized.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance was initialized through a factory rather than `default(EncfStruct)`.

  • propertySecurityCode
    public string? SecurityCode { get; }

    Gets the optional 8-character security code when this e-NCF is in extended 21-character format; otherwise `null`.

  • propertySequence
    public long Sequence { get; }

    Gets the 10-digit sequential numeric value.

  • propertyType
    public EcfType? Type { get; }

    Gets the strongly-typed `EcfType` document type, if valid.

  • propertyTypeCode
    public string TypeCode { get; }

    Gets the 2-digit e-CF document type code (e.g. "31", "32", "33", "34", "41", "43", "44", "45", "46", "47").

  • propertyValue
    public string Value { get; }

    Gets the normalized 13-character e-NCF string (e.g. `E310000000001`).

  • fieldSeries
    public const char Series

    Gets the electronic NCF series prefix ('E').

record

FiscalPeriod

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public readonly record struct FiscalPeriod : IValueObject<FiscalPeriod>, IComparable<FiscalPeriod>, IComparable, ISpanParsable<FiscalPeriod>
Implementa: IComparable, IComparable<FiscalPeriod>, ISpanParsable<FiscalPeriod>, IValueObject<FiscalPeriod>

Represents a fiscal year-month period (e.g., 2024-01 = January 2024). Supports sequential navigation and comparison. Rules: Year in [2000, 2100], Month in [1, 12]. Used by: Fiscal, Accounting, Billing Navigation: `Next` and `Previous` return `Result<FiscalPeriod>` to prevent silent creation of out-of-range periods at the year boundaries. Boundary note: This VO lives in the Fiscal bounded context because fiscal periods are a financial/accounting concept. It assumes calendar-year fiscal periods (January–December). For jurisdictions with non-calendar fiscal years (e.g., UK April–March, Japan April–March), the consuming BC must implement its own fiscal year mapping on top of this VO.

Miembros (23)

  • methodCompareTo
    public int CompareTo(FiscalPeriod other)

    Inherits documentation from base type or interface.

    other: FiscalPeriod
  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?
  • methodCreate
    public static Result<FiscalPeriod> Create(int year, int month)

    Creates a `FiscalPeriod` from year and month integers.

    year: int
    The calendar year (2000–2100 inclusive).
    month: int
    The calendar month (1–12 inclusive).

    Retorna: A `Result<FiscalPeriod>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<FiscalPeriod> Create(string? value)

    Parses a string representation in either `YYYYMM` (e.g. `202608`) or `YYYY-MM` (e.g. `2026-08`).

    value: string?
    A string in `YYYYMM` or `YYYY-MM` format.

    Retorna: A `Result<FiscalPeriod>` containing the validated instance or a domain validation error.

  • methodFromDate
    public static FiscalPeriod FromDate(DateOnly date)

    Creates a `FiscalPeriod` containing the specified date.

    date: DateOnly
    The calendar date.

    Retorna: A new `FiscalPeriod` instance.

  • methodIsDue
    public bool IsDue(DateOnly currentDate)

    Checks whether the filing deadline has elapsed relative to the provided reference date.

    currentDate: DateOnly
    The reference date to evaluate.

    Retorna: `true` if the filing deadline has elapsed; otherwise, `false`.

  • methodNext
    public FiscalPeriod Next()

    Gets the next sequential fiscal period.

    Retorna: The next sequential `FiscalPeriod`.

  • methodParse
    public static FiscalPeriod Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static FiscalPeriod Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodPrevious
    public FiscalPeriod Previous()

    Gets the previous sequential fiscal period.

    Retorna: The previous sequential `FiscalPeriod`.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out FiscalPeriod result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out FiscalPeriod
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out FiscalPeriod result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out FiscalPeriod
  • methodoperator <
    public static bool operator <(FiscalPeriod left, FiscalPeriod right)

    Determines whether the left `FiscalPeriod` is less than the right `FiscalPeriod`.

    left: FiscalPeriod
    The first `FiscalPeriod` to compare.
    right: FiscalPeriod
    The second `FiscalPeriod` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(FiscalPeriod left, FiscalPeriod right)

    Determines whether the left `FiscalPeriod` is less than or equal to the right `FiscalPeriod`.

    left: FiscalPeriod
    The first `FiscalPeriod` to compare.
    right: FiscalPeriod
    The second `FiscalPeriod` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(FiscalPeriod left, FiscalPeriod right)

    Determines whether the left `FiscalPeriod` is greater than the right `FiscalPeriod`.

    left: FiscalPeriod
    The first `FiscalPeriod` to compare.
    right: FiscalPeriod
    The second `FiscalPeriod` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(FiscalPeriod left, FiscalPeriod right)

    Determines whether the left `FiscalPeriod` is greater than or equal to the right `FiscalPeriod`.

    left: FiscalPeriod
    The first `FiscalPeriod` to compare.
    right: FiscalPeriod
    The second `FiscalPeriod` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyEnd
    public DateOnly End { get; }

    Gets the last date of the fiscal period.

  • propertyFilingDeadline
    public DateOnly FilingDeadline { get; }

    Gets the statutory DGII filing deadline for this period (the 20th day of the following month).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance was initialized through a factory rather than default(FiscalPeriod).

  • propertyMonth
    public int Month { get; }

    Gets the month (1-12).

  • propertyStart
    public DateOnly Start { get; }

    Gets the first date of the fiscal period.

  • propertyYear
    public int Year { get; }

    Gets the calendar year.

class

HolidayCalendarService

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public static class HolidayCalendarService

Domain service implementing the official Dominican Republic statutory holiday calendar (Ley 139-97), including statutory shifts to Monday and Meeus/Jones/Butcher astronomical Easter calculations.

Miembros (7)

  • methodApplyLey139_97Shift
    public static DateTime ApplyLey139_97Shift(DateTime holidayDate)

    Shifts a movable statutory holiday according to Dominican Republic Ley 139-97: - Tuesday or Wednesday: shifts to the preceding Monday. - Thursday or Friday: shifts to the following Monday. - Monday, Saturday, or Sunday: no shift (remains on actual calendar date).

    holidayDate: DateTime
    The original calendar date of the movable holiday.

    Retorna: The effective observed holiday date after applying Ley 139-97 rules.

  • methodCalculateEaster
    public static DateTime CalculateEaster(int year)

    Calculates Easter Sunday for a given Gregorian year using the Meeus/Jones/Butcher algorithm.

    year: int
    The Gregorian calendar year.

    Retorna: A `DateTime` representing Easter Sunday of the specified year.

  • methodGetHolidays
    public static IReadOnlyDictionary<DateTime, string> GetHolidays(int year)

    Retrieves all 12 Dominican Republic statutory holidays for a given year.

    year: int
    The Gregorian calendar year.

    Retorna: A read-only dictionary mapping each observed holiday date to its official Spanish name.

  • methodGetNextBusinessDay
    public static DateTime GetNextBusinessDay(DateTime date)

    Advances from the given date to the next valid business day. If the given date is already a business day, advances to the next business day.

    date: DateTime
    The starting calendar date.

    Retorna: The next calendar date that is a valid business day.

  • methodIsBusinessDay
    public static bool IsBusinessDay(DateTime date)

    Determines whether a given date is a business day (not a Saturday, Sunday, or statutory holiday).

    date: DateTime
    The calendar date to evaluate.

    Retorna: `true` if the date is a valid business day; otherwise, `false`.

  • methodIsHoliday
    public static bool IsHoliday(DateTime date)

    Checks whether a given calendar date is a Dominican Republic statutory holiday.

    date: DateTime
    The calendar date to check.

    Retorna: `true` if the date is an observed statutory holiday; otherwise, `false`.

  • methodIsHoliday
    public static bool IsHoliday(DateTime date, out string? holidayName)

    Checks whether a given calendar date is a Dominican Republic statutory holiday and outputs its official name.

    date: DateTime
    The calendar date to check.
    holidayName: out string?
    When this method returns, contains the official holiday name if `date` is a holiday, or `null` otherwise.

    Retorna: `true` if the date is an observed statutory holiday; otherwise, `false`.

record

Ncf

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public sealed record Ncf : StringValueObject<Ncf>
Hereda de: StringValueObject<Ncf>

Represents a traditional Dominican Republic NCF (Número de Comprobante Fiscal) Serie B. Format: 11 characters: `B` + 2 digits type + 8 digits sequential number (e.g. `B0100000001`).

Miembros (5)

  • methodCreate
    public static Result<Ncf> Create(NcfType type, int sequence)

    Creates an `Ncf` from a strongly-typed `NcfType` and integer sequence.

    type: NcfType
    The traditional NCF document type.
    sequence: int
    The sequential number between 1 and 99,999,999.

    Retorna: A `Result<Ncf>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Ncf> Create(string? value)

    Creates an `Ncf` from a raw 11-character string (e.g. `B0100000001`).

    value: string?
    The raw 11-character traditional NCF string.

    Retorna: A `Result<Ncf>` containing the validated instance or a domain validation error.

  • propertySequence
    public int Sequence { get; }

    Gets the 8-digit sequential number.

  • propertyType
    public NcfType Type { get; }

    Gets the traditional NCF type.

  • fieldSeries
    public const char Series

    Gets the traditional NCF series prefix ('B').

record

NcfExpirationDate

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public readonly record struct NcfExpirationDate : IValueObject<NcfExpirationDate>, IComparable<NcfExpirationDate>, IComparable, ISpanParsable<NcfExpirationDate>
Implementa: IComparable, IComparable<NcfExpirationDate>, ISpanParsable<NcfExpirationDate>, IValueObject<NcfExpirationDate>

Represents the statutory expiration date of DGII-authorized NCF Serie B sequences. Under DGII regulations, traditional sequences expire on December 31st of the year following authorization. Immutable, allocation-free readonly struct.

Miembros (18)

  • methodCompareTo
    public int CompareTo(NcfExpirationDate other)

    Inherits documentation from base type or interface.

    other: NcfExpirationDate
  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?
  • methodCreate
    public static Result<NcfExpirationDate> Create(DateOnly value)

    Creates an `NcfExpirationDate` from a specific `DateOnly`.

    value: DateOnly
    The calendar expiration date.

    Retorna: A `Result<NcfExpirationDate>` containing the validated instance or a validation error.

  • methodCreate
    public static Result<NcfExpirationDate> Create(ReadOnlySpan<char> input)

    Creates an `NcfExpirationDate` from a character span in yyyy-MM-dd format.

    input: ReadOnlySpan<char>
    The span representation of the expiration date.

    Retorna: A `Result<NcfExpirationDate>` containing the validated instance or a validation error.

  • methodCreate
    public static Result<NcfExpirationDate> Create(string? value)

    Creates an `NcfExpirationDate` from a string in yyyy-MM-dd format.

    value: string?
    The string formatted date (yyyy-MM-dd).

    Retorna: A `Result<NcfExpirationDate>` containing the validated instance or a validation error.

  • methodFromAuthorizationYear
    public static NcfExpirationDate FromAuthorizationYear(int authorizationYear)

    Calculates the standard statutory DGII expiration date from the authorization year (December 31st of the following calendar year).

    authorizationYear: int
    The statutory authorization year.

    Retorna: The calculated statutory `NcfExpirationDate`.

  • methodIsExpired
    public bool IsExpired(DateOnly currentDate)

    Checks whether this sequence has expired relative to the given date.

    currentDate: DateOnly
    The reference date to evaluate.

    Retorna: `true` if expired relative to the specified date; otherwise, `false`.

  • methodParse
    public static NcfExpirationDate Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static NcfExpirationDate Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out NcfExpirationDate result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out NcfExpirationDate
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out NcfExpirationDate result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out NcfExpirationDate
  • methodoperator <
    public static bool operator <(NcfExpirationDate left, NcfExpirationDate right)

    Determines whether the left `NcfExpirationDate` is less than the right `NcfExpirationDate`.

    left: NcfExpirationDate
    The first `NcfExpirationDate` to compare.
    right: NcfExpirationDate
    The second `NcfExpirationDate` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(NcfExpirationDate left, NcfExpirationDate right)

    Determines whether the left `NcfExpirationDate` is less than or equal to the right `NcfExpirationDate`.

    left: NcfExpirationDate
    The first `NcfExpirationDate` to compare.
    right: NcfExpirationDate
    The second `NcfExpirationDate` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(NcfExpirationDate left, NcfExpirationDate right)

    Determines whether the left `NcfExpirationDate` is greater than the right `NcfExpirationDate`.

    left: NcfExpirationDate
    The first `NcfExpirationDate` to compare.
    right: NcfExpirationDate
    The second `NcfExpirationDate` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(NcfExpirationDate left, NcfExpirationDate right)

    Determines whether the left `NcfExpirationDate` is greater than or equal to the right `NcfExpirationDate`.

    left: NcfExpirationDate
    The first `NcfExpirationDate` to compare.
    right: NcfExpirationDate
    The second `NcfExpirationDate` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `NcfExpirationDate` instance was initialized through a factory rather than `default(NcfExpirationDate)`.

  • propertyValue
    public DateOnly Value { get; }

    Gets the statutory expiration date.

record

NcfType

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public readonly record struct NcfType : IComparable<NcfType>, IComparable, ISpanParsable<NcfType>
Implementa: IComparable, IComparable<NcfType>, ISpanParsable<NcfType>

Represents the standard Dominican Republic NCF (Número de Comprobante Fiscal) Type (Serie B).

Miembros (29)

  • methodCompareTo
    public int CompareTo(NcfType other)

    Inherits documentation from base type or interface.

    other: NcfType
  • methodCompareTo
    public int CompareTo(object? obj)

    Inherits documentation from base type or interface.

    obj: object?
  • methodCreate
    public static Result<NcfType> Create(string? code)

    Creates a validated `NcfType` from a 2-digit code string.

    code: string?
    The 2-digit NCF type code.

    Retorna: A `Result<NcfType>` containing the created instance or a validation error.

  • methodParse
    public static NcfType Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static NcfType Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out NcfType result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out NcfType
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out NcfType result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out NcfType
  • methodoperator <
    public static bool operator <(NcfType left, NcfType right)

    Determines whether the left `NcfType` is less than the right `NcfType`.

    left: NcfType
    The first `NcfType` to compare.
    right: NcfType
    The second `NcfType` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(NcfType left, NcfType right)

    Determines whether the left `NcfType` is less than or equal to the right `NcfType`.

    left: NcfType
    The first `NcfType` to compare.
    right: NcfType
    The second `NcfType` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(NcfType left, NcfType right)

    Determines whether the left `NcfType` is greater than the right `NcfType`.

    left: NcfType
    The first `NcfType` to compare.
    right: NcfType
    The second `NcfType` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(NcfType left, NcfType right)

    Determines whether the left `NcfType` is greater than or equal to the right `NcfType`.

    left: NcfType
    The first `NcfType` to compare.
    right: NcfType
    The second `NcfType` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCode
    public string Code { get; }

    Gets the 2-digit NCF type code (e.g. "01").

  • propertyConsumer
    public static NcfType Consumer { get; }

    Gets NCF type 02 (Factura de Consumo).

  • propertyCreditFiscal
    public static NcfType CreditFiscal { get; }

    Gets NCF type 01 (Factura de Crédito Fiscal).

  • propertyCreditNote
    public static NcfType CreditNote { get; }

    Gets NCF type 04 (Nota de Crédito).

  • propertyDebitNote
    public static NcfType DebitNote { get; }

    Gets NCF type 03 (Nota de Débito).

  • propertyDescription
    public string Description { get; }

    Gets the description and statutory purpose of the NCF type.

  • propertyExports
    public static NcfType Exports { get; }

    Gets NCF type 16 (Exportaciones).

  • propertyForeignPayments
    public static NcfType ForeignPayments { get; }

    Gets NCF type 17 (Pagos al Exterior).

  • propertyGovernmental
    public static NcfType Governmental { get; }

    Gets NCF type 15 (Gubernamental).

  • propertyInformalSuppliers
    public static NcfType InformalSuppliers { get; }

    Gets NCF type 11 (Registro de Proveedores Informales).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `NcfType` instance was initialized through a factory rather than `default(NcfType)`.

  • propertyMinorExpenses
    public static NcfType MinorExpenses { get; }

    Gets NCF type 13 (Registro de Gastos Menores).

  • propertyName
    public string Name { get; }

    Gets the official name of the NCF type.

  • propertyRequiresBuyerTaxpayerId
    public bool RequiresBuyerTaxpayerId { get; }

    Indicates if the buyer's RNC/Cédula is legally mandatory on this invoice type.

  • propertySingleIncomeRegister
    public static NcfType SingleIncomeRegister { get; }

    Gets NCF type 12 (Registro Único de Ingresos).

  • propertySpecialRegimes
    public static NcfType SpecialRegimes { get; }

    Gets NCF type 14 (Regímenes Especiales).

  • propertyTaxCreditEligible
    public bool TaxCreditEligible { get; }

    Indicates if this invoice type confers tax credit (deductible for ITBIS and ISR).

record

Nss

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public sealed record Nss : StringValueObject<Nss>
Hereda de: StringValueObject<Nss>

Represents a validated Dominican Republic Social Security Number (NSS - Número de Seguridad Social, Tesorería de la Seguridad Social). Exactly 9 numeric digits validated against the official TSS Modulo 10 check-digit algorithm.

Miembros (2)

  • methodCreate
    public static Result<Nss> Create(string? value)

    Creates a validated `Nss` instance from a raw or formatted 9-digit string.

    value: string?
    The raw or formatted 9-digit NSS string (hyphens and non-digit characters are stripped).

    Retorna: A `Result<Nss>` containing the validated instance or a domain validation error.

  • propertyFormatted
    public string Formatted { get; }

    Formats the NSS in the standard format: `XXX-XXXXXX`.

class

NssChecksum

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public static class NssChecksum

High-performance, zero-allocation implementation of the official Dominican TSS Modulo 9 (SUIR Plus / Validador 821, weights 45237926) and Modulo 10 check-digit verification algorithms for 9-digit Dominican Social Security Numbers (NSS - Tesorería de la Seguridad Social).

Miembros (3)

  • methodValidateMod10
    public static bool ValidateMod10(ReadOnlySpan<char> digits)

    Validates whether the 9-digit sequence satisfies the Modulo 10 (Luhn) check-digit algorithm using weights `[1, 2, 1, 2, 1, 2, 1, 2]`.

    digits: ReadOnlySpan<char>
    Exact 9 numeric characters.

    Retorna: `true` if valid under Modulo 10; otherwise `false`.

  • methodValidateNss
    public static bool ValidateNss(ReadOnlySpan<char> digits)

    Validates whether the 9-digit sequence has a valid TSS Modulo 9 (SUIR Plus) or Modulo 10 check digit. Rejects all-zero sequences (`"000000000"`).

    digits: ReadOnlySpan<char>
    Exact 9 numeric characters.

    Retorna: `true` if the check digit matches official TSS specification; otherwise `false`.

  • methodValidateTssMod9
    public static bool ValidateTssMod9(ReadOnlySpan<char> digits)

    Validates whether the 9-digit sequence satisfies the official Dominican TSS SUIR Plus Modulo 9 check-digit algorithm using weights `[4, 5, 2, 3, 7, 9, 2, 6]` (`sum % 9 == checkDigit`).

    digits: ReadOnlySpan<char>
    Exact 9 numeric characters.

    Retorna: `true` if valid under TSS Modulo 9; otherwise `false`.

record

ProvinceMunicipality

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public sealed record ProvinceMunicipality : StringValueObject<ProvinceMunicipality>
Hereda de: StringValueObject<ProvinceMunicipality>

Value Object representing a Dominican Republic Province and Municipality code according to the official DGII catalog. Format: `PPMMM` where `PP` = Province (01-32), `MMM` = Municipality (001-999).

Miembros (7)

  • methodCreate
    public static Result<ProvinceMunicipality> Create(string? value)

    Creates a validated `ProvinceMunicipality` instance from a 5-digit string.

    value: string?
    The 5-digit `PPMMM` string.

    Retorna: A `Result<ProvinceMunicipality>` containing the validated instance or a domain validation error.

  • methodTryCreate
    public static bool TryCreate(string? value, out ProvinceMunicipality? result)

    Attempts to create a `ProvinceMunicipality` instance without throwing exceptions.

    value: string?
    The raw input code string.
    result: out ProvinceMunicipality?
    When this method returns, contains the created instance if successful; otherwise, `null`.

    Retorna: `true` if the instance was successfully created; otherwise, `false`.

  • propertyCode
    public string Code { get; }

    Gets the full 5-digit code (`PPMMM`).

  • propertyDisplayName
    public string DisplayName { get; }

    Gets the formatted display name: ProvinceName (Code).

  • propertyMunicipalityCode
    public string MunicipalityCode { get; }

    Gets the 3-digit municipality code (`MMM`).

  • propertyProvinceCode
    public string ProvinceCode { get; }

    Gets the 2-digit province code (`PP`).

  • propertyProvinceName
    public string ProvinceName { get; }

    Gets the official DGII name of the province.

record

Rnc

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public sealed record Rnc : StringValueObject<Rnc>
Hereda de: StringValueObject<Rnc>

Represents a Dominican Republic fiscal identifier: RNC (9 digits, Registro Nacional del Contribuyente) or Cedula de Identidad (11 digits). Validates format and DGII Mod-11 check digit. Rules: Exactly 9 or 11 digits, valid Mod-11 check digit. Stored as digits-only. Applied by: Residents, Expenses (Suppliers), Fiscal, Billing — Dominican Republic only. ⚠️ GEOGRAPHIC BOUNDARY: This Value Object is 100% specific to the Dominican Republic. The Mod-11 check digit algorithm and 9/11-digit format are defined by the DGII (Dirección General de Impuestos Internos). This VO MUST NOT be applied to fiscal identifiers from other jurisdictions (Mexico RFC, Spain NIF, Colombia NIT, USA EIN, etc.). For multi-country deployments, each jurisdiction defines its own fiscal identifier VO within its bounded context. The corporate `ValueObjects.NationalId` provides a format-agnostic fallback when jurisdiction-specific validation is not required.

Miembros (10)

  • methodCreate
    public static Result<Rnc> Create(string? value)

    Creates a validated `Rnc` instance from a raw or formatted 9-digit RNC or 11-digit Cédula string.

    value: string?
    The raw or formatted identifier string.

    Retorna: A `Result<Rnc>` containing the validated instance or a domain validation error.

  • methodFromStruct
    public static Rnc FromStruct(RncStruct rncStruct)

    Creates a heap-allocated `Rnc` instance from a validated `RncStruct`.

    rncStruct: RncStruct
    The source struct instance.

    Retorna: A validated `Rnc` instance.

    Exceptions: ArgumentException: `rncStruct` is empty or uninitialized.

  • methodHydrate
    public static Rnc Hydrate(string? value)

    Hydrates an instance from persistence storage, stripping dashes and whitespace.

    value: string?
    The raw stored identifier string.

    Retorna: A hydrated `Rnc` instance.

  • methodToStruct
    public RncStruct ToStruct()

    Converts this `Rnc` reference value object into its zero-allocation `RncStruct` counterpart.

    Retorna: An equivalent `RncStruct` instance.

  • methodTryCreate
    public static Result<Rnc> TryCreate(string? value)

    Attempts to create a validated `Rnc` instance from a raw or formatted string.

    value: string?
    The raw or formatted identifier string.

    Retorna: A `Result<Rnc>` containing the validated instance or a domain validation error.

  • propertyFormatted
    public string Formatted { get; }

    Formats the identifier in the official DGII/JCE standard format: `X-XX-XXXXX-X` for 9-digit RNC, or `XXX-XXXXXXX-X` for 11-digit Cédula.

  • propertyIsCedula
    public bool IsCedula { get; }

    Gets a value indicating whether this identifier is an 11-digit personal Cédula.

  • propertyIsLegalEntity
    public bool IsLegalEntity { get; }

    Gets a value indicating whether this taxpayer is a legal entity (corporate RNC holder).

  • propertyIsPhysicalPerson
    public bool IsPhysicalPerson { get; }

    Gets a value indicating whether this taxpayer is a physical person (Cédula holder).

  • propertyIsRnc
    public bool IsRnc { get; }

    Gets a value indicating whether this identifier is a 9-digit corporate RNC.

record

RncStruct

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public readonly record struct RncStruct : IValueObject, IEquatable<RncStruct>, IComparable<RncStruct>
Implementa: IComparable<RncStruct>, IEquatable<RncStruct>, IValueObject

High-performance, zero-allocation readonly record struct representing a Dominican Republic fiscal identifier: RNC (9 digits, Registro Nacional del Contribuyente) or Cédula de Identidad (11 digits). Validates DGII Modulo 11 for RNC and JCE/DGII Modulo 10 (Luhn) for Cédula. Stack-allocated value type designed for high-throughput electronic invoicing pipelines without GC pressure.

Miembros (25)

  • constructorRncStruct
    public RncStruct(string value)

    Initializes a new instance of `RncStruct` with a raw or pre-normalized value. Intended for persistence mappers, deserializers, and hydration.

    value: string
    The underlying RNC or Cédula digit value.
  • methodCompareTo
    public int CompareTo(RncStruct other)

    Inherits documentation from base type or interface.

    other: RncStruct
  • methodCreate
    public static Result<RncStruct> Create(string? value, bool validateCheckDigit = true)

    Creates a validated `RncStruct` instance from a raw or formatted 9-digit RNC or 11-digit Cédula string.

    value: string?
    The raw or formatted RNC / Cédula string.
    validateCheckDigit: bool
    Whether to strictly enforce DGII Modulo 11 and JCE Modulo 10 check digits (default true).

    Retorna: A `Result<RncStruct>` containing the validated struct or a domain validation error.

  • methodCreateFormatOnly
    public static Result<RncStruct> CreateFormatOnly(string? value)

    Creates an `RncStruct` with syntactic format validation (9 or 11 digits) without checking mathematical check digits. Useful for mock test fixtures or offline scenarios.

    value: string?
    The raw or formatted RNC / Cédula string.

    Retorna: A `Result<RncStruct>` containing the validated struct or a domain validation error.

  • methodFromClass
    public static RncStruct FromClass(Rnc? rnc)

    Creates an `RncStruct` from an existing `Rnc` class instance.

    rnc: Rnc?
    The class instance to convert from.

    Retorna: An `RncStruct` instance.

  • methodToClass
    public Rnc? ToClass()

    Converts this struct to the heap-allocated `Rnc` class instance.

    Retorna: A new `Rnc` class instance.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(string? value, out RncStruct result)

    Tries to parse and validate an RNC string.

    value: string?
    The RNC string to validate and parse.
    result: out RncStruct
    When this method returns, contains the parsed struct if successful, or default.

    Retorna: `true` if successfully parsed and valid; otherwise, `false`.

  • methodUnsafe
    public static RncStruct Unsafe(string? value)

    Creates an `RncStruct` from a pre-validated value without re-validation. Use only when the value is known to be valid (e.g. from an authoritative database).

    value: string?
    A pre-validated RNC or Cédula string.

    Retorna: An `RncStruct` instance.

  • methodimplicit operator RncStruct
    public static implicit operator RncStruct(Rnc? rnc)

    Implicit conversion from `Rnc` class to zero-allocation `RncStruct`.

    rnc: Rnc?
  • methodimplicit operator string
    public static implicit operator string(RncStruct rnc)

    Implicit conversion to string representation.

    rnc: RncStruct
  • methodoperator <
    public static bool operator <(RncStruct left, RncStruct right)

    Compares two `RncStruct` instances for less-than relation.

    left: RncStruct
    right: RncStruct
  • methodoperator <=
    public static bool operator <=(RncStruct left, RncStruct right)

    Compares two `RncStruct` instances for less-than-or-equal relation.

    left: RncStruct
    right: RncStruct
  • methodoperator >
    public static bool operator >(RncStruct left, RncStruct right)

    Compares two `RncStruct` instances for greater-than relation.

    left: RncStruct
    right: RncStruct
  • methodoperator >=
    public static bool operator >=(RncStruct left, RncStruct right)

    Compares two `RncStruct` instances for greater-than-or-equal relation.

    left: RncStruct
    right: RncStruct
  • propertyEmpty
    public static RncStruct Empty { get; }

    Represents an empty or uninitialized `RncStruct`.

  • propertyFormatted
    public string Formatted { get; }

    Formats the identifier in the official DGII/JCE standard format: `X-XX-XXXXX-X` for 9-digit RNC, or `XXX-XXXXXXX-X` for 11-digit Cédula.

  • propertyHasValue
    public bool HasValue { get; }

    Gets a value indicating whether this identifier has a valid, non-empty value.

  • propertyIsCedula
    public bool IsCedula { get; }

    Gets a value indicating whether this identifier is an 11-digit personal Cédula.

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this identifier is empty or uninitialized.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance was initialized through a factory rather than `default(RncStruct)`.

  • propertyIsLegalEntity
    public bool IsLegalEntity { get; }

    Gets a value indicating whether this taxpayer is a legal entity (corporate RNC holder).

  • propertyIsPhysicalPerson
    public bool IsPhysicalPerson { get; }

    Gets a value indicating whether this taxpayer is a physical person (Cédula holder).

  • propertyIsRnc
    public bool IsRnc { get; }

    Gets a value indicating whether this identifier is a 9-digit corporate RNC.

  • propertyValue
    public string Value { get; }

    Gets the cleaned, validated RNC/Cédula value (digits only).

record

SecurityCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public readonly partial record struct SecurityCode : IValueObject<SecurityCode>, IEquatable<SecurityCode>, IComparable<SecurityCode>, IParsable<SecurityCode>, ISpanParsable<SecurityCode>
Implementa: IComparable<SecurityCode>, IEquatable<SecurityCode>, IParsable<SecurityCode>, ISpanParsable<SecurityCode>, IValueObject<SecurityCode>

Zero-allocation stack value object representing the mandatory 6-character DGII e-CF Security Code (Código de Seguridad) derived from the first 6 Base64 characters (`[A-Za-z0-9+/=]`) of the RSA-SHA256 XMLDSig `<SignatureValue>` per DGII e-CF Technical Specification v1.0 and General Norm 06-2018.

Miembros (20)

  • methodCompareTo
    public int CompareTo(SecurityCode other)

    Inherits documentation from base type or interface.

    other: SecurityCode
  • methodCreate
    public static Result<SecurityCode> Create(ReadOnlySpan<char> value)

    Creates a validated `SecurityCode` from a character span with zero intermediate allocations.

    value: ReadOnlySpan<char>
    The candidate 6-character Base64 span.

    Retorna: A `Result<SecurityCode>` containing the validated struct or a validation error.

  • methodCreate
    public static Result<SecurityCode> Create(string? value)

    Creates a validated `SecurityCode` from a raw string containing 6 Base64 characters (`[A-Za-z0-9+/=]`).

    value: string?
    The candidate 6-character security code string.

    Retorna: A `Result<SecurityCode>` containing the validated struct or a validation error.

  • methodFromSignatureValue
    public static Result<SecurityCode> FromSignatureValue(ReadOnlySpan<char> base64SignatureValue)

    Deterministically derives the 6-character DGII `SecurityCode` from a raw XMLDSig `<SignatureValue>` character span, ignoring XML formatting whitespace (`\r`, `\n`, `\t`, space) without intermediate string allocations.

    base64SignatureValue: ReadOnlySpan<char>
    The Base64-encoded RSA-SHA256 XMLDSig signature value span.

    Retorna: A `Result<SecurityCode>` containing the extracted 6-character code or a validation error.

  • methodFromSignatureValue
    public static Result<SecurityCode> FromSignatureValue(string? base64SignatureValue)

    Deterministically derives the 6-character DGII `SecurityCode` from a raw XMLDSig `<SignatureValue>` string.

    base64SignatureValue: string?
    The Base64-encoded RSA-SHA256 XMLDSig signature value.

    Retorna: A `Result<SecurityCode>` containing the extracted 6-character code or a validation error.

  • methodParse
    public static SecurityCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static SecurityCode Parse(string s, IFormatProvider? provider)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out SecurityCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out SecurityCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out SecurityCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out SecurityCode
  • methodimplicit operator string
    public static implicit operator string(SecurityCode code)

    Implicitly converts a `SecurityCode` to its underlying string representation.

    code: SecurityCode
    The security code instance.
  • methodoperator <
    public static bool operator <(SecurityCode left, SecurityCode right)

    Determines whether `left` precedes `right` ordinally.

    left: SecurityCode
    right: SecurityCode
  • methodoperator <=
    public static bool operator <=(SecurityCode left, SecurityCode right)

    Determines whether `left` precedes or equals `right` ordinally.

    left: SecurityCode
    right: SecurityCode
  • methodoperator >
    public static bool operator >(SecurityCode left, SecurityCode right)

    Determines whether `left` follows `right` ordinally.

    left: SecurityCode
    right: SecurityCode
  • methodoperator >=
    public static bool operator >=(SecurityCode left, SecurityCode right)

    Determines whether `left` follows or equals `right` ordinally.

    left: SecurityCode
    right: SecurityCode
  • propertyEmpty
    public static SecurityCode Empty { get; }

    Represents an uninitialized empty `SecurityCode`.

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this `SecurityCode` is uninitialized (`default(SecurityCode)`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `SecurityCode` was initialized via a validated factory.

  • propertyValue
    public string Value { get; }

    Gets the validated 6-character Base64 security code string, or `string.Empty` when uninitialized.

  • fieldLength
    public const int Length

    Exact required character length for a DGII e-CF Security Code.

record

TaxObligationResolution

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public readonly record struct TaxObligationResolution

Represents the evaluated statutory filing status and normative citation for a Dominican tax obligation.

Miembros (3)

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this resolution was initialized by `DominicanTaxObligationResolver`.

  • propertyLegalBasis
    public string LegalBasis { get; }

    Gets the Dominican statutory citation explaining the resolution.

  • propertyStatus
    public TaxObligationStatus Status { get; }

    Gets the evaluated filing requirement status.

enum

TaxObligationStatus

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public enum TaxObligationStatus

Represents the statutory filing status of a DGII tax declaration under a taxpayer's regime.

Miembros (3)

  • fieldConditional
    Conditional = 2

    Filing is mandatory only when reportable transactions occur in the period.

  • fieldExempt
    Exempt = 3

    Taxpayer is statutorily exempt from filing under the active regime.

  • fieldMandatory
    Mandatory = 1

    Filing is mandatory in every applicable period.

class

TaxPenaltyCalculator

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public static class TaxPenaltyCalculator

Domain service implementing Ley 11-92 statutory late tax surcharge and indemnifying interest calculations: - Art. 252 (Recargo por Mora): 10% for the first month + 4% for each additional month or fraction thereof. - Art. 27 (Interés Indemnizatorio): 1.73% per month or fraction thereof.

Miembros (5)

  • methodCalculate
    public static TaxPenaltyResult Calculate(decimal taxAmount, DateOnly dueDate, DateOnly paymentDate, decimal monthlyInterestRate = DefaultMonthlyInterestRate)

    Computes late tax penalties, surcharges, and indemnifying interest using `DateOnly` dates.

    taxAmount: decimal
    The unpaid statutory tax amount.
    dueDate: DateOnly
    The statutory deadline / expiration date.
    paymentDate: DateOnly
    The actual or simulated payment date.
    monthlyInterestRate: decimal
    Monthly interest rate (default 1.73% / 0.0173).

    Retorna: A `TaxPenaltyResult` with late months, rates, surcharge, interest, and total due.

  • methodCalculate
    public static TaxPenaltyResult Calculate(decimal taxAmount, DateTime dueDate, DateTime paymentDate, decimal monthlyInterestRate = DefaultMonthlyInterestRate)

    Computes late tax penalties, surcharges, and indemnifying interest under Dominican Tax Code (Ley 11-92).

    taxAmount: decimal
    The unpaid statutory tax amount.
    dueDate: DateTime
    The statutory deadline / expiration date.
    paymentDate: DateTime
    The actual or simulated payment date.
    monthlyInterestRate: decimal
    Monthly interest rate (default 1.73% / 0.0173).

    Retorna: A `TaxPenaltyResult` with late months, rates, surcharge, interest, and total due.

  • fieldAdditionalMonthSurchargeRate
    public const decimal AdditionalMonthSurchargeRate

    Statutory progressive surcharge rate for each subsequent month or fraction thereof (4% per Art. 252 of Ley 11-92).

  • fieldDefaultMonthlyInterestRate
    public const decimal DefaultMonthlyInterestRate

    Default statutory monthly indemnifying interest rate (1.73% per Art. 27 of Ley 11-92).

  • fieldFirstMonthSurchargeRate
    public const decimal FirstMonthSurchargeRate

    Statutory surcharge rate for the first month or fraction thereof (10% per Art. 252 of Ley 11-92).

record

TaxPenaltyResult

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public sealed record TaxPenaltyResult(decimal BaseTaxAmount, int LateMonths, decimal SurchargeRate, decimal SurchargeAmount, decimal InterestAmount, decimal TotalAmount)

Domain model representing calculated statutory tax penalties under the Dominican Tax Code (Ley 11-92).

Miembros (7)

  • constructorTaxPenaltyResult
    public TaxPenaltyResult(decimal BaseTaxAmount, int LateMonths, decimal SurchargeRate, decimal SurchargeAmount, decimal InterestAmount, decimal TotalAmount)

    Initializes a new instance of TaxPenaltyResult.

    BaseTaxAmount: decimal
    The unpaid statutory base tax amount.
    LateMonths: int
    The number of late months (any fraction of a month counts as a full month).
    SurchargeRate: decimal
    The cumulative surcharge rate (Art. 252: 10% first month + 4% each additional month).
    SurchargeAmount: decimal
    The calculated surcharge monetary amount rounded to 2 decimal places.
    InterestAmount: decimal
    The calculated indemnifying interest monetary amount (Art. 27) rounded to 2 decimal places.
    TotalAmount: decimal
    The total statutory amount due (BaseTaxAmount + SurchargeAmount + InterestAmount).
  • propertyBaseTaxAmount
    public decimal BaseTaxAmount { get; init; }

    The unpaid statutory base tax amount.

  • propertyInterestAmount
    public decimal InterestAmount { get; init; }

    The calculated indemnifying interest monetary amount (Art. 27) rounded to 2 decimal places.

  • propertyLateMonths
    public int LateMonths { get; init; }

    The number of late months (any fraction of a month counts as a full month).

  • propertySurchargeAmount
    public decimal SurchargeAmount { get; init; }

    The calculated surcharge monetary amount rounded to 2 decimal places.

  • propertySurchargeRate
    public decimal SurchargeRate { get; init; }

    The cumulative surcharge rate (Art. 252: 10% first month + 4% each additional month).

  • propertyTotalAmount
    public decimal TotalAmount { get; init; }

    The total statutory amount due (BaseTaxAmount + SurchargeAmount + InterestAmount).

record

TaxpayerId

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public sealed record TaxpayerId : ValueObject, IParsable<TaxpayerId>, ISpanParsable<TaxpayerId>
Hereda de: ValueObjectImplementa: IParsable<TaxpayerId>, ISpanParsable<TaxpayerId>

Smart polymorphic Value Object representing a Dominican Taxpayer Identifier (either an `Rnc` or a `Cedula`). Automatically determines the taxpayer type by digit length and executes the corresponding DGII/JCE checksum validation.

Miembros (13)

  • methodCreate
    public static Result<TaxpayerId> Create(string? value)

    Parses and validates a raw or formatted string as either an RNC (9 digits) or Cedula (11 digits).

    value: string?
    The raw or formatted identifier string.

    Retorna: A `Result<TaxpayerId>` containing the validated instance or a domain validation error.

  • methodFromCedula
    public static TaxpayerId FromCedula(Cedula cedula)

    Creates a `TaxpayerId` from a pre-validated `Cedula`.

    cedula: Cedula
    The pre-validated Dominican Cédula.

    Retorna: A new `TaxpayerId` instance.

  • methodFromRnc
    public static TaxpayerId FromRnc(Rnc rnc)

    Creates a `TaxpayerId` from a pre-validated `Rnc`.

    rnc: Rnc
    The pre-validated Dominican RNC.

    Retorna: A new `TaxpayerId` instance.

  • methodParse
    public static TaxpayerId Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static TaxpayerId Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out TaxpayerId? result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out TaxpayerId?
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out TaxpayerId? result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out TaxpayerId?
  • propertyAsCedula
    public Cedula? AsCedula { get; }

    Gets the strongly-typed `Cedula` if this taxpayer is a personal national ID.

  • propertyAsRnc
    public Rnc? AsRnc { get; }

    Gets the strongly-typed `Rnc` if this taxpayer is a corporate or business entity.

  • propertyFormatted
    public string Formatted { get; }

    Gets the formatted identifier (e.g. 1-01-00001-5 or 001-0000001-5).

  • propertyType
    public TaxpayerIdType Type { get; }

    Gets the taxpayer identification type.

  • propertyValue
    public string Value { get; }

    Gets the raw digits value.

enum

TaxpayerIdType

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public enum TaxpayerIdType

Specifies the type of Dominican taxpayer identity.

Miembros (2)

  • fieldCedula
    Cedula = 2

    Cédula de Identidad y Electoral (11 digits for natural persons).

  • fieldRnc
    Rnc = 1

    Registro Nacional de Contribuyentes (9 digits for legal entities / business entities).

record

WithholdingRate

Ensamblado: EricksonLopez.ValueObjects.Fiscal.DominicanRepublic
public readonly record struct WithholdingRate : IValueObject<WithholdingRate>, IEquatable<WithholdingRate>, IComparable<WithholdingRate>
Implementa: IComparable<WithholdingRate>, IEquatable<WithholdingRate>, IValueObject<WithholdingRate>

Represents a statutory Dominican Republic ISR or ITBIS withholding rate governed by Tax Code Art. 305/309, Presidential Regulation 254-06, and DGII General Norms 02-05, 07-07, and 13-11.

Miembros (12)

  • methodCompareTo
    public int CompareTo(WithholdingRate other)

    Inherits documentation from base type or interface.

    other: WithholdingRate
  • methodComputeWithholding
    public Result<decimal> ComputeWithholding(decimal baseAmount, int decimals = 2)

    Computes the rounded withholding amount for a given base amount.

    baseAmount: decimal
    The non-negative taxable base or ITBIS amount.
    decimals: int
    Decimal rounding precision (defaults to 2).

    Retorna: A `Result<Decimal>` with the computed withholding amount.

  • methodCreate
    public static Result<WithholdingRate> Create(decimal rate)

    Creates a validated Dominican statutory `WithholdingRate` from either a fractional rate (`0.10`) or percentage (`10`). Allowed rates: `2%` (Norma 07-07), `5%` (Art. 309 state payments), `10%` (Art. 309 professional fees/rent), `27%` (Art. 305 foreign remittances), `30%` (Norma 02-05 ITBIS withholding), and `100%` (Reg. 293-11 / physical persons).

    rate: decimal
    The rate as a fraction (`0 < r <= 1`) or percentage (`1 < r <= 100`).

    Retorna: A `Result<WithholdingRate>` containing the validated rate or a validation error.

  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodoperator <
    public static bool operator <(WithholdingRate left, WithholdingRate right)

    Determines whether one `WithholdingRate` is strictly less than another.

    left: WithholdingRate
    right: WithholdingRate
  • methodoperator <=
    public static bool operator <=(WithholdingRate left, WithholdingRate right)

    Determines whether one `WithholdingRate` is less than or equal to another.

    left: WithholdingRate
    right: WithholdingRate
  • methodoperator >
    public static bool operator >(WithholdingRate left, WithholdingRate right)

    Determines whether one `WithholdingRate` is strictly greater than another.

    left: WithholdingRate
    right: WithholdingRate
  • methodoperator >=
    public static bool operator >=(WithholdingRate left, WithholdingRate right)

    Determines whether one `WithholdingRate` is greater than or equal to another.

    left: WithholdingRate
    right: WithholdingRate
  • propertyFraction
    public decimal Fraction { get; }

    Gets the normalized fractional withholding rate (e.g., `0.02`, `0.05`, `0.10`, `0.27`, `0.30`, `1.00`).

  • propertyIsEmpty
    public bool IsEmpty { get; }

    Gets a value indicating whether this instance is uninitialized (`default(WithholdingRate)`).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `WithholdingRate` was initialized via `Create`.

  • propertyPercentage
    public decimal Percentage { get; }

    Gets the withholding rate expressed as a percentage between 0 and 100.

EricksonLopez.ValueObjects.Fiscal.Mexico#

8
record

CfdiUsageCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Mexico
public readonly record struct CfdiUsageCode : ISpanParsable<CfdiUsageCode>, IComparable<CfdiUsageCode>
Implementa: IComparable<CfdiUsageCode>, ISpanParsable<CfdiUsageCode>

Represents an official SAT CFDI Usage Code (c_UsoCFDI, Anexo 20 CFDI 4.0). Common Codes: - **G01**: Acquisition of merchandise (Adquisición de mercancías) - **G02**: Returns, discounts or bonuses (Devoluciones, descuentos o bonificaciones) - **G03**: General expenses (Gastos en general) - **CP01**: Payments (Pagos) - **CN01**: Payroll (Nómina) - **S01**: Without tax effects (Sin efectos fiscales) .

Miembros (21)

  • methodCompareTo
    public int CompareTo(CfdiUsageCode other)

    Inherits documentation from base type or interface.

    other: CfdiUsageCode
  • methodCreate
    public static Result<CfdiUsageCode> Create(ReadOnlySpan<char> input)

    Creates a validated `CfdiUsageCode` from a character span. Accepts bare code ("G01", "g01") or canonical formatted string ("G01 - Adquisición de mercancías").

    input: ReadOnlySpan<char>
    A character span containing the SAT CFDI usage code.

    Retorna: A `Result<CfdiUsageCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<CfdiUsageCode> Create(string? code)

    Creates a validated `CfdiUsageCode` from an official code string.

    code: string?
    The SAT CFDI usage code (e.g. `G01`, `CP01`, `S01`).

    Retorna: A `Result<CfdiUsageCode>` containing the validated instance or a domain validation error.

  • methodParse
    public static CfdiUsageCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static CfdiUsageCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out CfdiUsageCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out CfdiUsageCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out CfdiUsageCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out CfdiUsageCode
  • methodoperator <
    public static bool operator <(CfdiUsageCode left, CfdiUsageCode right)

    Determines whether the left `CfdiUsageCode` is less than the right `CfdiUsageCode`.

    left: CfdiUsageCode
    The first `CfdiUsageCode` to compare.
    right: CfdiUsageCode
    The second `CfdiUsageCode` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(CfdiUsageCode left, CfdiUsageCode right)

    Determines whether the left `CfdiUsageCode` is less than or equal to the right `CfdiUsageCode`.

    left: CfdiUsageCode
    The first `CfdiUsageCode` to compare.
    right: CfdiUsageCode
    The second `CfdiUsageCode` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(CfdiUsageCode left, CfdiUsageCode right)

    Determines whether the left `CfdiUsageCode` is greater than the right `CfdiUsageCode`.

    left: CfdiUsageCode
    The first `CfdiUsageCode` to compare.
    right: CfdiUsageCode
    The second `CfdiUsageCode` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(CfdiUsageCode left, CfdiUsageCode right)

    Determines whether the left `CfdiUsageCode` is greater than or equal to the right `CfdiUsageCode`.

    left: CfdiUsageCode
    The first `CfdiUsageCode` to compare.
    right: CfdiUsageCode
    The second `CfdiUsageCode` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCode
    public string Code { get; }

    Gets the SAT CFDI usage code.

  • propertyDescription
    public string Description { get; }

    Gets the official description.

  • propertyGeneralExpenses
    public static CfdiUsageCode GeneralExpenses { get; }

    Gets CFDI usage G03 (Gastos en general).

  • propertyGoodsAcquisition
    public static CfdiUsageCode GoodsAcquisition { get; }

    Gets CFDI usage G01 (Adquisición de mercancías).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `CfdiUsageCode` instance was initialized through a factory rather than `default(CfdiUsageCode)`.

  • propertyPayments
    public static CfdiUsageCode Payments { get; }

    Gets CFDI usage CP01 (Pagos).

  • propertyPayroll
    public static CfdiUsageCode Payroll { get; }

    Gets CFDI usage CN01 (Nómina).

  • propertyReturnsDiscounts
    public static CfdiUsageCode ReturnsDiscounts { get; }

    Gets CFDI usage G02 (Devoluciones, descuentos o bonificaciones).

  • propertyWithoutTaxEffects
    public static CfdiUsageCode WithoutTaxEffects { get; }

    Gets CFDI usage S01 (Sin efectos fiscales).

record

Curp

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Mexico
public readonly record struct Curp : ISpanParsable<Curp>, IComparable<Curp>
Implementa: IComparable<Curp>, ISpanParsable<Curp>

Represents a Mexican CURP (Clave Única de Registro de Población) issued by the Secretaría de Gobernación (RENAPO) and verified in tax declarations. Structure: Exactly 18 uppercase alphanumeric characters.

Miembros (16)

  • methodCompareTo
    public int CompareTo(Curp other)

    Inherits documentation from base type or interface.

    other: Curp
  • methodCreate
    public static Result<Curp> Create(ReadOnlySpan<char> input)

    Creates a validated `Curp` from a character span.

    input: ReadOnlySpan<char>
    A character span containing the 18-character CURP.

    Retorna: A `Result<Curp>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Curp> Create(string? value)

    Creates a validated `Curp` from an 18-character string.

    value: string?
    The raw 18-character CURP string.

    Retorna: A `Result<Curp>` containing the validated instance or a domain validation error.

  • methodParse
    public static Curp Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Curp Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Curp result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Curp
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Curp result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Curp
  • methodoperator <
    public static bool operator <(Curp left, Curp right)

    Determines whether the left `Curp` is less than the right `Curp`.

    left: Curp
    The first `Curp` to compare.
    right: Curp
    The second `Curp` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Curp left, Curp right)

    Determines whether the left `Curp` is less than or equal to the right `Curp`.

    left: Curp
    The first `Curp` to compare.
    right: Curp
    The second `Curp` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Curp left, Curp right)

    Determines whether the left `Curp` is greater than the right `Curp`.

    left: Curp
    The first `Curp` to compare.
    right: Curp
    The second `Curp` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Curp left, Curp right)

    Determines whether the left `Curp` is greater than or equal to the right `Curp`.

    left: Curp
    The first `Curp` to compare.
    right: Curp
    The second `Curp` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyGender
    public char Gender { get; }

    Gets the gender character ('H' for Hombre, 'M' for Mujer, 'X' for No Binario, position 11).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Curp` instance was initialized through a factory rather than `default(Curp)`.

  • propertyStateCode
    public string StateCode { get; }

    Gets the 2-character federal entity state code (positions 12-13).

  • propertyValue
    public string Value { get; }

    Gets the 18-character uppercase CURP string.

record

FiscalUuid

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Mexico
public readonly record struct FiscalUuid : ISpanParsable<FiscalUuid>, IComparable<FiscalUuid>
Implementa: IComparable<FiscalUuid>, ISpanParsable<FiscalUuid>

Represents a Mexican SAT CFDI Fiscal UUID (Folio Fiscal Timbrado por PAC/SAT, Anexo 20). Structure: Exactly 36 uppercase characters representing a standard RFC 4122 UUID v4: `XXXXXXXX-XXXX-4XXX-YXXX-XXXXXXXXXXXX`.

Miembros (16)

  • methodCompareTo
    public int CompareTo(FiscalUuid other)

    Inherits documentation from base type or interface.

    other: FiscalUuid
  • methodCreate
    public static Result<FiscalUuid> Create(Guid value)

    Creates a validated `FiscalUuid` from an existing `Guid`.

    value: Guid
    The `Guid` representing the fiscal UUID. Must not be `Guid.Empty`.

    Retorna: A `Result<FiscalUuid>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<FiscalUuid> Create(ReadOnlySpan<char> input)

    Creates a validated `FiscalUuid` from a character span.

    input: ReadOnlySpan<char>
    A character span containing the UUID in standard RFC 4122 format.

    Retorna: A `Result<FiscalUuid>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<FiscalUuid> Create(string? value)

    Creates a validated `FiscalUuid` from a 36-character UUID string.

    value: string?
    A string containing the UUID in standard RFC 4122 format.

    Retorna: A `Result<FiscalUuid>` containing the validated instance or a domain validation error.

  • methodParse
    public static FiscalUuid Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static FiscalUuid Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out FiscalUuid result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out FiscalUuid
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out FiscalUuid result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out FiscalUuid
  • methodoperator <
    public static bool operator <(FiscalUuid left, FiscalUuid right)

    Determines whether the left `FiscalUuid` is less than the right `FiscalUuid`.

    left: FiscalUuid
    The first `FiscalUuid` to compare.
    right: FiscalUuid
    The second `FiscalUuid` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(FiscalUuid left, FiscalUuid right)

    Determines whether the left `FiscalUuid` is less than or equal to the right `FiscalUuid`.

    left: FiscalUuid
    The first `FiscalUuid` to compare.
    right: FiscalUuid
    The second `FiscalUuid` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(FiscalUuid left, FiscalUuid right)

    Determines whether the left `FiscalUuid` is greater than the right `FiscalUuid`.

    left: FiscalUuid
    The first `FiscalUuid` to compare.
    right: FiscalUuid
    The second `FiscalUuid` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(FiscalUuid left, FiscalUuid right)

    Determines whether the left `FiscalUuid` is greater than or equal to the right `FiscalUuid`.

    left: FiscalUuid
    The first `FiscalUuid` to compare.
    right: FiscalUuid
    The second `FiscalUuid` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyFormatted
    public string Formatted { get; }

    Formats the Fiscal UUID in canonical uppercase format.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

  • propertyValue
    public Guid Value { get; }

    Gets the underlying `Guid` value.

record

IdCcp

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Mexico
public readonly record struct IdCcp : ISpanParsable<IdCcp>, IComparable<IdCcp>
Implementa: IComparable<IdCcp>, ISpanParsable<IdCcp>

Represents a Mexican Carta Porte 3.1 Identifier (IdCCP), mandated by the SAT for goods transportation CFDI supplements. Structure: Exactly 39 characters starting with the fixed prefix `"CCC"` followed by a valid 36-character uppercase RFC 4122 UUID v4 (`CCCXXXXXXXX-XXXX-4XXX-YXXX-XXXXXXXXXXXX`).

Miembros (17)

  • methodCompareTo
    public int CompareTo(IdCcp other)

    Inherits documentation from base type or interface.

    other: IdCcp
  • methodCreate
    public static Result<IdCcp> Create(FiscalUuid uuid)

    Creates a validated `IdCcp` from a `FiscalUuid`.

    uuid: FiscalUuid
    The underlying validated fiscal UUID.

    Retorna: A `Result<IdCcp>` containing the validated instance.

  • methodCreate
    public static Result<IdCcp> Create(ReadOnlySpan<char> input)

    Creates a validated `IdCcp` from a character span.

    input: ReadOnlySpan<char>
    The span representation of the IdCCP.

    Retorna: A `Result<IdCcp>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<IdCcp> Create(string? value)

    Creates a validated `IdCcp` from a 39-character string.

    value: string?
    The raw or formatted 39-character IdCCP string.

    Retorna: A `Result<IdCcp>` containing the validated instance or a domain validation error.

  • methodParse
    public static IdCcp Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static IdCcp Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out IdCcp result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out IdCcp
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out IdCcp result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out IdCcp
  • methodoperator <
    public static bool operator <(IdCcp left, IdCcp right)

    Determines whether the left `IdCcp` is less than the right `IdCcp`.

    left: IdCcp
    The first `IdCcp` to compare.
    right: IdCcp
    The second `IdCcp` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(IdCcp left, IdCcp right)

    Determines whether the left `IdCcp` is less than or equal to the right `IdCcp`.

    left: IdCcp
    The first `IdCcp` to compare.
    right: IdCcp
    The second `IdCcp` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(IdCcp left, IdCcp right)

    Determines whether the left `IdCcp` is greater than the right `IdCcp`.

    left: IdCcp
    The first `IdCcp` to compare.
    right: IdCcp
    The second `IdCcp` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(IdCcp left, IdCcp right)

    Determines whether the left `IdCcp` is greater than or equal to the right `IdCcp`.

    left: IdCcp
    The first `IdCcp` to compare.
    right: IdCcp
    The second `IdCcp` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyFormatted
    public string Formatted { get; }

    Formats the IdCCP in canonical format: `CCCXXXXXXXX-XXXX-4XXX-YXXX-XXXXXXXXXXXX`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

  • propertyUuid
    public FiscalUuid Uuid { get; }

    Gets the underlying `FiscalUuid`.

  • fieldPrefix
    public const string Prefix

    Represents the fixed 3-character prefix ("CCC") for Carta Porte 3.1 identifiers.

record

PaymentFormCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Mexico
public readonly record struct PaymentFormCode : ISpanParsable<PaymentFormCode>, IComparable<PaymentFormCode>
Implementa: IComparable<PaymentFormCode>, ISpanParsable<PaymentFormCode>

Represents an official SAT Payment Form Code (c_FormaPago, Anexo 20 CFDI 4.0). Common Codes: - **01**: Cash (Efectivo) - **02**: Check (Cheque nominativo) - **03**: Electronic funds transfer (Transferencia electrónica de fondos) - **04**: Credit card (Tarjeta de crédito) - **28**: Debit card (Tarjeta de débito) - **99**: To be defined (Por definir) .

Miembros (22)

  • methodCompareTo
    public int CompareTo(PaymentFormCode other)

    Inherits documentation from base type or interface.

    other: PaymentFormCode
  • methodCreate
    public static Result<PaymentFormCode> Create(ReadOnlySpan<char> input)

    Creates a validated `PaymentFormCode` from a character span. Accepts bare code ("01") or canonical formatted string ("01 - Efectivo").

    input: ReadOnlySpan<char>
    A character span containing the SAT payment form code.

    Retorna: A `Result<PaymentFormCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<PaymentFormCode> Create(string? code)

    Creates a validated `PaymentFormCode` from an official 2-digit code.

    code: string?
    The 2-digit SAT payment form code (e.g. `01`, `03`, `99`).

    Retorna: A `Result<PaymentFormCode>` containing the validated instance or a domain validation error.

  • methodParse
    public static PaymentFormCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static PaymentFormCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out PaymentFormCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out PaymentFormCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out PaymentFormCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out PaymentFormCode
  • methodoperator <
    public static bool operator <(PaymentFormCode left, PaymentFormCode right)

    Determines whether the left `PaymentFormCode` is less than the right `PaymentFormCode`.

    left: PaymentFormCode
    The first `PaymentFormCode` to compare.
    right: PaymentFormCode
    The second `PaymentFormCode` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(PaymentFormCode left, PaymentFormCode right)

    Determines whether the left `PaymentFormCode` is less than or equal to the right `PaymentFormCode`.

    left: PaymentFormCode
    The first `PaymentFormCode` to compare.
    right: PaymentFormCode
    The second `PaymentFormCode` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(PaymentFormCode left, PaymentFormCode right)

    Determines whether the left `PaymentFormCode` is greater than the right `PaymentFormCode`.

    left: PaymentFormCode
    The first `PaymentFormCode` to compare.
    right: PaymentFormCode
    The second `PaymentFormCode` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(PaymentFormCode left, PaymentFormCode right)

    Determines whether the left `PaymentFormCode` is greater than or equal to the right `PaymentFormCode`.

    left: PaymentFormCode
    The first `PaymentFormCode` to compare.
    right: PaymentFormCode
    The second `PaymentFormCode` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCash
    public static PaymentFormCode Cash { get; }

    Gets payment form 01 (Efectivo).

  • propertyCheck
    public static PaymentFormCode Check { get; }

    Gets payment form 02 (Cheque nominativo).

  • propertyCode
    public string Code { get; }

    Gets the 2-digit SAT payment form code.

  • propertyCreditCard
    public static PaymentFormCode CreditCard { get; }

    Gets payment form 04 (Tarjeta de crédito).

  • propertyDebitCard
    public static PaymentFormCode DebitCard { get; }

    Gets payment form 28 (Tarjeta de débito).

  • propertyDescription
    public string Description { get; }

    Gets the official description.

  • propertyIsDeferred
    public bool IsDeferred { get; }

    Gets a value indicating whether this payment form represents deferred/pending definition (99).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `PaymentFormCode` instance was initialized through a factory rather than `default(PaymentFormCode)`.

  • propertyToBeDefined
    public static PaymentFormCode ToBeDefined { get; }

    Gets payment form 99 (Por definir).

  • propertyWireTransfer
    public static PaymentFormCode WireTransfer { get; }

    Gets payment form 03 (Transferencia electrónica de fondos).

record

PedimentoNumber

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Mexico
public readonly record struct PedimentoNumber : ISpanParsable<PedimentoNumber>, IComparable<PedimentoNumber>
Implementa: IComparable<PedimentoNumber>, ISpanParsable<PedimentoNumber>

Represents a Mexican Customs Declaration Number (Número de Pedimento Aduanal), governed by Anexo 22 de las Reglas Generales de Comercio Exterior (SAT). Structure: Exactly 15 numeric digits structured as: - **Validation Year (2 digits)**: Last 2 digits of the validation year. - **Customs Office (2 digits)**: Code of the customs clearance office. - **Customs Patent (4 digits)**: Customs broker patent number. - **Sequential (7 digits)**: Sequential document progress number. Canonical string without spaces: `15 digits`. Formatted: `YY AA CCCC NNNNNNN`.

Miembros (19)

  • methodCompareTo
    public int CompareTo(PedimentoNumber other)

    Inherits documentation from base type or interface.

    other: PedimentoNumber
  • methodCreate
    public static Result<PedimentoNumber> Create(ReadOnlySpan<char> input)

    Creates a validated `PedimentoNumber` from a character span.

    input: ReadOnlySpan<char>
    A character span containing the 15 pedimento digits, optionally separated by spaces.

    Retorna: A `Result<PedimentoNumber>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<PedimentoNumber> Create(string? value)

    Creates a validated `PedimentoNumber` from a 15-digit string (with or without spaces).

    value: string?
    A string containing the 15 pedimento digits, optionally separated by spaces.

    Retorna: A `Result<PedimentoNumber>` containing the validated instance or a domain validation error.

  • methodParse
    public static PedimentoNumber Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static PedimentoNumber Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out PedimentoNumber result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out PedimentoNumber
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out PedimentoNumber result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out PedimentoNumber
  • methodoperator <
    public static bool operator <(PedimentoNumber left, PedimentoNumber right)

    Determines whether the left `PedimentoNumber` is less than the right `PedimentoNumber`.

    left: PedimentoNumber
    The first `PedimentoNumber` to compare.
    right: PedimentoNumber
    The second `PedimentoNumber` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(PedimentoNumber left, PedimentoNumber right)

    Determines whether the left `PedimentoNumber` is less than or equal to the right `PedimentoNumber`.

    left: PedimentoNumber
    The first `PedimentoNumber` to compare.
    right: PedimentoNumber
    The second `PedimentoNumber` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(PedimentoNumber left, PedimentoNumber right)

    Determines whether the left `PedimentoNumber` is greater than the right `PedimentoNumber`.

    left: PedimentoNumber
    The first `PedimentoNumber` to compare.
    right: PedimentoNumber
    The second `PedimentoNumber` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(PedimentoNumber left, PedimentoNumber right)

    Determines whether the left `PedimentoNumber` is greater than or equal to the right `PedimentoNumber`.

    left: PedimentoNumber
    The first `PedimentoNumber` to compare.
    right: PedimentoNumber
    The second `PedimentoNumber` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCustomsOffice
    public string CustomsOffice { get; }

    Gets the 2-digit customs office component.

  • propertyDigits
    public string Digits { get; }

    Gets the raw 15-digit pedimento string.

  • propertyFormatted
    public string Formatted { get; }

    Formats the pedimento in the official SAT representation with double spaces: `YY AA CCCC NNNNNNN`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `PedimentoNumber` instance was initialized through a factory rather than `default(PedimentoNumber)`.

  • propertyPatent
    public string Patent { get; }

    Gets the 4-digit customs patent agent component.

  • propertySequential
    public string Sequential { get; }

    Gets the 7-digit sequential progress component.

  • propertyYear
    public string Year { get; }

    Gets the 2-digit validation year component.

record

Rfc

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Mexico
public readonly record struct Rfc : ISpanParsable<Rfc>, IUtf8SpanParsable<Rfc>, IComparable<Rfc>
Implementa: IComparable<Rfc>, ISpanParsable<Rfc>, IUtf8SpanParsable<Rfc>

Represents a Mexican RFC (Registro Federal de Contribuyentes) issued by the SAT (Servicio de Administración Tributaria, CFF Art. 27). Structure: - **Personas Morales (12 chars)**: 3 letters + 6 digits (YYMMDD) + 3 homoclave characters (e.g. `"ABC680524P-76"` without hyphen -> `"ABC680524P76"`). - **Personas Físicas (13 chars)**: 4 letters + 6 digits (YYMMDD) + 3 homoclave characters (e.g. `"GODE561231GR8"`). - **Genéricos**: `"XAXX010101000"` (Público en General), `"XEXX010101000"` (Extranjeros).

Miembros (22)

  • methodCompareTo
    public int CompareTo(Rfc other)

    Inherits documentation from base type or interface.

    other: Rfc
  • methodCreate
    public static Result<Rfc> Create(ReadOnlySpan<char> input)

    Creates a validated `Rfc` from a character span.

    input: ReadOnlySpan<char>
    The span representation of the RFC.

    Retorna: A `Result<Rfc>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Rfc> Create(string? value)

    Creates a validated `Rfc` from a 12 or 13-character string.

    value: string?
    The raw or formatted RFC string.

    Retorna: A `Result<Rfc>` containing the validated instance or a domain validation error.

  • methodParse
    public static Rfc Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
  • methodParse
    public static Rfc Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Rfc Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out Rfc result)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
    result: out Rfc
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Rfc result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Rfc
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Rfc result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Rfc
  • methodoperator <
    public static bool operator <(Rfc left, Rfc right)

    Determines whether the left `Rfc` is less than the right `Rfc`.

    left: Rfc
    The first `Rfc` to compare.
    right: Rfc
    The second `Rfc` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Rfc left, Rfc right)

    Determines whether the left `Rfc` is less than or equal to the right `Rfc`.

    left: Rfc
    The first `Rfc` to compare.
    right: Rfc
    The second `Rfc` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Rfc left, Rfc right)

    Determines whether the left `Rfc` is greater than the right `Rfc`.

    left: Rfc
    The first `Rfc` to compare.
    right: Rfc
    The second `Rfc` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Rfc left, Rfc right)

    Determines whether the left `Rfc` is greater than or equal to the right `Rfc`.

    left: Rfc
    The first `Rfc` to compare.
    right: Rfc
    The second `Rfc` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyIsCompany
    public bool IsCompany { get; }

    Gets a value indicating whether this RFC corresponds to a legal entity (12 characters).

  • propertyIsGenericForeigner
    public bool IsGenericForeigner { get; }

    Gets a value indicating whether this RFC is the generic foreign customer RFC (`XEXX010101000`).

  • propertyIsGenericNational
    public bool IsGenericNational { get; }

    Gets a value indicating whether this RFC is the generic national public-in-general RFC (`XAXX010101000`).

  • propertyIsIndividual
    public bool IsIndividual { get; }

    Gets a value indicating whether this RFC corresponds to a physical person (13 characters).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `Rfc` instance was initialized through a factory rather than `default(Rfc)`.

  • propertyValue
    public string Value { get; }

    Gets the uppercase RFC value.

  • fieldGenericForeigner
    public const string GenericForeigner

    Generic RFC constant for foreign customers (XEXX010101000).

  • fieldGenericNational
    public const string GenericNational

    Generic RFC constant for Mexican national general public (XAXX010101000).

record

TaxRegimeCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Mexico
public readonly record struct TaxRegimeCode : ISpanParsable<TaxRegimeCode>, IComparable<TaxRegimeCode>
Implementa: IComparable<TaxRegimeCode>, ISpanParsable<TaxRegimeCode>

Represents an official SAT Tax Regime Code (c_RegimenFiscal, Anexo 20 CFDI 4.0). Common Codes: - **601**: General de Ley Personas Morales - **605**: Sueldos y Salarios e Ingresos Asimilados a Salarios - **606**: Arrendamiento - **612**: Personas Físicas con Actividades Empresariales y Profesionales - **626**: Régimen Simplificado de Confianza (RESICO) .

Miembros (22)

  • methodCompareTo
    public int CompareTo(TaxRegimeCode other)

    Inherits documentation from base type or interface.

    other: TaxRegimeCode
  • methodCreate
    public static Result<TaxRegimeCode> Create(ReadOnlySpan<char> input)

    Creates a validated `TaxRegimeCode` from a character span. Accepts bare code ("601") or canonical formatted string ("601 - General de Ley Personas Morales").

    input: ReadOnlySpan<char>
    A character span containing the 3-digit SAT tax regime code.

    Retorna: A `Result<TaxRegimeCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<TaxRegimeCode> Create(string? code)

    Creates a validated `TaxRegimeCode` from a 3-digit code.

    code: string?
    The 3-digit SAT tax regime code (e.g. `601`, `626`).

    Retorna: A `Result<TaxRegimeCode>` containing the validated instance or a domain validation error.

  • methodParse
    public static TaxRegimeCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static TaxRegimeCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out TaxRegimeCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out TaxRegimeCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out TaxRegimeCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out TaxRegimeCode
  • methodoperator <
    public static bool operator <(TaxRegimeCode left, TaxRegimeCode right)

    Determines whether the left `TaxRegimeCode` is less than the right `TaxRegimeCode`.

    left: TaxRegimeCode
    The first `TaxRegimeCode` to compare.
    right: TaxRegimeCode
    The second `TaxRegimeCode` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(TaxRegimeCode left, TaxRegimeCode right)

    Determines whether the left `TaxRegimeCode` is less than or equal to the right `TaxRegimeCode`.

    left: TaxRegimeCode
    The first `TaxRegimeCode` to compare.
    right: TaxRegimeCode
    The second `TaxRegimeCode` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(TaxRegimeCode left, TaxRegimeCode right)

    Determines whether the left `TaxRegimeCode` is greater than the right `TaxRegimeCode`.

    left: TaxRegimeCode
    The first `TaxRegimeCode` to compare.
    right: TaxRegimeCode
    The second `TaxRegimeCode` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(TaxRegimeCode left, TaxRegimeCode right)

    Determines whether the left `TaxRegimeCode` is greater than or equal to the right `TaxRegimeCode`.

    left: TaxRegimeCode
    The first `TaxRegimeCode` to compare.
    right: TaxRegimeCode
    The second `TaxRegimeCode` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyAppliesToMoral
    public bool AppliesToMoral { get; }

    Gets a value indicating whether this regime applies to legal entities (Personas Morales).

  • propertyAppliesToPhysical
    public bool AppliesToPhysical { get; }

    Gets a value indicating whether this regime applies to physical persons (Personas Físicas).

  • propertyBusinessActivities
    public static TaxRegimeCode BusinessActivities { get; }

    Gets tax regime 612 (Personas Físicas con Actividades Empresariales y Profesionales).

  • propertyCode
    public string Code { get; }

    Gets the 3-digit SAT regime code.

  • propertyDescription
    public string Description { get; }

    Gets the official description.

  • propertyGeneralLegalEntities
    public static TaxRegimeCode GeneralLegalEntities { get; }

    Gets tax regime 601 (General de Ley Personas Morales).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `TaxRegimeCode` instance was initialized through a factory rather than `default(TaxRegimeCode)`.

  • propertyLeasing
    public static TaxRegimeCode Leasing { get; }

    Gets tax regime 606 (Arrendamiento).

  • propertySimplifiedTrustRegime
    public static TaxRegimeCode SimplifiedTrustRegime { get; }

    Gets tax regime 626 (Régimen Simplificado de Confianza - RESICO).

  • propertyWagesAndSalaries
    public static TaxRegimeCode WagesAndSalaries { get; }

    Gets tax regime 605 (Sueldos y Salarios).

EricksonLopez.ValueObjects.Fiscal.Peru#

8
record

AffectationTypeCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Peru
public readonly record struct AffectationTypeCode : ISpanParsable<AffectationTypeCode>, IComparable<AffectationTypeCode>
Implementa: IComparable<AffectationTypeCode>, ISpanParsable<AffectationTypeCode>

Represents an official SUNAT IGV Tax Affectation Type Code (Tipo de Afectación al IGV, Catálogo N° 07). Common Codes: - **10**: Taxed - Onerous Operation (Gravado - Operación Onerosa) - **20**: Exempt - Onerous Operation (Exonerado - Operación Onerosa) - **30**: Unaffected - Onerous Operation (Inafecto - Operación Onerosa) - **40**: Export of Goods or Services (Exportación de Bienes o Servicios) .

Miembros (23)

  • methodCompareTo
    public int CompareTo(AffectationTypeCode other)

    Inherits documentation from base type or interface.

    other: AffectationTypeCode
  • methodCreate
    public static Result<AffectationTypeCode> Create(ReadOnlySpan<char> input)

    Creates a validated `AffectationTypeCode` from a character span. Accepts bare code ("10") or canonical formatted string ("10 - Gravado - Operación Onerosa").

    input: ReadOnlySpan<char>
    The character span representation.

    Retorna: A `Result<AffectationTypeCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<AffectationTypeCode> Create(string? code)

    Creates a validated `AffectationTypeCode` from a 2-digit code.

    code: string?
    The 2-digit IGV affectation code string.

    Retorna: A `Result<AffectationTypeCode>` containing the validated instance or a domain validation error.

  • methodParse
    public static AffectationTypeCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static AffectationTypeCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out AffectationTypeCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out AffectationTypeCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out AffectationTypeCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out AffectationTypeCode
  • methodoperator <
    public static bool operator <(AffectationTypeCode left, AffectationTypeCode right)

    Determines whether the left `AffectationTypeCode` is less than the right `AffectationTypeCode`.

    left: AffectationTypeCode
    The first `AffectationTypeCode` to compare.
    right: AffectationTypeCode
    The second `AffectationTypeCode` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(AffectationTypeCode left, AffectationTypeCode right)

    Determines whether the left `AffectationTypeCode` is less than or equal to the right `AffectationTypeCode`.

    left: AffectationTypeCode
    The first `AffectationTypeCode` to compare.
    right: AffectationTypeCode
    The second `AffectationTypeCode` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(AffectationTypeCode left, AffectationTypeCode right)

    Determines whether the left `AffectationTypeCode` is greater than the right `AffectationTypeCode`.

    left: AffectationTypeCode
    The first `AffectationTypeCode` to compare.
    right: AffectationTypeCode
    The second `AffectationTypeCode` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(AffectationTypeCode left, AffectationTypeCode right)

    Determines whether the left `AffectationTypeCode` is greater than or equal to the right `AffectationTypeCode`.

    left: AffectationTypeCode
    The first `AffectationTypeCode` to compare.
    right: AffectationTypeCode
    The second `AffectationTypeCode` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCode
    public string Code { get; }

    Gets the 2-digit SUNAT code.

  • propertyDescription
    public string Description { get; }

    Gets the official description.

  • propertyExemptOnerous
    public static AffectationTypeCode ExemptOnerous { get; }

    Gets affectation code 20 (Exonerado - Operación Onerosa).

  • propertyExport
    public static AffectationTypeCode Export { get; }

    Gets affectation code 40 (Exportación de Bienes o Servicios).

  • propertyIsExempt
    public bool IsExempt { get; }

    Gets a value indicating whether this operation is exempt from IGV (Exonerado).

  • propertyIsExportation
    public bool IsExportation { get; }

    Gets a value indicating whether this operation is an export (Exportación).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `AffectationTypeCode` instance was initialized through a factory rather than `default(AffectationTypeCode)`.

  • propertyIsTaxable
    public bool IsTaxable { get; }

    Gets a value indicating whether this operation is taxable by IGV (Gravado).

  • propertyIsUnaffected
    public bool IsUnaffected { get; }

    Gets a value indicating whether this operation is unaffected by IGV (Inafecto).

  • propertyTaxedOnerous
    public static AffectationTypeCode TaxedOnerous { get; }

    Gets affectation code 10 (Gravado - Operación Onerosa).

  • propertyUnaffectedOnerous
    public static AffectationTypeCode UnaffectedOnerous { get; }

    Gets affectation code 30 (Inafecto - Operación Onerosa).

record

CpeIdentifier

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Peru
public readonly record struct CpeIdentifier : ISpanParsable<CpeIdentifier>, IComparable<CpeIdentifier>
Implementa: IComparable<CpeIdentifier>, ISpanParsable<CpeIdentifier>

Represents a Peruvian Electronic Payment Receipt Unique Natural Key (Identificador de CPE SUNAT), composed of Document Type, 4-character Series, and 1 to 8-digit Correlative Number. Format: `{DocumentTypeCode}-{Series}-{Number:D8}` (e.g. `01-F001-00000001`).

Miembros (18)

  • methodCompareTo
    public int CompareTo(CpeIdentifier other)

    Inherits documentation from base type or interface.

    other: CpeIdentifier
  • methodCreate
    public static Result<CpeIdentifier> Create(CpeTypeCode type, string? series, int number)

    Creates a validated `CpeIdentifier` from its strongly-typed components.

    type: CpeTypeCode
    The CPE document type code.
    series: string?
    The 4-character electronic series.
    number: int
    The correlative sequential number.

    Retorna: A `Result<CpeIdentifier>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<CpeIdentifier> Create(ReadOnlySpan<char> input)

    Creates a validated `CpeIdentifier` from a formatted string (e.g. `"01-F001-00000001"` or `"01-F001-1"`).

    input: ReadOnlySpan<char>
    The formatted character span.

    Retorna: A `Result<CpeIdentifier>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<CpeIdentifier> Create(string? input)

    Creates a validated `CpeIdentifier` from a nullable string.

    input: string?
    The formatted string (e.g. `"01-F001-00000001"`).

    Retorna: A `Result<CpeIdentifier>` containing the validated instance or a domain validation error.

  • methodParse
    public static CpeIdentifier Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static CpeIdentifier Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out CpeIdentifier result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out CpeIdentifier
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out CpeIdentifier result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out CpeIdentifier
  • methodoperator <
    public static bool operator <(CpeIdentifier left, CpeIdentifier right)

    Determines whether the left `CpeIdentifier` is less than the right `CpeIdentifier`.

    left: CpeIdentifier
    The first `CpeIdentifier` to compare.
    right: CpeIdentifier
    The second `CpeIdentifier` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(CpeIdentifier left, CpeIdentifier right)

    Determines whether the left `CpeIdentifier` is less than or equal to the right `CpeIdentifier`.

    left: CpeIdentifier
    The first `CpeIdentifier` to compare.
    right: CpeIdentifier
    The second `CpeIdentifier` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(CpeIdentifier left, CpeIdentifier right)

    Determines whether the left `CpeIdentifier` is greater than the right `CpeIdentifier`.

    left: CpeIdentifier
    The first `CpeIdentifier` to compare.
    right: CpeIdentifier
    The second `CpeIdentifier` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(CpeIdentifier left, CpeIdentifier right)

    Determines whether the left `CpeIdentifier` is greater than or equal to the right `CpeIdentifier`.

    left: CpeIdentifier
    The first `CpeIdentifier` to compare.
    right: CpeIdentifier
    The second `CpeIdentifier` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCanonical
    public string Canonical { get; }

    Formats the CPE identifier in canonical SUNAT format: `{Tipo}-{Serie}-{Correlativo:D8}`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `CpeIdentifier` instance was initialized through a factory rather than `default(CpeIdentifier)`.

  • propertyNumber
    public int Number { get; }

    Gets the 1 to 8-digit correlative receipt number.

  • propertySeries
    public string Series { get; }

    Gets the 4-character electronic series (e.g. "F001").

  • propertyType
    public CpeTypeCode Type { get; }

    Gets the electronic receipt type code.

record

CpeTypeCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Peru
public readonly record struct CpeTypeCode : ISpanParsable<CpeTypeCode>, IComparable<CpeTypeCode>
Implementa: IComparable<CpeTypeCode>, ISpanParsable<CpeTypeCode>

Represents an official SUNAT CPE Document Type Code (Tipo de Comprobante de Pago Electrónico, Catálogo N° 01). Official Codes: - **01**: Factura - **03**: Boleta de Venta - **07**: Nota de Crédito - **08**: Nota de Débito - **09**: Guía de Remisión Remitente - **31**: Guía de Remisión Transportista .

Miembros (21)

  • methodCompareTo
    public int CompareTo(CpeTypeCode other)

    Inherits documentation from base type or interface.

    other: CpeTypeCode
  • methodCreate
    public static Result<CpeTypeCode> Create(ReadOnlySpan<char> input)

    Creates a validated `CpeTypeCode` from a character span. Accepts bare code ("01") or canonical formatted string ("01 - Factura").

    input: ReadOnlySpan<char>
    The character span representation.

    Retorna: A `Result<CpeTypeCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<CpeTypeCode> Create(string? code)

    Creates a validated `CpeTypeCode` from a 2-digit string.

    code: string?
    The 2-digit CPE document type code string.

    Retorna: A `Result<CpeTypeCode>` containing the validated instance or a domain validation error.

  • methodParse
    public static CpeTypeCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static CpeTypeCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out CpeTypeCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out CpeTypeCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out CpeTypeCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out CpeTypeCode
  • methodoperator <
    public static bool operator <(CpeTypeCode left, CpeTypeCode right)

    Determines whether the left `CpeTypeCode` is less than the right `CpeTypeCode`.

    left: CpeTypeCode
    The first `CpeTypeCode` to compare.
    right: CpeTypeCode
    The second `CpeTypeCode` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(CpeTypeCode left, CpeTypeCode right)

    Determines whether the left `CpeTypeCode` is less than or equal to the right `CpeTypeCode`.

    left: CpeTypeCode
    The first `CpeTypeCode` to compare.
    right: CpeTypeCode
    The second `CpeTypeCode` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(CpeTypeCode left, CpeTypeCode right)

    Determines whether the left `CpeTypeCode` is greater than the right `CpeTypeCode`.

    left: CpeTypeCode
    The first `CpeTypeCode` to compare.
    right: CpeTypeCode
    The second `CpeTypeCode` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(CpeTypeCode left, CpeTypeCode right)

    Determines whether the left `CpeTypeCode` is greater than or equal to the right `CpeTypeCode`.

    left: CpeTypeCode
    The first `CpeTypeCode` to compare.
    right: CpeTypeCode
    The second `CpeTypeCode` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCarrierDispatchGuide
    public static CpeTypeCode CarrierDispatchGuide { get; }

    Gets CPE code 31 (Guía de Remisión Transportista).

  • propertyCode
    public string Code { get; }

    Gets the 2-digit SUNAT code.

  • propertyCreditNote
    public static CpeTypeCode CreditNote { get; }

    Gets CPE code 07 (Nota de Crédito).

  • propertyDebitNote
    public static CpeTypeCode DebitNote { get; }

    Gets CPE code 08 (Nota de Débito).

  • propertyInvoice
    public static CpeTypeCode Invoice { get; }

    Gets CPE code 01 (Factura).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `CpeTypeCode` instance was initialized through a factory rather than `default(CpeTypeCode)`.

  • propertyName
    public string Name { get; }

    Gets the official document name.

  • propertyReceipt
    public static CpeTypeCode Receipt { get; }

    Gets CPE code 03 (Boleta de Venta).

  • propertySenderDispatchGuide
    public static CpeTypeCode SenderDispatchGuide { get; }

    Gets CPE code 09 (Guía de Remisión Remitente).

record

DetractionAccount

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Peru
public readonly record struct DetractionAccount : ISpanParsable<DetractionAccount>, IComparable<DetractionAccount>
Implementa: IComparable<DetractionAccount>, ISpanParsable<DetractionAccount>

Represents a Peruvian SPOT Detraction Bank Account Number (Cuenta de Detracciones Banco de la Nación) governed by Decreto Legislativo N° 940 and SUNAT regulations. Rules: Exactly 11 numeric digits starting with the mandatory prefix `"00"`.

Miembros (14)

  • methodCompareTo
    public int CompareTo(DetractionAccount other)

    Inherits documentation from base type or interface.

    other: DetractionAccount
  • methodCreate
    public static Result<DetractionAccount> Create(ReadOnlySpan<char> input)

    Creates a validated `DetractionAccount` from a character span.

    input: ReadOnlySpan<char>
    The character span representation.

    Retorna: A `Result<DetractionAccount>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<DetractionAccount> Create(string? value)

    Creates a validated `DetractionAccount` from an 11-digit string.

    value: string?
    The 11-digit account number string.

    Retorna: A `Result<DetractionAccount>` containing the validated instance or a domain validation error.

  • methodParse
    public static DetractionAccount Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static DetractionAccount Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out DetractionAccount result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out DetractionAccount
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out DetractionAccount result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out DetractionAccount
  • methodoperator <
    public static bool operator <(DetractionAccount left, DetractionAccount right)

    Determines whether the left `DetractionAccount` is less than the right `DetractionAccount`.

    left: DetractionAccount
    The first `DetractionAccount` to compare.
    right: DetractionAccount
    The second `DetractionAccount` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(DetractionAccount left, DetractionAccount right)

    Determines whether the left `DetractionAccount` is less than or equal to the right `DetractionAccount`.

    left: DetractionAccount
    The first `DetractionAccount` to compare.
    right: DetractionAccount
    The second `DetractionAccount` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(DetractionAccount left, DetractionAccount right)

    Determines whether the left `DetractionAccount` is greater than the right `DetractionAccount`.

    left: DetractionAccount
    The first `DetractionAccount` to compare.
    right: DetractionAccount
    The second `DetractionAccount` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(DetractionAccount left, DetractionAccount right)

    Determines whether the left `DetractionAccount` is greater than or equal to the right `DetractionAccount`.

    left: DetractionAccount
    The first `DetractionAccount` to compare.
    right: DetractionAccount
    The second `DetractionAccount` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyAccountNumber
    public string AccountNumber { get; }

    Gets the 11-digit detraction account string.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `DetractionAccount` instance was initialized through a factory rather than `default(DetractionAccount)`.

record

Ruc

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Peru
public readonly record struct Ruc : ISpanParsable<Ruc>, IUtf8SpanParsable<Ruc>, IComparable<Ruc>
Implementa: IComparable<Ruc>, ISpanParsable<Ruc>, IUtf8SpanParsable<Ruc>

Represents a Peruvian RUC (Registro Único de Contribuyentes) administered by SUNAT (Superintendencia Nacional de Aduanas y de Administración Tributaria). Structure: Exactly 11 numeric digits: - **Prefix (2 digits)**: 10 (Natural person with DNI), 15 (Natural person with CE), 17 (Natural person with Passport), 20 (Legal entity). - **Middle (8 digits)**: Identity document sequence or company registration sequence. - **Check Digit (1 digit)**: Modulo 11 verification digit weighted by `[5, 4, 3, 2, 7, 6, 5, 4, 3, 2]`.

Miembros (20)

  • methodCalculateVerificationDigit
    public static int CalculateVerificationDigit(ReadOnlySpan<char> first10Digits)

    Computes the SUNAT Modulo 11 check digit for the first 10 digits of a RUC.

    first10Digits: ReadOnlySpan<char>
    The span containing the first 10 digits.

    Retorna: The computed verification digit (0-9).

  • methodCompareTo
    public int CompareTo(Ruc other)

    Inherits documentation from base type or interface.

    other: Ruc
  • methodCreate
    public static Result<Ruc> Create(ReadOnlySpan<char> input)

    Creates a validated `Ruc` from a character span.

    input: ReadOnlySpan<char>
    The character span representation.

    Retorna: A `Result<Ruc>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<Ruc> Create(string? value)

    Creates a validated `Ruc` from an 11-digit string.

    value: string?
    The 11-digit RUC string.

    Retorna: A `Result<Ruc>` containing the validated instance or a domain validation error.

  • methodParse
    public static Ruc Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
  • methodParse
    public static Ruc Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static Ruc Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out Ruc result)

    Inherits documentation from base type or interface.

    utf8Text: ReadOnlySpan<byte>
    provider: IFormatProvider?
    result: out Ruc
  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out Ruc result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out Ruc
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out Ruc result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out Ruc
  • methodoperator <
    public static bool operator <(Ruc left, Ruc right)

    Determines whether the left `Ruc` is less than the right `Ruc`.

    left: Ruc
    The first `Ruc` to compare.
    right: Ruc
    The second `Ruc` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(Ruc left, Ruc right)

    Determines whether the left `Ruc` is less than or equal to the right `Ruc`.

    left: Ruc
    The first `Ruc` to compare.
    right: Ruc
    The second `Ruc` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(Ruc left, Ruc right)

    Determines whether the left `Ruc` is greater than the right `Ruc`.

    left: Ruc
    The first `Ruc` to compare.
    right: Ruc
    The second `Ruc` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(Ruc left, Ruc right)

    Determines whether the left `Ruc` is greater than or equal to the right `Ruc`.

    left: Ruc
    The first `Ruc` to compare.
    right: Ruc
    The second `Ruc` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this instance has been explicitly initialized and does not represent the default struct state.

  • propertyIsLegalEntity
    public bool IsLegalEntity { get; }

    Gets a value indicating whether this RUC belongs to a legal entity (prefix 20).

  • propertyIsNaturalPerson
    public bool IsNaturalPerson { get; }

    Gets a value indicating whether this RUC belongs to a natural person (prefixes 10, 15, 17).

  • propertyPrefix
    public int Prefix { get; }

    Gets the 2-digit prefix (10, 15, 17, 20).

  • propertyValue
    public string Value { get; }

    Gets the raw 11-digit numeric RUC string.

record

SunatProductCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Peru
public readonly record struct SunatProductCode : ISpanParsable<SunatProductCode>, IComparable<SunatProductCode>
Implementa: IComparable<SunatProductCode>, ISpanParsable<SunatProductCode>

Represents a SUNAT Product Code (Catálogo 25 - UNSPSC de 8 dígitos). Implements deferred temporal regression (rule mandatory starting from 01-Jan-2027).

Miembros (16)

  • methodCompareTo
    public int CompareTo(SunatProductCode other)

    Inherits documentation from base type or interface.

    other: SunatProductCode
  • methodCreate
    public static Result<SunatProductCode> Create(ReadOnlySpan<char> input)

    Creates a validated `SunatProductCode` using strict validation (defaulting to post-2027 behavior).

    input: ReadOnlySpan<char>
    The SUNAT product code character span.

    Retorna: A `Result<SunatProductCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<SunatProductCode> Create(ReadOnlySpan<char> input, DateOnly effectiveDate)

    Creates a validated `SunatProductCode` evaluating the temporal regression rule CAT.VAL.001.

    input: ReadOnlySpan<char>
    The SUNAT product code character span.
    effectiveDate: DateOnly
    The invoice or operation effective date.

    Retorna: A `Result<SunatProductCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<SunatProductCode> Create(string? code)

    Creates a validated `SunatProductCode` using strict validation (defaulting to post-2027 behavior).

    code: string?
    The SUNAT product code string.

    Retorna: A `Result<SunatProductCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<SunatProductCode> Create(string? code, DateOnly effectiveDate)

    Creates a validated `SunatProductCode` evaluating the temporal regression rule CAT.VAL.001.

    code: string?
    The SUNAT product code string.
    effectiveDate: DateOnly
    The invoice or operation effective date.

    Retorna: A `Result<SunatProductCode>` containing the validated instance or a domain validation error.

  • methodParse
    public static SunatProductCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static SunatProductCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out SunatProductCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out SunatProductCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out SunatProductCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out SunatProductCode
  • methodoperator <
    public static bool operator <(SunatProductCode left, SunatProductCode right)

    Determines whether the left `SunatProductCode` is less than the right `SunatProductCode`.

    left: SunatProductCode
    The first `SunatProductCode` to compare.
    right: SunatProductCode
    The second `SunatProductCode` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(SunatProductCode left, SunatProductCode right)

    Determines whether the left `SunatProductCode` is less than or equal to the right `SunatProductCode`.

    left: SunatProductCode
    The first `SunatProductCode` to compare.
    right: SunatProductCode
    The second `SunatProductCode` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(SunatProductCode left, SunatProductCode right)

    Determines whether the left `SunatProductCode` is greater than the right `SunatProductCode`.

    left: SunatProductCode
    The first `SunatProductCode` to compare.
    right: SunatProductCode
    The second `SunatProductCode` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(SunatProductCode left, SunatProductCode right)

    Determines whether the left `SunatProductCode` is greater than or equal to the right `SunatProductCode`.

    left: SunatProductCode
    The first `SunatProductCode` to compare.
    right: SunatProductCode
    The second `SunatProductCode` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCode
    public string Code { get; }

    Gets the SUNAT Product Code (Catálogo 25).

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `SunatProductCode` instance was initialized through a factory rather than `default(SunatProductCode)`.

record

TaxPeriod

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Peru
public readonly record struct TaxPeriod : ISpanParsable<TaxPeriod>, IComparable<TaxPeriod>
Implementa: IComparable<TaxPeriod>, ISpanParsable<TaxPeriod>

Represents a Peruvian Tax Period (Período Tributario SIRE / PLE / Declara Fácil SUNAT). Format: Exactly 6 numeric digits `YYYYMM` (e.g. `"202608"` for August 2026).

Miembros (17)

  • methodCompareTo
    public int CompareTo(TaxPeriod other)

    Inherits documentation from base type or interface.

    other: TaxPeriod
  • methodCreate
    public static Result<TaxPeriod> Create(ReadOnlySpan<char> input)

    Creates a validated `TaxPeriod` from a character span.

    input: ReadOnlySpan<char>
    The 6-digit character span representation.

    Retorna: A `Result<TaxPeriod>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<TaxPeriod> Create(int year, int month)

    Creates a validated `TaxPeriod` from year and month components.

    year: int
    The tax year (2000-2100).
    month: int
    The tax month (1-12).

    Retorna: A `Result<TaxPeriod>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<TaxPeriod> Create(string? value)

    Creates a validated `TaxPeriod` from a 6-digit `YYYYMM` string.

    value: string?
    The 6-digit string representation.

    Retorna: A `Result<TaxPeriod>` containing the validated instance or a domain validation error.

  • methodParse
    public static TaxPeriod Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static TaxPeriod Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out TaxPeriod result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out TaxPeriod
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out TaxPeriod result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out TaxPeriod
  • methodoperator <
    public static bool operator <(TaxPeriod left, TaxPeriod right)

    Determines whether the left `TaxPeriod` is less than the right `TaxPeriod`.

    left: TaxPeriod
    The first `TaxPeriod` to compare.
    right: TaxPeriod
    The second `TaxPeriod` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(TaxPeriod left, TaxPeriod right)

    Determines whether the left `TaxPeriod` is less than or equal to the right `TaxPeriod`.

    left: TaxPeriod
    The first `TaxPeriod` to compare.
    right: TaxPeriod
    The second `TaxPeriod` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(TaxPeriod left, TaxPeriod right)

    Determines whether the left `TaxPeriod` is greater than the right `TaxPeriod`.

    left: TaxPeriod
    The first `TaxPeriod` to compare.
    right: TaxPeriod
    The second `TaxPeriod` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(TaxPeriod left, TaxPeriod right)

    Determines whether the left `TaxPeriod` is greater than or equal to the right `TaxPeriod`.

    left: TaxPeriod
    The first `TaxPeriod` to compare.
    right: TaxPeriod
    The second `TaxPeriod` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyFormatted
    public string Formatted { get; }

    Formats the period in standard `YYYYMM` representation.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `TaxPeriod` instance was initialized through a factory rather than `default(TaxPeriod)`.

  • propertyMonth
    public byte Month { get; }

    Gets the tax month (1 to 12).

  • propertyYear
    public int Year { get; }

    Gets the 4-digit tax year.

record

UbigeoCode

Ensamblado: EricksonLopez.ValueObjects.Fiscal.Peru
public readonly record struct UbigeoCode : ISpanParsable<UbigeoCode>, IComparable<UbigeoCode>
Implementa: IComparable<UbigeoCode>, ISpanParsable<UbigeoCode>

Represents a Peruvian 6-digit Ubigeo Code (Código de Ubicación Geográfica INEI / SUNAT), required for electronic invoicing, tax addresses, and dispatch guides. Structure: Exactly 6 numeric digits: Department (2), Province (2), District (2), e.g. `"150101"` (Lima, Lima, Lima).

Miembros (17)

  • methodCompareTo
    public int CompareTo(UbigeoCode other)

    Inherits documentation from base type or interface.

    other: UbigeoCode
  • methodCreate
    public static Result<UbigeoCode> Create(ReadOnlySpan<char> input)

    Creates a validated `UbigeoCode` from a character span.

    input: ReadOnlySpan<char>
    The 6-digit character span representation.

    Retorna: A `Result<UbigeoCode>` containing the validated instance or a domain validation error.

  • methodCreate
    public static Result<UbigeoCode> Create(string? code)

    Creates a validated `UbigeoCode` from a 6-digit string.

    code: string?
    The 6-digit Ubigeo code string.

    Retorna: A `Result<UbigeoCode>` containing the validated instance or a domain validation error.

  • methodParse
    public static UbigeoCode Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
  • methodParse
    public static UbigeoCode Parse(string s, IFormatProvider? provider = null)

    Inherits documentation from base type or interface.

    s: string
    provider: IFormatProvider?
  • methodToString
    public override string ToString()

    Inherits documentation from base type or interface.

  • methodTryParse
    public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out UbigeoCode result)

    Inherits documentation from base type or interface.

    s: ReadOnlySpan<char>
    provider: IFormatProvider?
    result: out UbigeoCode
  • methodTryParse
    public static bool TryParse(string? s, IFormatProvider? provider, out UbigeoCode result)

    Inherits documentation from base type or interface.

    s: string?
    provider: IFormatProvider?
    result: out UbigeoCode
  • methodoperator <
    public static bool operator <(UbigeoCode left, UbigeoCode right)

    Determines whether the left `UbigeoCode` is less than the right `UbigeoCode`.

    left: UbigeoCode
    The first `UbigeoCode` to compare.
    right: UbigeoCode
    The second `UbigeoCode` to compare.

    Retorna: `true` if `left` is less than `right`; otherwise, `false`.

  • methodoperator <=
    public static bool operator <=(UbigeoCode left, UbigeoCode right)

    Determines whether the left `UbigeoCode` is less than or equal to the right `UbigeoCode`.

    left: UbigeoCode
    The first `UbigeoCode` to compare.
    right: UbigeoCode
    The second `UbigeoCode` to compare.

    Retorna: `true` if `left` is less than or equal to `right`; otherwise, `false`.

  • methodoperator >
    public static bool operator >(UbigeoCode left, UbigeoCode right)

    Determines whether the left `UbigeoCode` is greater than the right `UbigeoCode`.

    left: UbigeoCode
    The first `UbigeoCode` to compare.
    right: UbigeoCode
    The second `UbigeoCode` to compare.

    Retorna: `true` if `left` is greater than `right`; otherwise, `false`.

  • methodoperator >=
    public static bool operator >=(UbigeoCode left, UbigeoCode right)

    Determines whether the left `UbigeoCode` is greater than or equal to the right `UbigeoCode`.

    left: UbigeoCode
    The first `UbigeoCode` to compare.
    right: UbigeoCode
    The second `UbigeoCode` to compare.

    Retorna: `true` if `left` is greater than or equal to `right`; otherwise, `false`.

  • propertyCode
    public string Code { get; }

    Gets the 6-digit Ubigeo string.

  • propertyDepartmentCode
    public string DepartmentCode { get; }

    Gets the 2-digit Department code.

  • propertyDistrictCode
    public string DistrictCode { get; }

    Gets the 2-digit District code.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this `UbigeoCode` instance was initialized through a factory rather than `default(UbigeoCode)`.

  • propertyProvinceCode
    public string ProvinceCode { get; }

    Gets the 2-digit Province code.

EricksonLopez.ValueObjects.Formatting#

2
record

CurrencyLiteralProfile

Ensamblado: EricksonLopez.ValueObjects
public readonly record struct CurrencyLiteralProfile

Defines singular and plural Spanish legal currency descriptors for `SpanishMoneyInWords`.

Miembros (11)

  • methodCreate
    public static Result<CurrencyLiteralProfile> Create(string? isoCode, string? singularLabel, string? pluralLabel)

    Creates a custom `CurrencyLiteralProfile`.

    isoCode: string?
    The 3-letter ISO 4217 currency code.
    singularLabel: string?
    Singular Spanish currency label.
    pluralLabel: string?
    Plural Spanish currency label.

    Retorna: A `Result<CurrencyLiteralProfile>` containing the profile or a validation error.

  • methodResolveOrDefault
    public static CurrencyLiteralProfile ResolveOrDefault(string? isoCode)

    Resolves a built-in `CurrencyLiteralProfile` by ISO 4217 code (defaulting to `DOP` when null/empty).

    isoCode: string?
    The ISO 4217 code.

    Retorna: The matching `CurrencyLiteralProfile`.

  • propertyCOP
    public static CurrencyLiteralProfile COP { get; }

    Colombian Peso (`COP`): `PESO COLOMBIANO` / `PESOS COLOMBIANOS`.

  • propertyDOP
    public static CurrencyLiteralProfile DOP { get; }

    Dominican Peso (`DOP`): `PESO DOMINICANO` / `PESOS DOMINICANOS`.

  • propertyEUR
    public static CurrencyLiteralProfile EUR { get; }

    Euro (`EUR`): `EURO` / `EUROS`.

  • propertyIsInitialized
    public bool IsInitialized { get; }

    Gets a value indicating whether this profile is initialized.

  • propertyIsoCode
    public string IsoCode { get; }

    Gets the ISO 4217 three-letter currency code.

  • propertyMXN
    public static CurrencyLiteralProfile MXN { get; }

    Mexican Peso (`MXN`): `PESO MEXICANO` / `PESOS MEXICANOS`.

  • propertyPluralLabel
    public string PluralLabel { get; }

    Gets the plural Spanish currency label.

  • propertySingularLabel
    public string SingularLabel { get; }

    Gets the singular Spanish currency label (used when integer amount == 1).

  • propertyUSD
    public static CurrencyLiteralProfile USD { get; }

    United States Dollar (`USD`): `DOLAR ESTADOUNIDENSE` / `DOLARES ESTADOUNIDENSES`.

class

SpanishMoneyInWords

Ensamblado: EricksonLopez.ValueObjects
public static class SpanishMoneyInWords

Deterministic formatter converting non-negative monetary amounts up to `999,999,999,999.99` into formal legal Spanish fiscal literals (e.g., `UN MILLON DOSCIENTOS MIL PESOS DOMINICANOS CON 50/100`) for checks, e-CF invoices, thermal receipts, and commercial contracts.

Miembros (3)

  • methodFormat
    public static Result<string> Format(Money money, bool includeSonPrefix = false)

    Formats a validated `Money` value into legal Spanish words using its ISO currency profile.

    money: Money
    The initialized non-negative monetary value.
    includeSonPrefix: bool
    When `true`, prepends `SON:`.

    Retorna: A `Result<String>` containing the formatted Spanish literal or an error.

  • methodFormat
    public static Result<string> Format(decimal amount, CurrencyLiteralProfile profile = default, bool includeSonPrefix = false)

    Formats a non-negative `decimal` amount into legal Spanish words using the specified `CurrencyLiteralProfile`.

    amount: decimal
    The non-negative amount (<= `MaxSupportedAmount`).
    profile: CurrencyLiteralProfile
    The currency label profile (defaults to `CurrencyLiteralProfile.DOP` if uninitialized).
    includeSonPrefix: bool
    When `true`, prepends `SON:`.

    Retorna: A `Result<String>` containing the formatted Spanish literal or an error.

  • fieldMaxSupportedAmount
    public const decimal MaxSupportedAmount

    Maximum supported monetary amount (`999,999,999,999.99`).

EricksonLopez.ValueObjects.Generators#

1
class

ValueObjectIncrementalGenerator

Ensamblado: EricksonLopez.ValueObjects.Generators
public sealed class ValueObjectIncrementalGenerator : IIncrementalGenerator
Implementa: IIncrementalGenerator

Provides an incremental source generator that generates parsing, JSON serialization, and conversion implementations for Value Objects.

Miembros (1)

  • methodInitialize
    public void Initialize(IncrementalGeneratorInitializationContext context)

    Inherits documentation from base type or interface.

    context: IncrementalGeneratorInitializationContext

EricksonLopez.ValueObjects.Serialization.Json#

11
class

AddressJsonConverter

Ensamblado: EricksonLopez.ValueObjects.Serialization.Json
public sealed class AddressJsonConverter : JsonConverter<Address>
Hereda de: JsonConverter<Address>

Provides a `JsonConverter<T>` for serializing and deserializing composite `Address` instances.

Miembros (2)

  • methodRead
    public override Address? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    reader: ref Utf8JsonReader
    typeToConvert: Type
    options: JsonSerializerOptions
  • methodWrite
    public override void Write(Utf8JsonWriter writer, Address value, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    writer: Utf8JsonWriter
    value: Address
    options: JsonSerializerOptions
class

ExchangeRateJsonConverter

Ensamblado: EricksonLopez.ValueObjects.Serialization.Json
public sealed class ExchangeRateJsonConverter : JsonConverter<ExchangeRate>
Hereda de: JsonConverter<ExchangeRate>

Provides a `JsonConverter<T>` for serializing and deserializing `ExchangeRate` instances while strictly validating domain invariants.

Miembros (2)

  • methodRead
    public override ExchangeRate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    reader: ref Utf8JsonReader
    typeToConvert: Type
    options: JsonSerializerOptions
  • methodWrite
    public override void Write(Utf8JsonWriter writer, ExchangeRate value, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    writer: Utf8JsonWriter
    value: ExchangeRate
    options: JsonSerializerOptions
class

FullNameJsonConverter

Ensamblado: EricksonLopez.ValueObjects.Serialization.Json
public sealed class FullNameJsonConverter : JsonConverter<FullName>
Hereda de: JsonConverter<FullName>

Provides a `JsonConverter<T>` for serializing and deserializing composite `FullName` instances.

Miembros (2)

  • methodRead
    public override FullName? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    reader: ref Utf8JsonReader
    typeToConvert: Type
    options: JsonSerializerOptions
  • methodWrite
    public override void Write(Utf8JsonWriter writer, FullName value, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    writer: Utf8JsonWriter
    value: FullName
    options: JsonSerializerOptions
class

JsonSerializerOptionsExtensions

Ensamblado: EricksonLopez.ValueObjects.Serialization.Json
public static class JsonSerializerOptionsExtensions

Provides extension methods for `JsonSerializerOptions` to safely register Value Object serializers.

Miembros (1)

  • methodAddValueObjectConverters
    public static JsonSerializerOptions AddValueObjectConverters(this JsonSerializerOptions options)

    Registers the `ValueObjectJsonConverterFactory` in the specified `JsonSerializerOptions` to ensure that all Value Objects are correctly validated and instantiated via their domain factories during deserialization.

    options: this JsonSerializerOptions
    The JSON serializer options to configure.

    Retorna: The modified options instance to allow chaining.

class

MoneyJsonConverter

Ensamblado: EricksonLopez.ValueObjects.Serialization.Json
public sealed class MoneyJsonConverter : JsonConverter<Money>
Hereda de: JsonConverter<Money>

Provides a `JsonConverter<T>` for serializing and deserializing `Money` instances in structured object format (`{"amount": 100.50, "currency": "USD"}`) or string format (`"100.50 USD"`).

Miembros (2)

  • methodRead
    public override Money Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    reader: ref Utf8JsonReader
    typeToConvert: Type
    options: JsonSerializerOptions
  • methodWrite
    public override void Write(Utf8JsonWriter writer, Money value, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    writer: Utf8JsonWriter
    value: Money
    options: JsonSerializerOptions
class

PhysicalDimensionsJsonConverter

Ensamblado: EricksonLopez.ValueObjects.Serialization.Json
public sealed class PhysicalDimensionsJsonConverter : JsonConverter<PhysicalDimensions>
Hereda de: JsonConverter<PhysicalDimensions>

AOT-compatible `JsonConverter<T>` for `PhysicalDimensions`.

Miembros (2)

  • methodRead
    public override PhysicalDimensions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    reader: ref Utf8JsonReader
    typeToConvert: Type
    options: JsonSerializerOptions
  • methodWrite
    public override void Write(Utf8JsonWriter writer, PhysicalDimensions value, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    writer: Utf8JsonWriter
    value: PhysicalDimensions
    options: JsonSerializerOptions
class

RangeJsonConverter<T>

Ensamblado: EricksonLopez.ValueObjects.Serialization.Json
public sealed class RangeJsonConverter<T> : JsonConverter<Range<T>> where T : struct, IComparable<T>, IEquatable<T>
Hereda de: JsonConverter<Range<T>>

Provides a `JsonConverter<T>` for serializing and deserializing `Range<T>` instances.

Notas:

Type parameters: T: The underlying value type contained in the range.

Miembros (2)

  • methodRead
    public override Range<T> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    reader: ref Utf8JsonReader
    typeToConvert: Type
    options: JsonSerializerOptions
  • methodWrite
    public override void Write(Utf8JsonWriter writer, Range<T> value, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    writer: Utf8JsonWriter
    value: Range<T>
    options: JsonSerializerOptions
class

SingleValueObjectJsonConverter<TSelf, TValue>

Ensamblado: EricksonLopez.ValueObjects.Serialization.Json
public abstract class SingleValueObjectJsonConverter<TSelf, TValue> : JsonConverter<TSelf> where TSelf : SingleValueObject<TSelf, TValue> where TValue : notnull
Hereda de: JsonConverter<TSelf>

Provides a generic `JsonConverter<T>` for single-value Value Objects.

Notas:

Type parameters: TSelf: The concrete Value Object type.; TValue: The underlying primitive value type.

Miembros (2)

  • methodRead
    public override TSelf? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    reader: ref Utf8JsonReader
    typeToConvert: Type
    options: JsonSerializerOptions

    Exceptions: JsonException: Domain validation failed while constructing `TSelf` from the deserialized primitive value.

  • methodWrite
    public override void Write(Utf8JsonWriter writer, TSelf value, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    writer: Utf8JsonWriter
    value: TSelf
    options: JsonSerializerOptions

    Exceptions: ArgumentNullException: `writer` is `null`.

class

StringValueObjectJsonConverter<TSelf>

Ensamblado: EricksonLopez.ValueObjects.Serialization.Json
public abstract class StringValueObjectJsonConverter<TSelf> : JsonConverter<TSelf> where TSelf : SingleValueObject<TSelf, string>
Hereda de: JsonConverter<TSelf>

Provides a specialized `JsonConverter<T>` for string-backed Value Objects.

Notas:

Type parameters: TSelf: The concrete string Value Object type.

Miembros (2)

  • methodRead
    public override TSelf? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    reader: ref Utf8JsonReader
    typeToConvert: Type
    options: JsonSerializerOptions
  • methodWrite
    public override void Write(Utf8JsonWriter writer, TSelf value, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    writer: Utf8JsonWriter
    value: TSelf
    options: JsonSerializerOptions
class

StructStringValueObjectJsonConverter<TSelf>

Ensamblado: EricksonLopez.ValueObjects.Serialization.Json
public abstract class StructStringValueObjectJsonConverter<TSelf> : JsonConverter<TSelf> where TSelf : struct
Hereda de: JsonConverter<TSelf>

Provides an AOT-compatible `JsonConverter<T>` base class for stack-allocated struct Value Objects backed by a string representation.

Notas:

Type parameters: TSelf: The concrete struct Value Object type.

Miembros (2)

  • methodRead
    public override TSelf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    reader: ref Utf8JsonReader
    typeToConvert: Type
    options: JsonSerializerOptions
  • methodWrite
    public override void Write(Utf8JsonWriter writer, TSelf value, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    writer: Utf8JsonWriter
    value: TSelf
    options: JsonSerializerOptions
class

ValueObjectJsonConverterFactory

Ensamblado: EricksonLopez.ValueObjects.Serialization.Json
public sealed class ValueObjectJsonConverterFactory : JsonConverterFactory
Hereda de: JsonConverterFactory

Universal `JsonConverterFactory` for automatically resolving and instantiating System.Text.Json converters for all Value Objects in the EricksonLopez ecosystem.

Miembros (3)

  • methodCanConvert
    public override bool CanConvert(Type typeToConvert)

    Inherits documentation from base type or interface.

    typeToConvert: Type
  • methodCreateConverter
    public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options)

    Inherits documentation from base type or interface.

    typeToConvert: Type
    options: JsonSerializerOptions
  • methodRegisterConverter<T>
    public static void RegisterConverter<T>(JsonConverter<T> converter)

    Explicitly registers a pre-instantiated `JsonConverter<T>` to guarantee Native AOT and Trimming compatibility without runtime reflection.

    converter: JsonConverter<T>
    The converter instance to register.

    Type parameters: T: The type to convert.

EricksonLopez.ValueObjects.Testing.Arbitraries#

5
class

CedulaArbitrary

Ensamblado: EricksonLopez.ValueObjects.Testing
public static class CedulaArbitrary

Provides non-exhausting FsCheck generators for valid and Luhn-corrupted 11-digit Dominican JCE Cédula strings.

Miembros (2)

  • methodGenerateInvalid
    public static Arbitrary<string> GenerateInvalid()

    Generates 11-digit Cédula strings with an intentionally corrupted Luhn check digit.

    Retorna: An FsCheck `Arbitrary<String>` of invalid Cédulas.

  • methodGenerateValid
    public static Arbitrary<string> GenerateValid()

    Generates valid 11-digit Dominican Cédula strings satisfying JCE Modulo-10 Luhn checksum rules.

    Retorna: An FsCheck `Arbitrary<String>` of valid Cédulas.

class

MoneyArbitrary

Ensamblado: EricksonLopez.ValueObjects.Testing
public static class MoneyArbitrary

Provides non-exhausting FsCheck `Arbitrary<Money>` generators covering negative sub-unit values (`-0.0001` to `-0.9999`), zero, and large enterprise monetary amounts.

Miembros (1)

  • methodGenerate
    public static Arbitrary<Money> Generate(CurrencyCode currency = default, int decimals = 4)

    Generates valid `Money` values in the specified currency (defaults to `CurrencyCode.DOP`) and decimal precision.

    currency: CurrencyCode
    Target ISO 4217 currency (defaults to DOP when uninitialized).
    decimals: int
    Decimal rounding places (0–6, defaults to 4).

    Retorna: An FsCheck `Arbitrary<Money>` generator.

class

PercentageArbitrary

Ensamblado: EricksonLopez.ValueObjects.Testing
public static class PercentageArbitrary

Provides FsCheck `Arbitrary<Percentage>` generators across `0.0000%` to `100.0000%`.

Miembros (1)

  • methodGenerate
    public static Arbitrary<Percentage> Generate()

    Generates valid `Percentage` instances between 0% and 100% with 4-decimal granularity.

    Retorna: An FsCheck `Arbitrary<Percentage>` generator.

class

RncArbitrary

Ensamblado: EricksonLopez.ValueObjects.Testing
public static class RncArbitrary

Provides non-exhausting FsCheck generators for valid and checksum-corrupted 9-digit Dominican DGII Modulo-11 RNC strings.

Miembros (2)

  • methodGenerateInvalid
    public static Arbitrary<string> GenerateInvalid()

    Generates 9-digit RNC strings with a deterministically mutated (invalid) Modulo-11 check digit.

    Retorna: An FsCheck `Arbitrary<String>` of invalid RNCs.

  • methodGenerateValid
    public static Arbitrary<string> GenerateValid()

    Generates valid 9-digit corporate Dominican RNC strings satisfying DGII Modulo-11 weights `[7,9,8,6,5,4,3,2]`.

    Retorna: An FsCheck `Arbitrary<String>` of valid RNCs.

class

TaxIdArbitrary

Ensamblado: EricksonLopez.ValueObjects.Testing
public static class TaxIdArbitrary

Provides weighted FsCheck generators combining valid 9-digit corporate RNCs (60%) and 11-digit individual Cédulas (40%).

Miembros (1)

  • methodGenerateValid
    public static Arbitrary<string> GenerateValid()

    Generates valid Dominican taxpayer identifier strings (RNC or Cédula).

    Retorna: An FsCheck `Arbitrary<String>` of valid Dominican tax IDs.

Microsoft.EntityFrameworkCore#

1
class

ValueObjectModelConfigurationExtensions

Ensamblado: EricksonLopez.ValueObjects.EntityFrameworkCore
public static class ValueObjectModelConfigurationExtensions

Provides extension methods for configuring Value Object converters on `ModelConfigurationBuilder`.

Miembros (1)

  • methodConfigureDomainValueObjects
    public static ModelConfigurationBuilder ConfigureDomainValueObjects(this ModelConfigurationBuilder configurationBuilder)

    Registers default EF Core value converter mappings for core domain value objects.

    configurationBuilder: this ModelConfigurationBuilder
    The model configuration builder to configure.

    Retorna: The configured `ModelConfigurationBuilder` instance.

    Exceptions: ArgumentNullException: `configurationBuilder` is `null`

Buscar en el Ecosistema EricksonLopez.*

Escribe el nombre de una librería, ID de paquete NuGet, tipo .NET o concepto arquitectónico para buscar en el portal.