Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CancelInvoice(summary Summary, reason string) bool
- func (c *Client) CreateDraftBasicInvoice(invoice *InvoiceDetails) bool
- func (c *Client) EditDraftBasicInvoice(invoice *InvoiceDetails) bool
- func (c *Client) GetCompanyInfo(taxNr string) (*CompanyInfo, error)
- func (c *Client) GetDownloadURL(ettn string, signed bool) string
- func (c *Client) GetInvoice(ettn string) (*InvoiceDetails, error)
- func (c *Client) GetInvoiceHTML(ettn string, signed bool) (string, error)
- func (c *Client) GetInvoices(startDate, endDate string) (*GetInvoices, error)
- func (c *Client) GetInvoicesMeFromAPI(startDate, endDate string) (*GetInvoices, error)
- func (c *Client) GetNewETTN() string
- func (c *Client) GetUserInformationsData() (*UserInformation, error)
- func (c *Client) InitializeSMSVerification() string
- func (c *Client) Login() error
- func (c *Client) Logout() error
- func (c *Client) SendSMSVerification(phoneNumber string) string
- func (c *Client) SetTestCredentials() error
- func (c *Client) VerifySMSCode(code string, oid string, invoice *InvoiceDetails) (*ResponseVerifySMSCode, error)
- type CompanyInfo
- type Config
- type GetInvoices
- type Invoice
- type InvoiceDetails
- type MalHizmetTable
- type RequestDATA
- type RequestVerifySMSCode
- type ResponseVerifySMSCode
- type Summary
- type UserInformation
Constants ¶
View Source
const ( BASE_URL = "https://earsivportal.efatura.gov.tr" TEST_URL = "https://earsivportaltest.efatura.gov.tr" DISPATCH_PATH = "/earsiv-services/dispatch" TOKEN_PATH = "/earsiv-services/assos-login" REFERRER_PATH = "/intragiris.html" )
GLOBALS
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Token string // contains filtered or unexported fields }
func (*Client) CreateDraftBasicInvoice ¶
func (c *Client) CreateDraftBasicInvoice(invoice *InvoiceDetails) bool
func (*Client) EditDraftBasicInvoice ¶
func (c *Client) EditDraftBasicInvoice(invoice *InvoiceDetails) bool
func (*Client) GetCompanyInfo ¶
func (c *Client) GetCompanyInfo(taxNr string) (*CompanyInfo, error)
func (*Client) GetInvoice ¶
func (c *Client) GetInvoice(ettn string) (*InvoiceDetails, error)
func (*Client) GetInvoiceHTML ¶
func (*Client) GetInvoices ¶
func (c *Client) GetInvoices(startDate, endDate string) (*GetInvoices, error)
func (*Client) GetInvoicesMeFromAPI ¶
func (c *Client) GetInvoicesMeFromAPI(startDate, endDate string) (*GetInvoices, error)
func (*Client) GetNewETTN ¶
func (*Client) GetUserInformationsData ¶
func (c *Client) GetUserInformationsData() (*UserInformation, error)
func (*Client) InitializeSMSVerification ¶
func (*Client) SendSMSVerification ¶
func (*Client) SetTestCredentials ¶
func (*Client) VerifySMSCode ¶
func (c *Client) VerifySMSCode(code string, oid string, invoice *InvoiceDetails) (*ResponseVerifySMSCode, error)
type CompanyInfo ¶
type CompanyInfo struct { Data struct { Unvan string `json:"unvan"` Adi string `json:"adi"` Soyadi string `json:"soyadi"` VergiDairesi string `json:"vergiDairesi"` } `json:"data"` Metadata struct { Optime string `json:"optime"` } `json:"metadata"` }
CompanyInfo
type GetInvoices ¶
type GetInvoices struct { Data []Summary `json:"data"` Metadata struct { Optime string `json:"optime"` } `json:"metadata"` }
GetInvoices
type Invoice ¶
type Invoice struct {
Data InvoiceDetails `json:"data" yaml:"data"`
}
type InvoiceDetails ¶
type InvoiceDetails struct { FaturaUuid string `json:"faturaUuid" yaml:"faturaUuid"` BelgeNumarasi string `json:"belgeNumarasi" yaml:"belgeNumarasi"` FaturaTarihi string `json:"faturaTarihi" yaml:"faturaTarihi"` Saat string `json:"saat" yaml:"saat"` ParaBirimi string `json:"paraBirimi" yaml:"paraBirimi"` DovzTLkur float64 `json:"dovzTLkur" yaml:"dovzTLkur"` FaturaTipi string `json:"faturaTipi" yaml:"faturaTipi"` HangiTip string `json:"hangiTip" yaml:"hangiTip"` VknTckn string `json:"vknTckn" yaml:"vknTckn"` AliciUnvan string `json:"aliciUnvan" yaml:"aliciUnvan"` AliciAdi string `json:"aliciAdi" yaml:"aliciAdi"` AliciSoyadi string `json:"aliciSoyadi" yaml:"aliciSoyadi"` BinaAdi string `json:"binaAdi" yaml:"binaAdi"` BinaNo string `json:"binaNo" yaml:"binaNo"` KapiNo string `json:"kapiNo" yaml:"kapiNo"` KasabaKoy string `json:"kasabaKoy" yaml:"kasabaKoy"` VergiDairesi string `json:"vergiDairesi" yaml:"vergiDairesi"` Ulke string `json:"ulke" yaml:"ulke"` Bulvarcaddesokak string `json:"bulvarcaddesokak" yaml:"bulvarcaddesokak"` IrsaliyeNumarasi string `json:"irsaliyeNumarasi" yaml:"irsaliyeNumarasi"` IrsaliyeTarihi string `json:"irsaliyeTarihi" yaml:"irsaliyeTarihi"` MahalleSemtIlce string `json:"mahalleSemtIlce" yaml:"mahalleSemtIlce"` Sehir string `json:"sehir" yaml:"sehir"` PostaKodu string `json:"postaKodu" yaml:"postaKodu"` Tel string `json:"tel" yaml:"tel"` Fax string `json:"fax" yaml:"fax"` Eposta string `json:"eposta" yaml:"eposta"` Websitesi string `json:"websitesi" yaml:"websitesi"` IadeTable []struct{} `json:"iadeTable" yaml:"iadeTable"` VergiCesidi string `json:"vergiCesidi" yaml:"vergiCesidi"` MalHizmetTable []*MalHizmetTable `json:"malHizmetTable" yaml:"malHizmetTable"` Tip string `json:"tip" yaml:"tip"` Matrah float64 `json:"matrah" yaml:"matrah"` MalhizmetToplamTutari float64 `json:"malhizmetToplamTutari" yaml:"malhizmetToplamTutari"` ToplamIskonto float64 `json:"toplamIskonto" yaml:"toplamIskonto"` Hesaplanankdv float64 `json:"hesaplanankdv" yaml:"hesaplanankdv"` VergilerToplami float64 `json:"vergilerToplami" yaml:"vergilerToplami"` VergilerDahilToplamTutar float64 `json:"vergilerDahilToplamTutar" yaml:"vergilerDahilToplamTutar"` OdenecekTutar float64 `json:"odenecekTutar" yaml:"odenecekTutar"` Not string `json:"not" yaml:"not"` SiparisNumarasi string `json:"siparisNumarasi" yaml:"siparisNumarasi"` SiparisTarihi string `json:"siparisTarihi" yaml:"siparisTarihi"` FisNo string `json:"fisNo" yaml:"fisNo"` FisTarihi string `json:"fisTarihi" yaml:"fisTarihi"` FisSaati string `json:"fisSaati" yaml:"fisSaati"` FisTipi string `json:"fisTipi" yaml:"fisTipi"` ZRaporNo string `json:"zRaporNo" yaml:"zRaporNo"` OkcSeriNo string `json:"okcSeriNo" yaml:"okcSeriNo"` }
type MalHizmetTable ¶
type MalHizmetTable struct { MalHizmet string `json:"malHizmet" yaml:"malHizmet"` Miktar float64 `json:"miktar" yaml:"miktar"` Birim string `json:"birim" yaml:"birim"` BirimFiyat float64 `json:"birimFiyat" yaml:"birimFiyat"` Fiyat float64 `json:"fiyat" yaml:"fiyat"` IskontoOrani float64 `json:"iskontoOrani" yaml:"iskontoOrani"` IskontoTutari float64 `json:"iskontoTutari" yaml:"iskontoTutari"` IskontoNedeni string `json:"iskontoNedeni" yaml:"iskontoNedeni"` MalHizmetTutari float64 `json:"malHizmetTutari" yaml:"malHizmetTutari"` KdvOrani float64 `json:"kdvOrani" yaml:"kdvOrani"` VergiOrani float64 `json:"vergiOrani" yaml:"vergiOrani"` KdvTutari float64 `json:"kdvTutari" yaml:"kdvTutari"` VergininKdvTutari string `json:"vergininKdvTutari" yaml:"vergininKdvTutari"` OzelMatrahTutari float64 `json:"ozelMatrahTutari" yaml:"ozelMatrahTutari"` Hesaplananotvtevkifatakatkisi string `json:"hesaplananotvtevkifatakatkisi" yaml:"hesaplananotvtevkifatakatkisi"` Gtip string `json:"gtip" yaml:"gtip"` }
type RequestDATA ¶
type RequestDATA struct { FaturaOid string `json:"faturaOid"` ToplamTutar string `json:"toplamTutar"` BelgeNumarasi string `json:"belgeNumarasi"` AliciVknTckn string `json:"aliciVknTckn"` AliciUnvanAdSoyad string `json:"aliciUnvanAdSoyad"` SaticiVknTckn string `json:"saticiVknTckn"` SaticiUnvanAdSoyad string `json:"saticiUnvanAdSoyad"` BelgeTarihi string `json:"belgeTarihi"` BelgeTuru string `json:"belgeTuru"` OnayDurumu string `json:"onayDurumu"` Ettn string `json:"ettn"` TalepDurumColumn string `json:"talepDurumColumn"` IptalItiraz string `json:"iptalItiraz"` TalepDurum string `json:"talepDurum"` }
type RequestVerifySMSCode ¶
type RequestVerifySMSCode struct { SIFRE string `json:"SIFRE"` OID string `json:"OID"` OPR int `json:"OPR"` DATA []RequestDATA `json:"DATA"` }
type ResponseVerifySMSCode ¶
type Summary ¶
type Summary struct { BelgeNumarasi string `json:"belgeNumarasi"` AliciVknTckn string `json:"aliciVknTckn"` AliciUnvanAdSoyad string `json:"aliciUnvanAdSoyad"` BelgeTarihi string `json:"belgeTarihi"` BelgeTuru string `json:"belgeTuru"` OnayDurumu string `json:"onayDurumu"` ETTN string `json:"ettn"` }
Summary
type UserInformation ¶
type UserInformation struct { Data struct { VknTckn string `json:"vknTckn"` // Read only 🚨 Unvan string `json:"unvan"` Ad string `json:"ad"` Soyad string `json:"soyad"` SicilNo string `json:"sicilNo"` MersisNo string `json:"mersisNo"` VergiDairesi string `json:"vergiDairesi"` Cadde string `json:"cadde"` ApartmanAdi string `json:"apartmanAdi"` ApartmanNo string `json:"apartmanNo"` KapiNo string `json:"kapiNo"` Kasaba string `json:"kasaba"` Ilce string `json:"ilce"` Il string `json:"il"` PostaKodu string `json:"postaKodu"` Ulke string `json:"ulke"` TelNo string `json:"telNo"` FaksNo string `json:"faksNo"` EPostaAdresi string `json:"ePostaAdresi"` WebSitesiAdresi string `json:"webSitesiAdresi"` IsMerkezi string `json:"isMerkezi"` } `json:"data"` }
Click to show internal directories.
Click to hide internal directories.