vies

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package vies implements the API call to the VIES service to validate a TIN number

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct{}

API is a struct that implements the VIES lookup and inherits from LookupAPI

func (API) LookupTIN

func (v API) LookupTIN(c context.Context, tid *tax.Identity) (bool, error)

LookupTIN validates existence of VAT number in VIES database

type CheckTINResponse

type CheckTINResponse struct {
	Valid       bool   `json:"valid"`
	CountryCode string `json:"countryCode"`
	TinNumber   string `json:"vatNumber"`
}

CheckTINResponse is the response from a TIN lookup

type CheckVatRequest

type CheckVatRequest struct {
	CountryCode l10n.TaxCountryCode `json:"countryCode"`
	VatNumber   cbc.Code            `json:"vatNumber"`
}

CheckVatRequest is the request body for the VIES API

type CommonResponse

type CommonResponse struct {
	Message string `json:"message"`
}

CommonResponse is the response body for the VIES API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL