model

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ONIP  IdentifierType = "onip"
	NIP                  = "nip"
	PESEL                = "pesel"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorisationChallengeRequest

type AuthorisationChallengeRequest struct {
	ContextIdentifier ContextIdentifier `json:"contextIdentifier"`
}

type AuthorisationChallengeResponse

type AuthorisationChallengeResponse struct {
	Timestamp time.Time `json:"timestamp"` // time format is time.RFC3339
	Challenge string    `json:"challenge"`
}

type AuthorisationToken

type AuthorisationToken struct {
	Timestamp              string `json:"timestamp"`
	ReferenceNumber        string `json:"referenceNumber"`
	ProcessingCode         string `json:"processingCode"`
	ProcessingDescription  string `json:"processingDescription"`
	ElementReferenceNumber string `json:"elementReferenceNumber"`
	AuthorisationToken     string `json:"authorisationToken"`
}

type Context

type Context struct {
	ContextIdentifier   ContextIdentifier `json:"contextIdentifier"`
	ContextName         ContextName       `json:"contextName"`
	CredentialsRoleList []CredentialsRole `json:"credentialsRoleList"`
}

type ContextIdentifier

type ContextIdentifier struct {
	Type       IdentifierType `json:"type"`
	Identifier string         `json:"identifier"`
}

type ContextName

type ContextName struct {
	Type      string `json:"type"`
	TradeName string `json:"tradeName"`
	FullName  string `json:"fullName"`
}

type CredentialsRole

type CredentialsRole struct {
	Type                  string                `json:"type"`
	RoleType              string                `json:"roleType"`
	RoleDescription       string                `json:"roleDescription"`
	RoleGrantorIdentifier RoleGrantorIdentifier `json:"roleGrantorIdentifier"`
}

type EncryptedInvoiceHash

type EncryptedInvoiceHash struct {
	HashSHA  HashSHA `json:"hashSHA"`
	FileSize int     `json:"fileSize"`
}

type EncryptedInvoicePayload

type EncryptedInvoicePayload struct {
	Type                 string               `json:"type"`
	EncryptedInvoiceHash EncryptedInvoiceHash `json:"encryptedInvoiceHash"`
	EncryptedInvoiceBody string               `json:"encryptedInvoiceBody"`
}

type EncryptionDTO

type EncryptionDTO struct {
	Enabled bool
	Key     []byte
	IV      []byte
}

type ExceptionResponse

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"`
}

type HashSHA

type HashSHA struct {
	Algorithm string `json:"algorithm"`
	Encoding  string `json:"encoding"`
	Value     string `json:"value"`
}

type IdentifierType

type IdentifierType string

type InitSignedResponse

type InitSignedResponse struct {
	Timestamp       string       `json:"timestamp"`
	ReferenceNumber string       `json:"referenceNumber"`
	SessionToken    SessionToken `json:"sessionToken"`
}

type InvoiceHash

type InvoiceHash struct {
	HashSHA  HashSHA `json:"hashSHA"`
	FileSize int     `json:"fileSize"`
}

type InvoicePayload

type InvoicePayload struct {
	Type        string `json:"type"`
	InvoiceBody string `json:"invoiceBody"`
}

type InvoiceRequestKSeF

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"`
}

InvoiceRequestKSeF request for invoice without authentication

type RoleGrantorIdentifier

type RoleGrantorIdentifier struct {
	Type       string `json:"type"`
	Identifier string `json:"identifier"`
}

type SendEncryptedInvoiceRequest

type SendEncryptedInvoiceRequest struct {
	InvoiceHash    InvoiceHash             `json:"invoiceHash"`
	InvoicePayload EncryptedInvoicePayload `json:"invoicePayload"`
}

type SendInvoiceRequest

type SendInvoiceRequest struct {
	InvoiceHash    InvoiceHash    `json:"invoiceHash"`
	InvoicePayload InvoicePayload `json:"invoicePayload"`
}

type SendInvoiceResponse

type SendInvoiceResponse struct {
	Timestamp              time.Time `json:"timestamp"`
	ReferenceNumber        string    `json:"referenceNumber"`
	ProcessingCode         int       `json:"processingCode"`
	ProcessingDescription  string    `json:"processingDescription"`
	ElementReferenceNumber string    `json:"elementReferenceNumber"`
}

type SessionStatusResponse

type SessionStatusResponse struct {
	Timestamp             time.Time `json:"timestamp"`
	ReferenceNumber       string    `json:"referenceNumber"`
	NumberOfElements      int       `json:"numberOfElements"`
	PageSize              int       `json:"pageSize"`
	PageOffset            int       `json:"pageOffset"`
	ProcessingCode        int       `json:"processingCode"`
	ProcessingDescription string    `json:"processingDescription"`
	InvoiceStatusList     []struct {
		ProcessingCode         int       `json:"processingCode"`
		ProcessingDescription  string    `json:"processingDescription"`
		ElementReferenceNumber string    `json:"elementReferenceNumber"`
		InvoiceNumber          string    `json:"invoiceNumber"`
		KsefReferenceNumber    string    `json:"ksefReferenceNumber"`
		AcquisitionTimestamp   time.Time `json:"acquisitionTimestamp"`
	} `json:"invoiceStatusList"`
}

type SessionToken

type SessionToken struct {
	Token string `json:"token"`
}

type StatusResponse

type StatusResponse struct {
	ProcessingCode        int       `json:"processingCode"`
	ProcessingDescription string    `json:"processingDescription"`
	ReferenceNumber       string    `json:"referenceNumber"`
	Timestamp             time.Time `json:"timestamp"`
	Upo                   string    `json:"upo"`
}

StatusResponse response for invoice processing status (with UPO)

type TerminateSessionResponse

type TerminateSessionResponse struct {
	Timestamp             time.Time `json:"timestamp"`
	ReferenceNumber       string    `json:"referenceNumber"`
	ProcessingCode        int       `json:"processingCode"`
	ProcessingDescription string    `json:"processingDescription"`
}

type TokenRequestDTO

type TokenRequestDTO struct {
	Identifier string
	Token      []byte
	Challenge  string
	Encryption EncryptionDTO
}

type TokenResponse

type TokenResponse struct {
	Timestamp       time.Time `json:"timestamp"`
	ReferenceNumber string    `json:"referenceNumber"`
	SessionToken    struct {
		Token   string `json:"token"`
		Context struct {
			ContextIdentifier struct {
				Type       string `json:"type"`
				Identifier string `json:"identifier"`
			} `json:"contextIdentifier"`
			ContextName struct {
				Type      string      `json:"type"`
				TradeName interface{} `json:"tradeName"`
				FullName  string      `json:"fullName"`
			} `json:"contextName"`
			CredentialsRoleList []struct {
				Type            string `json:"type"`
				RoleType        string `json:"roleType"`
				RoleDescription string `json:"roleDescription"`
			} `json:"credentialsRoleList"`
		} `json:"context"`
	} `json:"sessionToken"`
}

type UpoDTO

type UpoDTO struct {
	ReferenceNumber       string
	ProcessingCode        int
	ProcessingDescription string
	Upo                   []byte
}

Jump to

Keyboard shortcuts

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