Documentation ¶
Index ¶
- Constants
- type CancelSaleRequest
- type CancelType
- type Client
- type CreateSaleRequest
- type CreateSaleResponse
- type Customer
- type CustomerType
- type Device
- type LoginRequest
- type LoginResponse
- type PaymentType
- type RefreshTokenRequest
- type RefreshTokenResponese
- type Service
- type VerifyCodeRequest
- type VerifyCodeResponse
Constants ¶
View Source
const ( Individual CustomerType = "FROM_INDIVIDUAL" LegalEntity CustomerType = "FROM_LEGAL_ENTITY" ForeignAgency CustomerType = "FROM_FOREIGN_AGENCY" Cash PaymentType = "CASH" Account PaymentType = "ACCOUNT" Cancel CancelType = "Чек сформирован ошибочно" Refund CancelType = "Возврат средств" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelSaleRequest ¶
type CancelType ¶
type CancelType string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CancelSale ¶
func (o *Client) CancelSale(sale CancelSaleRequest) (err error)
func (*Client) CheckTokenExpireIn ¶
func (o *Client) CheckTokenExpireIn()
func (*Client) CreateSale ¶
func (o *Client) CreateSale(sale CreateSaleRequest) (orderId string, err error)
func (*Client) RefreshToken ¶
type CreateSaleRequest ¶
type CreateSaleRequest struct { PaymentType PaymentType `json:"paymentType"` Client *Customer `json:"client"` RequestTime time.Time `json:"requestTime"` OperationTime time.Time `json:"operationTime"` Services []*Service `json:"services"` TotalAmount string `json:"totalAmount"` IgnoreMaxTotalIncomeRestriction bool `json:"ignoreMaxTotalIncomeRestriction"` }
type CreateSaleResponse ¶
type CreateSaleResponse struct {
ApprovedReceiptUUID string `json:"approvedReceiptUuid"`
}
type Customer ¶
type Customer struct { ContactPhone string `json:"contactPhone"` DisplayName string `json:"displayName"` IncomeType CustomerType `json:"incomeType"` Inn string `json:"inn"` }
type CustomerType ¶
type CustomerType string
type Device ¶
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct { ChallengeToken string `json:"challengeToken"` ExpireDate time.Time `json:"expireDate"` ExpireIn int `json:"expireIn"` }
func LoginByPhone ¶
func LoginByPhone(payload LoginRequest) (*LoginResponse, error)
type PaymentType ¶
type PaymentType string
type RefreshTokenRequest ¶
type RefreshTokenRequest struct { RefreshToken string `json:"refreshToken"` DeviceInfo interface{} `json:"deviceInfo"` }
type RefreshTokenResponese ¶
type VerifyCodeRequest ¶
type VerifyCodeResponse ¶
type VerifyCodeResponse struct {
RefreshToken string `json:"refreshToken"`
}
func VerifyCode ¶
func VerifyCode(payload VerifyCodeRequest) (*VerifyCodeResponse, error)
Click to show internal directories.
Click to hide internal directories.