package models

type GetPaymentLinkBody struct {
	Type        PaymentType `json:"type"`
	Currency    string      `json:"currency"`
	Amount      int64       `json:"amount"`
	ReturnURL   string      `json:"returnUrl,omitempty"`
	PhoneNumber string      `json:"phoneNumber,omitempty"`
	Login       string      `json:"login,omitempty"`
	BankCard    *BankCard   `json:"bankCard,omitempty"`
}

type GetPaymentLinkRequest struct {
	Body     *GetPaymentLinkBody
	ClientIP string
	UserID   string
}

type GetPaymentLinkResponse struct {
	Link string `json:"link"`
}

type BankCard struct {
	Number         string  `json:"number"`
	ExpiryYear     string  `json:"expiryYear"`
	ExpiryMonth    string  `json:"expiryMonth"`
	CSC            *string `json:"csc,omitempty"`
	CardHolderName *string `json:"cardholder,omitempty"`
}

type PaymentType string

const (
	PaymentTypeBankCard     PaymentType = "bankCard"
	PaymentTypeTinkoff      PaymentType = "tinkoffBank"
	PaymentTypeQiwi         PaymentType = "qiwi"
	PaymentTypeSberPay      PaymentType = "sberbank"
	PaymentTypeYoomoney     PaymentType = "yoomoney"
	PaymentTypeMobile       PaymentType = "mobile"
	PaymentTypeInstallments PaymentType = "installments"
	PaymentTypeCash         PaymentType = "cash"
	PaymentTypeSBP          PaymentType = "sbp"
	PaymentTypeSberB2B      PaymentType = "b2bSberbank"
	PaymentTypeAlfabank     PaymentType = "alfabank"
)

type PaymentEvent struct {
	Key       string
	Message   string
	PaymentID string
	UserID    string
	Currency  string
	Amount    int64
}
