Documentation ¶
Index ¶
Constants ¶
View Source
const ( NIP_EMPTY = iota + 1 NIP_UNKNOWN GUS_LOGIN GUS_CAPTCHA GUS_SYNC NIP_UPDATE NIP_BAD CONTENT_SYNTAX NIP_NOT_ACTIVE INVALID_PATH EXCEPTION NO_PERMISSION GEN_INVOICES GEN_SPEC_INV SEND_INVOICE PREMIUM_FEATURE SEND_ANNOUNCEMENT INVOICE_PAYMENT REGON_BAD SEARCH_KEY_EMPTY KRS_BAD EUVAT_BAD VIES_SYNC CEIDG_SYNC RANDOM_NUMBER PLAN_FEATURE SEARCH_TYPE PPUMF_SYNC PPUMF_DIRECT NIP_FEATURE REGON_FEATURE KRS_FEATURE TEST_MODE ACTIVITY_CHECK ACCESS_DENIED MAINTENANCE BILLING_PLANS DOCUMENT_PDF EXPORT_PDF RANDOM_TYPE LEGAL_FORM GROUP_CHECKS CLIENT_COUNTERS URE_SYNC URE_DATA DKN_BAD SEND_REMAINDER EXPORT_JPK GEN_ORDER_INV SEND_EXPIRATION IBAN_SYNC ORDER_CANCEL WHITELIST_CHECK AUTH_TIMESTAMP AUTH_MAC IBAN_BAD )
View Source
const ( DB_AUTH_IP = iota + 101 DB_AUTH_KEY_STATUS DB_AUTH_KEY_VALUE DB_AUTH_OVER_PLAN DB_CLIENT_LOCKED DB_CLIENT_TYPE DB_CLIENT_NOT_PAID DB_AUTH_KEYID_VALUE )
View Source
const ( CLI_CONNECT = iota + 201 CLI_RESPONSE CLI_NUMBER CLI_NIP CLI_REGON CLI_KRS CLI_EUVAT CLI_IBAN CLI_EXCEPTION CLI_DATEFORMAT CLI_INPUT )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountStatus ¶
type AccountStatus struct { UID string `json:"uid" xml:"uid"` Type string `json:"type" xml:"type"` ValidTo *time.Time `json:"valid_to" xml:"validTo"` // nil if not set BillingPlanName string `json:"billing_plan_name" xml:"billingPlanName"` SubscriptionPrice float64 `json:"subscription_price" xml:"subscriptionPrice"` ItemPrice float64 `json:"item_price" xml:"itemPrice"` ItemPriceStatus float64 `json:"item_price_status" xml:"itemPriceCheckStatus"` Limit int `json:"limit" xml:"limit"` RequestDelay int `json:"request_delay" xml:"requestDelay"` DomainLimit int `json:"domain_limit" xml:"domainLimit"` OverPlanAllowed bool `json:"over_plan_allowed" xml:"overplanAllowed"` ExcelAddIn bool `json:"excel_add_in" xml:"excelAddin"` App bool `json:"app" xml:"app"` CLI bool `json:"cli" xml:"cli"` Stats bool `json:"stats" xml:"stats"` Monitor bool `json:"monitor" xml:"monitor"` FuncGetVIESData bool `json:"func_get_vies_data" xml:"funcGetVIESData"` VIESDataCount int `json:"vies_data_count" xml:"viesDataCount"` TotalCount int `json:"total_count" xml:"totalCount"` }
func (*AccountStatus) String ¶
func (a *AccountStatus) String() string
Return account status as string
type VIESClient ¶
type VIESClient struct {
// contains filtered or unexported fields
}
func NewVIESClient ¶
func NewVIESClient(id, key string) *VIESClient
Create new VIESClient instance with specified id and key or use test credentials
func (*VIESClient) GetAccountStatus ¶
func (c *VIESClient) GetAccountStatus() (*AccountStatus, *ViesError)
Get current account status GetAccountStatus returns account status or nil in case of error
func (*VIESClient) GetLastError ¶
func (c *VIESClient) GetLastError() (int, string)
Get last error message
func (*VIESClient) GetVIESData ¶
func (c *VIESClient) GetVIESData(euvat string) (*VIESData, *ViesError)
Get VIES data for specified number from EU VIES system GetVIESData returns VIES data or nil in case of error
type VIESData ¶
type VIESData struct { UID string `json:"uid" xml:"uid"` CountryCode string `json:"country_code" xml:"countryCode"` VATNumber string `json:"vat_number" xml:"vatNumber"` Valid bool `json:"valid" xml:"valid"` TraderName string `json:"trader_name" xml:"traderName"` TraderCompanyType string `json:"trader_company_type" xml:"traderCompanyType"` TraderAddress string `json:"trader_address" xml:"traderAddress"` ID string `json:"id" xml:"id"` Date string `json:"date" xml:"date"` Source string `json:"source" xml:"source"` }
Click to show internal directories.
Click to hide internal directories.