-
Notifications
You must be signed in to change notification settings - Fork 3
/
common.go
44 lines (40 loc) · 1.49 KB
/
common.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package model
import "time"
type ExceptionResponse struct {
Exception struct {
ServiceCtx string `json:"serviceCtx"`
ServiceCode string `json:"serviceCode"`
ServiceName string `json:"serviceName"`
Timestamp time.Time `json:"timestamp"`
ReferenceNumber string `json:"referenceNumber"`
ExceptionDetailList []struct {
ExceptionCode int `json:"exceptionCode"`
ExceptionDescription string `json:"exceptionDescription"`
} `json:"exceptionDetailList"`
} `json:"exception"`
}
// StatusResponse response for invoice processing status (with UPO)
type StatusResponse struct {
ProcessingCode int `json:"processingCode"`
ProcessingDescription string `json:"processingDescription"`
ReferenceNumber string `json:"referenceNumber"`
Timestamp time.Time `json:"timestamp"`
Upo string `json:"upo"`
}
// InvoiceRequestKSeF request for invoice without authentication
type InvoiceRequestKSeF struct {
InvoiceDetails struct {
DueValue string `json:"dueValue"`
InvoiceOriginalNumber string `json:"invoiceOryginalNumber"`
SubjectTo struct {
IssuedToIdentifier struct {
Type string `json:"type"`
} `json:"issuedToIdentifier"`
IssuedToName struct {
TradeName string `json:"tradeName"`
Type string `json:"type"`
} `json:"issuedToName"`
} `json:"subjectTo"`
} `json:"invoiceDetails"`
KsefReferenceNumber string `json:"ksefReferenceNumber"`
}