generated from PenaSide/GolangTemplate
222 lines
7.7 KiB
Go
222 lines
7.7 KiB
Go
// Package swagger provides primitives to interact with the openapi HTTP API.
|
||
//
|
||
// Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
|
||
package swagger
|
||
|
||
import (
|
||
"time"
|
||
)
|
||
|
||
const (
|
||
BearerScopes = "Bearer.Scopes"
|
||
)
|
||
|
||
// Defines values for AccountStatus.
|
||
const (
|
||
AccountStatusNko AccountStatus = "nko"
|
||
AccountStatusNo AccountStatus = "no"
|
||
AccountStatusOrg AccountStatus = "org"
|
||
)
|
||
|
||
// Defines values for HistoryType.
|
||
const (
|
||
BuyCart HistoryType = "buyCart"
|
||
DeclinedPayment HistoryType = "declinedPayment"
|
||
SubsriptionEnd HistoryType = "subsriptionEnd"
|
||
SuccessfulPayment HistoryType = "successfulPayment"
|
||
TimeoutPayment HistoryType = "timeoutPayment"
|
||
)
|
||
|
||
// Defines values for PaymentType.
|
||
const (
|
||
PaymentTypeAlfabank PaymentType = "alfabank"
|
||
PaymentTypeB2bSberbank PaymentType = "b2bSberbank"
|
||
PaymentTypeBankCard PaymentType = "bankCard"
|
||
PaymentTypeCash PaymentType = "cash"
|
||
PaymentTypeInstallments PaymentType = "installments"
|
||
PaymentTypeMobile PaymentType = "mobile"
|
||
PaymentTypeQiwi PaymentType = "qiwi"
|
||
PaymentTypeSberbank PaymentType = "sberbank"
|
||
PaymentTypeSbp PaymentType = "sbp"
|
||
PaymentTypeTinkoffBank PaymentType = "tinkoffBank"
|
||
PaymentTypeYoomoney PaymentType = "yoomoney"
|
||
)
|
||
|
||
// Defines values for SetStatusJSONBodyStatus.
|
||
const (
|
||
SetStatusJSONBodyStatusNko SetStatusJSONBodyStatus = "nko"
|
||
SetStatusJSONBodyStatusNo SetStatusJSONBodyStatus = "no"
|
||
SetStatusJSONBodyStatusOrg SetStatusJSONBodyStatus = "org"
|
||
)
|
||
|
||
// Account defines model for Account.
|
||
type Account struct {
|
||
Id string `json:"_id"`
|
||
Cart []string `json:"cart"`
|
||
CreatedAt time.Time `json:"createdAt"`
|
||
Deleted bool `json:"deleted"`
|
||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||
Name Name `json:"name"`
|
||
Status AccountStatus `json:"status"`
|
||
UpdatedAt time.Time `json:"updatedAt"`
|
||
UserId string `json:"userId"`
|
||
Wallet Wallet `json:"wallet"`
|
||
}
|
||
|
||
// AccountStatus defines model for Account.Status.
|
||
type AccountStatus string
|
||
|
||
// BankCard defines model for BankCard.
|
||
type BankCard struct {
|
||
// Cardholder Имя владельца карты
|
||
Cardholder *string `json:"cardholder,omitempty"`
|
||
|
||
// Csc Код CVC2 или CVV2, 3 или 4 символа, печатается на обратной стороне карты
|
||
Csc *string `json:"csc,omitempty"`
|
||
|
||
// ExpiryMonth Месяц истечения срока карты (MM)
|
||
ExpiryMonth string `json:"expiryMonth"`
|
||
|
||
// ExpiryYear Год истечения срока карты (YYYY)
|
||
ExpiryYear string `json:"expiryYear"`
|
||
|
||
// Number Номер карты
|
||
Number string `json:"number"`
|
||
}
|
||
|
||
// Error defines model for Error.
|
||
type Error struct {
|
||
Message string `json:"message"`
|
||
StatusCode *int64 `json:"statusCode,omitempty"`
|
||
}
|
||
|
||
// History defines model for History.
|
||
type History struct {
|
||
Comment string `json:"comment"`
|
||
CreatedAt time.Time `json:"createdAt"`
|
||
Deleted bool `json:"deleted"`
|
||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||
Id string `json:"id"`
|
||
|
||
// RawDetails Я пока не могу предположить, какие будут фильтры по истории, поэтому предлагаю в это поле просто класть строку с json. Ибо для каждого типа записи она своя.
|
||
RawDetails *string `json:"rawDetails,omitempty"`
|
||
Type HistoryType `json:"type"`
|
||
UpdatedAt time.Time `json:"updatedAt"`
|
||
UserId string `json:"userId"`
|
||
}
|
||
|
||
// HistoryType defines model for HistoryType.
|
||
type HistoryType string
|
||
|
||
// Name defines model for Name.
|
||
type Name struct {
|
||
Firstname *string `json:"firstname,omitempty"`
|
||
Lastname *string `json:"lastname,omitempty"`
|
||
Orgname *string `json:"orgname,omitempty"`
|
||
Secondname *string `json:"secondname,omitempty"`
|
||
}
|
||
|
||
// PaymentType defines model for PaymentType.
|
||
type PaymentType string
|
||
|
||
// Wallet defines model for Wallet.
|
||
type Wallet struct {
|
||
// Cash Сумма money переведённая на текущий курс
|
||
Cash int64 `json:"cash"`
|
||
|
||
// Currency Текущий курс валюты
|
||
Currency string `json:"currency"`
|
||
|
||
// Money Деньги на счету в копейках. Чтобы при перессчётах не возникало денег изниоткуда. фиксируемся к одной валюте, она будет внутренней, никому её не покажем
|
||
Money int64 `json:"money"`
|
||
|
||
// PurchasesAmount Общая сумма денег, которые внёс пользователь
|
||
PurchasesAmount int64 `json:"purchasesAmount"`
|
||
|
||
// Spent Общая сумма потраченных денег за всё время существования аккаунта
|
||
Spent int64 `json:"spent"`
|
||
}
|
||
|
||
// SetStatusJSONBody defines parameters for SetStatus.
|
||
type SetStatusJSONBody struct {
|
||
Status *SetStatusJSONBodyStatus `json:"status,omitempty"`
|
||
}
|
||
|
||
// SetStatusJSONBodyStatus defines parameters for SetStatus.
|
||
type SetStatusJSONBodyStatus string
|
||
|
||
// PaginationAccountsParams defines parameters for PaginationAccounts.
|
||
type PaginationAccountsParams struct {
|
||
// Page Номер страницы, начиная с 1
|
||
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
||
|
||
// Limit размер страницы
|
||
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
|
||
}
|
||
|
||
// RemoveFromCartParams defines parameters for RemoveFromCart.
|
||
type RemoveFromCartParams struct {
|
||
Id string `form:"id" json:"id"`
|
||
}
|
||
|
||
// Add2cartParams defines parameters for Add2cart.
|
||
type Add2cartParams struct {
|
||
Id string `form:"id" json:"id"`
|
||
}
|
||
|
||
// UpdateCurrenciesJSONBody defines parameters for UpdateCurrencies.
|
||
type UpdateCurrenciesJSONBody = []string
|
||
|
||
// GetHistoryParams defines parameters for GetHistory.
|
||
type GetHistoryParams struct {
|
||
// Page Номер страницы, начиная с 1
|
||
Page *int `form:"page,omitempty" json:"page,omitempty"`
|
||
|
||
// Limit Размер страницы
|
||
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
|
||
}
|
||
|
||
// Add2historyJSONBody defines parameters for Add2history.
|
||
type Add2historyJSONBody struct {
|
||
Comment string `json:"comment"`
|
||
RawDetails string `json:"rawDetails"`
|
||
Type HistoryType `json:"type"`
|
||
UserId string `json:"userId"`
|
||
}
|
||
|
||
// RequestMoneyJSONBody defines parameters for RequestMoney.
|
||
type RequestMoneyJSONBody struct {
|
||
Amount int `json:"amount"`
|
||
BankCard *BankCard `json:"bankCard,omitempty"`
|
||
|
||
// Currency ISO-4217 формат
|
||
Currency string `json:"currency"`
|
||
Login *string `json:"login,omitempty"`
|
||
PhoneNumber *string `json:"phoneNumber,omitempty"`
|
||
ReturnUrl *string `json:"returnUrl,omitempty"`
|
||
Type PaymentType `json:"type"`
|
||
}
|
||
|
||
// ChangeCurrencyJSONBody defines parameters for ChangeCurrency.
|
||
type ChangeCurrencyJSONBody struct {
|
||
Currency string `json:"currency"`
|
||
}
|
||
|
||
// ChangeAccountJSONRequestBody defines body for ChangeAccount for application/json ContentType.
|
||
type ChangeAccountJSONRequestBody = Name
|
||
|
||
// SetStatusJSONRequestBody defines body for SetStatus for application/json ContentType.
|
||
type SetStatusJSONRequestBody SetStatusJSONBody
|
||
|
||
// UpdateCurrenciesJSONRequestBody defines body for UpdateCurrencies for application/json ContentType.
|
||
type UpdateCurrenciesJSONRequestBody = UpdateCurrenciesJSONBody
|
||
|
||
// Add2historyJSONRequestBody defines body for Add2history for application/json ContentType.
|
||
type Add2historyJSONRequestBody Add2historyJSONBody
|
||
|
||
// RequestMoneyJSONRequestBody defines body for RequestMoney for application/json ContentType.
|
||
type RequestMoneyJSONRequestBody RequestMoneyJSONBody
|
||
|
||
// ChangeCurrencyJSONRequestBody defines body for ChangeCurrency for application/json ContentType.
|
||
type ChangeCurrencyJSONRequestBody ChangeCurrencyJSONBody
|