Documentation
¶
Index ¶
- func IsDataNotFound(err error) bool
- func WithAuthorizer(ctx context.Context, authorizer Authorizer) context.Context
- type Authorizer
- type Brand
- type Client
- type ClientParams
- type Date
- type DateTime
- type DateTimeMilliOffset
- type DateTimeTZ
- type Error
- type ErrorCode
- type FiscalDataIn
- type FiscalDataItem
- type FiscalDataOut
- type ProviderData
- type Receipt
- type ReceiptIn
- type ReceiptOut
- type TokenStorage
- type Tokens
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDataNotFound ¶ added in v1.1.0
func WithAuthorizer ¶
func WithAuthorizer(ctx context.Context, authorizer Authorizer) context.Context
Types ¶
type Authorizer ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶ added in v1.0.0
func NewClient(params ClientParams) (*Client, error)
func (*Client) FiscalData ¶
func (c *Client) FiscalData(ctx context.Context, in *FiscalDataIn) (*FiscalDataOut, error)
type ClientParams ¶ added in v1.0.0
type ClientParams struct { Phone string `validate:"required"` Clock based.Clock `validate:"required"` DeviceID string `validate:"required"` UserAgent string `validate:"required"` TokenStorage TokenStorage `validate:"required"` Transport http.RoundTripper }
type DateTimeMilliOffset ¶
func (DateTimeMilliOffset) MarshalJSON ¶
func (dt DateTimeMilliOffset) MarshalJSON() ([]byte, error)
func (DateTimeMilliOffset) Time ¶
func (dt DateTimeMilliOffset) Time() time.Time
func (*DateTimeMilliOffset) UnmarshalJSON ¶
func (dt *DateTimeMilliOffset) UnmarshalJSON(data []byte) error
type DateTimeTZ ¶
func (DateTimeTZ) MarshalJSON ¶
func (dt DateTimeTZ) MarshalJSON() ([]byte, error)
func (DateTimeTZ) Time ¶
func (dt DateTimeTZ) Time() time.Time
func (*DateTimeTZ) UnmarshalJSON ¶
func (dt *DateTimeTZ) UnmarshalJSON(data []byte) error
type FiscalDataIn ¶
type FiscalDataIn struct {
Key string `json:"key"`
}
type FiscalDataItem ¶
type FiscalDataItem struct { Name string `json:"name"` Nds int `json:"nds"` PaymentType int `json:"paymentType"` Price float64 `json:"price"` ProductType int `json:"productType"` ProviderData *ProviderData `json:"providerData"` ProviderInn *string `json:"providerInn"` Quantity float64 `json:"quantity"` Sum float64 `json:"sum"` }
type FiscalDataOut ¶
type FiscalDataOut struct { BuyerAddress string `json:"buyerAddress"` CashTotalSum float64 `json:"cashTotalSum"` CreditSum float64 `json:"creditSum"` DateTime DateTime `json:"dateTime"` EcashTotalSum float64 `json:"ecashTotalSum"` FiscalDocumentFormatVer string `json:"fiscalDocumentFormatVer"` FiscalDocumentNumber int64 `json:"fiscalDocumentNumber"` FiscalDriveNumber string `json:"fiscalDriveNumber"` FiscalSign string `json:"fiscalSign"` InternetSign *int `json:"internetSign"` Items []FiscalDataItem `json:"items"` KktRegId string `json:"kktRegId"` MachineNumber *string `json:"machineNumber"` Nds10 *float64 `json:"nds10"` Nds18 *float64 `json:"nds18"` OperationType int `json:"operationType"` Operator *string `json:"operator"` PrepaidSum float64 `json:"prepaidSum"` ProvisionSum float64 `json:"provisionSum"` RequestNumber int64 `json:"requestNumber"` RetailPlace *string `json:"retailPlace"` RetailPlaceAddress *string `json:"retailPlaceAddress"` ShiftNumber int64 `json:"shiftNumber"` TaxationType int `json:"taxationType"` TotalSum float64 `json:"totalSum"` User *string `json:"user"` UserInn string `json:"userInn"` }
type ProviderData ¶
type Receipt ¶
type Receipt struct { BrandId *int64 `json:"brandId"` Buyer string `json:"buyer"` BuyerType string `json:"buyerType"` CreatedDate DateTime `json:"createdDate"` FiscalDocumentNumber string `json:"fiscalDocumentNumber"` FiscalDriveNumber string `json:"fiscalDriveNumber"` Key string `json:"key"` KktOwner string `json:"kktOwner"` KktOwnerInn string `json:"kktOwnerInn"` ReceiveDate DateTime `json:"receiveDate"` TotalSum string `json:"totalSum"` }
type ReceiptOut ¶
type TokenStorage ¶
type Tokens ¶
type Tokens struct { RefreshToken string `json:"refreshToken"` RefreshTokenExpiresIn *DateTimeTZ `json:"refreshTokenExpiresIn,omitempty"` Token string `json:"token"` TokenExpireIn DateTimeTZ `json:"tokenExpireIn"` }
Click to show internal directories.
Click to hide internal directories.