complete structure revamp
This commit is contained in:
61
api/requests.go
Normal file
61
api/requests.go
Normal file
@@ -0,0 +1,61 @@
|
||||
package api
|
||||
|
||||
type FiscalRequest struct {
|
||||
Source string `json:"source"`
|
||||
Userinfo Userinfo `json:"userinfo,omitempty"`
|
||||
Fiscal Fiscal `json:"fiscal"`
|
||||
}
|
||||
|
||||
type Userinfo struct {
|
||||
Email string `json:"email,omitempty"`
|
||||
Phone string `json:"phone,omitempty"`
|
||||
}
|
||||
|
||||
type Fiscal struct {
|
||||
Task int `json:"task"`
|
||||
Cashier string `json:"cashier"`
|
||||
Receipt *Receipt `json:"receipt,omitempty"`
|
||||
}
|
||||
|
||||
type Receipt struct {
|
||||
Sum float64 `json:"sum"`
|
||||
Round float64 `json:"round"`
|
||||
CommentUp string `json:"comment_up,omitempty"`
|
||||
CommentDown string `json:"comment_down,omitempty"`
|
||||
Disc float64 `json:"disc"`
|
||||
DiscType int `json:"disc_type"`
|
||||
Rows []ReceiptRow `json:"rows"`
|
||||
Pays []ReceiptPay `json:"pays"`
|
||||
}
|
||||
|
||||
type ReceiptRow struct {
|
||||
Code string `json:"code,omitempty"`
|
||||
Pop string `json:"pop,omitempty"`
|
||||
Code1 string `json:"code1,omitempty"`
|
||||
Code2 string `json:"code2,omitempty"`
|
||||
CodeAa []string `json:"code_aa,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Cnt int `json:"cnt"`
|
||||
Price float64 `json:"price"`
|
||||
Disc float64 `json:"disc"`
|
||||
Taxgrp string `json:"taxgrp"`
|
||||
Comment string `json:"comment,omitempty"`
|
||||
CodeA string `json:"code_a,omitempty"`
|
||||
}
|
||||
|
||||
type ReceiptPay struct {
|
||||
Type int `json:"type"`
|
||||
Sum float64 `json:"sum"`
|
||||
Change float64 `json:"change,omitempty"`
|
||||
Comment string `json:"comment,omitempty"`
|
||||
Commission float64 `json:"commission,omitempty"`
|
||||
Paysys string `json:"paysys,omitempty"`
|
||||
Rrn string `json:"rrn,omitempty"`
|
||||
OperType string `json:"oper_type,omitempty"`
|
||||
Cardmask string `json:"cardmask,omitempty"`
|
||||
TermID string `json:"term_id,omitempty"`
|
||||
BankName string `json:"bank_name,omitempty"`
|
||||
BankID string `json:"bank_id,omitempty"`
|
||||
AuthCode string `json:"auth_code,omitempty"`
|
||||
ShowAdditionalInfo bool `json:"show_additional_info,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user