Table of Contents

Class FedExServiceOptions

Namespace
Visus.AddressValidation.Integration.FedEx.Configuration
Assembly
Visus.AddressValidation.Integration.FedEx.dll

Configuration options for the FedEx address validation service.

public sealed class FedExServiceOptions : AbstractServiceOptions, IValidatableObject
Inheritance
FedExServiceOptions
Implements
Inherited Members

Fields

SectionName

The configuration section path used to bind these options from appsettings.json or other configuration sources.

public const string SectionName = "AddressValidationSettings:FedEx"

Field Value

string

Properties

AccountNumber

Gets or sets the FedEx account number used to authenticate API requests.

[Required(AllowEmptyStrings = false)]
public required string AccountNumber { get; set; }

Property Value

string

ClientId

Gets or sets the OAuth 2.0 client ID issued by FedEx for the registered application.

[Required(AllowEmptyStrings = false)]
public required string ClientId { get; set; }

Property Value

string

ClientSecret

Gets or sets the OAuth 2.0 client secret issued by FedEx for the registered application.

[Required(AllowEmptyStrings = false)]
public required string ClientSecret { get; set; }

Property Value

string

EndpointUri

Gets the base URI of the provider's API endpoint, derived from the current ClientEnvironment value.

public override Uri EndpointUri { get; }

Property Value

Uri

Locale

Gets or sets the IETF BCP 47 language tag that identifies the locale used for address validation responses returned by the FedEx API.

public string? Locale { get; set; }

Property Value

string

Remarks

When null (the default), the x-locale request header is omitted and FedEx will use its own default locale. Set to an IETF BCP 47 tag such as en-US or fr-FR to request responses in a specific language and region.

Methods

Validate(ValidationContext)

Performs cross-property validation on the options object.

public override IEnumerable<ValidationResult> Validate(ValidationContext validationContext)

Parameters

validationContext ValidationContext

The context in which validation is performed.

Returns

IEnumerable<ValidationResult>

A collection of ValidationResult instances describing any validation failures, or an empty collection if the options are valid.

Remarks

Inherits the sandbox endpoint override check from Validate(ValidationContext).

Also validates that Locale, when set, is one of the IETF BCP 47 language tags listed in SupportedLocales.