Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Username is the username for the VKN service.
Username string
// Password is the password for the VKN service.
Password string
}
Config holds the configuration details for the VKN service.
type GetRecipientResponse ¶
type GetRecipientResponse struct {
Data *Recipient `json:"data"`
Metadata struct {
Optime string `json:"optime"`
} `json:"metadata"`
}
GetRecipientResponse represents the response after querying recipient data.
type Recipient ¶ added in v1.0.0
type Recipient struct {
// FirstName provides if the recipient is a person.
FirstName string `json:"adi"`
// LastName provides if the recipient is a person.
LastName string `json:"soyadi"`
// Title provides if the recipient is a company.
Title string `json:"unvan"`
// TaxOffice provides the tax office of the recipient.
TaxOffice string `json:"vergiDairesi"`
}
type Vkn ¶
type Vkn interface {
// GetRecipientData fetches the recipient data for a given VKN.
GetRecipient(ctx context.Context, vkn string) (*Recipient, error)
// Login logs in to the VKN service.
Login(ctx context.Context) error
// Logout logs out from the VKN service.
Logout(ctx context.Context) error
}
Vkn represents the main interface for querying recipient data.
Click to show internal directories.
Click to hide internal directories.