ebarimt

package
v1.2.18 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EBarimtPersonType       = ebarimtbilltype("1")
	EBarimtOrganizationType = ebarimtbilltype("3")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckAPIItem added in v1.2.2

type CheckAPIItem struct {
	Message *string `json:"message"`
	Success bool    `json:"success"`
}

type CheckResponse added in v1.2.2

type CheckResponse struct {
	Config   CheckAPIItem `json:"config"`
	Database CheckAPIItem `json:"database"`
	Network  CheckAPIItem `json:"network"`
	Success  bool         `json:"success"`
}

type CreateEbarimtInput added in v1.1.1

type CreateEbarimtInput struct {
	CustomerNo   string
	BranchNo     string
	BillType     ebarimtbilltype
	DistrictCode string
	Stocks       []StockInput
}

type CreateEbarimtRequest

type CreateEbarimtRequest struct {
	Amount        string  `json:"amount"`
	Vat           string  `json:"vat"`
	CashAmount    string  `json:"cashAmount"`
	NonCashAmount string  `json:"nonCashAmount"`
	CityTax       string  `json:"cityTax"`
	CustomerNo    string  `json:"customerNo"`
	BillType      string  `json:"billType"`
	BranchNo      string  `json:"branchNo"`
	DistrictCode  string  `json:"districtCode"`
	Stocks        []Stock `json:"stocks"`
}

type CreateEbarimtResponse

type CreateEbarimtResponse struct {
	Amount        string  `json:"amount"`
	Vat           string  `json:"vat"`
	CashAmount    string  `json:"cashAmount"`
	NonCashAmount string  `json:"nonCashAmount"`
	CityTax       string  `json:"cityTax"`
	CustomerNo    string  `json:"customerNo"`
	BillType      string  `json:"billType"`
	BranchNo      string  `json:"branchNo"`
	DistrictCode  string  `json:"districtCode"`
	Stocks        []Stock `json:"stocks"`
	TaxType       string  `json:"taxType"`
	RegisterNo    string  `json:"registerNo"`
	BillId        string  `json:"billId"`
	MacAddress    string  `json:"macAddress"`
	Date          string  `json:"date"`
	Lottery       string  `json:"lottery"`
	InternalCode  string  `json:"internalCode"`
	QrData        string  `json:"qrData"`
	MerchantId    string  `json:"merchantId"`
	Success       bool    `json:"success"`
	Message       string  `json:"message"`
	ErrorCode     int64   `json:"errorCode"`
}

type Ebarimt

type Ebarimt interface {
	GetNewEBarimt(*CreateEbarimtInput) (*CreateEbarimtResponse, error)
	CheckApi() (*CheckResponse, error)
	ReturnBill(billId, date string) (bool, error)
	SendData() error
}

func New

func New(endpoint string) Ebarimt

type ReturnBillResponse

type ReturnBillResponse struct {
	Success bool `json:"success"`
}

type Stock

type Stock struct {
	Code        string `json:"code"`
	Name        string `json:"name"`
	MeasureUnit string `json:"measureUnit"`
	Qty         string `json:"qty"`
	UnitPrice   string `json:"unitPrice"`
	TotalAmount string `json:"totalAmount"`
	CityTax     string `json:"cityTax"`
	Vat         string `json:"vat"`
	BarCode     string `json:"barCode"`
}

type StockInput added in v1.1.1

type StockInput struct {
	Code        string
	Name        string
	MeasureUnit string
	Qty         float64
	UnitPrice   float64
	CityTax     float64
	Vat         float64
	BarCode     string
}

Jump to

Keyboard shortcuts

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