Documentation
¶
Index ¶
- Constants
- func Round(val float64, roundOn float64, places int) (newVal float64)
- type API
- type Address
- type Invoice
- func (self *Invoice) AddItem(i Item)
- func (self *Invoice) GetSubtotal() float64
- func (self *Invoice) GetTotal() float64
- func (self *Invoice) Prepare()
- func (self *Invoice) SendMail(list []string)
- func (self *Invoice) SetEmitted(t time.Time)
- func (self *Invoice) SetPayment(v *Payment)
- func (self *Invoice) SetReceiver(v *Receiver)
- func (self *Invoice) TransferIVA(rate float64)
- type Item
- type Items
- type JSONTime
- type MailTo
- type Payment
- type Receiver
- type Response
- type ResponseError
- type Tax
- type Taxes
Constants ¶
View Source
const EF_DECIMALS = 2
View Source
const EF_SERVICE = "https://api.enlacefiscal.com/rest/v1/"
View Source
const EF_VERSION = "5.0"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Address ¶
type Address struct {
Street string `json:"calle"`
Ext string `json:"noExterior"`
Int string `json:"noInterior"`
Neighborhood string `json:"colonia"`
Locality string `json:"localidad"`
Town string `json:"municipio"`
State string `json:"estado"`
Country string `json:"pais"`
Zipcode string `json:"cp"`
}
type Invoice ¶
type Invoice struct {
Mode string `json:"modo"`
Version string `json:"versionEF"`
Subtotal float64 `json:"subTotal"`
Discounts float64 `json:"descuentos"`
Total float64 `json:"total"`
Decimals int `json:"numeroDecimales"`
Series string `json:"serie"`
Folio string `json:"folioInterno"`
Emitted JSONTime `json:"fechaEmision"`
RFC string `json:"rfc"`
Referer string `json:"softwareIntegrador"`
// Nested structures
Payment *Payment `json:"DatosDePago,omitempty"`
Receiver *Receiver `json:"Receptor,omitempty"`
Items *Items `json:"Partidas,omitempty"`
Taxes *Taxes `json:"Impuestos,omitempty"`
MailTo *MailTo `json:"EnviarCFDi,omitempty"`
}
Invoice is a representation of a sign request to EnlaceFiscal.com
func (*Invoice) GetSubtotal ¶
func (*Invoice) Prepare ¶
func (self *Invoice) Prepare()
Prepare the Invoice representation for signin
func (*Invoice) SetEmitted ¶
Sets the current invoice emitted time
func (*Invoice) SetPayment ¶
Sets the current invoice representation payment settings
func (*Invoice) SetReceiver ¶
Sets the current invoice representation receiver information (target rfc)
func (*Invoice) TransferIVA ¶
Transfers IVA Taxes to the current representation
type JSONTime ¶
func (JSONTime) MarshalJSON ¶
type ResponseError ¶
type ResponseError struct {
Code interface{}
Reference interface{}
Description interface{}
}
func (*ResponseError) Error ¶
func (e *ResponseError) Error() string
Click to show internal directories.
Click to hide internal directories.