VATSense

Handles Vatsense API interactions for VAT validation.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Table of Contents

$api_key  : string
The API key for Vatsense API authentication
$check_vat_number_url  : string
The URL endpoint for checking VAT numbers via Vatsense API
__construct()  : mixed
Constructor. Initializes the Vatsense API client by loading configuration settings.
check_vat_number()  : array<string|int, mixed>
Check a VAT number using Vatsense API.
get_api_key()  : string
Get the API key for Vatsense API authentication
get_check_vat_number_url()  : string
Get the VAT number checking endpoint URL
load_configuration()  : void
Load the configuration from the database
set_api_key()  : void
Set the API key for Vatsense API authentication
set_check_vat_number_url()  : void
Set the VAT number checking endpoint URL

Properties

$api_key

The API key for Vatsense API authentication

private string $api_key

$check_vat_number_url

The URL endpoint for checking VAT numbers via Vatsense API

private string $check_vat_number_url

Methods

__construct()

Constructor. Initializes the Vatsense API client by loading configuration settings.

public __construct() : mixed
Return values
mixed

check_vat_number()

Check a VAT number using Vatsense API.

public check_vat_number(string $vat_number[, string $requester_vat_number = '' ]) : array<string|int, mixed>
Parameters
$vat_number : string

The VAT number to check

$requester_vat_number : string = ''

Optional. Your own VAT number to get a consultation number in the response

Tags
throws
Exception

If there is an error checking the VAT number.

Return values
array<string|int, mixed>

The API response

get_api_key()

Get the API key for Vatsense API authentication

public get_api_key() : string
Return values
string

get_check_vat_number_url()

Get the VAT number checking endpoint URL

public get_check_vat_number_url() : string
Return values
string

load_configuration()

Load the configuration from the database

public load_configuration() : void
Return values
void

set_api_key()

Set the API key for Vatsense API authentication

public set_api_key([string $api_key = null ]) : void
Parameters
$api_key : string = null

The API key to set

Return values
void

set_check_vat_number_url()

Set the VAT number checking endpoint URL

public set_check_vat_number_url() : void
Return values
void

Search results