// Code generated by ogen, DO NOT EDIT. package gen import ( "time" "github.com/go-faster/errors" "github.com/go-faster/jx" ) type AccountId string // Информация о перелете. // Ref: #/components/schemas/AirlineLeg type AirlineLeg struct { // Code of the departure airport according to IATA: https://www.iata. // org/publications/Pages/code-search.aspx, for example, LED. DepartureAirport string `json:"departure_airport"` // Code of the arrival airport according to IATA: https://www.iata.org/publications/Pages/code-search. // aspx, for example, AMS. DestinationAirport string `json:"destination_airport"` // Departure date in the YYYY-MM-DD ISO 8601:2004: http://www.iso. // org/iso/catalogue_detail?csnumber=40874 format. DepartureDate time.Time `json:"departure_date"` // Airline code according to IATA: https://www.iata.org/publications/Pages/code-search.aspx. CarrierCode OptString `json:"carrier_code"` } // GetDepartureAirport returns the value of DepartureAirport. func (s *AirlineLeg) GetDepartureAirport() string { return s.DepartureAirport } // GetDestinationAirport returns the value of DestinationAirport. func (s *AirlineLeg) GetDestinationAirport() string { return s.DestinationAirport } // GetDepartureDate returns the value of DepartureDate. func (s *AirlineLeg) GetDepartureDate() time.Time { return s.DepartureDate } // GetCarrierCode returns the value of CarrierCode. func (s *AirlineLeg) GetCarrierCode() OptString { return s.CarrierCode } // SetDepartureAirport sets the value of DepartureAirport. func (s *AirlineLeg) SetDepartureAirport(val string) { s.DepartureAirport = val } // SetDestinationAirport sets the value of DestinationAirport. func (s *AirlineLeg) SetDestinationAirport(val string) { s.DestinationAirport = val } // SetDepartureDate sets the value of DepartureDate. func (s *AirlineLeg) SetDepartureDate(val time.Time) { s.DepartureDate = val } // SetCarrierCode sets the value of CarrierCode. func (s *AirlineLeg) SetCarrierCode(val OptString) { s.CarrierCode = val } // Информация о пассажире. // Ref: #/components/schemas/AirlinePassenger type AirlinePassenger struct { // Passenger's first name. Only use Latin characters, for example, SERGEI. FirstName string `json:"first_name"` // Passenger's last name. Only use Latin characters, for example, IVANOV. LastName string `json:"last_name"` } // GetFirstName returns the value of FirstName. func (s *AirlinePassenger) GetFirstName() string { return s.FirstName } // GetLastName returns the value of LastName. func (s *AirlinePassenger) GetLastName() string { return s.LastName } // SetFirstName sets the value of FirstName. func (s *AirlinePassenger) SetFirstName(val string) { s.FirstName = val } // SetLastName sets the value of LastName. func (s *AirlinePassenger) SetLastName(val string) { s.LastName = val } // Payment authorization details when paying by a bank card. Available only for following payment // methods: bank card, Mir Pay, SberPay, T-Pay. // Ref: #/components/schemas/AuthorizationDetails type AuthorizationDetails struct { Rrn OptRrn `json:"rrn"` // Authorization code. Provided by the issuer to confirm authorization. AuthCode OptString `json:"auth_code"` ThreeDSecure ThreeDSecureDetails `json:"three_d_secure"` } // GetRrn returns the value of Rrn. func (s *AuthorizationDetails) GetRrn() OptRrn { return s.Rrn } // GetAuthCode returns the value of AuthCode. func (s *AuthorizationDetails) GetAuthCode() OptString { return s.AuthCode } // GetThreeDSecure returns the value of ThreeDSecure. func (s *AuthorizationDetails) GetThreeDSecure() ThreeDSecureDetails { return s.ThreeDSecure } // SetRrn sets the value of Rrn. func (s *AuthorizationDetails) SetRrn(val OptRrn) { s.Rrn = val } // SetAuthCode sets the value of AuthCode. func (s *AuthorizationDetails) SetAuthCode(val OptString) { s.AuthCode = val } // SetThreeDSecure sets the value of ThreeDSecure. func (s *AuthorizationDetails) SetThreeDSecure(val ThreeDSecureDetails) { s.ThreeDSecure = val } // Merged schema. // Ref: #/components/schemas/B2bSberbankCalculatedVatData type B2bSberbankCalculatedVatData struct { Type B2bSberbankVatDataType `json:"type"` // Tax rate (in percentage). Possible values: 5, 7, 10, 20 and 22. Starting January 1, 2026, the 22% // VAT rate applies instead of the 20% rate. Rate B2bSberbankCalculatedVatDataRate `json:"rate"` Amount B2bSberbankCalculatedVatDataAmount `json:"amount"` } // GetType returns the value of Type. func (s *B2bSberbankCalculatedVatData) GetType() B2bSberbankVatDataType { return s.Type } // GetRate returns the value of Rate. func (s *B2bSberbankCalculatedVatData) GetRate() B2bSberbankCalculatedVatDataRate { return s.Rate } // GetAmount returns the value of Amount. func (s *B2bSberbankCalculatedVatData) GetAmount() B2bSberbankCalculatedVatDataAmount { return s.Amount } // SetType sets the value of Type. func (s *B2bSberbankCalculatedVatData) SetType(val B2bSberbankVatDataType) { s.Type = val } // SetRate sets the value of Rate. func (s *B2bSberbankCalculatedVatData) SetRate(val B2bSberbankCalculatedVatDataRate) { s.Rate = val } // SetAmount sets the value of Amount. func (s *B2bSberbankCalculatedVatData) SetAmount(val B2bSberbankCalculatedVatDataAmount) { s.Amount = val } // Сумма в выбранной валюте. type B2bSberbankCalculatedVatDataAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *B2bSberbankCalculatedVatDataAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *B2bSberbankCalculatedVatDataAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *B2bSberbankCalculatedVatDataAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *B2bSberbankCalculatedVatDataAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Tax rate (in percentage). Possible values: 5, 7, 10, 20 and 22. Starting January 1, 2026, the 22% // VAT rate applies instead of the 20% rate. type B2bSberbankCalculatedVatDataRate string const ( B2bSberbankCalculatedVatDataRate5 B2bSberbankCalculatedVatDataRate = "5" B2bSberbankCalculatedVatDataRate7 B2bSberbankCalculatedVatDataRate = "7" B2bSberbankCalculatedVatDataRate10 B2bSberbankCalculatedVatDataRate = "10" B2bSberbankCalculatedVatDataRate20 B2bSberbankCalculatedVatDataRate = "20" B2bSberbankCalculatedVatDataRate22 B2bSberbankCalculatedVatDataRate = "22" ) // AllValues returns all B2bSberbankCalculatedVatDataRate values. func (B2bSberbankCalculatedVatDataRate) AllValues() []B2bSberbankCalculatedVatDataRate { return []B2bSberbankCalculatedVatDataRate{ B2bSberbankCalculatedVatDataRate5, B2bSberbankCalculatedVatDataRate7, B2bSberbankCalculatedVatDataRate10, B2bSberbankCalculatedVatDataRate20, B2bSberbankCalculatedVatDataRate22, } } // MarshalText implements encoding.TextMarshaler. func (s B2bSberbankCalculatedVatDataRate) MarshalText() ([]byte, error) { switch s { case B2bSberbankCalculatedVatDataRate5: return []byte(s), nil case B2bSberbankCalculatedVatDataRate7: return []byte(s), nil case B2bSberbankCalculatedVatDataRate10: return []byte(s), nil case B2bSberbankCalculatedVatDataRate20: return []byte(s), nil case B2bSberbankCalculatedVatDataRate22: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *B2bSberbankCalculatedVatDataRate) UnmarshalText(data []byte) error { switch B2bSberbankCalculatedVatDataRate(data) { case B2bSberbankCalculatedVatDataRate5: *s = B2bSberbankCalculatedVatDataRate5 return nil case B2bSberbankCalculatedVatDataRate7: *s = B2bSberbankCalculatedVatDataRate7 return nil case B2bSberbankCalculatedVatDataRate10: *s = B2bSberbankCalculatedVatDataRate10 return nil case B2bSberbankCalculatedVatDataRate20: *s = B2bSberbankCalculatedVatDataRate20 return nil case B2bSberbankCalculatedVatDataRate22: *s = B2bSberbankCalculatedVatDataRate22 return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/B2bSberbankMixedVatData type B2bSberbankMixedVatData struct { Type B2bSberbankVatDataType `json:"type"` Amount B2bSberbankMixedVatDataAmount `json:"amount"` } // GetType returns the value of Type. func (s *B2bSberbankMixedVatData) GetType() B2bSberbankVatDataType { return s.Type } // GetAmount returns the value of Amount. func (s *B2bSberbankMixedVatData) GetAmount() B2bSberbankMixedVatDataAmount { return s.Amount } // SetType sets the value of Type. func (s *B2bSberbankMixedVatData) SetType(val B2bSberbankVatDataType) { s.Type = val } // SetAmount sets the value of Amount. func (s *B2bSberbankMixedVatData) SetAmount(val B2bSberbankMixedVatDataAmount) { s.Amount = val } // Сумма в выбранной валюте. type B2bSberbankMixedVatDataAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *B2bSberbankMixedVatDataAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *B2bSberbankMixedVatDataAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *B2bSberbankMixedVatDataAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *B2bSberbankMixedVatDataAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Банковские реквизиты плательщика (юридического лица // или ИП). // Ref: #/components/schemas/B2bSberbankPayerBankDetails type B2bSberbankPayerBankDetails struct { // Полное наименование организации. FullName string `json:"full_name"` // Сокращенное наименование организации. ShortName string `json:"short_name"` // Адрес организации. Address string `json:"address"` // Индивидуальный налоговый номер (ИНН) организации. Inn string `json:"inn"` // Наименование банка организации. BankName string `json:"bank_name"` // Отделение банка организации. BankBranch string `json:"bank_branch"` // Банковский идентификационный код (БИК) банка // организации. BankBik string `json:"bank_bik"` // Номер счета организации. Account string `json:"account"` // Код причины постановки на учет (КПП) организации. Kpp OptString `json:"kpp"` } // GetFullName returns the value of FullName. func (s *B2bSberbankPayerBankDetails) GetFullName() string { return s.FullName } // GetShortName returns the value of ShortName. func (s *B2bSberbankPayerBankDetails) GetShortName() string { return s.ShortName } // GetAddress returns the value of Address. func (s *B2bSberbankPayerBankDetails) GetAddress() string { return s.Address } // GetInn returns the value of Inn. func (s *B2bSberbankPayerBankDetails) GetInn() string { return s.Inn } // GetBankName returns the value of BankName. func (s *B2bSberbankPayerBankDetails) GetBankName() string { return s.BankName } // GetBankBranch returns the value of BankBranch. func (s *B2bSberbankPayerBankDetails) GetBankBranch() string { return s.BankBranch } // GetBankBik returns the value of BankBik. func (s *B2bSberbankPayerBankDetails) GetBankBik() string { return s.BankBik } // GetAccount returns the value of Account. func (s *B2bSberbankPayerBankDetails) GetAccount() string { return s.Account } // GetKpp returns the value of Kpp. func (s *B2bSberbankPayerBankDetails) GetKpp() OptString { return s.Kpp } // SetFullName sets the value of FullName. func (s *B2bSberbankPayerBankDetails) SetFullName(val string) { s.FullName = val } // SetShortName sets the value of ShortName. func (s *B2bSberbankPayerBankDetails) SetShortName(val string) { s.ShortName = val } // SetAddress sets the value of Address. func (s *B2bSberbankPayerBankDetails) SetAddress(val string) { s.Address = val } // SetInn sets the value of Inn. func (s *B2bSberbankPayerBankDetails) SetInn(val string) { s.Inn = val } // SetBankName sets the value of BankName. func (s *B2bSberbankPayerBankDetails) SetBankName(val string) { s.BankName = val } // SetBankBranch sets the value of BankBranch. func (s *B2bSberbankPayerBankDetails) SetBankBranch(val string) { s.BankBranch = val } // SetBankBik sets the value of BankBik. func (s *B2bSberbankPayerBankDetails) SetBankBik(val string) { s.BankBik = val } // SetAccount sets the value of Account. func (s *B2bSberbankPayerBankDetails) SetAccount(val string) { s.Account = val } // SetKpp sets the value of Kpp. func (s *B2bSberbankPayerBankDetails) SetKpp(val OptString) { s.Kpp = val } // Merged schema. // Ref: #/components/schemas/B2bSberbankUntaxedVatData type B2bSberbankUntaxedVatData struct { Type B2bSberbankVatDataType `json:"type"` } // GetType returns the value of Type. func (s *B2bSberbankUntaxedVatData) GetType() B2bSberbankVatDataType { return s.Type } // SetType sets the value of Type. func (s *B2bSberbankUntaxedVatData) SetType(val B2bSberbankVatDataType) { s.Type = val } // Тип способа расчета НДС. // Ref: #/components/schemas/B2bSberbankVatDataType type B2bSberbankVatDataType string const ( B2bSberbankVatDataTypeCalculated B2bSberbankVatDataType = "calculated" B2bSberbankVatDataTypeUntaxed B2bSberbankVatDataType = "untaxed" B2bSberbankVatDataTypeMixed B2bSberbankVatDataType = "mixed" ) // AllValues returns all B2bSberbankVatDataType values. func (B2bSberbankVatDataType) AllValues() []B2bSberbankVatDataType { return []B2bSberbankVatDataType{ B2bSberbankVatDataTypeCalculated, B2bSberbankVatDataTypeUntaxed, B2bSberbankVatDataTypeMixed, } } // MarshalText implements encoding.TextMarshaler. func (s B2bSberbankVatDataType) MarshalText() ([]byte, error) { switch s { case B2bSberbankVatDataTypeCalculated: return []byte(s), nil case B2bSberbankVatDataTypeUntaxed: return []byte(s), nil case B2bSberbankVatDataTypeMixed: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *B2bSberbankVatDataType) UnmarshalText(data []byte) error { switch B2bSberbankVatDataType(data) { case B2bSberbankVatDataTypeCalculated: *s = B2bSberbankVatDataTypeCalculated return nil case B2bSberbankVatDataTypeUntaxed: *s = B2bSberbankVatDataTypeUntaxed return nil case B2bSberbankVatDataTypeMixed: *s = B2bSberbankVatDataTypeMixed return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/BadRequest type BadRequest struct { // Тип объекта. Type OptBadRequestType `json:"type"` // Идентификатор ошибки. Используйте его, если возникла // необходимость обратиться в техническую поддержку. ID OptString `json:"id"` // Подробное описание ошибки. Description OptString `json:"description"` // Название параметра, из-за которого произошла ошибка. Parameter OptString `json:"parameter"` // Рекомендуемое количество миллисекунд, спустя // которое следует повторить запрос. RetryAfter OptInt `json:"retry_after"` // Код ошибки. Code OptBadRequestCode `json:"code"` } // GetType returns the value of Type. func (s *BadRequest) GetType() OptBadRequestType { return s.Type } // GetID returns the value of ID. func (s *BadRequest) GetID() OptString { return s.ID } // GetDescription returns the value of Description. func (s *BadRequest) GetDescription() OptString { return s.Description } // GetParameter returns the value of Parameter. func (s *BadRequest) GetParameter() OptString { return s.Parameter } // GetRetryAfter returns the value of RetryAfter. func (s *BadRequest) GetRetryAfter() OptInt { return s.RetryAfter } // GetCode returns the value of Code. func (s *BadRequest) GetCode() OptBadRequestCode { return s.Code } // SetType sets the value of Type. func (s *BadRequest) SetType(val OptBadRequestType) { s.Type = val } // SetID sets the value of ID. func (s *BadRequest) SetID(val OptString) { s.ID = val } // SetDescription sets the value of Description. func (s *BadRequest) SetDescription(val OptString) { s.Description = val } // SetParameter sets the value of Parameter. func (s *BadRequest) SetParameter(val OptString) { s.Parameter = val } // SetRetryAfter sets the value of RetryAfter. func (s *BadRequest) SetRetryAfter(val OptInt) { s.RetryAfter = val } // SetCode sets the value of Code. func (s *BadRequest) SetCode(val OptBadRequestCode) { s.Code = val } func (*BadRequest) dealsDealIDGetRes() {} func (*BadRequest) dealsGetRes() {} func (*BadRequest) dealsPostRes() {} func (*BadRequest) meGetRes() {} func (*BadRequest) paymentMethodsPaymentMethodIDGetRes() {} func (*BadRequest) paymentMethodsPostRes() {} func (*BadRequest) paymentsGetRes() {} func (*BadRequest) paymentsPaymentIDCancelPostRes() {} func (*BadRequest) paymentsPaymentIDCapturePostRes() {} func (*BadRequest) paymentsPaymentIDGetRes() {} func (*BadRequest) paymentsPostRes() {} func (*BadRequest) payoutsGetRes() {} func (*BadRequest) payoutsPayoutIDGetRes() {} func (*BadRequest) payoutsPostRes() {} func (*BadRequest) payoutsSearchGetRes() {} func (*BadRequest) personalDataPersonalDataIDGetRes() {} func (*BadRequest) personalDataPostRes() {} func (*BadRequest) receiptsGetRes() {} func (*BadRequest) receiptsPostRes() {} func (*BadRequest) receiptsReceiptIDGetRes() {} func (*BadRequest) refundsGetRes() {} func (*BadRequest) refundsPostRes() {} func (*BadRequest) refundsRefundIDGetRes() {} func (*BadRequest) sbpBanksGetRes() {} func (*BadRequest) webhooksPostRes() {} func (*BadRequest) webhooksWebhookIDDeleteRes() {} // Код ошибки. type BadRequestCode string const ( BadRequestCodeInvalidRequest BadRequestCode = "invalid_request" ) // AllValues returns all BadRequestCode values. func (BadRequestCode) AllValues() []BadRequestCode { return []BadRequestCode{ BadRequestCodeInvalidRequest, } } // MarshalText implements encoding.TextMarshaler. func (s BadRequestCode) MarshalText() ([]byte, error) { switch s { case BadRequestCodeInvalidRequest: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *BadRequestCode) UnmarshalText(data []byte) error { switch BadRequestCode(data) { case BadRequestCodeInvalidRequest: *s = BadRequestCodeInvalidRequest return nil default: return errors.Errorf("invalid value: %q", data) } } // Тип объекта. type BadRequestType string const ( BadRequestTypeError BadRequestType = "error" ) // AllValues returns all BadRequestType values. func (BadRequestType) AllValues() []BadRequestType { return []BadRequestType{ BadRequestTypeError, } } // MarshalText implements encoding.TextMarshaler. func (s BadRequestType) MarshalText() ([]byte, error) { switch s { case BadRequestTypeError: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *BadRequestType) UnmarshalText(data []byte) error { switch BadRequestType(data) { case BadRequestTypeError: *s = BadRequestTypeError return nil default: return errors.Errorf("invalid value: %q", data) } } // Данные банковской карты. // Ref: #/components/schemas/BankCardData type BankCardData struct { First6 OptBankCardFirst6 `json:"first6"` Last4 BankCardLast4 `json:"last4"` ExpiryYear BankCardExpiryYear `json:"expiry_year"` ExpiryMonth BankCardExpiryMonth `json:"expiry_month"` CardType BankCardType `json:"card_type"` CardProduct OptBankCardProduct `json:"card_product"` IssuerCountry OptBankCardIssuerCountry `json:"issuer_country"` IssuerName OptBankCardIssuerName `json:"issuer_name"` Source OptBankCardDataSource `json:"source"` } // GetFirst6 returns the value of First6. func (s *BankCardData) GetFirst6() OptBankCardFirst6 { return s.First6 } // GetLast4 returns the value of Last4. func (s *BankCardData) GetLast4() BankCardLast4 { return s.Last4 } // GetExpiryYear returns the value of ExpiryYear. func (s *BankCardData) GetExpiryYear() BankCardExpiryYear { return s.ExpiryYear } // GetExpiryMonth returns the value of ExpiryMonth. func (s *BankCardData) GetExpiryMonth() BankCardExpiryMonth { return s.ExpiryMonth } // GetCardType returns the value of CardType. func (s *BankCardData) GetCardType() BankCardType { return s.CardType } // GetCardProduct returns the value of CardProduct. func (s *BankCardData) GetCardProduct() OptBankCardProduct { return s.CardProduct } // GetIssuerCountry returns the value of IssuerCountry. func (s *BankCardData) GetIssuerCountry() OptBankCardIssuerCountry { return s.IssuerCountry } // GetIssuerName returns the value of IssuerName. func (s *BankCardData) GetIssuerName() OptBankCardIssuerName { return s.IssuerName } // GetSource returns the value of Source. func (s *BankCardData) GetSource() OptBankCardDataSource { return s.Source } // SetFirst6 sets the value of First6. func (s *BankCardData) SetFirst6(val OptBankCardFirst6) { s.First6 = val } // SetLast4 sets the value of Last4. func (s *BankCardData) SetLast4(val BankCardLast4) { s.Last4 = val } // SetExpiryYear sets the value of ExpiryYear. func (s *BankCardData) SetExpiryYear(val BankCardExpiryYear) { s.ExpiryYear = val } // SetExpiryMonth sets the value of ExpiryMonth. func (s *BankCardData) SetExpiryMonth(val BankCardExpiryMonth) { s.ExpiryMonth = val } // SetCardType sets the value of CardType. func (s *BankCardData) SetCardType(val BankCardType) { s.CardType = val } // SetCardProduct sets the value of CardProduct. func (s *BankCardData) SetCardProduct(val OptBankCardProduct) { s.CardProduct = val } // SetIssuerCountry sets the value of IssuerCountry. func (s *BankCardData) SetIssuerCountry(val OptBankCardIssuerCountry) { s.IssuerCountry = val } // SetIssuerName sets the value of IssuerName. func (s *BankCardData) SetIssuerName(val OptBankCardIssuerName) { s.IssuerName = val } // SetSource sets the value of Source. func (s *BankCardData) SetSource(val OptBankCardDataSource) { s.Source = val } // Источник данных банковской карты. Возможные // значения: mir_pay, apple_pay, google_pay. Присутствует, если // пользователь при оплате выбрал карту, сохраненную в // Mir Pay, Apple Pay или Google Pay. // Ref: #/components/schemas/BankCardDataSource type BankCardDataSource string const ( BankCardDataSourceApplePay BankCardDataSource = "apple_pay" BankCardDataSourceGooglePay BankCardDataSource = "google_pay" BankCardDataSourceMirPay BankCardDataSource = "mir_pay" ) // AllValues returns all BankCardDataSource values. func (BankCardDataSource) AllValues() []BankCardDataSource { return []BankCardDataSource{ BankCardDataSourceApplePay, BankCardDataSourceGooglePay, BankCardDataSourceMirPay, } } // MarshalText implements encoding.TextMarshaler. func (s BankCardDataSource) MarshalText() ([]byte, error) { switch s { case BankCardDataSourceApplePay: return []byte(s), nil case BankCardDataSourceGooglePay: return []byte(s), nil case BankCardDataSourceMirPay: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *BankCardDataSource) UnmarshalText(data []byte) error { switch BankCardDataSource(data) { case BankCardDataSourceApplePay: *s = BankCardDataSourceApplePay return nil case BankCardDataSourceGooglePay: *s = BankCardDataSourceGooglePay return nil case BankCardDataSourceMirPay: *s = BankCardDataSourceMirPay return nil default: return errors.Errorf("invalid value: %q", data) } } type BankCardExpiryMonth string type BankCardExpiryYear string type BankCardFirst6 string type BankCardHolderName string type BankCardIssuerCountry string type BankCardIssuerName string type BankCardLast4 string // Карточный продукт платежной системы, с которым // ассоциирована банковская карта. Например, карточные // продукты платежной системы Мир: Mir Classic, Mir Classic Credit, MIR // Privilege Plus и другие. // Ref: #/components/schemas/BankCardProduct type BankCardProduct struct { // Код карточного продукта. Пример: MCP. Code string `json:"code"` // Название карточного продукта. Пример: MIR Privilege. Name OptString `json:"name"` } // GetCode returns the value of Code. func (s *BankCardProduct) GetCode() string { return s.Code } // GetName returns the value of Name. func (s *BankCardProduct) GetName() OptString { return s.Name } // SetCode sets the value of Code. func (s *BankCardProduct) SetCode(val string) { s.Code = val } // SetName sets the value of Name. func (s *BankCardProduct) SetName(val OptString) { s.Name = val } // Тип банковской карты. Возможные значения: MasterCard (для // карт Mastercard и Maestro), Visa (для карт Visa и Visa Electron), Mir, UnionPay, JCB, // AmericanExpress, DinersClub, DiscoverCard, InstaPayment, InstaPaymentTM, Laser, Dankort, Solo, // Switch и Unknown. // Ref: #/components/schemas/BankCardType type BankCardType string const ( BankCardTypeMasterCard BankCardType = "MasterCard" BankCardTypeVisa BankCardType = "Visa" BankCardTypeMir BankCardType = "Mir" BankCardTypeUnionPay BankCardType = "UnionPay" BankCardTypeJCB BankCardType = "JCB" BankCardTypeAmericanExpress BankCardType = "AmericanExpress" BankCardTypeDinersClub BankCardType = "DinersClub" BankCardTypeDiscoverCard BankCardType = "DiscoverCard" BankCardTypeInstaPayment BankCardType = "InstaPayment" BankCardTypeInstaPaymentTM BankCardType = "InstaPaymentTM" BankCardTypeLaser BankCardType = "Laser" BankCardTypeDankort BankCardType = "Dankort" BankCardTypeSolo BankCardType = "Solo" BankCardTypeSwitch BankCardType = "Switch" BankCardTypeUnknown BankCardType = "Unknown" ) // AllValues returns all BankCardType values. func (BankCardType) AllValues() []BankCardType { return []BankCardType{ BankCardTypeMasterCard, BankCardTypeVisa, BankCardTypeMir, BankCardTypeUnionPay, BankCardTypeJCB, BankCardTypeAmericanExpress, BankCardTypeDinersClub, BankCardTypeDiscoverCard, BankCardTypeInstaPayment, BankCardTypeInstaPaymentTM, BankCardTypeLaser, BankCardTypeDankort, BankCardTypeSolo, BankCardTypeSwitch, BankCardTypeUnknown, } } // MarshalText implements encoding.TextMarshaler. func (s BankCardType) MarshalText() ([]byte, error) { switch s { case BankCardTypeMasterCard: return []byte(s), nil case BankCardTypeVisa: return []byte(s), nil case BankCardTypeMir: return []byte(s), nil case BankCardTypeUnionPay: return []byte(s), nil case BankCardTypeJCB: return []byte(s), nil case BankCardTypeAmericanExpress: return []byte(s), nil case BankCardTypeDinersClub: return []byte(s), nil case BankCardTypeDiscoverCard: return []byte(s), nil case BankCardTypeInstaPayment: return []byte(s), nil case BankCardTypeInstaPaymentTM: return []byte(s), nil case BankCardTypeLaser: return []byte(s), nil case BankCardTypeDankort: return []byte(s), nil case BankCardTypeSolo: return []byte(s), nil case BankCardTypeSwitch: return []byte(s), nil case BankCardTypeUnknown: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *BankCardType) UnmarshalText(data []byte) error { switch BankCardType(data) { case BankCardTypeMasterCard: *s = BankCardTypeMasterCard return nil case BankCardTypeVisa: *s = BankCardTypeVisa return nil case BankCardTypeMir: *s = BankCardTypeMir return nil case BankCardTypeUnionPay: *s = BankCardTypeUnionPay return nil case BankCardTypeJCB: *s = BankCardTypeJCB return nil case BankCardTypeAmericanExpress: *s = BankCardTypeAmericanExpress return nil case BankCardTypeDinersClub: *s = BankCardTypeDinersClub return nil case BankCardTypeDiscoverCard: *s = BankCardTypeDiscoverCard return nil case BankCardTypeInstaPayment: *s = BankCardTypeInstaPayment return nil case BankCardTypeInstaPaymentTM: *s = BankCardTypeInstaPaymentTM return nil case BankCardTypeLaser: *s = BankCardTypeLaser return nil case BankCardTypeDankort: *s = BankCardTypeDankort return nil case BankCardTypeSolo: *s = BankCardTypeSolo return nil case BankCardTypeSwitch: *s = BankCardTypeSwitch return nil case BankCardTypeUnknown: *s = BankCardTypeUnknown return nil default: return errors.Errorf("invalid value: %q", data) } } type BasicAuth struct { Username string Password string Roles []string } // GetUsername returns the value of Username. func (s *BasicAuth) GetUsername() string { return s.Username } // GetPassword returns the value of Password. func (s *BasicAuth) GetPassword() string { return s.Password } // GetRoles returns the value of Roles. func (s *BasicAuth) GetRoles() []string { return s.Roles } // SetUsername sets the value of Username. func (s *BasicAuth) SetUsername(val string) { s.Username = val } // SetPassword sets the value of Password. func (s *BasicAuth) SetPassword(val string) { s.Password = val } // SetRoles sets the value of Roles. func (s *BasicAuth) SetRoles(val []string) { s.Roles = val } type Capture bool // Данные банковской карты для выплаты. // Ref: #/components/schemas/CardDataForPayoutDestination type CardDataForPayoutDestination struct { // Номер банковской карты. Формат: только цифры, без // пробелов. Пример: 5555555555554477. Number string `json:"number"` } // GetNumber returns the value of Number. func (s *CardDataForPayoutDestination) GetNumber() string { return s.Number } // SetNumber sets the value of Number. func (s *CardDataForPayoutDestination) SetNumber(val string) { s.Number = val } // Данные банковской карты (необходимы, если вы // собираете данные карты пользователей на своей // стороне). // Ref: #/components/schemas/CardRequestData type CardRequestData struct { // Номер банковской карты. Number string `json:"number"` // Срок действия, год, YYYY. ExpiryYear string `json:"expiry_year"` // Срок действия, месяц, MM. ExpiryMonth string `json:"expiry_month"` Cardholder OptBankCardHolderName `json:"cardholder"` } // GetNumber returns the value of Number. func (s *CardRequestData) GetNumber() string { return s.Number } // GetExpiryYear returns the value of ExpiryYear. func (s *CardRequestData) GetExpiryYear() string { return s.ExpiryYear } // GetExpiryMonth returns the value of ExpiryMonth. func (s *CardRequestData) GetExpiryMonth() string { return s.ExpiryMonth } // GetCardholder returns the value of Cardholder. func (s *CardRequestData) GetCardholder() OptBankCardHolderName { return s.Cardholder } // SetNumber sets the value of Number. func (s *CardRequestData) SetNumber(val string) { s.Number = val } // SetExpiryYear sets the value of ExpiryYear. func (s *CardRequestData) SetExpiryYear(val string) { s.ExpiryYear = val } // SetExpiryMonth sets the value of ExpiryMonth. func (s *CardRequestData) SetExpiryMonth(val string) { s.ExpiryMonth = val } // SetCardholder sets the value of Cardholder. func (s *CardRequestData) SetCardholder(val OptBankCardHolderName) { s.Cardholder = val } type ClientIp string // Selected payment confirmation scenario. For payments requiring confirmation from the user. More // about confirmation scenarios: https://yookassa. // ru/developers/payment-acceptance/getting-started/payment-process#user-confirmation. // Ref: #/components/schemas/Confirmation type Confirmation struct { Type ConfirmationType `json:"type"` } // GetType returns the value of Type. func (s *Confirmation) GetType() ConfirmationType { return s.Type } // SetType sets the value of Type. func (s *Confirmation) SetType(val ConfirmationType) { s.Type = val } // Merged schema. // Ref: #/components/schemas/ConfirmationDataEmbedded type ConfirmationDataEmbedded struct { Type ConfirmationDataType `json:"type"` Locale OptLocale `json:"locale"` } // GetType returns the value of Type. func (s *ConfirmationDataEmbedded) GetType() ConfirmationDataType { return s.Type } // GetLocale returns the value of Locale. func (s *ConfirmationDataEmbedded) GetLocale() OptLocale { return s.Locale } // SetType sets the value of Type. func (s *ConfirmationDataEmbedded) SetType(val ConfirmationDataType) { s.Type = val } // SetLocale sets the value of Locale. func (s *ConfirmationDataEmbedded) SetLocale(val OptLocale) { s.Locale = val } // Merged schema. // Ref: #/components/schemas/ConfirmationDataExternal type ConfirmationDataExternal struct { Type ConfirmationDataType `json:"type"` Locale OptLocale `json:"locale"` } // GetType returns the value of Type. func (s *ConfirmationDataExternal) GetType() ConfirmationDataType { return s.Type } // GetLocale returns the value of Locale. func (s *ConfirmationDataExternal) GetLocale() OptLocale { return s.Locale } // SetType sets the value of Type. func (s *ConfirmationDataExternal) SetType(val ConfirmationDataType) { s.Type = val } // SetLocale sets the value of Locale. func (s *ConfirmationDataExternal) SetLocale(val OptLocale) { s.Locale = val } // Merged schema. // Ref: #/components/schemas/ConfirmationDataMobileApplication type ConfirmationDataMobileApplication struct { Type ConfirmationDataType `json:"type"` Locale OptLocale `json:"locale"` ReturnURL string `json:"return_url"` } // GetType returns the value of Type. func (s *ConfirmationDataMobileApplication) GetType() ConfirmationDataType { return s.Type } // GetLocale returns the value of Locale. func (s *ConfirmationDataMobileApplication) GetLocale() OptLocale { return s.Locale } // GetReturnURL returns the value of ReturnURL. func (s *ConfirmationDataMobileApplication) GetReturnURL() string { return s.ReturnURL } // SetType sets the value of Type. func (s *ConfirmationDataMobileApplication) SetType(val ConfirmationDataType) { s.Type = val } // SetLocale sets the value of Locale. func (s *ConfirmationDataMobileApplication) SetLocale(val OptLocale) { s.Locale = val } // SetReturnURL sets the value of ReturnURL. func (s *ConfirmationDataMobileApplication) SetReturnURL(val string) { s.ReturnURL = val } // Merged schema. // Ref: #/components/schemas/ConfirmationDataQr type ConfirmationDataQr struct { Type ConfirmationDataType `json:"type"` Locale OptLocale `json:"locale"` ReturnURL OptString `json:"return_url"` } // GetType returns the value of Type. func (s *ConfirmationDataQr) GetType() ConfirmationDataType { return s.Type } // GetLocale returns the value of Locale. func (s *ConfirmationDataQr) GetLocale() OptLocale { return s.Locale } // GetReturnURL returns the value of ReturnURL. func (s *ConfirmationDataQr) GetReturnURL() OptString { return s.ReturnURL } // SetType sets the value of Type. func (s *ConfirmationDataQr) SetType(val ConfirmationDataType) { s.Type = val } // SetLocale sets the value of Locale. func (s *ConfirmationDataQr) SetLocale(val OptLocale) { s.Locale = val } // SetReturnURL sets the value of ReturnURL. func (s *ConfirmationDataQr) SetReturnURL(val OptString) { s.ReturnURL = val } // Merged schema. // Ref: #/components/schemas/ConfirmationDataRedirect type ConfirmationDataRedirect struct { Type ConfirmationDataType `json:"type"` Locale OptLocale `json:"locale"` Enforce OptEnforce `json:"enforce"` ReturnURL ReturnUrl `json:"return_url"` } // GetType returns the value of Type. func (s *ConfirmationDataRedirect) GetType() ConfirmationDataType { return s.Type } // GetLocale returns the value of Locale. func (s *ConfirmationDataRedirect) GetLocale() OptLocale { return s.Locale } // GetEnforce returns the value of Enforce. func (s *ConfirmationDataRedirect) GetEnforce() OptEnforce { return s.Enforce } // GetReturnURL returns the value of ReturnURL. func (s *ConfirmationDataRedirect) GetReturnURL() ReturnUrl { return s.ReturnURL } // SetType sets the value of Type. func (s *ConfirmationDataRedirect) SetType(val ConfirmationDataType) { s.Type = val } // SetLocale sets the value of Locale. func (s *ConfirmationDataRedirect) SetLocale(val OptLocale) { s.Locale = val } // SetEnforce sets the value of Enforce. func (s *ConfirmationDataRedirect) SetEnforce(val OptEnforce) { s.Enforce = val } // SetReturnURL sets the value of ReturnURL. func (s *ConfirmationDataRedirect) SetReturnURL(val ReturnUrl) { s.ReturnURL = val } // Type of payment confirmation scenario by the user. Possible values: redirect - redirecting the // user to a ready-made YooMoney page or a partner's page; external - waiting for the user to confirm // the payment independently; qr - generating a QR and displaying it on the payment page so that the // user can confirm the payment; embedded - displaying the YooMoney payment widget; // mobile_application - redirecting the user to the partner's payment app. // Ref: #/components/schemas/ConfirmationDataType type ConfirmationDataType string const ( ConfirmationDataTypeRedirect ConfirmationDataType = "redirect" ConfirmationDataTypeExternal ConfirmationDataType = "external" ConfirmationDataTypeQr ConfirmationDataType = "qr" ConfirmationDataTypeEmbedded ConfirmationDataType = "embedded" ConfirmationDataTypeMobileApplication ConfirmationDataType = "mobile_application" ) // AllValues returns all ConfirmationDataType values. func (ConfirmationDataType) AllValues() []ConfirmationDataType { return []ConfirmationDataType{ ConfirmationDataTypeRedirect, ConfirmationDataTypeExternal, ConfirmationDataTypeQr, ConfirmationDataTypeEmbedded, ConfirmationDataTypeMobileApplication, } } // MarshalText implements encoding.TextMarshaler. func (s ConfirmationDataType) MarshalText() ([]byte, error) { switch s { case ConfirmationDataTypeRedirect: return []byte(s), nil case ConfirmationDataTypeExternal: return []byte(s), nil case ConfirmationDataTypeQr: return []byte(s), nil case ConfirmationDataTypeEmbedded: return []byte(s), nil case ConfirmationDataTypeMobileApplication: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ConfirmationDataType) UnmarshalText(data []byte) error { switch ConfirmationDataType(data) { case ConfirmationDataTypeRedirect: *s = ConfirmationDataTypeRedirect return nil case ConfirmationDataTypeExternal: *s = ConfirmationDataTypeExternal return nil case ConfirmationDataTypeQr: *s = ConfirmationDataTypeQr return nil case ConfirmationDataTypeEmbedded: *s = ConfirmationDataTypeEmbedded return nil case ConfirmationDataTypeMobileApplication: *s = ConfirmationDataTypeMobileApplication return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/ConfirmationEmbedded type ConfirmationEmbedded struct { Type ConfirmationType `json:"type"` // Токен для инициализации платежного виджета ЮKassa: // https://yookassa.ru/developers/payment-acceptance/integration-scenarios/widget/basics. ConfirmationToken string `json:"confirmation_token"` } // GetType returns the value of Type. func (s *ConfirmationEmbedded) GetType() ConfirmationType { return s.Type } // GetConfirmationToken returns the value of ConfirmationToken. func (s *ConfirmationEmbedded) GetConfirmationToken() string { return s.ConfirmationToken } // SetType sets the value of Type. func (s *ConfirmationEmbedded) SetType(val ConfirmationType) { s.Type = val } // SetConfirmationToken sets the value of ConfirmationToken. func (s *ConfirmationEmbedded) SetConfirmationToken(val string) { s.ConfirmationToken = val } // Merged schema. // Ref: #/components/schemas/ConfirmationMobileApplication type ConfirmationMobileApplication struct { Type ConfirmationType `json:"type"` ConfirmationURL string `json:"confirmation_url"` } // GetType returns the value of Type. func (s *ConfirmationMobileApplication) GetType() ConfirmationType { return s.Type } // GetConfirmationURL returns the value of ConfirmationURL. func (s *ConfirmationMobileApplication) GetConfirmationURL() string { return s.ConfirmationURL } // SetType sets the value of Type. func (s *ConfirmationMobileApplication) SetType(val ConfirmationType) { s.Type = val } // SetConfirmationURL sets the value of ConfirmationURL. func (s *ConfirmationMobileApplication) SetConfirmationURL(val string) { s.ConfirmationURL = val } // Merged schema. // Ref: #/components/schemas/ConfirmationQr type ConfirmationQr struct { Type ConfirmationType `json:"type"` // Данные для генерации QR-кода. ConfirmationData string `json:"confirmation_data"` } // GetType returns the value of Type. func (s *ConfirmationQr) GetType() ConfirmationType { return s.Type } // GetConfirmationData returns the value of ConfirmationData. func (s *ConfirmationQr) GetConfirmationData() string { return s.ConfirmationData } // SetType sets the value of Type. func (s *ConfirmationQr) SetType(val ConfirmationType) { s.Type = val } // SetConfirmationData sets the value of ConfirmationData. func (s *ConfirmationQr) SetConfirmationData(val string) { s.ConfirmationData = val } // Merged schema. // Ref: #/components/schemas/ConfirmationRedirect type ConfirmationRedirect struct { Type ConfirmationType `json:"type"` Enforce OptEnforce `json:"enforce"` ReturnURL OptReturnUrl `json:"return_url"` ConfirmationURL ConfirmationUrl `json:"confirmation_url"` } // GetType returns the value of Type. func (s *ConfirmationRedirect) GetType() ConfirmationType { return s.Type } // GetEnforce returns the value of Enforce. func (s *ConfirmationRedirect) GetEnforce() OptEnforce { return s.Enforce } // GetReturnURL returns the value of ReturnURL. func (s *ConfirmationRedirect) GetReturnURL() OptReturnUrl { return s.ReturnURL } // GetConfirmationURL returns the value of ConfirmationURL. func (s *ConfirmationRedirect) GetConfirmationURL() ConfirmationUrl { return s.ConfirmationURL } // SetType sets the value of Type. func (s *ConfirmationRedirect) SetType(val ConfirmationType) { s.Type = val } // SetEnforce sets the value of Enforce. func (s *ConfirmationRedirect) SetEnforce(val OptEnforce) { s.Enforce = val } // SetReturnURL sets the value of ReturnURL. func (s *ConfirmationRedirect) SetReturnURL(val OptReturnUrl) { s.ReturnURL = val } // SetConfirmationURL sets the value of ConfirmationURL. func (s *ConfirmationRedirect) SetConfirmationURL(val ConfirmationUrl) { s.ConfirmationURL = val } // Тип пользовательского процесса подтверждения // платежа | - redirect - необходимо направить пользователя // на страницу партнера; - external - необходимо подождать, // пока пользователь самостоятельно подтвердит платеж; // - qr - необходимо сгенерировать QR-код и отобразить его // на странице оплаты, чтобы пользователь смог // подтвердить платеж; - embedded - необходимо отобразить // платежный виджет ЮKassa; - mobile_application - необходимо // перенаправить пользователя в приложение партнера // для оплаты. // Ref: #/components/schemas/ConfirmationType type ConfirmationType string const ( ConfirmationTypeRedirect ConfirmationType = "redirect" ConfirmationTypeExternal ConfirmationType = "external" ConfirmationTypeQr ConfirmationType = "qr" ConfirmationTypeEmbedded ConfirmationType = "embedded" ConfirmationTypeMobileApplication ConfirmationType = "mobile_application" ) // AllValues returns all ConfirmationType values. func (ConfirmationType) AllValues() []ConfirmationType { return []ConfirmationType{ ConfirmationTypeRedirect, ConfirmationTypeExternal, ConfirmationTypeQr, ConfirmationTypeEmbedded, ConfirmationTypeMobileApplication, } } // MarshalText implements encoding.TextMarshaler. func (s ConfirmationType) MarshalText() ([]byte, error) { switch s { case ConfirmationTypeRedirect: return []byte(s), nil case ConfirmationTypeExternal: return []byte(s), nil case ConfirmationTypeQr: return []byte(s), nil case ConfirmationTypeEmbedded: return []byte(s), nil case ConfirmationTypeMobileApplication: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ConfirmationType) UnmarshalText(data []byte) error { switch ConfirmationType(data) { case ConfirmationTypeRedirect: *s = ConfirmationTypeRedirect return nil case ConfirmationTypeExternal: *s = ConfirmationTypeExternal return nil case ConfirmationTypeQr: *s = ConfirmationTypeQr return nil case ConfirmationTypeEmbedded: *s = ConfirmationTypeEmbedded return nil case ConfirmationTypeMobileApplication: *s = ConfirmationTypeMobileApplication return nil default: return errors.Errorf("invalid value: %q", data) } } type ConfirmationUrl string // Трехбуквенный код валюты в формате ISO-4217: https://www.iso. // org/iso-4217-currency-codes.html. Пример: RUB. Должен соответствовать // валюте субаккаунта (recipient.gateway_id), если вы разделяете // потоки платежей, и валюте аккаунта (shopId в личном // кабинете: https://yookassa.ru/my), если не разделяете. // Ref: #/components/schemas/CurrencyCode type CurrencyCode string const ( CurrencyCodeRUB CurrencyCode = "RUB" CurrencyCodeEUR CurrencyCode = "EUR" CurrencyCodeUSD CurrencyCode = "USD" CurrencyCodeKZT CurrencyCode = "KZT" CurrencyCodeBYN CurrencyCode = "BYN" CurrencyCodeUAH CurrencyCode = "UAH" CurrencyCodeUZS CurrencyCode = "UZS" CurrencyCodeTRY CurrencyCode = "TRY" CurrencyCodeINR CurrencyCode = "INR" CurrencyCodeMDL CurrencyCode = "MDL" CurrencyCodeAZN CurrencyCode = "AZN" CurrencyCodeAMD CurrencyCode = "AMD" ) // AllValues returns all CurrencyCode values. func (CurrencyCode) AllValues() []CurrencyCode { return []CurrencyCode{ CurrencyCodeRUB, CurrencyCodeEUR, CurrencyCodeUSD, CurrencyCodeKZT, CurrencyCodeBYN, CurrencyCodeUAH, CurrencyCodeUZS, CurrencyCodeTRY, CurrencyCodeINR, CurrencyCodeMDL, CurrencyCodeAZN, CurrencyCodeAMD, } } // MarshalText implements encoding.TextMarshaler. func (s CurrencyCode) MarshalText() ([]byte, error) { switch s { case CurrencyCodeRUB: return []byte(s), nil case CurrencyCodeEUR: return []byte(s), nil case CurrencyCodeUSD: return []byte(s), nil case CurrencyCodeKZT: return []byte(s), nil case CurrencyCodeBYN: return []byte(s), nil case CurrencyCodeUAH: return []byte(s), nil case CurrencyCodeUZS: return []byte(s), nil case CurrencyCodeTRY: return []byte(s), nil case CurrencyCodeINR: return []byte(s), nil case CurrencyCodeMDL: return []byte(s), nil case CurrencyCodeAZN: return []byte(s), nil case CurrencyCodeAMD: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *CurrencyCode) UnmarshalText(data []byte) error { switch CurrencyCode(data) { case CurrencyCodeRUB: *s = CurrencyCodeRUB return nil case CurrencyCodeEUR: *s = CurrencyCodeEUR return nil case CurrencyCodeUSD: *s = CurrencyCodeUSD return nil case CurrencyCodeKZT: *s = CurrencyCodeKZT return nil case CurrencyCodeBYN: *s = CurrencyCodeBYN return nil case CurrencyCodeUAH: *s = CurrencyCodeUAH return nil case CurrencyCodeUZS: *s = CurrencyCodeUZS return nil case CurrencyCodeTRY: *s = CurrencyCodeTRY return nil case CurrencyCodeINR: *s = CurrencyCodeINR return nil case CurrencyCodeMDL: *s = CurrencyCodeMDL return nil case CurrencyCodeAZN: *s = CurrencyCodeAZN return nil case CurrencyCodeAMD: *s = CurrencyCodeAMD return nil default: return errors.Errorf("invalid value: %q", data) } } type DealId string // Статус сделки. Возможные значения: * opened — сделка // открыта; можно выполнять платежи, возвраты и выплаты // в составе сделки; * closed — сделка закрыта — // вознаграждение перечислено продавцу и платформе или // оплата возвращена покупателю; нельзя выполнять // платежи, возвраты и выплаты в составе сделки. // Ref: #/components/schemas/DealStatus type DealStatus string const ( DealStatusOpened DealStatus = "opened" DealStatusClosed DealStatus = "closed" ) // AllValues returns all DealStatus values. func (DealStatus) AllValues() []DealStatus { return []DealStatus{ DealStatusOpened, DealStatusClosed, } } // MarshalText implements encoding.TextMarshaler. func (s DealStatus) MarshalText() ([]byte, error) { switch s { case DealStatusOpened: return []byte(s), nil case DealStatusClosed: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *DealStatus) UnmarshalText(data []byte) error { switch DealStatus(data) { case DealStatusOpened: *s = DealStatusOpened return nil case DealStatusClosed: *s = DealStatusClosed return nil default: return errors.Errorf("invalid value: %q", data) } } // Тип сделки. Фиксированное значение: safe_deal — // Безопасная сделка. // Ref: #/components/schemas/DealType type DealType string const ( DealTypeSafeDeal DealType = "safe_deal" ) // AllValues returns all DealType values. func (DealType) AllValues() []DealType { return []DealType{ DealTypeSafeDeal, } } // MarshalText implements encoding.TextMarshaler. func (s DealType) MarshalText() ([]byte, error) { switch s { case DealTypeSafeDeal: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *DealType) UnmarshalText(data []byte) error { switch DealType(data) { case DealTypeSafeDeal: *s = DealTypeSafeDeal return nil default: return errors.Errorf("invalid value: %q", data) } } type DealsDealIDGetInternalServerError TooManyRequests func (*DealsDealIDGetInternalServerError) dealsDealIDGetRes() {} type DealsDealIDGetTooManyRequests TooManyRequests func (*DealsDealIDGetTooManyRequests) dealsDealIDGetRes() {} type DealsGetInternalServerError TooManyRequests func (*DealsGetInternalServerError) dealsGetRes() {} // Список сделок, созданных за последние три года. // Сделки отсортированы по времени создания в порядке // убывания (от новых к старым). Если результатов больше, // чем задано в limit, список будет выводиться фрагментами. // В этом случае в ответе на запрос вернется фрагмент // списка и параметр next_cursor с указателем на следующий // фрагмент. type DealsGetOK struct { // Формат выдачи результатов запроса. Возможное // значение: list (список). Type DealsGetOKType `json:"type"` Items []SafeDeal `json:"items"` NextCursor OptNextCursor `json:"next_cursor"` } // GetType returns the value of Type. func (s *DealsGetOK) GetType() DealsGetOKType { return s.Type } // GetItems returns the value of Items. func (s *DealsGetOK) GetItems() []SafeDeal { return s.Items } // GetNextCursor returns the value of NextCursor. func (s *DealsGetOK) GetNextCursor() OptNextCursor { return s.NextCursor } // SetType sets the value of Type. func (s *DealsGetOK) SetType(val DealsGetOKType) { s.Type = val } // SetItems sets the value of Items. func (s *DealsGetOK) SetItems(val []SafeDeal) { s.Items = val } // SetNextCursor sets the value of NextCursor. func (s *DealsGetOK) SetNextCursor(val OptNextCursor) { s.NextCursor = val } func (*DealsGetOK) dealsGetRes() {} // Формат выдачи результатов запроса. Возможное // значение: list (список). type DealsGetOKType string const ( DealsGetOKTypeList DealsGetOKType = "list" ) // AllValues returns all DealsGetOKType values. func (DealsGetOKType) AllValues() []DealsGetOKType { return []DealsGetOKType{ DealsGetOKTypeList, } } // MarshalText implements encoding.TextMarshaler. func (s DealsGetOKType) MarshalText() ([]byte, error) { switch s { case DealsGetOKTypeList: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *DealsGetOKType) UnmarshalText(data []byte) error { switch DealsGetOKType(data) { case DealsGetOKTypeList: *s = DealsGetOKTypeList return nil default: return errors.Errorf("invalid value: %q", data) } } type DealsGetTooManyRequests TooManyRequests func (*DealsGetTooManyRequests) dealsGetRes() {} type DealsPostInternalServerError TooManyRequests func (*DealsPostInternalServerError) dealsPostRes() {} type DealsPostTooManyRequests TooManyRequests func (*DealsPostTooManyRequests) dealsPostRes() {} // Описание используемого электронного сертификата. // Ref: #/components/schemas/ElectronicCertificate type ElectronicCertificate struct { // Идентификатор сертификата. От 20 до 30 символов. CertificateID string `json:"certificate_id"` // Количество единиц товара, которое одобрили для // оплаты по этому электронному сертификату. TruQuantity int `json:"tru_quantity"` AvailableCompensation ElectronicCertificateAvailableCompensation `json:"available_compensation"` AppliedCompensation ElectronicCertificateAppliedCompensation `json:"applied_compensation"` } // GetCertificateID returns the value of CertificateID. func (s *ElectronicCertificate) GetCertificateID() string { return s.CertificateID } // GetTruQuantity returns the value of TruQuantity. func (s *ElectronicCertificate) GetTruQuantity() int { return s.TruQuantity } // GetAvailableCompensation returns the value of AvailableCompensation. func (s *ElectronicCertificate) GetAvailableCompensation() ElectronicCertificateAvailableCompensation { return s.AvailableCompensation } // GetAppliedCompensation returns the value of AppliedCompensation. func (s *ElectronicCertificate) GetAppliedCompensation() ElectronicCertificateAppliedCompensation { return s.AppliedCompensation } // SetCertificateID sets the value of CertificateID. func (s *ElectronicCertificate) SetCertificateID(val string) { s.CertificateID = val } // SetTruQuantity sets the value of TruQuantity. func (s *ElectronicCertificate) SetTruQuantity(val int) { s.TruQuantity = val } // SetAvailableCompensation sets the value of AvailableCompensation. func (s *ElectronicCertificate) SetAvailableCompensation(val ElectronicCertificateAvailableCompensation) { s.AvailableCompensation = val } // SetAppliedCompensation sets the value of AppliedCompensation. func (s *ElectronicCertificate) SetAppliedCompensation(val ElectronicCertificateAppliedCompensation) { s.AppliedCompensation = val } // Сумма в выбранной валюте. type ElectronicCertificateAppliedCompensation struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *ElectronicCertificateAppliedCompensation) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *ElectronicCertificateAppliedCompensation) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *ElectronicCertificateAppliedCompensation) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *ElectronicCertificateAppliedCompensation) SetCurrency(val CurrencyCode) { s.Currency = val } // Товарная позиция в одобренной корзине покупки при // оплате по электронному сертификату. // Ref: #/components/schemas/ElectronicCertificateApprovedPaymentArticle type ElectronicCertificateApprovedPaymentArticle struct { ArticleNumber ElectronicCertificateArticleNumber `json:"article_number"` TruCode ElectronicCertificateTruCode `json:"tru_code"` ArticleCode OptElectronicCertificateArticleCode `json:"article_code"` // Список электронных сертификатов, которые // используются для оплаты покупки. Certificates []ElectronicCertificate `json:"certificates"` } // GetArticleNumber returns the value of ArticleNumber. func (s *ElectronicCertificateApprovedPaymentArticle) GetArticleNumber() ElectronicCertificateArticleNumber { return s.ArticleNumber } // GetTruCode returns the value of TruCode. func (s *ElectronicCertificateApprovedPaymentArticle) GetTruCode() ElectronicCertificateTruCode { return s.TruCode } // GetArticleCode returns the value of ArticleCode. func (s *ElectronicCertificateApprovedPaymentArticle) GetArticleCode() OptElectronicCertificateArticleCode { return s.ArticleCode } // GetCertificates returns the value of Certificates. func (s *ElectronicCertificateApprovedPaymentArticle) GetCertificates() []ElectronicCertificate { return s.Certificates } // SetArticleNumber sets the value of ArticleNumber. func (s *ElectronicCertificateApprovedPaymentArticle) SetArticleNumber(val ElectronicCertificateArticleNumber) { s.ArticleNumber = val } // SetTruCode sets the value of TruCode. func (s *ElectronicCertificateApprovedPaymentArticle) SetTruCode(val ElectronicCertificateTruCode) { s.TruCode = val } // SetArticleCode sets the value of ArticleCode. func (s *ElectronicCertificateApprovedPaymentArticle) SetArticleCode(val OptElectronicCertificateArticleCode) { s.ArticleCode = val } // SetCertificates sets the value of Certificates. func (s *ElectronicCertificateApprovedPaymentArticle) SetCertificates(val []ElectronicCertificate) { s.Certificates = val } // Товарная позиция в корзине покупки при оплате по // электронному сертификату. // Ref: #/components/schemas/ElectronicCertificateArticle type ElectronicCertificateArticle struct { ArticleNumber ElectronicCertificateArticleNumber `json:"article_number"` TruCode ElectronicCertificateTruCode `json:"tru_code"` ArticleCode OptElectronicCertificateArticleCode `json:"article_code"` // Название товара в вашей системе. Отображается на // готовой платежной форме ЮKassa. Максимум 128 символов. ArticleName string `json:"article_name"` Quantity ElectronicCertificateArticleQuantity `json:"quantity"` Price ElectronicCertificateArticlePrice `json:"price"` Metadata OptMetadata `json:"metadata"` } // GetArticleNumber returns the value of ArticleNumber. func (s *ElectronicCertificateArticle) GetArticleNumber() ElectronicCertificateArticleNumber { return s.ArticleNumber } // GetTruCode returns the value of TruCode. func (s *ElectronicCertificateArticle) GetTruCode() ElectronicCertificateTruCode { return s.TruCode } // GetArticleCode returns the value of ArticleCode. func (s *ElectronicCertificateArticle) GetArticleCode() OptElectronicCertificateArticleCode { return s.ArticleCode } // GetArticleName returns the value of ArticleName. func (s *ElectronicCertificateArticle) GetArticleName() string { return s.ArticleName } // GetQuantity returns the value of Quantity. func (s *ElectronicCertificateArticle) GetQuantity() ElectronicCertificateArticleQuantity { return s.Quantity } // GetPrice returns the value of Price. func (s *ElectronicCertificateArticle) GetPrice() ElectronicCertificateArticlePrice { return s.Price } // GetMetadata returns the value of Metadata. func (s *ElectronicCertificateArticle) GetMetadata() OptMetadata { return s.Metadata } // SetArticleNumber sets the value of ArticleNumber. func (s *ElectronicCertificateArticle) SetArticleNumber(val ElectronicCertificateArticleNumber) { s.ArticleNumber = val } // SetTruCode sets the value of TruCode. func (s *ElectronicCertificateArticle) SetTruCode(val ElectronicCertificateTruCode) { s.TruCode = val } // SetArticleCode sets the value of ArticleCode. func (s *ElectronicCertificateArticle) SetArticleCode(val OptElectronicCertificateArticleCode) { s.ArticleCode = val } // SetArticleName sets the value of ArticleName. func (s *ElectronicCertificateArticle) SetArticleName(val string) { s.ArticleName = val } // SetQuantity sets the value of Quantity. func (s *ElectronicCertificateArticle) SetQuantity(val ElectronicCertificateArticleQuantity) { s.Quantity = val } // SetPrice sets the value of Price. func (s *ElectronicCertificateArticle) SetPrice(val ElectronicCertificateArticlePrice) { s.Price = val } // SetMetadata sets the value of Metadata. func (s *ElectronicCertificateArticle) SetMetadata(val OptMetadata) { s.Metadata = val } type ElectronicCertificateArticleCode string type ElectronicCertificateArticleNumber int32 // Сумма в выбранной валюте. type ElectronicCertificateArticlePrice struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *ElectronicCertificateArticlePrice) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *ElectronicCertificateArticlePrice) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *ElectronicCertificateArticlePrice) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *ElectronicCertificateArticlePrice) SetCurrency(val CurrencyCode) { s.Currency = val } type ElectronicCertificateArticleQuantity int32 // Сумма в выбранной валюте. type ElectronicCertificateAvailableCompensation struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *ElectronicCertificateAvailableCompensation) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *ElectronicCertificateAvailableCompensation) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *ElectronicCertificateAvailableCompensation) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *ElectronicCertificateAvailableCompensation) SetCurrency(val CurrencyCode) { s.Currency = val } // Данные от ФЭС НСПК для оплаты по электронному // сертификату. // Ref: #/components/schemas/ElectronicCertificatePayment type ElectronicCertificatePayment struct { Amount ElectronicCertificatePaymentAmount `json:"amount"` BasketID string `json:"basket_id"` } // GetAmount returns the value of Amount. func (s *ElectronicCertificatePayment) GetAmount() ElectronicCertificatePaymentAmount { return s.Amount } // GetBasketID returns the value of BasketID. func (s *ElectronicCertificatePayment) GetBasketID() string { return s.BasketID } // SetAmount sets the value of Amount. func (s *ElectronicCertificatePayment) SetAmount(val ElectronicCertificatePaymentAmount) { s.Amount = val } // SetBasketID sets the value of BasketID. func (s *ElectronicCertificatePayment) SetBasketID(val string) { s.BasketID = val } // Сумма в выбранной валюте. type ElectronicCertificatePaymentAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *ElectronicCertificatePaymentAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *ElectronicCertificatePaymentAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *ElectronicCertificatePaymentAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *ElectronicCertificatePaymentAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Данные от ФЭС НСПК для оплаты по электронному // сертификату. Неоходимо передавать только при оплате // со сбором данных на вашей стороне: https://yookassa. // ru/developers/payment-acceptance/integration-scenarios/manual-integration/other/electronic-certificate/merchant-payment-form. // Ref: #/components/schemas/ElectronicCertificatePaymentData type ElectronicCertificatePaymentData struct { Amount ElectronicCertificatePaymentDataAmount `json:"amount"` BasketID string `json:"basket_id"` } // GetAmount returns the value of Amount. func (s *ElectronicCertificatePaymentData) GetAmount() ElectronicCertificatePaymentDataAmount { return s.Amount } // GetBasketID returns the value of BasketID. func (s *ElectronicCertificatePaymentData) GetBasketID() string { return s.BasketID } // SetAmount sets the value of Amount. func (s *ElectronicCertificatePaymentData) SetAmount(val ElectronicCertificatePaymentDataAmount) { s.Amount = val } // SetBasketID sets the value of BasketID. func (s *ElectronicCertificatePaymentData) SetBasketID(val string) { s.BasketID = val } // Сумма в выбранной валюте. type ElectronicCertificatePaymentDataAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *ElectronicCertificatePaymentDataAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *ElectronicCertificatePaymentDataAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *ElectronicCertificatePaymentDataAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *ElectronicCertificatePaymentDataAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Товарная позиция в корзине возврата при возврате на // электронный сертификат. // Ref: #/components/schemas/ElectronicCertificateRefundArticle type ElectronicCertificateRefundArticle struct { ArticleNumber int32 `json:"article_number"` PaymentArticleNumber int32 `json:"payment_article_number"` TruCode ElectronicCertificateTruCode `json:"tru_code"` // Количество возвращаемых единиц товара. Формат: целое // положительное число. Quantity int32 `json:"quantity"` } // GetArticleNumber returns the value of ArticleNumber. func (s *ElectronicCertificateRefundArticle) GetArticleNumber() int32 { return s.ArticleNumber } // GetPaymentArticleNumber returns the value of PaymentArticleNumber. func (s *ElectronicCertificateRefundArticle) GetPaymentArticleNumber() int32 { return s.PaymentArticleNumber } // GetTruCode returns the value of TruCode. func (s *ElectronicCertificateRefundArticle) GetTruCode() ElectronicCertificateTruCode { return s.TruCode } // GetQuantity returns the value of Quantity. func (s *ElectronicCertificateRefundArticle) GetQuantity() int32 { return s.Quantity } // SetArticleNumber sets the value of ArticleNumber. func (s *ElectronicCertificateRefundArticle) SetArticleNumber(val int32) { s.ArticleNumber = val } // SetPaymentArticleNumber sets the value of PaymentArticleNumber. func (s *ElectronicCertificateRefundArticle) SetPaymentArticleNumber(val int32) { s.PaymentArticleNumber = val } // SetTruCode sets the value of TruCode. func (s *ElectronicCertificateRefundArticle) SetTruCode(val ElectronicCertificateTruCode) { s.TruCode = val } // SetQuantity sets the value of Quantity. func (s *ElectronicCertificateRefundArticle) SetQuantity(val int32) { s.Quantity = val } // Данные от ФЭС НСПК для возврата на электронный // сертификат. Неоходимо передавать только при оплате // со сбором данных на вашей стороне: https://yookassa. // ru/developers/payment-acceptance/integration-scenarios/manual-integration/other/electronic-certificate/merchant-payment-form. // Ref: #/components/schemas/ElectronicCertificateRefundDataRequest type ElectronicCertificateRefundDataRequest struct { Amount ElectronicCertificateRefundDataRequestAmount `json:"amount"` BasketID string `json:"basket_id"` } // GetAmount returns the value of Amount. func (s *ElectronicCertificateRefundDataRequest) GetAmount() ElectronicCertificateRefundDataRequestAmount { return s.Amount } // GetBasketID returns the value of BasketID. func (s *ElectronicCertificateRefundDataRequest) GetBasketID() string { return s.BasketID } // SetAmount sets the value of Amount. func (s *ElectronicCertificateRefundDataRequest) SetAmount(val ElectronicCertificateRefundDataRequestAmount) { s.Amount = val } // SetBasketID sets the value of BasketID. func (s *ElectronicCertificateRefundDataRequest) SetBasketID(val string) { s.BasketID = val } // Сумма в выбранной валюте. type ElectronicCertificateRefundDataRequestAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *ElectronicCertificateRefundDataRequestAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *ElectronicCertificateRefundDataRequestAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *ElectronicCertificateRefundDataRequestAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *ElectronicCertificateRefundDataRequestAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Данные от ФЭС НСПК для возврата на электронный // сертификат. // Ref: #/components/schemas/ElectronicCertificateRefundDataResponse type ElectronicCertificateRefundDataResponse struct { BasketID string `json:"basket_id"` Amount ElectronicCertificateRefundDataResponseAmount `json:"amount"` } // GetBasketID returns the value of BasketID. func (s *ElectronicCertificateRefundDataResponse) GetBasketID() string { return s.BasketID } // GetAmount returns the value of Amount. func (s *ElectronicCertificateRefundDataResponse) GetAmount() ElectronicCertificateRefundDataResponseAmount { return s.Amount } // SetBasketID sets the value of BasketID. func (s *ElectronicCertificateRefundDataResponse) SetBasketID(val string) { s.BasketID = val } // SetAmount sets the value of Amount. func (s *ElectronicCertificateRefundDataResponse) SetAmount(val ElectronicCertificateRefundDataResponseAmount) { s.Amount = val } // Сумма в выбранной валюте. type ElectronicCertificateRefundDataResponseAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *ElectronicCertificateRefundDataResponseAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *ElectronicCertificateRefundDataResponseAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *ElectronicCertificateRefundDataResponseAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *ElectronicCertificateRefundDataResponseAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Merged schema. // Ref: #/components/schemas/ElectronicCertificateRefundMethod type ElectronicCertificateRefundMethod struct { Type RefundMethodType `json:"type"` ElectronicCertificate OptElectronicCertificateRefundDataResponse `json:"electronic_certificate"` // Корзина возврата — список возвращаемых товаров, для // оплаты которых использовался электронный сертификат. // Присутствует, если оплата была на готовой странице // ЮKassa: https://yookassa. // ru/developers/payment-acceptance/integration-scenarios/manual-integration/other/electronic-certificate/ready-made-payment-form. Articles []ElectronicCertificateRefundArticle `json:"articles"` } // GetType returns the value of Type. func (s *ElectronicCertificateRefundMethod) GetType() RefundMethodType { return s.Type } // GetElectronicCertificate returns the value of ElectronicCertificate. func (s *ElectronicCertificateRefundMethod) GetElectronicCertificate() OptElectronicCertificateRefundDataResponse { return s.ElectronicCertificate } // GetArticles returns the value of Articles. func (s *ElectronicCertificateRefundMethod) GetArticles() []ElectronicCertificateRefundArticle { return s.Articles } // SetType sets the value of Type. func (s *ElectronicCertificateRefundMethod) SetType(val RefundMethodType) { s.Type = val } // SetElectronicCertificate sets the value of ElectronicCertificate. func (s *ElectronicCertificateRefundMethod) SetElectronicCertificate(val OptElectronicCertificateRefundDataResponse) { s.ElectronicCertificate = val } // SetArticles sets the value of Articles. func (s *ElectronicCertificateRefundMethod) SetArticles(val []ElectronicCertificateRefundArticle) { s.Articles = val } // Merged schema. // Ref: #/components/schemas/ElectronicCertificateRefundMethodData type ElectronicCertificateRefundMethodData struct { Type RefundMethodType `json:"type"` ElectronicCertificate OptElectronicCertificateRefundDataRequest `json:"electronic_certificate"` // Корзина возврата (в терминах НСПК) — список // возвращаемых товаров, для оплаты которых // использовался электронный сертификат. Данные должны // соответствовать товарам из одобренной корзины // покупки (articles в объекте платежа: https://yookassa. // ru/developers/api#payment_object). Необходимо передавать только при // оплате на готовой странице ЮKassa: https://yookassa. // ru/developers/payment-acceptance/integration-scenarios/manual-integration/other/electronic-certificate/ready-made-payment-form. Articles []ElectronicCertificateRefundArticle `json:"articles"` } // GetType returns the value of Type. func (s *ElectronicCertificateRefundMethodData) GetType() RefundMethodType { return s.Type } // GetElectronicCertificate returns the value of ElectronicCertificate. func (s *ElectronicCertificateRefundMethodData) GetElectronicCertificate() OptElectronicCertificateRefundDataRequest { return s.ElectronicCertificate } // GetArticles returns the value of Articles. func (s *ElectronicCertificateRefundMethodData) GetArticles() []ElectronicCertificateRefundArticle { return s.Articles } // SetType sets the value of Type. func (s *ElectronicCertificateRefundMethodData) SetType(val RefundMethodType) { s.Type = val } // SetElectronicCertificate sets the value of ElectronicCertificate. func (s *ElectronicCertificateRefundMethodData) SetElectronicCertificate(val OptElectronicCertificateRefundDataRequest) { s.ElectronicCertificate = val } // SetArticles sets the value of Articles. func (s *ElectronicCertificateRefundMethodData) SetArticles(val []ElectronicCertificateRefundArticle) { s.Articles = val } type ElectronicCertificateTruCode string type Enforce bool // Момент перечисления вам вознаграждения платформы. // Возможные значения: payment_succeeded — после успешной // оплаты; deal_closed — при закрытии сделки после успешной // выплаты. // Ref: #/components/schemas/FeeMoment type FeeMoment string const ( FeeMomentPaymentSucceeded FeeMoment = "payment_succeeded" FeeMomentDealClosed FeeMoment = "deal_closed" ) // AllValues returns all FeeMoment values. func (FeeMoment) AllValues() []FeeMoment { return []FeeMoment{ FeeMomentPaymentSucceeded, FeeMomentDealClosed, } } // MarshalText implements encoding.TextMarshaler. func (s FeeMoment) MarshalText() ([]byte, error) { switch s { case FeeMomentPaymentSucceeded: return []byte(s), nil case FeeMomentDealClosed: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *FeeMoment) UnmarshalText(data []byte) error { switch FeeMoment(data) { case FeeMomentPaymentSucceeded: *s = FeeMomentPaymentSucceeded return nil case FeeMomentDealClosed: *s = FeeMomentDealClosed return nil default: return errors.Errorf("invalid value: %q", data) } } type FirstName string // Настройки магазина для отправки чеков в налоговую: // https://yookassa.ru/developers/payment-acceptance/receipts/basics. Присутствует, // если вы запрашивали настройки магазина и этот // магазин использует решения ЮKassa для отправки чеков. // Отсутствует, если магазин еще не включал отправку // чеков через ЮKassa. // Ref: #/components/schemas/FiscalizationData type FiscalizationData struct { // В настройках магазина включена отправка чеков. // Возможные значения: * true — магазин отправляет данные // для чеков через ЮKassa; * false — магазин выключил отправку // чеков через ЮKassa. Enabled bool `json:"enabled"` Provider FiscalizationProvider `json:"provider"` } // GetEnabled returns the value of Enabled. func (s *FiscalizationData) GetEnabled() bool { return s.Enabled } // GetProvider returns the value of Provider. func (s *FiscalizationData) GetProvider() FiscalizationProvider { return s.Provider } // SetEnabled sets the value of Enabled. func (s *FiscalizationData) SetEnabled(val bool) { s.Enabled = val } // SetProvider sets the value of Provider. func (s *FiscalizationData) SetProvider(val FiscalizationProvider) { s.Provider = val } // The YooMoney’s solution that the store uses to send receipts. Possible values: 54-FZ: Receipts // from YooMoney: https://yookassa.ru/developers/payment-acceptance/receipts/54fz/yoomoney/basics: // avanpost; 54-FZ: a third-party online sales register: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/basics (name of an online sales // register): a_qsi (aQsi online), atol (ATOL online), business_ru (Business.Ru), digital_kassa // (digitalkassa), evotor (Evotor), first_ofd (1-OFD), kit_invest (Kit Invest), komtet (KOMTET Kassa), // // life_pay (LIFE PAY), mertrade (Mertrade), modul_kassa (ModulKassa), rocket (RocketR), shtrih_m // // (Orange Data). // Ref: #/components/schemas/FiscalizationProvider type FiscalizationProvider string const ( FiscalizationProviderAtol FiscalizationProvider = "atol" FiscalizationProviderAvanpost FiscalizationProvider = "avanpost" FiscalizationProviderAQsi FiscalizationProvider = "a_qsi" FiscalizationProviderBusinessRu FiscalizationProvider = "business_ru" FiscalizationProviderDigitalKassa FiscalizationProvider = "digital_kassa" FiscalizationProviderEvotor FiscalizationProvider = "evotor" FiscalizationProviderFirstOfd FiscalizationProvider = "first_ofd" FiscalizationProviderKitInvest FiscalizationProvider = "kit_invest" FiscalizationProviderKomtet FiscalizationProvider = "komtet" FiscalizationProviderLifePay FiscalizationProvider = "life_pay" FiscalizationProviderMertrade FiscalizationProvider = "mertrade" FiscalizationProviderModulKassa FiscalizationProvider = "modul_kassa" FiscalizationProviderRocket FiscalizationProvider = "rocket" FiscalizationProviderShtrihM FiscalizationProvider = "shtrih_m" ) // AllValues returns all FiscalizationProvider values. func (FiscalizationProvider) AllValues() []FiscalizationProvider { return []FiscalizationProvider{ FiscalizationProviderAtol, FiscalizationProviderAvanpost, FiscalizationProviderAQsi, FiscalizationProviderBusinessRu, FiscalizationProviderDigitalKassa, FiscalizationProviderEvotor, FiscalizationProviderFirstOfd, FiscalizationProviderKitInvest, FiscalizationProviderKomtet, FiscalizationProviderLifePay, FiscalizationProviderMertrade, FiscalizationProviderModulKassa, FiscalizationProviderRocket, FiscalizationProviderShtrihM, } } // MarshalText implements encoding.TextMarshaler. func (s FiscalizationProvider) MarshalText() ([]byte, error) { switch s { case FiscalizationProviderAtol: return []byte(s), nil case FiscalizationProviderAvanpost: return []byte(s), nil case FiscalizationProviderAQsi: return []byte(s), nil case FiscalizationProviderBusinessRu: return []byte(s), nil case FiscalizationProviderDigitalKassa: return []byte(s), nil case FiscalizationProviderEvotor: return []byte(s), nil case FiscalizationProviderFirstOfd: return []byte(s), nil case FiscalizationProviderKitInvest: return []byte(s), nil case FiscalizationProviderKomtet: return []byte(s), nil case FiscalizationProviderLifePay: return []byte(s), nil case FiscalizationProviderMertrade: return []byte(s), nil case FiscalizationProviderModulKassa: return []byte(s), nil case FiscalizationProviderRocket: return []byte(s), nil case FiscalizationProviderShtrihM: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *FiscalizationProvider) UnmarshalText(data []byte) error { switch FiscalizationProvider(data) { case FiscalizationProviderAtol: *s = FiscalizationProviderAtol return nil case FiscalizationProviderAvanpost: *s = FiscalizationProviderAvanpost return nil case FiscalizationProviderAQsi: *s = FiscalizationProviderAQsi return nil case FiscalizationProviderBusinessRu: *s = FiscalizationProviderBusinessRu return nil case FiscalizationProviderDigitalKassa: *s = FiscalizationProviderDigitalKassa return nil case FiscalizationProviderEvotor: *s = FiscalizationProviderEvotor return nil case FiscalizationProviderFirstOfd: *s = FiscalizationProviderFirstOfd return nil case FiscalizationProviderKitInvest: *s = FiscalizationProviderKitInvest return nil case FiscalizationProviderKomtet: *s = FiscalizationProviderKomtet return nil case FiscalizationProviderLifePay: *s = FiscalizationProviderLifePay return nil case FiscalizationProviderMertrade: *s = FiscalizationProviderMertrade return nil case FiscalizationProviderModulKassa: *s = FiscalizationProviderModulKassa return nil case FiscalizationProviderRocket: *s = FiscalizationProviderRocket return nil case FiscalizationProviderShtrihM: *s = FiscalizationProviderShtrihM return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/Forbidden type Forbidden struct { // Тип объекта. Type OptForbiddenType `json:"type"` // Идентификатор ошибки. Используйте его, если возникла // необходимость обратиться в техническую поддержку. ID OptString `json:"id"` // Подробное описание ошибки. Description OptString `json:"description"` // Название параметра, из-за которого произошла ошибка. Parameter OptString `json:"parameter"` // Рекомендуемое количество миллисекунд, спустя // которое следует повторить запрос. RetryAfter OptInt `json:"retry_after"` // Код ошибки. Code OptForbiddenCode `json:"code"` } // GetType returns the value of Type. func (s *Forbidden) GetType() OptForbiddenType { return s.Type } // GetID returns the value of ID. func (s *Forbidden) GetID() OptString { return s.ID } // GetDescription returns the value of Description. func (s *Forbidden) GetDescription() OptString { return s.Description } // GetParameter returns the value of Parameter. func (s *Forbidden) GetParameter() OptString { return s.Parameter } // GetRetryAfter returns the value of RetryAfter. func (s *Forbidden) GetRetryAfter() OptInt { return s.RetryAfter } // GetCode returns the value of Code. func (s *Forbidden) GetCode() OptForbiddenCode { return s.Code } // SetType sets the value of Type. func (s *Forbidden) SetType(val OptForbiddenType) { s.Type = val } // SetID sets the value of ID. func (s *Forbidden) SetID(val OptString) { s.ID = val } // SetDescription sets the value of Description. func (s *Forbidden) SetDescription(val OptString) { s.Description = val } // SetParameter sets the value of Parameter. func (s *Forbidden) SetParameter(val OptString) { s.Parameter = val } // SetRetryAfter sets the value of RetryAfter. func (s *Forbidden) SetRetryAfter(val OptInt) { s.RetryAfter = val } // SetCode sets the value of Code. func (s *Forbidden) SetCode(val OptForbiddenCode) { s.Code = val } func (*Forbidden) dealsDealIDGetRes() {} func (*Forbidden) dealsGetRes() {} func (*Forbidden) dealsPostRes() {} func (*Forbidden) meGetRes() {} func (*Forbidden) paymentMethodsPaymentMethodIDGetRes() {} func (*Forbidden) paymentMethodsPostRes() {} func (*Forbidden) paymentsGetRes() {} func (*Forbidden) paymentsPaymentIDCancelPostRes() {} func (*Forbidden) paymentsPaymentIDCapturePostRes() {} func (*Forbidden) paymentsPaymentIDGetRes() {} func (*Forbidden) paymentsPostRes() {} func (*Forbidden) payoutsGetRes() {} func (*Forbidden) payoutsPayoutIDGetRes() {} func (*Forbidden) payoutsPostRes() {} func (*Forbidden) payoutsSearchGetRes() {} func (*Forbidden) personalDataPersonalDataIDGetRes() {} func (*Forbidden) personalDataPostRes() {} func (*Forbidden) receiptsGetRes() {} func (*Forbidden) receiptsPostRes() {} func (*Forbidden) receiptsReceiptIDGetRes() {} func (*Forbidden) refundsGetRes() {} func (*Forbidden) refundsPostRes() {} func (*Forbidden) refundsRefundIDGetRes() {} func (*Forbidden) sbpBanksGetRes() {} func (*Forbidden) webhooksGetRes() {} func (*Forbidden) webhooksPostRes() {} func (*Forbidden) webhooksWebhookIDDeleteRes() {} // Код ошибки. type ForbiddenCode string const ( ForbiddenCodeForbidden ForbiddenCode = "forbidden" ) // AllValues returns all ForbiddenCode values. func (ForbiddenCode) AllValues() []ForbiddenCode { return []ForbiddenCode{ ForbiddenCodeForbidden, } } // MarshalText implements encoding.TextMarshaler. func (s ForbiddenCode) MarshalText() ([]byte, error) { switch s { case ForbiddenCodeForbidden: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ForbiddenCode) UnmarshalText(data []byte) error { switch ForbiddenCode(data) { case ForbiddenCodeForbidden: *s = ForbiddenCodeForbidden return nil default: return errors.Errorf("invalid value: %q", data) } } // Тип объекта. type ForbiddenType string const ( ForbiddenTypeError ForbiddenType = "error" ) // AllValues returns all ForbiddenType values. func (ForbiddenType) AllValues() []ForbiddenType { return []ForbiddenType{ ForbiddenTypeError, } } // MarshalText implements encoding.TextMarshaler. func (s ForbiddenType) MarshalText() ([]byte, error) { switch s { case ForbiddenTypeError: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ForbiddenType) UnmarshalText(data []byte) error { switch ForbiddenType(data) { case ForbiddenTypeError: *s = ForbiddenTypeError return nil default: return errors.Errorf("invalid value: %q", data) } } type GatewayId string // Details of the receipt recorded at the Tax Service. Deprecated parameter. It was previously // returned when making payouts to self-employed individuals. This option is currently unavailable. // The parameter is kept for backward compatibility and may be removed in future API versions. // Ref: #/components/schemas/IncomeReceipt type IncomeReceipt struct { ServiceName IncomeReceiptServiceName `json:"service_name"` NpdReceiptID OptNpdIncomeReceiptId `json:"npd_receipt_id"` URL OptIncomeReceiptUrl `json:"url"` Amount OptIncomeReceiptAmount `json:"amount"` } // GetServiceName returns the value of ServiceName. func (s *IncomeReceipt) GetServiceName() IncomeReceiptServiceName { return s.ServiceName } // GetNpdReceiptID returns the value of NpdReceiptID. func (s *IncomeReceipt) GetNpdReceiptID() OptNpdIncomeReceiptId { return s.NpdReceiptID } // GetURL returns the value of URL. func (s *IncomeReceipt) GetURL() OptIncomeReceiptUrl { return s.URL } // GetAmount returns the value of Amount. func (s *IncomeReceipt) GetAmount() OptIncomeReceiptAmount { return s.Amount } // SetServiceName sets the value of ServiceName. func (s *IncomeReceipt) SetServiceName(val IncomeReceiptServiceName) { s.ServiceName = val } // SetNpdReceiptID sets the value of NpdReceiptID. func (s *IncomeReceipt) SetNpdReceiptID(val OptNpdIncomeReceiptId) { s.NpdReceiptID = val } // SetURL sets the value of URL. func (s *IncomeReceipt) SetURL(val OptIncomeReceiptUrl) { s.URL = val } // SetAmount sets the value of Amount. func (s *IncomeReceipt) SetAmount(val OptIncomeReceiptAmount) { s.Amount = val } // Сумма в выбранной валюте. type IncomeReceiptAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *IncomeReceiptAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *IncomeReceiptAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *IncomeReceiptAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *IncomeReceiptAmount) SetCurrency(val CurrencyCode) { s.Currency = val } type IncomeReceiptServiceName string type IncomeReceiptUrl string // Данные отраслевого реквизита. // Ref: #/components/schemas/IndustryDetails type IndustryDetails struct { // Идентификатор федерального органа исполнительной // власти (тег в 54 ФЗ — 1262). FederalID string `json:"federal_id"` // Дата документа основания (тег в 54 ФЗ — 1263). Передается // в формате ISO 8601: https://en.wikipedia.org/wiki/ISO_8601. DocumentDate time.Time `json:"document_date"` // Номер нормативного акта федерального органа // исполнительной власти, регламентирующего порядок // заполнения реквизита «значение отраслевого // реквизита» (тег в 54 ФЗ — 1264). DocumentNumber string `json:"document_number"` // Значение отраслевого реквизита (тег в 54 ФЗ — 1265). Value string `json:"value"` } // GetFederalID returns the value of FederalID. func (s *IndustryDetails) GetFederalID() string { return s.FederalID } // GetDocumentDate returns the value of DocumentDate. func (s *IndustryDetails) GetDocumentDate() time.Time { return s.DocumentDate } // GetDocumentNumber returns the value of DocumentNumber. func (s *IndustryDetails) GetDocumentNumber() string { return s.DocumentNumber } // GetValue returns the value of Value. func (s *IndustryDetails) GetValue() string { return s.Value } // SetFederalID sets the value of FederalID. func (s *IndustryDetails) SetFederalID(val string) { s.FederalID = val } // SetDocumentDate sets the value of DocumentDate. func (s *IndustryDetails) SetDocumentDate(val time.Time) { s.DocumentDate = val } // SetDocumentNumber sets the value of DocumentNumber. func (s *IndustryDetails) SetDocumentNumber(val string) { s.DocumentNumber = val } // SetValue sets the value of Value. func (s *IndustryDetails) SetValue(val string) { s.Value = val } // Merged schema. // Ref: #/components/schemas/InvalidCredentials type InvalidCredentials struct { // Тип объекта. Type OptInvalidCredentialsType `json:"type"` // Идентификатор ошибки. Используйте его, если возникла // необходимость обратиться в техническую поддержку. ID OptString `json:"id"` // Подробное описание ошибки. Description OptString `json:"description"` // Название параметра, из-за которого произошла ошибка. Parameter OptString `json:"parameter"` // Рекомендуемое количество миллисекунд, спустя // которое следует повторить запрос. RetryAfter OptInt `json:"retry_after"` // Код ошибки. Code OptInvalidCredentialsCode `json:"code"` } // GetType returns the value of Type. func (s *InvalidCredentials) GetType() OptInvalidCredentialsType { return s.Type } // GetID returns the value of ID. func (s *InvalidCredentials) GetID() OptString { return s.ID } // GetDescription returns the value of Description. func (s *InvalidCredentials) GetDescription() OptString { return s.Description } // GetParameter returns the value of Parameter. func (s *InvalidCredentials) GetParameter() OptString { return s.Parameter } // GetRetryAfter returns the value of RetryAfter. func (s *InvalidCredentials) GetRetryAfter() OptInt { return s.RetryAfter } // GetCode returns the value of Code. func (s *InvalidCredentials) GetCode() OptInvalidCredentialsCode { return s.Code } // SetType sets the value of Type. func (s *InvalidCredentials) SetType(val OptInvalidCredentialsType) { s.Type = val } // SetID sets the value of ID. func (s *InvalidCredentials) SetID(val OptString) { s.ID = val } // SetDescription sets the value of Description. func (s *InvalidCredentials) SetDescription(val OptString) { s.Description = val } // SetParameter sets the value of Parameter. func (s *InvalidCredentials) SetParameter(val OptString) { s.Parameter = val } // SetRetryAfter sets the value of RetryAfter. func (s *InvalidCredentials) SetRetryAfter(val OptInt) { s.RetryAfter = val } // SetCode sets the value of Code. func (s *InvalidCredentials) SetCode(val OptInvalidCredentialsCode) { s.Code = val } func (*InvalidCredentials) dealsDealIDGetRes() {} func (*InvalidCredentials) dealsGetRes() {} func (*InvalidCredentials) dealsPostRes() {} func (*InvalidCredentials) meGetRes() {} func (*InvalidCredentials) paymentMethodsPaymentMethodIDGetRes() {} func (*InvalidCredentials) paymentMethodsPostRes() {} func (*InvalidCredentials) paymentsGetRes() {} func (*InvalidCredentials) paymentsPaymentIDCancelPostRes() {} func (*InvalidCredentials) paymentsPaymentIDCapturePostRes() {} func (*InvalidCredentials) paymentsPaymentIDGetRes() {} func (*InvalidCredentials) paymentsPostRes() {} func (*InvalidCredentials) payoutsGetRes() {} func (*InvalidCredentials) payoutsPayoutIDGetRes() {} func (*InvalidCredentials) payoutsPostRes() {} func (*InvalidCredentials) payoutsSearchGetRes() {} func (*InvalidCredentials) personalDataPersonalDataIDGetRes() {} func (*InvalidCredentials) personalDataPostRes() {} func (*InvalidCredentials) receiptsGetRes() {} func (*InvalidCredentials) receiptsPostRes() {} func (*InvalidCredentials) receiptsReceiptIDGetRes() {} func (*InvalidCredentials) refundsGetRes() {} func (*InvalidCredentials) refundsPostRes() {} func (*InvalidCredentials) refundsRefundIDGetRes() {} func (*InvalidCredentials) sbpBanksGetRes() {} func (*InvalidCredentials) webhooksGetRes() {} func (*InvalidCredentials) webhooksPostRes() {} func (*InvalidCredentials) webhooksWebhookIDDeleteRes() {} // Код ошибки. type InvalidCredentialsCode string const ( InvalidCredentialsCodeInvalidCredentials InvalidCredentialsCode = "invalid_credentials" ) // AllValues returns all InvalidCredentialsCode values. func (InvalidCredentialsCode) AllValues() []InvalidCredentialsCode { return []InvalidCredentialsCode{ InvalidCredentialsCodeInvalidCredentials, } } // MarshalText implements encoding.TextMarshaler. func (s InvalidCredentialsCode) MarshalText() ([]byte, error) { switch s { case InvalidCredentialsCodeInvalidCredentials: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *InvalidCredentialsCode) UnmarshalText(data []byte) error { switch InvalidCredentialsCode(data) { case InvalidCredentialsCodeInvalidCredentials: *s = InvalidCredentialsCodeInvalidCredentials return nil default: return errors.Errorf("invalid value: %q", data) } } // Тип объекта. type InvalidCredentialsType string const ( InvalidCredentialsTypeError InvalidCredentialsType = "error" ) // AllValues returns all InvalidCredentialsType values. func (InvalidCredentialsType) AllValues() []InvalidCredentialsType { return []InvalidCredentialsType{ InvalidCredentialsTypeError, } } // MarshalText implements encoding.TextMarshaler. func (s InvalidCredentialsType) MarshalText() ([]byte, error) { switch s { case InvalidCredentialsTypeError: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *InvalidCredentialsType) UnmarshalText(data []byte) error { switch InvalidCredentialsType(data) { case InvalidCredentialsTypeError: *s = InvalidCredentialsTypeError return nil default: return errors.Errorf("invalid value: %q", data) } } type InvoiceId string // Данные банковской карты. // Ref: #/components/schemas/InvoicingBankCardData type InvoicingBankCardData struct { First6 string `json:"first6"` Last4 BankCardLast4 `json:"last4"` ExpiryYear BankCardExpiryYear `json:"expiry_year"` ExpiryMonth BankCardExpiryMonth `json:"expiry_month"` CardType BankCardType `json:"card_type"` } // GetFirst6 returns the value of First6. func (s *InvoicingBankCardData) GetFirst6() string { return s.First6 } // GetLast4 returns the value of Last4. func (s *InvoicingBankCardData) GetLast4() BankCardLast4 { return s.Last4 } // GetExpiryYear returns the value of ExpiryYear. func (s *InvoicingBankCardData) GetExpiryYear() BankCardExpiryYear { return s.ExpiryYear } // GetExpiryMonth returns the value of ExpiryMonth. func (s *InvoicingBankCardData) GetExpiryMonth() BankCardExpiryMonth { return s.ExpiryMonth } // GetCardType returns the value of CardType. func (s *InvoicingBankCardData) GetCardType() BankCardType { return s.CardType } // SetFirst6 sets the value of First6. func (s *InvoicingBankCardData) SetFirst6(val string) { s.First6 = val } // SetLast4 sets the value of Last4. func (s *InvoicingBankCardData) SetLast4(val BankCardLast4) { s.Last4 = val } // SetExpiryYear sets the value of ExpiryYear. func (s *InvoicingBankCardData) SetExpiryYear(val BankCardExpiryYear) { s.ExpiryYear = val } // SetExpiryMonth sets the value of ExpiryMonth. func (s *InvoicingBankCardData) SetExpiryMonth(val BankCardExpiryMonth) { s.ExpiryMonth = val } // SetCardType sets the value of CardType. func (s *InvoicingBankCardData) SetCardType(val BankCardType) { s.CardType = val } type Kbk string type LastName string // Язык интерфейса, писем и смс, которые будет видеть или // получать пользователь. Формат соответствует ISO/IEC 15897: // https://en.wikipedia.org/wiki/Locale_(computer_software). Возможные значения: // ru_RU, en_US. Регистр важен. // Ref: #/components/schemas/Locale type Locale string const ( LocaleRuRU Locale = "ru_RU" LocaleEnUS Locale = "en_US" ) // AllValues returns all Locale values. func (Locale) AllValues() []Locale { return []Locale{ LocaleRuRU, LocaleEnUS, } } // MarshalText implements encoding.TextMarshaler. func (s Locale) MarshalText() ([]byte, error) { switch s { case LocaleRuRU: return []byte(s), nil case LocaleEnUS: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *Locale) UnmarshalText(data []byte) error { switch Locale(data) { case LocaleRuRU: *s = LocaleRuRU return nil case LocaleEnUS: *s = LocaleEnUS return nil default: return errors.Errorf("invalid value: %q", data) } } // Код товара (тег в 54 ФЗ — 1163). Обязательный параметр, // если одновременно выполняются эти условия: * вы // используете Чеки от ЮKassa или онлайн-кассу, // обновленную до ФФД 1.2; * товар нужно маркировать: // http://docs.cntd.ru/document/902192509. Должно быть заполнено хотя бы // одно поле. // Ref: #/components/schemas/MarkCodeInfo type MarkCodeInfo struct { // Код товара в том виде, в котором он был прочитан // сканером (тег в 54 ФЗ — 2000). Нужно передавать, если // используете онлайн-кассу Orange Data. Пример: // 010460406000590021N4N57RTCBUZTQ\u001d2403054002410161218\u001d1424010191ffd0\u001g92tIAF/YVpU4roQS3M/m4z78yFq0nc/WsSmLeX6QkF/YVWwy5IMYAeiQ91Xa2m/fFSJcOkb2N+uUUtfr4n0mOX0Q==. MarkCodeRaw OptString `json:"mark_code_raw"` // Нераспознанный код товара (тег в 54 ФЗ — 1300). Unknown OptString `json:"unknown"` // Код товара в формате EAN-8 (тег в 54 ФЗ — 1301). Ean8 OptString `json:"ean_8"` // Код товара в формате EAN-13 (тег в 54 ФЗ — 1302). Ean13 OptString `json:"ean_13"` // Код товара в формате ITF-14 (тег в 54 ФЗ — 1303). Itf14 OptString `json:"itf_14"` // Код товара в формате GS1.0 (тег в 54 ФЗ — 1304). Можно // передавать, если используете онлайн-кассу Orange Data, aQsi, // Кит Инвест, АТОЛ Онлайн. Gs10 OptString `json:"gs_10"` // Код товара в формате GS1.M (тег в 54 ФЗ — 1305). Gs1m OptString `json:"gs_1m"` // Код товара в формате короткого кода маркировки (тег в // 54 ФЗ — 1306). Short OptString `json:"short"` // Контрольно-идентификационный знак мехового изделия // (тег в 54 ФЗ — 1307). Fur OptString `json:"fur"` // Код товара в формате ЕГАИС-2.0 (тег в 54 ФЗ — 1308). Egais20 OptString `json:"egais_20"` // Код товара в формате ЕГАИС-3.0 (тег в 54 ФЗ — 1309). Egais30 OptString `json:"egais_30"` } // GetMarkCodeRaw returns the value of MarkCodeRaw. func (s *MarkCodeInfo) GetMarkCodeRaw() OptString { return s.MarkCodeRaw } // GetUnknown returns the value of Unknown. func (s *MarkCodeInfo) GetUnknown() OptString { return s.Unknown } // GetEan8 returns the value of Ean8. func (s *MarkCodeInfo) GetEan8() OptString { return s.Ean8 } // GetEan13 returns the value of Ean13. func (s *MarkCodeInfo) GetEan13() OptString { return s.Ean13 } // GetItf14 returns the value of Itf14. func (s *MarkCodeInfo) GetItf14() OptString { return s.Itf14 } // GetGs10 returns the value of Gs10. func (s *MarkCodeInfo) GetGs10() OptString { return s.Gs10 } // GetGs1m returns the value of Gs1m. func (s *MarkCodeInfo) GetGs1m() OptString { return s.Gs1m } // GetShort returns the value of Short. func (s *MarkCodeInfo) GetShort() OptString { return s.Short } // GetFur returns the value of Fur. func (s *MarkCodeInfo) GetFur() OptString { return s.Fur } // GetEgais20 returns the value of Egais20. func (s *MarkCodeInfo) GetEgais20() OptString { return s.Egais20 } // GetEgais30 returns the value of Egais30. func (s *MarkCodeInfo) GetEgais30() OptString { return s.Egais30 } // SetMarkCodeRaw sets the value of MarkCodeRaw. func (s *MarkCodeInfo) SetMarkCodeRaw(val OptString) { s.MarkCodeRaw = val } // SetUnknown sets the value of Unknown. func (s *MarkCodeInfo) SetUnknown(val OptString) { s.Unknown = val } // SetEan8 sets the value of Ean8. func (s *MarkCodeInfo) SetEan8(val OptString) { s.Ean8 = val } // SetEan13 sets the value of Ean13. func (s *MarkCodeInfo) SetEan13(val OptString) { s.Ean13 = val } // SetItf14 sets the value of Itf14. func (s *MarkCodeInfo) SetItf14(val OptString) { s.Itf14 = val } // SetGs10 sets the value of Gs10. func (s *MarkCodeInfo) SetGs10(val OptString) { s.Gs10 = val } // SetGs1m sets the value of Gs1m. func (s *MarkCodeInfo) SetGs1m(val OptString) { s.Gs1m = val } // SetShort sets the value of Short. func (s *MarkCodeInfo) SetShort(val OptString) { s.Short = val } // SetFur sets the value of Fur. func (s *MarkCodeInfo) SetFur(val OptString) { s.Fur = val } // SetEgais20 sets the value of Egais20. func (s *MarkCodeInfo) SetEgais20(val OptString) { s.Egais20 = val } // SetEgais30 sets the value of Egais30. func (s *MarkCodeInfo) SetEgais30(val OptString) { s.Egais30 = val } type MarkMode string // Дробное количество маркированного товара (тег в 54 ФЗ // — 1291). Обязательный параметр, если одновременно // выполняются эти условия: * вы используете Чеки от ЮKassa // или онлайн-кассу, обновленную до ФФД 1.2; * товар нужно // маркировать: http://docs.cntd.ru/document/902192509; * поле measure имеет // значение piece. Пример: вы продаете поштучно карандаши. // Они поставляются пачками по 100 штук с одним кодом // маркировки. При продаже одного карандаша нужно в // numerator передать 1, а в denominator — 100. // Ref: #/components/schemas/MarkQuantity type MarkQuantity struct { // Числитель — количество продаваемых товаров из одной // потребительской упаковки (тег в 54 ФЗ — 1293). Не может // превышать denominator. Numerator int `json:"numerator"` // Знаменатель — общее количество товаров в // потребительской упаковке (тег в 54 ФЗ — 1294). Denominator int `json:"denominator"` } // GetNumerator returns the value of Numerator. func (s *MarkQuantity) GetNumerator() int { return s.Numerator } // GetDenominator returns the value of Denominator. func (s *MarkQuantity) GetDenominator() int { return s.Denominator } // SetNumerator sets the value of Numerator. func (s *MarkQuantity) SetNumerator(val int) { s.Numerator = val } // SetDenominator sets the value of Denominator. func (s *MarkQuantity) SetDenominator(val int) { s.Denominator = val } // Store or gateway settings object (Me) contains all the relevant information about the settings of // a store or gateway. // Ref: #/components/schemas/Me type Me struct { AccountID string `json:"account_id"` // Статус магазина или шлюза. Возможные значения: * enabled // — подключен к ЮKassa, может проводить платежи или // выплаты; * disabled — не может проводить платежи или // выплаты (еще не подключен, закрыт или временно не // работает). Status MeStatus `json:"status"` // Это тестовый магазин или шлюз. Test bool `json:"test"` Fiscalization OptFiscalizationData `json:"fiscalization"` // Устаревший параметр, который раньше использовался // для определения настроек отправки чеков в налоговую. // Сохранен для поддержки обратной совместимости, в // новых версиях API может быть удален. Используйте // объект fiscalization, чтобы определить, какие у магазина // настройки отправки чеков. FiscalizationEnabled OptBool `json:"fiscalization_enabled"` // Список способов оплаты: https://yookassa. // ru/developers/payment-acceptance/getting-started/payment-methods#all, доступных // магазину. Присутствует, если вы запрашивали // настройки магазина. PaymentMethods []PaymentMethodType `json:"payment_methods"` Itn OptString `json:"itn"` // Список способов получения выплат, доступных шлюзу. // Возможные значения: * bank_card — выплаты на банковские // карты; * yoo_money — выплаты на кошельки ЮMoney; * sbp — выплаты // через СБП. Присутствует, если вы запрашивали // настройки шлюза. PayoutMethods []PayoutMethodType `json:"payout_methods"` // Название шлюза, которое отображается в личном // кабинете ЮKassa. Присутствует, если вы запрашивали // настройки шлюза. Name OptString `json:"name"` PayoutBalance OptMePayoutBalance `json:"payout_balance"` } // GetAccountID returns the value of AccountID. func (s *Me) GetAccountID() string { return s.AccountID } // GetStatus returns the value of Status. func (s *Me) GetStatus() MeStatus { return s.Status } // GetTest returns the value of Test. func (s *Me) GetTest() bool { return s.Test } // GetFiscalization returns the value of Fiscalization. func (s *Me) GetFiscalization() OptFiscalizationData { return s.Fiscalization } // GetFiscalizationEnabled returns the value of FiscalizationEnabled. func (s *Me) GetFiscalizationEnabled() OptBool { return s.FiscalizationEnabled } // GetPaymentMethods returns the value of PaymentMethods. func (s *Me) GetPaymentMethods() []PaymentMethodType { return s.PaymentMethods } // GetItn returns the value of Itn. func (s *Me) GetItn() OptString { return s.Itn } // GetPayoutMethods returns the value of PayoutMethods. func (s *Me) GetPayoutMethods() []PayoutMethodType { return s.PayoutMethods } // GetName returns the value of Name. func (s *Me) GetName() OptString { return s.Name } // GetPayoutBalance returns the value of PayoutBalance. func (s *Me) GetPayoutBalance() OptMePayoutBalance { return s.PayoutBalance } // SetAccountID sets the value of AccountID. func (s *Me) SetAccountID(val string) { s.AccountID = val } // SetStatus sets the value of Status. func (s *Me) SetStatus(val MeStatus) { s.Status = val } // SetTest sets the value of Test. func (s *Me) SetTest(val bool) { s.Test = val } // SetFiscalization sets the value of Fiscalization. func (s *Me) SetFiscalization(val OptFiscalizationData) { s.Fiscalization = val } // SetFiscalizationEnabled sets the value of FiscalizationEnabled. func (s *Me) SetFiscalizationEnabled(val OptBool) { s.FiscalizationEnabled = val } // SetPaymentMethods sets the value of PaymentMethods. func (s *Me) SetPaymentMethods(val []PaymentMethodType) { s.PaymentMethods = val } // SetItn sets the value of Itn. func (s *Me) SetItn(val OptString) { s.Itn = val } // SetPayoutMethods sets the value of PayoutMethods. func (s *Me) SetPayoutMethods(val []PayoutMethodType) { s.PayoutMethods = val } // SetName sets the value of Name. func (s *Me) SetName(val OptString) { s.Name = val } // SetPayoutBalance sets the value of PayoutBalance. func (s *Me) SetPayoutBalance(val OptMePayoutBalance) { s.PayoutBalance = val } func (*Me) meGetRes() {} // Сумма в выбранной валюте. type MePayoutBalance struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *MePayoutBalance) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *MePayoutBalance) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *MePayoutBalance) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *MePayoutBalance) SetCurrency(val CurrencyCode) { s.Currency = val } // Статус магазина или шлюза. Возможные значения: * enabled // — подключен к ЮKassa, может проводить платежи или // выплаты; * disabled — не может проводить платежи или // выплаты (еще не подключен, закрыт или временно не // работает). type MeStatus string const ( MeStatusEnabled MeStatus = "enabled" MeStatusDisabled MeStatus = "disabled" ) // AllValues returns all MeStatus values. func (MeStatus) AllValues() []MeStatus { return []MeStatus{ MeStatusEnabled, MeStatusDisabled, } } // MarshalText implements encoding.TextMarshaler. func (s MeStatus) MarshalText() ([]byte, error) { switch s { case MeStatusEnabled: return []byte(s), nil case MeStatusDisabled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *MeStatus) UnmarshalText(data []byte) error { switch MeStatus(data) { case MeStatusEnabled: *s = MeStatusEnabled return nil case MeStatusDisabled: *s = MeStatusDisabled return nil default: return errors.Errorf("invalid value: %q", data) } } // Любые дополнительные данные, которые нужны вам для // работы (например, ваш внутренний идентификатор // заказа). Передаются в виде набора пар «ключ-значение» // и возвращаются в ответе от ЮKassa. Ограничения: максимум // 16 ключей, имя ключа не больше 32 символов, значение // ключа не больше 512 символов, тип данных — строка в // формате UTF-8. // Ref: #/components/schemas/Metadata type Metadata map[string]NilString func (s *Metadata) init() Metadata { m := *s if m == nil { m = map[string]NilString{} *s = m } return m } type MetadataInQueryParameter map[string]string func (s *MetadataInQueryParameter) init() MetadataInQueryParameter { m := *s if m == nil { m = map[string]string{} *s = m } return m } type MiddleName string type NextCursor string // NewNilString returns new NilString with value set to v. func NewNilString(v string) NilString { return NilString{ Value: v, } } // NilString is nullable string. type NilString struct { Value string Null bool } // SetTo sets value to v. func (o *NilString) SetTo(v string) { o.Null = false o.Value = v } // IsNull returns true if value is Null. func (o NilString) IsNull() bool { return o.Null } // SetToNull sets value to null. func (o *NilString) SetToNull() { o.Null = true var v string o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o NilString) Get() (v string, ok bool) { if o.Null { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o NilString) Or(d string) string { if v, ok := o.Get(); ok { return v } return d } // Merged schema. // Ref: #/components/schemas/NotFound type NotFound struct { // Тип объекта. Type OptNotFoundType `json:"type"` // Идентификатор ошибки. Используйте его, если возникла // необходимость обратиться в техническую поддержку. ID OptString `json:"id"` // Подробное описание ошибки. Description OptString `json:"description"` // Название параметра, из-за которого произошла ошибка. Parameter OptString `json:"parameter"` // Рекомендуемое количество миллисекунд, спустя // которое следует повторить запрос. RetryAfter OptInt `json:"retry_after"` // Код ошибки. Code OptNotFoundCode `json:"code"` } // GetType returns the value of Type. func (s *NotFound) GetType() OptNotFoundType { return s.Type } // GetID returns the value of ID. func (s *NotFound) GetID() OptString { return s.ID } // GetDescription returns the value of Description. func (s *NotFound) GetDescription() OptString { return s.Description } // GetParameter returns the value of Parameter. func (s *NotFound) GetParameter() OptString { return s.Parameter } // GetRetryAfter returns the value of RetryAfter. func (s *NotFound) GetRetryAfter() OptInt { return s.RetryAfter } // GetCode returns the value of Code. func (s *NotFound) GetCode() OptNotFoundCode { return s.Code } // SetType sets the value of Type. func (s *NotFound) SetType(val OptNotFoundType) { s.Type = val } // SetID sets the value of ID. func (s *NotFound) SetID(val OptString) { s.ID = val } // SetDescription sets the value of Description. func (s *NotFound) SetDescription(val OptString) { s.Description = val } // SetParameter sets the value of Parameter. func (s *NotFound) SetParameter(val OptString) { s.Parameter = val } // SetRetryAfter sets the value of RetryAfter. func (s *NotFound) SetRetryAfter(val OptInt) { s.RetryAfter = val } // SetCode sets the value of Code. func (s *NotFound) SetCode(val OptNotFoundCode) { s.Code = val } func (*NotFound) dealsDealIDGetRes() {} func (*NotFound) dealsGetRes() {} func (*NotFound) paymentMethodsPaymentMethodIDGetRes() {} func (*NotFound) paymentsPaymentIDGetRes() {} func (*NotFound) payoutsGetRes() {} func (*NotFound) payoutsPayoutIDGetRes() {} func (*NotFound) payoutsSearchGetRes() {} func (*NotFound) personalDataPersonalDataIDGetRes() {} func (*NotFound) refundsRefundIDGetRes() {} func (*NotFound) sbpBanksGetRes() {} // Код ошибки. type NotFoundCode string const ( NotFoundCodeNotFound NotFoundCode = "not_found" ) // AllValues returns all NotFoundCode values. func (NotFoundCode) AllValues() []NotFoundCode { return []NotFoundCode{ NotFoundCodeNotFound, } } // MarshalText implements encoding.TextMarshaler. func (s NotFoundCode) MarshalText() ([]byte, error) { switch s { case NotFoundCodeNotFound: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *NotFoundCode) UnmarshalText(data []byte) error { switch NotFoundCode(data) { case NotFoundCodeNotFound: *s = NotFoundCodeNotFound return nil default: return errors.Errorf("invalid value: %q", data) } } // Тип объекта. type NotFoundType string const ( NotFoundTypeError NotFoundType = "error" ) // AllValues returns all NotFoundType values. func (NotFoundType) AllValues() []NotFoundType { return []NotFoundType{ NotFoundTypeError, } } // MarshalText implements encoding.TextMarshaler. func (s NotFoundType) MarshalText() ([]byte, error) { switch s { case NotFoundTypeError: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *NotFoundType) UnmarshalText(data []byte) error { switch NotFoundType(data) { case NotFoundTypeError: *s = NotFoundTypeError return nil default: return errors.Errorf("invalid value: %q", data) } } type NpdIncomeReceiptId string type OAuth2 struct { Token string Scopes []string } // GetToken returns the value of Token. func (s *OAuth2) GetToken() string { return s.Token } // GetScopes returns the value of Scopes. func (s *OAuth2) GetScopes() []string { return s.Scopes } // SetToken sets the value of Token. func (s *OAuth2) SetToken(val string) { s.Token = val } // SetScopes sets the value of Scopes. func (s *OAuth2) SetScopes(val []string) { s.Scopes = val } type Oktmo string // NewOptAccountId returns new OptAccountId with value set to v. func NewOptAccountId(v AccountId) OptAccountId { return OptAccountId{ Value: v, Set: true, } } // OptAccountId is optional AccountId. type OptAccountId struct { Value AccountId Set bool } // IsSet returns true if OptAccountId was set. func (o OptAccountId) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptAccountId) Reset() { var v AccountId o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptAccountId) SetTo(v AccountId) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptAccountId) Get() (v AccountId, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptAccountId) Or(d AccountId) AccountId { if v, ok := o.Get(); ok { return v } return d } // NewOptAuthorizationDetails returns new OptAuthorizationDetails with value set to v. func NewOptAuthorizationDetails(v AuthorizationDetails) OptAuthorizationDetails { return OptAuthorizationDetails{ Value: v, Set: true, } } // OptAuthorizationDetails is optional AuthorizationDetails. type OptAuthorizationDetails struct { Value AuthorizationDetails Set bool } // IsSet returns true if OptAuthorizationDetails was set. func (o OptAuthorizationDetails) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptAuthorizationDetails) Reset() { var v AuthorizationDetails o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptAuthorizationDetails) SetTo(v AuthorizationDetails) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptAuthorizationDetails) Get() (v AuthorizationDetails, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptAuthorizationDetails) Or(d AuthorizationDetails) AuthorizationDetails { if v, ok := o.Get(); ok { return v } return d } // NewOptB2bSberbankPayerBankDetails returns new OptB2bSberbankPayerBankDetails with value set to v. func NewOptB2bSberbankPayerBankDetails(v B2bSberbankPayerBankDetails) OptB2bSberbankPayerBankDetails { return OptB2bSberbankPayerBankDetails{ Value: v, Set: true, } } // OptB2bSberbankPayerBankDetails is optional B2bSberbankPayerBankDetails. type OptB2bSberbankPayerBankDetails struct { Value B2bSberbankPayerBankDetails Set bool } // IsSet returns true if OptB2bSberbankPayerBankDetails was set. func (o OptB2bSberbankPayerBankDetails) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptB2bSberbankPayerBankDetails) Reset() { var v B2bSberbankPayerBankDetails o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptB2bSberbankPayerBankDetails) SetTo(v B2bSberbankPayerBankDetails) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptB2bSberbankPayerBankDetails) Get() (v B2bSberbankPayerBankDetails, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptB2bSberbankPayerBankDetails) Or(d B2bSberbankPayerBankDetails) B2bSberbankPayerBankDetails { if v, ok := o.Get(); ok { return v } return d } // NewOptBadRequestCode returns new OptBadRequestCode with value set to v. func NewOptBadRequestCode(v BadRequestCode) OptBadRequestCode { return OptBadRequestCode{ Value: v, Set: true, } } // OptBadRequestCode is optional BadRequestCode. type OptBadRequestCode struct { Value BadRequestCode Set bool } // IsSet returns true if OptBadRequestCode was set. func (o OptBadRequestCode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptBadRequestCode) Reset() { var v BadRequestCode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptBadRequestCode) SetTo(v BadRequestCode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptBadRequestCode) Get() (v BadRequestCode, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptBadRequestCode) Or(d BadRequestCode) BadRequestCode { if v, ok := o.Get(); ok { return v } return d } // NewOptBadRequestType returns new OptBadRequestType with value set to v. func NewOptBadRequestType(v BadRequestType) OptBadRequestType { return OptBadRequestType{ Value: v, Set: true, } } // OptBadRequestType is optional BadRequestType. type OptBadRequestType struct { Value BadRequestType Set bool } // IsSet returns true if OptBadRequestType was set. func (o OptBadRequestType) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptBadRequestType) Reset() { var v BadRequestType o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptBadRequestType) SetTo(v BadRequestType) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptBadRequestType) Get() (v BadRequestType, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptBadRequestType) Or(d BadRequestType) BadRequestType { if v, ok := o.Get(); ok { return v } return d } // NewOptBankCardData returns new OptBankCardData with value set to v. func NewOptBankCardData(v BankCardData) OptBankCardData { return OptBankCardData{ Value: v, Set: true, } } // OptBankCardData is optional BankCardData. type OptBankCardData struct { Value BankCardData Set bool } // IsSet returns true if OptBankCardData was set. func (o OptBankCardData) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptBankCardData) Reset() { var v BankCardData o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptBankCardData) SetTo(v BankCardData) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptBankCardData) Get() (v BankCardData, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptBankCardData) Or(d BankCardData) BankCardData { if v, ok := o.Get(); ok { return v } return d } // NewOptBankCardDataSource returns new OptBankCardDataSource with value set to v. func NewOptBankCardDataSource(v BankCardDataSource) OptBankCardDataSource { return OptBankCardDataSource{ Value: v, Set: true, } } // OptBankCardDataSource is optional BankCardDataSource. type OptBankCardDataSource struct { Value BankCardDataSource Set bool } // IsSet returns true if OptBankCardDataSource was set. func (o OptBankCardDataSource) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptBankCardDataSource) Reset() { var v BankCardDataSource o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptBankCardDataSource) SetTo(v BankCardDataSource) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptBankCardDataSource) Get() (v BankCardDataSource, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptBankCardDataSource) Or(d BankCardDataSource) BankCardDataSource { if v, ok := o.Get(); ok { return v } return d } // NewOptBankCardFirst6 returns new OptBankCardFirst6 with value set to v. func NewOptBankCardFirst6(v BankCardFirst6) OptBankCardFirst6 { return OptBankCardFirst6{ Value: v, Set: true, } } // OptBankCardFirst6 is optional BankCardFirst6. type OptBankCardFirst6 struct { Value BankCardFirst6 Set bool } // IsSet returns true if OptBankCardFirst6 was set. func (o OptBankCardFirst6) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptBankCardFirst6) Reset() { var v BankCardFirst6 o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptBankCardFirst6) SetTo(v BankCardFirst6) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptBankCardFirst6) Get() (v BankCardFirst6, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptBankCardFirst6) Or(d BankCardFirst6) BankCardFirst6 { if v, ok := o.Get(); ok { return v } return d } // NewOptBankCardHolderName returns new OptBankCardHolderName with value set to v. func NewOptBankCardHolderName(v BankCardHolderName) OptBankCardHolderName { return OptBankCardHolderName{ Value: v, Set: true, } } // OptBankCardHolderName is optional BankCardHolderName. type OptBankCardHolderName struct { Value BankCardHolderName Set bool } // IsSet returns true if OptBankCardHolderName was set. func (o OptBankCardHolderName) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptBankCardHolderName) Reset() { var v BankCardHolderName o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptBankCardHolderName) SetTo(v BankCardHolderName) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptBankCardHolderName) Get() (v BankCardHolderName, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptBankCardHolderName) Or(d BankCardHolderName) BankCardHolderName { if v, ok := o.Get(); ok { return v } return d } // NewOptBankCardIssuerCountry returns new OptBankCardIssuerCountry with value set to v. func NewOptBankCardIssuerCountry(v BankCardIssuerCountry) OptBankCardIssuerCountry { return OptBankCardIssuerCountry{ Value: v, Set: true, } } // OptBankCardIssuerCountry is optional BankCardIssuerCountry. type OptBankCardIssuerCountry struct { Value BankCardIssuerCountry Set bool } // IsSet returns true if OptBankCardIssuerCountry was set. func (o OptBankCardIssuerCountry) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptBankCardIssuerCountry) Reset() { var v BankCardIssuerCountry o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptBankCardIssuerCountry) SetTo(v BankCardIssuerCountry) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptBankCardIssuerCountry) Get() (v BankCardIssuerCountry, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptBankCardIssuerCountry) Or(d BankCardIssuerCountry) BankCardIssuerCountry { if v, ok := o.Get(); ok { return v } return d } // NewOptBankCardIssuerName returns new OptBankCardIssuerName with value set to v. func NewOptBankCardIssuerName(v BankCardIssuerName) OptBankCardIssuerName { return OptBankCardIssuerName{ Value: v, Set: true, } } // OptBankCardIssuerName is optional BankCardIssuerName. type OptBankCardIssuerName struct { Value BankCardIssuerName Set bool } // IsSet returns true if OptBankCardIssuerName was set. func (o OptBankCardIssuerName) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptBankCardIssuerName) Reset() { var v BankCardIssuerName o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptBankCardIssuerName) SetTo(v BankCardIssuerName) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptBankCardIssuerName) Get() (v BankCardIssuerName, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptBankCardIssuerName) Or(d BankCardIssuerName) BankCardIssuerName { if v, ok := o.Get(); ok { return v } return d } // NewOptBankCardProduct returns new OptBankCardProduct with value set to v. func NewOptBankCardProduct(v BankCardProduct) OptBankCardProduct { return OptBankCardProduct{ Value: v, Set: true, } } // OptBankCardProduct is optional BankCardProduct. type OptBankCardProduct struct { Value BankCardProduct Set bool } // IsSet returns true if OptBankCardProduct was set. func (o OptBankCardProduct) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptBankCardProduct) Reset() { var v BankCardProduct o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptBankCardProduct) SetTo(v BankCardProduct) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptBankCardProduct) Get() (v BankCardProduct, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptBankCardProduct) Or(d BankCardProduct) BankCardProduct { if v, ok := o.Get(); ok { return v } return d } // NewOptBool returns new OptBool with value set to v. func NewOptBool(v bool) OptBool { return OptBool{ Value: v, Set: true, } } // OptBool is optional bool. type OptBool struct { Value bool Set bool } // IsSet returns true if OptBool was set. func (o OptBool) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptBool) Reset() { var v bool o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptBool) SetTo(v bool) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptBool) Get() (v bool, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptBool) Or(d bool) bool { if v, ok := o.Get(); ok { return v } return d } // NewOptCapture returns new OptCapture with value set to v. func NewOptCapture(v Capture) OptCapture { return OptCapture{ Value: v, Set: true, } } // OptCapture is optional Capture. type OptCapture struct { Value Capture Set bool } // IsSet returns true if OptCapture was set. func (o OptCapture) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptCapture) Reset() { var v Capture o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptCapture) SetTo(v Capture) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptCapture) Get() (v Capture, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptCapture) Or(d Capture) Capture { if v, ok := o.Get(); ok { return v } return d } // NewOptCardRequestData returns new OptCardRequestData with value set to v. func NewOptCardRequestData(v CardRequestData) OptCardRequestData { return OptCardRequestData{ Value: v, Set: true, } } // OptCardRequestData is optional CardRequestData. type OptCardRequestData struct { Value CardRequestData Set bool } // IsSet returns true if OptCardRequestData was set. func (o OptCardRequestData) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptCardRequestData) Reset() { var v CardRequestData o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptCardRequestData) SetTo(v CardRequestData) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptCardRequestData) Get() (v CardRequestData, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptCardRequestData) Or(d CardRequestData) CardRequestData { if v, ok := o.Get(); ok { return v } return d } // NewOptClientIp returns new OptClientIp with value set to v. func NewOptClientIp(v ClientIp) OptClientIp { return OptClientIp{ Value: v, Set: true, } } // OptClientIp is optional ClientIp. type OptClientIp struct { Value ClientIp Set bool } // IsSet returns true if OptClientIp was set. func (o OptClientIp) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptClientIp) Reset() { var v ClientIp o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptClientIp) SetTo(v ClientIp) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptClientIp) Get() (v ClientIp, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptClientIp) Or(d ClientIp) ClientIp { if v, ok := o.Get(); ok { return v } return d } // NewOptDateTime returns new OptDateTime with value set to v. func NewOptDateTime(v time.Time) OptDateTime { return OptDateTime{ Value: v, Set: true, } } // OptDateTime is optional time.Time. type OptDateTime struct { Value time.Time Set bool } // IsSet returns true if OptDateTime was set. func (o OptDateTime) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptDateTime) Reset() { var v time.Time o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptDateTime) SetTo(v time.Time) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptDateTime) Get() (v time.Time, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptDateTime) Or(d time.Time) time.Time { if v, ok := o.Get(); ok { return v } return d } // NewOptDealStatus returns new OptDealStatus with value set to v. func NewOptDealStatus(v DealStatus) OptDealStatus { return OptDealStatus{ Value: v, Set: true, } } // OptDealStatus is optional DealStatus. type OptDealStatus struct { Value DealStatus Set bool } // IsSet returns true if OptDealStatus was set. func (o OptDealStatus) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptDealStatus) Reset() { var v DealStatus o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptDealStatus) SetTo(v DealStatus) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptDealStatus) Get() (v DealStatus, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptDealStatus) Or(d DealStatus) DealStatus { if v, ok := o.Get(); ok { return v } return d } // NewOptElectronicCertificateArticleCode returns new OptElectronicCertificateArticleCode with value set to v. func NewOptElectronicCertificateArticleCode(v ElectronicCertificateArticleCode) OptElectronicCertificateArticleCode { return OptElectronicCertificateArticleCode{ Value: v, Set: true, } } // OptElectronicCertificateArticleCode is optional ElectronicCertificateArticleCode. type OptElectronicCertificateArticleCode struct { Value ElectronicCertificateArticleCode Set bool } // IsSet returns true if OptElectronicCertificateArticleCode was set. func (o OptElectronicCertificateArticleCode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptElectronicCertificateArticleCode) Reset() { var v ElectronicCertificateArticleCode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptElectronicCertificateArticleCode) SetTo(v ElectronicCertificateArticleCode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptElectronicCertificateArticleCode) Get() (v ElectronicCertificateArticleCode, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptElectronicCertificateArticleCode) Or(d ElectronicCertificateArticleCode) ElectronicCertificateArticleCode { if v, ok := o.Get(); ok { return v } return d } // NewOptElectronicCertificatePayment returns new OptElectronicCertificatePayment with value set to v. func NewOptElectronicCertificatePayment(v ElectronicCertificatePayment) OptElectronicCertificatePayment { return OptElectronicCertificatePayment{ Value: v, Set: true, } } // OptElectronicCertificatePayment is optional ElectronicCertificatePayment. type OptElectronicCertificatePayment struct { Value ElectronicCertificatePayment Set bool } // IsSet returns true if OptElectronicCertificatePayment was set. func (o OptElectronicCertificatePayment) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptElectronicCertificatePayment) Reset() { var v ElectronicCertificatePayment o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptElectronicCertificatePayment) SetTo(v ElectronicCertificatePayment) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptElectronicCertificatePayment) Get() (v ElectronicCertificatePayment, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptElectronicCertificatePayment) Or(d ElectronicCertificatePayment) ElectronicCertificatePayment { if v, ok := o.Get(); ok { return v } return d } // NewOptElectronicCertificatePaymentData returns new OptElectronicCertificatePaymentData with value set to v. func NewOptElectronicCertificatePaymentData(v ElectronicCertificatePaymentData) OptElectronicCertificatePaymentData { return OptElectronicCertificatePaymentData{ Value: v, Set: true, } } // OptElectronicCertificatePaymentData is optional ElectronicCertificatePaymentData. type OptElectronicCertificatePaymentData struct { Value ElectronicCertificatePaymentData Set bool } // IsSet returns true if OptElectronicCertificatePaymentData was set. func (o OptElectronicCertificatePaymentData) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptElectronicCertificatePaymentData) Reset() { var v ElectronicCertificatePaymentData o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptElectronicCertificatePaymentData) SetTo(v ElectronicCertificatePaymentData) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptElectronicCertificatePaymentData) Get() (v ElectronicCertificatePaymentData, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptElectronicCertificatePaymentData) Or(d ElectronicCertificatePaymentData) ElectronicCertificatePaymentData { if v, ok := o.Get(); ok { return v } return d } // NewOptElectronicCertificateRefundDataRequest returns new OptElectronicCertificateRefundDataRequest with value set to v. func NewOptElectronicCertificateRefundDataRequest(v ElectronicCertificateRefundDataRequest) OptElectronicCertificateRefundDataRequest { return OptElectronicCertificateRefundDataRequest{ Value: v, Set: true, } } // OptElectronicCertificateRefundDataRequest is optional ElectronicCertificateRefundDataRequest. type OptElectronicCertificateRefundDataRequest struct { Value ElectronicCertificateRefundDataRequest Set bool } // IsSet returns true if OptElectronicCertificateRefundDataRequest was set. func (o OptElectronicCertificateRefundDataRequest) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptElectronicCertificateRefundDataRequest) Reset() { var v ElectronicCertificateRefundDataRequest o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptElectronicCertificateRefundDataRequest) SetTo(v ElectronicCertificateRefundDataRequest) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptElectronicCertificateRefundDataRequest) Get() (v ElectronicCertificateRefundDataRequest, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptElectronicCertificateRefundDataRequest) Or(d ElectronicCertificateRefundDataRequest) ElectronicCertificateRefundDataRequest { if v, ok := o.Get(); ok { return v } return d } // NewOptElectronicCertificateRefundDataResponse returns new OptElectronicCertificateRefundDataResponse with value set to v. func NewOptElectronicCertificateRefundDataResponse(v ElectronicCertificateRefundDataResponse) OptElectronicCertificateRefundDataResponse { return OptElectronicCertificateRefundDataResponse{ Value: v, Set: true, } } // OptElectronicCertificateRefundDataResponse is optional ElectronicCertificateRefundDataResponse. type OptElectronicCertificateRefundDataResponse struct { Value ElectronicCertificateRefundDataResponse Set bool } // IsSet returns true if OptElectronicCertificateRefundDataResponse was set. func (o OptElectronicCertificateRefundDataResponse) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptElectronicCertificateRefundDataResponse) Reset() { var v ElectronicCertificateRefundDataResponse o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptElectronicCertificateRefundDataResponse) SetTo(v ElectronicCertificateRefundDataResponse) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptElectronicCertificateRefundDataResponse) Get() (v ElectronicCertificateRefundDataResponse, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptElectronicCertificateRefundDataResponse) Or(d ElectronicCertificateRefundDataResponse) ElectronicCertificateRefundDataResponse { if v, ok := o.Get(); ok { return v } return d } // NewOptEnforce returns new OptEnforce with value set to v. func NewOptEnforce(v Enforce) OptEnforce { return OptEnforce{ Value: v, Set: true, } } // OptEnforce is optional Enforce. type OptEnforce struct { Value Enforce Set bool } // IsSet returns true if OptEnforce was set. func (o OptEnforce) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptEnforce) Reset() { var v Enforce o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptEnforce) SetTo(v Enforce) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptEnforce) Get() (v Enforce, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptEnforce) Or(d Enforce) Enforce { if v, ok := o.Get(); ok { return v } return d } // NewOptFiscalizationData returns new OptFiscalizationData with value set to v. func NewOptFiscalizationData(v FiscalizationData) OptFiscalizationData { return OptFiscalizationData{ Value: v, Set: true, } } // OptFiscalizationData is optional FiscalizationData. type OptFiscalizationData struct { Value FiscalizationData Set bool } // IsSet returns true if OptFiscalizationData was set. func (o OptFiscalizationData) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptFiscalizationData) Reset() { var v FiscalizationData o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptFiscalizationData) SetTo(v FiscalizationData) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptFiscalizationData) Get() (v FiscalizationData, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptFiscalizationData) Or(d FiscalizationData) FiscalizationData { if v, ok := o.Get(); ok { return v } return d } // NewOptForbiddenCode returns new OptForbiddenCode with value set to v. func NewOptForbiddenCode(v ForbiddenCode) OptForbiddenCode { return OptForbiddenCode{ Value: v, Set: true, } } // OptForbiddenCode is optional ForbiddenCode. type OptForbiddenCode struct { Value ForbiddenCode Set bool } // IsSet returns true if OptForbiddenCode was set. func (o OptForbiddenCode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptForbiddenCode) Reset() { var v ForbiddenCode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptForbiddenCode) SetTo(v ForbiddenCode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptForbiddenCode) Get() (v ForbiddenCode, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptForbiddenCode) Or(d ForbiddenCode) ForbiddenCode { if v, ok := o.Get(); ok { return v } return d } // NewOptForbiddenType returns new OptForbiddenType with value set to v. func NewOptForbiddenType(v ForbiddenType) OptForbiddenType { return OptForbiddenType{ Value: v, Set: true, } } // OptForbiddenType is optional ForbiddenType. type OptForbiddenType struct { Value ForbiddenType Set bool } // IsSet returns true if OptForbiddenType was set. func (o OptForbiddenType) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptForbiddenType) Reset() { var v ForbiddenType o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptForbiddenType) SetTo(v ForbiddenType) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptForbiddenType) Get() (v ForbiddenType, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptForbiddenType) Or(d ForbiddenType) ForbiddenType { if v, ok := o.Get(); ok { return v } return d } // NewOptGatewayId returns new OptGatewayId with value set to v. func NewOptGatewayId(v GatewayId) OptGatewayId { return OptGatewayId{ Value: v, Set: true, } } // OptGatewayId is optional GatewayId. type OptGatewayId struct { Value GatewayId Set bool } // IsSet returns true if OptGatewayId was set. func (o OptGatewayId) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptGatewayId) Reset() { var v GatewayId o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptGatewayId) SetTo(v GatewayId) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptGatewayId) Get() (v GatewayId, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptGatewayId) Or(d GatewayId) GatewayId { if v, ok := o.Get(); ok { return v } return d } // NewOptIncomeReceipt returns new OptIncomeReceipt with value set to v. func NewOptIncomeReceipt(v IncomeReceipt) OptIncomeReceipt { return OptIncomeReceipt{ Value: v, Set: true, } } // OptIncomeReceipt is optional IncomeReceipt. type OptIncomeReceipt struct { Value IncomeReceipt Set bool } // IsSet returns true if OptIncomeReceipt was set. func (o OptIncomeReceipt) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptIncomeReceipt) Reset() { var v IncomeReceipt o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptIncomeReceipt) SetTo(v IncomeReceipt) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptIncomeReceipt) Get() (v IncomeReceipt, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptIncomeReceipt) Or(d IncomeReceipt) IncomeReceipt { if v, ok := o.Get(); ok { return v } return d } // NewOptIncomeReceiptAmount returns new OptIncomeReceiptAmount with value set to v. func NewOptIncomeReceiptAmount(v IncomeReceiptAmount) OptIncomeReceiptAmount { return OptIncomeReceiptAmount{ Value: v, Set: true, } } // OptIncomeReceiptAmount is optional IncomeReceiptAmount. type OptIncomeReceiptAmount struct { Value IncomeReceiptAmount Set bool } // IsSet returns true if OptIncomeReceiptAmount was set. func (o OptIncomeReceiptAmount) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptIncomeReceiptAmount) Reset() { var v IncomeReceiptAmount o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptIncomeReceiptAmount) SetTo(v IncomeReceiptAmount) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptIncomeReceiptAmount) Get() (v IncomeReceiptAmount, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptIncomeReceiptAmount) Or(d IncomeReceiptAmount) IncomeReceiptAmount { if v, ok := o.Get(); ok { return v } return d } // NewOptIncomeReceiptUrl returns new OptIncomeReceiptUrl with value set to v. func NewOptIncomeReceiptUrl(v IncomeReceiptUrl) OptIncomeReceiptUrl { return OptIncomeReceiptUrl{ Value: v, Set: true, } } // OptIncomeReceiptUrl is optional IncomeReceiptUrl. type OptIncomeReceiptUrl struct { Value IncomeReceiptUrl Set bool } // IsSet returns true if OptIncomeReceiptUrl was set. func (o OptIncomeReceiptUrl) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptIncomeReceiptUrl) Reset() { var v IncomeReceiptUrl o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptIncomeReceiptUrl) SetTo(v IncomeReceiptUrl) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptIncomeReceiptUrl) Get() (v IncomeReceiptUrl, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptIncomeReceiptUrl) Or(d IncomeReceiptUrl) IncomeReceiptUrl { if v, ok := o.Get(); ok { return v } return d } // NewOptInt returns new OptInt with value set to v. func NewOptInt(v int) OptInt { return OptInt{ Value: v, Set: true, } } // OptInt is optional int. type OptInt struct { Value int Set bool } // IsSet returns true if OptInt was set. func (o OptInt) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptInt) Reset() { var v int o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptInt) SetTo(v int) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptInt) Get() (v int, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptInt) Or(d int) int { if v, ok := o.Get(); ok { return v } return d } // NewOptInt32 returns new OptInt32 with value set to v. func NewOptInt32(v int32) OptInt32 { return OptInt32{ Value: v, Set: true, } } // OptInt32 is optional int32. type OptInt32 struct { Value int32 Set bool } // IsSet returns true if OptInt32 was set. func (o OptInt32) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptInt32) Reset() { var v int32 o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptInt32) SetTo(v int32) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptInt32) Get() (v int32, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptInt32) Or(d int32) int32 { if v, ok := o.Get(); ok { return v } return d } // NewOptInvalidCredentialsCode returns new OptInvalidCredentialsCode with value set to v. func NewOptInvalidCredentialsCode(v InvalidCredentialsCode) OptInvalidCredentialsCode { return OptInvalidCredentialsCode{ Value: v, Set: true, } } // OptInvalidCredentialsCode is optional InvalidCredentialsCode. type OptInvalidCredentialsCode struct { Value InvalidCredentialsCode Set bool } // IsSet returns true if OptInvalidCredentialsCode was set. func (o OptInvalidCredentialsCode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptInvalidCredentialsCode) Reset() { var v InvalidCredentialsCode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptInvalidCredentialsCode) SetTo(v InvalidCredentialsCode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptInvalidCredentialsCode) Get() (v InvalidCredentialsCode, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptInvalidCredentialsCode) Or(d InvalidCredentialsCode) InvalidCredentialsCode { if v, ok := o.Get(); ok { return v } return d } // NewOptInvalidCredentialsType returns new OptInvalidCredentialsType with value set to v. func NewOptInvalidCredentialsType(v InvalidCredentialsType) OptInvalidCredentialsType { return OptInvalidCredentialsType{ Value: v, Set: true, } } // OptInvalidCredentialsType is optional InvalidCredentialsType. type OptInvalidCredentialsType struct { Value InvalidCredentialsType Set bool } // IsSet returns true if OptInvalidCredentialsType was set. func (o OptInvalidCredentialsType) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptInvalidCredentialsType) Reset() { var v InvalidCredentialsType o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptInvalidCredentialsType) SetTo(v InvalidCredentialsType) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptInvalidCredentialsType) Get() (v InvalidCredentialsType, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptInvalidCredentialsType) Or(d InvalidCredentialsType) InvalidCredentialsType { if v, ok := o.Get(); ok { return v } return d } // NewOptInvoiceId returns new OptInvoiceId with value set to v. func NewOptInvoiceId(v InvoiceId) OptInvoiceId { return OptInvoiceId{ Value: v, Set: true, } } // OptInvoiceId is optional InvoiceId. type OptInvoiceId struct { Value InvoiceId Set bool } // IsSet returns true if OptInvoiceId was set. func (o OptInvoiceId) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptInvoiceId) Reset() { var v InvoiceId o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptInvoiceId) SetTo(v InvoiceId) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptInvoiceId) Get() (v InvoiceId, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptInvoiceId) Or(d InvoiceId) InvoiceId { if v, ok := o.Get(); ok { return v } return d } // NewOptInvoicingBankCardData returns new OptInvoicingBankCardData with value set to v. func NewOptInvoicingBankCardData(v InvoicingBankCardData) OptInvoicingBankCardData { return OptInvoicingBankCardData{ Value: v, Set: true, } } // OptInvoicingBankCardData is optional InvoicingBankCardData. type OptInvoicingBankCardData struct { Value InvoicingBankCardData Set bool } // IsSet returns true if OptInvoicingBankCardData was set. func (o OptInvoicingBankCardData) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptInvoicingBankCardData) Reset() { var v InvoicingBankCardData o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptInvoicingBankCardData) SetTo(v InvoicingBankCardData) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptInvoicingBankCardData) Get() (v InvoicingBankCardData, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptInvoicingBankCardData) Or(d InvoicingBankCardData) InvoicingBankCardData { if v, ok := o.Get(); ok { return v } return d } // NewOptKbk returns new OptKbk with value set to v. func NewOptKbk(v Kbk) OptKbk { return OptKbk{ Value: v, Set: true, } } // OptKbk is optional Kbk. type OptKbk struct { Value Kbk Set bool } // IsSet returns true if OptKbk was set. func (o OptKbk) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptKbk) Reset() { var v Kbk o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptKbk) SetTo(v Kbk) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptKbk) Get() (v Kbk, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptKbk) Or(d Kbk) Kbk { if v, ok := o.Get(); ok { return v } return d } // NewOptLocale returns new OptLocale with value set to v. func NewOptLocale(v Locale) OptLocale { return OptLocale{ Value: v, Set: true, } } // OptLocale is optional Locale. type OptLocale struct { Value Locale Set bool } // IsSet returns true if OptLocale was set. func (o OptLocale) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptLocale) Reset() { var v Locale o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptLocale) SetTo(v Locale) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptLocale) Get() (v Locale, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptLocale) Or(d Locale) Locale { if v, ok := o.Get(); ok { return v } return d } // NewOptMarkCodeInfo returns new OptMarkCodeInfo with value set to v. func NewOptMarkCodeInfo(v MarkCodeInfo) OptMarkCodeInfo { return OptMarkCodeInfo{ Value: v, Set: true, } } // OptMarkCodeInfo is optional MarkCodeInfo. type OptMarkCodeInfo struct { Value MarkCodeInfo Set bool } // IsSet returns true if OptMarkCodeInfo was set. func (o OptMarkCodeInfo) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptMarkCodeInfo) Reset() { var v MarkCodeInfo o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptMarkCodeInfo) SetTo(v MarkCodeInfo) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptMarkCodeInfo) Get() (v MarkCodeInfo, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptMarkCodeInfo) Or(d MarkCodeInfo) MarkCodeInfo { if v, ok := o.Get(); ok { return v } return d } // NewOptMarkMode returns new OptMarkMode with value set to v. func NewOptMarkMode(v MarkMode) OptMarkMode { return OptMarkMode{ Value: v, Set: true, } } // OptMarkMode is optional MarkMode. type OptMarkMode struct { Value MarkMode Set bool } // IsSet returns true if OptMarkMode was set. func (o OptMarkMode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptMarkMode) Reset() { var v MarkMode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptMarkMode) SetTo(v MarkMode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptMarkMode) Get() (v MarkMode, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptMarkMode) Or(d MarkMode) MarkMode { if v, ok := o.Get(); ok { return v } return d } // NewOptMarkQuantity returns new OptMarkQuantity with value set to v. func NewOptMarkQuantity(v MarkQuantity) OptMarkQuantity { return OptMarkQuantity{ Value: v, Set: true, } } // OptMarkQuantity is optional MarkQuantity. type OptMarkQuantity struct { Value MarkQuantity Set bool } // IsSet returns true if OptMarkQuantity was set. func (o OptMarkQuantity) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptMarkQuantity) Reset() { var v MarkQuantity o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptMarkQuantity) SetTo(v MarkQuantity) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptMarkQuantity) Get() (v MarkQuantity, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptMarkQuantity) Or(d MarkQuantity) MarkQuantity { if v, ok := o.Get(); ok { return v } return d } // NewOptMePayoutBalance returns new OptMePayoutBalance with value set to v. func NewOptMePayoutBalance(v MePayoutBalance) OptMePayoutBalance { return OptMePayoutBalance{ Value: v, Set: true, } } // OptMePayoutBalance is optional MePayoutBalance. type OptMePayoutBalance struct { Value MePayoutBalance Set bool } // IsSet returns true if OptMePayoutBalance was set. func (o OptMePayoutBalance) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptMePayoutBalance) Reset() { var v MePayoutBalance o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptMePayoutBalance) SetTo(v MePayoutBalance) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptMePayoutBalance) Get() (v MePayoutBalance, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptMePayoutBalance) Or(d MePayoutBalance) MePayoutBalance { if v, ok := o.Get(); ok { return v } return d } // NewOptMetadata returns new OptMetadata with value set to v. func NewOptMetadata(v Metadata) OptMetadata { return OptMetadata{ Value: v, Set: true, } } // OptMetadata is optional Metadata. type OptMetadata struct { Value Metadata Set bool } // IsSet returns true if OptMetadata was set. func (o OptMetadata) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptMetadata) Reset() { var v Metadata o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptMetadata) SetTo(v Metadata) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptMetadata) Get() (v Metadata, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptMetadata) Or(d Metadata) Metadata { if v, ok := o.Get(); ok { return v } return d } // NewOptMetadataInQueryParameter returns new OptMetadataInQueryParameter with value set to v. func NewOptMetadataInQueryParameter(v MetadataInQueryParameter) OptMetadataInQueryParameter { return OptMetadataInQueryParameter{ Value: v, Set: true, } } // OptMetadataInQueryParameter is optional MetadataInQueryParameter. type OptMetadataInQueryParameter struct { Value MetadataInQueryParameter Set bool } // IsSet returns true if OptMetadataInQueryParameter was set. func (o OptMetadataInQueryParameter) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptMetadataInQueryParameter) Reset() { var v MetadataInQueryParameter o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptMetadataInQueryParameter) SetTo(v MetadataInQueryParameter) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptMetadataInQueryParameter) Get() (v MetadataInQueryParameter, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptMetadataInQueryParameter) Or(d MetadataInQueryParameter) MetadataInQueryParameter { if v, ok := o.Get(); ok { return v } return d } // NewOptMiddleName returns new OptMiddleName with value set to v. func NewOptMiddleName(v MiddleName) OptMiddleName { return OptMiddleName{ Value: v, Set: true, } } // OptMiddleName is optional MiddleName. type OptMiddleName struct { Value MiddleName Set bool } // IsSet returns true if OptMiddleName was set. func (o OptMiddleName) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptMiddleName) Reset() { var v MiddleName o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptMiddleName) SetTo(v MiddleName) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptMiddleName) Get() (v MiddleName, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptMiddleName) Or(d MiddleName) MiddleName { if v, ok := o.Get(); ok { return v } return d } // NewOptNextCursor returns new OptNextCursor with value set to v. func NewOptNextCursor(v NextCursor) OptNextCursor { return OptNextCursor{ Value: v, Set: true, } } // OptNextCursor is optional NextCursor. type OptNextCursor struct { Value NextCursor Set bool } // IsSet returns true if OptNextCursor was set. func (o OptNextCursor) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptNextCursor) Reset() { var v NextCursor o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptNextCursor) SetTo(v NextCursor) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptNextCursor) Get() (v NextCursor, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptNextCursor) Or(d NextCursor) NextCursor { if v, ok := o.Get(); ok { return v } return d } // NewOptNotFoundCode returns new OptNotFoundCode with value set to v. func NewOptNotFoundCode(v NotFoundCode) OptNotFoundCode { return OptNotFoundCode{ Value: v, Set: true, } } // OptNotFoundCode is optional NotFoundCode. type OptNotFoundCode struct { Value NotFoundCode Set bool } // IsSet returns true if OptNotFoundCode was set. func (o OptNotFoundCode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptNotFoundCode) Reset() { var v NotFoundCode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptNotFoundCode) SetTo(v NotFoundCode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptNotFoundCode) Get() (v NotFoundCode, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptNotFoundCode) Or(d NotFoundCode) NotFoundCode { if v, ok := o.Get(); ok { return v } return d } // NewOptNotFoundType returns new OptNotFoundType with value set to v. func NewOptNotFoundType(v NotFoundType) OptNotFoundType { return OptNotFoundType{ Value: v, Set: true, } } // OptNotFoundType is optional NotFoundType. type OptNotFoundType struct { Value NotFoundType Set bool } // IsSet returns true if OptNotFoundType was set. func (o OptNotFoundType) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptNotFoundType) Reset() { var v NotFoundType o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptNotFoundType) SetTo(v NotFoundType) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptNotFoundType) Get() (v NotFoundType, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptNotFoundType) Or(d NotFoundType) NotFoundType { if v, ok := o.Get(); ok { return v } return d } // NewOptNpdIncomeReceiptId returns new OptNpdIncomeReceiptId with value set to v. func NewOptNpdIncomeReceiptId(v NpdIncomeReceiptId) OptNpdIncomeReceiptId { return OptNpdIncomeReceiptId{ Value: v, Set: true, } } // OptNpdIncomeReceiptId is optional NpdIncomeReceiptId. type OptNpdIncomeReceiptId struct { Value NpdIncomeReceiptId Set bool } // IsSet returns true if OptNpdIncomeReceiptId was set. func (o OptNpdIncomeReceiptId) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptNpdIncomeReceiptId) Reset() { var v NpdIncomeReceiptId o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptNpdIncomeReceiptId) SetTo(v NpdIncomeReceiptId) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptNpdIncomeReceiptId) Get() (v NpdIncomeReceiptId, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptNpdIncomeReceiptId) Or(d NpdIncomeReceiptId) NpdIncomeReceiptId { if v, ok := o.Get(); ok { return v } return d } // NewOptOktmo returns new OptOktmo with value set to v. func NewOptOktmo(v Oktmo) OptOktmo { return OptOktmo{ Value: v, Set: true, } } // OptOktmo is optional Oktmo. type OptOktmo struct { Value Oktmo Set bool } // IsSet returns true if OptOktmo was set. func (o OptOktmo) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptOktmo) Reset() { var v Oktmo o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptOktmo) SetTo(v Oktmo) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptOktmo) Get() (v Oktmo, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptOktmo) Or(d Oktmo) Oktmo { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentCancellationDetails returns new OptPaymentCancellationDetails with value set to v. func NewOptPaymentCancellationDetails(v PaymentCancellationDetails) OptPaymentCancellationDetails { return OptPaymentCancellationDetails{ Value: v, Set: true, } } // OptPaymentCancellationDetails is optional PaymentCancellationDetails. type OptPaymentCancellationDetails struct { Value PaymentCancellationDetails Set bool } // IsSet returns true if OptPaymentCancellationDetails was set. func (o OptPaymentCancellationDetails) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentCancellationDetails) Reset() { var v PaymentCancellationDetails o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentCancellationDetails) SetTo(v PaymentCancellationDetails) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentCancellationDetails) Get() (v PaymentCancellationDetails, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentCancellationDetails) Or(d PaymentCancellationDetails) PaymentCancellationDetails { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentConfirmation returns new OptPaymentConfirmation with value set to v. func NewOptPaymentConfirmation(v PaymentConfirmation) OptPaymentConfirmation { return OptPaymentConfirmation{ Value: v, Set: true, } } // OptPaymentConfirmation is optional PaymentConfirmation. type OptPaymentConfirmation struct { Value PaymentConfirmation Set bool } // IsSet returns true if OptPaymentConfirmation was set. func (o OptPaymentConfirmation) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentConfirmation) Reset() { var v PaymentConfirmation o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentConfirmation) SetTo(v PaymentConfirmation) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentConfirmation) Get() (v PaymentConfirmation, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentConfirmation) Or(d PaymentConfirmation) PaymentConfirmation { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentDeal returns new OptPaymentDeal with value set to v. func NewOptPaymentDeal(v PaymentDeal) OptPaymentDeal { return OptPaymentDeal{ Value: v, Set: true, } } // OptPaymentDeal is optional PaymentDeal. type OptPaymentDeal struct { Value PaymentDeal Set bool } // IsSet returns true if OptPaymentDeal was set. func (o OptPaymentDeal) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentDeal) Reset() { var v PaymentDeal o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentDeal) SetTo(v PaymentDeal) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentDeal) Get() (v PaymentDeal, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentDeal) Or(d PaymentDeal) PaymentDeal { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentId returns new OptPaymentId with value set to v. func NewOptPaymentId(v PaymentId) OptPaymentId { return OptPaymentId{ Value: v, Set: true, } } // OptPaymentId is optional PaymentId. type OptPaymentId struct { Value PaymentId Set bool } // IsSet returns true if OptPaymentId was set. func (o OptPaymentId) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentId) Reset() { var v PaymentId o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentId) SetTo(v PaymentId) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentId) Get() (v PaymentId, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentId) Or(d PaymentId) PaymentId { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentIncomeAmount returns new OptPaymentIncomeAmount with value set to v. func NewOptPaymentIncomeAmount(v PaymentIncomeAmount) OptPaymentIncomeAmount { return OptPaymentIncomeAmount{ Value: v, Set: true, } } // OptPaymentIncomeAmount is optional PaymentIncomeAmount. type OptPaymentIncomeAmount struct { Value PaymentIncomeAmount Set bool } // IsSet returns true if OptPaymentIncomeAmount was set. func (o OptPaymentIncomeAmount) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentIncomeAmount) Reset() { var v PaymentIncomeAmount o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentIncomeAmount) SetTo(v PaymentIncomeAmount) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentIncomeAmount) Get() (v PaymentIncomeAmount, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentIncomeAmount) Or(d PaymentIncomeAmount) PaymentIncomeAmount { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentInvoiceDetails returns new OptPaymentInvoiceDetails with value set to v. func NewOptPaymentInvoiceDetails(v PaymentInvoiceDetails) OptPaymentInvoiceDetails { return OptPaymentInvoiceDetails{ Value: v, Set: true, } } // OptPaymentInvoiceDetails is optional PaymentInvoiceDetails. type OptPaymentInvoiceDetails struct { Value PaymentInvoiceDetails Set bool } // IsSet returns true if OptPaymentInvoiceDetails was set. func (o OptPaymentInvoiceDetails) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentInvoiceDetails) Reset() { var v PaymentInvoiceDetails o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentInvoiceDetails) SetTo(v PaymentInvoiceDetails) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentInvoiceDetails) Get() (v PaymentInvoiceDetails, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentInvoiceDetails) Or(d PaymentInvoiceDetails) PaymentInvoiceDetails { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentMethodElectronicCertificateCard returns new OptPaymentMethodElectronicCertificateCard with value set to v. func NewOptPaymentMethodElectronicCertificateCard(v PaymentMethodElectronicCertificateCard) OptPaymentMethodElectronicCertificateCard { return OptPaymentMethodElectronicCertificateCard{ Value: v, Set: true, } } // OptPaymentMethodElectronicCertificateCard is optional PaymentMethodElectronicCertificateCard. type OptPaymentMethodElectronicCertificateCard struct { Value PaymentMethodElectronicCertificateCard Set bool } // IsSet returns true if OptPaymentMethodElectronicCertificateCard was set. func (o OptPaymentMethodElectronicCertificateCard) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentMethodElectronicCertificateCard) Reset() { var v PaymentMethodElectronicCertificateCard o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentMethodElectronicCertificateCard) SetTo(v PaymentMethodElectronicCertificateCard) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentMethodElectronicCertificateCard) Get() (v PaymentMethodElectronicCertificateCard, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentMethodElectronicCertificateCard) Or(d PaymentMethodElectronicCertificateCard) PaymentMethodElectronicCertificateCard { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentMethodId returns new OptPaymentMethodId with value set to v. func NewOptPaymentMethodId(v PaymentMethodId) OptPaymentMethodId { return OptPaymentMethodId{ Value: v, Set: true, } } // OptPaymentMethodId is optional PaymentMethodId. type OptPaymentMethodId struct { Value PaymentMethodId Set bool } // IsSet returns true if OptPaymentMethodId was set. func (o OptPaymentMethodId) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentMethodId) Reset() { var v PaymentMethodId o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentMethodId) SetTo(v PaymentMethodId) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentMethodId) Get() (v PaymentMethodId, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentMethodId) Or(d PaymentMethodId) PaymentMethodId { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentMethodSberLoanDiscountAmount returns new OptPaymentMethodSberLoanDiscountAmount with value set to v. func NewOptPaymentMethodSberLoanDiscountAmount(v PaymentMethodSberLoanDiscountAmount) OptPaymentMethodSberLoanDiscountAmount { return OptPaymentMethodSberLoanDiscountAmount{ Value: v, Set: true, } } // OptPaymentMethodSberLoanDiscountAmount is optional PaymentMethodSberLoanDiscountAmount. type OptPaymentMethodSberLoanDiscountAmount struct { Value PaymentMethodSberLoanDiscountAmount Set bool } // IsSet returns true if OptPaymentMethodSberLoanDiscountAmount was set. func (o OptPaymentMethodSberLoanDiscountAmount) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentMethodSberLoanDiscountAmount) Reset() { var v PaymentMethodSberLoanDiscountAmount o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentMethodSberLoanDiscountAmount) SetTo(v PaymentMethodSberLoanDiscountAmount) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentMethodSberLoanDiscountAmount) Get() (v PaymentMethodSberLoanDiscountAmount, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentMethodSberLoanDiscountAmount) Or(d PaymentMethodSberLoanDiscountAmount) PaymentMethodSberLoanDiscountAmount { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentMethodTitle returns new OptPaymentMethodTitle with value set to v. func NewOptPaymentMethodTitle(v PaymentMethodTitle) OptPaymentMethodTitle { return OptPaymentMethodTitle{ Value: v, Set: true, } } // OptPaymentMethodTitle is optional PaymentMethodTitle. type OptPaymentMethodTitle struct { Value PaymentMethodTitle Set bool } // IsSet returns true if OptPaymentMethodTitle was set. func (o OptPaymentMethodTitle) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentMethodTitle) Reset() { var v PaymentMethodTitle o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentMethodTitle) SetTo(v PaymentMethodTitle) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentMethodTitle) Get() (v PaymentMethodTitle, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentMethodTitle) Or(d PaymentMethodTitle) PaymentMethodTitle { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentMethodType returns new OptPaymentMethodType with value set to v. func NewOptPaymentMethodType(v PaymentMethodType) OptPaymentMethodType { return OptPaymentMethodType{ Value: v, Set: true, } } // OptPaymentMethodType is optional PaymentMethodType. type OptPaymentMethodType struct { Value PaymentMethodType Set bool } // IsSet returns true if OptPaymentMethodType was set. func (o OptPaymentMethodType) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentMethodType) Reset() { var v PaymentMethodType o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentMethodType) SetTo(v PaymentMethodType) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentMethodType) Get() (v PaymentMethodType, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentMethodType) Or(d PaymentMethodType) PaymentMethodType { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentMethodsConfirmationDataRedirect returns new OptPaymentMethodsConfirmationDataRedirect with value set to v. func NewOptPaymentMethodsConfirmationDataRedirect(v PaymentMethodsConfirmationDataRedirect) OptPaymentMethodsConfirmationDataRedirect { return OptPaymentMethodsConfirmationDataRedirect{ Value: v, Set: true, } } // OptPaymentMethodsConfirmationDataRedirect is optional PaymentMethodsConfirmationDataRedirect. type OptPaymentMethodsConfirmationDataRedirect struct { Value PaymentMethodsConfirmationDataRedirect Set bool } // IsSet returns true if OptPaymentMethodsConfirmationDataRedirect was set. func (o OptPaymentMethodsConfirmationDataRedirect) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentMethodsConfirmationDataRedirect) Reset() { var v PaymentMethodsConfirmationDataRedirect o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentMethodsConfirmationDataRedirect) SetTo(v PaymentMethodsConfirmationDataRedirect) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentMethodsConfirmationDataRedirect) Get() (v PaymentMethodsConfirmationDataRedirect, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentMethodsConfirmationDataRedirect) Or(d PaymentMethodsConfirmationDataRedirect) PaymentMethodsConfirmationDataRedirect { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentPaymentMethod returns new OptPaymentPaymentMethod with value set to v. func NewOptPaymentPaymentMethod(v PaymentPaymentMethod) OptPaymentPaymentMethod { return OptPaymentPaymentMethod{ Value: v, Set: true, } } // OptPaymentPaymentMethod is optional PaymentPaymentMethod. type OptPaymentPaymentMethod struct { Value PaymentPaymentMethod Set bool } // IsSet returns true if OptPaymentPaymentMethod was set. func (o OptPaymentPaymentMethod) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentPaymentMethod) Reset() { var v PaymentPaymentMethod o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentPaymentMethod) SetTo(v PaymentPaymentMethod) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentPaymentMethod) Get() (v PaymentPaymentMethod, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentPaymentMethod) Or(d PaymentPaymentMethod) PaymentPaymentMethod { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentPeriod returns new OptPaymentPeriod with value set to v. func NewOptPaymentPeriod(v PaymentPeriod) OptPaymentPeriod { return OptPaymentPeriod{ Value: v, Set: true, } } // OptPaymentPeriod is optional PaymentPeriod. type OptPaymentPeriod struct { Value PaymentPeriod Set bool } // IsSet returns true if OptPaymentPeriod was set. func (o OptPaymentPeriod) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentPeriod) Reset() { var v PaymentPeriod o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentPeriod) SetTo(v PaymentPeriod) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentPeriod) Get() (v PaymentPeriod, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentPeriod) Or(d PaymentPeriod) PaymentPeriod { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentReceiptRegistration returns new OptPaymentReceiptRegistration with value set to v. func NewOptPaymentReceiptRegistration(v PaymentReceiptRegistration) OptPaymentReceiptRegistration { return OptPaymentReceiptRegistration{ Value: v, Set: true, } } // OptPaymentReceiptRegistration is optional PaymentReceiptRegistration. type OptPaymentReceiptRegistration struct { Value PaymentReceiptRegistration Set bool } // IsSet returns true if OptPaymentReceiptRegistration was set. func (o OptPaymentReceiptRegistration) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentReceiptRegistration) Reset() { var v PaymentReceiptRegistration o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentReceiptRegistration) SetTo(v PaymentReceiptRegistration) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentReceiptRegistration) Get() (v PaymentReceiptRegistration, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentReceiptRegistration) Or(d PaymentReceiptRegistration) PaymentReceiptRegistration { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentRefundedAmount returns new OptPaymentRefundedAmount with value set to v. func NewOptPaymentRefundedAmount(v PaymentRefundedAmount) OptPaymentRefundedAmount { return OptPaymentRefundedAmount{ Value: v, Set: true, } } // OptPaymentRefundedAmount is optional PaymentRefundedAmount. type OptPaymentRefundedAmount struct { Value PaymentRefundedAmount Set bool } // IsSet returns true if OptPaymentRefundedAmount was set. func (o OptPaymentRefundedAmount) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentRefundedAmount) Reset() { var v PaymentRefundedAmount o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentRefundedAmount) SetTo(v PaymentRefundedAmount) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentRefundedAmount) Get() (v PaymentRefundedAmount, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentRefundedAmount) Or(d PaymentRefundedAmount) PaymentRefundedAmount { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentStatus returns new OptPaymentStatus with value set to v. func NewOptPaymentStatus(v PaymentStatus) OptPaymentStatus { return OptPaymentStatus{ Value: v, Set: true, } } // OptPaymentStatus is optional PaymentStatus. type OptPaymentStatus struct { Value PaymentStatus Set bool } // IsSet returns true if OptPaymentStatus was set. func (o OptPaymentStatus) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentStatus) Reset() { var v PaymentStatus o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentStatus) SetTo(v PaymentStatus) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentStatus) Get() (v PaymentStatus, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentStatus) Or(d PaymentStatus) PaymentStatus { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentToken returns new OptPaymentToken with value set to v. func NewOptPaymentToken(v PaymentToken) OptPaymentToken { return OptPaymentToken{ Value: v, Set: true, } } // OptPaymentToken is optional PaymentToken. type OptPaymentToken struct { Value PaymentToken Set bool } // IsSet returns true if OptPaymentToken was set. func (o OptPaymentToken) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentToken) Reset() { var v PaymentToken o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentToken) SetTo(v PaymentToken) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentToken) Get() (v PaymentToken, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentToken) Or(d PaymentToken) PaymentToken { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentsPaymentIDCapturePostReqAirline returns new OptPaymentsPaymentIDCapturePostReqAirline with value set to v. func NewOptPaymentsPaymentIDCapturePostReqAirline(v PaymentsPaymentIDCapturePostReqAirline) OptPaymentsPaymentIDCapturePostReqAirline { return OptPaymentsPaymentIDCapturePostReqAirline{ Value: v, Set: true, } } // OptPaymentsPaymentIDCapturePostReqAirline is optional PaymentsPaymentIDCapturePostReqAirline. type OptPaymentsPaymentIDCapturePostReqAirline struct { Value PaymentsPaymentIDCapturePostReqAirline Set bool } // IsSet returns true if OptPaymentsPaymentIDCapturePostReqAirline was set. func (o OptPaymentsPaymentIDCapturePostReqAirline) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentsPaymentIDCapturePostReqAirline) Reset() { var v PaymentsPaymentIDCapturePostReqAirline o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentsPaymentIDCapturePostReqAirline) SetTo(v PaymentsPaymentIDCapturePostReqAirline) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentsPaymentIDCapturePostReqAirline) Get() (v PaymentsPaymentIDCapturePostReqAirline, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentsPaymentIDCapturePostReqAirline) Or(d PaymentsPaymentIDCapturePostReqAirline) PaymentsPaymentIDCapturePostReqAirline { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentsPaymentIDCapturePostReqAmount returns new OptPaymentsPaymentIDCapturePostReqAmount with value set to v. func NewOptPaymentsPaymentIDCapturePostReqAmount(v PaymentsPaymentIDCapturePostReqAmount) OptPaymentsPaymentIDCapturePostReqAmount { return OptPaymentsPaymentIDCapturePostReqAmount{ Value: v, Set: true, } } // OptPaymentsPaymentIDCapturePostReqAmount is optional PaymentsPaymentIDCapturePostReqAmount. type OptPaymentsPaymentIDCapturePostReqAmount struct { Value PaymentsPaymentIDCapturePostReqAmount Set bool } // IsSet returns true if OptPaymentsPaymentIDCapturePostReqAmount was set. func (o OptPaymentsPaymentIDCapturePostReqAmount) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentsPaymentIDCapturePostReqAmount) Reset() { var v PaymentsPaymentIDCapturePostReqAmount o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentsPaymentIDCapturePostReqAmount) SetTo(v PaymentsPaymentIDCapturePostReqAmount) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentsPaymentIDCapturePostReqAmount) Get() (v PaymentsPaymentIDCapturePostReqAmount, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentsPaymentIDCapturePostReqAmount) Or(d PaymentsPaymentIDCapturePostReqAmount) PaymentsPaymentIDCapturePostReqAmount { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentsPaymentIDCapturePostReqDeal returns new OptPaymentsPaymentIDCapturePostReqDeal with value set to v. func NewOptPaymentsPaymentIDCapturePostReqDeal(v PaymentsPaymentIDCapturePostReqDeal) OptPaymentsPaymentIDCapturePostReqDeal { return OptPaymentsPaymentIDCapturePostReqDeal{ Value: v, Set: true, } } // OptPaymentsPaymentIDCapturePostReqDeal is optional PaymentsPaymentIDCapturePostReqDeal. type OptPaymentsPaymentIDCapturePostReqDeal struct { Value PaymentsPaymentIDCapturePostReqDeal Set bool } // IsSet returns true if OptPaymentsPaymentIDCapturePostReqDeal was set. func (o OptPaymentsPaymentIDCapturePostReqDeal) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentsPaymentIDCapturePostReqDeal) Reset() { var v PaymentsPaymentIDCapturePostReqDeal o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentsPaymentIDCapturePostReqDeal) SetTo(v PaymentsPaymentIDCapturePostReqDeal) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentsPaymentIDCapturePostReqDeal) Get() (v PaymentsPaymentIDCapturePostReqDeal, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentsPaymentIDCapturePostReqDeal) Or(d PaymentsPaymentIDCapturePostReqDeal) PaymentsPaymentIDCapturePostReqDeal { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentsPostReqAirline returns new OptPaymentsPostReqAirline with value set to v. func NewOptPaymentsPostReqAirline(v PaymentsPostReqAirline) OptPaymentsPostReqAirline { return OptPaymentsPostReqAirline{ Value: v, Set: true, } } // OptPaymentsPostReqAirline is optional PaymentsPostReqAirline. type OptPaymentsPostReqAirline struct { Value PaymentsPostReqAirline Set bool } // IsSet returns true if OptPaymentsPostReqAirline was set. func (o OptPaymentsPostReqAirline) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentsPostReqAirline) Reset() { var v PaymentsPostReqAirline o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentsPostReqAirline) SetTo(v PaymentsPostReqAirline) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentsPostReqAirline) Get() (v PaymentsPostReqAirline, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentsPostReqAirline) Or(d PaymentsPostReqAirline) PaymentsPostReqAirline { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentsPostReqConfirmation returns new OptPaymentsPostReqConfirmation with value set to v. func NewOptPaymentsPostReqConfirmation(v PaymentsPostReqConfirmation) OptPaymentsPostReqConfirmation { return OptPaymentsPostReqConfirmation{ Value: v, Set: true, } } // OptPaymentsPostReqConfirmation is optional PaymentsPostReqConfirmation. type OptPaymentsPostReqConfirmation struct { Value PaymentsPostReqConfirmation Set bool } // IsSet returns true if OptPaymentsPostReqConfirmation was set. func (o OptPaymentsPostReqConfirmation) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentsPostReqConfirmation) Reset() { var v PaymentsPostReqConfirmation o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentsPostReqConfirmation) SetTo(v PaymentsPostReqConfirmation) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentsPostReqConfirmation) Get() (v PaymentsPostReqConfirmation, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentsPostReqConfirmation) Or(d PaymentsPostReqConfirmation) PaymentsPostReqConfirmation { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentsPostReqDeal returns new OptPaymentsPostReqDeal with value set to v. func NewOptPaymentsPostReqDeal(v PaymentsPostReqDeal) OptPaymentsPostReqDeal { return OptPaymentsPostReqDeal{ Value: v, Set: true, } } // OptPaymentsPostReqDeal is optional PaymentsPostReqDeal. type OptPaymentsPostReqDeal struct { Value PaymentsPostReqDeal Set bool } // IsSet returns true if OptPaymentsPostReqDeal was set. func (o OptPaymentsPostReqDeal) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentsPostReqDeal) Reset() { var v PaymentsPostReqDeal o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentsPostReqDeal) SetTo(v PaymentsPostReqDeal) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentsPostReqDeal) Get() (v PaymentsPostReqDeal, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentsPostReqDeal) Or(d PaymentsPostReqDeal) PaymentsPostReqDeal { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentsPostReqPaymentMethodData returns new OptPaymentsPostReqPaymentMethodData with value set to v. func NewOptPaymentsPostReqPaymentMethodData(v PaymentsPostReqPaymentMethodData) OptPaymentsPostReqPaymentMethodData { return OptPaymentsPostReqPaymentMethodData{ Value: v, Set: true, } } // OptPaymentsPostReqPaymentMethodData is optional PaymentsPostReqPaymentMethodData. type OptPaymentsPostReqPaymentMethodData struct { Value PaymentsPostReqPaymentMethodData Set bool } // IsSet returns true if OptPaymentsPostReqPaymentMethodData was set. func (o OptPaymentsPostReqPaymentMethodData) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentsPostReqPaymentMethodData) Reset() { var v PaymentsPostReqPaymentMethodData o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentsPostReqPaymentMethodData) SetTo(v PaymentsPostReqPaymentMethodData) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentsPostReqPaymentMethodData) Get() (v PaymentsPostReqPaymentMethodData, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentsPostReqPaymentMethodData) Or(d PaymentsPostReqPaymentMethodData) PaymentsPostReqPaymentMethodData { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentsPostReqPaymentOrder returns new OptPaymentsPostReqPaymentOrder with value set to v. func NewOptPaymentsPostReqPaymentOrder(v PaymentsPostReqPaymentOrder) OptPaymentsPostReqPaymentOrder { return OptPaymentsPostReqPaymentOrder{ Value: v, Set: true, } } // OptPaymentsPostReqPaymentOrder is optional PaymentsPostReqPaymentOrder. type OptPaymentsPostReqPaymentOrder struct { Value PaymentsPostReqPaymentOrder Set bool } // IsSet returns true if OptPaymentsPostReqPaymentOrder was set. func (o OptPaymentsPostReqPaymentOrder) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentsPostReqPaymentOrder) Reset() { var v PaymentsPostReqPaymentOrder o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentsPostReqPaymentOrder) SetTo(v PaymentsPostReqPaymentOrder) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentsPostReqPaymentOrder) Get() (v PaymentsPostReqPaymentOrder, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentsPostReqPaymentOrder) Or(d PaymentsPostReqPaymentOrder) PaymentsPostReqPaymentOrder { if v, ok := o.Get(); ok { return v } return d } // NewOptPaymentsPostReqReceiver returns new OptPaymentsPostReqReceiver with value set to v. func NewOptPaymentsPostReqReceiver(v PaymentsPostReqReceiver) OptPaymentsPostReqReceiver { return OptPaymentsPostReqReceiver{ Value: v, Set: true, } } // OptPaymentsPostReqReceiver is optional PaymentsPostReqReceiver. type OptPaymentsPostReqReceiver struct { Value PaymentsPostReqReceiver Set bool } // IsSet returns true if OptPaymentsPostReqReceiver was set. func (o OptPaymentsPostReqReceiver) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPaymentsPostReqReceiver) Reset() { var v PaymentsPostReqReceiver o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPaymentsPostReqReceiver) SetTo(v PaymentsPostReqReceiver) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPaymentsPostReqReceiver) Get() (v PaymentsPostReqReceiver, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPaymentsPostReqReceiver) Or(d PaymentsPostReqReceiver) PaymentsPostReqReceiver { if v, ok := o.Get(); ok { return v } return d } // NewOptPayoutCancellationDetails returns new OptPayoutCancellationDetails with value set to v. func NewOptPayoutCancellationDetails(v PayoutCancellationDetails) OptPayoutCancellationDetails { return OptPayoutCancellationDetails{ Value: v, Set: true, } } // OptPayoutCancellationDetails is optional PayoutCancellationDetails. type OptPayoutCancellationDetails struct { Value PayoutCancellationDetails Set bool } // IsSet returns true if OptPayoutCancellationDetails was set. func (o OptPayoutCancellationDetails) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPayoutCancellationDetails) Reset() { var v PayoutCancellationDetails o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPayoutCancellationDetails) SetTo(v PayoutCancellationDetails) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPayoutCancellationDetails) Get() (v PayoutCancellationDetails, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPayoutCancellationDetails) Or(d PayoutCancellationDetails) PayoutCancellationDetails { if v, ok := o.Get(); ok { return v } return d } // NewOptPayoutCardData returns new OptPayoutCardData with value set to v. func NewOptPayoutCardData(v PayoutCardData) OptPayoutCardData { return OptPayoutCardData{ Value: v, Set: true, } } // OptPayoutCardData is optional PayoutCardData. type OptPayoutCardData struct { Value PayoutCardData Set bool } // IsSet returns true if OptPayoutCardData was set. func (o OptPayoutCardData) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPayoutCardData) Reset() { var v PayoutCardData o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPayoutCardData) SetTo(v PayoutCardData) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPayoutCardData) Get() (v PayoutCardData, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPayoutCardData) Or(d PayoutCardData) PayoutCardData { if v, ok := o.Get(); ok { return v } return d } // NewOptPayoutDeal returns new OptPayoutDeal with value set to v. func NewOptPayoutDeal(v PayoutDeal) OptPayoutDeal { return OptPayoutDeal{ Value: v, Set: true, } } // OptPayoutDeal is optional PayoutDeal. type OptPayoutDeal struct { Value PayoutDeal Set bool } // IsSet returns true if OptPayoutDeal was set. func (o OptPayoutDeal) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPayoutDeal) Reset() { var v PayoutDeal o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPayoutDeal) SetTo(v PayoutDeal) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPayoutDeal) Get() (v PayoutDeal, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPayoutDeal) Or(d PayoutDeal) PayoutDeal { if v, ok := o.Get(); ok { return v } return d } // NewOptPayoutDealInfo returns new OptPayoutDealInfo with value set to v. func NewOptPayoutDealInfo(v PayoutDealInfo) OptPayoutDealInfo { return OptPayoutDealInfo{ Value: v, Set: true, } } // OptPayoutDealInfo is optional PayoutDealInfo. type OptPayoutDealInfo struct { Value PayoutDealInfo Set bool } // IsSet returns true if OptPayoutDealInfo was set. func (o OptPayoutDealInfo) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPayoutDealInfo) Reset() { var v PayoutDealInfo o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPayoutDealInfo) SetTo(v PayoutDealInfo) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPayoutDealInfo) Get() (v PayoutDealInfo, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPayoutDealInfo) Or(d PayoutDealInfo) PayoutDealInfo { if v, ok := o.Get(); ok { return v } return d } // NewOptPayoutDestinationDataType returns new OptPayoutDestinationDataType with value set to v. func NewOptPayoutDestinationDataType(v PayoutDestinationDataType) OptPayoutDestinationDataType { return OptPayoutDestinationDataType{ Value: v, Set: true, } } // OptPayoutDestinationDataType is optional PayoutDestinationDataType. type OptPayoutDestinationDataType struct { Value PayoutDestinationDataType Set bool } // IsSet returns true if OptPayoutDestinationDataType was set. func (o OptPayoutDestinationDataType) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPayoutDestinationDataType) Reset() { var v PayoutDestinationDataType o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPayoutDestinationDataType) SetTo(v PayoutDestinationDataType) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPayoutDestinationDataType) Get() (v PayoutDestinationDataType, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPayoutDestinationDataType) Or(d PayoutDestinationDataType) PayoutDestinationDataType { if v, ok := o.Get(); ok { return v } return d } // NewOptPayoutRequestPayoutDestinationData returns new OptPayoutRequestPayoutDestinationData with value set to v. func NewOptPayoutRequestPayoutDestinationData(v PayoutRequestPayoutDestinationData) OptPayoutRequestPayoutDestinationData { return OptPayoutRequestPayoutDestinationData{ Value: v, Set: true, } } // OptPayoutRequestPayoutDestinationData is optional PayoutRequestPayoutDestinationData. type OptPayoutRequestPayoutDestinationData struct { Value PayoutRequestPayoutDestinationData Set bool } // IsSet returns true if OptPayoutRequestPayoutDestinationData was set. func (o OptPayoutRequestPayoutDestinationData) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPayoutRequestPayoutDestinationData) Reset() { var v PayoutRequestPayoutDestinationData o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPayoutRequestPayoutDestinationData) SetTo(v PayoutRequestPayoutDestinationData) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPayoutRequestPayoutDestinationData) Get() (v PayoutRequestPayoutDestinationData, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPayoutRequestPayoutDestinationData) Or(d PayoutRequestPayoutDestinationData) PayoutRequestPayoutDestinationData { if v, ok := o.Get(); ok { return v } return d } // NewOptPayoutSelfEmployed returns new OptPayoutSelfEmployed with value set to v. func NewOptPayoutSelfEmployed(v PayoutSelfEmployed) OptPayoutSelfEmployed { return OptPayoutSelfEmployed{ Value: v, Set: true, } } // OptPayoutSelfEmployed is optional PayoutSelfEmployed. type OptPayoutSelfEmployed struct { Value PayoutSelfEmployed Set bool } // IsSet returns true if OptPayoutSelfEmployed was set. func (o OptPayoutSelfEmployed) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPayoutSelfEmployed) Reset() { var v PayoutSelfEmployed o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPayoutSelfEmployed) SetTo(v PayoutSelfEmployed) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPayoutSelfEmployed) Get() (v PayoutSelfEmployed, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPayoutSelfEmployed) Or(d PayoutSelfEmployed) PayoutSelfEmployed { if v, ok := o.Get(); ok { return v } return d } // NewOptPayoutStatus returns new OptPayoutStatus with value set to v. func NewOptPayoutStatus(v PayoutStatus) OptPayoutStatus { return OptPayoutStatus{ Value: v, Set: true, } } // OptPayoutStatus is optional PayoutStatus. type OptPayoutStatus struct { Value PayoutStatus Set bool } // IsSet returns true if OptPayoutStatus was set. func (o OptPayoutStatus) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPayoutStatus) Reset() { var v PayoutStatus o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPayoutStatus) SetTo(v PayoutStatus) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPayoutStatus) Get() (v PayoutStatus, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPayoutStatus) Or(d PayoutStatus) PayoutStatus { if v, ok := o.Get(); ok { return v } return d } // NewOptPersonalDataCancellationDetails returns new OptPersonalDataCancellationDetails with value set to v. func NewOptPersonalDataCancellationDetails(v PersonalDataCancellationDetails) OptPersonalDataCancellationDetails { return OptPersonalDataCancellationDetails{ Value: v, Set: true, } } // OptPersonalDataCancellationDetails is optional PersonalDataCancellationDetails. type OptPersonalDataCancellationDetails struct { Value PersonalDataCancellationDetails Set bool } // IsSet returns true if OptPersonalDataCancellationDetails was set. func (o OptPersonalDataCancellationDetails) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPersonalDataCancellationDetails) Reset() { var v PersonalDataCancellationDetails o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPersonalDataCancellationDetails) SetTo(v PersonalDataCancellationDetails) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPersonalDataCancellationDetails) Get() (v PersonalDataCancellationDetails, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptPersonalDataCancellationDetails) Or(d PersonalDataCancellationDetails) PersonalDataCancellationDetails { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptData returns new OptReceiptData with value set to v. func NewOptReceiptData(v ReceiptData) OptReceiptData { return OptReceiptData{ Value: v, Set: true, } } // OptReceiptData is optional ReceiptData. type OptReceiptData struct { Value ReceiptData Set bool } // IsSet returns true if OptReceiptData was set. func (o OptReceiptData) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptData) Reset() { var v ReceiptData o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptData) SetTo(v ReceiptData) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptData) Get() (v ReceiptData, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptData) Or(d ReceiptData) ReceiptData { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptDataCustomer returns new OptReceiptDataCustomer with value set to v. func NewOptReceiptDataCustomer(v ReceiptDataCustomer) OptReceiptDataCustomer { return OptReceiptDataCustomer{ Value: v, Set: true, } } // OptReceiptDataCustomer is optional ReceiptDataCustomer. type OptReceiptDataCustomer struct { Value ReceiptDataCustomer Set bool } // IsSet returns true if OptReceiptDataCustomer was set. func (o OptReceiptDataCustomer) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptDataCustomer) Reset() { var v ReceiptDataCustomer o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptDataCustomer) SetTo(v ReceiptDataCustomer) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptDataCustomer) Get() (v ReceiptDataCustomer, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptDataCustomer) Or(d ReceiptDataCustomer) ReceiptDataCustomer { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptDataReceiptOperationalDetails returns new OptReceiptDataReceiptOperationalDetails with value set to v. func NewOptReceiptDataReceiptOperationalDetails(v ReceiptDataReceiptOperationalDetails) OptReceiptDataReceiptOperationalDetails { return OptReceiptDataReceiptOperationalDetails{ Value: v, Set: true, } } // OptReceiptDataReceiptOperationalDetails is optional ReceiptDataReceiptOperationalDetails. type OptReceiptDataReceiptOperationalDetails struct { Value ReceiptDataReceiptOperationalDetails Set bool } // IsSet returns true if OptReceiptDataReceiptOperationalDetails was set. func (o OptReceiptDataReceiptOperationalDetails) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptDataReceiptOperationalDetails) Reset() { var v ReceiptDataReceiptOperationalDetails o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptDataReceiptOperationalDetails) SetTo(v ReceiptDataReceiptOperationalDetails) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptDataReceiptOperationalDetails) Get() (v ReceiptDataReceiptOperationalDetails, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptDataReceiptOperationalDetails) Or(d ReceiptDataReceiptOperationalDetails) ReceiptDataReceiptOperationalDetails { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptItemAgentType returns new OptReceiptItemAgentType with value set to v. func NewOptReceiptItemAgentType(v ReceiptItemAgentType) OptReceiptItemAgentType { return OptReceiptItemAgentType{ Value: v, Set: true, } } // OptReceiptItemAgentType is optional ReceiptItemAgentType. type OptReceiptItemAgentType struct { Value ReceiptItemAgentType Set bool } // IsSet returns true if OptReceiptItemAgentType was set. func (o OptReceiptItemAgentType) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptItemAgentType) Reset() { var v ReceiptItemAgentType o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptItemAgentType) SetTo(v ReceiptItemAgentType) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptItemAgentType) Get() (v ReceiptItemAgentType, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptItemAgentType) Or(d ReceiptItemAgentType) ReceiptItemAgentType { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptItemCountryOfOriginCode returns new OptReceiptItemCountryOfOriginCode with value set to v. func NewOptReceiptItemCountryOfOriginCode(v ReceiptItemCountryOfOriginCode) OptReceiptItemCountryOfOriginCode { return OptReceiptItemCountryOfOriginCode{ Value: v, Set: true, } } // OptReceiptItemCountryOfOriginCode is optional ReceiptItemCountryOfOriginCode. type OptReceiptItemCountryOfOriginCode struct { Value ReceiptItemCountryOfOriginCode Set bool } // IsSet returns true if OptReceiptItemCountryOfOriginCode was set. func (o OptReceiptItemCountryOfOriginCode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptItemCountryOfOriginCode) Reset() { var v ReceiptItemCountryOfOriginCode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptItemCountryOfOriginCode) SetTo(v ReceiptItemCountryOfOriginCode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptItemCountryOfOriginCode) Get() (v ReceiptItemCountryOfOriginCode, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptItemCountryOfOriginCode) Or(d ReceiptItemCountryOfOriginCode) ReceiptItemCountryOfOriginCode { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptItemCustomsDeclarationNumber returns new OptReceiptItemCustomsDeclarationNumber with value set to v. func NewOptReceiptItemCustomsDeclarationNumber(v ReceiptItemCustomsDeclarationNumber) OptReceiptItemCustomsDeclarationNumber { return OptReceiptItemCustomsDeclarationNumber{ Value: v, Set: true, } } // OptReceiptItemCustomsDeclarationNumber is optional ReceiptItemCustomsDeclarationNumber. type OptReceiptItemCustomsDeclarationNumber struct { Value ReceiptItemCustomsDeclarationNumber Set bool } // IsSet returns true if OptReceiptItemCustomsDeclarationNumber was set. func (o OptReceiptItemCustomsDeclarationNumber) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptItemCustomsDeclarationNumber) Reset() { var v ReceiptItemCustomsDeclarationNumber o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptItemCustomsDeclarationNumber) SetTo(v ReceiptItemCustomsDeclarationNumber) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptItemCustomsDeclarationNumber) Get() (v ReceiptItemCustomsDeclarationNumber, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptItemCustomsDeclarationNumber) Or(d ReceiptItemCustomsDeclarationNumber) ReceiptItemCustomsDeclarationNumber { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptItemExcise returns new OptReceiptItemExcise with value set to v. func NewOptReceiptItemExcise(v ReceiptItemExcise) OptReceiptItemExcise { return OptReceiptItemExcise{ Value: v, Set: true, } } // OptReceiptItemExcise is optional ReceiptItemExcise. type OptReceiptItemExcise struct { Value ReceiptItemExcise Set bool } // IsSet returns true if OptReceiptItemExcise was set. func (o OptReceiptItemExcise) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptItemExcise) Reset() { var v ReceiptItemExcise o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptItemExcise) SetTo(v ReceiptItemExcise) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptItemExcise) Get() (v ReceiptItemExcise, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptItemExcise) Or(d ReceiptItemExcise) ReceiptItemExcise { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptItemMeasure returns new OptReceiptItemMeasure with value set to v. func NewOptReceiptItemMeasure(v ReceiptItemMeasure) OptReceiptItemMeasure { return OptReceiptItemMeasure{ Value: v, Set: true, } } // OptReceiptItemMeasure is optional ReceiptItemMeasure. type OptReceiptItemMeasure struct { Value ReceiptItemMeasure Set bool } // IsSet returns true if OptReceiptItemMeasure was set. func (o OptReceiptItemMeasure) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptItemMeasure) Reset() { var v ReceiptItemMeasure o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptItemMeasure) SetTo(v ReceiptItemMeasure) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptItemMeasure) Get() (v ReceiptItemMeasure, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptItemMeasure) Or(d ReceiptItemMeasure) ReceiptItemMeasure { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptItemPaymentMode returns new OptReceiptItemPaymentMode with value set to v. func NewOptReceiptItemPaymentMode(v ReceiptItemPaymentMode) OptReceiptItemPaymentMode { return OptReceiptItemPaymentMode{ Value: v, Set: true, } } // OptReceiptItemPaymentMode is optional ReceiptItemPaymentMode. type OptReceiptItemPaymentMode struct { Value ReceiptItemPaymentMode Set bool } // IsSet returns true if OptReceiptItemPaymentMode was set. func (o OptReceiptItemPaymentMode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptItemPaymentMode) Reset() { var v ReceiptItemPaymentMode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptItemPaymentMode) SetTo(v ReceiptItemPaymentMode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptItemPaymentMode) Get() (v ReceiptItemPaymentMode, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptItemPaymentMode) Or(d ReceiptItemPaymentMode) ReceiptItemPaymentMode { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptItemPaymentSubject returns new OptReceiptItemPaymentSubject with value set to v. func NewOptReceiptItemPaymentSubject(v ReceiptItemPaymentSubject) OptReceiptItemPaymentSubject { return OptReceiptItemPaymentSubject{ Value: v, Set: true, } } // OptReceiptItemPaymentSubject is optional ReceiptItemPaymentSubject. type OptReceiptItemPaymentSubject struct { Value ReceiptItemPaymentSubject Set bool } // IsSet returns true if OptReceiptItemPaymentSubject was set. func (o OptReceiptItemPaymentSubject) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptItemPaymentSubject) Reset() { var v ReceiptItemPaymentSubject o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptItemPaymentSubject) SetTo(v ReceiptItemPaymentSubject) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptItemPaymentSubject) Get() (v ReceiptItemPaymentSubject, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptItemPaymentSubject) Or(d ReceiptItemPaymentSubject) ReceiptItemPaymentSubject { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptItemPlannedStatus returns new OptReceiptItemPlannedStatus with value set to v. func NewOptReceiptItemPlannedStatus(v ReceiptItemPlannedStatus) OptReceiptItemPlannedStatus { return OptReceiptItemPlannedStatus{ Value: v, Set: true, } } // OptReceiptItemPlannedStatus is optional ReceiptItemPlannedStatus. type OptReceiptItemPlannedStatus struct { Value ReceiptItemPlannedStatus Set bool } // IsSet returns true if OptReceiptItemPlannedStatus was set. func (o OptReceiptItemPlannedStatus) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptItemPlannedStatus) Reset() { var v ReceiptItemPlannedStatus o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptItemPlannedStatus) SetTo(v ReceiptItemPlannedStatus) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptItemPlannedStatus) Get() (v ReceiptItemPlannedStatus, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptItemPlannedStatus) Or(d ReceiptItemPlannedStatus) ReceiptItemPlannedStatus { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptItemProductCode returns new OptReceiptItemProductCode with value set to v. func NewOptReceiptItemProductCode(v ReceiptItemProductCode) OptReceiptItemProductCode { return OptReceiptItemProductCode{ Value: v, Set: true, } } // OptReceiptItemProductCode is optional ReceiptItemProductCode. type OptReceiptItemProductCode struct { Value ReceiptItemProductCode Set bool } // IsSet returns true if OptReceiptItemProductCode was set. func (o OptReceiptItemProductCode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptItemProductCode) Reset() { var v ReceiptItemProductCode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptItemProductCode) SetTo(v ReceiptItemProductCode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptItemProductCode) Get() (v ReceiptItemProductCode, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptItemProductCode) Or(d ReceiptItemProductCode) ReceiptItemProductCode { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptItemSupplierWithInn returns new OptReceiptItemSupplierWithInn with value set to v. func NewOptReceiptItemSupplierWithInn(v ReceiptItemSupplierWithInn) OptReceiptItemSupplierWithInn { return OptReceiptItemSupplierWithInn{ Value: v, Set: true, } } // OptReceiptItemSupplierWithInn is optional ReceiptItemSupplierWithInn. type OptReceiptItemSupplierWithInn struct { Value ReceiptItemSupplierWithInn Set bool } // IsSet returns true if OptReceiptItemSupplierWithInn was set. func (o OptReceiptItemSupplierWithInn) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptItemSupplierWithInn) Reset() { var v ReceiptItemSupplierWithInn o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptItemSupplierWithInn) SetTo(v ReceiptItemSupplierWithInn) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptItemSupplierWithInn) Get() (v ReceiptItemSupplierWithInn, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptItemSupplierWithInn) Or(d ReceiptItemSupplierWithInn) ReceiptItemSupplierWithInn { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptReceiptOperationalDetails returns new OptReceiptReceiptOperationalDetails with value set to v. func NewOptReceiptReceiptOperationalDetails(v ReceiptReceiptOperationalDetails) OptReceiptReceiptOperationalDetails { return OptReceiptReceiptOperationalDetails{ Value: v, Set: true, } } // OptReceiptReceiptOperationalDetails is optional ReceiptReceiptOperationalDetails. type OptReceiptReceiptOperationalDetails struct { Value ReceiptReceiptOperationalDetails Set bool } // IsSet returns true if OptReceiptReceiptOperationalDetails was set. func (o OptReceiptReceiptOperationalDetails) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptReceiptOperationalDetails) Reset() { var v ReceiptReceiptOperationalDetails o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptReceiptOperationalDetails) SetTo(v ReceiptReceiptOperationalDetails) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptReceiptOperationalDetails) Get() (v ReceiptReceiptOperationalDetails, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptReceiptOperationalDetails) Or(d ReceiptReceiptOperationalDetails) ReceiptReceiptOperationalDetails { if v, ok := o.Get(); ok { return v } return d } // NewOptReceiptRegistrationStatus returns new OptReceiptRegistrationStatus with value set to v. func NewOptReceiptRegistrationStatus(v ReceiptRegistrationStatus) OptReceiptRegistrationStatus { return OptReceiptRegistrationStatus{ Value: v, Set: true, } } // OptReceiptRegistrationStatus is optional ReceiptRegistrationStatus. type OptReceiptRegistrationStatus struct { Value ReceiptRegistrationStatus Set bool } // IsSet returns true if OptReceiptRegistrationStatus was set. func (o OptReceiptRegistrationStatus) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReceiptRegistrationStatus) Reset() { var v ReceiptRegistrationStatus o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReceiptRegistrationStatus) SetTo(v ReceiptRegistrationStatus) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReceiptRegistrationStatus) Get() (v ReceiptRegistrationStatus, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReceiptRegistrationStatus) Or(d ReceiptRegistrationStatus) ReceiptRegistrationStatus { if v, ok := o.Get(); ok { return v } return d } // NewOptRecipient returns new OptRecipient with value set to v. func NewOptRecipient(v Recipient) OptRecipient { return OptRecipient{ Value: v, Set: true, } } // OptRecipient is optional Recipient. type OptRecipient struct { Value Recipient Set bool } // IsSet returns true if OptRecipient was set. func (o OptRecipient) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRecipient) Reset() { var v Recipient o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRecipient) SetTo(v Recipient) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRecipient) Get() (v Recipient, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRecipient) Or(d Recipient) Recipient { if v, ok := o.Get(); ok { return v } return d } // NewOptRefundAuthorizationDetails returns new OptRefundAuthorizationDetails with value set to v. func NewOptRefundAuthorizationDetails(v RefundAuthorizationDetails) OptRefundAuthorizationDetails { return OptRefundAuthorizationDetails{ Value: v, Set: true, } } // OptRefundAuthorizationDetails is optional RefundAuthorizationDetails. type OptRefundAuthorizationDetails struct { Value RefundAuthorizationDetails Set bool } // IsSet returns true if OptRefundAuthorizationDetails was set. func (o OptRefundAuthorizationDetails) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRefundAuthorizationDetails) Reset() { var v RefundAuthorizationDetails o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRefundAuthorizationDetails) SetTo(v RefundAuthorizationDetails) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRefundAuthorizationDetails) Get() (v RefundAuthorizationDetails, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRefundAuthorizationDetails) Or(d RefundAuthorizationDetails) RefundAuthorizationDetails { if v, ok := o.Get(); ok { return v } return d } // NewOptRefundCancellationDetails returns new OptRefundCancellationDetails with value set to v. func NewOptRefundCancellationDetails(v RefundCancellationDetails) OptRefundCancellationDetails { return OptRefundCancellationDetails{ Value: v, Set: true, } } // OptRefundCancellationDetails is optional RefundCancellationDetails. type OptRefundCancellationDetails struct { Value RefundCancellationDetails Set bool } // IsSet returns true if OptRefundCancellationDetails was set. func (o OptRefundCancellationDetails) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRefundCancellationDetails) Reset() { var v RefundCancellationDetails o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRefundCancellationDetails) SetTo(v RefundCancellationDetails) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRefundCancellationDetails) Get() (v RefundCancellationDetails, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRefundCancellationDetails) Or(d RefundCancellationDetails) RefundCancellationDetails { if v, ok := o.Get(); ok { return v } return d } // NewOptRefundDealData returns new OptRefundDealData with value set to v. func NewOptRefundDealData(v RefundDealData) OptRefundDealData { return OptRefundDealData{ Value: v, Set: true, } } // OptRefundDealData is optional RefundDealData. type OptRefundDealData struct { Value RefundDealData Set bool } // IsSet returns true if OptRefundDealData was set. func (o OptRefundDealData) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRefundDealData) Reset() { var v RefundDealData o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRefundDealData) SetTo(v RefundDealData) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRefundDealData) Get() (v RefundDealData, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRefundDealData) Or(d RefundDealData) RefundDealData { if v, ok := o.Get(); ok { return v } return d } // NewOptRefundDealInfo returns new OptRefundDealInfo with value set to v. func NewOptRefundDealInfo(v RefundDealInfo) OptRefundDealInfo { return OptRefundDealInfo{ Value: v, Set: true, } } // OptRefundDealInfo is optional RefundDealInfo. type OptRefundDealInfo struct { Value RefundDealInfo Set bool } // IsSet returns true if OptRefundDealInfo was set. func (o OptRefundDealInfo) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRefundDealInfo) Reset() { var v RefundDealInfo o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRefundDealInfo) SetTo(v RefundDealInfo) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRefundDealInfo) Get() (v RefundDealInfo, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRefundDealInfo) Or(d RefundDealInfo) RefundDealInfo { if v, ok := o.Get(); ok { return v } return d } // NewOptRefundId returns new OptRefundId with value set to v. func NewOptRefundId(v RefundId) OptRefundId { return OptRefundId{ Value: v, Set: true, } } // OptRefundId is optional RefundId. type OptRefundId struct { Value RefundId Set bool } // IsSet returns true if OptRefundId was set. func (o OptRefundId) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRefundId) Reset() { var v RefundId o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRefundId) SetTo(v RefundId) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRefundId) Get() (v RefundId, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRefundId) Or(d RefundId) RefundId { if v, ok := o.Get(); ok { return v } return d } // NewOptRefundReceiptRegistration returns new OptRefundReceiptRegistration with value set to v. func NewOptRefundReceiptRegistration(v RefundReceiptRegistration) OptRefundReceiptRegistration { return OptRefundReceiptRegistration{ Value: v, Set: true, } } // OptRefundReceiptRegistration is optional RefundReceiptRegistration. type OptRefundReceiptRegistration struct { Value RefundReceiptRegistration Set bool } // IsSet returns true if OptRefundReceiptRegistration was set. func (o OptRefundReceiptRegistration) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRefundReceiptRegistration) Reset() { var v RefundReceiptRegistration o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRefundReceiptRegistration) SetTo(v RefundReceiptRegistration) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRefundReceiptRegistration) Get() (v RefundReceiptRegistration, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRefundReceiptRegistration) Or(d RefundReceiptRegistration) RefundReceiptRegistration { if v, ok := o.Get(); ok { return v } return d } // NewOptRefundRefundMethod returns new OptRefundRefundMethod with value set to v. func NewOptRefundRefundMethod(v RefundRefundMethod) OptRefundRefundMethod { return OptRefundRefundMethod{ Value: v, Set: true, } } // OptRefundRefundMethod is optional RefundRefundMethod. type OptRefundRefundMethod struct { Value RefundRefundMethod Set bool } // IsSet returns true if OptRefundRefundMethod was set. func (o OptRefundRefundMethod) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRefundRefundMethod) Reset() { var v RefundRefundMethod o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRefundRefundMethod) SetTo(v RefundRefundMethod) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRefundRefundMethod) Get() (v RefundRefundMethod, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRefundRefundMethod) Or(d RefundRefundMethod) RefundRefundMethod { if v, ok := o.Get(); ok { return v } return d } // NewOptRefundSourcesDataPlatformFeeAmount returns new OptRefundSourcesDataPlatformFeeAmount with value set to v. func NewOptRefundSourcesDataPlatformFeeAmount(v RefundSourcesDataPlatformFeeAmount) OptRefundSourcesDataPlatformFeeAmount { return OptRefundSourcesDataPlatformFeeAmount{ Value: v, Set: true, } } // OptRefundSourcesDataPlatformFeeAmount is optional RefundSourcesDataPlatformFeeAmount. type OptRefundSourcesDataPlatformFeeAmount struct { Value RefundSourcesDataPlatformFeeAmount Set bool } // IsSet returns true if OptRefundSourcesDataPlatformFeeAmount was set. func (o OptRefundSourcesDataPlatformFeeAmount) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRefundSourcesDataPlatformFeeAmount) Reset() { var v RefundSourcesDataPlatformFeeAmount o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRefundSourcesDataPlatformFeeAmount) SetTo(v RefundSourcesDataPlatformFeeAmount) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRefundSourcesDataPlatformFeeAmount) Get() (v RefundSourcesDataPlatformFeeAmount, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRefundSourcesDataPlatformFeeAmount) Or(d RefundSourcesDataPlatformFeeAmount) RefundSourcesDataPlatformFeeAmount { if v, ok := o.Get(); ok { return v } return d } // NewOptRefundStatus returns new OptRefundStatus with value set to v. func NewOptRefundStatus(v RefundStatus) OptRefundStatus { return OptRefundStatus{ Value: v, Set: true, } } // OptRefundStatus is optional RefundStatus. type OptRefundStatus struct { Value RefundStatus Set bool } // IsSet returns true if OptRefundStatus was set. func (o OptRefundStatus) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRefundStatus) Reset() { var v RefundStatus o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRefundStatus) SetTo(v RefundStatus) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRefundStatus) Get() (v RefundStatus, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRefundStatus) Or(d RefundStatus) RefundStatus { if v, ok := o.Get(); ok { return v } return d } // NewOptRefundsPostReqRefundMethodData returns new OptRefundsPostReqRefundMethodData with value set to v. func NewOptRefundsPostReqRefundMethodData(v RefundsPostReqRefundMethodData) OptRefundsPostReqRefundMethodData { return OptRefundsPostReqRefundMethodData{ Value: v, Set: true, } } // OptRefundsPostReqRefundMethodData is optional RefundsPostReqRefundMethodData. type OptRefundsPostReqRefundMethodData struct { Value RefundsPostReqRefundMethodData Set bool } // IsSet returns true if OptRefundsPostReqRefundMethodData was set. func (o OptRefundsPostReqRefundMethodData) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRefundsPostReqRefundMethodData) Reset() { var v RefundsPostReqRefundMethodData o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRefundsPostReqRefundMethodData) SetTo(v RefundsPostReqRefundMethodData) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRefundsPostReqRefundMethodData) Get() (v RefundsPostReqRefundMethodData, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRefundsPostReqRefundMethodData) Or(d RefundsPostReqRefundMethodData) RefundsPostReqRefundMethodData { if v, ok := o.Get(); ok { return v } return d } // NewOptReturnUrl returns new OptReturnUrl with value set to v. func NewOptReturnUrl(v ReturnUrl) OptReturnUrl { return OptReturnUrl{ Value: v, Set: true, } } // OptReturnUrl is optional ReturnUrl. type OptReturnUrl struct { Value ReturnUrl Set bool } // IsSet returns true if OptReturnUrl was set. func (o OptReturnUrl) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptReturnUrl) Reset() { var v ReturnUrl o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptReturnUrl) SetTo(v ReturnUrl) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptReturnUrl) Get() (v ReturnUrl, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptReturnUrl) Or(d ReturnUrl) ReturnUrl { if v, ok := o.Get(); ok { return v } return d } // NewOptRrn returns new OptRrn with value set to v. func NewOptRrn(v Rrn) OptRrn { return OptRrn{ Value: v, Set: true, } } // OptRrn is optional Rrn. type OptRrn struct { Value Rrn Set bool } // IsSet returns true if OptRrn was set. func (o OptRrn) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRrn) Reset() { var v Rrn o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRrn) SetTo(v Rrn) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRrn) Get() (v Rrn, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptRrn) Or(d Rrn) Rrn { if v, ok := o.Get(); ok { return v } return d } // NewOptSavePaymentMethodAttribute returns new OptSavePaymentMethodAttribute with value set to v. func NewOptSavePaymentMethodAttribute(v SavePaymentMethodAttribute) OptSavePaymentMethodAttribute { return OptSavePaymentMethodAttribute{ Value: v, Set: true, } } // OptSavePaymentMethodAttribute is optional SavePaymentMethodAttribute. type OptSavePaymentMethodAttribute struct { Value SavePaymentMethodAttribute Set bool } // IsSet returns true if OptSavePaymentMethodAttribute was set. func (o OptSavePaymentMethodAttribute) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptSavePaymentMethodAttribute) Reset() { var v SavePaymentMethodAttribute o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptSavePaymentMethodAttribute) SetTo(v SavePaymentMethodAttribute) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptSavePaymentMethodAttribute) Get() (v SavePaymentMethodAttribute, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptSavePaymentMethodAttribute) Or(d SavePaymentMethodAttribute) SavePaymentMethodAttribute { if v, ok := o.Get(); ok { return v } return d } // NewOptSavePaymentMethodBankCardConfirmation returns new OptSavePaymentMethodBankCardConfirmation with value set to v. func NewOptSavePaymentMethodBankCardConfirmation(v SavePaymentMethodBankCardConfirmation) OptSavePaymentMethodBankCardConfirmation { return OptSavePaymentMethodBankCardConfirmation{ Value: v, Set: true, } } // OptSavePaymentMethodBankCardConfirmation is optional SavePaymentMethodBankCardConfirmation. type OptSavePaymentMethodBankCardConfirmation struct { Value SavePaymentMethodBankCardConfirmation Set bool } // IsSet returns true if OptSavePaymentMethodBankCardConfirmation was set. func (o OptSavePaymentMethodBankCardConfirmation) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptSavePaymentMethodBankCardConfirmation) Reset() { var v SavePaymentMethodBankCardConfirmation o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptSavePaymentMethodBankCardConfirmation) SetTo(v SavePaymentMethodBankCardConfirmation) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptSavePaymentMethodBankCardConfirmation) Get() (v SavePaymentMethodBankCardConfirmation, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptSavePaymentMethodBankCardConfirmation) Or(d SavePaymentMethodBankCardConfirmation) SavePaymentMethodBankCardConfirmation { if v, ok := o.Get(); ok { return v } return d } // NewOptSavePaymentMethodDataBankCardHolder returns new OptSavePaymentMethodDataBankCardHolder with value set to v. func NewOptSavePaymentMethodDataBankCardHolder(v SavePaymentMethodDataBankCardHolder) OptSavePaymentMethodDataBankCardHolder { return OptSavePaymentMethodDataBankCardHolder{ Value: v, Set: true, } } // OptSavePaymentMethodDataBankCardHolder is optional SavePaymentMethodDataBankCardHolder. type OptSavePaymentMethodDataBankCardHolder struct { Value SavePaymentMethodDataBankCardHolder Set bool } // IsSet returns true if OptSavePaymentMethodDataBankCardHolder was set. func (o OptSavePaymentMethodDataBankCardHolder) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptSavePaymentMethodDataBankCardHolder) Reset() { var v SavePaymentMethodDataBankCardHolder o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptSavePaymentMethodDataBankCardHolder) SetTo(v SavePaymentMethodDataBankCardHolder) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptSavePaymentMethodDataBankCardHolder) Get() (v SavePaymentMethodDataBankCardHolder, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptSavePaymentMethodDataBankCardHolder) Or(d SavePaymentMethodDataBankCardHolder) SavePaymentMethodDataBankCardHolder { if v, ok := o.Get(); ok { return v } return d } // NewOptSbpPayerBankDetails returns new OptSbpPayerBankDetails with value set to v. func NewOptSbpPayerBankDetails(v SbpPayerBankDetails) OptSbpPayerBankDetails { return OptSbpPayerBankDetails{ Value: v, Set: true, } } // OptSbpPayerBankDetails is optional SbpPayerBankDetails. type OptSbpPayerBankDetails struct { Value SbpPayerBankDetails Set bool } // IsSet returns true if OptSbpPayerBankDetails was set. func (o OptSbpPayerBankDetails) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptSbpPayerBankDetails) Reset() { var v SbpPayerBankDetails o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptSbpPayerBankDetails) SetTo(v SbpPayerBankDetails) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptSbpPayerBankDetails) Get() (v SbpPayerBankDetails, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptSbpPayerBankDetails) Or(d SbpPayerBankDetails) SbpPayerBankDetails { if v, ok := o.Get(); ok { return v } return d } // NewOptString returns new OptString with value set to v. func NewOptString(v string) OptString { return OptString{ Value: v, Set: true, } } // OptString is optional string. type OptString struct { Value string Set bool } // IsSet returns true if OptString was set. func (o OptString) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptString) Reset() { var v string o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptString) SetTo(v string) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptString) Get() (v string, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptString) Or(d string) string { if v, ok := o.Get(); ok { return v } return d } // NewOptTaxSystemCode returns new OptTaxSystemCode with value set to v. func NewOptTaxSystemCode(v TaxSystemCode) OptTaxSystemCode { return OptTaxSystemCode{ Value: v, Set: true, } } // OptTaxSystemCode is optional TaxSystemCode. type OptTaxSystemCode struct { Value TaxSystemCode Set bool } // IsSet returns true if OptTaxSystemCode was set. func (o OptTaxSystemCode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptTaxSystemCode) Reset() { var v TaxSystemCode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptTaxSystemCode) SetTo(v TaxSystemCode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptTaxSystemCode) Get() (v TaxSystemCode, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptTaxSystemCode) Or(d TaxSystemCode) TaxSystemCode { if v, ok := o.Get(); ok { return v } return d } // NewOptTest returns new OptTest with value set to v. func NewOptTest(v Test) OptTest { return OptTest{ Value: v, Set: true, } } // OptTest is optional Test. type OptTest struct { Value Test Set bool } // IsSet returns true if OptTest was set. func (o OptTest) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptTest) Reset() { var v Test o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptTest) SetTo(v Test) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptTest) Get() (v Test, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptTest) Or(d Test) Test { if v, ok := o.Get(); ok { return v } return d } // NewOptTooManyRequestsCode returns new OptTooManyRequestsCode with value set to v. func NewOptTooManyRequestsCode(v TooManyRequestsCode) OptTooManyRequestsCode { return OptTooManyRequestsCode{ Value: v, Set: true, } } // OptTooManyRequestsCode is optional TooManyRequestsCode. type OptTooManyRequestsCode struct { Value TooManyRequestsCode Set bool } // IsSet returns true if OptTooManyRequestsCode was set. func (o OptTooManyRequestsCode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptTooManyRequestsCode) Reset() { var v TooManyRequestsCode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptTooManyRequestsCode) SetTo(v TooManyRequestsCode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptTooManyRequestsCode) Get() (v TooManyRequestsCode, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptTooManyRequestsCode) Or(d TooManyRequestsCode) TooManyRequestsCode { if v, ok := o.Get(); ok { return v } return d } // NewOptTooManyRequestsType returns new OptTooManyRequestsType with value set to v. func NewOptTooManyRequestsType(v TooManyRequestsType) OptTooManyRequestsType { return OptTooManyRequestsType{ Value: v, Set: true, } } // OptTooManyRequestsType is optional TooManyRequestsType. type OptTooManyRequestsType struct { Value TooManyRequestsType Set bool } // IsSet returns true if OptTooManyRequestsType was set. func (o OptTooManyRequestsType) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptTooManyRequestsType) Reset() { var v TooManyRequestsType o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptTooManyRequestsType) SetTo(v TooManyRequestsType) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptTooManyRequestsType) Get() (v TooManyRequestsType, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptTooManyRequestsType) Or(d TooManyRequestsType) TooManyRequestsType { if v, ok := o.Get(); ok { return v } return d } // NewOptTransferDataPaymentPlatformFeeAmount returns new OptTransferDataPaymentPlatformFeeAmount with value set to v. func NewOptTransferDataPaymentPlatformFeeAmount(v TransferDataPaymentPlatformFeeAmount) OptTransferDataPaymentPlatformFeeAmount { return OptTransferDataPaymentPlatformFeeAmount{ Value: v, Set: true, } } // OptTransferDataPaymentPlatformFeeAmount is optional TransferDataPaymentPlatformFeeAmount. type OptTransferDataPaymentPlatformFeeAmount struct { Value TransferDataPaymentPlatformFeeAmount Set bool } // IsSet returns true if OptTransferDataPaymentPlatformFeeAmount was set. func (o OptTransferDataPaymentPlatformFeeAmount) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptTransferDataPaymentPlatformFeeAmount) Reset() { var v TransferDataPaymentPlatformFeeAmount o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptTransferDataPaymentPlatformFeeAmount) SetTo(v TransferDataPaymentPlatformFeeAmount) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptTransferDataPaymentPlatformFeeAmount) Get() (v TransferDataPaymentPlatformFeeAmount, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptTransferDataPaymentPlatformFeeAmount) Or(d TransferDataPaymentPlatformFeeAmount) TransferDataPaymentPlatformFeeAmount { if v, ok := o.Get(); ok { return v } return d } // NewOptTransferDataPlatformFeeAmount returns new OptTransferDataPlatformFeeAmount with value set to v. func NewOptTransferDataPlatformFeeAmount(v TransferDataPlatformFeeAmount) OptTransferDataPlatformFeeAmount { return OptTransferDataPlatformFeeAmount{ Value: v, Set: true, } } // OptTransferDataPlatformFeeAmount is optional TransferDataPlatformFeeAmount. type OptTransferDataPlatformFeeAmount struct { Value TransferDataPlatformFeeAmount Set bool } // IsSet returns true if OptTransferDataPlatformFeeAmount was set. func (o OptTransferDataPlatformFeeAmount) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptTransferDataPlatformFeeAmount) Reset() { var v TransferDataPlatformFeeAmount o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptTransferDataPlatformFeeAmount) SetTo(v TransferDataPlatformFeeAmount) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptTransferDataPlatformFeeAmount) Get() (v TransferDataPlatformFeeAmount, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptTransferDataPlatformFeeAmount) Or(d TransferDataPlatformFeeAmount) TransferDataPlatformFeeAmount { if v, ok := o.Get(); ok { return v } return d } // NewOptTransferPlatformFeeAmount returns new OptTransferPlatformFeeAmount with value set to v. func NewOptTransferPlatformFeeAmount(v TransferPlatformFeeAmount) OptTransferPlatformFeeAmount { return OptTransferPlatformFeeAmount{ Value: v, Set: true, } } // OptTransferPlatformFeeAmount is optional TransferPlatformFeeAmount. type OptTransferPlatformFeeAmount struct { Value TransferPlatformFeeAmount Set bool } // IsSet returns true if OptTransferPlatformFeeAmount was set. func (o OptTransferPlatformFeeAmount) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptTransferPlatformFeeAmount) Reset() { var v TransferPlatformFeeAmount o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptTransferPlatformFeeAmount) SetTo(v TransferPlatformFeeAmount) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptTransferPlatformFeeAmount) Get() (v TransferPlatformFeeAmount, ok bool) { if !o.Set { return v, false } return o.Value, true } // Or returns value if set, or given parameter if does not. func (o OptTransferPlatformFeeAmount) Or(d TransferPlatformFeeAmount) TransferPlatformFeeAmount { if v, ok := o.Get(); ok { return v } return d } // Payment object (Payment) contains the relevant information about the payment. // Ref: #/components/schemas/Payment type Payment struct { ID PaymentId `json:"id"` Status PaymentStatus `json:"status"` Amount PaymentAmount `json:"amount"` IncomeAmount OptPaymentIncomeAmount `json:"income_amount"` Description OptString `json:"description"` // Payment recipient. Recipient PaymentRecipient `json:"recipient"` PaymentMethod OptPaymentPaymentMethod `json:"payment_method"` // Time of payment capture, based on UTC: https://en.wikipedia.org/wiki/Coordinated_Universal_Time // and specified in the ISO 8601: https://en.wikipedia.org/wiki/ISO_8601 format. CapturedAt OptDateTime `json:"captured_at"` // Time of order creation, based on UTC: https://en.wikipedia.org/wiki/Coordinated_Universal_Time and // specified in the ISO 8601: https://en.wikipedia.org/wiki/ISO_8601 format. Example: // 2017-11-03T11:52:31.827Z. CreatedAt time.Time `json:"created_at"` // The period during which you can cancel or capture a payment for free. The payment with the // waiting_for_capture status will be automatically canceled at the specified time. Based on UTC: // https://en.wikipedia.org/wiki/Coordinated_Universal_Time and specified in the ISO 8601: https://en. // wikipedia.org/wiki/ISO_8601 format. Example: 2017-11-03T11:52:31.827Z. ExpiresAt OptDateTime `json:"expires_at"` Confirmation OptPaymentConfirmation `json:"confirmation"` Test Test `json:"test"` RefundedAmount OptPaymentRefundedAmount `json:"refunded_amount"` // The attribute of a paid order. Paid bool `json:"paid"` // Availability of the option to make a refund via API. Refundable bool `json:"refundable"` ReceiptRegistration OptPaymentReceiptRegistration `json:"receipt_registration"` Metadata OptMetadata `json:"metadata"` CancellationDetails OptPaymentCancellationDetails `json:"cancellation_details"` AuthorizationDetails OptAuthorizationDetails `json:"authorization_details"` // Information about money distribution: the amounts of transfers and the stores to be transferred to. // Specified if you use Split payments: https://yookassa. // ru/developers/solutions-for-platforms/split-payments/basics. Transfers []Transfer `json:"transfers"` Deal OptPaymentDeal `json:"deal"` MerchantCustomerID OptString `json:"merchant_customer_id"` // Данные о выставленном счете, в рамках которого // проведен платеж. InvoiceDetails OptPaymentInvoiceDetails `json:"invoice_details"` } // GetID returns the value of ID. func (s *Payment) GetID() PaymentId { return s.ID } // GetStatus returns the value of Status. func (s *Payment) GetStatus() PaymentStatus { return s.Status } // GetAmount returns the value of Amount. func (s *Payment) GetAmount() PaymentAmount { return s.Amount } // GetIncomeAmount returns the value of IncomeAmount. func (s *Payment) GetIncomeAmount() OptPaymentIncomeAmount { return s.IncomeAmount } // GetDescription returns the value of Description. func (s *Payment) GetDescription() OptString { return s.Description } // GetRecipient returns the value of Recipient. func (s *Payment) GetRecipient() PaymentRecipient { return s.Recipient } // GetPaymentMethod returns the value of PaymentMethod. func (s *Payment) GetPaymentMethod() OptPaymentPaymentMethod { return s.PaymentMethod } // GetCapturedAt returns the value of CapturedAt. func (s *Payment) GetCapturedAt() OptDateTime { return s.CapturedAt } // GetCreatedAt returns the value of CreatedAt. func (s *Payment) GetCreatedAt() time.Time { return s.CreatedAt } // GetExpiresAt returns the value of ExpiresAt. func (s *Payment) GetExpiresAt() OptDateTime { return s.ExpiresAt } // GetConfirmation returns the value of Confirmation. func (s *Payment) GetConfirmation() OptPaymentConfirmation { return s.Confirmation } // GetTest returns the value of Test. func (s *Payment) GetTest() Test { return s.Test } // GetRefundedAmount returns the value of RefundedAmount. func (s *Payment) GetRefundedAmount() OptPaymentRefundedAmount { return s.RefundedAmount } // GetPaid returns the value of Paid. func (s *Payment) GetPaid() bool { return s.Paid } // GetRefundable returns the value of Refundable. func (s *Payment) GetRefundable() bool { return s.Refundable } // GetReceiptRegistration returns the value of ReceiptRegistration. func (s *Payment) GetReceiptRegistration() OptPaymentReceiptRegistration { return s.ReceiptRegistration } // GetMetadata returns the value of Metadata. func (s *Payment) GetMetadata() OptMetadata { return s.Metadata } // GetCancellationDetails returns the value of CancellationDetails. func (s *Payment) GetCancellationDetails() OptPaymentCancellationDetails { return s.CancellationDetails } // GetAuthorizationDetails returns the value of AuthorizationDetails. func (s *Payment) GetAuthorizationDetails() OptAuthorizationDetails { return s.AuthorizationDetails } // GetTransfers returns the value of Transfers. func (s *Payment) GetTransfers() []Transfer { return s.Transfers } // GetDeal returns the value of Deal. func (s *Payment) GetDeal() OptPaymentDeal { return s.Deal } // GetMerchantCustomerID returns the value of MerchantCustomerID. func (s *Payment) GetMerchantCustomerID() OptString { return s.MerchantCustomerID } // GetInvoiceDetails returns the value of InvoiceDetails. func (s *Payment) GetInvoiceDetails() OptPaymentInvoiceDetails { return s.InvoiceDetails } // SetID sets the value of ID. func (s *Payment) SetID(val PaymentId) { s.ID = val } // SetStatus sets the value of Status. func (s *Payment) SetStatus(val PaymentStatus) { s.Status = val } // SetAmount sets the value of Amount. func (s *Payment) SetAmount(val PaymentAmount) { s.Amount = val } // SetIncomeAmount sets the value of IncomeAmount. func (s *Payment) SetIncomeAmount(val OptPaymentIncomeAmount) { s.IncomeAmount = val } // SetDescription sets the value of Description. func (s *Payment) SetDescription(val OptString) { s.Description = val } // SetRecipient sets the value of Recipient. func (s *Payment) SetRecipient(val PaymentRecipient) { s.Recipient = val } // SetPaymentMethod sets the value of PaymentMethod. func (s *Payment) SetPaymentMethod(val OptPaymentPaymentMethod) { s.PaymentMethod = val } // SetCapturedAt sets the value of CapturedAt. func (s *Payment) SetCapturedAt(val OptDateTime) { s.CapturedAt = val } // SetCreatedAt sets the value of CreatedAt. func (s *Payment) SetCreatedAt(val time.Time) { s.CreatedAt = val } // SetExpiresAt sets the value of ExpiresAt. func (s *Payment) SetExpiresAt(val OptDateTime) { s.ExpiresAt = val } // SetConfirmation sets the value of Confirmation. func (s *Payment) SetConfirmation(val OptPaymentConfirmation) { s.Confirmation = val } // SetTest sets the value of Test. func (s *Payment) SetTest(val Test) { s.Test = val } // SetRefundedAmount sets the value of RefundedAmount. func (s *Payment) SetRefundedAmount(val OptPaymentRefundedAmount) { s.RefundedAmount = val } // SetPaid sets the value of Paid. func (s *Payment) SetPaid(val bool) { s.Paid = val } // SetRefundable sets the value of Refundable. func (s *Payment) SetRefundable(val bool) { s.Refundable = val } // SetReceiptRegistration sets the value of ReceiptRegistration. func (s *Payment) SetReceiptRegistration(val OptPaymentReceiptRegistration) { s.ReceiptRegistration = val } // SetMetadata sets the value of Metadata. func (s *Payment) SetMetadata(val OptMetadata) { s.Metadata = val } // SetCancellationDetails sets the value of CancellationDetails. func (s *Payment) SetCancellationDetails(val OptPaymentCancellationDetails) { s.CancellationDetails = val } // SetAuthorizationDetails sets the value of AuthorizationDetails. func (s *Payment) SetAuthorizationDetails(val OptAuthorizationDetails) { s.AuthorizationDetails = val } // SetTransfers sets the value of Transfers. func (s *Payment) SetTransfers(val []Transfer) { s.Transfers = val } // SetDeal sets the value of Deal. func (s *Payment) SetDeal(val OptPaymentDeal) { s.Deal = val } // SetMerchantCustomerID sets the value of MerchantCustomerID. func (s *Payment) SetMerchantCustomerID(val OptString) { s.MerchantCustomerID = val } // SetInvoiceDetails sets the value of InvoiceDetails. func (s *Payment) SetInvoiceDetails(val OptPaymentInvoiceDetails) { s.InvoiceDetails = val } func (*Payment) paymentsPaymentIDCancelPostRes() {} func (*Payment) paymentsPaymentIDCapturePostRes() {} func (*Payment) paymentsPaymentIDGetRes() {} func (*Payment) paymentsPostRes() {} // Сумма в выбранной валюте. type PaymentAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *PaymentAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *PaymentAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *PaymentAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *PaymentAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Commentary to the canceled status: who and why canceled the payment. More about canceled payments: // https://yookassa.ru/developers/payment-acceptance/after-the-payment/declined-payments. // Ref: #/components/schemas/PaymentCancellationDetails type PaymentCancellationDetails struct { // The participant of the payment process that made the decision to cancel the payment. Possible // values are yoo_money, payment_network, and merchant. More about initiators of payment cancelation: // https://yookassa. // ru/developers/payment-acceptance/after-the-payment/declined-payments#cancellation-details-party. Party PaymentCancellationDetailsParty `json:"party"` // Reason behind the cancelation. The list and descriptions of possible values: https://yookassa. // ru/developers/payment-acceptance/after-the-payment/declined-payments#cancellation-details-reason. Reason PaymentCancellationDetailsReason `json:"reason"` } // GetParty returns the value of Party. func (s *PaymentCancellationDetails) GetParty() PaymentCancellationDetailsParty { return s.Party } // GetReason returns the value of Reason. func (s *PaymentCancellationDetails) GetReason() PaymentCancellationDetailsReason { return s.Reason } // SetParty sets the value of Party. func (s *PaymentCancellationDetails) SetParty(val PaymentCancellationDetailsParty) { s.Party = val } // SetReason sets the value of Reason. func (s *PaymentCancellationDetails) SetReason(val PaymentCancellationDetailsReason) { s.Reason = val } // The participant of the payment process that made the decision to cancel the payment. Possible // values are yoo_money, payment_network, and merchant. More about initiators of payment cancelation: // https://yookassa. // ru/developers/payment-acceptance/after-the-payment/declined-payments#cancellation-details-party. type PaymentCancellationDetailsParty string const ( PaymentCancellationDetailsPartyYooMoney PaymentCancellationDetailsParty = "yoo_money" PaymentCancellationDetailsPartyPaymentNetwork PaymentCancellationDetailsParty = "payment_network" PaymentCancellationDetailsPartyMerchant PaymentCancellationDetailsParty = "merchant" ) // AllValues returns all PaymentCancellationDetailsParty values. func (PaymentCancellationDetailsParty) AllValues() []PaymentCancellationDetailsParty { return []PaymentCancellationDetailsParty{ PaymentCancellationDetailsPartyYooMoney, PaymentCancellationDetailsPartyPaymentNetwork, PaymentCancellationDetailsPartyMerchant, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentCancellationDetailsParty) MarshalText() ([]byte, error) { switch s { case PaymentCancellationDetailsPartyYooMoney: return []byte(s), nil case PaymentCancellationDetailsPartyPaymentNetwork: return []byte(s), nil case PaymentCancellationDetailsPartyMerchant: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentCancellationDetailsParty) UnmarshalText(data []byte) error { switch PaymentCancellationDetailsParty(data) { case PaymentCancellationDetailsPartyYooMoney: *s = PaymentCancellationDetailsPartyYooMoney return nil case PaymentCancellationDetailsPartyPaymentNetwork: *s = PaymentCancellationDetailsPartyPaymentNetwork return nil case PaymentCancellationDetailsPartyMerchant: *s = PaymentCancellationDetailsPartyMerchant return nil default: return errors.Errorf("invalid value: %q", data) } } // Reason behind the cancelation. The list and descriptions of possible values: https://yookassa. // ru/developers/payment-acceptance/after-the-payment/declined-payments#cancellation-details-reason. type PaymentCancellationDetailsReason string const ( PaymentCancellationDetailsReason3dSecureFailed PaymentCancellationDetailsReason = "3d_secure_failed" PaymentCancellationDetailsReasonCallIssuer PaymentCancellationDetailsReason = "call_issuer" PaymentCancellationDetailsReasonCardExpired PaymentCancellationDetailsReason = "card_expired" PaymentCancellationDetailsReasonPaymentMethodLimitExceeded PaymentCancellationDetailsReason = "payment_method_limit_exceeded" PaymentCancellationDetailsReasonPaymentMethodRestricted PaymentCancellationDetailsReason = "payment_method_restricted" PaymentCancellationDetailsReasonCountryForbidden PaymentCancellationDetailsReason = "country_forbidden" PaymentCancellationDetailsReasonGeneralDecline PaymentCancellationDetailsReason = "general_decline" PaymentCancellationDetailsReasonFraudSuspected PaymentCancellationDetailsReason = "fraud_suspected" PaymentCancellationDetailsReasonIdentificationRequired PaymentCancellationDetailsReason = "identification_required" PaymentCancellationDetailsReasonInsufficientFunds PaymentCancellationDetailsReason = "insufficient_funds" PaymentCancellationDetailsReasonInvalidCardNumber PaymentCancellationDetailsReason = "invalid_card_number" PaymentCancellationDetailsReasonInvalidCsc PaymentCancellationDetailsReason = "invalid_csc" PaymentCancellationDetailsReasonIssuerUnavailable PaymentCancellationDetailsReason = "issuer_unavailable" PaymentCancellationDetailsReasonCanceledByMerchant PaymentCancellationDetailsReason = "canceled_by_merchant" PaymentCancellationDetailsReasonPermissionRevoked PaymentCancellationDetailsReason = "permission_revoked" PaymentCancellationDetailsReasonInternalTimeout PaymentCancellationDetailsReason = "internal_timeout" PaymentCancellationDetailsReasonExpiredOnConfirmation PaymentCancellationDetailsReason = "expired_on_confirmation" PaymentCancellationDetailsReasonExpiredOnCapture PaymentCancellationDetailsReason = "expired_on_capture" PaymentCancellationDetailsReasonUnsupportedMobileOperator PaymentCancellationDetailsReason = "unsupported_mobile_operator" PaymentCancellationDetailsReasonDealExpired PaymentCancellationDetailsReason = "deal_expired" ) // AllValues returns all PaymentCancellationDetailsReason values. func (PaymentCancellationDetailsReason) AllValues() []PaymentCancellationDetailsReason { return []PaymentCancellationDetailsReason{ PaymentCancellationDetailsReason3dSecureFailed, PaymentCancellationDetailsReasonCallIssuer, PaymentCancellationDetailsReasonCardExpired, PaymentCancellationDetailsReasonPaymentMethodLimitExceeded, PaymentCancellationDetailsReasonPaymentMethodRestricted, PaymentCancellationDetailsReasonCountryForbidden, PaymentCancellationDetailsReasonGeneralDecline, PaymentCancellationDetailsReasonFraudSuspected, PaymentCancellationDetailsReasonIdentificationRequired, PaymentCancellationDetailsReasonInsufficientFunds, PaymentCancellationDetailsReasonInvalidCardNumber, PaymentCancellationDetailsReasonInvalidCsc, PaymentCancellationDetailsReasonIssuerUnavailable, PaymentCancellationDetailsReasonCanceledByMerchant, PaymentCancellationDetailsReasonPermissionRevoked, PaymentCancellationDetailsReasonInternalTimeout, PaymentCancellationDetailsReasonExpiredOnConfirmation, PaymentCancellationDetailsReasonExpiredOnCapture, PaymentCancellationDetailsReasonUnsupportedMobileOperator, PaymentCancellationDetailsReasonDealExpired, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentCancellationDetailsReason) MarshalText() ([]byte, error) { switch s { case PaymentCancellationDetailsReason3dSecureFailed: return []byte(s), nil case PaymentCancellationDetailsReasonCallIssuer: return []byte(s), nil case PaymentCancellationDetailsReasonCardExpired: return []byte(s), nil case PaymentCancellationDetailsReasonPaymentMethodLimitExceeded: return []byte(s), nil case PaymentCancellationDetailsReasonPaymentMethodRestricted: return []byte(s), nil case PaymentCancellationDetailsReasonCountryForbidden: return []byte(s), nil case PaymentCancellationDetailsReasonGeneralDecline: return []byte(s), nil case PaymentCancellationDetailsReasonFraudSuspected: return []byte(s), nil case PaymentCancellationDetailsReasonIdentificationRequired: return []byte(s), nil case PaymentCancellationDetailsReasonInsufficientFunds: return []byte(s), nil case PaymentCancellationDetailsReasonInvalidCardNumber: return []byte(s), nil case PaymentCancellationDetailsReasonInvalidCsc: return []byte(s), nil case PaymentCancellationDetailsReasonIssuerUnavailable: return []byte(s), nil case PaymentCancellationDetailsReasonCanceledByMerchant: return []byte(s), nil case PaymentCancellationDetailsReasonPermissionRevoked: return []byte(s), nil case PaymentCancellationDetailsReasonInternalTimeout: return []byte(s), nil case PaymentCancellationDetailsReasonExpiredOnConfirmation: return []byte(s), nil case PaymentCancellationDetailsReasonExpiredOnCapture: return []byte(s), nil case PaymentCancellationDetailsReasonUnsupportedMobileOperator: return []byte(s), nil case PaymentCancellationDetailsReasonDealExpired: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentCancellationDetailsReason) UnmarshalText(data []byte) error { switch PaymentCancellationDetailsReason(data) { case PaymentCancellationDetailsReason3dSecureFailed: *s = PaymentCancellationDetailsReason3dSecureFailed return nil case PaymentCancellationDetailsReasonCallIssuer: *s = PaymentCancellationDetailsReasonCallIssuer return nil case PaymentCancellationDetailsReasonCardExpired: *s = PaymentCancellationDetailsReasonCardExpired return nil case PaymentCancellationDetailsReasonPaymentMethodLimitExceeded: *s = PaymentCancellationDetailsReasonPaymentMethodLimitExceeded return nil case PaymentCancellationDetailsReasonPaymentMethodRestricted: *s = PaymentCancellationDetailsReasonPaymentMethodRestricted return nil case PaymentCancellationDetailsReasonCountryForbidden: *s = PaymentCancellationDetailsReasonCountryForbidden return nil case PaymentCancellationDetailsReasonGeneralDecline: *s = PaymentCancellationDetailsReasonGeneralDecline return nil case PaymentCancellationDetailsReasonFraudSuspected: *s = PaymentCancellationDetailsReasonFraudSuspected return nil case PaymentCancellationDetailsReasonIdentificationRequired: *s = PaymentCancellationDetailsReasonIdentificationRequired return nil case PaymentCancellationDetailsReasonInsufficientFunds: *s = PaymentCancellationDetailsReasonInsufficientFunds return nil case PaymentCancellationDetailsReasonInvalidCardNumber: *s = PaymentCancellationDetailsReasonInvalidCardNumber return nil case PaymentCancellationDetailsReasonInvalidCsc: *s = PaymentCancellationDetailsReasonInvalidCsc return nil case PaymentCancellationDetailsReasonIssuerUnavailable: *s = PaymentCancellationDetailsReasonIssuerUnavailable return nil case PaymentCancellationDetailsReasonCanceledByMerchant: *s = PaymentCancellationDetailsReasonCanceledByMerchant return nil case PaymentCancellationDetailsReasonPermissionRevoked: *s = PaymentCancellationDetailsReasonPermissionRevoked return nil case PaymentCancellationDetailsReasonInternalTimeout: *s = PaymentCancellationDetailsReasonInternalTimeout return nil case PaymentCancellationDetailsReasonExpiredOnConfirmation: *s = PaymentCancellationDetailsReasonExpiredOnConfirmation return nil case PaymentCancellationDetailsReasonExpiredOnCapture: *s = PaymentCancellationDetailsReasonExpiredOnCapture return nil case PaymentCancellationDetailsReasonUnsupportedMobileOperator: *s = PaymentCancellationDetailsReasonUnsupportedMobileOperator return nil case PaymentCancellationDetailsReasonDealExpired: *s = PaymentCancellationDetailsReasonDealExpired return nil default: return errors.Errorf("invalid value: %q", data) } } // PaymentConfirmation represents sum type. type PaymentConfirmation struct { Type PaymentConfirmationType // switch on this field ConfirmationRedirect ConfirmationRedirect Confirmation Confirmation ConfirmationQr ConfirmationQr ConfirmationEmbedded ConfirmationEmbedded ConfirmationMobileApplication ConfirmationMobileApplication } // PaymentConfirmationType is oneOf type of PaymentConfirmation. type PaymentConfirmationType string // Possible values for PaymentConfirmationType. const ( ConfirmationRedirectPaymentConfirmation PaymentConfirmationType = "ConfirmationRedirect" ConfirmationPaymentConfirmation PaymentConfirmationType = "Confirmation" ConfirmationQrPaymentConfirmation PaymentConfirmationType = "ConfirmationQr" ConfirmationEmbeddedPaymentConfirmation PaymentConfirmationType = "ConfirmationEmbedded" ConfirmationMobileApplicationPaymentConfirmation PaymentConfirmationType = "ConfirmationMobileApplication" ) // IsConfirmationRedirect reports whether PaymentConfirmation is ConfirmationRedirect. func (s PaymentConfirmation) IsConfirmationRedirect() bool { return s.Type == ConfirmationRedirectPaymentConfirmation } // IsConfirmation reports whether PaymentConfirmation is Confirmation. func (s PaymentConfirmation) IsConfirmation() bool { return s.Type == ConfirmationPaymentConfirmation } // IsConfirmationQr reports whether PaymentConfirmation is ConfirmationQr. func (s PaymentConfirmation) IsConfirmationQr() bool { return s.Type == ConfirmationQrPaymentConfirmation } // IsConfirmationEmbedded reports whether PaymentConfirmation is ConfirmationEmbedded. func (s PaymentConfirmation) IsConfirmationEmbedded() bool { return s.Type == ConfirmationEmbeddedPaymentConfirmation } // IsConfirmationMobileApplication reports whether PaymentConfirmation is ConfirmationMobileApplication. func (s PaymentConfirmation) IsConfirmationMobileApplication() bool { return s.Type == ConfirmationMobileApplicationPaymentConfirmation } // SetConfirmationRedirect sets PaymentConfirmation to ConfirmationRedirect. func (s *PaymentConfirmation) SetConfirmationRedirect(v ConfirmationRedirect) { s.Type = ConfirmationRedirectPaymentConfirmation s.ConfirmationRedirect = v } // GetConfirmationRedirect returns ConfirmationRedirect and true boolean if PaymentConfirmation is ConfirmationRedirect. func (s PaymentConfirmation) GetConfirmationRedirect() (v ConfirmationRedirect, ok bool) { if !s.IsConfirmationRedirect() { return v, false } return s.ConfirmationRedirect, true } // NewConfirmationRedirectPaymentConfirmation returns new PaymentConfirmation from ConfirmationRedirect. func NewConfirmationRedirectPaymentConfirmation(v ConfirmationRedirect) PaymentConfirmation { var s PaymentConfirmation s.SetConfirmationRedirect(v) return s } // SetConfirmation sets PaymentConfirmation to Confirmation. func (s *PaymentConfirmation) SetConfirmation(v Confirmation) { s.Type = ConfirmationPaymentConfirmation s.Confirmation = v } // GetConfirmation returns Confirmation and true boolean if PaymentConfirmation is Confirmation. func (s PaymentConfirmation) GetConfirmation() (v Confirmation, ok bool) { if !s.IsConfirmation() { return v, false } return s.Confirmation, true } // NewConfirmationPaymentConfirmation returns new PaymentConfirmation from Confirmation. func NewConfirmationPaymentConfirmation(v Confirmation) PaymentConfirmation { var s PaymentConfirmation s.SetConfirmation(v) return s } // SetConfirmationQr sets PaymentConfirmation to ConfirmationQr. func (s *PaymentConfirmation) SetConfirmationQr(v ConfirmationQr) { s.Type = ConfirmationQrPaymentConfirmation s.ConfirmationQr = v } // GetConfirmationQr returns ConfirmationQr and true boolean if PaymentConfirmation is ConfirmationQr. func (s PaymentConfirmation) GetConfirmationQr() (v ConfirmationQr, ok bool) { if !s.IsConfirmationQr() { return v, false } return s.ConfirmationQr, true } // NewConfirmationQrPaymentConfirmation returns new PaymentConfirmation from ConfirmationQr. func NewConfirmationQrPaymentConfirmation(v ConfirmationQr) PaymentConfirmation { var s PaymentConfirmation s.SetConfirmationQr(v) return s } // SetConfirmationEmbedded sets PaymentConfirmation to ConfirmationEmbedded. func (s *PaymentConfirmation) SetConfirmationEmbedded(v ConfirmationEmbedded) { s.Type = ConfirmationEmbeddedPaymentConfirmation s.ConfirmationEmbedded = v } // GetConfirmationEmbedded returns ConfirmationEmbedded and true boolean if PaymentConfirmation is ConfirmationEmbedded. func (s PaymentConfirmation) GetConfirmationEmbedded() (v ConfirmationEmbedded, ok bool) { if !s.IsConfirmationEmbedded() { return v, false } return s.ConfirmationEmbedded, true } // NewConfirmationEmbeddedPaymentConfirmation returns new PaymentConfirmation from ConfirmationEmbedded. func NewConfirmationEmbeddedPaymentConfirmation(v ConfirmationEmbedded) PaymentConfirmation { var s PaymentConfirmation s.SetConfirmationEmbedded(v) return s } // SetConfirmationMobileApplication sets PaymentConfirmation to ConfirmationMobileApplication. func (s *PaymentConfirmation) SetConfirmationMobileApplication(v ConfirmationMobileApplication) { s.Type = ConfirmationMobileApplicationPaymentConfirmation s.ConfirmationMobileApplication = v } // GetConfirmationMobileApplication returns ConfirmationMobileApplication and true boolean if PaymentConfirmation is ConfirmationMobileApplication. func (s PaymentConfirmation) GetConfirmationMobileApplication() (v ConfirmationMobileApplication, ok bool) { if !s.IsConfirmationMobileApplication() { return v, false } return s.ConfirmationMobileApplication, true } // NewConfirmationMobileApplicationPaymentConfirmation returns new PaymentConfirmation from ConfirmationMobileApplication. func NewConfirmationMobileApplicationPaymentConfirmation(v ConfirmationMobileApplication) PaymentConfirmation { var s PaymentConfirmation s.SetConfirmationMobileApplication(v) return s } type PaymentDeal struct { ID DealId `json:"id"` Settlements SettlementPaymentArray `json:"settlements"` } // GetID returns the value of ID. func (s *PaymentDeal) GetID() DealId { return s.ID } // GetSettlements returns the value of Settlements. func (s *PaymentDeal) GetSettlements() SettlementPaymentArray { return s.Settlements } // SetID sets the value of ID. func (s *PaymentDeal) SetID(val DealId) { s.ID = val } // SetSettlements sets the value of Settlements. func (s *PaymentDeal) SetSettlements(val SettlementPaymentArray) { s.Settlements = val } type PaymentId string // Сумма в выбранной валюте. type PaymentIncomeAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *PaymentIncomeAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *PaymentIncomeAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *PaymentIncomeAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *PaymentIncomeAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Данные о выставленном счете, в рамках которого // проведен платеж. type PaymentInvoiceDetails struct { ID OptInvoiceId `json:"id"` } // GetID returns the value of ID. func (s *PaymentInvoiceDetails) GetID() OptInvoiceId { return s.ID } // SetID sets the value of ID. func (s *PaymentInvoiceDetails) SetID(val OptInvoiceId) { s.ID = val } // Список платежей. Платежи отсортированы по времени // создания в порядке убывания (от новых к старым). Если // результатов больше, чем задано в limit, список будет // выводиться фрагментами. В этом случае в ответе на // запрос вернется фрагмент списка и параметр next_cursor с // указателем на следующий фрагмент. // Ref: #/components/schemas/PaymentList type PaymentList struct { // Формат выдачи результатов запроса. Возможное // значение: list (список). Type PaymentListType `json:"type"` Items []Payment `json:"items"` NextCursor OptNextCursor `json:"next_cursor"` } // GetType returns the value of Type. func (s *PaymentList) GetType() PaymentListType { return s.Type } // GetItems returns the value of Items. func (s *PaymentList) GetItems() []Payment { return s.Items } // GetNextCursor returns the value of NextCursor. func (s *PaymentList) GetNextCursor() OptNextCursor { return s.NextCursor } // SetType sets the value of Type. func (s *PaymentList) SetType(val PaymentListType) { s.Type = val } // SetItems sets the value of Items. func (s *PaymentList) SetItems(val []Payment) { s.Items = val } // SetNextCursor sets the value of NextCursor. func (s *PaymentList) SetNextCursor(val OptNextCursor) { s.NextCursor = val } func (*PaymentList) paymentsGetRes() {} // Формат выдачи результатов запроса. Возможное // значение: list (список). type PaymentListType string const ( PaymentListTypeList PaymentListType = "list" ) // AllValues returns all PaymentListType values. func (PaymentListType) AllValues() []PaymentListType { return []PaymentListType{ PaymentListTypeList, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentListType) MarshalText() ([]byte, error) { switch s { case PaymentListTypeList: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentListType) UnmarshalText(data []byte) error { switch PaymentListType(data) { case PaymentListTypeList: *s = PaymentListTypeList return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodAlfabank type PaymentMethodAlfabank struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodAlfabankStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` // Логин пользователя в Альфа-Клике (привязанный // телефон или дополнительный логин). Login OptString `json:"login"` } // GetType returns the value of Type. func (s *PaymentMethodAlfabank) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodAlfabank) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodAlfabank) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodAlfabank) GetStatus() PaymentMethodAlfabankStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodAlfabank) GetTitle() OptPaymentMethodTitle { return s.Title } // GetLogin returns the value of Login. func (s *PaymentMethodAlfabank) GetLogin() OptString { return s.Login } // SetType sets the value of Type. func (s *PaymentMethodAlfabank) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodAlfabank) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodAlfabank) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodAlfabank) SetStatus(val PaymentMethodAlfabankStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodAlfabank) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // SetLogin sets the value of Login. func (s *PaymentMethodAlfabank) SetLogin(val OptString) { s.Login = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodAlfabankStatus string const ( PaymentMethodAlfabankStatusPending PaymentMethodAlfabankStatus = "pending" PaymentMethodAlfabankStatusActive PaymentMethodAlfabankStatus = "active" PaymentMethodAlfabankStatusInactive PaymentMethodAlfabankStatus = "inactive" ) // AllValues returns all PaymentMethodAlfabankStatus values. func (PaymentMethodAlfabankStatus) AllValues() []PaymentMethodAlfabankStatus { return []PaymentMethodAlfabankStatus{ PaymentMethodAlfabankStatusPending, PaymentMethodAlfabankStatusActive, PaymentMethodAlfabankStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodAlfabankStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodAlfabankStatusPending: return []byte(s), nil case PaymentMethodAlfabankStatusActive: return []byte(s), nil case PaymentMethodAlfabankStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodAlfabankStatus) UnmarshalText(data []byte) error { switch PaymentMethodAlfabankStatus(data) { case PaymentMethodAlfabankStatusPending: *s = PaymentMethodAlfabankStatusPending return nil case PaymentMethodAlfabankStatusActive: *s = PaymentMethodAlfabankStatusActive return nil case PaymentMethodAlfabankStatusInactive: *s = PaymentMethodAlfabankStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodApplePay type PaymentMethodApplePay struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodApplePayStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` } // GetType returns the value of Type. func (s *PaymentMethodApplePay) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodApplePay) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodApplePay) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodApplePay) GetStatus() PaymentMethodApplePayStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodApplePay) GetTitle() OptPaymentMethodTitle { return s.Title } // SetType sets the value of Type. func (s *PaymentMethodApplePay) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodApplePay) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodApplePay) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodApplePay) SetStatus(val PaymentMethodApplePayStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodApplePay) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodApplePayStatus string const ( PaymentMethodApplePayStatusPending PaymentMethodApplePayStatus = "pending" PaymentMethodApplePayStatusActive PaymentMethodApplePayStatus = "active" PaymentMethodApplePayStatusInactive PaymentMethodApplePayStatus = "inactive" ) // AllValues returns all PaymentMethodApplePayStatus values. func (PaymentMethodApplePayStatus) AllValues() []PaymentMethodApplePayStatus { return []PaymentMethodApplePayStatus{ PaymentMethodApplePayStatusPending, PaymentMethodApplePayStatusActive, PaymentMethodApplePayStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodApplePayStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodApplePayStatusPending: return []byte(s), nil case PaymentMethodApplePayStatusActive: return []byte(s), nil case PaymentMethodApplePayStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodApplePayStatus) UnmarshalText(data []byte) error { switch PaymentMethodApplePayStatus(data) { case PaymentMethodApplePayStatusPending: *s = PaymentMethodApplePayStatusPending return nil case PaymentMethodApplePayStatusActive: *s = PaymentMethodApplePayStatusActive return nil case PaymentMethodApplePayStatusInactive: *s = PaymentMethodApplePayStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodB2bSberbank type PaymentMethodB2bSberbank struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodB2bSberbankStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` PaymentPurpose PaymentPurpose `json:"payment_purpose"` VatData PaymentMethodB2bSberbankVatData `json:"vat_data"` PayerBankDetails OptB2bSberbankPayerBankDetails `json:"payer_bank_details"` } // GetType returns the value of Type. func (s *PaymentMethodB2bSberbank) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodB2bSberbank) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodB2bSberbank) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodB2bSberbank) GetStatus() PaymentMethodB2bSberbankStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodB2bSberbank) GetTitle() OptPaymentMethodTitle { return s.Title } // GetPaymentPurpose returns the value of PaymentPurpose. func (s *PaymentMethodB2bSberbank) GetPaymentPurpose() PaymentPurpose { return s.PaymentPurpose } // GetVatData returns the value of VatData. func (s *PaymentMethodB2bSberbank) GetVatData() PaymentMethodB2bSberbankVatData { return s.VatData } // GetPayerBankDetails returns the value of PayerBankDetails. func (s *PaymentMethodB2bSberbank) GetPayerBankDetails() OptB2bSberbankPayerBankDetails { return s.PayerBankDetails } // SetType sets the value of Type. func (s *PaymentMethodB2bSberbank) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodB2bSberbank) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodB2bSberbank) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodB2bSberbank) SetStatus(val PaymentMethodB2bSberbankStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodB2bSberbank) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // SetPaymentPurpose sets the value of PaymentPurpose. func (s *PaymentMethodB2bSberbank) SetPaymentPurpose(val PaymentPurpose) { s.PaymentPurpose = val } // SetVatData sets the value of VatData. func (s *PaymentMethodB2bSberbank) SetVatData(val PaymentMethodB2bSberbankVatData) { s.VatData = val } // SetPayerBankDetails sets the value of PayerBankDetails. func (s *PaymentMethodB2bSberbank) SetPayerBankDetails(val OptB2bSberbankPayerBankDetails) { s.PayerBankDetails = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodB2bSberbankStatus string const ( PaymentMethodB2bSberbankStatusPending PaymentMethodB2bSberbankStatus = "pending" PaymentMethodB2bSberbankStatusActive PaymentMethodB2bSberbankStatus = "active" PaymentMethodB2bSberbankStatusInactive PaymentMethodB2bSberbankStatus = "inactive" ) // AllValues returns all PaymentMethodB2bSberbankStatus values. func (PaymentMethodB2bSberbankStatus) AllValues() []PaymentMethodB2bSberbankStatus { return []PaymentMethodB2bSberbankStatus{ PaymentMethodB2bSberbankStatusPending, PaymentMethodB2bSberbankStatusActive, PaymentMethodB2bSberbankStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodB2bSberbankStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodB2bSberbankStatusPending: return []byte(s), nil case PaymentMethodB2bSberbankStatusActive: return []byte(s), nil case PaymentMethodB2bSberbankStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodB2bSberbankStatus) UnmarshalText(data []byte) error { switch PaymentMethodB2bSberbankStatus(data) { case PaymentMethodB2bSberbankStatusPending: *s = PaymentMethodB2bSberbankStatusPending return nil case PaymentMethodB2bSberbankStatusActive: *s = PaymentMethodB2bSberbankStatusActive return nil case PaymentMethodB2bSberbankStatusInactive: *s = PaymentMethodB2bSberbankStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // PaymentMethodB2bSberbankVatData represents sum type. type PaymentMethodB2bSberbankVatData struct { Type PaymentMethodB2bSberbankVatDataType // switch on this field B2bSberbankCalculatedVatData B2bSberbankCalculatedVatData B2bSberbankUntaxedVatData B2bSberbankUntaxedVatData B2bSberbankMixedVatData B2bSberbankMixedVatData } // PaymentMethodB2bSberbankVatDataType is oneOf type of PaymentMethodB2bSberbankVatData. type PaymentMethodB2bSberbankVatDataType string // Possible values for PaymentMethodB2bSberbankVatDataType. const ( B2bSberbankCalculatedVatDataPaymentMethodB2bSberbankVatData PaymentMethodB2bSberbankVatDataType = "B2bSberbankCalculatedVatData" B2bSberbankUntaxedVatDataPaymentMethodB2bSberbankVatData PaymentMethodB2bSberbankVatDataType = "B2bSberbankUntaxedVatData" B2bSberbankMixedVatDataPaymentMethodB2bSberbankVatData PaymentMethodB2bSberbankVatDataType = "B2bSberbankMixedVatData" ) // IsB2bSberbankCalculatedVatData reports whether PaymentMethodB2bSberbankVatData is B2bSberbankCalculatedVatData. func (s PaymentMethodB2bSberbankVatData) IsB2bSberbankCalculatedVatData() bool { return s.Type == B2bSberbankCalculatedVatDataPaymentMethodB2bSberbankVatData } // IsB2bSberbankUntaxedVatData reports whether PaymentMethodB2bSberbankVatData is B2bSberbankUntaxedVatData. func (s PaymentMethodB2bSberbankVatData) IsB2bSberbankUntaxedVatData() bool { return s.Type == B2bSberbankUntaxedVatDataPaymentMethodB2bSberbankVatData } // IsB2bSberbankMixedVatData reports whether PaymentMethodB2bSberbankVatData is B2bSberbankMixedVatData. func (s PaymentMethodB2bSberbankVatData) IsB2bSberbankMixedVatData() bool { return s.Type == B2bSberbankMixedVatDataPaymentMethodB2bSberbankVatData } // SetB2bSberbankCalculatedVatData sets PaymentMethodB2bSberbankVatData to B2bSberbankCalculatedVatData. func (s *PaymentMethodB2bSberbankVatData) SetB2bSberbankCalculatedVatData(v B2bSberbankCalculatedVatData) { s.Type = B2bSberbankCalculatedVatDataPaymentMethodB2bSberbankVatData s.B2bSberbankCalculatedVatData = v } // GetB2bSberbankCalculatedVatData returns B2bSberbankCalculatedVatData and true boolean if PaymentMethodB2bSberbankVatData is B2bSberbankCalculatedVatData. func (s PaymentMethodB2bSberbankVatData) GetB2bSberbankCalculatedVatData() (v B2bSberbankCalculatedVatData, ok bool) { if !s.IsB2bSberbankCalculatedVatData() { return v, false } return s.B2bSberbankCalculatedVatData, true } // NewB2bSberbankCalculatedVatDataPaymentMethodB2bSberbankVatData returns new PaymentMethodB2bSberbankVatData from B2bSberbankCalculatedVatData. func NewB2bSberbankCalculatedVatDataPaymentMethodB2bSberbankVatData(v B2bSberbankCalculatedVatData) PaymentMethodB2bSberbankVatData { var s PaymentMethodB2bSberbankVatData s.SetB2bSberbankCalculatedVatData(v) return s } // SetB2bSberbankUntaxedVatData sets PaymentMethodB2bSberbankVatData to B2bSberbankUntaxedVatData. func (s *PaymentMethodB2bSberbankVatData) SetB2bSberbankUntaxedVatData(v B2bSberbankUntaxedVatData) { s.Type = B2bSberbankUntaxedVatDataPaymentMethodB2bSberbankVatData s.B2bSberbankUntaxedVatData = v } // GetB2bSberbankUntaxedVatData returns B2bSberbankUntaxedVatData and true boolean if PaymentMethodB2bSberbankVatData is B2bSberbankUntaxedVatData. func (s PaymentMethodB2bSberbankVatData) GetB2bSberbankUntaxedVatData() (v B2bSberbankUntaxedVatData, ok bool) { if !s.IsB2bSberbankUntaxedVatData() { return v, false } return s.B2bSberbankUntaxedVatData, true } // NewB2bSberbankUntaxedVatDataPaymentMethodB2bSberbankVatData returns new PaymentMethodB2bSberbankVatData from B2bSberbankUntaxedVatData. func NewB2bSberbankUntaxedVatDataPaymentMethodB2bSberbankVatData(v B2bSberbankUntaxedVatData) PaymentMethodB2bSberbankVatData { var s PaymentMethodB2bSberbankVatData s.SetB2bSberbankUntaxedVatData(v) return s } // SetB2bSberbankMixedVatData sets PaymentMethodB2bSberbankVatData to B2bSberbankMixedVatData. func (s *PaymentMethodB2bSberbankVatData) SetB2bSberbankMixedVatData(v B2bSberbankMixedVatData) { s.Type = B2bSberbankMixedVatDataPaymentMethodB2bSberbankVatData s.B2bSberbankMixedVatData = v } // GetB2bSberbankMixedVatData returns B2bSberbankMixedVatData and true boolean if PaymentMethodB2bSberbankVatData is B2bSberbankMixedVatData. func (s PaymentMethodB2bSberbankVatData) GetB2bSberbankMixedVatData() (v B2bSberbankMixedVatData, ok bool) { if !s.IsB2bSberbankMixedVatData() { return v, false } return s.B2bSberbankMixedVatData, true } // NewB2bSberbankMixedVatDataPaymentMethodB2bSberbankVatData returns new PaymentMethodB2bSberbankVatData from B2bSberbankMixedVatData. func NewB2bSberbankMixedVatDataPaymentMethodB2bSberbankVatData(v B2bSberbankMixedVatData) PaymentMethodB2bSberbankVatData { var s PaymentMethodB2bSberbankVatData s.SetB2bSberbankMixedVatData(v) return s } // Merged schema. // Ref: #/components/schemas/PaymentMethodBankCard type PaymentMethodBankCard struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodBankCardStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` Card OptBankCardData `json:"card"` } // GetType returns the value of Type. func (s *PaymentMethodBankCard) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodBankCard) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodBankCard) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodBankCard) GetStatus() PaymentMethodBankCardStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodBankCard) GetTitle() OptPaymentMethodTitle { return s.Title } // GetCard returns the value of Card. func (s *PaymentMethodBankCard) GetCard() OptBankCardData { return s.Card } // SetType sets the value of Type. func (s *PaymentMethodBankCard) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodBankCard) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodBankCard) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodBankCard) SetStatus(val PaymentMethodBankCardStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodBankCard) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // SetCard sets the value of Card. func (s *PaymentMethodBankCard) SetCard(val OptBankCardData) { s.Card = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodBankCardStatus string const ( PaymentMethodBankCardStatusPending PaymentMethodBankCardStatus = "pending" PaymentMethodBankCardStatusActive PaymentMethodBankCardStatus = "active" PaymentMethodBankCardStatusInactive PaymentMethodBankCardStatus = "inactive" ) // AllValues returns all PaymentMethodBankCardStatus values. func (PaymentMethodBankCardStatus) AllValues() []PaymentMethodBankCardStatus { return []PaymentMethodBankCardStatus{ PaymentMethodBankCardStatusPending, PaymentMethodBankCardStatusActive, PaymentMethodBankCardStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodBankCardStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodBankCardStatusPending: return []byte(s), nil case PaymentMethodBankCardStatusActive: return []byte(s), nil case PaymentMethodBankCardStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodBankCardStatus) UnmarshalText(data []byte) error { switch PaymentMethodBankCardStatus(data) { case PaymentMethodBankCardStatusPending: *s = PaymentMethodBankCardStatusPending return nil case PaymentMethodBankCardStatusActive: *s = PaymentMethodBankCardStatusActive return nil case PaymentMethodBankCardStatusInactive: *s = PaymentMethodBankCardStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodCash type PaymentMethodCash struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodCashStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` } // GetType returns the value of Type. func (s *PaymentMethodCash) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodCash) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodCash) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodCash) GetStatus() PaymentMethodCashStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodCash) GetTitle() OptPaymentMethodTitle { return s.Title } // SetType sets the value of Type. func (s *PaymentMethodCash) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodCash) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodCash) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodCash) SetStatus(val PaymentMethodCashStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodCash) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodCashStatus string const ( PaymentMethodCashStatusPending PaymentMethodCashStatus = "pending" PaymentMethodCashStatusActive PaymentMethodCashStatus = "active" PaymentMethodCashStatusInactive PaymentMethodCashStatus = "inactive" ) // AllValues returns all PaymentMethodCashStatus values. func (PaymentMethodCashStatus) AllValues() []PaymentMethodCashStatus { return []PaymentMethodCashStatus{ PaymentMethodCashStatusPending, PaymentMethodCashStatusActive, PaymentMethodCashStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodCashStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodCashStatusPending: return []byte(s), nil case PaymentMethodCashStatusActive: return []byte(s), nil case PaymentMethodCashStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodCashStatus) UnmarshalText(data []byte) error { switch PaymentMethodCashStatus(data) { case PaymentMethodCashStatusPending: *s = PaymentMethodCashStatusPending return nil case PaymentMethodCashStatusActive: *s = PaymentMethodCashStatusActive return nil case PaymentMethodCashStatusInactive: *s = PaymentMethodCashStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodDataB2bSberbank type PaymentMethodDataB2bSberbank struct { Type PaymentMethodDataB2bSberbankType `json:"type"` PaymentPurpose PaymentPurpose `json:"payment_purpose"` VatData PaymentMethodDataB2bSberbankVatData `json:"vat_data"` } // GetType returns the value of Type. func (s *PaymentMethodDataB2bSberbank) GetType() PaymentMethodDataB2bSberbankType { return s.Type } // GetPaymentPurpose returns the value of PaymentPurpose. func (s *PaymentMethodDataB2bSberbank) GetPaymentPurpose() PaymentPurpose { return s.PaymentPurpose } // GetVatData returns the value of VatData. func (s *PaymentMethodDataB2bSberbank) GetVatData() PaymentMethodDataB2bSberbankVatData { return s.VatData } // SetType sets the value of Type. func (s *PaymentMethodDataB2bSberbank) SetType(val PaymentMethodDataB2bSberbankType) { s.Type = val } // SetPaymentPurpose sets the value of PaymentPurpose. func (s *PaymentMethodDataB2bSberbank) SetPaymentPurpose(val PaymentPurpose) { s.PaymentPurpose = val } // SetVatData sets the value of VatData. func (s *PaymentMethodDataB2bSberbank) SetVatData(val PaymentMethodDataB2bSberbankVatData) { s.VatData = val } type PaymentMethodDataB2bSberbankType string const ( PaymentMethodDataB2bSberbankTypeBankCard PaymentMethodDataB2bSberbankType = "bank_card" PaymentMethodDataB2bSberbankTypeCash PaymentMethodDataB2bSberbankType = "cash" PaymentMethodDataB2bSberbankTypeSberbank PaymentMethodDataB2bSberbankType = "sberbank" PaymentMethodDataB2bSberbankTypeTinkoffBank PaymentMethodDataB2bSberbankType = "tinkoff_bank" PaymentMethodDataB2bSberbankTypeYooMoney PaymentMethodDataB2bSberbankType = "yoo_money" PaymentMethodDataB2bSberbankTypeMobileBalance PaymentMethodDataB2bSberbankType = "mobile_balance" PaymentMethodDataB2bSberbankTypeB2bSberbank PaymentMethodDataB2bSberbankType = "b2b_sberbank" PaymentMethodDataB2bSberbankTypeSbp PaymentMethodDataB2bSberbankType = "sbp" PaymentMethodDataB2bSberbankTypeSberLoan PaymentMethodDataB2bSberbankType = "sber_loan" PaymentMethodDataB2bSberbankTypeElectronicCertificate PaymentMethodDataB2bSberbankType = "electronic_certificate" PaymentMethodDataB2bSberbankTypeSberBnpl PaymentMethodDataB2bSberbankType = "sber_bnpl" ) // AllValues returns all PaymentMethodDataB2bSberbankType values. func (PaymentMethodDataB2bSberbankType) AllValues() []PaymentMethodDataB2bSberbankType { return []PaymentMethodDataB2bSberbankType{ PaymentMethodDataB2bSberbankTypeBankCard, PaymentMethodDataB2bSberbankTypeCash, PaymentMethodDataB2bSberbankTypeSberbank, PaymentMethodDataB2bSberbankTypeTinkoffBank, PaymentMethodDataB2bSberbankTypeYooMoney, PaymentMethodDataB2bSberbankTypeMobileBalance, PaymentMethodDataB2bSberbankTypeB2bSberbank, PaymentMethodDataB2bSberbankTypeSbp, PaymentMethodDataB2bSberbankTypeSberLoan, PaymentMethodDataB2bSberbankTypeElectronicCertificate, PaymentMethodDataB2bSberbankTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodDataB2bSberbankType) MarshalText() ([]byte, error) { switch s { case PaymentMethodDataB2bSberbankTypeBankCard: return []byte(s), nil case PaymentMethodDataB2bSberbankTypeCash: return []byte(s), nil case PaymentMethodDataB2bSberbankTypeSberbank: return []byte(s), nil case PaymentMethodDataB2bSberbankTypeTinkoffBank: return []byte(s), nil case PaymentMethodDataB2bSberbankTypeYooMoney: return []byte(s), nil case PaymentMethodDataB2bSberbankTypeMobileBalance: return []byte(s), nil case PaymentMethodDataB2bSberbankTypeB2bSberbank: return []byte(s), nil case PaymentMethodDataB2bSberbankTypeSbp: return []byte(s), nil case PaymentMethodDataB2bSberbankTypeSberLoan: return []byte(s), nil case PaymentMethodDataB2bSberbankTypeElectronicCertificate: return []byte(s), nil case PaymentMethodDataB2bSberbankTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodDataB2bSberbankType) UnmarshalText(data []byte) error { switch PaymentMethodDataB2bSberbankType(data) { case PaymentMethodDataB2bSberbankTypeBankCard: *s = PaymentMethodDataB2bSberbankTypeBankCard return nil case PaymentMethodDataB2bSberbankTypeCash: *s = PaymentMethodDataB2bSberbankTypeCash return nil case PaymentMethodDataB2bSberbankTypeSberbank: *s = PaymentMethodDataB2bSberbankTypeSberbank return nil case PaymentMethodDataB2bSberbankTypeTinkoffBank: *s = PaymentMethodDataB2bSberbankTypeTinkoffBank return nil case PaymentMethodDataB2bSberbankTypeYooMoney: *s = PaymentMethodDataB2bSberbankTypeYooMoney return nil case PaymentMethodDataB2bSberbankTypeMobileBalance: *s = PaymentMethodDataB2bSberbankTypeMobileBalance return nil case PaymentMethodDataB2bSberbankTypeB2bSberbank: *s = PaymentMethodDataB2bSberbankTypeB2bSberbank return nil case PaymentMethodDataB2bSberbankTypeSbp: *s = PaymentMethodDataB2bSberbankTypeSbp return nil case PaymentMethodDataB2bSberbankTypeSberLoan: *s = PaymentMethodDataB2bSberbankTypeSberLoan return nil case PaymentMethodDataB2bSberbankTypeElectronicCertificate: *s = PaymentMethodDataB2bSberbankTypeElectronicCertificate return nil case PaymentMethodDataB2bSberbankTypeSberBnpl: *s = PaymentMethodDataB2bSberbankTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // PaymentMethodDataB2bSberbankVatData represents sum type. type PaymentMethodDataB2bSberbankVatData struct { Type PaymentMethodDataB2bSberbankVatDataType // switch on this field B2bSberbankCalculatedVatData B2bSberbankCalculatedVatData B2bSberbankUntaxedVatData B2bSberbankUntaxedVatData B2bSberbankMixedVatData B2bSberbankMixedVatData } // PaymentMethodDataB2bSberbankVatDataType is oneOf type of PaymentMethodDataB2bSberbankVatData. type PaymentMethodDataB2bSberbankVatDataType string // Possible values for PaymentMethodDataB2bSberbankVatDataType. const ( B2bSberbankCalculatedVatDataPaymentMethodDataB2bSberbankVatData PaymentMethodDataB2bSberbankVatDataType = "B2bSberbankCalculatedVatData" B2bSberbankUntaxedVatDataPaymentMethodDataB2bSberbankVatData PaymentMethodDataB2bSberbankVatDataType = "B2bSberbankUntaxedVatData" B2bSberbankMixedVatDataPaymentMethodDataB2bSberbankVatData PaymentMethodDataB2bSberbankVatDataType = "B2bSberbankMixedVatData" ) // IsB2bSberbankCalculatedVatData reports whether PaymentMethodDataB2bSberbankVatData is B2bSberbankCalculatedVatData. func (s PaymentMethodDataB2bSberbankVatData) IsB2bSberbankCalculatedVatData() bool { return s.Type == B2bSberbankCalculatedVatDataPaymentMethodDataB2bSberbankVatData } // IsB2bSberbankUntaxedVatData reports whether PaymentMethodDataB2bSberbankVatData is B2bSberbankUntaxedVatData. func (s PaymentMethodDataB2bSberbankVatData) IsB2bSberbankUntaxedVatData() bool { return s.Type == B2bSberbankUntaxedVatDataPaymentMethodDataB2bSberbankVatData } // IsB2bSberbankMixedVatData reports whether PaymentMethodDataB2bSberbankVatData is B2bSberbankMixedVatData. func (s PaymentMethodDataB2bSberbankVatData) IsB2bSberbankMixedVatData() bool { return s.Type == B2bSberbankMixedVatDataPaymentMethodDataB2bSberbankVatData } // SetB2bSberbankCalculatedVatData sets PaymentMethodDataB2bSberbankVatData to B2bSberbankCalculatedVatData. func (s *PaymentMethodDataB2bSberbankVatData) SetB2bSberbankCalculatedVatData(v B2bSberbankCalculatedVatData) { s.Type = B2bSberbankCalculatedVatDataPaymentMethodDataB2bSberbankVatData s.B2bSberbankCalculatedVatData = v } // GetB2bSberbankCalculatedVatData returns B2bSberbankCalculatedVatData and true boolean if PaymentMethodDataB2bSberbankVatData is B2bSberbankCalculatedVatData. func (s PaymentMethodDataB2bSberbankVatData) GetB2bSberbankCalculatedVatData() (v B2bSberbankCalculatedVatData, ok bool) { if !s.IsB2bSberbankCalculatedVatData() { return v, false } return s.B2bSberbankCalculatedVatData, true } // NewB2bSberbankCalculatedVatDataPaymentMethodDataB2bSberbankVatData returns new PaymentMethodDataB2bSberbankVatData from B2bSberbankCalculatedVatData. func NewB2bSberbankCalculatedVatDataPaymentMethodDataB2bSberbankVatData(v B2bSberbankCalculatedVatData) PaymentMethodDataB2bSberbankVatData { var s PaymentMethodDataB2bSberbankVatData s.SetB2bSberbankCalculatedVatData(v) return s } // SetB2bSberbankUntaxedVatData sets PaymentMethodDataB2bSberbankVatData to B2bSberbankUntaxedVatData. func (s *PaymentMethodDataB2bSberbankVatData) SetB2bSberbankUntaxedVatData(v B2bSberbankUntaxedVatData) { s.Type = B2bSberbankUntaxedVatDataPaymentMethodDataB2bSberbankVatData s.B2bSberbankUntaxedVatData = v } // GetB2bSberbankUntaxedVatData returns B2bSberbankUntaxedVatData and true boolean if PaymentMethodDataB2bSberbankVatData is B2bSberbankUntaxedVatData. func (s PaymentMethodDataB2bSberbankVatData) GetB2bSberbankUntaxedVatData() (v B2bSberbankUntaxedVatData, ok bool) { if !s.IsB2bSberbankUntaxedVatData() { return v, false } return s.B2bSberbankUntaxedVatData, true } // NewB2bSberbankUntaxedVatDataPaymentMethodDataB2bSberbankVatData returns new PaymentMethodDataB2bSberbankVatData from B2bSberbankUntaxedVatData. func NewB2bSberbankUntaxedVatDataPaymentMethodDataB2bSberbankVatData(v B2bSberbankUntaxedVatData) PaymentMethodDataB2bSberbankVatData { var s PaymentMethodDataB2bSberbankVatData s.SetB2bSberbankUntaxedVatData(v) return s } // SetB2bSberbankMixedVatData sets PaymentMethodDataB2bSberbankVatData to B2bSberbankMixedVatData. func (s *PaymentMethodDataB2bSberbankVatData) SetB2bSberbankMixedVatData(v B2bSberbankMixedVatData) { s.Type = B2bSberbankMixedVatDataPaymentMethodDataB2bSberbankVatData s.B2bSberbankMixedVatData = v } // GetB2bSberbankMixedVatData returns B2bSberbankMixedVatData and true boolean if PaymentMethodDataB2bSberbankVatData is B2bSberbankMixedVatData. func (s PaymentMethodDataB2bSberbankVatData) GetB2bSberbankMixedVatData() (v B2bSberbankMixedVatData, ok bool) { if !s.IsB2bSberbankMixedVatData() { return v, false } return s.B2bSberbankMixedVatData, true } // NewB2bSberbankMixedVatDataPaymentMethodDataB2bSberbankVatData returns new PaymentMethodDataB2bSberbankVatData from B2bSberbankMixedVatData. func NewB2bSberbankMixedVatDataPaymentMethodDataB2bSberbankVatData(v B2bSberbankMixedVatData) PaymentMethodDataB2bSberbankVatData { var s PaymentMethodDataB2bSberbankVatData s.SetB2bSberbankMixedVatData(v) return s } // Merged schema. // Ref: #/components/schemas/PaymentMethodDataBankCard type PaymentMethodDataBankCard struct { Type PaymentMethodDataBankCardType `json:"type"` Card OptCardRequestData `json:"card"` } // GetType returns the value of Type. func (s *PaymentMethodDataBankCard) GetType() PaymentMethodDataBankCardType { return s.Type } // GetCard returns the value of Card. func (s *PaymentMethodDataBankCard) GetCard() OptCardRequestData { return s.Card } // SetType sets the value of Type. func (s *PaymentMethodDataBankCard) SetType(val PaymentMethodDataBankCardType) { s.Type = val } // SetCard sets the value of Card. func (s *PaymentMethodDataBankCard) SetCard(val OptCardRequestData) { s.Card = val } type PaymentMethodDataBankCardType string const ( PaymentMethodDataBankCardTypeBankCard PaymentMethodDataBankCardType = "bank_card" PaymentMethodDataBankCardTypeCash PaymentMethodDataBankCardType = "cash" PaymentMethodDataBankCardTypeSberbank PaymentMethodDataBankCardType = "sberbank" PaymentMethodDataBankCardTypeTinkoffBank PaymentMethodDataBankCardType = "tinkoff_bank" PaymentMethodDataBankCardTypeYooMoney PaymentMethodDataBankCardType = "yoo_money" PaymentMethodDataBankCardTypeMobileBalance PaymentMethodDataBankCardType = "mobile_balance" PaymentMethodDataBankCardTypeB2bSberbank PaymentMethodDataBankCardType = "b2b_sberbank" PaymentMethodDataBankCardTypeSbp PaymentMethodDataBankCardType = "sbp" PaymentMethodDataBankCardTypeSberLoan PaymentMethodDataBankCardType = "sber_loan" PaymentMethodDataBankCardTypeElectronicCertificate PaymentMethodDataBankCardType = "electronic_certificate" PaymentMethodDataBankCardTypeSberBnpl PaymentMethodDataBankCardType = "sber_bnpl" ) // AllValues returns all PaymentMethodDataBankCardType values. func (PaymentMethodDataBankCardType) AllValues() []PaymentMethodDataBankCardType { return []PaymentMethodDataBankCardType{ PaymentMethodDataBankCardTypeBankCard, PaymentMethodDataBankCardTypeCash, PaymentMethodDataBankCardTypeSberbank, PaymentMethodDataBankCardTypeTinkoffBank, PaymentMethodDataBankCardTypeYooMoney, PaymentMethodDataBankCardTypeMobileBalance, PaymentMethodDataBankCardTypeB2bSberbank, PaymentMethodDataBankCardTypeSbp, PaymentMethodDataBankCardTypeSberLoan, PaymentMethodDataBankCardTypeElectronicCertificate, PaymentMethodDataBankCardTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodDataBankCardType) MarshalText() ([]byte, error) { switch s { case PaymentMethodDataBankCardTypeBankCard: return []byte(s), nil case PaymentMethodDataBankCardTypeCash: return []byte(s), nil case PaymentMethodDataBankCardTypeSberbank: return []byte(s), nil case PaymentMethodDataBankCardTypeTinkoffBank: return []byte(s), nil case PaymentMethodDataBankCardTypeYooMoney: return []byte(s), nil case PaymentMethodDataBankCardTypeMobileBalance: return []byte(s), nil case PaymentMethodDataBankCardTypeB2bSberbank: return []byte(s), nil case PaymentMethodDataBankCardTypeSbp: return []byte(s), nil case PaymentMethodDataBankCardTypeSberLoan: return []byte(s), nil case PaymentMethodDataBankCardTypeElectronicCertificate: return []byte(s), nil case PaymentMethodDataBankCardTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodDataBankCardType) UnmarshalText(data []byte) error { switch PaymentMethodDataBankCardType(data) { case PaymentMethodDataBankCardTypeBankCard: *s = PaymentMethodDataBankCardTypeBankCard return nil case PaymentMethodDataBankCardTypeCash: *s = PaymentMethodDataBankCardTypeCash return nil case PaymentMethodDataBankCardTypeSberbank: *s = PaymentMethodDataBankCardTypeSberbank return nil case PaymentMethodDataBankCardTypeTinkoffBank: *s = PaymentMethodDataBankCardTypeTinkoffBank return nil case PaymentMethodDataBankCardTypeYooMoney: *s = PaymentMethodDataBankCardTypeYooMoney return nil case PaymentMethodDataBankCardTypeMobileBalance: *s = PaymentMethodDataBankCardTypeMobileBalance return nil case PaymentMethodDataBankCardTypeB2bSberbank: *s = PaymentMethodDataBankCardTypeB2bSberbank return nil case PaymentMethodDataBankCardTypeSbp: *s = PaymentMethodDataBankCardTypeSbp return nil case PaymentMethodDataBankCardTypeSberLoan: *s = PaymentMethodDataBankCardTypeSberLoan return nil case PaymentMethodDataBankCardTypeElectronicCertificate: *s = PaymentMethodDataBankCardTypeElectronicCertificate return nil case PaymentMethodDataBankCardTypeSberBnpl: *s = PaymentMethodDataBankCardTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodDataCash type PaymentMethodDataCash struct { Type PaymentMethodDataCashType `json:"type"` // Телефон пользователя, на который придет смс с кодом // платежа (для внесения наличных). Указывается в // формате ITU-T E.164: https://ru.wikipedia.org/wiki/E.164, например 79000000000. // Поле можно оставить пустым: пользователь сможет // заполнить его при оплате на стороне ЮKassa. Phone OptString `json:"phone"` } // GetType returns the value of Type. func (s *PaymentMethodDataCash) GetType() PaymentMethodDataCashType { return s.Type } // GetPhone returns the value of Phone. func (s *PaymentMethodDataCash) GetPhone() OptString { return s.Phone } // SetType sets the value of Type. func (s *PaymentMethodDataCash) SetType(val PaymentMethodDataCashType) { s.Type = val } // SetPhone sets the value of Phone. func (s *PaymentMethodDataCash) SetPhone(val OptString) { s.Phone = val } type PaymentMethodDataCashType string const ( PaymentMethodDataCashTypeBankCard PaymentMethodDataCashType = "bank_card" PaymentMethodDataCashTypeCash PaymentMethodDataCashType = "cash" PaymentMethodDataCashTypeSberbank PaymentMethodDataCashType = "sberbank" PaymentMethodDataCashTypeTinkoffBank PaymentMethodDataCashType = "tinkoff_bank" PaymentMethodDataCashTypeYooMoney PaymentMethodDataCashType = "yoo_money" PaymentMethodDataCashTypeMobileBalance PaymentMethodDataCashType = "mobile_balance" PaymentMethodDataCashTypeB2bSberbank PaymentMethodDataCashType = "b2b_sberbank" PaymentMethodDataCashTypeSbp PaymentMethodDataCashType = "sbp" PaymentMethodDataCashTypeSberLoan PaymentMethodDataCashType = "sber_loan" PaymentMethodDataCashTypeElectronicCertificate PaymentMethodDataCashType = "electronic_certificate" PaymentMethodDataCashTypeSberBnpl PaymentMethodDataCashType = "sber_bnpl" ) // AllValues returns all PaymentMethodDataCashType values. func (PaymentMethodDataCashType) AllValues() []PaymentMethodDataCashType { return []PaymentMethodDataCashType{ PaymentMethodDataCashTypeBankCard, PaymentMethodDataCashTypeCash, PaymentMethodDataCashTypeSberbank, PaymentMethodDataCashTypeTinkoffBank, PaymentMethodDataCashTypeYooMoney, PaymentMethodDataCashTypeMobileBalance, PaymentMethodDataCashTypeB2bSberbank, PaymentMethodDataCashTypeSbp, PaymentMethodDataCashTypeSberLoan, PaymentMethodDataCashTypeElectronicCertificate, PaymentMethodDataCashTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodDataCashType) MarshalText() ([]byte, error) { switch s { case PaymentMethodDataCashTypeBankCard: return []byte(s), nil case PaymentMethodDataCashTypeCash: return []byte(s), nil case PaymentMethodDataCashTypeSberbank: return []byte(s), nil case PaymentMethodDataCashTypeTinkoffBank: return []byte(s), nil case PaymentMethodDataCashTypeYooMoney: return []byte(s), nil case PaymentMethodDataCashTypeMobileBalance: return []byte(s), nil case PaymentMethodDataCashTypeB2bSberbank: return []byte(s), nil case PaymentMethodDataCashTypeSbp: return []byte(s), nil case PaymentMethodDataCashTypeSberLoan: return []byte(s), nil case PaymentMethodDataCashTypeElectronicCertificate: return []byte(s), nil case PaymentMethodDataCashTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodDataCashType) UnmarshalText(data []byte) error { switch PaymentMethodDataCashType(data) { case PaymentMethodDataCashTypeBankCard: *s = PaymentMethodDataCashTypeBankCard return nil case PaymentMethodDataCashTypeCash: *s = PaymentMethodDataCashTypeCash return nil case PaymentMethodDataCashTypeSberbank: *s = PaymentMethodDataCashTypeSberbank return nil case PaymentMethodDataCashTypeTinkoffBank: *s = PaymentMethodDataCashTypeTinkoffBank return nil case PaymentMethodDataCashTypeYooMoney: *s = PaymentMethodDataCashTypeYooMoney return nil case PaymentMethodDataCashTypeMobileBalance: *s = PaymentMethodDataCashTypeMobileBalance return nil case PaymentMethodDataCashTypeB2bSberbank: *s = PaymentMethodDataCashTypeB2bSberbank return nil case PaymentMethodDataCashTypeSbp: *s = PaymentMethodDataCashTypeSbp return nil case PaymentMethodDataCashTypeSberLoan: *s = PaymentMethodDataCashTypeSberLoan return nil case PaymentMethodDataCashTypeElectronicCertificate: *s = PaymentMethodDataCashTypeElectronicCertificate return nil case PaymentMethodDataCashTypeSberBnpl: *s = PaymentMethodDataCashTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodDataElectronicCertificate type PaymentMethodDataElectronicCertificate struct { Type PaymentMethodDataElectronicCertificateType `json:"type"` Card OptCardRequestData `json:"card"` ElectronicCertificate OptElectronicCertificatePaymentData `json:"electronic_certificate"` // Корзина покупки (в терминах НСПК) — список товаров, // которые можно оплатить по сертификату. Необходимо // передавать только при оплате на готовой странице // ЮKassa: https://yookassa. // ru/developers/payment-acceptance/integration-scenarios/manual-integration/other/electronic-certificate/ready-made-payment-form. Articles []ElectronicCertificateArticle `json:"articles"` } // GetType returns the value of Type. func (s *PaymentMethodDataElectronicCertificate) GetType() PaymentMethodDataElectronicCertificateType { return s.Type } // GetCard returns the value of Card. func (s *PaymentMethodDataElectronicCertificate) GetCard() OptCardRequestData { return s.Card } // GetElectronicCertificate returns the value of ElectronicCertificate. func (s *PaymentMethodDataElectronicCertificate) GetElectronicCertificate() OptElectronicCertificatePaymentData { return s.ElectronicCertificate } // GetArticles returns the value of Articles. func (s *PaymentMethodDataElectronicCertificate) GetArticles() []ElectronicCertificateArticle { return s.Articles } // SetType sets the value of Type. func (s *PaymentMethodDataElectronicCertificate) SetType(val PaymentMethodDataElectronicCertificateType) { s.Type = val } // SetCard sets the value of Card. func (s *PaymentMethodDataElectronicCertificate) SetCard(val OptCardRequestData) { s.Card = val } // SetElectronicCertificate sets the value of ElectronicCertificate. func (s *PaymentMethodDataElectronicCertificate) SetElectronicCertificate(val OptElectronicCertificatePaymentData) { s.ElectronicCertificate = val } // SetArticles sets the value of Articles. func (s *PaymentMethodDataElectronicCertificate) SetArticles(val []ElectronicCertificateArticle) { s.Articles = val } type PaymentMethodDataElectronicCertificateType string const ( PaymentMethodDataElectronicCertificateTypeBankCard PaymentMethodDataElectronicCertificateType = "bank_card" PaymentMethodDataElectronicCertificateTypeCash PaymentMethodDataElectronicCertificateType = "cash" PaymentMethodDataElectronicCertificateTypeSberbank PaymentMethodDataElectronicCertificateType = "sberbank" PaymentMethodDataElectronicCertificateTypeTinkoffBank PaymentMethodDataElectronicCertificateType = "tinkoff_bank" PaymentMethodDataElectronicCertificateTypeYooMoney PaymentMethodDataElectronicCertificateType = "yoo_money" PaymentMethodDataElectronicCertificateTypeMobileBalance PaymentMethodDataElectronicCertificateType = "mobile_balance" PaymentMethodDataElectronicCertificateTypeB2bSberbank PaymentMethodDataElectronicCertificateType = "b2b_sberbank" PaymentMethodDataElectronicCertificateTypeSbp PaymentMethodDataElectronicCertificateType = "sbp" PaymentMethodDataElectronicCertificateTypeSberLoan PaymentMethodDataElectronicCertificateType = "sber_loan" PaymentMethodDataElectronicCertificateTypeElectronicCertificate PaymentMethodDataElectronicCertificateType = "electronic_certificate" PaymentMethodDataElectronicCertificateTypeSberBnpl PaymentMethodDataElectronicCertificateType = "sber_bnpl" ) // AllValues returns all PaymentMethodDataElectronicCertificateType values. func (PaymentMethodDataElectronicCertificateType) AllValues() []PaymentMethodDataElectronicCertificateType { return []PaymentMethodDataElectronicCertificateType{ PaymentMethodDataElectronicCertificateTypeBankCard, PaymentMethodDataElectronicCertificateTypeCash, PaymentMethodDataElectronicCertificateTypeSberbank, PaymentMethodDataElectronicCertificateTypeTinkoffBank, PaymentMethodDataElectronicCertificateTypeYooMoney, PaymentMethodDataElectronicCertificateTypeMobileBalance, PaymentMethodDataElectronicCertificateTypeB2bSberbank, PaymentMethodDataElectronicCertificateTypeSbp, PaymentMethodDataElectronicCertificateTypeSberLoan, PaymentMethodDataElectronicCertificateTypeElectronicCertificate, PaymentMethodDataElectronicCertificateTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodDataElectronicCertificateType) MarshalText() ([]byte, error) { switch s { case PaymentMethodDataElectronicCertificateTypeBankCard: return []byte(s), nil case PaymentMethodDataElectronicCertificateTypeCash: return []byte(s), nil case PaymentMethodDataElectronicCertificateTypeSberbank: return []byte(s), nil case PaymentMethodDataElectronicCertificateTypeTinkoffBank: return []byte(s), nil case PaymentMethodDataElectronicCertificateTypeYooMoney: return []byte(s), nil case PaymentMethodDataElectronicCertificateTypeMobileBalance: return []byte(s), nil case PaymentMethodDataElectronicCertificateTypeB2bSberbank: return []byte(s), nil case PaymentMethodDataElectronicCertificateTypeSbp: return []byte(s), nil case PaymentMethodDataElectronicCertificateTypeSberLoan: return []byte(s), nil case PaymentMethodDataElectronicCertificateTypeElectronicCertificate: return []byte(s), nil case PaymentMethodDataElectronicCertificateTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodDataElectronicCertificateType) UnmarshalText(data []byte) error { switch PaymentMethodDataElectronicCertificateType(data) { case PaymentMethodDataElectronicCertificateTypeBankCard: *s = PaymentMethodDataElectronicCertificateTypeBankCard return nil case PaymentMethodDataElectronicCertificateTypeCash: *s = PaymentMethodDataElectronicCertificateTypeCash return nil case PaymentMethodDataElectronicCertificateTypeSberbank: *s = PaymentMethodDataElectronicCertificateTypeSberbank return nil case PaymentMethodDataElectronicCertificateTypeTinkoffBank: *s = PaymentMethodDataElectronicCertificateTypeTinkoffBank return nil case PaymentMethodDataElectronicCertificateTypeYooMoney: *s = PaymentMethodDataElectronicCertificateTypeYooMoney return nil case PaymentMethodDataElectronicCertificateTypeMobileBalance: *s = PaymentMethodDataElectronicCertificateTypeMobileBalance return nil case PaymentMethodDataElectronicCertificateTypeB2bSberbank: *s = PaymentMethodDataElectronicCertificateTypeB2bSberbank return nil case PaymentMethodDataElectronicCertificateTypeSbp: *s = PaymentMethodDataElectronicCertificateTypeSbp return nil case PaymentMethodDataElectronicCertificateTypeSberLoan: *s = PaymentMethodDataElectronicCertificateTypeSberLoan return nil case PaymentMethodDataElectronicCertificateTypeElectronicCertificate: *s = PaymentMethodDataElectronicCertificateTypeElectronicCertificate return nil case PaymentMethodDataElectronicCertificateTypeSberBnpl: *s = PaymentMethodDataElectronicCertificateTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodDataMobileBalance type PaymentMethodDataMobileBalance struct { Type PaymentMethodDataMobileBalanceType `json:"type"` // Телефон, с баланса которого осуществляется платеж. // Указывается в формате ITU-T E.164: https://ru.wikipedia.org/wiki/E.164, // например 79000000000. Phone string `json:"phone"` } // GetType returns the value of Type. func (s *PaymentMethodDataMobileBalance) GetType() PaymentMethodDataMobileBalanceType { return s.Type } // GetPhone returns the value of Phone. func (s *PaymentMethodDataMobileBalance) GetPhone() string { return s.Phone } // SetType sets the value of Type. func (s *PaymentMethodDataMobileBalance) SetType(val PaymentMethodDataMobileBalanceType) { s.Type = val } // SetPhone sets the value of Phone. func (s *PaymentMethodDataMobileBalance) SetPhone(val string) { s.Phone = val } type PaymentMethodDataMobileBalanceType string const ( PaymentMethodDataMobileBalanceTypeBankCard PaymentMethodDataMobileBalanceType = "bank_card" PaymentMethodDataMobileBalanceTypeCash PaymentMethodDataMobileBalanceType = "cash" PaymentMethodDataMobileBalanceTypeSberbank PaymentMethodDataMobileBalanceType = "sberbank" PaymentMethodDataMobileBalanceTypeTinkoffBank PaymentMethodDataMobileBalanceType = "tinkoff_bank" PaymentMethodDataMobileBalanceTypeYooMoney PaymentMethodDataMobileBalanceType = "yoo_money" PaymentMethodDataMobileBalanceTypeMobileBalance PaymentMethodDataMobileBalanceType = "mobile_balance" PaymentMethodDataMobileBalanceTypeB2bSberbank PaymentMethodDataMobileBalanceType = "b2b_sberbank" PaymentMethodDataMobileBalanceTypeSbp PaymentMethodDataMobileBalanceType = "sbp" PaymentMethodDataMobileBalanceTypeSberLoan PaymentMethodDataMobileBalanceType = "sber_loan" PaymentMethodDataMobileBalanceTypeElectronicCertificate PaymentMethodDataMobileBalanceType = "electronic_certificate" PaymentMethodDataMobileBalanceTypeSberBnpl PaymentMethodDataMobileBalanceType = "sber_bnpl" ) // AllValues returns all PaymentMethodDataMobileBalanceType values. func (PaymentMethodDataMobileBalanceType) AllValues() []PaymentMethodDataMobileBalanceType { return []PaymentMethodDataMobileBalanceType{ PaymentMethodDataMobileBalanceTypeBankCard, PaymentMethodDataMobileBalanceTypeCash, PaymentMethodDataMobileBalanceTypeSberbank, PaymentMethodDataMobileBalanceTypeTinkoffBank, PaymentMethodDataMobileBalanceTypeYooMoney, PaymentMethodDataMobileBalanceTypeMobileBalance, PaymentMethodDataMobileBalanceTypeB2bSberbank, PaymentMethodDataMobileBalanceTypeSbp, PaymentMethodDataMobileBalanceTypeSberLoan, PaymentMethodDataMobileBalanceTypeElectronicCertificate, PaymentMethodDataMobileBalanceTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodDataMobileBalanceType) MarshalText() ([]byte, error) { switch s { case PaymentMethodDataMobileBalanceTypeBankCard: return []byte(s), nil case PaymentMethodDataMobileBalanceTypeCash: return []byte(s), nil case PaymentMethodDataMobileBalanceTypeSberbank: return []byte(s), nil case PaymentMethodDataMobileBalanceTypeTinkoffBank: return []byte(s), nil case PaymentMethodDataMobileBalanceTypeYooMoney: return []byte(s), nil case PaymentMethodDataMobileBalanceTypeMobileBalance: return []byte(s), nil case PaymentMethodDataMobileBalanceTypeB2bSberbank: return []byte(s), nil case PaymentMethodDataMobileBalanceTypeSbp: return []byte(s), nil case PaymentMethodDataMobileBalanceTypeSberLoan: return []byte(s), nil case PaymentMethodDataMobileBalanceTypeElectronicCertificate: return []byte(s), nil case PaymentMethodDataMobileBalanceTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodDataMobileBalanceType) UnmarshalText(data []byte) error { switch PaymentMethodDataMobileBalanceType(data) { case PaymentMethodDataMobileBalanceTypeBankCard: *s = PaymentMethodDataMobileBalanceTypeBankCard return nil case PaymentMethodDataMobileBalanceTypeCash: *s = PaymentMethodDataMobileBalanceTypeCash return nil case PaymentMethodDataMobileBalanceTypeSberbank: *s = PaymentMethodDataMobileBalanceTypeSberbank return nil case PaymentMethodDataMobileBalanceTypeTinkoffBank: *s = PaymentMethodDataMobileBalanceTypeTinkoffBank return nil case PaymentMethodDataMobileBalanceTypeYooMoney: *s = PaymentMethodDataMobileBalanceTypeYooMoney return nil case PaymentMethodDataMobileBalanceTypeMobileBalance: *s = PaymentMethodDataMobileBalanceTypeMobileBalance return nil case PaymentMethodDataMobileBalanceTypeB2bSberbank: *s = PaymentMethodDataMobileBalanceTypeB2bSberbank return nil case PaymentMethodDataMobileBalanceTypeSbp: *s = PaymentMethodDataMobileBalanceTypeSbp return nil case PaymentMethodDataMobileBalanceTypeSberLoan: *s = PaymentMethodDataMobileBalanceTypeSberLoan return nil case PaymentMethodDataMobileBalanceTypeElectronicCertificate: *s = PaymentMethodDataMobileBalanceTypeElectronicCertificate return nil case PaymentMethodDataMobileBalanceTypeSberBnpl: *s = PaymentMethodDataMobileBalanceTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodDataSberBnpl type PaymentMethodDataSberBnpl struct { Type PaymentMethodDataSberBnplType `json:"type"` Phone OptString `json:"phone"` } // GetType returns the value of Type. func (s *PaymentMethodDataSberBnpl) GetType() PaymentMethodDataSberBnplType { return s.Type } // GetPhone returns the value of Phone. func (s *PaymentMethodDataSberBnpl) GetPhone() OptString { return s.Phone } // SetType sets the value of Type. func (s *PaymentMethodDataSberBnpl) SetType(val PaymentMethodDataSberBnplType) { s.Type = val } // SetPhone sets the value of Phone. func (s *PaymentMethodDataSberBnpl) SetPhone(val OptString) { s.Phone = val } type PaymentMethodDataSberBnplType string const ( PaymentMethodDataSberBnplTypeBankCard PaymentMethodDataSberBnplType = "bank_card" PaymentMethodDataSberBnplTypeCash PaymentMethodDataSberBnplType = "cash" PaymentMethodDataSberBnplTypeSberbank PaymentMethodDataSberBnplType = "sberbank" PaymentMethodDataSberBnplTypeTinkoffBank PaymentMethodDataSberBnplType = "tinkoff_bank" PaymentMethodDataSberBnplTypeYooMoney PaymentMethodDataSberBnplType = "yoo_money" PaymentMethodDataSberBnplTypeMobileBalance PaymentMethodDataSberBnplType = "mobile_balance" PaymentMethodDataSberBnplTypeB2bSberbank PaymentMethodDataSberBnplType = "b2b_sberbank" PaymentMethodDataSberBnplTypeSbp PaymentMethodDataSberBnplType = "sbp" PaymentMethodDataSberBnplTypeSberLoan PaymentMethodDataSberBnplType = "sber_loan" PaymentMethodDataSberBnplTypeElectronicCertificate PaymentMethodDataSberBnplType = "electronic_certificate" PaymentMethodDataSberBnplTypeSberBnpl PaymentMethodDataSberBnplType = "sber_bnpl" ) // AllValues returns all PaymentMethodDataSberBnplType values. func (PaymentMethodDataSberBnplType) AllValues() []PaymentMethodDataSberBnplType { return []PaymentMethodDataSberBnplType{ PaymentMethodDataSberBnplTypeBankCard, PaymentMethodDataSberBnplTypeCash, PaymentMethodDataSberBnplTypeSberbank, PaymentMethodDataSberBnplTypeTinkoffBank, PaymentMethodDataSberBnplTypeYooMoney, PaymentMethodDataSberBnplTypeMobileBalance, PaymentMethodDataSberBnplTypeB2bSberbank, PaymentMethodDataSberBnplTypeSbp, PaymentMethodDataSberBnplTypeSberLoan, PaymentMethodDataSberBnplTypeElectronicCertificate, PaymentMethodDataSberBnplTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodDataSberBnplType) MarshalText() ([]byte, error) { switch s { case PaymentMethodDataSberBnplTypeBankCard: return []byte(s), nil case PaymentMethodDataSberBnplTypeCash: return []byte(s), nil case PaymentMethodDataSberBnplTypeSberbank: return []byte(s), nil case PaymentMethodDataSberBnplTypeTinkoffBank: return []byte(s), nil case PaymentMethodDataSberBnplTypeYooMoney: return []byte(s), nil case PaymentMethodDataSberBnplTypeMobileBalance: return []byte(s), nil case PaymentMethodDataSberBnplTypeB2bSberbank: return []byte(s), nil case PaymentMethodDataSberBnplTypeSbp: return []byte(s), nil case PaymentMethodDataSberBnplTypeSberLoan: return []byte(s), nil case PaymentMethodDataSberBnplTypeElectronicCertificate: return []byte(s), nil case PaymentMethodDataSberBnplTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodDataSberBnplType) UnmarshalText(data []byte) error { switch PaymentMethodDataSberBnplType(data) { case PaymentMethodDataSberBnplTypeBankCard: *s = PaymentMethodDataSberBnplTypeBankCard return nil case PaymentMethodDataSberBnplTypeCash: *s = PaymentMethodDataSberBnplTypeCash return nil case PaymentMethodDataSberBnplTypeSberbank: *s = PaymentMethodDataSberBnplTypeSberbank return nil case PaymentMethodDataSberBnplTypeTinkoffBank: *s = PaymentMethodDataSberBnplTypeTinkoffBank return nil case PaymentMethodDataSberBnplTypeYooMoney: *s = PaymentMethodDataSberBnplTypeYooMoney return nil case PaymentMethodDataSberBnplTypeMobileBalance: *s = PaymentMethodDataSberBnplTypeMobileBalance return nil case PaymentMethodDataSberBnplTypeB2bSberbank: *s = PaymentMethodDataSberBnplTypeB2bSberbank return nil case PaymentMethodDataSberBnplTypeSbp: *s = PaymentMethodDataSberBnplTypeSbp return nil case PaymentMethodDataSberBnplTypeSberLoan: *s = PaymentMethodDataSberBnplTypeSberLoan return nil case PaymentMethodDataSberBnplTypeElectronicCertificate: *s = PaymentMethodDataSberBnplTypeElectronicCertificate return nil case PaymentMethodDataSberBnplTypeSberBnpl: *s = PaymentMethodDataSberBnplTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodDataSberLoan type PaymentMethodDataSberLoan struct { Type PaymentMethodDataSberLoanType `json:"type"` } // GetType returns the value of Type. func (s *PaymentMethodDataSberLoan) GetType() PaymentMethodDataSberLoanType { return s.Type } // SetType sets the value of Type. func (s *PaymentMethodDataSberLoan) SetType(val PaymentMethodDataSberLoanType) { s.Type = val } type PaymentMethodDataSberLoanType string const ( PaymentMethodDataSberLoanTypeBankCard PaymentMethodDataSberLoanType = "bank_card" PaymentMethodDataSberLoanTypeCash PaymentMethodDataSberLoanType = "cash" PaymentMethodDataSberLoanTypeSberbank PaymentMethodDataSberLoanType = "sberbank" PaymentMethodDataSberLoanTypeTinkoffBank PaymentMethodDataSberLoanType = "tinkoff_bank" PaymentMethodDataSberLoanTypeYooMoney PaymentMethodDataSberLoanType = "yoo_money" PaymentMethodDataSberLoanTypeMobileBalance PaymentMethodDataSberLoanType = "mobile_balance" PaymentMethodDataSberLoanTypeB2bSberbank PaymentMethodDataSberLoanType = "b2b_sberbank" PaymentMethodDataSberLoanTypeSbp PaymentMethodDataSberLoanType = "sbp" PaymentMethodDataSberLoanTypeSberLoan PaymentMethodDataSberLoanType = "sber_loan" PaymentMethodDataSberLoanTypeElectronicCertificate PaymentMethodDataSberLoanType = "electronic_certificate" PaymentMethodDataSberLoanTypeSberBnpl PaymentMethodDataSberLoanType = "sber_bnpl" ) // AllValues returns all PaymentMethodDataSberLoanType values. func (PaymentMethodDataSberLoanType) AllValues() []PaymentMethodDataSberLoanType { return []PaymentMethodDataSberLoanType{ PaymentMethodDataSberLoanTypeBankCard, PaymentMethodDataSberLoanTypeCash, PaymentMethodDataSberLoanTypeSberbank, PaymentMethodDataSberLoanTypeTinkoffBank, PaymentMethodDataSberLoanTypeYooMoney, PaymentMethodDataSberLoanTypeMobileBalance, PaymentMethodDataSberLoanTypeB2bSberbank, PaymentMethodDataSberLoanTypeSbp, PaymentMethodDataSberLoanTypeSberLoan, PaymentMethodDataSberLoanTypeElectronicCertificate, PaymentMethodDataSberLoanTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodDataSberLoanType) MarshalText() ([]byte, error) { switch s { case PaymentMethodDataSberLoanTypeBankCard: return []byte(s), nil case PaymentMethodDataSberLoanTypeCash: return []byte(s), nil case PaymentMethodDataSberLoanTypeSberbank: return []byte(s), nil case PaymentMethodDataSberLoanTypeTinkoffBank: return []byte(s), nil case PaymentMethodDataSberLoanTypeYooMoney: return []byte(s), nil case PaymentMethodDataSberLoanTypeMobileBalance: return []byte(s), nil case PaymentMethodDataSberLoanTypeB2bSberbank: return []byte(s), nil case PaymentMethodDataSberLoanTypeSbp: return []byte(s), nil case PaymentMethodDataSberLoanTypeSberLoan: return []byte(s), nil case PaymentMethodDataSberLoanTypeElectronicCertificate: return []byte(s), nil case PaymentMethodDataSberLoanTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodDataSberLoanType) UnmarshalText(data []byte) error { switch PaymentMethodDataSberLoanType(data) { case PaymentMethodDataSberLoanTypeBankCard: *s = PaymentMethodDataSberLoanTypeBankCard return nil case PaymentMethodDataSberLoanTypeCash: *s = PaymentMethodDataSberLoanTypeCash return nil case PaymentMethodDataSberLoanTypeSberbank: *s = PaymentMethodDataSberLoanTypeSberbank return nil case PaymentMethodDataSberLoanTypeTinkoffBank: *s = PaymentMethodDataSberLoanTypeTinkoffBank return nil case PaymentMethodDataSberLoanTypeYooMoney: *s = PaymentMethodDataSberLoanTypeYooMoney return nil case PaymentMethodDataSberLoanTypeMobileBalance: *s = PaymentMethodDataSberLoanTypeMobileBalance return nil case PaymentMethodDataSberLoanTypeB2bSberbank: *s = PaymentMethodDataSberLoanTypeB2bSberbank return nil case PaymentMethodDataSberLoanTypeSbp: *s = PaymentMethodDataSberLoanTypeSbp return nil case PaymentMethodDataSberLoanTypeSberLoan: *s = PaymentMethodDataSberLoanTypeSberLoan return nil case PaymentMethodDataSberLoanTypeElectronicCertificate: *s = PaymentMethodDataSberLoanTypeElectronicCertificate return nil case PaymentMethodDataSberLoanTypeSberBnpl: *s = PaymentMethodDataSberLoanTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodDataSberbank type PaymentMethodDataSberbank struct { Type PaymentMethodDataSberbankType `json:"type"` // Телефон пользователя, на который зарегистрирован // аккаунт в SberPay. Необходим для подтверждения оплаты по // смс (сценарий подтверждения external). Указывается в // формате ITU-T E.164: https://ru.wikipedia.org/wiki/E.164, например 79000000000. Phone OptString `json:"phone"` } // GetType returns the value of Type. func (s *PaymentMethodDataSberbank) GetType() PaymentMethodDataSberbankType { return s.Type } // GetPhone returns the value of Phone. func (s *PaymentMethodDataSberbank) GetPhone() OptString { return s.Phone } // SetType sets the value of Type. func (s *PaymentMethodDataSberbank) SetType(val PaymentMethodDataSberbankType) { s.Type = val } // SetPhone sets the value of Phone. func (s *PaymentMethodDataSberbank) SetPhone(val OptString) { s.Phone = val } type PaymentMethodDataSberbankType string const ( PaymentMethodDataSberbankTypeBankCard PaymentMethodDataSberbankType = "bank_card" PaymentMethodDataSberbankTypeCash PaymentMethodDataSberbankType = "cash" PaymentMethodDataSberbankTypeSberbank PaymentMethodDataSberbankType = "sberbank" PaymentMethodDataSberbankTypeTinkoffBank PaymentMethodDataSberbankType = "tinkoff_bank" PaymentMethodDataSberbankTypeYooMoney PaymentMethodDataSberbankType = "yoo_money" PaymentMethodDataSberbankTypeMobileBalance PaymentMethodDataSberbankType = "mobile_balance" PaymentMethodDataSberbankTypeB2bSberbank PaymentMethodDataSberbankType = "b2b_sberbank" PaymentMethodDataSberbankTypeSbp PaymentMethodDataSberbankType = "sbp" PaymentMethodDataSberbankTypeSberLoan PaymentMethodDataSberbankType = "sber_loan" PaymentMethodDataSberbankTypeElectronicCertificate PaymentMethodDataSberbankType = "electronic_certificate" PaymentMethodDataSberbankTypeSberBnpl PaymentMethodDataSberbankType = "sber_bnpl" ) // AllValues returns all PaymentMethodDataSberbankType values. func (PaymentMethodDataSberbankType) AllValues() []PaymentMethodDataSberbankType { return []PaymentMethodDataSberbankType{ PaymentMethodDataSberbankTypeBankCard, PaymentMethodDataSberbankTypeCash, PaymentMethodDataSberbankTypeSberbank, PaymentMethodDataSberbankTypeTinkoffBank, PaymentMethodDataSberbankTypeYooMoney, PaymentMethodDataSberbankTypeMobileBalance, PaymentMethodDataSberbankTypeB2bSberbank, PaymentMethodDataSberbankTypeSbp, PaymentMethodDataSberbankTypeSberLoan, PaymentMethodDataSberbankTypeElectronicCertificate, PaymentMethodDataSberbankTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodDataSberbankType) MarshalText() ([]byte, error) { switch s { case PaymentMethodDataSberbankTypeBankCard: return []byte(s), nil case PaymentMethodDataSberbankTypeCash: return []byte(s), nil case PaymentMethodDataSberbankTypeSberbank: return []byte(s), nil case PaymentMethodDataSberbankTypeTinkoffBank: return []byte(s), nil case PaymentMethodDataSberbankTypeYooMoney: return []byte(s), nil case PaymentMethodDataSberbankTypeMobileBalance: return []byte(s), nil case PaymentMethodDataSberbankTypeB2bSberbank: return []byte(s), nil case PaymentMethodDataSberbankTypeSbp: return []byte(s), nil case PaymentMethodDataSberbankTypeSberLoan: return []byte(s), nil case PaymentMethodDataSberbankTypeElectronicCertificate: return []byte(s), nil case PaymentMethodDataSberbankTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodDataSberbankType) UnmarshalText(data []byte) error { switch PaymentMethodDataSberbankType(data) { case PaymentMethodDataSberbankTypeBankCard: *s = PaymentMethodDataSberbankTypeBankCard return nil case PaymentMethodDataSberbankTypeCash: *s = PaymentMethodDataSberbankTypeCash return nil case PaymentMethodDataSberbankTypeSberbank: *s = PaymentMethodDataSberbankTypeSberbank return nil case PaymentMethodDataSberbankTypeTinkoffBank: *s = PaymentMethodDataSberbankTypeTinkoffBank return nil case PaymentMethodDataSberbankTypeYooMoney: *s = PaymentMethodDataSberbankTypeYooMoney return nil case PaymentMethodDataSberbankTypeMobileBalance: *s = PaymentMethodDataSberbankTypeMobileBalance return nil case PaymentMethodDataSberbankTypeB2bSberbank: *s = PaymentMethodDataSberbankTypeB2bSberbank return nil case PaymentMethodDataSberbankTypeSbp: *s = PaymentMethodDataSberbankTypeSbp return nil case PaymentMethodDataSberbankTypeSberLoan: *s = PaymentMethodDataSberbankTypeSberLoan return nil case PaymentMethodDataSberbankTypeElectronicCertificate: *s = PaymentMethodDataSberbankTypeElectronicCertificate return nil case PaymentMethodDataSberbankTypeSberBnpl: *s = PaymentMethodDataSberbankTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodDataSbp type PaymentMethodDataSbp struct { Type PaymentMethodDataSbpType `json:"type"` } // GetType returns the value of Type. func (s *PaymentMethodDataSbp) GetType() PaymentMethodDataSbpType { return s.Type } // SetType sets the value of Type. func (s *PaymentMethodDataSbp) SetType(val PaymentMethodDataSbpType) { s.Type = val } type PaymentMethodDataSbpType string const ( PaymentMethodDataSbpTypeBankCard PaymentMethodDataSbpType = "bank_card" PaymentMethodDataSbpTypeCash PaymentMethodDataSbpType = "cash" PaymentMethodDataSbpTypeSberbank PaymentMethodDataSbpType = "sberbank" PaymentMethodDataSbpTypeTinkoffBank PaymentMethodDataSbpType = "tinkoff_bank" PaymentMethodDataSbpTypeYooMoney PaymentMethodDataSbpType = "yoo_money" PaymentMethodDataSbpTypeMobileBalance PaymentMethodDataSbpType = "mobile_balance" PaymentMethodDataSbpTypeB2bSberbank PaymentMethodDataSbpType = "b2b_sberbank" PaymentMethodDataSbpTypeSbp PaymentMethodDataSbpType = "sbp" PaymentMethodDataSbpTypeSberLoan PaymentMethodDataSbpType = "sber_loan" PaymentMethodDataSbpTypeElectronicCertificate PaymentMethodDataSbpType = "electronic_certificate" PaymentMethodDataSbpTypeSberBnpl PaymentMethodDataSbpType = "sber_bnpl" ) // AllValues returns all PaymentMethodDataSbpType values. func (PaymentMethodDataSbpType) AllValues() []PaymentMethodDataSbpType { return []PaymentMethodDataSbpType{ PaymentMethodDataSbpTypeBankCard, PaymentMethodDataSbpTypeCash, PaymentMethodDataSbpTypeSberbank, PaymentMethodDataSbpTypeTinkoffBank, PaymentMethodDataSbpTypeYooMoney, PaymentMethodDataSbpTypeMobileBalance, PaymentMethodDataSbpTypeB2bSberbank, PaymentMethodDataSbpTypeSbp, PaymentMethodDataSbpTypeSberLoan, PaymentMethodDataSbpTypeElectronicCertificate, PaymentMethodDataSbpTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodDataSbpType) MarshalText() ([]byte, error) { switch s { case PaymentMethodDataSbpTypeBankCard: return []byte(s), nil case PaymentMethodDataSbpTypeCash: return []byte(s), nil case PaymentMethodDataSbpTypeSberbank: return []byte(s), nil case PaymentMethodDataSbpTypeTinkoffBank: return []byte(s), nil case PaymentMethodDataSbpTypeYooMoney: return []byte(s), nil case PaymentMethodDataSbpTypeMobileBalance: return []byte(s), nil case PaymentMethodDataSbpTypeB2bSberbank: return []byte(s), nil case PaymentMethodDataSbpTypeSbp: return []byte(s), nil case PaymentMethodDataSbpTypeSberLoan: return []byte(s), nil case PaymentMethodDataSbpTypeElectronicCertificate: return []byte(s), nil case PaymentMethodDataSbpTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodDataSbpType) UnmarshalText(data []byte) error { switch PaymentMethodDataSbpType(data) { case PaymentMethodDataSbpTypeBankCard: *s = PaymentMethodDataSbpTypeBankCard return nil case PaymentMethodDataSbpTypeCash: *s = PaymentMethodDataSbpTypeCash return nil case PaymentMethodDataSbpTypeSberbank: *s = PaymentMethodDataSbpTypeSberbank return nil case PaymentMethodDataSbpTypeTinkoffBank: *s = PaymentMethodDataSbpTypeTinkoffBank return nil case PaymentMethodDataSbpTypeYooMoney: *s = PaymentMethodDataSbpTypeYooMoney return nil case PaymentMethodDataSbpTypeMobileBalance: *s = PaymentMethodDataSbpTypeMobileBalance return nil case PaymentMethodDataSbpTypeB2bSberbank: *s = PaymentMethodDataSbpTypeB2bSberbank return nil case PaymentMethodDataSbpTypeSbp: *s = PaymentMethodDataSbpTypeSbp return nil case PaymentMethodDataSbpTypeSberLoan: *s = PaymentMethodDataSbpTypeSberLoan return nil case PaymentMethodDataSbpTypeElectronicCertificate: *s = PaymentMethodDataSbpTypeElectronicCertificate return nil case PaymentMethodDataSbpTypeSberBnpl: *s = PaymentMethodDataSbpTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodDataTinkoffBank type PaymentMethodDataTinkoffBank struct { Type PaymentMethodDataTinkoffBankType `json:"type"` } // GetType returns the value of Type. func (s *PaymentMethodDataTinkoffBank) GetType() PaymentMethodDataTinkoffBankType { return s.Type } // SetType sets the value of Type. func (s *PaymentMethodDataTinkoffBank) SetType(val PaymentMethodDataTinkoffBankType) { s.Type = val } type PaymentMethodDataTinkoffBankType string const ( PaymentMethodDataTinkoffBankTypeBankCard PaymentMethodDataTinkoffBankType = "bank_card" PaymentMethodDataTinkoffBankTypeCash PaymentMethodDataTinkoffBankType = "cash" PaymentMethodDataTinkoffBankTypeSberbank PaymentMethodDataTinkoffBankType = "sberbank" PaymentMethodDataTinkoffBankTypeTinkoffBank PaymentMethodDataTinkoffBankType = "tinkoff_bank" PaymentMethodDataTinkoffBankTypeYooMoney PaymentMethodDataTinkoffBankType = "yoo_money" PaymentMethodDataTinkoffBankTypeMobileBalance PaymentMethodDataTinkoffBankType = "mobile_balance" PaymentMethodDataTinkoffBankTypeB2bSberbank PaymentMethodDataTinkoffBankType = "b2b_sberbank" PaymentMethodDataTinkoffBankTypeSbp PaymentMethodDataTinkoffBankType = "sbp" PaymentMethodDataTinkoffBankTypeSberLoan PaymentMethodDataTinkoffBankType = "sber_loan" PaymentMethodDataTinkoffBankTypeElectronicCertificate PaymentMethodDataTinkoffBankType = "electronic_certificate" PaymentMethodDataTinkoffBankTypeSberBnpl PaymentMethodDataTinkoffBankType = "sber_bnpl" ) // AllValues returns all PaymentMethodDataTinkoffBankType values. func (PaymentMethodDataTinkoffBankType) AllValues() []PaymentMethodDataTinkoffBankType { return []PaymentMethodDataTinkoffBankType{ PaymentMethodDataTinkoffBankTypeBankCard, PaymentMethodDataTinkoffBankTypeCash, PaymentMethodDataTinkoffBankTypeSberbank, PaymentMethodDataTinkoffBankTypeTinkoffBank, PaymentMethodDataTinkoffBankTypeYooMoney, PaymentMethodDataTinkoffBankTypeMobileBalance, PaymentMethodDataTinkoffBankTypeB2bSberbank, PaymentMethodDataTinkoffBankTypeSbp, PaymentMethodDataTinkoffBankTypeSberLoan, PaymentMethodDataTinkoffBankTypeElectronicCertificate, PaymentMethodDataTinkoffBankTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodDataTinkoffBankType) MarshalText() ([]byte, error) { switch s { case PaymentMethodDataTinkoffBankTypeBankCard: return []byte(s), nil case PaymentMethodDataTinkoffBankTypeCash: return []byte(s), nil case PaymentMethodDataTinkoffBankTypeSberbank: return []byte(s), nil case PaymentMethodDataTinkoffBankTypeTinkoffBank: return []byte(s), nil case PaymentMethodDataTinkoffBankTypeYooMoney: return []byte(s), nil case PaymentMethodDataTinkoffBankTypeMobileBalance: return []byte(s), nil case PaymentMethodDataTinkoffBankTypeB2bSberbank: return []byte(s), nil case PaymentMethodDataTinkoffBankTypeSbp: return []byte(s), nil case PaymentMethodDataTinkoffBankTypeSberLoan: return []byte(s), nil case PaymentMethodDataTinkoffBankTypeElectronicCertificate: return []byte(s), nil case PaymentMethodDataTinkoffBankTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodDataTinkoffBankType) UnmarshalText(data []byte) error { switch PaymentMethodDataTinkoffBankType(data) { case PaymentMethodDataTinkoffBankTypeBankCard: *s = PaymentMethodDataTinkoffBankTypeBankCard return nil case PaymentMethodDataTinkoffBankTypeCash: *s = PaymentMethodDataTinkoffBankTypeCash return nil case PaymentMethodDataTinkoffBankTypeSberbank: *s = PaymentMethodDataTinkoffBankTypeSberbank return nil case PaymentMethodDataTinkoffBankTypeTinkoffBank: *s = PaymentMethodDataTinkoffBankTypeTinkoffBank return nil case PaymentMethodDataTinkoffBankTypeYooMoney: *s = PaymentMethodDataTinkoffBankTypeYooMoney return nil case PaymentMethodDataTinkoffBankTypeMobileBalance: *s = PaymentMethodDataTinkoffBankTypeMobileBalance return nil case PaymentMethodDataTinkoffBankTypeB2bSberbank: *s = PaymentMethodDataTinkoffBankTypeB2bSberbank return nil case PaymentMethodDataTinkoffBankTypeSbp: *s = PaymentMethodDataTinkoffBankTypeSbp return nil case PaymentMethodDataTinkoffBankTypeSberLoan: *s = PaymentMethodDataTinkoffBankTypeSberLoan return nil case PaymentMethodDataTinkoffBankTypeElectronicCertificate: *s = PaymentMethodDataTinkoffBankTypeElectronicCertificate return nil case PaymentMethodDataTinkoffBankTypeSberBnpl: *s = PaymentMethodDataTinkoffBankTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodDataYooMoney type PaymentMethodDataYooMoney struct { Type PaymentMethodDataYooMoneyType `json:"type"` } // GetType returns the value of Type. func (s *PaymentMethodDataYooMoney) GetType() PaymentMethodDataYooMoneyType { return s.Type } // SetType sets the value of Type. func (s *PaymentMethodDataYooMoney) SetType(val PaymentMethodDataYooMoneyType) { s.Type = val } type PaymentMethodDataYooMoneyType string const ( PaymentMethodDataYooMoneyTypeBankCard PaymentMethodDataYooMoneyType = "bank_card" PaymentMethodDataYooMoneyTypeCash PaymentMethodDataYooMoneyType = "cash" PaymentMethodDataYooMoneyTypeSberbank PaymentMethodDataYooMoneyType = "sberbank" PaymentMethodDataYooMoneyTypeTinkoffBank PaymentMethodDataYooMoneyType = "tinkoff_bank" PaymentMethodDataYooMoneyTypeYooMoney PaymentMethodDataYooMoneyType = "yoo_money" PaymentMethodDataYooMoneyTypeMobileBalance PaymentMethodDataYooMoneyType = "mobile_balance" PaymentMethodDataYooMoneyTypeB2bSberbank PaymentMethodDataYooMoneyType = "b2b_sberbank" PaymentMethodDataYooMoneyTypeSbp PaymentMethodDataYooMoneyType = "sbp" PaymentMethodDataYooMoneyTypeSberLoan PaymentMethodDataYooMoneyType = "sber_loan" PaymentMethodDataYooMoneyTypeElectronicCertificate PaymentMethodDataYooMoneyType = "electronic_certificate" PaymentMethodDataYooMoneyTypeSberBnpl PaymentMethodDataYooMoneyType = "sber_bnpl" ) // AllValues returns all PaymentMethodDataYooMoneyType values. func (PaymentMethodDataYooMoneyType) AllValues() []PaymentMethodDataYooMoneyType { return []PaymentMethodDataYooMoneyType{ PaymentMethodDataYooMoneyTypeBankCard, PaymentMethodDataYooMoneyTypeCash, PaymentMethodDataYooMoneyTypeSberbank, PaymentMethodDataYooMoneyTypeTinkoffBank, PaymentMethodDataYooMoneyTypeYooMoney, PaymentMethodDataYooMoneyTypeMobileBalance, PaymentMethodDataYooMoneyTypeB2bSberbank, PaymentMethodDataYooMoneyTypeSbp, PaymentMethodDataYooMoneyTypeSberLoan, PaymentMethodDataYooMoneyTypeElectronicCertificate, PaymentMethodDataYooMoneyTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodDataYooMoneyType) MarshalText() ([]byte, error) { switch s { case PaymentMethodDataYooMoneyTypeBankCard: return []byte(s), nil case PaymentMethodDataYooMoneyTypeCash: return []byte(s), nil case PaymentMethodDataYooMoneyTypeSberbank: return []byte(s), nil case PaymentMethodDataYooMoneyTypeTinkoffBank: return []byte(s), nil case PaymentMethodDataYooMoneyTypeYooMoney: return []byte(s), nil case PaymentMethodDataYooMoneyTypeMobileBalance: return []byte(s), nil case PaymentMethodDataYooMoneyTypeB2bSberbank: return []byte(s), nil case PaymentMethodDataYooMoneyTypeSbp: return []byte(s), nil case PaymentMethodDataYooMoneyTypeSberLoan: return []byte(s), nil case PaymentMethodDataYooMoneyTypeElectronicCertificate: return []byte(s), nil case PaymentMethodDataYooMoneyTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodDataYooMoneyType) UnmarshalText(data []byte) error { switch PaymentMethodDataYooMoneyType(data) { case PaymentMethodDataYooMoneyTypeBankCard: *s = PaymentMethodDataYooMoneyTypeBankCard return nil case PaymentMethodDataYooMoneyTypeCash: *s = PaymentMethodDataYooMoneyTypeCash return nil case PaymentMethodDataYooMoneyTypeSberbank: *s = PaymentMethodDataYooMoneyTypeSberbank return nil case PaymentMethodDataYooMoneyTypeTinkoffBank: *s = PaymentMethodDataYooMoneyTypeTinkoffBank return nil case PaymentMethodDataYooMoneyTypeYooMoney: *s = PaymentMethodDataYooMoneyTypeYooMoney return nil case PaymentMethodDataYooMoneyTypeMobileBalance: *s = PaymentMethodDataYooMoneyTypeMobileBalance return nil case PaymentMethodDataYooMoneyTypeB2bSberbank: *s = PaymentMethodDataYooMoneyTypeB2bSberbank return nil case PaymentMethodDataYooMoneyTypeSbp: *s = PaymentMethodDataYooMoneyTypeSbp return nil case PaymentMethodDataYooMoneyTypeSberLoan: *s = PaymentMethodDataYooMoneyTypeSberLoan return nil case PaymentMethodDataYooMoneyTypeElectronicCertificate: *s = PaymentMethodDataYooMoneyTypeElectronicCertificate return nil case PaymentMethodDataYooMoneyTypeSberBnpl: *s = PaymentMethodDataYooMoneyTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodElectronicCertificate type PaymentMethodElectronicCertificate struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodElectronicCertificateStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` Card OptPaymentMethodElectronicCertificateCard `json:"card"` ElectronicCertificate OptElectronicCertificatePayment `json:"electronic_certificate"` // Одобренная корзина покупки — список товаров, // одобренных к оплате по электронному сертификату. // Присутствует только при оплате на готовой странице // ЮKassa: https://yookassa. // ru/developers/payment-acceptance/integration-scenarios/manual-integration/other/electronic-certificate/ready-made-payment-form. Articles []ElectronicCertificateApprovedPaymentArticle `json:"articles"` } // GetType returns the value of Type. func (s *PaymentMethodElectronicCertificate) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodElectronicCertificate) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodElectronicCertificate) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodElectronicCertificate) GetStatus() PaymentMethodElectronicCertificateStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodElectronicCertificate) GetTitle() OptPaymentMethodTitle { return s.Title } // GetCard returns the value of Card. func (s *PaymentMethodElectronicCertificate) GetCard() OptPaymentMethodElectronicCertificateCard { return s.Card } // GetElectronicCertificate returns the value of ElectronicCertificate. func (s *PaymentMethodElectronicCertificate) GetElectronicCertificate() OptElectronicCertificatePayment { return s.ElectronicCertificate } // GetArticles returns the value of Articles. func (s *PaymentMethodElectronicCertificate) GetArticles() []ElectronicCertificateApprovedPaymentArticle { return s.Articles } // SetType sets the value of Type. func (s *PaymentMethodElectronicCertificate) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodElectronicCertificate) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodElectronicCertificate) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodElectronicCertificate) SetStatus(val PaymentMethodElectronicCertificateStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodElectronicCertificate) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // SetCard sets the value of Card. func (s *PaymentMethodElectronicCertificate) SetCard(val OptPaymentMethodElectronicCertificateCard) { s.Card = val } // SetElectronicCertificate sets the value of ElectronicCertificate. func (s *PaymentMethodElectronicCertificate) SetElectronicCertificate(val OptElectronicCertificatePayment) { s.ElectronicCertificate = val } // SetArticles sets the value of Articles. func (s *PaymentMethodElectronicCertificate) SetArticles(val []ElectronicCertificateApprovedPaymentArticle) { s.Articles = val } // Данные банковской карты. type PaymentMethodElectronicCertificateCard struct { First6 OptBankCardFirst6 `json:"first6"` Last4 BankCardLast4 `json:"last4"` ExpiryYear BankCardExpiryYear `json:"expiry_year"` ExpiryMonth BankCardExpiryMonth `json:"expiry_month"` CardType BankCardType `json:"card_type"` CardProduct OptBankCardProduct `json:"card_product"` IssuerCountry OptBankCardIssuerCountry `json:"issuer_country"` IssuerName OptBankCardIssuerName `json:"issuer_name"` Source OptBankCardDataSource `json:"source"` } // GetFirst6 returns the value of First6. func (s *PaymentMethodElectronicCertificateCard) GetFirst6() OptBankCardFirst6 { return s.First6 } // GetLast4 returns the value of Last4. func (s *PaymentMethodElectronicCertificateCard) GetLast4() BankCardLast4 { return s.Last4 } // GetExpiryYear returns the value of ExpiryYear. func (s *PaymentMethodElectronicCertificateCard) GetExpiryYear() BankCardExpiryYear { return s.ExpiryYear } // GetExpiryMonth returns the value of ExpiryMonth. func (s *PaymentMethodElectronicCertificateCard) GetExpiryMonth() BankCardExpiryMonth { return s.ExpiryMonth } // GetCardType returns the value of CardType. func (s *PaymentMethodElectronicCertificateCard) GetCardType() BankCardType { return s.CardType } // GetCardProduct returns the value of CardProduct. func (s *PaymentMethodElectronicCertificateCard) GetCardProduct() OptBankCardProduct { return s.CardProduct } // GetIssuerCountry returns the value of IssuerCountry. func (s *PaymentMethodElectronicCertificateCard) GetIssuerCountry() OptBankCardIssuerCountry { return s.IssuerCountry } // GetIssuerName returns the value of IssuerName. func (s *PaymentMethodElectronicCertificateCard) GetIssuerName() OptBankCardIssuerName { return s.IssuerName } // GetSource returns the value of Source. func (s *PaymentMethodElectronicCertificateCard) GetSource() OptBankCardDataSource { return s.Source } // SetFirst6 sets the value of First6. func (s *PaymentMethodElectronicCertificateCard) SetFirst6(val OptBankCardFirst6) { s.First6 = val } // SetLast4 sets the value of Last4. func (s *PaymentMethodElectronicCertificateCard) SetLast4(val BankCardLast4) { s.Last4 = val } // SetExpiryYear sets the value of ExpiryYear. func (s *PaymentMethodElectronicCertificateCard) SetExpiryYear(val BankCardExpiryYear) { s.ExpiryYear = val } // SetExpiryMonth sets the value of ExpiryMonth. func (s *PaymentMethodElectronicCertificateCard) SetExpiryMonth(val BankCardExpiryMonth) { s.ExpiryMonth = val } // SetCardType sets the value of CardType. func (s *PaymentMethodElectronicCertificateCard) SetCardType(val BankCardType) { s.CardType = val } // SetCardProduct sets the value of CardProduct. func (s *PaymentMethodElectronicCertificateCard) SetCardProduct(val OptBankCardProduct) { s.CardProduct = val } // SetIssuerCountry sets the value of IssuerCountry. func (s *PaymentMethodElectronicCertificateCard) SetIssuerCountry(val OptBankCardIssuerCountry) { s.IssuerCountry = val } // SetIssuerName sets the value of IssuerName. func (s *PaymentMethodElectronicCertificateCard) SetIssuerName(val OptBankCardIssuerName) { s.IssuerName = val } // SetSource sets the value of Source. func (s *PaymentMethodElectronicCertificateCard) SetSource(val OptBankCardDataSource) { s.Source = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodElectronicCertificateStatus string const ( PaymentMethodElectronicCertificateStatusPending PaymentMethodElectronicCertificateStatus = "pending" PaymentMethodElectronicCertificateStatusActive PaymentMethodElectronicCertificateStatus = "active" PaymentMethodElectronicCertificateStatusInactive PaymentMethodElectronicCertificateStatus = "inactive" ) // AllValues returns all PaymentMethodElectronicCertificateStatus values. func (PaymentMethodElectronicCertificateStatus) AllValues() []PaymentMethodElectronicCertificateStatus { return []PaymentMethodElectronicCertificateStatus{ PaymentMethodElectronicCertificateStatusPending, PaymentMethodElectronicCertificateStatusActive, PaymentMethodElectronicCertificateStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodElectronicCertificateStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodElectronicCertificateStatusPending: return []byte(s), nil case PaymentMethodElectronicCertificateStatusActive: return []byte(s), nil case PaymentMethodElectronicCertificateStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodElectronicCertificateStatus) UnmarshalText(data []byte) error { switch PaymentMethodElectronicCertificateStatus(data) { case PaymentMethodElectronicCertificateStatusPending: *s = PaymentMethodElectronicCertificateStatusPending return nil case PaymentMethodElectronicCertificateStatusActive: *s = PaymentMethodElectronicCertificateStatusActive return nil case PaymentMethodElectronicCertificateStatusInactive: *s = PaymentMethodElectronicCertificateStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodGooglePay type PaymentMethodGooglePay struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodGooglePayStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` } // GetType returns the value of Type. func (s *PaymentMethodGooglePay) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodGooglePay) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodGooglePay) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodGooglePay) GetStatus() PaymentMethodGooglePayStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodGooglePay) GetTitle() OptPaymentMethodTitle { return s.Title } // SetType sets the value of Type. func (s *PaymentMethodGooglePay) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodGooglePay) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodGooglePay) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodGooglePay) SetStatus(val PaymentMethodGooglePayStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodGooglePay) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodGooglePayStatus string const ( PaymentMethodGooglePayStatusPending PaymentMethodGooglePayStatus = "pending" PaymentMethodGooglePayStatusActive PaymentMethodGooglePayStatus = "active" PaymentMethodGooglePayStatusInactive PaymentMethodGooglePayStatus = "inactive" ) // AllValues returns all PaymentMethodGooglePayStatus values. func (PaymentMethodGooglePayStatus) AllValues() []PaymentMethodGooglePayStatus { return []PaymentMethodGooglePayStatus{ PaymentMethodGooglePayStatusPending, PaymentMethodGooglePayStatusActive, PaymentMethodGooglePayStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodGooglePayStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodGooglePayStatusPending: return []byte(s), nil case PaymentMethodGooglePayStatusActive: return []byte(s), nil case PaymentMethodGooglePayStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodGooglePayStatus) UnmarshalText(data []byte) error { switch PaymentMethodGooglePayStatus(data) { case PaymentMethodGooglePayStatusPending: *s = PaymentMethodGooglePayStatusPending return nil case PaymentMethodGooglePayStatusActive: *s = PaymentMethodGooglePayStatusActive return nil case PaymentMethodGooglePayStatusInactive: *s = PaymentMethodGooglePayStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } type PaymentMethodId string // Merged schema. // Ref: #/components/schemas/PaymentMethodInstallments type PaymentMethodInstallments struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodInstallmentsStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` } // GetType returns the value of Type. func (s *PaymentMethodInstallments) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodInstallments) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodInstallments) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodInstallments) GetStatus() PaymentMethodInstallmentsStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodInstallments) GetTitle() OptPaymentMethodTitle { return s.Title } // SetType sets the value of Type. func (s *PaymentMethodInstallments) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodInstallments) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodInstallments) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodInstallments) SetStatus(val PaymentMethodInstallmentsStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodInstallments) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodInstallmentsStatus string const ( PaymentMethodInstallmentsStatusPending PaymentMethodInstallmentsStatus = "pending" PaymentMethodInstallmentsStatusActive PaymentMethodInstallmentsStatus = "active" PaymentMethodInstallmentsStatusInactive PaymentMethodInstallmentsStatus = "inactive" ) // AllValues returns all PaymentMethodInstallmentsStatus values. func (PaymentMethodInstallmentsStatus) AllValues() []PaymentMethodInstallmentsStatus { return []PaymentMethodInstallmentsStatus{ PaymentMethodInstallmentsStatusPending, PaymentMethodInstallmentsStatusActive, PaymentMethodInstallmentsStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodInstallmentsStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodInstallmentsStatusPending: return []byte(s), nil case PaymentMethodInstallmentsStatusActive: return []byte(s), nil case PaymentMethodInstallmentsStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodInstallmentsStatus) UnmarshalText(data []byte) error { switch PaymentMethodInstallmentsStatus(data) { case PaymentMethodInstallmentsStatusPending: *s = PaymentMethodInstallmentsStatusPending return nil case PaymentMethodInstallmentsStatusActive: *s = PaymentMethodInstallmentsStatusActive return nil case PaymentMethodInstallmentsStatusInactive: *s = PaymentMethodInstallmentsStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodMobileBalance type PaymentMethodMobileBalance struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodMobileBalanceStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` } // GetType returns the value of Type. func (s *PaymentMethodMobileBalance) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodMobileBalance) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodMobileBalance) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodMobileBalance) GetStatus() PaymentMethodMobileBalanceStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodMobileBalance) GetTitle() OptPaymentMethodTitle { return s.Title } // SetType sets the value of Type. func (s *PaymentMethodMobileBalance) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodMobileBalance) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodMobileBalance) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodMobileBalance) SetStatus(val PaymentMethodMobileBalanceStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodMobileBalance) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodMobileBalanceStatus string const ( PaymentMethodMobileBalanceStatusPending PaymentMethodMobileBalanceStatus = "pending" PaymentMethodMobileBalanceStatusActive PaymentMethodMobileBalanceStatus = "active" PaymentMethodMobileBalanceStatusInactive PaymentMethodMobileBalanceStatus = "inactive" ) // AllValues returns all PaymentMethodMobileBalanceStatus values. func (PaymentMethodMobileBalanceStatus) AllValues() []PaymentMethodMobileBalanceStatus { return []PaymentMethodMobileBalanceStatus{ PaymentMethodMobileBalanceStatusPending, PaymentMethodMobileBalanceStatusActive, PaymentMethodMobileBalanceStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodMobileBalanceStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodMobileBalanceStatusPending: return []byte(s), nil case PaymentMethodMobileBalanceStatusActive: return []byte(s), nil case PaymentMethodMobileBalanceStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodMobileBalanceStatus) UnmarshalText(data []byte) error { switch PaymentMethodMobileBalanceStatus(data) { case PaymentMethodMobileBalanceStatusPending: *s = PaymentMethodMobileBalanceStatusPending return nil case PaymentMethodMobileBalanceStatusActive: *s = PaymentMethodMobileBalanceStatusActive return nil case PaymentMethodMobileBalanceStatusInactive: *s = PaymentMethodMobileBalanceStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodQiwi type PaymentMethodQiwi struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodQiwiStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` } // GetType returns the value of Type. func (s *PaymentMethodQiwi) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodQiwi) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodQiwi) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodQiwi) GetStatus() PaymentMethodQiwiStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodQiwi) GetTitle() OptPaymentMethodTitle { return s.Title } // SetType sets the value of Type. func (s *PaymentMethodQiwi) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodQiwi) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodQiwi) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodQiwi) SetStatus(val PaymentMethodQiwiStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodQiwi) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodQiwiStatus string const ( PaymentMethodQiwiStatusPending PaymentMethodQiwiStatus = "pending" PaymentMethodQiwiStatusActive PaymentMethodQiwiStatus = "active" PaymentMethodQiwiStatusInactive PaymentMethodQiwiStatus = "inactive" ) // AllValues returns all PaymentMethodQiwiStatus values. func (PaymentMethodQiwiStatus) AllValues() []PaymentMethodQiwiStatus { return []PaymentMethodQiwiStatus{ PaymentMethodQiwiStatusPending, PaymentMethodQiwiStatusActive, PaymentMethodQiwiStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodQiwiStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodQiwiStatusPending: return []byte(s), nil case PaymentMethodQiwiStatusActive: return []byte(s), nil case PaymentMethodQiwiStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodQiwiStatus) UnmarshalText(data []byte) error { switch PaymentMethodQiwiStatus(data) { case PaymentMethodQiwiStatusPending: *s = PaymentMethodQiwiStatusPending return nil case PaymentMethodQiwiStatusActive: *s = PaymentMethodQiwiStatusActive return nil case PaymentMethodQiwiStatusInactive: *s = PaymentMethodQiwiStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodSberBnpl type PaymentMethodSberBnpl struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodSberBnplStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` } // GetType returns the value of Type. func (s *PaymentMethodSberBnpl) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodSberBnpl) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodSberBnpl) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodSberBnpl) GetStatus() PaymentMethodSberBnplStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodSberBnpl) GetTitle() OptPaymentMethodTitle { return s.Title } // SetType sets the value of Type. func (s *PaymentMethodSberBnpl) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodSberBnpl) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodSberBnpl) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodSberBnpl) SetStatus(val PaymentMethodSberBnplStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodSberBnpl) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodSberBnplStatus string const ( PaymentMethodSberBnplStatusPending PaymentMethodSberBnplStatus = "pending" PaymentMethodSberBnplStatusActive PaymentMethodSberBnplStatus = "active" PaymentMethodSberBnplStatusInactive PaymentMethodSberBnplStatus = "inactive" ) // AllValues returns all PaymentMethodSberBnplStatus values. func (PaymentMethodSberBnplStatus) AllValues() []PaymentMethodSberBnplStatus { return []PaymentMethodSberBnplStatus{ PaymentMethodSberBnplStatusPending, PaymentMethodSberBnplStatusActive, PaymentMethodSberBnplStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodSberBnplStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodSberBnplStatusPending: return []byte(s), nil case PaymentMethodSberBnplStatusActive: return []byte(s), nil case PaymentMethodSberBnplStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodSberBnplStatus) UnmarshalText(data []byte) error { switch PaymentMethodSberBnplStatus(data) { case PaymentMethodSberBnplStatusPending: *s = PaymentMethodSberBnplStatusPending return nil case PaymentMethodSberBnplStatusActive: *s = PaymentMethodSberBnplStatusActive return nil case PaymentMethodSberBnplStatusInactive: *s = PaymentMethodSberBnplStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodSberLoan type PaymentMethodSberLoan struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodSberLoanStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` // Тариф кредита, который пользователь выбрал при // оплате. Возможные значения: loan — кредит; installments_XX — // рассрочка, где XX — количество месяцев для выплаты // рассрочки. Например, installments_3 — рассрочка на 3 месяца. // Присутствует для платежей в статусе waiting_for_capture и // succeeded. LoanOption OptString `json:"loan_option"` DiscountAmount OptPaymentMethodSberLoanDiscountAmount `json:"discount_amount"` // Время, когда заканчивается период охлаждения: // https://yookassa.ru/docs/support/payments/credit-purchases-by-sberbank-with-cooling-off // кредита или рассрочки. Указывается по UTC: https://ru.wikipedia. // org/wiki/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F и передается в формате ISO 8601: https://en.wikipedia.org/wiki/ISO_8601. Присутствует для платежей в статусе pending, которые по закону: https://www.consultant.ru/document/cons_doc_LAW_498604/ попадают под процедуру охлаждения. SuspendedUntil OptDateTime `json:"suspended_until"` } // GetType returns the value of Type. func (s *PaymentMethodSberLoan) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodSberLoan) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodSberLoan) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodSberLoan) GetStatus() PaymentMethodSberLoanStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodSberLoan) GetTitle() OptPaymentMethodTitle { return s.Title } // GetLoanOption returns the value of LoanOption. func (s *PaymentMethodSberLoan) GetLoanOption() OptString { return s.LoanOption } // GetDiscountAmount returns the value of DiscountAmount. func (s *PaymentMethodSberLoan) GetDiscountAmount() OptPaymentMethodSberLoanDiscountAmount { return s.DiscountAmount } // GetSuspendedUntil returns the value of SuspendedUntil. func (s *PaymentMethodSberLoan) GetSuspendedUntil() OptDateTime { return s.SuspendedUntil } // SetType sets the value of Type. func (s *PaymentMethodSberLoan) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodSberLoan) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodSberLoan) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodSberLoan) SetStatus(val PaymentMethodSberLoanStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodSberLoan) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // SetLoanOption sets the value of LoanOption. func (s *PaymentMethodSberLoan) SetLoanOption(val OptString) { s.LoanOption = val } // SetDiscountAmount sets the value of DiscountAmount. func (s *PaymentMethodSberLoan) SetDiscountAmount(val OptPaymentMethodSberLoanDiscountAmount) { s.DiscountAmount = val } // SetSuspendedUntil sets the value of SuspendedUntil. func (s *PaymentMethodSberLoan) SetSuspendedUntil(val OptDateTime) { s.SuspendedUntil = val } // Сумма в выбранной валюте. type PaymentMethodSberLoanDiscountAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *PaymentMethodSberLoanDiscountAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *PaymentMethodSberLoanDiscountAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *PaymentMethodSberLoanDiscountAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *PaymentMethodSberLoanDiscountAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodSberLoanStatus string const ( PaymentMethodSberLoanStatusPending PaymentMethodSberLoanStatus = "pending" PaymentMethodSberLoanStatusActive PaymentMethodSberLoanStatus = "active" PaymentMethodSberLoanStatusInactive PaymentMethodSberLoanStatus = "inactive" ) // AllValues returns all PaymentMethodSberLoanStatus values. func (PaymentMethodSberLoanStatus) AllValues() []PaymentMethodSberLoanStatus { return []PaymentMethodSberLoanStatus{ PaymentMethodSberLoanStatusPending, PaymentMethodSberLoanStatusActive, PaymentMethodSberLoanStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodSberLoanStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodSberLoanStatusPending: return []byte(s), nil case PaymentMethodSberLoanStatusActive: return []byte(s), nil case PaymentMethodSberLoanStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodSberLoanStatus) UnmarshalText(data []byte) error { switch PaymentMethodSberLoanStatus(data) { case PaymentMethodSberLoanStatusPending: *s = PaymentMethodSberLoanStatusPending return nil case PaymentMethodSberLoanStatusActive: *s = PaymentMethodSberLoanStatusActive return nil case PaymentMethodSberLoanStatusInactive: *s = PaymentMethodSberLoanStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodSberbank type PaymentMethodSberbank struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodSberbankStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` // Телефон пользователя, на который зарегистрирован // аккаунт в SberPay. Указывается в формате ITU-T E.164: https://ru. // wikipedia.org/wiki/E.164, например 79000000000. Phone OptString `json:"phone"` Card OptInvoicingBankCardData `json:"card"` } // GetType returns the value of Type. func (s *PaymentMethodSberbank) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodSberbank) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodSberbank) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodSberbank) GetStatus() PaymentMethodSberbankStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodSberbank) GetTitle() OptPaymentMethodTitle { return s.Title } // GetPhone returns the value of Phone. func (s *PaymentMethodSberbank) GetPhone() OptString { return s.Phone } // GetCard returns the value of Card. func (s *PaymentMethodSberbank) GetCard() OptInvoicingBankCardData { return s.Card } // SetType sets the value of Type. func (s *PaymentMethodSberbank) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodSberbank) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodSberbank) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodSberbank) SetStatus(val PaymentMethodSberbankStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodSberbank) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // SetPhone sets the value of Phone. func (s *PaymentMethodSberbank) SetPhone(val OptString) { s.Phone = val } // SetCard sets the value of Card. func (s *PaymentMethodSberbank) SetCard(val OptInvoicingBankCardData) { s.Card = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodSberbankStatus string const ( PaymentMethodSberbankStatusPending PaymentMethodSberbankStatus = "pending" PaymentMethodSberbankStatusActive PaymentMethodSberbankStatus = "active" PaymentMethodSberbankStatusInactive PaymentMethodSberbankStatus = "inactive" ) // AllValues returns all PaymentMethodSberbankStatus values. func (PaymentMethodSberbankStatus) AllValues() []PaymentMethodSberbankStatus { return []PaymentMethodSberbankStatus{ PaymentMethodSberbankStatusPending, PaymentMethodSberbankStatusActive, PaymentMethodSberbankStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodSberbankStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodSberbankStatusPending: return []byte(s), nil case PaymentMethodSberbankStatusActive: return []byte(s), nil case PaymentMethodSberbankStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodSberbankStatus) UnmarshalText(data []byte) error { switch PaymentMethodSberbankStatus(data) { case PaymentMethodSberbankStatusPending: *s = PaymentMethodSberbankStatusPending return nil case PaymentMethodSberbankStatusActive: *s = PaymentMethodSberbankStatusActive return nil case PaymentMethodSberbankStatusInactive: *s = PaymentMethodSberbankStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodSbp type PaymentMethodSbp struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodSbpStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` // Идентификатор операции в СБП (НСПК). Пример: // 1027088AE4CB48CB81287833347A8777 Обязательный параметр для платежей // в статусе succeeded. В остальных случаях может // отсутствовать. SbpOperationID OptString `json:"sbp_operation_id"` PayerBankDetails OptSbpPayerBankDetails `json:"payer_bank_details"` } // GetType returns the value of Type. func (s *PaymentMethodSbp) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodSbp) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodSbp) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodSbp) GetStatus() PaymentMethodSbpStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodSbp) GetTitle() OptPaymentMethodTitle { return s.Title } // GetSbpOperationID returns the value of SbpOperationID. func (s *PaymentMethodSbp) GetSbpOperationID() OptString { return s.SbpOperationID } // GetPayerBankDetails returns the value of PayerBankDetails. func (s *PaymentMethodSbp) GetPayerBankDetails() OptSbpPayerBankDetails { return s.PayerBankDetails } // SetType sets the value of Type. func (s *PaymentMethodSbp) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodSbp) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodSbp) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodSbp) SetStatus(val PaymentMethodSbpStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodSbp) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // SetSbpOperationID sets the value of SbpOperationID. func (s *PaymentMethodSbp) SetSbpOperationID(val OptString) { s.SbpOperationID = val } // SetPayerBankDetails sets the value of PayerBankDetails. func (s *PaymentMethodSbp) SetPayerBankDetails(val OptSbpPayerBankDetails) { s.PayerBankDetails = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodSbpStatus string const ( PaymentMethodSbpStatusPending PaymentMethodSbpStatus = "pending" PaymentMethodSbpStatusActive PaymentMethodSbpStatus = "active" PaymentMethodSbpStatusInactive PaymentMethodSbpStatus = "inactive" ) // AllValues returns all PaymentMethodSbpStatus values. func (PaymentMethodSbpStatus) AllValues() []PaymentMethodSbpStatus { return []PaymentMethodSbpStatus{ PaymentMethodSbpStatusPending, PaymentMethodSbpStatusActive, PaymentMethodSbpStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodSbpStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodSbpStatusPending: return []byte(s), nil case PaymentMethodSbpStatusActive: return []byte(s), nil case PaymentMethodSbpStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodSbpStatus) UnmarshalText(data []byte) error { switch PaymentMethodSbpStatus(data) { case PaymentMethodSbpStatusPending: *s = PaymentMethodSbpStatusPending return nil case PaymentMethodSbpStatusActive: *s = PaymentMethodSbpStatusActive return nil case PaymentMethodSbpStatusInactive: *s = PaymentMethodSbpStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. // Ref: #/components/schemas/PaymentMethodStatus type PaymentMethodStatus string const ( PaymentMethodStatusPending PaymentMethodStatus = "pending" PaymentMethodStatusActive PaymentMethodStatus = "active" PaymentMethodStatusInactive PaymentMethodStatus = "inactive" ) // AllValues returns all PaymentMethodStatus values. func (PaymentMethodStatus) AllValues() []PaymentMethodStatus { return []PaymentMethodStatus{ PaymentMethodStatusPending, PaymentMethodStatusActive, PaymentMethodStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodStatusPending: return []byte(s), nil case PaymentMethodStatusActive: return []byte(s), nil case PaymentMethodStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodStatus) UnmarshalText(data []byte) error { switch PaymentMethodStatus(data) { case PaymentMethodStatusPending: *s = PaymentMethodStatusPending return nil case PaymentMethodStatusActive: *s = PaymentMethodStatusActive return nil case PaymentMethodStatusInactive: *s = PaymentMethodStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodTinkoffBank type PaymentMethodTinkoffBank struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodTinkoffBankStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` Card OptInvoicingBankCardData `json:"card"` } // GetType returns the value of Type. func (s *PaymentMethodTinkoffBank) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodTinkoffBank) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodTinkoffBank) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodTinkoffBank) GetStatus() PaymentMethodTinkoffBankStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodTinkoffBank) GetTitle() OptPaymentMethodTitle { return s.Title } // GetCard returns the value of Card. func (s *PaymentMethodTinkoffBank) GetCard() OptInvoicingBankCardData { return s.Card } // SetType sets the value of Type. func (s *PaymentMethodTinkoffBank) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodTinkoffBank) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodTinkoffBank) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodTinkoffBank) SetStatus(val PaymentMethodTinkoffBankStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodTinkoffBank) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // SetCard sets the value of Card. func (s *PaymentMethodTinkoffBank) SetCard(val OptInvoicingBankCardData) { s.Card = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodTinkoffBankStatus string const ( PaymentMethodTinkoffBankStatusPending PaymentMethodTinkoffBankStatus = "pending" PaymentMethodTinkoffBankStatusActive PaymentMethodTinkoffBankStatus = "active" PaymentMethodTinkoffBankStatusInactive PaymentMethodTinkoffBankStatus = "inactive" ) // AllValues returns all PaymentMethodTinkoffBankStatus values. func (PaymentMethodTinkoffBankStatus) AllValues() []PaymentMethodTinkoffBankStatus { return []PaymentMethodTinkoffBankStatus{ PaymentMethodTinkoffBankStatusPending, PaymentMethodTinkoffBankStatusActive, PaymentMethodTinkoffBankStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodTinkoffBankStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodTinkoffBankStatusPending: return []byte(s), nil case PaymentMethodTinkoffBankStatusActive: return []byte(s), nil case PaymentMethodTinkoffBankStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodTinkoffBankStatus) UnmarshalText(data []byte) error { switch PaymentMethodTinkoffBankStatus(data) { case PaymentMethodTinkoffBankStatusPending: *s = PaymentMethodTinkoffBankStatusPending return nil case PaymentMethodTinkoffBankStatusActive: *s = PaymentMethodTinkoffBankStatusActive return nil case PaymentMethodTinkoffBankStatusInactive: *s = PaymentMethodTinkoffBankStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } type PaymentMethodTitle string // Payment method code is the type of a means of payment used for paying. More about payment methods: // https://yookassa.ru/developers/payment-acceptance/getting-started/payment-methods. // Ref: #/components/schemas/PaymentMethodType type PaymentMethodType string const ( PaymentMethodTypeBankCard PaymentMethodType = "bank_card" PaymentMethodTypeCash PaymentMethodType = "cash" PaymentMethodTypeAlfabank PaymentMethodType = "alfabank" PaymentMethodTypeWebmoney PaymentMethodType = "webmoney" PaymentMethodTypeWechat PaymentMethodType = "wechat" PaymentMethodTypeApplePay PaymentMethodType = "apple_pay" PaymentMethodTypeGooglePay PaymentMethodType = "google_pay" PaymentMethodTypeQiwi PaymentMethodType = "qiwi" PaymentMethodTypeInstallments PaymentMethodType = "installments" PaymentMethodTypeYooMoney PaymentMethodType = "yoo_money" PaymentMethodTypeSberbank PaymentMethodType = "sberbank" PaymentMethodTypeMobileBalance PaymentMethodType = "mobile_balance" PaymentMethodTypeB2bSberbank PaymentMethodType = "b2b_sberbank" PaymentMethodTypeTinkoffBank PaymentMethodType = "tinkoff_bank" PaymentMethodTypeSbp PaymentMethodType = "sbp" PaymentMethodTypeSberLoan PaymentMethodType = "sber_loan" PaymentMethodTypeElectronicCertificate PaymentMethodType = "electronic_certificate" PaymentMethodTypeSberBnpl PaymentMethodType = "sber_bnpl" ) // AllValues returns all PaymentMethodType values. func (PaymentMethodType) AllValues() []PaymentMethodType { return []PaymentMethodType{ PaymentMethodTypeBankCard, PaymentMethodTypeCash, PaymentMethodTypeAlfabank, PaymentMethodTypeWebmoney, PaymentMethodTypeWechat, PaymentMethodTypeApplePay, PaymentMethodTypeGooglePay, PaymentMethodTypeQiwi, PaymentMethodTypeInstallments, PaymentMethodTypeYooMoney, PaymentMethodTypeSberbank, PaymentMethodTypeMobileBalance, PaymentMethodTypeB2bSberbank, PaymentMethodTypeTinkoffBank, PaymentMethodTypeSbp, PaymentMethodTypeSberLoan, PaymentMethodTypeElectronicCertificate, PaymentMethodTypeSberBnpl, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodType) MarshalText() ([]byte, error) { switch s { case PaymentMethodTypeBankCard: return []byte(s), nil case PaymentMethodTypeCash: return []byte(s), nil case PaymentMethodTypeAlfabank: return []byte(s), nil case PaymentMethodTypeWebmoney: return []byte(s), nil case PaymentMethodTypeWechat: return []byte(s), nil case PaymentMethodTypeApplePay: return []byte(s), nil case PaymentMethodTypeGooglePay: return []byte(s), nil case PaymentMethodTypeQiwi: return []byte(s), nil case PaymentMethodTypeInstallments: return []byte(s), nil case PaymentMethodTypeYooMoney: return []byte(s), nil case PaymentMethodTypeSberbank: return []byte(s), nil case PaymentMethodTypeMobileBalance: return []byte(s), nil case PaymentMethodTypeB2bSberbank: return []byte(s), nil case PaymentMethodTypeTinkoffBank: return []byte(s), nil case PaymentMethodTypeSbp: return []byte(s), nil case PaymentMethodTypeSberLoan: return []byte(s), nil case PaymentMethodTypeElectronicCertificate: return []byte(s), nil case PaymentMethodTypeSberBnpl: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodType) UnmarshalText(data []byte) error { switch PaymentMethodType(data) { case PaymentMethodTypeBankCard: *s = PaymentMethodTypeBankCard return nil case PaymentMethodTypeCash: *s = PaymentMethodTypeCash return nil case PaymentMethodTypeAlfabank: *s = PaymentMethodTypeAlfabank return nil case PaymentMethodTypeWebmoney: *s = PaymentMethodTypeWebmoney return nil case PaymentMethodTypeWechat: *s = PaymentMethodTypeWechat return nil case PaymentMethodTypeApplePay: *s = PaymentMethodTypeApplePay return nil case PaymentMethodTypeGooglePay: *s = PaymentMethodTypeGooglePay return nil case PaymentMethodTypeQiwi: *s = PaymentMethodTypeQiwi return nil case PaymentMethodTypeInstallments: *s = PaymentMethodTypeInstallments return nil case PaymentMethodTypeYooMoney: *s = PaymentMethodTypeYooMoney return nil case PaymentMethodTypeSberbank: *s = PaymentMethodTypeSberbank return nil case PaymentMethodTypeMobileBalance: *s = PaymentMethodTypeMobileBalance return nil case PaymentMethodTypeB2bSberbank: *s = PaymentMethodTypeB2bSberbank return nil case PaymentMethodTypeTinkoffBank: *s = PaymentMethodTypeTinkoffBank return nil case PaymentMethodTypeSbp: *s = PaymentMethodTypeSbp return nil case PaymentMethodTypeSberLoan: *s = PaymentMethodTypeSberLoan return nil case PaymentMethodTypeElectronicCertificate: *s = PaymentMethodTypeElectronicCertificate return nil case PaymentMethodTypeSberBnpl: *s = PaymentMethodTypeSberBnpl return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodWeChat type PaymentMethodWeChat struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodWeChatStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` } // GetType returns the value of Type. func (s *PaymentMethodWeChat) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodWeChat) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodWeChat) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodWeChat) GetStatus() PaymentMethodWeChatStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodWeChat) GetTitle() OptPaymentMethodTitle { return s.Title } // SetType sets the value of Type. func (s *PaymentMethodWeChat) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodWeChat) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodWeChat) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodWeChat) SetStatus(val PaymentMethodWeChatStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodWeChat) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodWeChatStatus string const ( PaymentMethodWeChatStatusPending PaymentMethodWeChatStatus = "pending" PaymentMethodWeChatStatusActive PaymentMethodWeChatStatus = "active" PaymentMethodWeChatStatusInactive PaymentMethodWeChatStatus = "inactive" ) // AllValues returns all PaymentMethodWeChatStatus values. func (PaymentMethodWeChatStatus) AllValues() []PaymentMethodWeChatStatus { return []PaymentMethodWeChatStatus{ PaymentMethodWeChatStatusPending, PaymentMethodWeChatStatusActive, PaymentMethodWeChatStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodWeChatStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodWeChatStatusPending: return []byte(s), nil case PaymentMethodWeChatStatusActive: return []byte(s), nil case PaymentMethodWeChatStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodWeChatStatus) UnmarshalText(data []byte) error { switch PaymentMethodWeChatStatus(data) { case PaymentMethodWeChatStatusPending: *s = PaymentMethodWeChatStatusPending return nil case PaymentMethodWeChatStatusActive: *s = PaymentMethodWeChatStatusActive return nil case PaymentMethodWeChatStatusInactive: *s = PaymentMethodWeChatStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodWebmoney type PaymentMethodWebmoney struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodWebmoneyStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` } // GetType returns the value of Type. func (s *PaymentMethodWebmoney) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodWebmoney) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodWebmoney) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodWebmoney) GetStatus() PaymentMethodWebmoneyStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodWebmoney) GetTitle() OptPaymentMethodTitle { return s.Title } // SetType sets the value of Type. func (s *PaymentMethodWebmoney) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodWebmoney) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodWebmoney) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodWebmoney) SetStatus(val PaymentMethodWebmoneyStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodWebmoney) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodWebmoneyStatus string const ( PaymentMethodWebmoneyStatusPending PaymentMethodWebmoneyStatus = "pending" PaymentMethodWebmoneyStatusActive PaymentMethodWebmoneyStatus = "active" PaymentMethodWebmoneyStatusInactive PaymentMethodWebmoneyStatus = "inactive" ) // AllValues returns all PaymentMethodWebmoneyStatus values. func (PaymentMethodWebmoneyStatus) AllValues() []PaymentMethodWebmoneyStatus { return []PaymentMethodWebmoneyStatus{ PaymentMethodWebmoneyStatusPending, PaymentMethodWebmoneyStatusActive, PaymentMethodWebmoneyStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodWebmoneyStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodWebmoneyStatusPending: return []byte(s), nil case PaymentMethodWebmoneyStatusActive: return []byte(s), nil case PaymentMethodWebmoneyStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodWebmoneyStatus) UnmarshalText(data []byte) error { switch PaymentMethodWebmoneyStatus(data) { case PaymentMethodWebmoneyStatusPending: *s = PaymentMethodWebmoneyStatusPending return nil case PaymentMethodWebmoneyStatusActive: *s = PaymentMethodWebmoneyStatusActive return nil case PaymentMethodWebmoneyStatusInactive: *s = PaymentMethodWebmoneyStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodYooMoney type PaymentMethodYooMoney struct { Type PaymentMethodType `json:"type"` // Payment method ID. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodYooMoneyStatus `json:"status"` Title OptPaymentMethodTitle `json:"title"` // Номер кошелька ЮMoney, из которого заплатил // пользователь. AccountNumber OptString `json:"account_number"` } // GetType returns the value of Type. func (s *PaymentMethodYooMoney) GetType() PaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *PaymentMethodYooMoney) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *PaymentMethodYooMoney) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *PaymentMethodYooMoney) GetStatus() PaymentMethodYooMoneyStatus { return s.Status } // GetTitle returns the value of Title. func (s *PaymentMethodYooMoney) GetTitle() OptPaymentMethodTitle { return s.Title } // GetAccountNumber returns the value of AccountNumber. func (s *PaymentMethodYooMoney) GetAccountNumber() OptString { return s.AccountNumber } // SetType sets the value of Type. func (s *PaymentMethodYooMoney) SetType(val PaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *PaymentMethodYooMoney) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *PaymentMethodYooMoney) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *PaymentMethodYooMoney) SetStatus(val PaymentMethodYooMoneyStatus) { s.Status = val } // SetTitle sets the value of Title. func (s *PaymentMethodYooMoney) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // SetAccountNumber sets the value of AccountNumber. func (s *PaymentMethodYooMoney) SetAccountNumber(val OptString) { s.AccountNumber = val } // Статус проверки и сохранения способа оплаты. // Возможные значения: * pending — ожидает действий от // пользователя; * active — способ оплаты сохранен, его // можно использовать для автоплатежей или выплат; * // inactive — способ оплаты не сохранен: пользователь не // подтвердил привязку платежного средства или при // сохранении способа оплаты возникла ошибка. Чтобы // узнать подробности, обратитесь в техническую // поддержку ЮKassa. type PaymentMethodYooMoneyStatus string const ( PaymentMethodYooMoneyStatusPending PaymentMethodYooMoneyStatus = "pending" PaymentMethodYooMoneyStatusActive PaymentMethodYooMoneyStatus = "active" PaymentMethodYooMoneyStatusInactive PaymentMethodYooMoneyStatus = "inactive" ) // AllValues returns all PaymentMethodYooMoneyStatus values. func (PaymentMethodYooMoneyStatus) AllValues() []PaymentMethodYooMoneyStatus { return []PaymentMethodYooMoneyStatus{ PaymentMethodYooMoneyStatusPending, PaymentMethodYooMoneyStatusActive, PaymentMethodYooMoneyStatusInactive, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodYooMoneyStatus) MarshalText() ([]byte, error) { switch s { case PaymentMethodYooMoneyStatusPending: return []byte(s), nil case PaymentMethodYooMoneyStatusActive: return []byte(s), nil case PaymentMethodYooMoneyStatusInactive: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodYooMoneyStatus) UnmarshalText(data []byte) error { switch PaymentMethodYooMoneyStatus(data) { case PaymentMethodYooMoneyStatusPending: *s = PaymentMethodYooMoneyStatusPending return nil case PaymentMethodYooMoneyStatusActive: *s = PaymentMethodYooMoneyStatusActive return nil case PaymentMethodYooMoneyStatusInactive: *s = PaymentMethodYooMoneyStatusInactive return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentMethodsConfirmationDataRedirect type PaymentMethodsConfirmationDataRedirect struct { Type PaymentMethodsConfirmationType `json:"type"` Enforce OptBool `json:"enforce"` ReturnURL string `json:"return_url"` Locale OptLocale `json:"locale"` } // GetType returns the value of Type. func (s *PaymentMethodsConfirmationDataRedirect) GetType() PaymentMethodsConfirmationType { return s.Type } // GetEnforce returns the value of Enforce. func (s *PaymentMethodsConfirmationDataRedirect) GetEnforce() OptBool { return s.Enforce } // GetReturnURL returns the value of ReturnURL. func (s *PaymentMethodsConfirmationDataRedirect) GetReturnURL() string { return s.ReturnURL } // GetLocale returns the value of Locale. func (s *PaymentMethodsConfirmationDataRedirect) GetLocale() OptLocale { return s.Locale } // SetType sets the value of Type. func (s *PaymentMethodsConfirmationDataRedirect) SetType(val PaymentMethodsConfirmationType) { s.Type = val } // SetEnforce sets the value of Enforce. func (s *PaymentMethodsConfirmationDataRedirect) SetEnforce(val OptBool) { s.Enforce = val } // SetReturnURL sets the value of ReturnURL. func (s *PaymentMethodsConfirmationDataRedirect) SetReturnURL(val string) { s.ReturnURL = val } // SetLocale sets the value of Locale. func (s *PaymentMethodsConfirmationDataRedirect) SetLocale(val OptLocale) { s.Locale = val } // Merged schema. // Ref: #/components/schemas/PaymentMethodsConfirmationRedirect type PaymentMethodsConfirmationRedirect struct { Type PaymentMethodsConfirmationType `json:"type"` ConfirmationURL string `json:"confirmation_url"` Enforce OptBool `json:"enforce"` ReturnURL OptString `json:"return_url"` } // GetType returns the value of Type. func (s *PaymentMethodsConfirmationRedirect) GetType() PaymentMethodsConfirmationType { return s.Type } // GetConfirmationURL returns the value of ConfirmationURL. func (s *PaymentMethodsConfirmationRedirect) GetConfirmationURL() string { return s.ConfirmationURL } // GetEnforce returns the value of Enforce. func (s *PaymentMethodsConfirmationRedirect) GetEnforce() OptBool { return s.Enforce } // GetReturnURL returns the value of ReturnURL. func (s *PaymentMethodsConfirmationRedirect) GetReturnURL() OptString { return s.ReturnURL } // SetType sets the value of Type. func (s *PaymentMethodsConfirmationRedirect) SetType(val PaymentMethodsConfirmationType) { s.Type = val } // SetConfirmationURL sets the value of ConfirmationURL. func (s *PaymentMethodsConfirmationRedirect) SetConfirmationURL(val string) { s.ConfirmationURL = val } // SetEnforce sets the value of Enforce. func (s *PaymentMethodsConfirmationRedirect) SetEnforce(val OptBool) { s.Enforce = val } // SetReturnURL sets the value of ReturnURL. func (s *PaymentMethodsConfirmationRedirect) SetReturnURL(val OptString) { s.ReturnURL = val } // Код сценария подтверждения пользователем привязки // платежного средства к вашему магазину в ЮKassa. // Ref: #/components/schemas/PaymentMethodsConfirmationType type PaymentMethodsConfirmationType string const ( PaymentMethodsConfirmationTypeRedirect PaymentMethodsConfirmationType = "redirect" ) // AllValues returns all PaymentMethodsConfirmationType values. func (PaymentMethodsConfirmationType) AllValues() []PaymentMethodsConfirmationType { return []PaymentMethodsConfirmationType{ PaymentMethodsConfirmationTypeRedirect, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentMethodsConfirmationType) MarshalText() ([]byte, error) { switch s { case PaymentMethodsConfirmationTypeRedirect: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentMethodsConfirmationType) UnmarshalText(data []byte) error { switch PaymentMethodsConfirmationType(data) { case PaymentMethodsConfirmationTypeRedirect: *s = PaymentMethodsConfirmationTypeRedirect return nil default: return errors.Errorf("invalid value: %q", data) } } type PaymentMethodsPaymentMethodIDGetInternalServerError TooManyRequests func (*PaymentMethodsPaymentMethodIDGetInternalServerError) paymentMethodsPaymentMethodIDGetRes() {} // PaymentMethodsPaymentMethodIDGetOK represents sum type. type PaymentMethodsPaymentMethodIDGetOK struct { Type PaymentMethodsPaymentMethodIDGetOKType // switch on this field SavePaymentMethodBankCard SavePaymentMethodBankCard } // PaymentMethodsPaymentMethodIDGetOKType is oneOf type of PaymentMethodsPaymentMethodIDGetOK. type PaymentMethodsPaymentMethodIDGetOKType string // Possible values for PaymentMethodsPaymentMethodIDGetOKType. const ( SavePaymentMethodBankCardPaymentMethodsPaymentMethodIDGetOK PaymentMethodsPaymentMethodIDGetOKType = "SavePaymentMethodBankCard" ) // IsSavePaymentMethodBankCard reports whether PaymentMethodsPaymentMethodIDGetOK is SavePaymentMethodBankCard. func (s PaymentMethodsPaymentMethodIDGetOK) IsSavePaymentMethodBankCard() bool { return s.Type == SavePaymentMethodBankCardPaymentMethodsPaymentMethodIDGetOK } // SetSavePaymentMethodBankCard sets PaymentMethodsPaymentMethodIDGetOK to SavePaymentMethodBankCard. func (s *PaymentMethodsPaymentMethodIDGetOK) SetSavePaymentMethodBankCard(v SavePaymentMethodBankCard) { s.Type = SavePaymentMethodBankCardPaymentMethodsPaymentMethodIDGetOK s.SavePaymentMethodBankCard = v } // GetSavePaymentMethodBankCard returns SavePaymentMethodBankCard and true boolean if PaymentMethodsPaymentMethodIDGetOK is SavePaymentMethodBankCard. func (s PaymentMethodsPaymentMethodIDGetOK) GetSavePaymentMethodBankCard() (v SavePaymentMethodBankCard, ok bool) { if !s.IsSavePaymentMethodBankCard() { return v, false } return s.SavePaymentMethodBankCard, true } // NewSavePaymentMethodBankCardPaymentMethodsPaymentMethodIDGetOK returns new PaymentMethodsPaymentMethodIDGetOK from SavePaymentMethodBankCard. func NewSavePaymentMethodBankCardPaymentMethodsPaymentMethodIDGetOK(v SavePaymentMethodBankCard) PaymentMethodsPaymentMethodIDGetOK { var s PaymentMethodsPaymentMethodIDGetOK s.SetSavePaymentMethodBankCard(v) return s } func (*PaymentMethodsPaymentMethodIDGetOK) paymentMethodsPaymentMethodIDGetRes() {} type PaymentMethodsPaymentMethodIDGetTooManyRequests TooManyRequests func (*PaymentMethodsPaymentMethodIDGetTooManyRequests) paymentMethodsPaymentMethodIDGetRes() {} type PaymentMethodsPostInternalServerError TooManyRequests func (*PaymentMethodsPostInternalServerError) paymentMethodsPostRes() {} // PaymentMethodsPostOK represents sum type. type PaymentMethodsPostOK struct { Type PaymentMethodsPostOKType // switch on this field SavePaymentMethodBankCard SavePaymentMethodBankCard } // PaymentMethodsPostOKType is oneOf type of PaymentMethodsPostOK. type PaymentMethodsPostOKType string // Possible values for PaymentMethodsPostOKType. const ( SavePaymentMethodBankCardPaymentMethodsPostOK PaymentMethodsPostOKType = "SavePaymentMethodBankCard" ) // IsSavePaymentMethodBankCard reports whether PaymentMethodsPostOK is SavePaymentMethodBankCard. func (s PaymentMethodsPostOK) IsSavePaymentMethodBankCard() bool { return s.Type == SavePaymentMethodBankCardPaymentMethodsPostOK } // SetSavePaymentMethodBankCard sets PaymentMethodsPostOK to SavePaymentMethodBankCard. func (s *PaymentMethodsPostOK) SetSavePaymentMethodBankCard(v SavePaymentMethodBankCard) { s.Type = SavePaymentMethodBankCardPaymentMethodsPostOK s.SavePaymentMethodBankCard = v } // GetSavePaymentMethodBankCard returns SavePaymentMethodBankCard and true boolean if PaymentMethodsPostOK is SavePaymentMethodBankCard. func (s PaymentMethodsPostOK) GetSavePaymentMethodBankCard() (v SavePaymentMethodBankCard, ok bool) { if !s.IsSavePaymentMethodBankCard() { return v, false } return s.SavePaymentMethodBankCard, true } // NewSavePaymentMethodBankCardPaymentMethodsPostOK returns new PaymentMethodsPostOK from SavePaymentMethodBankCard. func NewSavePaymentMethodBankCardPaymentMethodsPostOK(v SavePaymentMethodBankCard) PaymentMethodsPostOK { var s PaymentMethodsPostOK s.SetSavePaymentMethodBankCard(v) return s } func (*PaymentMethodsPostOK) paymentMethodsPostRes() {} // PaymentMethodsPostReq represents sum type. type PaymentMethodsPostReq struct { Type PaymentMethodsPostReqType // switch on this field SavePaymentMethodDataBankCard SavePaymentMethodDataBankCard } // PaymentMethodsPostReqType is oneOf type of PaymentMethodsPostReq. type PaymentMethodsPostReqType string // Possible values for PaymentMethodsPostReqType. const ( SavePaymentMethodDataBankCardPaymentMethodsPostReq PaymentMethodsPostReqType = "SavePaymentMethodDataBankCard" ) // IsSavePaymentMethodDataBankCard reports whether PaymentMethodsPostReq is SavePaymentMethodDataBankCard. func (s PaymentMethodsPostReq) IsSavePaymentMethodDataBankCard() bool { return s.Type == SavePaymentMethodDataBankCardPaymentMethodsPostReq } // SetSavePaymentMethodDataBankCard sets PaymentMethodsPostReq to SavePaymentMethodDataBankCard. func (s *PaymentMethodsPostReq) SetSavePaymentMethodDataBankCard(v SavePaymentMethodDataBankCard) { s.Type = SavePaymentMethodDataBankCardPaymentMethodsPostReq s.SavePaymentMethodDataBankCard = v } // GetSavePaymentMethodDataBankCard returns SavePaymentMethodDataBankCard and true boolean if PaymentMethodsPostReq is SavePaymentMethodDataBankCard. func (s PaymentMethodsPostReq) GetSavePaymentMethodDataBankCard() (v SavePaymentMethodDataBankCard, ok bool) { if !s.IsSavePaymentMethodDataBankCard() { return v, false } return s.SavePaymentMethodDataBankCard, true } // NewSavePaymentMethodDataBankCardPaymentMethodsPostReq returns new PaymentMethodsPostReq from SavePaymentMethodDataBankCard. func NewSavePaymentMethodDataBankCardPaymentMethodsPostReq(v SavePaymentMethodDataBankCard) PaymentMethodsPostReq { var s PaymentMethodsPostReq s.SetSavePaymentMethodDataBankCard(v) return s } type PaymentMethodsPostTooManyRequests TooManyRequests func (*PaymentMethodsPostTooManyRequests) paymentMethodsPostRes() {} // Merged schema. // Ref: #/components/schemas/PaymentOrderDataUtilities type PaymentOrderDataUtilities struct { Type PaymentOrderDataUtilitiesType `json:"type"` Amount PaymentOrderDataUtilitiesAmount `json:"amount"` PaymentPurpose string `json:"payment_purpose"` Recipient PaymentOrderDataUtilitiesRecipient `json:"recipient"` Kbk OptKbk `json:"kbk"` Oktmo OptOktmo `json:"oktmo"` PaymentPeriod OptPaymentPeriod `json:"payment_period"` // Идентификатор платежного документа. Обязательный // параметр, если не передан payment_document_number, account_number, // unified_account_number или service_id. PaymentDocumentID OptString `json:"payment_document_id"` // Номер платежного документа на стороне поставщика ЖКУ. // Обязательный параметр, если не передан payment_document_id, // account_number, unified_account_number или service_id. PaymentDocumentNumber OptString `json:"payment_document_number"` // Номер лицевого счета на стороне поставщика ЖКУ. // Обязательный параметр, если не передан payment_document_id, // payment_document_number, unified_account_number или service_id. AccountNumber OptString `json:"account_number"` // Единый лицевой счет. Уникальный идентификатор в ГИС // ЖКХ, который характеризует связку // «собственник-помещение». Обязательный параметр, если // не передан payment_document_id, payment_document_number, account_number или service_id. UnifiedAccountNumber OptString `json:"unified_account_number"` // Идентификатор жилищно-коммунальной услуги (ЖКУ). // Обязательный параметр, если не передан payment_document_id, // payment_document_number, account_number или unified_account_number. ServiceID OptString `json:"service_id"` } // GetType returns the value of Type. func (s *PaymentOrderDataUtilities) GetType() PaymentOrderDataUtilitiesType { return s.Type } // GetAmount returns the value of Amount. func (s *PaymentOrderDataUtilities) GetAmount() PaymentOrderDataUtilitiesAmount { return s.Amount } // GetPaymentPurpose returns the value of PaymentPurpose. func (s *PaymentOrderDataUtilities) GetPaymentPurpose() string { return s.PaymentPurpose } // GetRecipient returns the value of Recipient. func (s *PaymentOrderDataUtilities) GetRecipient() PaymentOrderDataUtilitiesRecipient { return s.Recipient } // GetKbk returns the value of Kbk. func (s *PaymentOrderDataUtilities) GetKbk() OptKbk { return s.Kbk } // GetOktmo returns the value of Oktmo. func (s *PaymentOrderDataUtilities) GetOktmo() OptOktmo { return s.Oktmo } // GetPaymentPeriod returns the value of PaymentPeriod. func (s *PaymentOrderDataUtilities) GetPaymentPeriod() OptPaymentPeriod { return s.PaymentPeriod } // GetPaymentDocumentID returns the value of PaymentDocumentID. func (s *PaymentOrderDataUtilities) GetPaymentDocumentID() OptString { return s.PaymentDocumentID } // GetPaymentDocumentNumber returns the value of PaymentDocumentNumber. func (s *PaymentOrderDataUtilities) GetPaymentDocumentNumber() OptString { return s.PaymentDocumentNumber } // GetAccountNumber returns the value of AccountNumber. func (s *PaymentOrderDataUtilities) GetAccountNumber() OptString { return s.AccountNumber } // GetUnifiedAccountNumber returns the value of UnifiedAccountNumber. func (s *PaymentOrderDataUtilities) GetUnifiedAccountNumber() OptString { return s.UnifiedAccountNumber } // GetServiceID returns the value of ServiceID. func (s *PaymentOrderDataUtilities) GetServiceID() OptString { return s.ServiceID } // SetType sets the value of Type. func (s *PaymentOrderDataUtilities) SetType(val PaymentOrderDataUtilitiesType) { s.Type = val } // SetAmount sets the value of Amount. func (s *PaymentOrderDataUtilities) SetAmount(val PaymentOrderDataUtilitiesAmount) { s.Amount = val } // SetPaymentPurpose sets the value of PaymentPurpose. func (s *PaymentOrderDataUtilities) SetPaymentPurpose(val string) { s.PaymentPurpose = val } // SetRecipient sets the value of Recipient. func (s *PaymentOrderDataUtilities) SetRecipient(val PaymentOrderDataUtilitiesRecipient) { s.Recipient = val } // SetKbk sets the value of Kbk. func (s *PaymentOrderDataUtilities) SetKbk(val OptKbk) { s.Kbk = val } // SetOktmo sets the value of Oktmo. func (s *PaymentOrderDataUtilities) SetOktmo(val OptOktmo) { s.Oktmo = val } // SetPaymentPeriod sets the value of PaymentPeriod. func (s *PaymentOrderDataUtilities) SetPaymentPeriod(val OptPaymentPeriod) { s.PaymentPeriod = val } // SetPaymentDocumentID sets the value of PaymentDocumentID. func (s *PaymentOrderDataUtilities) SetPaymentDocumentID(val OptString) { s.PaymentDocumentID = val } // SetPaymentDocumentNumber sets the value of PaymentDocumentNumber. func (s *PaymentOrderDataUtilities) SetPaymentDocumentNumber(val OptString) { s.PaymentDocumentNumber = val } // SetAccountNumber sets the value of AccountNumber. func (s *PaymentOrderDataUtilities) SetAccountNumber(val OptString) { s.AccountNumber = val } // SetUnifiedAccountNumber sets the value of UnifiedAccountNumber. func (s *PaymentOrderDataUtilities) SetUnifiedAccountNumber(val OptString) { s.UnifiedAccountNumber = val } // SetServiceID sets the value of ServiceID. func (s *PaymentOrderDataUtilities) SetServiceID(val OptString) { s.ServiceID = val } // Сумма в выбранной валюте. type PaymentOrderDataUtilitiesAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *PaymentOrderDataUtilitiesAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *PaymentOrderDataUtilitiesAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *PaymentOrderDataUtilitiesAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *PaymentOrderDataUtilitiesAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Получатель платежа. type PaymentOrderDataUtilitiesRecipient struct { // Название получателя. Name string `json:"name"` // ИНН получателя. Inn string `json:"inn"` // КПП получателя. Kpp string `json:"kpp"` Bank PaymentOrderDataUtilitiesRecipientBank `json:"bank"` } // GetName returns the value of Name. func (s *PaymentOrderDataUtilitiesRecipient) GetName() string { return s.Name } // GetInn returns the value of Inn. func (s *PaymentOrderDataUtilitiesRecipient) GetInn() string { return s.Inn } // GetKpp returns the value of Kpp. func (s *PaymentOrderDataUtilitiesRecipient) GetKpp() string { return s.Kpp } // GetBank returns the value of Bank. func (s *PaymentOrderDataUtilitiesRecipient) GetBank() PaymentOrderDataUtilitiesRecipientBank { return s.Bank } // SetName sets the value of Name. func (s *PaymentOrderDataUtilitiesRecipient) SetName(val string) { s.Name = val } // SetInn sets the value of Inn. func (s *PaymentOrderDataUtilitiesRecipient) SetInn(val string) { s.Inn = val } // SetKpp sets the value of Kpp. func (s *PaymentOrderDataUtilitiesRecipient) SetKpp(val string) { s.Kpp = val } // SetBank sets the value of Bank. func (s *PaymentOrderDataUtilitiesRecipient) SetBank(val PaymentOrderDataUtilitiesRecipientBank) { s.Bank = val } // Банк получателя платежа. type PaymentOrderDataUtilitiesRecipientBank struct { // Name of the recipient's bank. Maximum of 45 characters. Name string `json:"name"` // БИК банка получателя. Bic string `json:"bic"` // Счет получателя в банке. Account string `json:"account"` // Корреспондентский счет банка получателя. CorrespondentAccount string `json:"correspondent_account"` } // GetName returns the value of Name. func (s *PaymentOrderDataUtilitiesRecipientBank) GetName() string { return s.Name } // GetBic returns the value of Bic. func (s *PaymentOrderDataUtilitiesRecipientBank) GetBic() string { return s.Bic } // GetAccount returns the value of Account. func (s *PaymentOrderDataUtilitiesRecipientBank) GetAccount() string { return s.Account } // GetCorrespondentAccount returns the value of CorrespondentAccount. func (s *PaymentOrderDataUtilitiesRecipientBank) GetCorrespondentAccount() string { return s.CorrespondentAccount } // SetName sets the value of Name. func (s *PaymentOrderDataUtilitiesRecipientBank) SetName(val string) { s.Name = val } // SetBic sets the value of Bic. func (s *PaymentOrderDataUtilitiesRecipientBank) SetBic(val string) { s.Bic = val } // SetAccount sets the value of Account. func (s *PaymentOrderDataUtilitiesRecipientBank) SetAccount(val string) { s.Account = val } // SetCorrespondentAccount sets the value of CorrespondentAccount. func (s *PaymentOrderDataUtilitiesRecipientBank) SetCorrespondentAccount(val string) { s.CorrespondentAccount = val } type PaymentOrderDataUtilitiesType string const ( PaymentOrderDataUtilitiesTypeUtilities PaymentOrderDataUtilitiesType = "utilities" ) // AllValues returns all PaymentOrderDataUtilitiesType values. func (PaymentOrderDataUtilitiesType) AllValues() []PaymentOrderDataUtilitiesType { return []PaymentOrderDataUtilitiesType{ PaymentOrderDataUtilitiesTypeUtilities, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentOrderDataUtilitiesType) MarshalText() ([]byte, error) { switch s { case PaymentOrderDataUtilitiesTypeUtilities: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentOrderDataUtilitiesType) UnmarshalText(data []byte) error { switch PaymentOrderDataUtilitiesType(data) { case PaymentOrderDataUtilitiesTypeUtilities: *s = PaymentOrderDataUtilitiesTypeUtilities return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentOverviewStatementData type PaymentOverviewStatementData struct { Type PaymentOverviewStatementDataType `json:"type"` DeliveryMethod PaymentOverviewStatementEmailDeliveryMethod `json:"delivery_method"` } // GetType returns the value of Type. func (s *PaymentOverviewStatementData) GetType() PaymentOverviewStatementDataType { return s.Type } // GetDeliveryMethod returns the value of DeliveryMethod. func (s *PaymentOverviewStatementData) GetDeliveryMethod() PaymentOverviewStatementEmailDeliveryMethod { return s.DeliveryMethod } // SetType sets the value of Type. func (s *PaymentOverviewStatementData) SetType(val PaymentOverviewStatementDataType) { s.Type = val } // SetDeliveryMethod sets the value of DeliveryMethod. func (s *PaymentOverviewStatementData) SetDeliveryMethod(val PaymentOverviewStatementEmailDeliveryMethod) { s.DeliveryMethod = val } type PaymentOverviewStatementDataType string const ( PaymentOverviewStatementDataTypePaymentOverview PaymentOverviewStatementDataType = "payment_overview" ) // AllValues returns all PaymentOverviewStatementDataType values. func (PaymentOverviewStatementDataType) AllValues() []PaymentOverviewStatementDataType { return []PaymentOverviewStatementDataType{ PaymentOverviewStatementDataTypePaymentOverview, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentOverviewStatementDataType) MarshalText() ([]byte, error) { switch s { case PaymentOverviewStatementDataTypePaymentOverview: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentOverviewStatementDataType) UnmarshalText(data []byte) error { switch PaymentOverviewStatementDataType(data) { case PaymentOverviewStatementDataTypePaymentOverview: *s = PaymentOverviewStatementDataTypePaymentOverview return nil default: return errors.Errorf("invalid value: %q", data) } } // Ref: #/components/schemas/PaymentOverviewStatementDeliveryMethodType type PaymentOverviewStatementDeliveryMethodType string const ( PaymentOverviewStatementDeliveryMethodTypeEmail PaymentOverviewStatementDeliveryMethodType = "email" ) // AllValues returns all PaymentOverviewStatementDeliveryMethodType values. func (PaymentOverviewStatementDeliveryMethodType) AllValues() []PaymentOverviewStatementDeliveryMethodType { return []PaymentOverviewStatementDeliveryMethodType{ PaymentOverviewStatementDeliveryMethodTypeEmail, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentOverviewStatementDeliveryMethodType) MarshalText() ([]byte, error) { switch s { case PaymentOverviewStatementDeliveryMethodTypeEmail: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentOverviewStatementDeliveryMethodType) UnmarshalText(data []byte) error { switch PaymentOverviewStatementDeliveryMethodType(data) { case PaymentOverviewStatementDeliveryMethodTypeEmail: *s = PaymentOverviewStatementDeliveryMethodTypeEmail return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PaymentOverviewStatementEmailDeliveryMethod type PaymentOverviewStatementEmailDeliveryMethod struct { Type PaymentOverviewStatementDeliveryMethodType `json:"type"` Email string `json:"email"` } // GetType returns the value of Type. func (s *PaymentOverviewStatementEmailDeliveryMethod) GetType() PaymentOverviewStatementDeliveryMethodType { return s.Type } // GetEmail returns the value of Email. func (s *PaymentOverviewStatementEmailDeliveryMethod) GetEmail() string { return s.Email } // SetType sets the value of Type. func (s *PaymentOverviewStatementEmailDeliveryMethod) SetType(val PaymentOverviewStatementDeliveryMethodType) { s.Type = val } // SetEmail sets the value of Email. func (s *PaymentOverviewStatementEmailDeliveryMethod) SetEmail(val string) { s.Email = val } // PaymentPaymentMethod represents sum type. type PaymentPaymentMethod struct { Type PaymentPaymentMethodType // switch on this field PaymentMethodBankCard PaymentMethodBankCard PaymentMethodCash PaymentMethodCash PaymentMethodQiwi PaymentMethodQiwi PaymentMethodAlfabank PaymentMethodAlfabank PaymentMethodWebmoney PaymentMethodWebmoney PaymentMethodSberbank PaymentMethodSberbank PaymentMethodTinkoffBank PaymentMethodTinkoffBank PaymentMethodYooMoney PaymentMethodYooMoney PaymentMethodApplePay PaymentMethodApplePay PaymentMethodGooglePay PaymentMethodGooglePay PaymentMethodMobileBalance PaymentMethodMobileBalance PaymentMethodInstallments PaymentMethodInstallments PaymentMethodB2bSberbank PaymentMethodB2bSberbank PaymentMethodWeChat PaymentMethodWeChat PaymentMethodSbp PaymentMethodSbp PaymentMethodSberLoan PaymentMethodSberLoan PaymentMethodElectronicCertificate PaymentMethodElectronicCertificate PaymentMethodSberBnpl PaymentMethodSberBnpl } // PaymentPaymentMethodType is oneOf type of PaymentPaymentMethod. type PaymentPaymentMethodType string // Possible values for PaymentPaymentMethodType. const ( PaymentMethodBankCardPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodBankCard" PaymentMethodCashPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodCash" PaymentMethodQiwiPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodQiwi" PaymentMethodAlfabankPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodAlfabank" PaymentMethodWebmoneyPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodWebmoney" PaymentMethodSberbankPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodSberbank" PaymentMethodTinkoffBankPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodTinkoffBank" PaymentMethodYooMoneyPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodYooMoney" PaymentMethodApplePayPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodApplePay" PaymentMethodGooglePayPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodGooglePay" PaymentMethodMobileBalancePaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodMobileBalance" PaymentMethodInstallmentsPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodInstallments" PaymentMethodB2bSberbankPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodB2bSberbank" PaymentMethodWeChatPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodWeChat" PaymentMethodSbpPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodSbp" PaymentMethodSberLoanPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodSberLoan" PaymentMethodElectronicCertificatePaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodElectronicCertificate" PaymentMethodSberBnplPaymentPaymentMethod PaymentPaymentMethodType = "PaymentMethodSberBnpl" ) // IsPaymentMethodBankCard reports whether PaymentPaymentMethod is PaymentMethodBankCard. func (s PaymentPaymentMethod) IsPaymentMethodBankCard() bool { return s.Type == PaymentMethodBankCardPaymentPaymentMethod } // IsPaymentMethodCash reports whether PaymentPaymentMethod is PaymentMethodCash. func (s PaymentPaymentMethod) IsPaymentMethodCash() bool { return s.Type == PaymentMethodCashPaymentPaymentMethod } // IsPaymentMethodQiwi reports whether PaymentPaymentMethod is PaymentMethodQiwi. func (s PaymentPaymentMethod) IsPaymentMethodQiwi() bool { return s.Type == PaymentMethodQiwiPaymentPaymentMethod } // IsPaymentMethodAlfabank reports whether PaymentPaymentMethod is PaymentMethodAlfabank. func (s PaymentPaymentMethod) IsPaymentMethodAlfabank() bool { return s.Type == PaymentMethodAlfabankPaymentPaymentMethod } // IsPaymentMethodWebmoney reports whether PaymentPaymentMethod is PaymentMethodWebmoney. func (s PaymentPaymentMethod) IsPaymentMethodWebmoney() bool { return s.Type == PaymentMethodWebmoneyPaymentPaymentMethod } // IsPaymentMethodSberbank reports whether PaymentPaymentMethod is PaymentMethodSberbank. func (s PaymentPaymentMethod) IsPaymentMethodSberbank() bool { return s.Type == PaymentMethodSberbankPaymentPaymentMethod } // IsPaymentMethodTinkoffBank reports whether PaymentPaymentMethod is PaymentMethodTinkoffBank. func (s PaymentPaymentMethod) IsPaymentMethodTinkoffBank() bool { return s.Type == PaymentMethodTinkoffBankPaymentPaymentMethod } // IsPaymentMethodYooMoney reports whether PaymentPaymentMethod is PaymentMethodYooMoney. func (s PaymentPaymentMethod) IsPaymentMethodYooMoney() bool { return s.Type == PaymentMethodYooMoneyPaymentPaymentMethod } // IsPaymentMethodApplePay reports whether PaymentPaymentMethod is PaymentMethodApplePay. func (s PaymentPaymentMethod) IsPaymentMethodApplePay() bool { return s.Type == PaymentMethodApplePayPaymentPaymentMethod } // IsPaymentMethodGooglePay reports whether PaymentPaymentMethod is PaymentMethodGooglePay. func (s PaymentPaymentMethod) IsPaymentMethodGooglePay() bool { return s.Type == PaymentMethodGooglePayPaymentPaymentMethod } // IsPaymentMethodMobileBalance reports whether PaymentPaymentMethod is PaymentMethodMobileBalance. func (s PaymentPaymentMethod) IsPaymentMethodMobileBalance() bool { return s.Type == PaymentMethodMobileBalancePaymentPaymentMethod } // IsPaymentMethodInstallments reports whether PaymentPaymentMethod is PaymentMethodInstallments. func (s PaymentPaymentMethod) IsPaymentMethodInstallments() bool { return s.Type == PaymentMethodInstallmentsPaymentPaymentMethod } // IsPaymentMethodB2bSberbank reports whether PaymentPaymentMethod is PaymentMethodB2bSberbank. func (s PaymentPaymentMethod) IsPaymentMethodB2bSberbank() bool { return s.Type == PaymentMethodB2bSberbankPaymentPaymentMethod } // IsPaymentMethodWeChat reports whether PaymentPaymentMethod is PaymentMethodWeChat. func (s PaymentPaymentMethod) IsPaymentMethodWeChat() bool { return s.Type == PaymentMethodWeChatPaymentPaymentMethod } // IsPaymentMethodSbp reports whether PaymentPaymentMethod is PaymentMethodSbp. func (s PaymentPaymentMethod) IsPaymentMethodSbp() bool { return s.Type == PaymentMethodSbpPaymentPaymentMethod } // IsPaymentMethodSberLoan reports whether PaymentPaymentMethod is PaymentMethodSberLoan. func (s PaymentPaymentMethod) IsPaymentMethodSberLoan() bool { return s.Type == PaymentMethodSberLoanPaymentPaymentMethod } // IsPaymentMethodElectronicCertificate reports whether PaymentPaymentMethod is PaymentMethodElectronicCertificate. func (s PaymentPaymentMethod) IsPaymentMethodElectronicCertificate() bool { return s.Type == PaymentMethodElectronicCertificatePaymentPaymentMethod } // IsPaymentMethodSberBnpl reports whether PaymentPaymentMethod is PaymentMethodSberBnpl. func (s PaymentPaymentMethod) IsPaymentMethodSberBnpl() bool { return s.Type == PaymentMethodSberBnplPaymentPaymentMethod } // SetPaymentMethodBankCard sets PaymentPaymentMethod to PaymentMethodBankCard. func (s *PaymentPaymentMethod) SetPaymentMethodBankCard(v PaymentMethodBankCard) { s.Type = PaymentMethodBankCardPaymentPaymentMethod s.PaymentMethodBankCard = v } // GetPaymentMethodBankCard returns PaymentMethodBankCard and true boolean if PaymentPaymentMethod is PaymentMethodBankCard. func (s PaymentPaymentMethod) GetPaymentMethodBankCard() (v PaymentMethodBankCard, ok bool) { if !s.IsPaymentMethodBankCard() { return v, false } return s.PaymentMethodBankCard, true } // NewPaymentMethodBankCardPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodBankCard. func NewPaymentMethodBankCardPaymentPaymentMethod(v PaymentMethodBankCard) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodBankCard(v) return s } // SetPaymentMethodCash sets PaymentPaymentMethod to PaymentMethodCash. func (s *PaymentPaymentMethod) SetPaymentMethodCash(v PaymentMethodCash) { s.Type = PaymentMethodCashPaymentPaymentMethod s.PaymentMethodCash = v } // GetPaymentMethodCash returns PaymentMethodCash and true boolean if PaymentPaymentMethod is PaymentMethodCash. func (s PaymentPaymentMethod) GetPaymentMethodCash() (v PaymentMethodCash, ok bool) { if !s.IsPaymentMethodCash() { return v, false } return s.PaymentMethodCash, true } // NewPaymentMethodCashPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodCash. func NewPaymentMethodCashPaymentPaymentMethod(v PaymentMethodCash) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodCash(v) return s } // SetPaymentMethodQiwi sets PaymentPaymentMethod to PaymentMethodQiwi. func (s *PaymentPaymentMethod) SetPaymentMethodQiwi(v PaymentMethodQiwi) { s.Type = PaymentMethodQiwiPaymentPaymentMethod s.PaymentMethodQiwi = v } // GetPaymentMethodQiwi returns PaymentMethodQiwi and true boolean if PaymentPaymentMethod is PaymentMethodQiwi. func (s PaymentPaymentMethod) GetPaymentMethodQiwi() (v PaymentMethodQiwi, ok bool) { if !s.IsPaymentMethodQiwi() { return v, false } return s.PaymentMethodQiwi, true } // NewPaymentMethodQiwiPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodQiwi. func NewPaymentMethodQiwiPaymentPaymentMethod(v PaymentMethodQiwi) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodQiwi(v) return s } // SetPaymentMethodAlfabank sets PaymentPaymentMethod to PaymentMethodAlfabank. func (s *PaymentPaymentMethod) SetPaymentMethodAlfabank(v PaymentMethodAlfabank) { s.Type = PaymentMethodAlfabankPaymentPaymentMethod s.PaymentMethodAlfabank = v } // GetPaymentMethodAlfabank returns PaymentMethodAlfabank and true boolean if PaymentPaymentMethod is PaymentMethodAlfabank. func (s PaymentPaymentMethod) GetPaymentMethodAlfabank() (v PaymentMethodAlfabank, ok bool) { if !s.IsPaymentMethodAlfabank() { return v, false } return s.PaymentMethodAlfabank, true } // NewPaymentMethodAlfabankPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodAlfabank. func NewPaymentMethodAlfabankPaymentPaymentMethod(v PaymentMethodAlfabank) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodAlfabank(v) return s } // SetPaymentMethodWebmoney sets PaymentPaymentMethod to PaymentMethodWebmoney. func (s *PaymentPaymentMethod) SetPaymentMethodWebmoney(v PaymentMethodWebmoney) { s.Type = PaymentMethodWebmoneyPaymentPaymentMethod s.PaymentMethodWebmoney = v } // GetPaymentMethodWebmoney returns PaymentMethodWebmoney and true boolean if PaymentPaymentMethod is PaymentMethodWebmoney. func (s PaymentPaymentMethod) GetPaymentMethodWebmoney() (v PaymentMethodWebmoney, ok bool) { if !s.IsPaymentMethodWebmoney() { return v, false } return s.PaymentMethodWebmoney, true } // NewPaymentMethodWebmoneyPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodWebmoney. func NewPaymentMethodWebmoneyPaymentPaymentMethod(v PaymentMethodWebmoney) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodWebmoney(v) return s } // SetPaymentMethodSberbank sets PaymentPaymentMethod to PaymentMethodSberbank. func (s *PaymentPaymentMethod) SetPaymentMethodSberbank(v PaymentMethodSberbank) { s.Type = PaymentMethodSberbankPaymentPaymentMethod s.PaymentMethodSberbank = v } // GetPaymentMethodSberbank returns PaymentMethodSberbank and true boolean if PaymentPaymentMethod is PaymentMethodSberbank. func (s PaymentPaymentMethod) GetPaymentMethodSberbank() (v PaymentMethodSberbank, ok bool) { if !s.IsPaymentMethodSberbank() { return v, false } return s.PaymentMethodSberbank, true } // NewPaymentMethodSberbankPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodSberbank. func NewPaymentMethodSberbankPaymentPaymentMethod(v PaymentMethodSberbank) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodSberbank(v) return s } // SetPaymentMethodTinkoffBank sets PaymentPaymentMethod to PaymentMethodTinkoffBank. func (s *PaymentPaymentMethod) SetPaymentMethodTinkoffBank(v PaymentMethodTinkoffBank) { s.Type = PaymentMethodTinkoffBankPaymentPaymentMethod s.PaymentMethodTinkoffBank = v } // GetPaymentMethodTinkoffBank returns PaymentMethodTinkoffBank and true boolean if PaymentPaymentMethod is PaymentMethodTinkoffBank. func (s PaymentPaymentMethod) GetPaymentMethodTinkoffBank() (v PaymentMethodTinkoffBank, ok bool) { if !s.IsPaymentMethodTinkoffBank() { return v, false } return s.PaymentMethodTinkoffBank, true } // NewPaymentMethodTinkoffBankPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodTinkoffBank. func NewPaymentMethodTinkoffBankPaymentPaymentMethod(v PaymentMethodTinkoffBank) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodTinkoffBank(v) return s } // SetPaymentMethodYooMoney sets PaymentPaymentMethod to PaymentMethodYooMoney. func (s *PaymentPaymentMethod) SetPaymentMethodYooMoney(v PaymentMethodYooMoney) { s.Type = PaymentMethodYooMoneyPaymentPaymentMethod s.PaymentMethodYooMoney = v } // GetPaymentMethodYooMoney returns PaymentMethodYooMoney and true boolean if PaymentPaymentMethod is PaymentMethodYooMoney. func (s PaymentPaymentMethod) GetPaymentMethodYooMoney() (v PaymentMethodYooMoney, ok bool) { if !s.IsPaymentMethodYooMoney() { return v, false } return s.PaymentMethodYooMoney, true } // NewPaymentMethodYooMoneyPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodYooMoney. func NewPaymentMethodYooMoneyPaymentPaymentMethod(v PaymentMethodYooMoney) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodYooMoney(v) return s } // SetPaymentMethodApplePay sets PaymentPaymentMethod to PaymentMethodApplePay. func (s *PaymentPaymentMethod) SetPaymentMethodApplePay(v PaymentMethodApplePay) { s.Type = PaymentMethodApplePayPaymentPaymentMethod s.PaymentMethodApplePay = v } // GetPaymentMethodApplePay returns PaymentMethodApplePay and true boolean if PaymentPaymentMethod is PaymentMethodApplePay. func (s PaymentPaymentMethod) GetPaymentMethodApplePay() (v PaymentMethodApplePay, ok bool) { if !s.IsPaymentMethodApplePay() { return v, false } return s.PaymentMethodApplePay, true } // NewPaymentMethodApplePayPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodApplePay. func NewPaymentMethodApplePayPaymentPaymentMethod(v PaymentMethodApplePay) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodApplePay(v) return s } // SetPaymentMethodGooglePay sets PaymentPaymentMethod to PaymentMethodGooglePay. func (s *PaymentPaymentMethod) SetPaymentMethodGooglePay(v PaymentMethodGooglePay) { s.Type = PaymentMethodGooglePayPaymentPaymentMethod s.PaymentMethodGooglePay = v } // GetPaymentMethodGooglePay returns PaymentMethodGooglePay and true boolean if PaymentPaymentMethod is PaymentMethodGooglePay. func (s PaymentPaymentMethod) GetPaymentMethodGooglePay() (v PaymentMethodGooglePay, ok bool) { if !s.IsPaymentMethodGooglePay() { return v, false } return s.PaymentMethodGooglePay, true } // NewPaymentMethodGooglePayPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodGooglePay. func NewPaymentMethodGooglePayPaymentPaymentMethod(v PaymentMethodGooglePay) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodGooglePay(v) return s } // SetPaymentMethodMobileBalance sets PaymentPaymentMethod to PaymentMethodMobileBalance. func (s *PaymentPaymentMethod) SetPaymentMethodMobileBalance(v PaymentMethodMobileBalance) { s.Type = PaymentMethodMobileBalancePaymentPaymentMethod s.PaymentMethodMobileBalance = v } // GetPaymentMethodMobileBalance returns PaymentMethodMobileBalance and true boolean if PaymentPaymentMethod is PaymentMethodMobileBalance. func (s PaymentPaymentMethod) GetPaymentMethodMobileBalance() (v PaymentMethodMobileBalance, ok bool) { if !s.IsPaymentMethodMobileBalance() { return v, false } return s.PaymentMethodMobileBalance, true } // NewPaymentMethodMobileBalancePaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodMobileBalance. func NewPaymentMethodMobileBalancePaymentPaymentMethod(v PaymentMethodMobileBalance) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodMobileBalance(v) return s } // SetPaymentMethodInstallments sets PaymentPaymentMethod to PaymentMethodInstallments. func (s *PaymentPaymentMethod) SetPaymentMethodInstallments(v PaymentMethodInstallments) { s.Type = PaymentMethodInstallmentsPaymentPaymentMethod s.PaymentMethodInstallments = v } // GetPaymentMethodInstallments returns PaymentMethodInstallments and true boolean if PaymentPaymentMethod is PaymentMethodInstallments. func (s PaymentPaymentMethod) GetPaymentMethodInstallments() (v PaymentMethodInstallments, ok bool) { if !s.IsPaymentMethodInstallments() { return v, false } return s.PaymentMethodInstallments, true } // NewPaymentMethodInstallmentsPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodInstallments. func NewPaymentMethodInstallmentsPaymentPaymentMethod(v PaymentMethodInstallments) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodInstallments(v) return s } // SetPaymentMethodB2bSberbank sets PaymentPaymentMethod to PaymentMethodB2bSberbank. func (s *PaymentPaymentMethod) SetPaymentMethodB2bSberbank(v PaymentMethodB2bSberbank) { s.Type = PaymentMethodB2bSberbankPaymentPaymentMethod s.PaymentMethodB2bSberbank = v } // GetPaymentMethodB2bSberbank returns PaymentMethodB2bSberbank and true boolean if PaymentPaymentMethod is PaymentMethodB2bSberbank. func (s PaymentPaymentMethod) GetPaymentMethodB2bSberbank() (v PaymentMethodB2bSberbank, ok bool) { if !s.IsPaymentMethodB2bSberbank() { return v, false } return s.PaymentMethodB2bSberbank, true } // NewPaymentMethodB2bSberbankPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodB2bSberbank. func NewPaymentMethodB2bSberbankPaymentPaymentMethod(v PaymentMethodB2bSberbank) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodB2bSberbank(v) return s } // SetPaymentMethodWeChat sets PaymentPaymentMethod to PaymentMethodWeChat. func (s *PaymentPaymentMethod) SetPaymentMethodWeChat(v PaymentMethodWeChat) { s.Type = PaymentMethodWeChatPaymentPaymentMethod s.PaymentMethodWeChat = v } // GetPaymentMethodWeChat returns PaymentMethodWeChat and true boolean if PaymentPaymentMethod is PaymentMethodWeChat. func (s PaymentPaymentMethod) GetPaymentMethodWeChat() (v PaymentMethodWeChat, ok bool) { if !s.IsPaymentMethodWeChat() { return v, false } return s.PaymentMethodWeChat, true } // NewPaymentMethodWeChatPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodWeChat. func NewPaymentMethodWeChatPaymentPaymentMethod(v PaymentMethodWeChat) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodWeChat(v) return s } // SetPaymentMethodSbp sets PaymentPaymentMethod to PaymentMethodSbp. func (s *PaymentPaymentMethod) SetPaymentMethodSbp(v PaymentMethodSbp) { s.Type = PaymentMethodSbpPaymentPaymentMethod s.PaymentMethodSbp = v } // GetPaymentMethodSbp returns PaymentMethodSbp and true boolean if PaymentPaymentMethod is PaymentMethodSbp. func (s PaymentPaymentMethod) GetPaymentMethodSbp() (v PaymentMethodSbp, ok bool) { if !s.IsPaymentMethodSbp() { return v, false } return s.PaymentMethodSbp, true } // NewPaymentMethodSbpPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodSbp. func NewPaymentMethodSbpPaymentPaymentMethod(v PaymentMethodSbp) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodSbp(v) return s } // SetPaymentMethodSberLoan sets PaymentPaymentMethod to PaymentMethodSberLoan. func (s *PaymentPaymentMethod) SetPaymentMethodSberLoan(v PaymentMethodSberLoan) { s.Type = PaymentMethodSberLoanPaymentPaymentMethod s.PaymentMethodSberLoan = v } // GetPaymentMethodSberLoan returns PaymentMethodSberLoan and true boolean if PaymentPaymentMethod is PaymentMethodSberLoan. func (s PaymentPaymentMethod) GetPaymentMethodSberLoan() (v PaymentMethodSberLoan, ok bool) { if !s.IsPaymentMethodSberLoan() { return v, false } return s.PaymentMethodSberLoan, true } // NewPaymentMethodSberLoanPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodSberLoan. func NewPaymentMethodSberLoanPaymentPaymentMethod(v PaymentMethodSberLoan) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodSberLoan(v) return s } // SetPaymentMethodElectronicCertificate sets PaymentPaymentMethod to PaymentMethodElectronicCertificate. func (s *PaymentPaymentMethod) SetPaymentMethodElectronicCertificate(v PaymentMethodElectronicCertificate) { s.Type = PaymentMethodElectronicCertificatePaymentPaymentMethod s.PaymentMethodElectronicCertificate = v } // GetPaymentMethodElectronicCertificate returns PaymentMethodElectronicCertificate and true boolean if PaymentPaymentMethod is PaymentMethodElectronicCertificate. func (s PaymentPaymentMethod) GetPaymentMethodElectronicCertificate() (v PaymentMethodElectronicCertificate, ok bool) { if !s.IsPaymentMethodElectronicCertificate() { return v, false } return s.PaymentMethodElectronicCertificate, true } // NewPaymentMethodElectronicCertificatePaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodElectronicCertificate. func NewPaymentMethodElectronicCertificatePaymentPaymentMethod(v PaymentMethodElectronicCertificate) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodElectronicCertificate(v) return s } // SetPaymentMethodSberBnpl sets PaymentPaymentMethod to PaymentMethodSberBnpl. func (s *PaymentPaymentMethod) SetPaymentMethodSberBnpl(v PaymentMethodSberBnpl) { s.Type = PaymentMethodSberBnplPaymentPaymentMethod s.PaymentMethodSberBnpl = v } // GetPaymentMethodSberBnpl returns PaymentMethodSberBnpl and true boolean if PaymentPaymentMethod is PaymentMethodSberBnpl. func (s PaymentPaymentMethod) GetPaymentMethodSberBnpl() (v PaymentMethodSberBnpl, ok bool) { if !s.IsPaymentMethodSberBnpl() { return v, false } return s.PaymentMethodSberBnpl, true } // NewPaymentMethodSberBnplPaymentPaymentMethod returns new PaymentPaymentMethod from PaymentMethodSberBnpl. func NewPaymentMethodSberBnplPaymentPaymentMethod(v PaymentMethodSberBnpl) PaymentPaymentMethod { var s PaymentPaymentMethod s.SetPaymentMethodSberBnpl(v) return s } // Период оплаты, за который выставлены начисления и за // который вносится оплата. // Ref: #/components/schemas/PaymentPeriod type PaymentPeriod struct { // Месяц периода. Например, 1 — январь. Month int `json:"month"` // Payment period year. The value must be within the range 1920–2050. For example, 2025. Year int `json:"year"` } // GetMonth returns the value of Month. func (s *PaymentPeriod) GetMonth() int { return s.Month } // GetYear returns the value of Year. func (s *PaymentPeriod) GetYear() int { return s.Year } // SetMonth sets the value of Month. func (s *PaymentPeriod) SetMonth(val int) { s.Month = val } // SetYear sets the value of Year. func (s *PaymentPeriod) SetYear(val int) { s.Year = val } type PaymentPurpose string type PaymentReceiptRegistration string const ( PaymentReceiptRegistrationPending PaymentReceiptRegistration = "pending" PaymentReceiptRegistrationSucceeded PaymentReceiptRegistration = "succeeded" PaymentReceiptRegistrationCanceled PaymentReceiptRegistration = "canceled" ) // AllValues returns all PaymentReceiptRegistration values. func (PaymentReceiptRegistration) AllValues() []PaymentReceiptRegistration { return []PaymentReceiptRegistration{ PaymentReceiptRegistrationPending, PaymentReceiptRegistrationSucceeded, PaymentReceiptRegistrationCanceled, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentReceiptRegistration) MarshalText() ([]byte, error) { switch s { case PaymentReceiptRegistrationPending: return []byte(s), nil case PaymentReceiptRegistrationSucceeded: return []byte(s), nil case PaymentReceiptRegistrationCanceled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentReceiptRegistration) UnmarshalText(data []byte) error { switch PaymentReceiptRegistration(data) { case PaymentReceiptRegistrationPending: *s = PaymentReceiptRegistrationPending return nil case PaymentReceiptRegistrationSucceeded: *s = PaymentReceiptRegistrationSucceeded return nil case PaymentReceiptRegistrationCanceled: *s = PaymentReceiptRegistrationCanceled return nil default: return errors.Errorf("invalid value: %q", data) } } // Payment recipient. type PaymentRecipient struct { AccountID AccountId `json:"account_id"` GatewayID GatewayId `json:"gateway_id"` } // GetAccountID returns the value of AccountID. func (s *PaymentRecipient) GetAccountID() AccountId { return s.AccountID } // GetGatewayID returns the value of GatewayID. func (s *PaymentRecipient) GetGatewayID() GatewayId { return s.GatewayID } // SetAccountID sets the value of AccountID. func (s *PaymentRecipient) SetAccountID(val AccountId) { s.AccountID = val } // SetGatewayID sets the value of GatewayID. func (s *PaymentRecipient) SetGatewayID(val GatewayId) { s.GatewayID = val } // Сумма в выбранной валюте. type PaymentRefundedAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *PaymentRefundedAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *PaymentRefundedAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *PaymentRefundedAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *PaymentRefundedAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Payment status. Possible values: pending, waiting_for_capture, succeeded, and canceled. More about // the life cycle of a payment: https://yookassa. // ru/developers/payment-acceptance/getting-started/payment-process#lifecycle. // Ref: #/components/schemas/PaymentStatus type PaymentStatus string const ( PaymentStatusPending PaymentStatus = "pending" PaymentStatusWaitingForCapture PaymentStatus = "waiting_for_capture" PaymentStatusSucceeded PaymentStatus = "succeeded" PaymentStatusCanceled PaymentStatus = "canceled" ) // AllValues returns all PaymentStatus values. func (PaymentStatus) AllValues() []PaymentStatus { return []PaymentStatus{ PaymentStatusPending, PaymentStatusWaitingForCapture, PaymentStatusSucceeded, PaymentStatusCanceled, } } // MarshalText implements encoding.TextMarshaler. func (s PaymentStatus) MarshalText() ([]byte, error) { switch s { case PaymentStatusPending: return []byte(s), nil case PaymentStatusWaitingForCapture: return []byte(s), nil case PaymentStatusSucceeded: return []byte(s), nil case PaymentStatusCanceled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PaymentStatus) UnmarshalText(data []byte) error { switch PaymentStatus(data) { case PaymentStatusPending: *s = PaymentStatusPending return nil case PaymentStatusWaitingForCapture: *s = PaymentStatusWaitingForCapture return nil case PaymentStatusSucceeded: *s = PaymentStatusSucceeded return nil case PaymentStatusCanceled: *s = PaymentStatusCanceled return nil default: return errors.Errorf("invalid value: %q", data) } } type PaymentToken string type PaymentsPaymentIDCapturePostReq struct { Amount OptPaymentsPaymentIDCapturePostReqAmount `json:"amount"` Receipt OptReceiptData `json:"receipt"` Airline OptPaymentsPaymentIDCapturePostReqAirline `json:"airline"` // Information about money distribution: the amounts of transfers and the stores to be transferred to. // Specified for partially capturing a payment if you use Split payments: https://yookassa. // ru/developers/solutions-for-platforms/split-payments/basics. Transfers []TransferData `json:"transfers"` // The deal within which the payment is being carried out. Specified for partially capturing a // payment if you use Safe deal: https://yookassa. // ru/developers/solutions-for-platforms/safe-deal/basics. Deal OptPaymentsPaymentIDCapturePostReqDeal `json:"deal"` } // GetAmount returns the value of Amount. func (s *PaymentsPaymentIDCapturePostReq) GetAmount() OptPaymentsPaymentIDCapturePostReqAmount { return s.Amount } // GetReceipt returns the value of Receipt. func (s *PaymentsPaymentIDCapturePostReq) GetReceipt() OptReceiptData { return s.Receipt } // GetAirline returns the value of Airline. func (s *PaymentsPaymentIDCapturePostReq) GetAirline() OptPaymentsPaymentIDCapturePostReqAirline { return s.Airline } // GetTransfers returns the value of Transfers. func (s *PaymentsPaymentIDCapturePostReq) GetTransfers() []TransferData { return s.Transfers } // GetDeal returns the value of Deal. func (s *PaymentsPaymentIDCapturePostReq) GetDeal() OptPaymentsPaymentIDCapturePostReqDeal { return s.Deal } // SetAmount sets the value of Amount. func (s *PaymentsPaymentIDCapturePostReq) SetAmount(val OptPaymentsPaymentIDCapturePostReqAmount) { s.Amount = val } // SetReceipt sets the value of Receipt. func (s *PaymentsPaymentIDCapturePostReq) SetReceipt(val OptReceiptData) { s.Receipt = val } // SetAirline sets the value of Airline. func (s *PaymentsPaymentIDCapturePostReq) SetAirline(val OptPaymentsPaymentIDCapturePostReqAirline) { s.Airline = val } // SetTransfers sets the value of Transfers. func (s *PaymentsPaymentIDCapturePostReq) SetTransfers(val []TransferData) { s.Transfers = val } // SetDeal sets the value of Deal. func (s *PaymentsPaymentIDCapturePostReq) SetDeal(val OptPaymentsPaymentIDCapturePostReqDeal) { s.Deal = val } // Объект с данными для продажи авиабилетов: https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/airline-tickets. Используется // только для платежей банковской картой. type PaymentsPaymentIDCapturePostReqAirline struct { // Unique ticket number. If you already know the ticket number during payment creation, ticket_number // is a required parameter. If you don't, specify booking_reference instead of ticket_number. TicketNumber OptString `json:"ticket_number"` // Booking reference number, required if ticket_number is not specified. BookingReference OptString `json:"booking_reference"` // List of passengers. Passengers []AirlinePassenger `json:"passengers"` // List of flight legs. Legs []AirlineLeg `json:"legs"` } // GetTicketNumber returns the value of TicketNumber. func (s *PaymentsPaymentIDCapturePostReqAirline) GetTicketNumber() OptString { return s.TicketNumber } // GetBookingReference returns the value of BookingReference. func (s *PaymentsPaymentIDCapturePostReqAirline) GetBookingReference() OptString { return s.BookingReference } // GetPassengers returns the value of Passengers. func (s *PaymentsPaymentIDCapturePostReqAirline) GetPassengers() []AirlinePassenger { return s.Passengers } // GetLegs returns the value of Legs. func (s *PaymentsPaymentIDCapturePostReqAirline) GetLegs() []AirlineLeg { return s.Legs } // SetTicketNumber sets the value of TicketNumber. func (s *PaymentsPaymentIDCapturePostReqAirline) SetTicketNumber(val OptString) { s.TicketNumber = val } // SetBookingReference sets the value of BookingReference. func (s *PaymentsPaymentIDCapturePostReqAirline) SetBookingReference(val OptString) { s.BookingReference = val } // SetPassengers sets the value of Passengers. func (s *PaymentsPaymentIDCapturePostReqAirline) SetPassengers(val []AirlinePassenger) { s.Passengers = val } // SetLegs sets the value of Legs. func (s *PaymentsPaymentIDCapturePostReqAirline) SetLegs(val []AirlineLeg) { s.Legs = val } // Сумма в выбранной валюте. type PaymentsPaymentIDCapturePostReqAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *PaymentsPaymentIDCapturePostReqAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *PaymentsPaymentIDCapturePostReqAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *PaymentsPaymentIDCapturePostReqAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *PaymentsPaymentIDCapturePostReqAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // The deal within which the payment is being carried out. Specified for partially capturing a // payment if you use Safe deal: https://yookassa. // ru/developers/solutions-for-platforms/safe-deal/basics. type PaymentsPaymentIDCapturePostReqDeal struct { Settlements SettlementPaymentArray `json:"settlements"` } // GetSettlements returns the value of Settlements. func (s *PaymentsPaymentIDCapturePostReqDeal) GetSettlements() SettlementPaymentArray { return s.Settlements } // SetSettlements sets the value of Settlements. func (s *PaymentsPaymentIDCapturePostReqDeal) SetSettlements(val SettlementPaymentArray) { s.Settlements = val } type PaymentsPostReq struct { Amount PaymentsPostReqAmount `json:"amount"` Description OptString `json:"description"` Receipt OptReceiptData `json:"receipt"` Recipient OptRecipient `json:"recipient"` PaymentToken OptPaymentToken `json:"payment_token"` PaymentMethodID OptPaymentMethodId `json:"payment_method_id"` PaymentMethodData OptPaymentsPostReqPaymentMethodData `json:"payment_method_data"` Confirmation OptPaymentsPostReqConfirmation `json:"confirmation"` SavePaymentMethod OptSavePaymentMethodAttribute `json:"save_payment_method"` Capture OptCapture `json:"capture"` ClientIP OptClientIp `json:"client_ip"` Metadata OptMetadata `json:"metadata"` Airline OptPaymentsPostReqAirline `json:"airline"` // Information about money distribution: the amounts of transfers and the stores to be transferred to. // Specified if you use Split payments: https://yookassa. // ru/developers/solutions-for-platforms/split-payments/basics. Transfers []TransferDataPayment `json:"transfers"` Deal OptPaymentsPostReqDeal `json:"deal"` MerchantCustomerID OptString `json:"merchant_customer_id"` PaymentOrder OptPaymentsPostReqPaymentOrder `json:"payment_order"` Receiver OptPaymentsPostReqReceiver `json:"receiver"` // Data for sending statements. Required if you want the user to receive a statement after they make // a payment. Only one type of statement is currently available: payment overview. This is the // information about a successful payment that YooMoney sends to the user's email address. An // overview may be sent if the payment was made via bank cards, SberPay, or FPS. The option to send // overviews is available for all integration scenarios: https://yookassa. // ru/developers/payment-acceptance/getting-started/selecting-integration-scenario. Statements []PaymentsPostReqStatementsItem `json:"statements"` Test OptTest `json:"test"` } // GetAmount returns the value of Amount. func (s *PaymentsPostReq) GetAmount() PaymentsPostReqAmount { return s.Amount } // GetDescription returns the value of Description. func (s *PaymentsPostReq) GetDescription() OptString { return s.Description } // GetReceipt returns the value of Receipt. func (s *PaymentsPostReq) GetReceipt() OptReceiptData { return s.Receipt } // GetRecipient returns the value of Recipient. func (s *PaymentsPostReq) GetRecipient() OptRecipient { return s.Recipient } // GetPaymentToken returns the value of PaymentToken. func (s *PaymentsPostReq) GetPaymentToken() OptPaymentToken { return s.PaymentToken } // GetPaymentMethodID returns the value of PaymentMethodID. func (s *PaymentsPostReq) GetPaymentMethodID() OptPaymentMethodId { return s.PaymentMethodID } // GetPaymentMethodData returns the value of PaymentMethodData. func (s *PaymentsPostReq) GetPaymentMethodData() OptPaymentsPostReqPaymentMethodData { return s.PaymentMethodData } // GetConfirmation returns the value of Confirmation. func (s *PaymentsPostReq) GetConfirmation() OptPaymentsPostReqConfirmation { return s.Confirmation } // GetSavePaymentMethod returns the value of SavePaymentMethod. func (s *PaymentsPostReq) GetSavePaymentMethod() OptSavePaymentMethodAttribute { return s.SavePaymentMethod } // GetCapture returns the value of Capture. func (s *PaymentsPostReq) GetCapture() OptCapture { return s.Capture } // GetClientIP returns the value of ClientIP. func (s *PaymentsPostReq) GetClientIP() OptClientIp { return s.ClientIP } // GetMetadata returns the value of Metadata. func (s *PaymentsPostReq) GetMetadata() OptMetadata { return s.Metadata } // GetAirline returns the value of Airline. func (s *PaymentsPostReq) GetAirline() OptPaymentsPostReqAirline { return s.Airline } // GetTransfers returns the value of Transfers. func (s *PaymentsPostReq) GetTransfers() []TransferDataPayment { return s.Transfers } // GetDeal returns the value of Deal. func (s *PaymentsPostReq) GetDeal() OptPaymentsPostReqDeal { return s.Deal } // GetMerchantCustomerID returns the value of MerchantCustomerID. func (s *PaymentsPostReq) GetMerchantCustomerID() OptString { return s.MerchantCustomerID } // GetPaymentOrder returns the value of PaymentOrder. func (s *PaymentsPostReq) GetPaymentOrder() OptPaymentsPostReqPaymentOrder { return s.PaymentOrder } // GetReceiver returns the value of Receiver. func (s *PaymentsPostReq) GetReceiver() OptPaymentsPostReqReceiver { return s.Receiver } // GetStatements returns the value of Statements. func (s *PaymentsPostReq) GetStatements() []PaymentsPostReqStatementsItem { return s.Statements } // GetTest returns the value of Test. func (s *PaymentsPostReq) GetTest() OptTest { return s.Test } // SetAmount sets the value of Amount. func (s *PaymentsPostReq) SetAmount(val PaymentsPostReqAmount) { s.Amount = val } // SetDescription sets the value of Description. func (s *PaymentsPostReq) SetDescription(val OptString) { s.Description = val } // SetReceipt sets the value of Receipt. func (s *PaymentsPostReq) SetReceipt(val OptReceiptData) { s.Receipt = val } // SetRecipient sets the value of Recipient. func (s *PaymentsPostReq) SetRecipient(val OptRecipient) { s.Recipient = val } // SetPaymentToken sets the value of PaymentToken. func (s *PaymentsPostReq) SetPaymentToken(val OptPaymentToken) { s.PaymentToken = val } // SetPaymentMethodID sets the value of PaymentMethodID. func (s *PaymentsPostReq) SetPaymentMethodID(val OptPaymentMethodId) { s.PaymentMethodID = val } // SetPaymentMethodData sets the value of PaymentMethodData. func (s *PaymentsPostReq) SetPaymentMethodData(val OptPaymentsPostReqPaymentMethodData) { s.PaymentMethodData = val } // SetConfirmation sets the value of Confirmation. func (s *PaymentsPostReq) SetConfirmation(val OptPaymentsPostReqConfirmation) { s.Confirmation = val } // SetSavePaymentMethod sets the value of SavePaymentMethod. func (s *PaymentsPostReq) SetSavePaymentMethod(val OptSavePaymentMethodAttribute) { s.SavePaymentMethod = val } // SetCapture sets the value of Capture. func (s *PaymentsPostReq) SetCapture(val OptCapture) { s.Capture = val } // SetClientIP sets the value of ClientIP. func (s *PaymentsPostReq) SetClientIP(val OptClientIp) { s.ClientIP = val } // SetMetadata sets the value of Metadata. func (s *PaymentsPostReq) SetMetadata(val OptMetadata) { s.Metadata = val } // SetAirline sets the value of Airline. func (s *PaymentsPostReq) SetAirline(val OptPaymentsPostReqAirline) { s.Airline = val } // SetTransfers sets the value of Transfers. func (s *PaymentsPostReq) SetTransfers(val []TransferDataPayment) { s.Transfers = val } // SetDeal sets the value of Deal. func (s *PaymentsPostReq) SetDeal(val OptPaymentsPostReqDeal) { s.Deal = val } // SetMerchantCustomerID sets the value of MerchantCustomerID. func (s *PaymentsPostReq) SetMerchantCustomerID(val OptString) { s.MerchantCustomerID = val } // SetPaymentOrder sets the value of PaymentOrder. func (s *PaymentsPostReq) SetPaymentOrder(val OptPaymentsPostReqPaymentOrder) { s.PaymentOrder = val } // SetReceiver sets the value of Receiver. func (s *PaymentsPostReq) SetReceiver(val OptPaymentsPostReqReceiver) { s.Receiver = val } // SetStatements sets the value of Statements. func (s *PaymentsPostReq) SetStatements(val []PaymentsPostReqStatementsItem) { s.Statements = val } // SetTest sets the value of Test. func (s *PaymentsPostReq) SetTest(val OptTest) { s.Test = val } // Объект с данными для продажи авиабилетов: https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/airline-tickets. Используется // только для платежей банковской картой. type PaymentsPostReqAirline struct { // Unique ticket number. If you already know the ticket number during payment creation, ticket_number // is a required parameter. If you don't, specify booking_reference instead of ticket_number. TicketNumber OptString `json:"ticket_number"` // Booking reference number, required if ticket_number is not specified. BookingReference OptString `json:"booking_reference"` // List of passengers. Passengers []AirlinePassenger `json:"passengers"` // List of flight legs. Legs []AirlineLeg `json:"legs"` } // GetTicketNumber returns the value of TicketNumber. func (s *PaymentsPostReqAirline) GetTicketNumber() OptString { return s.TicketNumber } // GetBookingReference returns the value of BookingReference. func (s *PaymentsPostReqAirline) GetBookingReference() OptString { return s.BookingReference } // GetPassengers returns the value of Passengers. func (s *PaymentsPostReqAirline) GetPassengers() []AirlinePassenger { return s.Passengers } // GetLegs returns the value of Legs. func (s *PaymentsPostReqAirline) GetLegs() []AirlineLeg { return s.Legs } // SetTicketNumber sets the value of TicketNumber. func (s *PaymentsPostReqAirline) SetTicketNumber(val OptString) { s.TicketNumber = val } // SetBookingReference sets the value of BookingReference. func (s *PaymentsPostReqAirline) SetBookingReference(val OptString) { s.BookingReference = val } // SetPassengers sets the value of Passengers. func (s *PaymentsPostReqAirline) SetPassengers(val []AirlinePassenger) { s.Passengers = val } // SetLegs sets the value of Legs. func (s *PaymentsPostReqAirline) SetLegs(val []AirlineLeg) { s.Legs = val } // Сумма в выбранной валюте. type PaymentsPostReqAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *PaymentsPostReqAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *PaymentsPostReqAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *PaymentsPostReqAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *PaymentsPostReqAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // PaymentsPostReqConfirmation represents sum type. type PaymentsPostReqConfirmation struct { Type PaymentsPostReqConfirmationType // switch on this field ConfirmationDataRedirect ConfirmationDataRedirect ConfirmationDataExternal ConfirmationDataExternal ConfirmationDataQr ConfirmationDataQr ConfirmationDataEmbedded ConfirmationDataEmbedded ConfirmationDataMobileApplication ConfirmationDataMobileApplication } // PaymentsPostReqConfirmationType is oneOf type of PaymentsPostReqConfirmation. type PaymentsPostReqConfirmationType string // Possible values for PaymentsPostReqConfirmationType. const ( ConfirmationDataRedirectPaymentsPostReqConfirmation PaymentsPostReqConfirmationType = "ConfirmationDataRedirect" ConfirmationDataExternalPaymentsPostReqConfirmation PaymentsPostReqConfirmationType = "ConfirmationDataExternal" ConfirmationDataQrPaymentsPostReqConfirmation PaymentsPostReqConfirmationType = "ConfirmationDataQr" ConfirmationDataEmbeddedPaymentsPostReqConfirmation PaymentsPostReqConfirmationType = "ConfirmationDataEmbedded" ConfirmationDataMobileApplicationPaymentsPostReqConfirmation PaymentsPostReqConfirmationType = "ConfirmationDataMobileApplication" ) // IsConfirmationDataRedirect reports whether PaymentsPostReqConfirmation is ConfirmationDataRedirect. func (s PaymentsPostReqConfirmation) IsConfirmationDataRedirect() bool { return s.Type == ConfirmationDataRedirectPaymentsPostReqConfirmation } // IsConfirmationDataExternal reports whether PaymentsPostReqConfirmation is ConfirmationDataExternal. func (s PaymentsPostReqConfirmation) IsConfirmationDataExternal() bool { return s.Type == ConfirmationDataExternalPaymentsPostReqConfirmation } // IsConfirmationDataQr reports whether PaymentsPostReqConfirmation is ConfirmationDataQr. func (s PaymentsPostReqConfirmation) IsConfirmationDataQr() bool { return s.Type == ConfirmationDataQrPaymentsPostReqConfirmation } // IsConfirmationDataEmbedded reports whether PaymentsPostReqConfirmation is ConfirmationDataEmbedded. func (s PaymentsPostReqConfirmation) IsConfirmationDataEmbedded() bool { return s.Type == ConfirmationDataEmbeddedPaymentsPostReqConfirmation } // IsConfirmationDataMobileApplication reports whether PaymentsPostReqConfirmation is ConfirmationDataMobileApplication. func (s PaymentsPostReqConfirmation) IsConfirmationDataMobileApplication() bool { return s.Type == ConfirmationDataMobileApplicationPaymentsPostReqConfirmation } // SetConfirmationDataRedirect sets PaymentsPostReqConfirmation to ConfirmationDataRedirect. func (s *PaymentsPostReqConfirmation) SetConfirmationDataRedirect(v ConfirmationDataRedirect) { s.Type = ConfirmationDataRedirectPaymentsPostReqConfirmation s.ConfirmationDataRedirect = v } // GetConfirmationDataRedirect returns ConfirmationDataRedirect and true boolean if PaymentsPostReqConfirmation is ConfirmationDataRedirect. func (s PaymentsPostReqConfirmation) GetConfirmationDataRedirect() (v ConfirmationDataRedirect, ok bool) { if !s.IsConfirmationDataRedirect() { return v, false } return s.ConfirmationDataRedirect, true } // NewConfirmationDataRedirectPaymentsPostReqConfirmation returns new PaymentsPostReqConfirmation from ConfirmationDataRedirect. func NewConfirmationDataRedirectPaymentsPostReqConfirmation(v ConfirmationDataRedirect) PaymentsPostReqConfirmation { var s PaymentsPostReqConfirmation s.SetConfirmationDataRedirect(v) return s } // SetConfirmationDataExternal sets PaymentsPostReqConfirmation to ConfirmationDataExternal. func (s *PaymentsPostReqConfirmation) SetConfirmationDataExternal(v ConfirmationDataExternal) { s.Type = ConfirmationDataExternalPaymentsPostReqConfirmation s.ConfirmationDataExternal = v } // GetConfirmationDataExternal returns ConfirmationDataExternal and true boolean if PaymentsPostReqConfirmation is ConfirmationDataExternal. func (s PaymentsPostReqConfirmation) GetConfirmationDataExternal() (v ConfirmationDataExternal, ok bool) { if !s.IsConfirmationDataExternal() { return v, false } return s.ConfirmationDataExternal, true } // NewConfirmationDataExternalPaymentsPostReqConfirmation returns new PaymentsPostReqConfirmation from ConfirmationDataExternal. func NewConfirmationDataExternalPaymentsPostReqConfirmation(v ConfirmationDataExternal) PaymentsPostReqConfirmation { var s PaymentsPostReqConfirmation s.SetConfirmationDataExternal(v) return s } // SetConfirmationDataQr sets PaymentsPostReqConfirmation to ConfirmationDataQr. func (s *PaymentsPostReqConfirmation) SetConfirmationDataQr(v ConfirmationDataQr) { s.Type = ConfirmationDataQrPaymentsPostReqConfirmation s.ConfirmationDataQr = v } // GetConfirmationDataQr returns ConfirmationDataQr and true boolean if PaymentsPostReqConfirmation is ConfirmationDataQr. func (s PaymentsPostReqConfirmation) GetConfirmationDataQr() (v ConfirmationDataQr, ok bool) { if !s.IsConfirmationDataQr() { return v, false } return s.ConfirmationDataQr, true } // NewConfirmationDataQrPaymentsPostReqConfirmation returns new PaymentsPostReqConfirmation from ConfirmationDataQr. func NewConfirmationDataQrPaymentsPostReqConfirmation(v ConfirmationDataQr) PaymentsPostReqConfirmation { var s PaymentsPostReqConfirmation s.SetConfirmationDataQr(v) return s } // SetConfirmationDataEmbedded sets PaymentsPostReqConfirmation to ConfirmationDataEmbedded. func (s *PaymentsPostReqConfirmation) SetConfirmationDataEmbedded(v ConfirmationDataEmbedded) { s.Type = ConfirmationDataEmbeddedPaymentsPostReqConfirmation s.ConfirmationDataEmbedded = v } // GetConfirmationDataEmbedded returns ConfirmationDataEmbedded and true boolean if PaymentsPostReqConfirmation is ConfirmationDataEmbedded. func (s PaymentsPostReqConfirmation) GetConfirmationDataEmbedded() (v ConfirmationDataEmbedded, ok bool) { if !s.IsConfirmationDataEmbedded() { return v, false } return s.ConfirmationDataEmbedded, true } // NewConfirmationDataEmbeddedPaymentsPostReqConfirmation returns new PaymentsPostReqConfirmation from ConfirmationDataEmbedded. func NewConfirmationDataEmbeddedPaymentsPostReqConfirmation(v ConfirmationDataEmbedded) PaymentsPostReqConfirmation { var s PaymentsPostReqConfirmation s.SetConfirmationDataEmbedded(v) return s } // SetConfirmationDataMobileApplication sets PaymentsPostReqConfirmation to ConfirmationDataMobileApplication. func (s *PaymentsPostReqConfirmation) SetConfirmationDataMobileApplication(v ConfirmationDataMobileApplication) { s.Type = ConfirmationDataMobileApplicationPaymentsPostReqConfirmation s.ConfirmationDataMobileApplication = v } // GetConfirmationDataMobileApplication returns ConfirmationDataMobileApplication and true boolean if PaymentsPostReqConfirmation is ConfirmationDataMobileApplication. func (s PaymentsPostReqConfirmation) GetConfirmationDataMobileApplication() (v ConfirmationDataMobileApplication, ok bool) { if !s.IsConfirmationDataMobileApplication() { return v, false } return s.ConfirmationDataMobileApplication, true } // NewConfirmationDataMobileApplicationPaymentsPostReqConfirmation returns new PaymentsPostReqConfirmation from ConfirmationDataMobileApplication. func NewConfirmationDataMobileApplicationPaymentsPostReqConfirmation(v ConfirmationDataMobileApplication) PaymentsPostReqConfirmation { var s PaymentsPostReqConfirmation s.SetConfirmationDataMobileApplication(v) return s } type PaymentsPostReqDeal struct { ID DealId `json:"id"` Settlements SettlementPaymentArray `json:"settlements"` } // GetID returns the value of ID. func (s *PaymentsPostReqDeal) GetID() DealId { return s.ID } // GetSettlements returns the value of Settlements. func (s *PaymentsPostReqDeal) GetSettlements() SettlementPaymentArray { return s.Settlements } // SetID sets the value of ID. func (s *PaymentsPostReqDeal) SetID(val DealId) { s.ID = val } // SetSettlements sets the value of Settlements. func (s *PaymentsPostReqDeal) SetSettlements(val SettlementPaymentArray) { s.Settlements = val } // PaymentsPostReqPaymentMethodData represents sum type. type PaymentsPostReqPaymentMethodData struct { Type PaymentsPostReqPaymentMethodDataType // switch on this field PaymentMethodDataBankCard PaymentMethodDataBankCard PaymentMethodDataCash PaymentMethodDataCash PaymentMethodDataSberbank PaymentMethodDataSberbank PaymentMethodDataTinkoffBank PaymentMethodDataTinkoffBank PaymentMethodDataYooMoney PaymentMethodDataYooMoney PaymentMethodDataMobileBalance PaymentMethodDataMobileBalance PaymentMethodDataB2bSberbank PaymentMethodDataB2bSberbank PaymentMethodDataSbp PaymentMethodDataSbp PaymentMethodDataSberLoan PaymentMethodDataSberLoan PaymentMethodDataElectronicCertificate PaymentMethodDataElectronicCertificate PaymentMethodDataSberBnpl PaymentMethodDataSberBnpl } // PaymentsPostReqPaymentMethodDataType is oneOf type of PaymentsPostReqPaymentMethodData. type PaymentsPostReqPaymentMethodDataType string // Possible values for PaymentsPostReqPaymentMethodDataType. const ( PaymentMethodDataBankCardPaymentsPostReqPaymentMethodData PaymentsPostReqPaymentMethodDataType = "PaymentMethodDataBankCard" PaymentMethodDataCashPaymentsPostReqPaymentMethodData PaymentsPostReqPaymentMethodDataType = "PaymentMethodDataCash" PaymentMethodDataSberbankPaymentsPostReqPaymentMethodData PaymentsPostReqPaymentMethodDataType = "PaymentMethodDataSberbank" PaymentMethodDataTinkoffBankPaymentsPostReqPaymentMethodData PaymentsPostReqPaymentMethodDataType = "PaymentMethodDataTinkoffBank" PaymentMethodDataYooMoneyPaymentsPostReqPaymentMethodData PaymentsPostReqPaymentMethodDataType = "PaymentMethodDataYooMoney" PaymentMethodDataMobileBalancePaymentsPostReqPaymentMethodData PaymentsPostReqPaymentMethodDataType = "PaymentMethodDataMobileBalance" PaymentMethodDataB2bSberbankPaymentsPostReqPaymentMethodData PaymentsPostReqPaymentMethodDataType = "PaymentMethodDataB2bSberbank" PaymentMethodDataSbpPaymentsPostReqPaymentMethodData PaymentsPostReqPaymentMethodDataType = "PaymentMethodDataSbp" PaymentMethodDataSberLoanPaymentsPostReqPaymentMethodData PaymentsPostReqPaymentMethodDataType = "PaymentMethodDataSberLoan" PaymentMethodDataElectronicCertificatePaymentsPostReqPaymentMethodData PaymentsPostReqPaymentMethodDataType = "PaymentMethodDataElectronicCertificate" PaymentMethodDataSberBnplPaymentsPostReqPaymentMethodData PaymentsPostReqPaymentMethodDataType = "PaymentMethodDataSberBnpl" ) // IsPaymentMethodDataBankCard reports whether PaymentsPostReqPaymentMethodData is PaymentMethodDataBankCard. func (s PaymentsPostReqPaymentMethodData) IsPaymentMethodDataBankCard() bool { return s.Type == PaymentMethodDataBankCardPaymentsPostReqPaymentMethodData } // IsPaymentMethodDataCash reports whether PaymentsPostReqPaymentMethodData is PaymentMethodDataCash. func (s PaymentsPostReqPaymentMethodData) IsPaymentMethodDataCash() bool { return s.Type == PaymentMethodDataCashPaymentsPostReqPaymentMethodData } // IsPaymentMethodDataSberbank reports whether PaymentsPostReqPaymentMethodData is PaymentMethodDataSberbank. func (s PaymentsPostReqPaymentMethodData) IsPaymentMethodDataSberbank() bool { return s.Type == PaymentMethodDataSberbankPaymentsPostReqPaymentMethodData } // IsPaymentMethodDataTinkoffBank reports whether PaymentsPostReqPaymentMethodData is PaymentMethodDataTinkoffBank. func (s PaymentsPostReqPaymentMethodData) IsPaymentMethodDataTinkoffBank() bool { return s.Type == PaymentMethodDataTinkoffBankPaymentsPostReqPaymentMethodData } // IsPaymentMethodDataYooMoney reports whether PaymentsPostReqPaymentMethodData is PaymentMethodDataYooMoney. func (s PaymentsPostReqPaymentMethodData) IsPaymentMethodDataYooMoney() bool { return s.Type == PaymentMethodDataYooMoneyPaymentsPostReqPaymentMethodData } // IsPaymentMethodDataMobileBalance reports whether PaymentsPostReqPaymentMethodData is PaymentMethodDataMobileBalance. func (s PaymentsPostReqPaymentMethodData) IsPaymentMethodDataMobileBalance() bool { return s.Type == PaymentMethodDataMobileBalancePaymentsPostReqPaymentMethodData } // IsPaymentMethodDataB2bSberbank reports whether PaymentsPostReqPaymentMethodData is PaymentMethodDataB2bSberbank. func (s PaymentsPostReqPaymentMethodData) IsPaymentMethodDataB2bSberbank() bool { return s.Type == PaymentMethodDataB2bSberbankPaymentsPostReqPaymentMethodData } // IsPaymentMethodDataSbp reports whether PaymentsPostReqPaymentMethodData is PaymentMethodDataSbp. func (s PaymentsPostReqPaymentMethodData) IsPaymentMethodDataSbp() bool { return s.Type == PaymentMethodDataSbpPaymentsPostReqPaymentMethodData } // IsPaymentMethodDataSberLoan reports whether PaymentsPostReqPaymentMethodData is PaymentMethodDataSberLoan. func (s PaymentsPostReqPaymentMethodData) IsPaymentMethodDataSberLoan() bool { return s.Type == PaymentMethodDataSberLoanPaymentsPostReqPaymentMethodData } // IsPaymentMethodDataElectronicCertificate reports whether PaymentsPostReqPaymentMethodData is PaymentMethodDataElectronicCertificate. func (s PaymentsPostReqPaymentMethodData) IsPaymentMethodDataElectronicCertificate() bool { return s.Type == PaymentMethodDataElectronicCertificatePaymentsPostReqPaymentMethodData } // IsPaymentMethodDataSberBnpl reports whether PaymentsPostReqPaymentMethodData is PaymentMethodDataSberBnpl. func (s PaymentsPostReqPaymentMethodData) IsPaymentMethodDataSberBnpl() bool { return s.Type == PaymentMethodDataSberBnplPaymentsPostReqPaymentMethodData } // SetPaymentMethodDataBankCard sets PaymentsPostReqPaymentMethodData to PaymentMethodDataBankCard. func (s *PaymentsPostReqPaymentMethodData) SetPaymentMethodDataBankCard(v PaymentMethodDataBankCard) { s.Type = PaymentMethodDataBankCardPaymentsPostReqPaymentMethodData s.PaymentMethodDataBankCard = v } // GetPaymentMethodDataBankCard returns PaymentMethodDataBankCard and true boolean if PaymentsPostReqPaymentMethodData is PaymentMethodDataBankCard. func (s PaymentsPostReqPaymentMethodData) GetPaymentMethodDataBankCard() (v PaymentMethodDataBankCard, ok bool) { if !s.IsPaymentMethodDataBankCard() { return v, false } return s.PaymentMethodDataBankCard, true } // NewPaymentMethodDataBankCardPaymentsPostReqPaymentMethodData returns new PaymentsPostReqPaymentMethodData from PaymentMethodDataBankCard. func NewPaymentMethodDataBankCardPaymentsPostReqPaymentMethodData(v PaymentMethodDataBankCard) PaymentsPostReqPaymentMethodData { var s PaymentsPostReqPaymentMethodData s.SetPaymentMethodDataBankCard(v) return s } // SetPaymentMethodDataCash sets PaymentsPostReqPaymentMethodData to PaymentMethodDataCash. func (s *PaymentsPostReqPaymentMethodData) SetPaymentMethodDataCash(v PaymentMethodDataCash) { s.Type = PaymentMethodDataCashPaymentsPostReqPaymentMethodData s.PaymentMethodDataCash = v } // GetPaymentMethodDataCash returns PaymentMethodDataCash and true boolean if PaymentsPostReqPaymentMethodData is PaymentMethodDataCash. func (s PaymentsPostReqPaymentMethodData) GetPaymentMethodDataCash() (v PaymentMethodDataCash, ok bool) { if !s.IsPaymentMethodDataCash() { return v, false } return s.PaymentMethodDataCash, true } // NewPaymentMethodDataCashPaymentsPostReqPaymentMethodData returns new PaymentsPostReqPaymentMethodData from PaymentMethodDataCash. func NewPaymentMethodDataCashPaymentsPostReqPaymentMethodData(v PaymentMethodDataCash) PaymentsPostReqPaymentMethodData { var s PaymentsPostReqPaymentMethodData s.SetPaymentMethodDataCash(v) return s } // SetPaymentMethodDataSberbank sets PaymentsPostReqPaymentMethodData to PaymentMethodDataSberbank. func (s *PaymentsPostReqPaymentMethodData) SetPaymentMethodDataSberbank(v PaymentMethodDataSberbank) { s.Type = PaymentMethodDataSberbankPaymentsPostReqPaymentMethodData s.PaymentMethodDataSberbank = v } // GetPaymentMethodDataSberbank returns PaymentMethodDataSberbank and true boolean if PaymentsPostReqPaymentMethodData is PaymentMethodDataSberbank. func (s PaymentsPostReqPaymentMethodData) GetPaymentMethodDataSberbank() (v PaymentMethodDataSberbank, ok bool) { if !s.IsPaymentMethodDataSberbank() { return v, false } return s.PaymentMethodDataSberbank, true } // NewPaymentMethodDataSberbankPaymentsPostReqPaymentMethodData returns new PaymentsPostReqPaymentMethodData from PaymentMethodDataSberbank. func NewPaymentMethodDataSberbankPaymentsPostReqPaymentMethodData(v PaymentMethodDataSberbank) PaymentsPostReqPaymentMethodData { var s PaymentsPostReqPaymentMethodData s.SetPaymentMethodDataSberbank(v) return s } // SetPaymentMethodDataTinkoffBank sets PaymentsPostReqPaymentMethodData to PaymentMethodDataTinkoffBank. func (s *PaymentsPostReqPaymentMethodData) SetPaymentMethodDataTinkoffBank(v PaymentMethodDataTinkoffBank) { s.Type = PaymentMethodDataTinkoffBankPaymentsPostReqPaymentMethodData s.PaymentMethodDataTinkoffBank = v } // GetPaymentMethodDataTinkoffBank returns PaymentMethodDataTinkoffBank and true boolean if PaymentsPostReqPaymentMethodData is PaymentMethodDataTinkoffBank. func (s PaymentsPostReqPaymentMethodData) GetPaymentMethodDataTinkoffBank() (v PaymentMethodDataTinkoffBank, ok bool) { if !s.IsPaymentMethodDataTinkoffBank() { return v, false } return s.PaymentMethodDataTinkoffBank, true } // NewPaymentMethodDataTinkoffBankPaymentsPostReqPaymentMethodData returns new PaymentsPostReqPaymentMethodData from PaymentMethodDataTinkoffBank. func NewPaymentMethodDataTinkoffBankPaymentsPostReqPaymentMethodData(v PaymentMethodDataTinkoffBank) PaymentsPostReqPaymentMethodData { var s PaymentsPostReqPaymentMethodData s.SetPaymentMethodDataTinkoffBank(v) return s } // SetPaymentMethodDataYooMoney sets PaymentsPostReqPaymentMethodData to PaymentMethodDataYooMoney. func (s *PaymentsPostReqPaymentMethodData) SetPaymentMethodDataYooMoney(v PaymentMethodDataYooMoney) { s.Type = PaymentMethodDataYooMoneyPaymentsPostReqPaymentMethodData s.PaymentMethodDataYooMoney = v } // GetPaymentMethodDataYooMoney returns PaymentMethodDataYooMoney and true boolean if PaymentsPostReqPaymentMethodData is PaymentMethodDataYooMoney. func (s PaymentsPostReqPaymentMethodData) GetPaymentMethodDataYooMoney() (v PaymentMethodDataYooMoney, ok bool) { if !s.IsPaymentMethodDataYooMoney() { return v, false } return s.PaymentMethodDataYooMoney, true } // NewPaymentMethodDataYooMoneyPaymentsPostReqPaymentMethodData returns new PaymentsPostReqPaymentMethodData from PaymentMethodDataYooMoney. func NewPaymentMethodDataYooMoneyPaymentsPostReqPaymentMethodData(v PaymentMethodDataYooMoney) PaymentsPostReqPaymentMethodData { var s PaymentsPostReqPaymentMethodData s.SetPaymentMethodDataYooMoney(v) return s } // SetPaymentMethodDataMobileBalance sets PaymentsPostReqPaymentMethodData to PaymentMethodDataMobileBalance. func (s *PaymentsPostReqPaymentMethodData) SetPaymentMethodDataMobileBalance(v PaymentMethodDataMobileBalance) { s.Type = PaymentMethodDataMobileBalancePaymentsPostReqPaymentMethodData s.PaymentMethodDataMobileBalance = v } // GetPaymentMethodDataMobileBalance returns PaymentMethodDataMobileBalance and true boolean if PaymentsPostReqPaymentMethodData is PaymentMethodDataMobileBalance. func (s PaymentsPostReqPaymentMethodData) GetPaymentMethodDataMobileBalance() (v PaymentMethodDataMobileBalance, ok bool) { if !s.IsPaymentMethodDataMobileBalance() { return v, false } return s.PaymentMethodDataMobileBalance, true } // NewPaymentMethodDataMobileBalancePaymentsPostReqPaymentMethodData returns new PaymentsPostReqPaymentMethodData from PaymentMethodDataMobileBalance. func NewPaymentMethodDataMobileBalancePaymentsPostReqPaymentMethodData(v PaymentMethodDataMobileBalance) PaymentsPostReqPaymentMethodData { var s PaymentsPostReqPaymentMethodData s.SetPaymentMethodDataMobileBalance(v) return s } // SetPaymentMethodDataB2bSberbank sets PaymentsPostReqPaymentMethodData to PaymentMethodDataB2bSberbank. func (s *PaymentsPostReqPaymentMethodData) SetPaymentMethodDataB2bSberbank(v PaymentMethodDataB2bSberbank) { s.Type = PaymentMethodDataB2bSberbankPaymentsPostReqPaymentMethodData s.PaymentMethodDataB2bSberbank = v } // GetPaymentMethodDataB2bSberbank returns PaymentMethodDataB2bSberbank and true boolean if PaymentsPostReqPaymentMethodData is PaymentMethodDataB2bSberbank. func (s PaymentsPostReqPaymentMethodData) GetPaymentMethodDataB2bSberbank() (v PaymentMethodDataB2bSberbank, ok bool) { if !s.IsPaymentMethodDataB2bSberbank() { return v, false } return s.PaymentMethodDataB2bSberbank, true } // NewPaymentMethodDataB2bSberbankPaymentsPostReqPaymentMethodData returns new PaymentsPostReqPaymentMethodData from PaymentMethodDataB2bSberbank. func NewPaymentMethodDataB2bSberbankPaymentsPostReqPaymentMethodData(v PaymentMethodDataB2bSberbank) PaymentsPostReqPaymentMethodData { var s PaymentsPostReqPaymentMethodData s.SetPaymentMethodDataB2bSberbank(v) return s } // SetPaymentMethodDataSbp sets PaymentsPostReqPaymentMethodData to PaymentMethodDataSbp. func (s *PaymentsPostReqPaymentMethodData) SetPaymentMethodDataSbp(v PaymentMethodDataSbp) { s.Type = PaymentMethodDataSbpPaymentsPostReqPaymentMethodData s.PaymentMethodDataSbp = v } // GetPaymentMethodDataSbp returns PaymentMethodDataSbp and true boolean if PaymentsPostReqPaymentMethodData is PaymentMethodDataSbp. func (s PaymentsPostReqPaymentMethodData) GetPaymentMethodDataSbp() (v PaymentMethodDataSbp, ok bool) { if !s.IsPaymentMethodDataSbp() { return v, false } return s.PaymentMethodDataSbp, true } // NewPaymentMethodDataSbpPaymentsPostReqPaymentMethodData returns new PaymentsPostReqPaymentMethodData from PaymentMethodDataSbp. func NewPaymentMethodDataSbpPaymentsPostReqPaymentMethodData(v PaymentMethodDataSbp) PaymentsPostReqPaymentMethodData { var s PaymentsPostReqPaymentMethodData s.SetPaymentMethodDataSbp(v) return s } // SetPaymentMethodDataSberLoan sets PaymentsPostReqPaymentMethodData to PaymentMethodDataSberLoan. func (s *PaymentsPostReqPaymentMethodData) SetPaymentMethodDataSberLoan(v PaymentMethodDataSberLoan) { s.Type = PaymentMethodDataSberLoanPaymentsPostReqPaymentMethodData s.PaymentMethodDataSberLoan = v } // GetPaymentMethodDataSberLoan returns PaymentMethodDataSberLoan and true boolean if PaymentsPostReqPaymentMethodData is PaymentMethodDataSberLoan. func (s PaymentsPostReqPaymentMethodData) GetPaymentMethodDataSberLoan() (v PaymentMethodDataSberLoan, ok bool) { if !s.IsPaymentMethodDataSberLoan() { return v, false } return s.PaymentMethodDataSberLoan, true } // NewPaymentMethodDataSberLoanPaymentsPostReqPaymentMethodData returns new PaymentsPostReqPaymentMethodData from PaymentMethodDataSberLoan. func NewPaymentMethodDataSberLoanPaymentsPostReqPaymentMethodData(v PaymentMethodDataSberLoan) PaymentsPostReqPaymentMethodData { var s PaymentsPostReqPaymentMethodData s.SetPaymentMethodDataSberLoan(v) return s } // SetPaymentMethodDataElectronicCertificate sets PaymentsPostReqPaymentMethodData to PaymentMethodDataElectronicCertificate. func (s *PaymentsPostReqPaymentMethodData) SetPaymentMethodDataElectronicCertificate(v PaymentMethodDataElectronicCertificate) { s.Type = PaymentMethodDataElectronicCertificatePaymentsPostReqPaymentMethodData s.PaymentMethodDataElectronicCertificate = v } // GetPaymentMethodDataElectronicCertificate returns PaymentMethodDataElectronicCertificate and true boolean if PaymentsPostReqPaymentMethodData is PaymentMethodDataElectronicCertificate. func (s PaymentsPostReqPaymentMethodData) GetPaymentMethodDataElectronicCertificate() (v PaymentMethodDataElectronicCertificate, ok bool) { if !s.IsPaymentMethodDataElectronicCertificate() { return v, false } return s.PaymentMethodDataElectronicCertificate, true } // NewPaymentMethodDataElectronicCertificatePaymentsPostReqPaymentMethodData returns new PaymentsPostReqPaymentMethodData from PaymentMethodDataElectronicCertificate. func NewPaymentMethodDataElectronicCertificatePaymentsPostReqPaymentMethodData(v PaymentMethodDataElectronicCertificate) PaymentsPostReqPaymentMethodData { var s PaymentsPostReqPaymentMethodData s.SetPaymentMethodDataElectronicCertificate(v) return s } // SetPaymentMethodDataSberBnpl sets PaymentsPostReqPaymentMethodData to PaymentMethodDataSberBnpl. func (s *PaymentsPostReqPaymentMethodData) SetPaymentMethodDataSberBnpl(v PaymentMethodDataSberBnpl) { s.Type = PaymentMethodDataSberBnplPaymentsPostReqPaymentMethodData s.PaymentMethodDataSberBnpl = v } // GetPaymentMethodDataSberBnpl returns PaymentMethodDataSberBnpl and true boolean if PaymentsPostReqPaymentMethodData is PaymentMethodDataSberBnpl. func (s PaymentsPostReqPaymentMethodData) GetPaymentMethodDataSberBnpl() (v PaymentMethodDataSberBnpl, ok bool) { if !s.IsPaymentMethodDataSberBnpl() { return v, false } return s.PaymentMethodDataSberBnpl, true } // NewPaymentMethodDataSberBnplPaymentsPostReqPaymentMethodData returns new PaymentsPostReqPaymentMethodData from PaymentMethodDataSberBnpl. func NewPaymentMethodDataSberBnplPaymentsPostReqPaymentMethodData(v PaymentMethodDataSberBnpl) PaymentsPostReqPaymentMethodData { var s PaymentsPostReqPaymentMethodData s.SetPaymentMethodDataSberBnpl(v) return s } // PaymentsPostReqPaymentOrder represents sum type. type PaymentsPostReqPaymentOrder struct { Type PaymentsPostReqPaymentOrderType // switch on this field PaymentOrderDataUtilities PaymentOrderDataUtilities } // PaymentsPostReqPaymentOrderType is oneOf type of PaymentsPostReqPaymentOrder. type PaymentsPostReqPaymentOrderType string // Possible values for PaymentsPostReqPaymentOrderType. const ( PaymentOrderDataUtilitiesPaymentsPostReqPaymentOrder PaymentsPostReqPaymentOrderType = "PaymentOrderDataUtilities" ) // IsPaymentOrderDataUtilities reports whether PaymentsPostReqPaymentOrder is PaymentOrderDataUtilities. func (s PaymentsPostReqPaymentOrder) IsPaymentOrderDataUtilities() bool { return s.Type == PaymentOrderDataUtilitiesPaymentsPostReqPaymentOrder } // SetPaymentOrderDataUtilities sets PaymentsPostReqPaymentOrder to PaymentOrderDataUtilities. func (s *PaymentsPostReqPaymentOrder) SetPaymentOrderDataUtilities(v PaymentOrderDataUtilities) { s.Type = PaymentOrderDataUtilitiesPaymentsPostReqPaymentOrder s.PaymentOrderDataUtilities = v } // GetPaymentOrderDataUtilities returns PaymentOrderDataUtilities and true boolean if PaymentsPostReqPaymentOrder is PaymentOrderDataUtilities. func (s PaymentsPostReqPaymentOrder) GetPaymentOrderDataUtilities() (v PaymentOrderDataUtilities, ok bool) { if !s.IsPaymentOrderDataUtilities() { return v, false } return s.PaymentOrderDataUtilities, true } // NewPaymentOrderDataUtilitiesPaymentsPostReqPaymentOrder returns new PaymentsPostReqPaymentOrder from PaymentOrderDataUtilities. func NewPaymentOrderDataUtilitiesPaymentsPostReqPaymentOrder(v PaymentOrderDataUtilities) PaymentsPostReqPaymentOrder { var s PaymentsPostReqPaymentOrder s.SetPaymentOrderDataUtilities(v) return s } // PaymentsPostReqReceiver represents sum type. type PaymentsPostReqReceiver struct { Type PaymentsPostReqReceiverType // switch on this field ReceiverMobileBalance ReceiverMobileBalance ReceiverDigitalWallet ReceiverDigitalWallet ReceiverBankAccount ReceiverBankAccount } // PaymentsPostReqReceiverType is oneOf type of PaymentsPostReqReceiver. type PaymentsPostReqReceiverType string // Possible values for PaymentsPostReqReceiverType. const ( ReceiverMobileBalancePaymentsPostReqReceiver PaymentsPostReqReceiverType = "ReceiverMobileBalance" ReceiverDigitalWalletPaymentsPostReqReceiver PaymentsPostReqReceiverType = "ReceiverDigitalWallet" ReceiverBankAccountPaymentsPostReqReceiver PaymentsPostReqReceiverType = "ReceiverBankAccount" ) // IsReceiverMobileBalance reports whether PaymentsPostReqReceiver is ReceiverMobileBalance. func (s PaymentsPostReqReceiver) IsReceiverMobileBalance() bool { return s.Type == ReceiverMobileBalancePaymentsPostReqReceiver } // IsReceiverDigitalWallet reports whether PaymentsPostReqReceiver is ReceiverDigitalWallet. func (s PaymentsPostReqReceiver) IsReceiverDigitalWallet() bool { return s.Type == ReceiverDigitalWalletPaymentsPostReqReceiver } // IsReceiverBankAccount reports whether PaymentsPostReqReceiver is ReceiverBankAccount. func (s PaymentsPostReqReceiver) IsReceiverBankAccount() bool { return s.Type == ReceiverBankAccountPaymentsPostReqReceiver } // SetReceiverMobileBalance sets PaymentsPostReqReceiver to ReceiverMobileBalance. func (s *PaymentsPostReqReceiver) SetReceiverMobileBalance(v ReceiverMobileBalance) { s.Type = ReceiverMobileBalancePaymentsPostReqReceiver s.ReceiverMobileBalance = v } // GetReceiverMobileBalance returns ReceiverMobileBalance and true boolean if PaymentsPostReqReceiver is ReceiverMobileBalance. func (s PaymentsPostReqReceiver) GetReceiverMobileBalance() (v ReceiverMobileBalance, ok bool) { if !s.IsReceiverMobileBalance() { return v, false } return s.ReceiverMobileBalance, true } // NewReceiverMobileBalancePaymentsPostReqReceiver returns new PaymentsPostReqReceiver from ReceiverMobileBalance. func NewReceiverMobileBalancePaymentsPostReqReceiver(v ReceiverMobileBalance) PaymentsPostReqReceiver { var s PaymentsPostReqReceiver s.SetReceiverMobileBalance(v) return s } // SetReceiverDigitalWallet sets PaymentsPostReqReceiver to ReceiverDigitalWallet. func (s *PaymentsPostReqReceiver) SetReceiverDigitalWallet(v ReceiverDigitalWallet) { s.Type = ReceiverDigitalWalletPaymentsPostReqReceiver s.ReceiverDigitalWallet = v } // GetReceiverDigitalWallet returns ReceiverDigitalWallet and true boolean if PaymentsPostReqReceiver is ReceiverDigitalWallet. func (s PaymentsPostReqReceiver) GetReceiverDigitalWallet() (v ReceiverDigitalWallet, ok bool) { if !s.IsReceiverDigitalWallet() { return v, false } return s.ReceiverDigitalWallet, true } // NewReceiverDigitalWalletPaymentsPostReqReceiver returns new PaymentsPostReqReceiver from ReceiverDigitalWallet. func NewReceiverDigitalWalletPaymentsPostReqReceiver(v ReceiverDigitalWallet) PaymentsPostReqReceiver { var s PaymentsPostReqReceiver s.SetReceiverDigitalWallet(v) return s } // SetReceiverBankAccount sets PaymentsPostReqReceiver to ReceiverBankAccount. func (s *PaymentsPostReqReceiver) SetReceiverBankAccount(v ReceiverBankAccount) { s.Type = ReceiverBankAccountPaymentsPostReqReceiver s.ReceiverBankAccount = v } // GetReceiverBankAccount returns ReceiverBankAccount and true boolean if PaymentsPostReqReceiver is ReceiverBankAccount. func (s PaymentsPostReqReceiver) GetReceiverBankAccount() (v ReceiverBankAccount, ok bool) { if !s.IsReceiverBankAccount() { return v, false } return s.ReceiverBankAccount, true } // NewReceiverBankAccountPaymentsPostReqReceiver returns new PaymentsPostReqReceiver from ReceiverBankAccount. func NewReceiverBankAccountPaymentsPostReqReceiver(v ReceiverBankAccount) PaymentsPostReqReceiver { var s PaymentsPostReqReceiver s.SetReceiverBankAccount(v) return s } // PaymentsPostReqStatementsItem represents sum type. type PaymentsPostReqStatementsItem struct { Type PaymentsPostReqStatementsItemType // switch on this field PaymentOverviewStatementData PaymentOverviewStatementData } // PaymentsPostReqStatementsItemType is oneOf type of PaymentsPostReqStatementsItem. type PaymentsPostReqStatementsItemType string // Possible values for PaymentsPostReqStatementsItemType. const ( PaymentOverviewStatementDataPaymentsPostReqStatementsItem PaymentsPostReqStatementsItemType = "PaymentOverviewStatementData" ) // IsPaymentOverviewStatementData reports whether PaymentsPostReqStatementsItem is PaymentOverviewStatementData. func (s PaymentsPostReqStatementsItem) IsPaymentOverviewStatementData() bool { return s.Type == PaymentOverviewStatementDataPaymentsPostReqStatementsItem } // SetPaymentOverviewStatementData sets PaymentsPostReqStatementsItem to PaymentOverviewStatementData. func (s *PaymentsPostReqStatementsItem) SetPaymentOverviewStatementData(v PaymentOverviewStatementData) { s.Type = PaymentOverviewStatementDataPaymentsPostReqStatementsItem s.PaymentOverviewStatementData = v } // GetPaymentOverviewStatementData returns PaymentOverviewStatementData and true boolean if PaymentsPostReqStatementsItem is PaymentOverviewStatementData. func (s PaymentsPostReqStatementsItem) GetPaymentOverviewStatementData() (v PaymentOverviewStatementData, ok bool) { if !s.IsPaymentOverviewStatementData() { return v, false } return s.PaymentOverviewStatementData, true } // NewPaymentOverviewStatementDataPaymentsPostReqStatementsItem returns new PaymentsPostReqStatementsItem from PaymentOverviewStatementData. func NewPaymentOverviewStatementDataPaymentsPostReqStatementsItem(v PaymentOverviewStatementData) PaymentsPostReqStatementsItem { var s PaymentsPostReqStatementsItem s.SetPaymentOverviewStatementData(v) return s } // Payout object (Payout) contains all the relevant information about the payout. // Ref: #/components/schemas/Payout type Payout struct { ID PayoutId `json:"id"` Amount PayoutAmount `json:"amount"` Status PayoutStatus `json:"status"` PayoutDestination PayoutPayoutDestination `json:"payout_destination"` Description OptString `json:"description"` // Время создания выплаты. Указывается по UTC: https://ru.wikipedia. // org/wiki/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F и передается в формате ISO 8601: https://en.wikipedia.org/wiki/ISO_8601. Пример: 2017-11-03T11:52:31.827Z. CreatedAt time.Time `json:"created_at"` // Time of a successful payout processing. Based on UTC: https://en.wikipedia. // org/wiki/Coordinated_Universal_Time and specified in the ISO 8601: https://en.wikipedia. // org/wiki/ISO_8601 format. Example: 2017-11-03T11:52:42.312Z Mandatory parameter for payouts with // the succeeded status. SucceededAt OptDateTime `json:"succeeded_at"` Deal OptPayoutDeal `json:"deal"` SelfEmployed OptPayoutSelfEmployed `json:"self_employed"` Receipt OptIncomeReceipt `json:"receipt"` CancellationDetails OptPayoutCancellationDetails `json:"cancellation_details"` Metadata OptMetadata `json:"metadata"` Test Test `json:"test"` } // GetID returns the value of ID. func (s *Payout) GetID() PayoutId { return s.ID } // GetAmount returns the value of Amount. func (s *Payout) GetAmount() PayoutAmount { return s.Amount } // GetStatus returns the value of Status. func (s *Payout) GetStatus() PayoutStatus { return s.Status } // GetPayoutDestination returns the value of PayoutDestination. func (s *Payout) GetPayoutDestination() PayoutPayoutDestination { return s.PayoutDestination } // GetDescription returns the value of Description. func (s *Payout) GetDescription() OptString { return s.Description } // GetCreatedAt returns the value of CreatedAt. func (s *Payout) GetCreatedAt() time.Time { return s.CreatedAt } // GetSucceededAt returns the value of SucceededAt. func (s *Payout) GetSucceededAt() OptDateTime { return s.SucceededAt } // GetDeal returns the value of Deal. func (s *Payout) GetDeal() OptPayoutDeal { return s.Deal } // GetSelfEmployed returns the value of SelfEmployed. func (s *Payout) GetSelfEmployed() OptPayoutSelfEmployed { return s.SelfEmployed } // GetReceipt returns the value of Receipt. func (s *Payout) GetReceipt() OptIncomeReceipt { return s.Receipt } // GetCancellationDetails returns the value of CancellationDetails. func (s *Payout) GetCancellationDetails() OptPayoutCancellationDetails { return s.CancellationDetails } // GetMetadata returns the value of Metadata. func (s *Payout) GetMetadata() OptMetadata { return s.Metadata } // GetTest returns the value of Test. func (s *Payout) GetTest() Test { return s.Test } // SetID sets the value of ID. func (s *Payout) SetID(val PayoutId) { s.ID = val } // SetAmount sets the value of Amount. func (s *Payout) SetAmount(val PayoutAmount) { s.Amount = val } // SetStatus sets the value of Status. func (s *Payout) SetStatus(val PayoutStatus) { s.Status = val } // SetPayoutDestination sets the value of PayoutDestination. func (s *Payout) SetPayoutDestination(val PayoutPayoutDestination) { s.PayoutDestination = val } // SetDescription sets the value of Description. func (s *Payout) SetDescription(val OptString) { s.Description = val } // SetCreatedAt sets the value of CreatedAt. func (s *Payout) SetCreatedAt(val time.Time) { s.CreatedAt = val } // SetSucceededAt sets the value of SucceededAt. func (s *Payout) SetSucceededAt(val OptDateTime) { s.SucceededAt = val } // SetDeal sets the value of Deal. func (s *Payout) SetDeal(val OptPayoutDeal) { s.Deal = val } // SetSelfEmployed sets the value of SelfEmployed. func (s *Payout) SetSelfEmployed(val OptPayoutSelfEmployed) { s.SelfEmployed = val } // SetReceipt sets the value of Receipt. func (s *Payout) SetReceipt(val OptIncomeReceipt) { s.Receipt = val } // SetCancellationDetails sets the value of CancellationDetails. func (s *Payout) SetCancellationDetails(val OptPayoutCancellationDetails) { s.CancellationDetails = val } // SetMetadata sets the value of Metadata. func (s *Payout) SetMetadata(val OptMetadata) { s.Metadata = val } // SetTest sets the value of Test. func (s *Payout) SetTest(val Test) { s.Test = val } func (*Payout) payoutsPayoutIDGetRes() {} func (*Payout) payoutsPostRes() {} // Сумма в выбранной валюте. type PayoutAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *PayoutAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *PayoutAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *PayoutAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *PayoutAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Комментарий к статусу canceled: кто отменил выплату и по // какой причине. // Ref: #/components/schemas/PayoutCancellationDetails type PayoutCancellationDetails struct { // Участник процесса выплаты, который принял решение об // отмене транзакции. Перечень инициаторов отмены // выплаты: для обычных выплат: https://yookassa. // ru/developers/payouts/after-the-payout/declined-payouts#cancellation-details-party, для // выплат в рамках Безопасной сделки: https://yookassa. // ru/developers/solutions-for-platforms/safe-deal/integration/payouts#declined-payouts-cancellation-details-party. Party PayoutCancellationDetailsParty `json:"party"` // Причина отмены выплаты. Перечень и описание // возможных значений: для обычных выплат: https://yookassa. // ru/developers/payouts/after-the-payout/declined-payouts#cancellation-details-reason, для // выплат в рамках Безопасной сделки: https://yookassa. // ru/developers/solutions-for-platforms/safe-deal/integration/payouts#declined-payouts-cancellation-details-reason. Reason PayoutCancellationDetailsReason `json:"reason"` } // GetParty returns the value of Party. func (s *PayoutCancellationDetails) GetParty() PayoutCancellationDetailsParty { return s.Party } // GetReason returns the value of Reason. func (s *PayoutCancellationDetails) GetReason() PayoutCancellationDetailsReason { return s.Reason } // SetParty sets the value of Party. func (s *PayoutCancellationDetails) SetParty(val PayoutCancellationDetailsParty) { s.Party = val } // SetReason sets the value of Reason. func (s *PayoutCancellationDetails) SetReason(val PayoutCancellationDetailsReason) { s.Reason = val } // Участник процесса выплаты, который принял решение об // отмене транзакции. Перечень инициаторов отмены // выплаты: для обычных выплат: https://yookassa. // ru/developers/payouts/after-the-payout/declined-payouts#cancellation-details-party, для // выплат в рамках Безопасной сделки: https://yookassa. // ru/developers/solutions-for-platforms/safe-deal/integration/payouts#declined-payouts-cancellation-details-party. type PayoutCancellationDetailsParty string const ( PayoutCancellationDetailsPartyYooMoney PayoutCancellationDetailsParty = "yoo_money" PayoutCancellationDetailsPartyPayoutNetwork PayoutCancellationDetailsParty = "payout_network" ) // AllValues returns all PayoutCancellationDetailsParty values. func (PayoutCancellationDetailsParty) AllValues() []PayoutCancellationDetailsParty { return []PayoutCancellationDetailsParty{ PayoutCancellationDetailsPartyYooMoney, PayoutCancellationDetailsPartyPayoutNetwork, } } // MarshalText implements encoding.TextMarshaler. func (s PayoutCancellationDetailsParty) MarshalText() ([]byte, error) { switch s { case PayoutCancellationDetailsPartyYooMoney: return []byte(s), nil case PayoutCancellationDetailsPartyPayoutNetwork: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PayoutCancellationDetailsParty) UnmarshalText(data []byte) error { switch PayoutCancellationDetailsParty(data) { case PayoutCancellationDetailsPartyYooMoney: *s = PayoutCancellationDetailsPartyYooMoney return nil case PayoutCancellationDetailsPartyPayoutNetwork: *s = PayoutCancellationDetailsPartyPayoutNetwork return nil default: return errors.Errorf("invalid value: %q", data) } } // Причина отмены выплаты. Перечень и описание // возможных значений: для обычных выплат: https://yookassa. // ru/developers/payouts/after-the-payout/declined-payouts#cancellation-details-reason, для // выплат в рамках Безопасной сделки: https://yookassa. // ru/developers/solutions-for-platforms/safe-deal/integration/payouts#declined-payouts-cancellation-details-reason. type PayoutCancellationDetailsReason string const ( PayoutCancellationDetailsReasonInsufficientFunds PayoutCancellationDetailsReason = "insufficient_funds" PayoutCancellationDetailsReasonFraudSuspected PayoutCancellationDetailsReason = "fraud_suspected" PayoutCancellationDetailsReasonOneTimeLimitExceeded PayoutCancellationDetailsReason = "one_time_limit_exceeded" PayoutCancellationDetailsReasonPeriodicLimitExceeded PayoutCancellationDetailsReason = "periodic_limit_exceeded" PayoutCancellationDetailsReasonRejectedByPayee PayoutCancellationDetailsReason = "rejected_by_payee" PayoutCancellationDetailsReasonGeneralDecline PayoutCancellationDetailsReason = "general_decline" PayoutCancellationDetailsReasonIssuerUnavailable PayoutCancellationDetailsReason = "issuer_unavailable" PayoutCancellationDetailsReasonRecipientNotFound PayoutCancellationDetailsReason = "recipient_not_found" PayoutCancellationDetailsReasonRecipientCheckFailed PayoutCancellationDetailsReason = "recipient_check_failed" PayoutCancellationDetailsReasonIdentificationRequired PayoutCancellationDetailsReason = "identification_required" PayoutCancellationDetailsReasonSelfEmployedAnnualLimitExceeded PayoutCancellationDetailsReason = "self_employed_annual_limit_exceeded" ) // AllValues returns all PayoutCancellationDetailsReason values. func (PayoutCancellationDetailsReason) AllValues() []PayoutCancellationDetailsReason { return []PayoutCancellationDetailsReason{ PayoutCancellationDetailsReasonInsufficientFunds, PayoutCancellationDetailsReasonFraudSuspected, PayoutCancellationDetailsReasonOneTimeLimitExceeded, PayoutCancellationDetailsReasonPeriodicLimitExceeded, PayoutCancellationDetailsReasonRejectedByPayee, PayoutCancellationDetailsReasonGeneralDecline, PayoutCancellationDetailsReasonIssuerUnavailable, PayoutCancellationDetailsReasonRecipientNotFound, PayoutCancellationDetailsReasonRecipientCheckFailed, PayoutCancellationDetailsReasonIdentificationRequired, PayoutCancellationDetailsReasonSelfEmployedAnnualLimitExceeded, } } // MarshalText implements encoding.TextMarshaler. func (s PayoutCancellationDetailsReason) MarshalText() ([]byte, error) { switch s { case PayoutCancellationDetailsReasonInsufficientFunds: return []byte(s), nil case PayoutCancellationDetailsReasonFraudSuspected: return []byte(s), nil case PayoutCancellationDetailsReasonOneTimeLimitExceeded: return []byte(s), nil case PayoutCancellationDetailsReasonPeriodicLimitExceeded: return []byte(s), nil case PayoutCancellationDetailsReasonRejectedByPayee: return []byte(s), nil case PayoutCancellationDetailsReasonGeneralDecline: return []byte(s), nil case PayoutCancellationDetailsReasonIssuerUnavailable: return []byte(s), nil case PayoutCancellationDetailsReasonRecipientNotFound: return []byte(s), nil case PayoutCancellationDetailsReasonRecipientCheckFailed: return []byte(s), nil case PayoutCancellationDetailsReasonIdentificationRequired: return []byte(s), nil case PayoutCancellationDetailsReasonSelfEmployedAnnualLimitExceeded: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PayoutCancellationDetailsReason) UnmarshalText(data []byte) error { switch PayoutCancellationDetailsReason(data) { case PayoutCancellationDetailsReasonInsufficientFunds: *s = PayoutCancellationDetailsReasonInsufficientFunds return nil case PayoutCancellationDetailsReasonFraudSuspected: *s = PayoutCancellationDetailsReasonFraudSuspected return nil case PayoutCancellationDetailsReasonOneTimeLimitExceeded: *s = PayoutCancellationDetailsReasonOneTimeLimitExceeded return nil case PayoutCancellationDetailsReasonPeriodicLimitExceeded: *s = PayoutCancellationDetailsReasonPeriodicLimitExceeded return nil case PayoutCancellationDetailsReasonRejectedByPayee: *s = PayoutCancellationDetailsReasonRejectedByPayee return nil case PayoutCancellationDetailsReasonGeneralDecline: *s = PayoutCancellationDetailsReasonGeneralDecline return nil case PayoutCancellationDetailsReasonIssuerUnavailable: *s = PayoutCancellationDetailsReasonIssuerUnavailable return nil case PayoutCancellationDetailsReasonRecipientNotFound: *s = PayoutCancellationDetailsReasonRecipientNotFound return nil case PayoutCancellationDetailsReasonRecipientCheckFailed: *s = PayoutCancellationDetailsReasonRecipientCheckFailed return nil case PayoutCancellationDetailsReasonIdentificationRequired: *s = PayoutCancellationDetailsReasonIdentificationRequired return nil case PayoutCancellationDetailsReasonSelfEmployedAnnualLimitExceeded: *s = PayoutCancellationDetailsReasonSelfEmployedAnnualLimitExceeded return nil default: return errors.Errorf("invalid value: %q", data) } } // Данные банковской карты. // Ref: #/components/schemas/PayoutCardData type PayoutCardData struct { First6 string `json:"first6"` Last4 BankCardLast4 `json:"last4"` CardType BankCardType `json:"card_type"` IssuerCountry OptBankCardIssuerCountry `json:"issuer_country"` IssuerName OptBankCardIssuerName `json:"issuer_name"` } // GetFirst6 returns the value of First6. func (s *PayoutCardData) GetFirst6() string { return s.First6 } // GetLast4 returns the value of Last4. func (s *PayoutCardData) GetLast4() BankCardLast4 { return s.Last4 } // GetCardType returns the value of CardType. func (s *PayoutCardData) GetCardType() BankCardType { return s.CardType } // GetIssuerCountry returns the value of IssuerCountry. func (s *PayoutCardData) GetIssuerCountry() OptBankCardIssuerCountry { return s.IssuerCountry } // GetIssuerName returns the value of IssuerName. func (s *PayoutCardData) GetIssuerName() OptBankCardIssuerName { return s.IssuerName } // SetFirst6 sets the value of First6. func (s *PayoutCardData) SetFirst6(val string) { s.First6 = val } // SetLast4 sets the value of Last4. func (s *PayoutCardData) SetLast4(val BankCardLast4) { s.Last4 = val } // SetCardType sets the value of CardType. func (s *PayoutCardData) SetCardType(val BankCardType) { s.CardType = val } // SetIssuerCountry sets the value of IssuerCountry. func (s *PayoutCardData) SetIssuerCountry(val OptBankCardIssuerCountry) { s.IssuerCountry = val } // SetIssuerName sets the value of IssuerName. func (s *PayoutCardData) SetIssuerName(val OptBankCardIssuerName) { s.IssuerName = val } // Merged schema. type PayoutDeal struct { ID DealId `json:"id"` } // GetID returns the value of ID. func (s *PayoutDeal) GetID() DealId { return s.ID } // SetID sets the value of ID. func (s *PayoutDeal) SetID(val DealId) { s.ID = val } // Сделка, в рамках которой нужно провести выплату. // Необходимо передавать, если вы проводите Безопасную // сделку: https://yookassa.ru/developers/solutions-for-platforms/safe-deal/basics. // Ref: #/components/schemas/PayoutDealInfo type PayoutDealInfo struct { ID DealId `json:"id"` } // GetID returns the value of ID. func (s *PayoutDealInfo) GetID() DealId { return s.ID } // SetID sets the value of ID. func (s *PayoutDealInfo) SetID(val DealId) { s.ID = val } // Способ получения выплаты: * yoo_money — выплаты на кошелек // ЮMoney; * bank_card — выплаты на банковскую карту; * sbp — // выплаты через СБП на счет в банке или платежном // сервисе. // Ref: #/components/schemas/PayoutDestinationDataType type PayoutDestinationDataType string const ( PayoutDestinationDataTypeYooMoney PayoutDestinationDataType = "yoo_money" PayoutDestinationDataTypeBankCard PayoutDestinationDataType = "bank_card" PayoutDestinationDataTypeSbp PayoutDestinationDataType = "sbp" ) // AllValues returns all PayoutDestinationDataType values. func (PayoutDestinationDataType) AllValues() []PayoutDestinationDataType { return []PayoutDestinationDataType{ PayoutDestinationDataTypeYooMoney, PayoutDestinationDataTypeBankCard, PayoutDestinationDataTypeSbp, } } // MarshalText implements encoding.TextMarshaler. func (s PayoutDestinationDataType) MarshalText() ([]byte, error) { switch s { case PayoutDestinationDataTypeYooMoney: return []byte(s), nil case PayoutDestinationDataTypeBankCard: return []byte(s), nil case PayoutDestinationDataTypeSbp: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PayoutDestinationDataType) UnmarshalText(data []byte) error { switch PayoutDestinationDataType(data) { case PayoutDestinationDataTypeYooMoney: *s = PayoutDestinationDataTypeYooMoney return nil case PayoutDestinationDataTypeBankCard: *s = PayoutDestinationDataTypeBankCard return nil case PayoutDestinationDataTypeSbp: *s = PayoutDestinationDataTypeSbp return nil default: return errors.Errorf("invalid value: %q", data) } } // Способ получения выплаты: * bank_card – выплата на // банковскую карту; * yoo_money – выплата на кошелек ЮMoney; * sbp // – выплата через СБП на счет в банке или платежном // сервисе. // Ref: #/components/schemas/PayoutDestinationType type PayoutDestinationType string const ( PayoutDestinationTypeBankCard PayoutDestinationType = "bank_card" PayoutDestinationTypeYooMoney PayoutDestinationType = "yoo_money" PayoutDestinationTypeSbp PayoutDestinationType = "sbp" ) // AllValues returns all PayoutDestinationType values. func (PayoutDestinationType) AllValues() []PayoutDestinationType { return []PayoutDestinationType{ PayoutDestinationTypeBankCard, PayoutDestinationTypeYooMoney, PayoutDestinationTypeSbp, } } // MarshalText implements encoding.TextMarshaler. func (s PayoutDestinationType) MarshalText() ([]byte, error) { switch s { case PayoutDestinationTypeBankCard: return []byte(s), nil case PayoutDestinationTypeYooMoney: return []byte(s), nil case PayoutDestinationTypeSbp: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PayoutDestinationType) UnmarshalText(data []byte) error { switch PayoutDestinationType(data) { case PayoutDestinationTypeBankCard: *s = PayoutDestinationTypeBankCard return nil case PayoutDestinationTypeYooMoney: *s = PayoutDestinationTypeYooMoney return nil case PayoutDestinationTypeSbp: *s = PayoutDestinationTypeSbp return nil default: return errors.Errorf("invalid value: %q", data) } } type PayoutId string // Способ получения выплаты. // Ref: #/components/schemas/PayoutMethodType type PayoutMethodType string const ( PayoutMethodTypeBankCard PayoutMethodType = "bank_card" PayoutMethodTypeYooMoney PayoutMethodType = "yoo_money" PayoutMethodTypeSbp PayoutMethodType = "sbp" ) // AllValues returns all PayoutMethodType values. func (PayoutMethodType) AllValues() []PayoutMethodType { return []PayoutMethodType{ PayoutMethodTypeBankCard, PayoutMethodTypeYooMoney, PayoutMethodTypeSbp, } } // MarshalText implements encoding.TextMarshaler. func (s PayoutMethodType) MarshalText() ([]byte, error) { switch s { case PayoutMethodTypeBankCard: return []byte(s), nil case PayoutMethodTypeYooMoney: return []byte(s), nil case PayoutMethodTypeSbp: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PayoutMethodType) UnmarshalText(data []byte) error { switch PayoutMethodType(data) { case PayoutMethodTypeBankCard: *s = PayoutMethodTypeBankCard return nil case PayoutMethodTypeYooMoney: *s = PayoutMethodTypeYooMoney return nil case PayoutMethodTypeSbp: *s = PayoutMethodTypeSbp return nil default: return errors.Errorf("invalid value: %q", data) } } // PayoutPayoutDestination represents sum type. type PayoutPayoutDestination struct { Type PayoutPayoutDestinationType // switch on this field PayoutToCardDestination PayoutToCardDestination PayoutToYooMoneyDestination PayoutToYooMoneyDestination PayoutToSbpDestination PayoutToSbpDestination } // PayoutPayoutDestinationType is oneOf type of PayoutPayoutDestination. type PayoutPayoutDestinationType string // Possible values for PayoutPayoutDestinationType. const ( PayoutToCardDestinationPayoutPayoutDestination PayoutPayoutDestinationType = "PayoutToCardDestination" PayoutToYooMoneyDestinationPayoutPayoutDestination PayoutPayoutDestinationType = "PayoutToYooMoneyDestination" PayoutToSbpDestinationPayoutPayoutDestination PayoutPayoutDestinationType = "PayoutToSbpDestination" ) // IsPayoutToCardDestination reports whether PayoutPayoutDestination is PayoutToCardDestination. func (s PayoutPayoutDestination) IsPayoutToCardDestination() bool { return s.Type == PayoutToCardDestinationPayoutPayoutDestination } // IsPayoutToYooMoneyDestination reports whether PayoutPayoutDestination is PayoutToYooMoneyDestination. func (s PayoutPayoutDestination) IsPayoutToYooMoneyDestination() bool { return s.Type == PayoutToYooMoneyDestinationPayoutPayoutDestination } // IsPayoutToSbpDestination reports whether PayoutPayoutDestination is PayoutToSbpDestination. func (s PayoutPayoutDestination) IsPayoutToSbpDestination() bool { return s.Type == PayoutToSbpDestinationPayoutPayoutDestination } // SetPayoutToCardDestination sets PayoutPayoutDestination to PayoutToCardDestination. func (s *PayoutPayoutDestination) SetPayoutToCardDestination(v PayoutToCardDestination) { s.Type = PayoutToCardDestinationPayoutPayoutDestination s.PayoutToCardDestination = v } // GetPayoutToCardDestination returns PayoutToCardDestination and true boolean if PayoutPayoutDestination is PayoutToCardDestination. func (s PayoutPayoutDestination) GetPayoutToCardDestination() (v PayoutToCardDestination, ok bool) { if !s.IsPayoutToCardDestination() { return v, false } return s.PayoutToCardDestination, true } // NewPayoutToCardDestinationPayoutPayoutDestination returns new PayoutPayoutDestination from PayoutToCardDestination. func NewPayoutToCardDestinationPayoutPayoutDestination(v PayoutToCardDestination) PayoutPayoutDestination { var s PayoutPayoutDestination s.SetPayoutToCardDestination(v) return s } // SetPayoutToYooMoneyDestination sets PayoutPayoutDestination to PayoutToYooMoneyDestination. func (s *PayoutPayoutDestination) SetPayoutToYooMoneyDestination(v PayoutToYooMoneyDestination) { s.Type = PayoutToYooMoneyDestinationPayoutPayoutDestination s.PayoutToYooMoneyDestination = v } // GetPayoutToYooMoneyDestination returns PayoutToYooMoneyDestination and true boolean if PayoutPayoutDestination is PayoutToYooMoneyDestination. func (s PayoutPayoutDestination) GetPayoutToYooMoneyDestination() (v PayoutToYooMoneyDestination, ok bool) { if !s.IsPayoutToYooMoneyDestination() { return v, false } return s.PayoutToYooMoneyDestination, true } // NewPayoutToYooMoneyDestinationPayoutPayoutDestination returns new PayoutPayoutDestination from PayoutToYooMoneyDestination. func NewPayoutToYooMoneyDestinationPayoutPayoutDestination(v PayoutToYooMoneyDestination) PayoutPayoutDestination { var s PayoutPayoutDestination s.SetPayoutToYooMoneyDestination(v) return s } // SetPayoutToSbpDestination sets PayoutPayoutDestination to PayoutToSbpDestination. func (s *PayoutPayoutDestination) SetPayoutToSbpDestination(v PayoutToSbpDestination) { s.Type = PayoutToSbpDestinationPayoutPayoutDestination s.PayoutToSbpDestination = v } // GetPayoutToSbpDestination returns PayoutToSbpDestination and true boolean if PayoutPayoutDestination is PayoutToSbpDestination. func (s PayoutPayoutDestination) GetPayoutToSbpDestination() (v PayoutToSbpDestination, ok bool) { if !s.IsPayoutToSbpDestination() { return v, false } return s.PayoutToSbpDestination, true } // NewPayoutToSbpDestinationPayoutPayoutDestination returns new PayoutPayoutDestination from PayoutToSbpDestination. func NewPayoutToSbpDestinationPayoutPayoutDestination(v PayoutToSbpDestination) PayoutPayoutDestination { var s PayoutPayoutDestination s.SetPayoutToSbpDestination(v) return s } // Данные для создания выплаты. // Ref: #/components/schemas/PayoutRequest type PayoutRequest struct { Amount PayoutRequestAmount `json:"amount"` PayoutDestinationData OptPayoutRequestPayoutDestinationData `json:"payout_destination_data"` // Токенизированные данные для выплаты. Например, // синоним банковской карты. Обязательный параметр, // если не передан payout_destination_data или payment_method_id. PayoutToken OptString `json:"payout_token"` PaymentMethodID OptString `json:"payment_method_id"` Description OptString `json:"description"` Deal OptPayoutDealInfo `json:"deal"` // Персональные данные получателя выплаты. Только для // обычных выплат. Необходимо передавать в этих // сценариях: * выплаты с проверкой получателя: https://yookassa. // ru/developers/payouts/scenario-extensions/recipient-check (только для выплат // через СБП); * выплаты с передачей данных получателя // для выписок из реестра: https://yookassa. // ru/developers/payouts/scenario-extensions/recipient-data-send. В массиве можно // одновременно передать несколько идентификаторов, но // только для разных типов данных. PersonalData []PayoutsPersonalData `json:"personal_data"` Metadata OptMetadata `json:"metadata"` } // GetAmount returns the value of Amount. func (s *PayoutRequest) GetAmount() PayoutRequestAmount { return s.Amount } // GetPayoutDestinationData returns the value of PayoutDestinationData. func (s *PayoutRequest) GetPayoutDestinationData() OptPayoutRequestPayoutDestinationData { return s.PayoutDestinationData } // GetPayoutToken returns the value of PayoutToken. func (s *PayoutRequest) GetPayoutToken() OptString { return s.PayoutToken } // GetPaymentMethodID returns the value of PaymentMethodID. func (s *PayoutRequest) GetPaymentMethodID() OptString { return s.PaymentMethodID } // GetDescription returns the value of Description. func (s *PayoutRequest) GetDescription() OptString { return s.Description } // GetDeal returns the value of Deal. func (s *PayoutRequest) GetDeal() OptPayoutDealInfo { return s.Deal } // GetPersonalData returns the value of PersonalData. func (s *PayoutRequest) GetPersonalData() []PayoutsPersonalData { return s.PersonalData } // GetMetadata returns the value of Metadata. func (s *PayoutRequest) GetMetadata() OptMetadata { return s.Metadata } // SetAmount sets the value of Amount. func (s *PayoutRequest) SetAmount(val PayoutRequestAmount) { s.Amount = val } // SetPayoutDestinationData sets the value of PayoutDestinationData. func (s *PayoutRequest) SetPayoutDestinationData(val OptPayoutRequestPayoutDestinationData) { s.PayoutDestinationData = val } // SetPayoutToken sets the value of PayoutToken. func (s *PayoutRequest) SetPayoutToken(val OptString) { s.PayoutToken = val } // SetPaymentMethodID sets the value of PaymentMethodID. func (s *PayoutRequest) SetPaymentMethodID(val OptString) { s.PaymentMethodID = val } // SetDescription sets the value of Description. func (s *PayoutRequest) SetDescription(val OptString) { s.Description = val } // SetDeal sets the value of Deal. func (s *PayoutRequest) SetDeal(val OptPayoutDealInfo) { s.Deal = val } // SetPersonalData sets the value of PersonalData. func (s *PayoutRequest) SetPersonalData(val []PayoutsPersonalData) { s.PersonalData = val } // SetMetadata sets the value of Metadata. func (s *PayoutRequest) SetMetadata(val OptMetadata) { s.Metadata = val } // Сумма в выбранной валюте. type PayoutRequestAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *PayoutRequestAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *PayoutRequestAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *PayoutRequestAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *PayoutRequestAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // PayoutRequestPayoutDestinationData represents sum type. type PayoutRequestPayoutDestinationData struct { Type PayoutRequestPayoutDestinationDataType // switch on this field PayoutToYooMoneyDestinationData PayoutToYooMoneyDestinationData PayoutToBankCardDestinationData PayoutToBankCardDestinationData PayoutToSbpDestinationData PayoutToSbpDestinationData } // PayoutRequestPayoutDestinationDataType is oneOf type of PayoutRequestPayoutDestinationData. type PayoutRequestPayoutDestinationDataType string // Possible values for PayoutRequestPayoutDestinationDataType. const ( PayoutToYooMoneyDestinationDataPayoutRequestPayoutDestinationData PayoutRequestPayoutDestinationDataType = "PayoutToYooMoneyDestinationData" PayoutToBankCardDestinationDataPayoutRequestPayoutDestinationData PayoutRequestPayoutDestinationDataType = "PayoutToBankCardDestinationData" PayoutToSbpDestinationDataPayoutRequestPayoutDestinationData PayoutRequestPayoutDestinationDataType = "PayoutToSbpDestinationData" ) // IsPayoutToYooMoneyDestinationData reports whether PayoutRequestPayoutDestinationData is PayoutToYooMoneyDestinationData. func (s PayoutRequestPayoutDestinationData) IsPayoutToYooMoneyDestinationData() bool { return s.Type == PayoutToYooMoneyDestinationDataPayoutRequestPayoutDestinationData } // IsPayoutToBankCardDestinationData reports whether PayoutRequestPayoutDestinationData is PayoutToBankCardDestinationData. func (s PayoutRequestPayoutDestinationData) IsPayoutToBankCardDestinationData() bool { return s.Type == PayoutToBankCardDestinationDataPayoutRequestPayoutDestinationData } // IsPayoutToSbpDestinationData reports whether PayoutRequestPayoutDestinationData is PayoutToSbpDestinationData. func (s PayoutRequestPayoutDestinationData) IsPayoutToSbpDestinationData() bool { return s.Type == PayoutToSbpDestinationDataPayoutRequestPayoutDestinationData } // SetPayoutToYooMoneyDestinationData sets PayoutRequestPayoutDestinationData to PayoutToYooMoneyDestinationData. func (s *PayoutRequestPayoutDestinationData) SetPayoutToYooMoneyDestinationData(v PayoutToYooMoneyDestinationData) { s.Type = PayoutToYooMoneyDestinationDataPayoutRequestPayoutDestinationData s.PayoutToYooMoneyDestinationData = v } // GetPayoutToYooMoneyDestinationData returns PayoutToYooMoneyDestinationData and true boolean if PayoutRequestPayoutDestinationData is PayoutToYooMoneyDestinationData. func (s PayoutRequestPayoutDestinationData) GetPayoutToYooMoneyDestinationData() (v PayoutToYooMoneyDestinationData, ok bool) { if !s.IsPayoutToYooMoneyDestinationData() { return v, false } return s.PayoutToYooMoneyDestinationData, true } // NewPayoutToYooMoneyDestinationDataPayoutRequestPayoutDestinationData returns new PayoutRequestPayoutDestinationData from PayoutToYooMoneyDestinationData. func NewPayoutToYooMoneyDestinationDataPayoutRequestPayoutDestinationData(v PayoutToYooMoneyDestinationData) PayoutRequestPayoutDestinationData { var s PayoutRequestPayoutDestinationData s.SetPayoutToYooMoneyDestinationData(v) return s } // SetPayoutToBankCardDestinationData sets PayoutRequestPayoutDestinationData to PayoutToBankCardDestinationData. func (s *PayoutRequestPayoutDestinationData) SetPayoutToBankCardDestinationData(v PayoutToBankCardDestinationData) { s.Type = PayoutToBankCardDestinationDataPayoutRequestPayoutDestinationData s.PayoutToBankCardDestinationData = v } // GetPayoutToBankCardDestinationData returns PayoutToBankCardDestinationData and true boolean if PayoutRequestPayoutDestinationData is PayoutToBankCardDestinationData. func (s PayoutRequestPayoutDestinationData) GetPayoutToBankCardDestinationData() (v PayoutToBankCardDestinationData, ok bool) { if !s.IsPayoutToBankCardDestinationData() { return v, false } return s.PayoutToBankCardDestinationData, true } // NewPayoutToBankCardDestinationDataPayoutRequestPayoutDestinationData returns new PayoutRequestPayoutDestinationData from PayoutToBankCardDestinationData. func NewPayoutToBankCardDestinationDataPayoutRequestPayoutDestinationData(v PayoutToBankCardDestinationData) PayoutRequestPayoutDestinationData { var s PayoutRequestPayoutDestinationData s.SetPayoutToBankCardDestinationData(v) return s } // SetPayoutToSbpDestinationData sets PayoutRequestPayoutDestinationData to PayoutToSbpDestinationData. func (s *PayoutRequestPayoutDestinationData) SetPayoutToSbpDestinationData(v PayoutToSbpDestinationData) { s.Type = PayoutToSbpDestinationDataPayoutRequestPayoutDestinationData s.PayoutToSbpDestinationData = v } // GetPayoutToSbpDestinationData returns PayoutToSbpDestinationData and true boolean if PayoutRequestPayoutDestinationData is PayoutToSbpDestinationData. func (s PayoutRequestPayoutDestinationData) GetPayoutToSbpDestinationData() (v PayoutToSbpDestinationData, ok bool) { if !s.IsPayoutToSbpDestinationData() { return v, false } return s.PayoutToSbpDestinationData, true } // NewPayoutToSbpDestinationDataPayoutRequestPayoutDestinationData returns new PayoutRequestPayoutDestinationData from PayoutToSbpDestinationData. func NewPayoutToSbpDestinationDataPayoutRequestPayoutDestinationData(v PayoutToSbpDestinationData) PayoutRequestPayoutDestinationData { var s PayoutRequestPayoutDestinationData s.SetPayoutToSbpDestinationData(v) return s } // Merged schema. type PayoutSelfEmployed struct { ID SelfEmployedId `json:"id"` } // GetID returns the value of ID. func (s *PayoutSelfEmployed) GetID() SelfEmployedId { return s.ID } // SetID sets the value of ID. func (s *PayoutSelfEmployed) SetID(val SelfEmployedId) { s.ID = val } // Merged schema. // Ref: #/components/schemas/PayoutStatementRecipientPersonalDataRequest type PayoutStatementRecipientPersonalDataRequest struct { Type PersonalDataType `json:"type"` Metadata OptMetadata `json:"metadata"` LastName LastName `json:"last_name"` FirstName FirstName `json:"first_name"` MiddleName OptMiddleName `json:"middle_name"` // Дата рождения. Передается в формате ISO 8601: https://en.wikipedia. // org/wiki/ISO_8601. Birthdate time.Time `json:"birthdate"` } // GetType returns the value of Type. func (s *PayoutStatementRecipientPersonalDataRequest) GetType() PersonalDataType { return s.Type } // GetMetadata returns the value of Metadata. func (s *PayoutStatementRecipientPersonalDataRequest) GetMetadata() OptMetadata { return s.Metadata } // GetLastName returns the value of LastName. func (s *PayoutStatementRecipientPersonalDataRequest) GetLastName() LastName { return s.LastName } // GetFirstName returns the value of FirstName. func (s *PayoutStatementRecipientPersonalDataRequest) GetFirstName() FirstName { return s.FirstName } // GetMiddleName returns the value of MiddleName. func (s *PayoutStatementRecipientPersonalDataRequest) GetMiddleName() OptMiddleName { return s.MiddleName } // GetBirthdate returns the value of Birthdate. func (s *PayoutStatementRecipientPersonalDataRequest) GetBirthdate() time.Time { return s.Birthdate } // SetType sets the value of Type. func (s *PayoutStatementRecipientPersonalDataRequest) SetType(val PersonalDataType) { s.Type = val } // SetMetadata sets the value of Metadata. func (s *PayoutStatementRecipientPersonalDataRequest) SetMetadata(val OptMetadata) { s.Metadata = val } // SetLastName sets the value of LastName. func (s *PayoutStatementRecipientPersonalDataRequest) SetLastName(val LastName) { s.LastName = val } // SetFirstName sets the value of FirstName. func (s *PayoutStatementRecipientPersonalDataRequest) SetFirstName(val FirstName) { s.FirstName = val } // SetMiddleName sets the value of MiddleName. func (s *PayoutStatementRecipientPersonalDataRequest) SetMiddleName(val OptMiddleName) { s.MiddleName = val } // SetBirthdate sets the value of Birthdate. func (s *PayoutStatementRecipientPersonalDataRequest) SetBirthdate(val time.Time) { s.Birthdate = val } // Статус выплаты. Возможные значения: pending — выплата // создана, но деньги еще не поступили на указанное // платежное средство пользователя (например, ЮKassa ждет // подтверждения от эквайера, что перевод успешен); succeeded // — выплата успешно завершена, деньги переведены на // платежное средство пользователя (финальный и // неизменяемый статус); canceled — выплата отменена, // инициатор и причина отмены указаны в объекте // cancellation_details (финальный и неизменяемый статус). // Ref: #/components/schemas/PayoutStatus type PayoutStatus string const ( PayoutStatusPending PayoutStatus = "pending" PayoutStatusSucceeded PayoutStatus = "succeeded" PayoutStatusCanceled PayoutStatus = "canceled" ) // AllValues returns all PayoutStatus values. func (PayoutStatus) AllValues() []PayoutStatus { return []PayoutStatus{ PayoutStatusPending, PayoutStatusSucceeded, PayoutStatusCanceled, } } // MarshalText implements encoding.TextMarshaler. func (s PayoutStatus) MarshalText() ([]byte, error) { switch s { case PayoutStatusPending: return []byte(s), nil case PayoutStatusSucceeded: return []byte(s), nil case PayoutStatusCanceled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PayoutStatus) UnmarshalText(data []byte) error { switch PayoutStatus(data) { case PayoutStatusPending: *s = PayoutStatusPending return nil case PayoutStatusSucceeded: *s = PayoutStatusSucceeded return nil case PayoutStatusCanceled: *s = PayoutStatusCanceled return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/PayoutToBankCardDestinationData type PayoutToBankCardDestinationData struct { Type PayoutDestinationDataType `json:"type"` Card CardDataForPayoutDestination `json:"card"` } // GetType returns the value of Type. func (s *PayoutToBankCardDestinationData) GetType() PayoutDestinationDataType { return s.Type } // GetCard returns the value of Card. func (s *PayoutToBankCardDestinationData) GetCard() CardDataForPayoutDestination { return s.Card } // SetType sets the value of Type. func (s *PayoutToBankCardDestinationData) SetType(val PayoutDestinationDataType) { s.Type = val } // SetCard sets the value of Card. func (s *PayoutToBankCardDestinationData) SetCard(val CardDataForPayoutDestination) { s.Card = val } // Merged schema. // Ref: #/components/schemas/PayoutToCardDestination type PayoutToCardDestination struct { Type PayoutDestinationType `json:"type"` Card OptPayoutCardData `json:"card"` } // GetType returns the value of Type. func (s *PayoutToCardDestination) GetType() PayoutDestinationType { return s.Type } // GetCard returns the value of Card. func (s *PayoutToCardDestination) GetCard() OptPayoutCardData { return s.Card } // SetType sets the value of Type. func (s *PayoutToCardDestination) SetType(val PayoutDestinationType) { s.Type = val } // SetCard sets the value of Card. func (s *PayoutToCardDestination) SetCard(val OptPayoutCardData) { s.Card = val } // Merged schema. // Ref: #/components/schemas/PayoutToSbpDestination type PayoutToSbpDestination struct { Type PayoutDestinationType `json:"type"` Phone string `json:"phone"` // Идентификатор участника СБП — банка или платежного // сервиса, подключенного к сервису. BankID string `json:"bank_id"` // Проверка получателя выплаты: https://yookassa. // ru/developers/payouts/scenario-extensions/recipient-check: true — выплата // проходила с проверкой получателя, false — выплата // проходила без проверки получателя. RecipientChecked bool `json:"recipient_checked"` } // GetType returns the value of Type. func (s *PayoutToSbpDestination) GetType() PayoutDestinationType { return s.Type } // GetPhone returns the value of Phone. func (s *PayoutToSbpDestination) GetPhone() string { return s.Phone } // GetBankID returns the value of BankID. func (s *PayoutToSbpDestination) GetBankID() string { return s.BankID } // GetRecipientChecked returns the value of RecipientChecked. func (s *PayoutToSbpDestination) GetRecipientChecked() bool { return s.RecipientChecked } // SetType sets the value of Type. func (s *PayoutToSbpDestination) SetType(val PayoutDestinationType) { s.Type = val } // SetPhone sets the value of Phone. func (s *PayoutToSbpDestination) SetPhone(val string) { s.Phone = val } // SetBankID sets the value of BankID. func (s *PayoutToSbpDestination) SetBankID(val string) { s.BankID = val } // SetRecipientChecked sets the value of RecipientChecked. func (s *PayoutToSbpDestination) SetRecipientChecked(val bool) { s.RecipientChecked = val } // Merged schema. // Ref: #/components/schemas/PayoutToSbpDestinationData type PayoutToSbpDestinationData struct { Type PayoutDestinationDataType `json:"type"` Phone string `json:"phone"` BankID string `json:"bank_id"` } // GetType returns the value of Type. func (s *PayoutToSbpDestinationData) GetType() PayoutDestinationDataType { return s.Type } // GetPhone returns the value of Phone. func (s *PayoutToSbpDestinationData) GetPhone() string { return s.Phone } // GetBankID returns the value of BankID. func (s *PayoutToSbpDestinationData) GetBankID() string { return s.BankID } // SetType sets the value of Type. func (s *PayoutToSbpDestinationData) SetType(val PayoutDestinationDataType) { s.Type = val } // SetPhone sets the value of Phone. func (s *PayoutToSbpDestinationData) SetPhone(val string) { s.Phone = val } // SetBankID sets the value of BankID. func (s *PayoutToSbpDestinationData) SetBankID(val string) { s.BankID = val } // Merged schema. // Ref: #/components/schemas/PayoutToYooMoneyDestination type PayoutToYooMoneyDestination struct { Type PayoutDestinationType `json:"type"` AccountNumber YooMoneyAccountNumber `json:"account_number"` } // GetType returns the value of Type. func (s *PayoutToYooMoneyDestination) GetType() PayoutDestinationType { return s.Type } // GetAccountNumber returns the value of AccountNumber. func (s *PayoutToYooMoneyDestination) GetAccountNumber() YooMoneyAccountNumber { return s.AccountNumber } // SetType sets the value of Type. func (s *PayoutToYooMoneyDestination) SetType(val PayoutDestinationType) { s.Type = val } // SetAccountNumber sets the value of AccountNumber. func (s *PayoutToYooMoneyDestination) SetAccountNumber(val YooMoneyAccountNumber) { s.AccountNumber = val } // Merged schema. // Ref: #/components/schemas/PayoutToYooMoneyDestinationData type PayoutToYooMoneyDestinationData struct { Type PayoutDestinationDataType `json:"type"` AccountNumber string `json:"account_number"` } // GetType returns the value of Type. func (s *PayoutToYooMoneyDestinationData) GetType() PayoutDestinationDataType { return s.Type } // GetAccountNumber returns the value of AccountNumber. func (s *PayoutToYooMoneyDestinationData) GetAccountNumber() string { return s.AccountNumber } // SetType sets the value of Type. func (s *PayoutToYooMoneyDestinationData) SetType(val PayoutDestinationDataType) { s.Type = val } // SetAccountNumber sets the value of AccountNumber. func (s *PayoutToYooMoneyDestinationData) SetAccountNumber(val string) { s.AccountNumber = val } type PayoutsGetInternalServerError TooManyRequests func (*PayoutsGetInternalServerError) payoutsGetRes() {} type PayoutsGetTooManyRequests TooManyRequests func (*PayoutsGetTooManyRequests) payoutsGetRes() {} // Список выплат. Выплаты отсортированы по времени // создания в порядке убывания (от новых к старым). Если // результатов больше, чем задано в limit, список будет // выводиться фрагментами. В этом случае в ответе на // запрос вернется фрагмент списка и параметр next_cursor с // указателем на следующий фрагмент. // Ref: #/components/schemas/PayoutsList type PayoutsList struct { // Формат выдачи результатов запроса. Возможное // значение: list (список). Type PayoutsListType `json:"type"` Items []Payout `json:"items"` NextCursor OptNextCursor `json:"next_cursor"` } // GetType returns the value of Type. func (s *PayoutsList) GetType() PayoutsListType { return s.Type } // GetItems returns the value of Items. func (s *PayoutsList) GetItems() []Payout { return s.Items } // GetNextCursor returns the value of NextCursor. func (s *PayoutsList) GetNextCursor() OptNextCursor { return s.NextCursor } // SetType sets the value of Type. func (s *PayoutsList) SetType(val PayoutsListType) { s.Type = val } // SetItems sets the value of Items. func (s *PayoutsList) SetItems(val []Payout) { s.Items = val } // SetNextCursor sets the value of NextCursor. func (s *PayoutsList) SetNextCursor(val OptNextCursor) { s.NextCursor = val } func (*PayoutsList) payoutsGetRes() {} func (*PayoutsList) payoutsSearchGetRes() {} // Формат выдачи результатов запроса. Возможное // значение: list (список). type PayoutsListType string const ( PayoutsListTypeList PayoutsListType = "list" ) // AllValues returns all PayoutsListType values. func (PayoutsListType) AllValues() []PayoutsListType { return []PayoutsListType{ PayoutsListTypeList, } } // MarshalText implements encoding.TextMarshaler. func (s PayoutsListType) MarshalText() ([]byte, error) { switch s { case PayoutsListTypeList: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PayoutsListType) UnmarshalText(data []byte) error { switch PayoutsListType(data) { case PayoutsListTypeList: *s = PayoutsListTypeList return nil default: return errors.Errorf("invalid value: %q", data) } } type PayoutsPayoutIDGetInternalServerError TooManyRequests func (*PayoutsPayoutIDGetInternalServerError) payoutsPayoutIDGetRes() {} type PayoutsPayoutIDGetTooManyRequests TooManyRequests func (*PayoutsPayoutIDGetTooManyRequests) payoutsPayoutIDGetRes() {} // Персональные данные получателя выплаты. Только для // обычных выплат. Необходимо передавать в этих // сценариях: * выплаты с проверкой получателя: https://yookassa. // ru/developers/payouts/scenario-extensions/recipient-check; * выплаты с передачей // данных получателя для выписок из реестра: https://yookassa. // ru/developers/payouts/scenario-extensions/recipient-data-send. // Ref: #/components/schemas/PayoutsPersonalData type PayoutsPersonalData struct { ID PersonalDataId `json:"id"` } // GetID returns the value of ID. func (s *PayoutsPersonalData) GetID() PersonalDataId { return s.ID } // SetID sets the value of ID. func (s *PayoutsPersonalData) SetID(val PersonalDataId) { s.ID = val } type PayoutsPostInternalServerError TooManyRequests func (*PayoutsPostInternalServerError) payoutsPostRes() {} type PayoutsPostTooManyRequests TooManyRequests func (*PayoutsPostTooManyRequests) payoutsPostRes() {} type PayoutsSearchGetInternalServerError TooManyRequests func (*PayoutsSearchGetInternalServerError) payoutsSearchGetRes() {} type PayoutsSearchGetTooManyRequests TooManyRequests func (*PayoutsSearchGetTooManyRequests) payoutsSearchGetRes() {} // Personal data object (PersonalData) contains all the relevant information about the personal // information of the user saved in YooMoney. // Ref: #/components/schemas/PersonalData type PersonalData struct { ID PersonalDataId `json:"id"` Type PersonalDataType `json:"type"` // Статус персональных данных. Возможные значения: // waiting_for_operation — данные сохранены, но не использованы // при проведении выплаты; active — данные сохранены и // использованы при проведении выплаты; данные можно // использовать повторно до срока, указанного в // параметре expires_at; canceled — хранение данных отменено, // данные удалены, инициатор и причина отмены указаны в // объекте cancellation_details (финальный и неизменяемый статус). // Жизненный цикл персональных данных зависит от // назначения данных: передача данных получателя // выплаты: https://yookassa. // ru/developers/payouts/scenario-extensions/recipient-data-send#lifecircle для выписки // из реестра или проверка получателя: https://yookassa. // ru/developers/payouts/scenario-extensions/recipient-check#lifecircle при выплатах // через СБП. Status PersonalDataStatus `json:"status"` CancellationDetails OptPersonalDataCancellationDetails `json:"cancellation_details"` // Время создания персональных данных. Указывается по // UTC: https://ru.wikipedia. // org/wiki/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F и передается в формате ISO 8601: https://en.wikipedia.org/wiki/ISO_8601. Пример: 2017-11-03T11:52:31.827Z. CreatedAt time.Time `json:"created_at"` // Срок жизни объекта персональных данных — время, до // которого вы можете использовать персональные данные // при проведении операций. Указывается только для // объекта в статусе active. Указывается по UTC: https://ru.wikipedia. // org/wiki/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F и передается в формате ISO 8601: https://en.wikipedia.org/wiki/ISO_8601. Пример: 2017-11-03T11:52:31.827Z. ExpiresAt OptDateTime `json:"expires_at"` Metadata OptMetadata `json:"metadata"` } // GetID returns the value of ID. func (s *PersonalData) GetID() PersonalDataId { return s.ID } // GetType returns the value of Type. func (s *PersonalData) GetType() PersonalDataType { return s.Type } // GetStatus returns the value of Status. func (s *PersonalData) GetStatus() PersonalDataStatus { return s.Status } // GetCancellationDetails returns the value of CancellationDetails. func (s *PersonalData) GetCancellationDetails() OptPersonalDataCancellationDetails { return s.CancellationDetails } // GetCreatedAt returns the value of CreatedAt. func (s *PersonalData) GetCreatedAt() time.Time { return s.CreatedAt } // GetExpiresAt returns the value of ExpiresAt. func (s *PersonalData) GetExpiresAt() OptDateTime { return s.ExpiresAt } // GetMetadata returns the value of Metadata. func (s *PersonalData) GetMetadata() OptMetadata { return s.Metadata } // SetID sets the value of ID. func (s *PersonalData) SetID(val PersonalDataId) { s.ID = val } // SetType sets the value of Type. func (s *PersonalData) SetType(val PersonalDataType) { s.Type = val } // SetStatus sets the value of Status. func (s *PersonalData) SetStatus(val PersonalDataStatus) { s.Status = val } // SetCancellationDetails sets the value of CancellationDetails. func (s *PersonalData) SetCancellationDetails(val OptPersonalDataCancellationDetails) { s.CancellationDetails = val } // SetCreatedAt sets the value of CreatedAt. func (s *PersonalData) SetCreatedAt(val time.Time) { s.CreatedAt = val } // SetExpiresAt sets the value of ExpiresAt. func (s *PersonalData) SetExpiresAt(val OptDateTime) { s.ExpiresAt = val } // SetMetadata sets the value of Metadata. func (s *PersonalData) SetMetadata(val OptMetadata) { s.Metadata = val } func (*PersonalData) personalDataPersonalDataIDGetRes() {} func (*PersonalData) personalDataPostRes() {} // Комментарий к статусу canceled: кто и по какой причине // аннулировал хранение данных. // Ref: #/components/schemas/PersonalDataCancellationDetails type PersonalDataCancellationDetails struct { // Участник процесса, который принял решение о // прекращении хранения персональных данных. Возможное // значение: yoo_money — ЮKassa. Party PersonalDataCancellationDetailsParty `json:"party"` // Причина прекращения хранения персональных данных. // Возможное значение: expired_by_timeout — истек срок хранения // или использования персональных данных. Reason PersonalDataCancellationDetailsReason `json:"reason"` } // GetParty returns the value of Party. func (s *PersonalDataCancellationDetails) GetParty() PersonalDataCancellationDetailsParty { return s.Party } // GetReason returns the value of Reason. func (s *PersonalDataCancellationDetails) GetReason() PersonalDataCancellationDetailsReason { return s.Reason } // SetParty sets the value of Party. func (s *PersonalDataCancellationDetails) SetParty(val PersonalDataCancellationDetailsParty) { s.Party = val } // SetReason sets the value of Reason. func (s *PersonalDataCancellationDetails) SetReason(val PersonalDataCancellationDetailsReason) { s.Reason = val } // Участник процесса, который принял решение о // прекращении хранения персональных данных. Возможное // значение: yoo_money — ЮKassa. type PersonalDataCancellationDetailsParty string const ( PersonalDataCancellationDetailsPartyYooMoney PersonalDataCancellationDetailsParty = "yoo_money" ) // AllValues returns all PersonalDataCancellationDetailsParty values. func (PersonalDataCancellationDetailsParty) AllValues() []PersonalDataCancellationDetailsParty { return []PersonalDataCancellationDetailsParty{ PersonalDataCancellationDetailsPartyYooMoney, } } // MarshalText implements encoding.TextMarshaler. func (s PersonalDataCancellationDetailsParty) MarshalText() ([]byte, error) { switch s { case PersonalDataCancellationDetailsPartyYooMoney: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PersonalDataCancellationDetailsParty) UnmarshalText(data []byte) error { switch PersonalDataCancellationDetailsParty(data) { case PersonalDataCancellationDetailsPartyYooMoney: *s = PersonalDataCancellationDetailsPartyYooMoney return nil default: return errors.Errorf("invalid value: %q", data) } } // Причина прекращения хранения персональных данных. // Возможное значение: expired_by_timeout — истек срок хранения // или использования персональных данных. type PersonalDataCancellationDetailsReason string const ( PersonalDataCancellationDetailsReasonExpiredByTimeout PersonalDataCancellationDetailsReason = "expired_by_timeout" ) // AllValues returns all PersonalDataCancellationDetailsReason values. func (PersonalDataCancellationDetailsReason) AllValues() []PersonalDataCancellationDetailsReason { return []PersonalDataCancellationDetailsReason{ PersonalDataCancellationDetailsReasonExpiredByTimeout, } } // MarshalText implements encoding.TextMarshaler. func (s PersonalDataCancellationDetailsReason) MarshalText() ([]byte, error) { switch s { case PersonalDataCancellationDetailsReasonExpiredByTimeout: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PersonalDataCancellationDetailsReason) UnmarshalText(data []byte) error { switch PersonalDataCancellationDetailsReason(data) { case PersonalDataCancellationDetailsReasonExpiredByTimeout: *s = PersonalDataCancellationDetailsReasonExpiredByTimeout return nil default: return errors.Errorf("invalid value: %q", data) } } type PersonalDataId string type PersonalDataPersonalDataIDGetInternalServerError TooManyRequests func (*PersonalDataPersonalDataIDGetInternalServerError) personalDataPersonalDataIDGetRes() {} type PersonalDataPersonalDataIDGetTooManyRequests TooManyRequests func (*PersonalDataPersonalDataIDGetTooManyRequests) personalDataPersonalDataIDGetRes() {} type PersonalDataPostInternalServerError TooManyRequests func (*PersonalDataPostInternalServerError) personalDataPostRes() {} // PersonalDataPostReq represents sum type. type PersonalDataPostReq struct { Type PersonalDataPostReqType // switch on this field SbpPayoutRecipientPersonalDataRequest SbpPayoutRecipientPersonalDataRequest PayoutStatementRecipientPersonalDataRequest PayoutStatementRecipientPersonalDataRequest } // PersonalDataPostReqType is oneOf type of PersonalDataPostReq. type PersonalDataPostReqType string // Possible values for PersonalDataPostReqType. const ( SbpPayoutRecipientPersonalDataRequestPersonalDataPostReq PersonalDataPostReqType = "sbp_payout_recipient" PayoutStatementRecipientPersonalDataRequestPersonalDataPostReq PersonalDataPostReqType = "payout_statement_recipient" ) // IsSbpPayoutRecipientPersonalDataRequest reports whether PersonalDataPostReq is SbpPayoutRecipientPersonalDataRequest. func (s PersonalDataPostReq) IsSbpPayoutRecipientPersonalDataRequest() bool { return s.Type == SbpPayoutRecipientPersonalDataRequestPersonalDataPostReq } // IsPayoutStatementRecipientPersonalDataRequest reports whether PersonalDataPostReq is PayoutStatementRecipientPersonalDataRequest. func (s PersonalDataPostReq) IsPayoutStatementRecipientPersonalDataRequest() bool { return s.Type == PayoutStatementRecipientPersonalDataRequestPersonalDataPostReq } // SetSbpPayoutRecipientPersonalDataRequest sets PersonalDataPostReq to SbpPayoutRecipientPersonalDataRequest. func (s *PersonalDataPostReq) SetSbpPayoutRecipientPersonalDataRequest(v SbpPayoutRecipientPersonalDataRequest) { s.Type = SbpPayoutRecipientPersonalDataRequestPersonalDataPostReq s.SbpPayoutRecipientPersonalDataRequest = v } // GetSbpPayoutRecipientPersonalDataRequest returns SbpPayoutRecipientPersonalDataRequest and true boolean if PersonalDataPostReq is SbpPayoutRecipientPersonalDataRequest. func (s PersonalDataPostReq) GetSbpPayoutRecipientPersonalDataRequest() (v SbpPayoutRecipientPersonalDataRequest, ok bool) { if !s.IsSbpPayoutRecipientPersonalDataRequest() { return v, false } return s.SbpPayoutRecipientPersonalDataRequest, true } // NewSbpPayoutRecipientPersonalDataRequestPersonalDataPostReq returns new PersonalDataPostReq from SbpPayoutRecipientPersonalDataRequest. func NewSbpPayoutRecipientPersonalDataRequestPersonalDataPostReq(v SbpPayoutRecipientPersonalDataRequest) PersonalDataPostReq { var s PersonalDataPostReq s.SetSbpPayoutRecipientPersonalDataRequest(v) return s } // SetPayoutStatementRecipientPersonalDataRequest sets PersonalDataPostReq to PayoutStatementRecipientPersonalDataRequest. func (s *PersonalDataPostReq) SetPayoutStatementRecipientPersonalDataRequest(v PayoutStatementRecipientPersonalDataRequest) { s.Type = PayoutStatementRecipientPersonalDataRequestPersonalDataPostReq s.PayoutStatementRecipientPersonalDataRequest = v } // GetPayoutStatementRecipientPersonalDataRequest returns PayoutStatementRecipientPersonalDataRequest and true boolean if PersonalDataPostReq is PayoutStatementRecipientPersonalDataRequest. func (s PersonalDataPostReq) GetPayoutStatementRecipientPersonalDataRequest() (v PayoutStatementRecipientPersonalDataRequest, ok bool) { if !s.IsPayoutStatementRecipientPersonalDataRequest() { return v, false } return s.PayoutStatementRecipientPersonalDataRequest, true } // NewPayoutStatementRecipientPersonalDataRequestPersonalDataPostReq returns new PersonalDataPostReq from PayoutStatementRecipientPersonalDataRequest. func NewPayoutStatementRecipientPersonalDataRequestPersonalDataPostReq(v PayoutStatementRecipientPersonalDataRequest) PersonalDataPostReq { var s PersonalDataPostReq s.SetPayoutStatementRecipientPersonalDataRequest(v) return s } type PersonalDataPostTooManyRequests TooManyRequests func (*PersonalDataPostTooManyRequests) personalDataPostRes() {} // Статус персональных данных. Возможные значения: // waiting_for_operation — данные сохранены, но не использованы // при проведении выплаты; active — данные сохранены и // использованы при проведении выплаты; данные можно // использовать повторно до срока, указанного в // параметре expires_at; canceled — хранение данных отменено, // данные удалены, инициатор и причина отмены указаны в // объекте cancellation_details (финальный и неизменяемый статус). // Жизненный цикл персональных данных зависит от // назначения данных: передача данных получателя // выплаты: https://yookassa. // ru/developers/payouts/scenario-extensions/recipient-data-send#lifecircle для выписки // из реестра или проверка получателя: https://yookassa. // ru/developers/payouts/scenario-extensions/recipient-check#lifecircle при выплатах // через СБП. type PersonalDataStatus string const ( PersonalDataStatusWaitingForOperation PersonalDataStatus = "waiting_for_operation" PersonalDataStatusActive PersonalDataStatus = "active" PersonalDataStatusCanceled PersonalDataStatus = "canceled" ) // AllValues returns all PersonalDataStatus values. func (PersonalDataStatus) AllValues() []PersonalDataStatus { return []PersonalDataStatus{ PersonalDataStatusWaitingForOperation, PersonalDataStatusActive, PersonalDataStatusCanceled, } } // MarshalText implements encoding.TextMarshaler. func (s PersonalDataStatus) MarshalText() ([]byte, error) { switch s { case PersonalDataStatusWaitingForOperation: return []byte(s), nil case PersonalDataStatusActive: return []byte(s), nil case PersonalDataStatusCanceled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PersonalDataStatus) UnmarshalText(data []byte) error { switch PersonalDataStatus(data) { case PersonalDataStatusWaitingForOperation: *s = PersonalDataStatusWaitingForOperation return nil case PersonalDataStatusActive: *s = PersonalDataStatusActive return nil case PersonalDataStatusCanceled: *s = PersonalDataStatusCanceled return nil default: return errors.Errorf("invalid value: %q", data) } } // Тип персональных данных — цель, для которой вы будете // использовать данные. Возможные значение: sbp_payout_recipient // — выплаты с проверкой получателя: https://yookassa. // ru/developers/payouts/scenario-extensions/recipient-check(только для выплат // через СБП); payout_statement_recipient — выплаты с передачей // данных получателя выплаты для выписок из реестра: // https://yookassa.ru/developers/payouts/scenario-extensions/recipient-data-send. // Ref: #/components/schemas/PersonalDataType type PersonalDataType string const ( PersonalDataTypePayoutStatementRecipient PersonalDataType = "payout_statement_recipient" PersonalDataTypeSbpPayoutRecipient PersonalDataType = "sbp_payout_recipient" ) // AllValues returns all PersonalDataType values. func (PersonalDataType) AllValues() []PersonalDataType { return []PersonalDataType{ PersonalDataTypePayoutStatementRecipient, PersonalDataTypeSbpPayoutRecipient, } } // MarshalText implements encoding.TextMarshaler. func (s PersonalDataType) MarshalText() ([]byte, error) { switch s { case PersonalDataTypePayoutStatementRecipient: return []byte(s), nil case PersonalDataTypeSbpPayoutRecipient: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PersonalDataType) UnmarshalText(data []byte) error { switch PersonalDataType(data) { case PersonalDataTypePayoutStatementRecipient: *s = PersonalDataTypePayoutStatementRecipient return nil case PersonalDataTypeSbpPayoutRecipient: *s = PersonalDataTypeSbpPayoutRecipient return nil default: return errors.Errorf("invalid value: %q", data) } } type PostReceiptData jx.Raw // Receipt object (Receipt) contains all the relevant information about the receipt. // Ref: #/components/schemas/Receipt type Receipt struct { ID ReceiptId `json:"id"` Type ReceiptType `json:"type"` // Идентификатор платежа: https://yookassa.ru/developers/api#payment_object, // для которого был сформирован чек. PaymentID OptString `json:"payment_id"` // Идентификатор возврата: https://yookassa.ru/developers/api#refund_object, // для которого был сформирован чек. Отсутствует в чеке // платежа. RefundID OptString `json:"refund_id"` Status ReceiptStatus `json:"status"` // Номер фискального документа. FiscalDocumentNumber OptString `json:"fiscal_document_number"` // Номер фискального накопителя в кассовом аппарате. FiscalStorageNumber OptString `json:"fiscal_storage_number"` // Фискальный признак чека. Формируется фискальным // накопителем на основе данных, переданных для // регистрации чека. FiscalAttribute OptString `json:"fiscal_attribute"` // Дата и время формирования чека в фискальном // накопителе. Указывается в формате ISO 8601: https://en.wikipedia. // org/wiki/ISO_8601. RegisteredAt OptDateTime `json:"registered_at"` // Идентификатор чека в онлайн-кассе. Присутствует, если // чек удалось зарегистрировать. FiscalProviderID OptString `json:"fiscal_provider_id"` // List of products in the receipt: no more than 80 items for Receipts from YooMoney: // https://yookassa.ru/developers/payment-acceptance/receipts/54fz/yoomoney/basics, no more than 100 // items for third-party online sales registers: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/basics. Items []ReceiptItem `json:"items"` // Признак проведения платежа в интернете (тег в 54 ФЗ — // 1125) — указывает на оплату через интернет. Возможные // значения: true — оплата прошла онлайн, через интернет // (например, на вашем сайте или в приложении); false — // оплата прошла офлайн, при личном взаимодействии // (например, в торговой точке или при встрече с // курьером). По умолчанию true. Если вы принимаете платежи // офлайн, передайте в запросе значение false. Internet OptBool `json:"internet"` // Перечень совершенных расчетов. Settlements []Settlement `json:"settlements"` OnBehalfOf OptString `json:"on_behalf_of"` TaxSystemCode OptInt32 `json:"tax_system_code"` // Номер часовой зоны для адреса, по которому вы // принимаете платежи (тег в 54 ФЗ — 1011). Указывается, // только если в чеке есть товары, которые подлежат // обязательной маркировке (в items.mark_code_info передается // параметр gs_1m, short или fur). Перечень возможных значений: // для Чеков от ЮKassa: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/yoomoney/parameters-values#timezone; для // сторонних онлайн-касс: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/parameters-values#timezone. Timezone OptInt `json:"timezone"` // Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260). ReceiptIndustryDetails []IndustryDetails `json:"receipt_industry_details"` ReceiptOperationalDetails OptReceiptReceiptOperationalDetails `json:"receipt_operational_details"` } // GetID returns the value of ID. func (s *Receipt) GetID() ReceiptId { return s.ID } // GetType returns the value of Type. func (s *Receipt) GetType() ReceiptType { return s.Type } // GetPaymentID returns the value of PaymentID. func (s *Receipt) GetPaymentID() OptString { return s.PaymentID } // GetRefundID returns the value of RefundID. func (s *Receipt) GetRefundID() OptString { return s.RefundID } // GetStatus returns the value of Status. func (s *Receipt) GetStatus() ReceiptStatus { return s.Status } // GetFiscalDocumentNumber returns the value of FiscalDocumentNumber. func (s *Receipt) GetFiscalDocumentNumber() OptString { return s.FiscalDocumentNumber } // GetFiscalStorageNumber returns the value of FiscalStorageNumber. func (s *Receipt) GetFiscalStorageNumber() OptString { return s.FiscalStorageNumber } // GetFiscalAttribute returns the value of FiscalAttribute. func (s *Receipt) GetFiscalAttribute() OptString { return s.FiscalAttribute } // GetRegisteredAt returns the value of RegisteredAt. func (s *Receipt) GetRegisteredAt() OptDateTime { return s.RegisteredAt } // GetFiscalProviderID returns the value of FiscalProviderID. func (s *Receipt) GetFiscalProviderID() OptString { return s.FiscalProviderID } // GetItems returns the value of Items. func (s *Receipt) GetItems() []ReceiptItem { return s.Items } // GetInternet returns the value of Internet. func (s *Receipt) GetInternet() OptBool { return s.Internet } // GetSettlements returns the value of Settlements. func (s *Receipt) GetSettlements() []Settlement { return s.Settlements } // GetOnBehalfOf returns the value of OnBehalfOf. func (s *Receipt) GetOnBehalfOf() OptString { return s.OnBehalfOf } // GetTaxSystemCode returns the value of TaxSystemCode. func (s *Receipt) GetTaxSystemCode() OptInt32 { return s.TaxSystemCode } // GetTimezone returns the value of Timezone. func (s *Receipt) GetTimezone() OptInt { return s.Timezone } // GetReceiptIndustryDetails returns the value of ReceiptIndustryDetails. func (s *Receipt) GetReceiptIndustryDetails() []IndustryDetails { return s.ReceiptIndustryDetails } // GetReceiptOperationalDetails returns the value of ReceiptOperationalDetails. func (s *Receipt) GetReceiptOperationalDetails() OptReceiptReceiptOperationalDetails { return s.ReceiptOperationalDetails } // SetID sets the value of ID. func (s *Receipt) SetID(val ReceiptId) { s.ID = val } // SetType sets the value of Type. func (s *Receipt) SetType(val ReceiptType) { s.Type = val } // SetPaymentID sets the value of PaymentID. func (s *Receipt) SetPaymentID(val OptString) { s.PaymentID = val } // SetRefundID sets the value of RefundID. func (s *Receipt) SetRefundID(val OptString) { s.RefundID = val } // SetStatus sets the value of Status. func (s *Receipt) SetStatus(val ReceiptStatus) { s.Status = val } // SetFiscalDocumentNumber sets the value of FiscalDocumentNumber. func (s *Receipt) SetFiscalDocumentNumber(val OptString) { s.FiscalDocumentNumber = val } // SetFiscalStorageNumber sets the value of FiscalStorageNumber. func (s *Receipt) SetFiscalStorageNumber(val OptString) { s.FiscalStorageNumber = val } // SetFiscalAttribute sets the value of FiscalAttribute. func (s *Receipt) SetFiscalAttribute(val OptString) { s.FiscalAttribute = val } // SetRegisteredAt sets the value of RegisteredAt. func (s *Receipt) SetRegisteredAt(val OptDateTime) { s.RegisteredAt = val } // SetFiscalProviderID sets the value of FiscalProviderID. func (s *Receipt) SetFiscalProviderID(val OptString) { s.FiscalProviderID = val } // SetItems sets the value of Items. func (s *Receipt) SetItems(val []ReceiptItem) { s.Items = val } // SetInternet sets the value of Internet. func (s *Receipt) SetInternet(val OptBool) { s.Internet = val } // SetSettlements sets the value of Settlements. func (s *Receipt) SetSettlements(val []Settlement) { s.Settlements = val } // SetOnBehalfOf sets the value of OnBehalfOf. func (s *Receipt) SetOnBehalfOf(val OptString) { s.OnBehalfOf = val } // SetTaxSystemCode sets the value of TaxSystemCode. func (s *Receipt) SetTaxSystemCode(val OptInt32) { s.TaxSystemCode = val } // SetTimezone sets the value of Timezone. func (s *Receipt) SetTimezone(val OptInt) { s.Timezone = val } // SetReceiptIndustryDetails sets the value of ReceiptIndustryDetails. func (s *Receipt) SetReceiptIndustryDetails(val []IndustryDetails) { s.ReceiptIndustryDetails = val } // SetReceiptOperationalDetails sets the value of ReceiptOperationalDetails. func (s *Receipt) SetReceiptOperationalDetails(val OptReceiptReceiptOperationalDetails) { s.ReceiptOperationalDetails = val } func (*Receipt) receiptsPostRes() {} func (*Receipt) receiptsReceiptIDGetRes() {} // Data for creating a receipt. The parameter is specified if: you are a company or a sole proprietor, // // and you use Receipts from YooMoney: https://yookassa. // // ru/developers/payment-acceptance/receipts/54fz/yoomoney/basics; you are a company or a sole // proprietor, and you use the third-party sales register: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/basics and send data for creating // receipts under one of the following scenarios: Payment and receipt at the same time: // https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/basics#payment-and-receipt or // Payment after receipt: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/basics#payment-after-receipt. // Ref: #/components/schemas/ReceiptData type ReceiptData struct { Customer OptReceiptDataCustomer `json:"customer"` // List of products in an order. If you use Receipts from YooMoney, you can specify up to 80 items. // If you use a third-party online sales register, you can specify up to 100 items. Items []ReceiptDataItem `json:"items"` // Признак проведения платежа в интернете (тег в 54 ФЗ — // 1125) — указывает на оплату через интернет. Возможные // значения: true — оплата прошла онлайн, через интернет // (например, на вашем сайте или в приложении); false — // оплата прошла офлайн, при личном взаимодействии // (например, в торговой точке или при встрече с // курьером). По умолчанию true. Если вы принимаете платежи // офлайн, передайте в запросе значение false. Internet OptBool `json:"internet"` TaxSystemCode OptTaxSystemCode `json:"tax_system_code"` // Номер часовой зоны для адреса, по которому вы // принимаете платежи (тег в 54 ФЗ — 1011). Указывается, // только если в чеке есть товары, которые подлежат // обязательной маркировке (в items.mark_code_info передается // параметр gs_1m, short или fur). Перечень возможных значений: // для Чеков от ЮKassa: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/yoomoney/parameters-values#timezone; для // сторонних онлайн-касс: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/parameters-values#timezone. Timezone OptInt `json:"timezone"` // Отраслевой реквизит чека (тег в 54 ФЗ — 1261). Можно // передавать, если используете Чеки от ЮKassa или // онлайн-кассу, обновленную до ФФД 1.2. ReceiptIndustryDetails []IndustryDetails `json:"receipt_industry_details"` ReceiptOperationalDetails OptReceiptDataReceiptOperationalDetails `json:"receipt_operational_details"` } // GetCustomer returns the value of Customer. func (s *ReceiptData) GetCustomer() OptReceiptDataCustomer { return s.Customer } // GetItems returns the value of Items. func (s *ReceiptData) GetItems() []ReceiptDataItem { return s.Items } // GetInternet returns the value of Internet. func (s *ReceiptData) GetInternet() OptBool { return s.Internet } // GetTaxSystemCode returns the value of TaxSystemCode. func (s *ReceiptData) GetTaxSystemCode() OptTaxSystemCode { return s.TaxSystemCode } // GetTimezone returns the value of Timezone. func (s *ReceiptData) GetTimezone() OptInt { return s.Timezone } // GetReceiptIndustryDetails returns the value of ReceiptIndustryDetails. func (s *ReceiptData) GetReceiptIndustryDetails() []IndustryDetails { return s.ReceiptIndustryDetails } // GetReceiptOperationalDetails returns the value of ReceiptOperationalDetails. func (s *ReceiptData) GetReceiptOperationalDetails() OptReceiptDataReceiptOperationalDetails { return s.ReceiptOperationalDetails } // SetCustomer sets the value of Customer. func (s *ReceiptData) SetCustomer(val OptReceiptDataCustomer) { s.Customer = val } // SetItems sets the value of Items. func (s *ReceiptData) SetItems(val []ReceiptDataItem) { s.Items = val } // SetInternet sets the value of Internet. func (s *ReceiptData) SetInternet(val OptBool) { s.Internet = val } // SetTaxSystemCode sets the value of TaxSystemCode. func (s *ReceiptData) SetTaxSystemCode(val OptTaxSystemCode) { s.TaxSystemCode = val } // SetTimezone sets the value of Timezone. func (s *ReceiptData) SetTimezone(val OptInt) { s.Timezone = val } // SetReceiptIndustryDetails sets the value of ReceiptIndustryDetails. func (s *ReceiptData) SetReceiptIndustryDetails(val []IndustryDetails) { s.ReceiptIndustryDetails = val } // SetReceiptOperationalDetails sets the value of ReceiptOperationalDetails. func (s *ReceiptData) SetReceiptOperationalDetails(val OptReceiptDataReceiptOperationalDetails) { s.ReceiptOperationalDetails = val } // Информация о пользователе. Необходимо указать как // минимум контактные данные: для Чеков от ЮKassa — // электронную почту (customer.email), в остальных случаях — // электронную почту (customer.email) или номер телефона (customer. // phone). // Ref: #/components/schemas/ReceiptDataCustomer type ReceiptDataCustomer struct { // Для юрлица — название организации, для ИП и // физического лица — ФИО. Если у физлица отсутствует // ИНН, в этом же параметре передаются паспортные данные. // Не более 256 символов. Можно передавать, если // используете Чеки от ЮKassa или онлайн-кассу Orange Data, Атол // Онлайн. FullName OptString `json:"full_name"` Inn OptString `json:"inn"` Email OptString `json:"email"` Phone OptString `json:"phone"` } // GetFullName returns the value of FullName. func (s *ReceiptDataCustomer) GetFullName() OptString { return s.FullName } // GetInn returns the value of Inn. func (s *ReceiptDataCustomer) GetInn() OptString { return s.Inn } // GetEmail returns the value of Email. func (s *ReceiptDataCustomer) GetEmail() OptString { return s.Email } // GetPhone returns the value of Phone. func (s *ReceiptDataCustomer) GetPhone() OptString { return s.Phone } // SetFullName sets the value of FullName. func (s *ReceiptDataCustomer) SetFullName(val OptString) { s.FullName = val } // SetInn sets the value of Inn. func (s *ReceiptDataCustomer) SetInn(val OptString) { s.Inn = val } // SetEmail sets the value of Email. func (s *ReceiptDataCustomer) SetEmail(val OptString) { s.Email = val } // SetPhone sets the value of Phone. func (s *ReceiptDataCustomer) SetPhone(val OptString) { s.Phone = val } // Информация о товарной позиции в заказе. Используется // для формирования чека. // Ref: #/components/schemas/ReceiptDataItem type ReceiptDataItem struct { Description ReceiptItemDescription `json:"description"` Amount ReceiptDataItemAmount `json:"amount"` VatCode ReceiptItemVatCode `json:"vat_code"` Quantity ReceiptItemQuantity `json:"quantity"` Measure OptReceiptItemMeasure `json:"measure"` MarkQuantity OptMarkQuantity `json:"mark_quantity"` PaymentSubject OptReceiptItemPaymentSubject `json:"payment_subject"` PaymentMode OptReceiptItemPaymentMode `json:"payment_mode"` CountryOfOriginCode OptReceiptItemCountryOfOriginCode `json:"country_of_origin_code"` CustomsDeclarationNumber OptReceiptItemCustomsDeclarationNumber `json:"customs_declaration_number"` Excise OptReceiptItemExcise `json:"excise"` ProductCode OptReceiptItemProductCode `json:"product_code"` PlannedStatus OptReceiptItemPlannedStatus `json:"planned_status"` MarkCodeInfo OptMarkCodeInfo `json:"mark_code_info"` MarkMode OptMarkMode `json:"mark_mode"` PaymentSubjectIndustryDetails ReceiptItemPaymentSubjectIndustryDetails `json:"payment_subject_industry_details"` } // GetDescription returns the value of Description. func (s *ReceiptDataItem) GetDescription() ReceiptItemDescription { return s.Description } // GetAmount returns the value of Amount. func (s *ReceiptDataItem) GetAmount() ReceiptDataItemAmount { return s.Amount } // GetVatCode returns the value of VatCode. func (s *ReceiptDataItem) GetVatCode() ReceiptItemVatCode { return s.VatCode } // GetQuantity returns the value of Quantity. func (s *ReceiptDataItem) GetQuantity() ReceiptItemQuantity { return s.Quantity } // GetMeasure returns the value of Measure. func (s *ReceiptDataItem) GetMeasure() OptReceiptItemMeasure { return s.Measure } // GetMarkQuantity returns the value of MarkQuantity. func (s *ReceiptDataItem) GetMarkQuantity() OptMarkQuantity { return s.MarkQuantity } // GetPaymentSubject returns the value of PaymentSubject. func (s *ReceiptDataItem) GetPaymentSubject() OptReceiptItemPaymentSubject { return s.PaymentSubject } // GetPaymentMode returns the value of PaymentMode. func (s *ReceiptDataItem) GetPaymentMode() OptReceiptItemPaymentMode { return s.PaymentMode } // GetCountryOfOriginCode returns the value of CountryOfOriginCode. func (s *ReceiptDataItem) GetCountryOfOriginCode() OptReceiptItemCountryOfOriginCode { return s.CountryOfOriginCode } // GetCustomsDeclarationNumber returns the value of CustomsDeclarationNumber. func (s *ReceiptDataItem) GetCustomsDeclarationNumber() OptReceiptItemCustomsDeclarationNumber { return s.CustomsDeclarationNumber } // GetExcise returns the value of Excise. func (s *ReceiptDataItem) GetExcise() OptReceiptItemExcise { return s.Excise } // GetProductCode returns the value of ProductCode. func (s *ReceiptDataItem) GetProductCode() OptReceiptItemProductCode { return s.ProductCode } // GetPlannedStatus returns the value of PlannedStatus. func (s *ReceiptDataItem) GetPlannedStatus() OptReceiptItemPlannedStatus { return s.PlannedStatus } // GetMarkCodeInfo returns the value of MarkCodeInfo. func (s *ReceiptDataItem) GetMarkCodeInfo() OptMarkCodeInfo { return s.MarkCodeInfo } // GetMarkMode returns the value of MarkMode. func (s *ReceiptDataItem) GetMarkMode() OptMarkMode { return s.MarkMode } // GetPaymentSubjectIndustryDetails returns the value of PaymentSubjectIndustryDetails. func (s *ReceiptDataItem) GetPaymentSubjectIndustryDetails() ReceiptItemPaymentSubjectIndustryDetails { return s.PaymentSubjectIndustryDetails } // SetDescription sets the value of Description. func (s *ReceiptDataItem) SetDescription(val ReceiptItemDescription) { s.Description = val } // SetAmount sets the value of Amount. func (s *ReceiptDataItem) SetAmount(val ReceiptDataItemAmount) { s.Amount = val } // SetVatCode sets the value of VatCode. func (s *ReceiptDataItem) SetVatCode(val ReceiptItemVatCode) { s.VatCode = val } // SetQuantity sets the value of Quantity. func (s *ReceiptDataItem) SetQuantity(val ReceiptItemQuantity) { s.Quantity = val } // SetMeasure sets the value of Measure. func (s *ReceiptDataItem) SetMeasure(val OptReceiptItemMeasure) { s.Measure = val } // SetMarkQuantity sets the value of MarkQuantity. func (s *ReceiptDataItem) SetMarkQuantity(val OptMarkQuantity) { s.MarkQuantity = val } // SetPaymentSubject sets the value of PaymentSubject. func (s *ReceiptDataItem) SetPaymentSubject(val OptReceiptItemPaymentSubject) { s.PaymentSubject = val } // SetPaymentMode sets the value of PaymentMode. func (s *ReceiptDataItem) SetPaymentMode(val OptReceiptItemPaymentMode) { s.PaymentMode = val } // SetCountryOfOriginCode sets the value of CountryOfOriginCode. func (s *ReceiptDataItem) SetCountryOfOriginCode(val OptReceiptItemCountryOfOriginCode) { s.CountryOfOriginCode = val } // SetCustomsDeclarationNumber sets the value of CustomsDeclarationNumber. func (s *ReceiptDataItem) SetCustomsDeclarationNumber(val OptReceiptItemCustomsDeclarationNumber) { s.CustomsDeclarationNumber = val } // SetExcise sets the value of Excise. func (s *ReceiptDataItem) SetExcise(val OptReceiptItemExcise) { s.Excise = val } // SetProductCode sets the value of ProductCode. func (s *ReceiptDataItem) SetProductCode(val OptReceiptItemProductCode) { s.ProductCode = val } // SetPlannedStatus sets the value of PlannedStatus. func (s *ReceiptDataItem) SetPlannedStatus(val OptReceiptItemPlannedStatus) { s.PlannedStatus = val } // SetMarkCodeInfo sets the value of MarkCodeInfo. func (s *ReceiptDataItem) SetMarkCodeInfo(val OptMarkCodeInfo) { s.MarkCodeInfo = val } // SetMarkMode sets the value of MarkMode. func (s *ReceiptDataItem) SetMarkMode(val OptMarkMode) { s.MarkMode = val } // SetPaymentSubjectIndustryDetails sets the value of PaymentSubjectIndustryDetails. func (s *ReceiptDataItem) SetPaymentSubjectIndustryDetails(val ReceiptItemPaymentSubjectIndustryDetails) { s.PaymentSubjectIndustryDetails = val } // Сумма в выбранной валюте. type ReceiptDataItemAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *ReceiptDataItemAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *ReceiptDataItemAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *ReceiptDataItemAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *ReceiptDataItemAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Данные операционного реквизита чека. type ReceiptDataReceiptOperationalDetails struct { // Идентификатор операции (тег в 54 ФЗ — 1271). Число от 0 до // 255. OperationID int `json:"operation_id"` // Данные операции (тег в 54 ФЗ — 1272). Value string `json:"value"` // Время создания операции (тег в 54 ФЗ — 1273). Указывается // по UTC: https://ru.wikipedia. // org/wiki/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F и передается в формате ISO 8601: https://en.wikipedia.org/wiki/ISO_8601. Пример: 2017-11-03T11:52:31.827Z. CreatedAt time.Time `json:"created_at"` } // GetOperationID returns the value of OperationID. func (s *ReceiptDataReceiptOperationalDetails) GetOperationID() int { return s.OperationID } // GetValue returns the value of Value. func (s *ReceiptDataReceiptOperationalDetails) GetValue() string { return s.Value } // GetCreatedAt returns the value of CreatedAt. func (s *ReceiptDataReceiptOperationalDetails) GetCreatedAt() time.Time { return s.CreatedAt } // SetOperationID sets the value of OperationID. func (s *ReceiptDataReceiptOperationalDetails) SetOperationID(val int) { s.OperationID = val } // SetValue sets the value of Value. func (s *ReceiptDataReceiptOperationalDetails) SetValue(val string) { s.Value = val } // SetCreatedAt sets the value of CreatedAt. func (s *ReceiptDataReceiptOperationalDetails) SetCreatedAt(val time.Time) { s.CreatedAt = val } type ReceiptId string // Информация о товарной позиции в заказе (для // формирования чека). // Ref: #/components/schemas/ReceiptItem type ReceiptItem struct { // Название товара (не более 128 символов). Тег в 54 ФЗ — 1030). Description string `json:"description"` // Количество товара (тег в 54 ФЗ — 1023). Формат: десятичное // число, дробная часть — три знака или больше // (количество знаков зависит от quantity в запросе). // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Пример: 5.000. Quantity float64 `json:"quantity"` Amount ReceiptItemAmount `json:"amount"` VatCode int32 `json:"vat_code"` PaymentSubject OptReceiptItemPaymentSubject `json:"payment_subject"` PaymentMode OptReceiptItemPaymentMode `json:"payment_mode"` // Код страны происхождения товара по общероссийскому // классификатору стран мира (OК (MК (ИСО 3166) 004-97) 025-2001: // http://docs.cntd.ru/document/842501280). Тег в 54 ФЗ — 1230. Пример: RU. // Онлайн-кассы, которые поддерживают этот параметр: Orange // Data, Кит Инвест. CountryOfOriginCode OptString `json:"country_of_origin_code"` // Номер таможенной декларации (от 1 до 32 символов). Тег в // 54 ФЗ — 1231. Онлайн-кассы, которые поддерживают этот // параметр: Orange Data, Кит Инвест. CustomsDeclarationNumber OptString `json:"customs_declaration_number"` // Сумма акциза товара с учетом копеек (тег в 54 ФЗ — 1229). // Десятичное число с точностью до 2 символов после // точки. Онлайн-кассы, которые поддерживают этот // параметр: Orange Data, Кит Инвест. Excise OptString `json:"excise"` Supplier OptReceiptItemSupplierWithInn `json:"supplier"` AgentType OptReceiptItemAgentType `json:"agent_type"` MarkCodeInfo OptMarkCodeInfo `json:"mark_code_info"` Measure OptReceiptItemMeasure `json:"measure"` // Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260). // Обязателен при использовании ФФД 1.2. PaymentSubjectIndustryDetails []IndustryDetails `json:"payment_subject_industry_details"` // Product code (tag 1162 in 54-FZ) is a unique number assigned to a unit of product during marking // process. Format: hexadecimal number with spaces. Maximum length is 32 bytes. Example: 00 00 00 01 // 00 21 FA 41 00 23 05 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 00 AB 00. This // parameter is required if both conditions apply: your online sales register is updated to FFD 1.05 // or 1.1; the product is subject to mandatory marking: http://docs.cntd.ru/document/902192509. The // parameter must not be included in the request if you are using Receipts from YooMoney: // https://yookassa.ru/developers/payment-acceptance/receipts/54fz/yoomoney/basics or an online sales // register updated to FFD 1.2: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/marking. ProductCode OptString `json:"product_code"` PlannedStatus OptReceiptItemPlannedStatus `json:"planned_status"` MarkMode OptMarkMode `json:"mark_mode"` MarkQuantity OptMarkQuantity `json:"mark_quantity"` } // GetDescription returns the value of Description. func (s *ReceiptItem) GetDescription() string { return s.Description } // GetQuantity returns the value of Quantity. func (s *ReceiptItem) GetQuantity() float64 { return s.Quantity } // GetAmount returns the value of Amount. func (s *ReceiptItem) GetAmount() ReceiptItemAmount { return s.Amount } // GetVatCode returns the value of VatCode. func (s *ReceiptItem) GetVatCode() int32 { return s.VatCode } // GetPaymentSubject returns the value of PaymentSubject. func (s *ReceiptItem) GetPaymentSubject() OptReceiptItemPaymentSubject { return s.PaymentSubject } // GetPaymentMode returns the value of PaymentMode. func (s *ReceiptItem) GetPaymentMode() OptReceiptItemPaymentMode { return s.PaymentMode } // GetCountryOfOriginCode returns the value of CountryOfOriginCode. func (s *ReceiptItem) GetCountryOfOriginCode() OptString { return s.CountryOfOriginCode } // GetCustomsDeclarationNumber returns the value of CustomsDeclarationNumber. func (s *ReceiptItem) GetCustomsDeclarationNumber() OptString { return s.CustomsDeclarationNumber } // GetExcise returns the value of Excise. func (s *ReceiptItem) GetExcise() OptString { return s.Excise } // GetSupplier returns the value of Supplier. func (s *ReceiptItem) GetSupplier() OptReceiptItemSupplierWithInn { return s.Supplier } // GetAgentType returns the value of AgentType. func (s *ReceiptItem) GetAgentType() OptReceiptItemAgentType { return s.AgentType } // GetMarkCodeInfo returns the value of MarkCodeInfo. func (s *ReceiptItem) GetMarkCodeInfo() OptMarkCodeInfo { return s.MarkCodeInfo } // GetMeasure returns the value of Measure. func (s *ReceiptItem) GetMeasure() OptReceiptItemMeasure { return s.Measure } // GetPaymentSubjectIndustryDetails returns the value of PaymentSubjectIndustryDetails. func (s *ReceiptItem) GetPaymentSubjectIndustryDetails() []IndustryDetails { return s.PaymentSubjectIndustryDetails } // GetProductCode returns the value of ProductCode. func (s *ReceiptItem) GetProductCode() OptString { return s.ProductCode } // GetPlannedStatus returns the value of PlannedStatus. func (s *ReceiptItem) GetPlannedStatus() OptReceiptItemPlannedStatus { return s.PlannedStatus } // GetMarkMode returns the value of MarkMode. func (s *ReceiptItem) GetMarkMode() OptMarkMode { return s.MarkMode } // GetMarkQuantity returns the value of MarkQuantity. func (s *ReceiptItem) GetMarkQuantity() OptMarkQuantity { return s.MarkQuantity } // SetDescription sets the value of Description. func (s *ReceiptItem) SetDescription(val string) { s.Description = val } // SetQuantity sets the value of Quantity. func (s *ReceiptItem) SetQuantity(val float64) { s.Quantity = val } // SetAmount sets the value of Amount. func (s *ReceiptItem) SetAmount(val ReceiptItemAmount) { s.Amount = val } // SetVatCode sets the value of VatCode. func (s *ReceiptItem) SetVatCode(val int32) { s.VatCode = val } // SetPaymentSubject sets the value of PaymentSubject. func (s *ReceiptItem) SetPaymentSubject(val OptReceiptItemPaymentSubject) { s.PaymentSubject = val } // SetPaymentMode sets the value of PaymentMode. func (s *ReceiptItem) SetPaymentMode(val OptReceiptItemPaymentMode) { s.PaymentMode = val } // SetCountryOfOriginCode sets the value of CountryOfOriginCode. func (s *ReceiptItem) SetCountryOfOriginCode(val OptString) { s.CountryOfOriginCode = val } // SetCustomsDeclarationNumber sets the value of CustomsDeclarationNumber. func (s *ReceiptItem) SetCustomsDeclarationNumber(val OptString) { s.CustomsDeclarationNumber = val } // SetExcise sets the value of Excise. func (s *ReceiptItem) SetExcise(val OptString) { s.Excise = val } // SetSupplier sets the value of Supplier. func (s *ReceiptItem) SetSupplier(val OptReceiptItemSupplierWithInn) { s.Supplier = val } // SetAgentType sets the value of AgentType. func (s *ReceiptItem) SetAgentType(val OptReceiptItemAgentType) { s.AgentType = val } // SetMarkCodeInfo sets the value of MarkCodeInfo. func (s *ReceiptItem) SetMarkCodeInfo(val OptMarkCodeInfo) { s.MarkCodeInfo = val } // SetMeasure sets the value of Measure. func (s *ReceiptItem) SetMeasure(val OptReceiptItemMeasure) { s.Measure = val } // SetPaymentSubjectIndustryDetails sets the value of PaymentSubjectIndustryDetails. func (s *ReceiptItem) SetPaymentSubjectIndustryDetails(val []IndustryDetails) { s.PaymentSubjectIndustryDetails = val } // SetProductCode sets the value of ProductCode. func (s *ReceiptItem) SetProductCode(val OptString) { s.ProductCode = val } // SetPlannedStatus sets the value of PlannedStatus. func (s *ReceiptItem) SetPlannedStatus(val OptReceiptItemPlannedStatus) { s.PlannedStatus = val } // SetMarkMode sets the value of MarkMode. func (s *ReceiptItem) SetMarkMode(val OptMarkMode) { s.MarkMode = val } // SetMarkQuantity sets the value of MarkQuantity. func (s *ReceiptItem) SetMarkQuantity(val OptMarkQuantity) { s.MarkQuantity = val } // Тип посредника, реализующего товар или услугу. // Параметр предусмотрен форматом фискальных // документов (ФФД) и является обязательным, начиная с // версии 1.1. Перечень возможных значений: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/parameters-values#agent-type. // Можно передавать, если ваша онлайн-касса обновлена до // ФФД 1.1 и вы отправляете данные для формирования чека // по сценарию Сначала платеж, потом чек: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/basics#receipt-after-payment. // Ref: #/components/schemas/ReceiptItemAgentType type ReceiptItemAgentType string const ( ReceiptItemAgentTypeBankingPaymentAgent ReceiptItemAgentType = "banking_payment_agent" ReceiptItemAgentTypeBankingPaymentSubagent ReceiptItemAgentType = "banking_payment_subagent" ReceiptItemAgentTypePaymentAgent ReceiptItemAgentType = "payment_agent" ReceiptItemAgentTypePaymentSubagent ReceiptItemAgentType = "payment_subagent" ReceiptItemAgentTypeAttorney ReceiptItemAgentType = "attorney" ReceiptItemAgentTypeCommissioner ReceiptItemAgentType = "commissioner" ReceiptItemAgentTypeAgent ReceiptItemAgentType = "agent" ) // AllValues returns all ReceiptItemAgentType values. func (ReceiptItemAgentType) AllValues() []ReceiptItemAgentType { return []ReceiptItemAgentType{ ReceiptItemAgentTypeBankingPaymentAgent, ReceiptItemAgentTypeBankingPaymentSubagent, ReceiptItemAgentTypePaymentAgent, ReceiptItemAgentTypePaymentSubagent, ReceiptItemAgentTypeAttorney, ReceiptItemAgentTypeCommissioner, ReceiptItemAgentTypeAgent, } } // MarshalText implements encoding.TextMarshaler. func (s ReceiptItemAgentType) MarshalText() ([]byte, error) { switch s { case ReceiptItemAgentTypeBankingPaymentAgent: return []byte(s), nil case ReceiptItemAgentTypeBankingPaymentSubagent: return []byte(s), nil case ReceiptItemAgentTypePaymentAgent: return []byte(s), nil case ReceiptItemAgentTypePaymentSubagent: return []byte(s), nil case ReceiptItemAgentTypeAttorney: return []byte(s), nil case ReceiptItemAgentTypeCommissioner: return []byte(s), nil case ReceiptItemAgentTypeAgent: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ReceiptItemAgentType) UnmarshalText(data []byte) error { switch ReceiptItemAgentType(data) { case ReceiptItemAgentTypeBankingPaymentAgent: *s = ReceiptItemAgentTypeBankingPaymentAgent return nil case ReceiptItemAgentTypeBankingPaymentSubagent: *s = ReceiptItemAgentTypeBankingPaymentSubagent return nil case ReceiptItemAgentTypePaymentAgent: *s = ReceiptItemAgentTypePaymentAgent return nil case ReceiptItemAgentTypePaymentSubagent: *s = ReceiptItemAgentTypePaymentSubagent return nil case ReceiptItemAgentTypeAttorney: *s = ReceiptItemAgentTypeAttorney return nil case ReceiptItemAgentTypeCommissioner: *s = ReceiptItemAgentTypeCommissioner return nil case ReceiptItemAgentTypeAgent: *s = ReceiptItemAgentTypeAgent return nil default: return errors.Errorf("invalid value: %q", data) } } // Сумма в выбранной валюте. type ReceiptItemAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *ReceiptItemAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *ReceiptItemAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *ReceiptItemAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *ReceiptItemAmount) SetCurrency(val CurrencyCode) { s.Currency = val } type ReceiptItemCountryOfOriginCode string type ReceiptItemCustomsDeclarationNumber string type ReceiptItemDescription string type ReceiptItemExcise string // Мера количества предмета расчета (тег в 54 ФЗ — 2108) — // единица измерения товара, например штуки, граммы. // Обязательный параметр, если используете Чеки от ЮKassa // или онлайн-кассу, обновленную до ФФД 1.2. Перечень // возможных значений: * для Чеков от ЮKassa: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/yoomoney/parameters-values#measure * для // сторонних онлайн-касс: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/parameters-values#measure. // Ref: #/components/schemas/ReceiptItemMeasure type ReceiptItemMeasure string const ( ReceiptItemMeasurePiece ReceiptItemMeasure = "piece" ReceiptItemMeasureGram ReceiptItemMeasure = "gram" ReceiptItemMeasureKilogram ReceiptItemMeasure = "kilogram" ReceiptItemMeasureTon ReceiptItemMeasure = "ton" ReceiptItemMeasureCentimeter ReceiptItemMeasure = "centimeter" ReceiptItemMeasureDecimeter ReceiptItemMeasure = "decimeter" ReceiptItemMeasureMeter ReceiptItemMeasure = "meter" ReceiptItemMeasureSquareCentimeter ReceiptItemMeasure = "square_centimeter" ReceiptItemMeasureSquareDecimeter ReceiptItemMeasure = "square_decimeter" ReceiptItemMeasureSquareMeter ReceiptItemMeasure = "square_meter" ReceiptItemMeasureMilliliter ReceiptItemMeasure = "milliliter" ReceiptItemMeasureLiter ReceiptItemMeasure = "liter" ReceiptItemMeasureCubicMeter ReceiptItemMeasure = "cubic_meter" ReceiptItemMeasureKilowattHour ReceiptItemMeasure = "kilowatt_hour" ReceiptItemMeasureGigacalorie ReceiptItemMeasure = "gigacalorie" ReceiptItemMeasureDay ReceiptItemMeasure = "day" ReceiptItemMeasureHour ReceiptItemMeasure = "hour" ReceiptItemMeasureMinute ReceiptItemMeasure = "minute" ReceiptItemMeasureSecond ReceiptItemMeasure = "second" ReceiptItemMeasureKilobyte ReceiptItemMeasure = "kilobyte" ReceiptItemMeasureMegabyte ReceiptItemMeasure = "megabyte" ReceiptItemMeasureGigabyte ReceiptItemMeasure = "gigabyte" ReceiptItemMeasureTerabyte ReceiptItemMeasure = "terabyte" ReceiptItemMeasureAnother ReceiptItemMeasure = "another" ) // AllValues returns all ReceiptItemMeasure values. func (ReceiptItemMeasure) AllValues() []ReceiptItemMeasure { return []ReceiptItemMeasure{ ReceiptItemMeasurePiece, ReceiptItemMeasureGram, ReceiptItemMeasureKilogram, ReceiptItemMeasureTon, ReceiptItemMeasureCentimeter, ReceiptItemMeasureDecimeter, ReceiptItemMeasureMeter, ReceiptItemMeasureSquareCentimeter, ReceiptItemMeasureSquareDecimeter, ReceiptItemMeasureSquareMeter, ReceiptItemMeasureMilliliter, ReceiptItemMeasureLiter, ReceiptItemMeasureCubicMeter, ReceiptItemMeasureKilowattHour, ReceiptItemMeasureGigacalorie, ReceiptItemMeasureDay, ReceiptItemMeasureHour, ReceiptItemMeasureMinute, ReceiptItemMeasureSecond, ReceiptItemMeasureKilobyte, ReceiptItemMeasureMegabyte, ReceiptItemMeasureGigabyte, ReceiptItemMeasureTerabyte, ReceiptItemMeasureAnother, } } // MarshalText implements encoding.TextMarshaler. func (s ReceiptItemMeasure) MarshalText() ([]byte, error) { switch s { case ReceiptItemMeasurePiece: return []byte(s), nil case ReceiptItemMeasureGram: return []byte(s), nil case ReceiptItemMeasureKilogram: return []byte(s), nil case ReceiptItemMeasureTon: return []byte(s), nil case ReceiptItemMeasureCentimeter: return []byte(s), nil case ReceiptItemMeasureDecimeter: return []byte(s), nil case ReceiptItemMeasureMeter: return []byte(s), nil case ReceiptItemMeasureSquareCentimeter: return []byte(s), nil case ReceiptItemMeasureSquareDecimeter: return []byte(s), nil case ReceiptItemMeasureSquareMeter: return []byte(s), nil case ReceiptItemMeasureMilliliter: return []byte(s), nil case ReceiptItemMeasureLiter: return []byte(s), nil case ReceiptItemMeasureCubicMeter: return []byte(s), nil case ReceiptItemMeasureKilowattHour: return []byte(s), nil case ReceiptItemMeasureGigacalorie: return []byte(s), nil case ReceiptItemMeasureDay: return []byte(s), nil case ReceiptItemMeasureHour: return []byte(s), nil case ReceiptItemMeasureMinute: return []byte(s), nil case ReceiptItemMeasureSecond: return []byte(s), nil case ReceiptItemMeasureKilobyte: return []byte(s), nil case ReceiptItemMeasureMegabyte: return []byte(s), nil case ReceiptItemMeasureGigabyte: return []byte(s), nil case ReceiptItemMeasureTerabyte: return []byte(s), nil case ReceiptItemMeasureAnother: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ReceiptItemMeasure) UnmarshalText(data []byte) error { switch ReceiptItemMeasure(data) { case ReceiptItemMeasurePiece: *s = ReceiptItemMeasurePiece return nil case ReceiptItemMeasureGram: *s = ReceiptItemMeasureGram return nil case ReceiptItemMeasureKilogram: *s = ReceiptItemMeasureKilogram return nil case ReceiptItemMeasureTon: *s = ReceiptItemMeasureTon return nil case ReceiptItemMeasureCentimeter: *s = ReceiptItemMeasureCentimeter return nil case ReceiptItemMeasureDecimeter: *s = ReceiptItemMeasureDecimeter return nil case ReceiptItemMeasureMeter: *s = ReceiptItemMeasureMeter return nil case ReceiptItemMeasureSquareCentimeter: *s = ReceiptItemMeasureSquareCentimeter return nil case ReceiptItemMeasureSquareDecimeter: *s = ReceiptItemMeasureSquareDecimeter return nil case ReceiptItemMeasureSquareMeter: *s = ReceiptItemMeasureSquareMeter return nil case ReceiptItemMeasureMilliliter: *s = ReceiptItemMeasureMilliliter return nil case ReceiptItemMeasureLiter: *s = ReceiptItemMeasureLiter return nil case ReceiptItemMeasureCubicMeter: *s = ReceiptItemMeasureCubicMeter return nil case ReceiptItemMeasureKilowattHour: *s = ReceiptItemMeasureKilowattHour return nil case ReceiptItemMeasureGigacalorie: *s = ReceiptItemMeasureGigacalorie return nil case ReceiptItemMeasureDay: *s = ReceiptItemMeasureDay return nil case ReceiptItemMeasureHour: *s = ReceiptItemMeasureHour return nil case ReceiptItemMeasureMinute: *s = ReceiptItemMeasureMinute return nil case ReceiptItemMeasureSecond: *s = ReceiptItemMeasureSecond return nil case ReceiptItemMeasureKilobyte: *s = ReceiptItemMeasureKilobyte return nil case ReceiptItemMeasureMegabyte: *s = ReceiptItemMeasureMegabyte return nil case ReceiptItemMeasureGigabyte: *s = ReceiptItemMeasureGigabyte return nil case ReceiptItemMeasureTerabyte: *s = ReceiptItemMeasureTerabyte return nil case ReceiptItemMeasureAnother: *s = ReceiptItemMeasureAnother return nil default: return errors.Errorf("invalid value: %q", data) } } // Признак способа расчета (тег в 54 ФЗ — 1214) — отражает // тип оплаты и факт передачи товара. Пример: покупатель // полностью оплачивает товар и сразу получает его. В // этом случае нужно передать значение full_payment (полный // расчет). Перечень возможных значений: * для Чеков от // ЮKassa: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/yoomoney/parameters-values#payment-mode * для // сторонних онлайн-касс: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/parameters-values#payment-mode. // Ref: #/components/schemas/ReceiptItemPaymentMode type ReceiptItemPaymentMode string const ( ReceiptItemPaymentModeFullPrepayment ReceiptItemPaymentMode = "full_prepayment" ReceiptItemPaymentModePartialPrepayment ReceiptItemPaymentMode = "partial_prepayment" ReceiptItemPaymentModeAdvance ReceiptItemPaymentMode = "advance" ReceiptItemPaymentModeFullPayment ReceiptItemPaymentMode = "full_payment" ReceiptItemPaymentModePartialPayment ReceiptItemPaymentMode = "partial_payment" ReceiptItemPaymentModeCredit ReceiptItemPaymentMode = "credit" ReceiptItemPaymentModeCreditPayment ReceiptItemPaymentMode = "credit_payment" ) // AllValues returns all ReceiptItemPaymentMode values. func (ReceiptItemPaymentMode) AllValues() []ReceiptItemPaymentMode { return []ReceiptItemPaymentMode{ ReceiptItemPaymentModeFullPrepayment, ReceiptItemPaymentModePartialPrepayment, ReceiptItemPaymentModeAdvance, ReceiptItemPaymentModeFullPayment, ReceiptItemPaymentModePartialPayment, ReceiptItemPaymentModeCredit, ReceiptItemPaymentModeCreditPayment, } } // MarshalText implements encoding.TextMarshaler. func (s ReceiptItemPaymentMode) MarshalText() ([]byte, error) { switch s { case ReceiptItemPaymentModeFullPrepayment: return []byte(s), nil case ReceiptItemPaymentModePartialPrepayment: return []byte(s), nil case ReceiptItemPaymentModeAdvance: return []byte(s), nil case ReceiptItemPaymentModeFullPayment: return []byte(s), nil case ReceiptItemPaymentModePartialPayment: return []byte(s), nil case ReceiptItemPaymentModeCredit: return []byte(s), nil case ReceiptItemPaymentModeCreditPayment: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ReceiptItemPaymentMode) UnmarshalText(data []byte) error { switch ReceiptItemPaymentMode(data) { case ReceiptItemPaymentModeFullPrepayment: *s = ReceiptItemPaymentModeFullPrepayment return nil case ReceiptItemPaymentModePartialPrepayment: *s = ReceiptItemPaymentModePartialPrepayment return nil case ReceiptItemPaymentModeAdvance: *s = ReceiptItemPaymentModeAdvance return nil case ReceiptItemPaymentModeFullPayment: *s = ReceiptItemPaymentModeFullPayment return nil case ReceiptItemPaymentModePartialPayment: *s = ReceiptItemPaymentModePartialPayment return nil case ReceiptItemPaymentModeCredit: *s = ReceiptItemPaymentModeCredit return nil case ReceiptItemPaymentModeCreditPayment: *s = ReceiptItemPaymentModeCreditPayment return nil default: return errors.Errorf("invalid value: %q", data) } } // Признак предмета расчета (тег в 54 ФЗ — 1212) — это то, за // что принимается оплата, например товар, услуга. // Перечень возможных значений: * для Чеков от ЮKassa: // https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/yoomoney/parameters-values#payment-subject * для // сторонних онлайн-касс: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/parameters-values#payment-subject. // Ref: #/components/schemas/ReceiptItemPaymentSubject type ReceiptItemPaymentSubject string const ( ReceiptItemPaymentSubjectCommodity ReceiptItemPaymentSubject = "commodity" ReceiptItemPaymentSubjectExcise ReceiptItemPaymentSubject = "excise" ReceiptItemPaymentSubjectJob ReceiptItemPaymentSubject = "job" ReceiptItemPaymentSubjectService ReceiptItemPaymentSubject = "service" ReceiptItemPaymentSubjectGamblingBet ReceiptItemPaymentSubject = "gambling_bet" ReceiptItemPaymentSubjectGamblingPrize ReceiptItemPaymentSubject = "gambling_prize" ReceiptItemPaymentSubjectLottery ReceiptItemPaymentSubject = "lottery" ReceiptItemPaymentSubjectLotteryPrize ReceiptItemPaymentSubject = "lottery_prize" ReceiptItemPaymentSubjectIntellectualActivity ReceiptItemPaymentSubject = "intellectual_activity" ReceiptItemPaymentSubjectPayment ReceiptItemPaymentSubject = "payment" ReceiptItemPaymentSubjectAgentCommission ReceiptItemPaymentSubject = "agent_commission" ReceiptItemPaymentSubjectPropertyRight ReceiptItemPaymentSubject = "property_right" ReceiptItemPaymentSubjectNonOperatingGain ReceiptItemPaymentSubject = "non_operating_gain" ReceiptItemPaymentSubjectInsurancePremium ReceiptItemPaymentSubject = "insurance_premium" ReceiptItemPaymentSubjectSalesTax ReceiptItemPaymentSubject = "sales_tax" ReceiptItemPaymentSubjectResortFee ReceiptItemPaymentSubject = "resort_fee" ReceiptItemPaymentSubjectComposite ReceiptItemPaymentSubject = "composite" ReceiptItemPaymentSubjectAnother ReceiptItemPaymentSubject = "another" ReceiptItemPaymentSubjectFine ReceiptItemPaymentSubject = "fine" ReceiptItemPaymentSubjectTax ReceiptItemPaymentSubject = "tax" ReceiptItemPaymentSubjectLien ReceiptItemPaymentSubject = "lien" ReceiptItemPaymentSubjectCost ReceiptItemPaymentSubject = "cost" ReceiptItemPaymentSubjectPensionInsuranceWithoutPayouts ReceiptItemPaymentSubject = "pension_insurance_without_payouts" ReceiptItemPaymentSubjectPensionInsuranceWithPayouts ReceiptItemPaymentSubject = "pension_insurance_with_payouts" ReceiptItemPaymentSubjectHealthInsuranceWithoutPayouts ReceiptItemPaymentSubject = "health_insurance_without_payouts" ReceiptItemPaymentSubjectHealthInsuranceWithPayouts ReceiptItemPaymentSubject = "health_insurance_with_payouts" ReceiptItemPaymentSubjectHealthInsurance ReceiptItemPaymentSubject = "health_insurance" ReceiptItemPaymentSubjectCasino ReceiptItemPaymentSubject = "casino" ReceiptItemPaymentSubjectAgentWithdrawals ReceiptItemPaymentSubject = "agent_withdrawals" ReceiptItemPaymentSubjectNonMarkedExcise ReceiptItemPaymentSubject = "non_marked_excise" ReceiptItemPaymentSubjectMarkedExcise ReceiptItemPaymentSubject = "marked_excise" ReceiptItemPaymentSubjectMarked ReceiptItemPaymentSubject = "marked" ReceiptItemPaymentSubjectNonMarked ReceiptItemPaymentSubject = "non_marked" ) // AllValues returns all ReceiptItemPaymentSubject values. func (ReceiptItemPaymentSubject) AllValues() []ReceiptItemPaymentSubject { return []ReceiptItemPaymentSubject{ ReceiptItemPaymentSubjectCommodity, ReceiptItemPaymentSubjectExcise, ReceiptItemPaymentSubjectJob, ReceiptItemPaymentSubjectService, ReceiptItemPaymentSubjectGamblingBet, ReceiptItemPaymentSubjectGamblingPrize, ReceiptItemPaymentSubjectLottery, ReceiptItemPaymentSubjectLotteryPrize, ReceiptItemPaymentSubjectIntellectualActivity, ReceiptItemPaymentSubjectPayment, ReceiptItemPaymentSubjectAgentCommission, ReceiptItemPaymentSubjectPropertyRight, ReceiptItemPaymentSubjectNonOperatingGain, ReceiptItemPaymentSubjectInsurancePremium, ReceiptItemPaymentSubjectSalesTax, ReceiptItemPaymentSubjectResortFee, ReceiptItemPaymentSubjectComposite, ReceiptItemPaymentSubjectAnother, ReceiptItemPaymentSubjectFine, ReceiptItemPaymentSubjectTax, ReceiptItemPaymentSubjectLien, ReceiptItemPaymentSubjectCost, ReceiptItemPaymentSubjectPensionInsuranceWithoutPayouts, ReceiptItemPaymentSubjectPensionInsuranceWithPayouts, ReceiptItemPaymentSubjectHealthInsuranceWithoutPayouts, ReceiptItemPaymentSubjectHealthInsuranceWithPayouts, ReceiptItemPaymentSubjectHealthInsurance, ReceiptItemPaymentSubjectCasino, ReceiptItemPaymentSubjectAgentWithdrawals, ReceiptItemPaymentSubjectNonMarkedExcise, ReceiptItemPaymentSubjectMarkedExcise, ReceiptItemPaymentSubjectMarked, ReceiptItemPaymentSubjectNonMarked, } } // MarshalText implements encoding.TextMarshaler. func (s ReceiptItemPaymentSubject) MarshalText() ([]byte, error) { switch s { case ReceiptItemPaymentSubjectCommodity: return []byte(s), nil case ReceiptItemPaymentSubjectExcise: return []byte(s), nil case ReceiptItemPaymentSubjectJob: return []byte(s), nil case ReceiptItemPaymentSubjectService: return []byte(s), nil case ReceiptItemPaymentSubjectGamblingBet: return []byte(s), nil case ReceiptItemPaymentSubjectGamblingPrize: return []byte(s), nil case ReceiptItemPaymentSubjectLottery: return []byte(s), nil case ReceiptItemPaymentSubjectLotteryPrize: return []byte(s), nil case ReceiptItemPaymentSubjectIntellectualActivity: return []byte(s), nil case ReceiptItemPaymentSubjectPayment: return []byte(s), nil case ReceiptItemPaymentSubjectAgentCommission: return []byte(s), nil case ReceiptItemPaymentSubjectPropertyRight: return []byte(s), nil case ReceiptItemPaymentSubjectNonOperatingGain: return []byte(s), nil case ReceiptItemPaymentSubjectInsurancePremium: return []byte(s), nil case ReceiptItemPaymentSubjectSalesTax: return []byte(s), nil case ReceiptItemPaymentSubjectResortFee: return []byte(s), nil case ReceiptItemPaymentSubjectComposite: return []byte(s), nil case ReceiptItemPaymentSubjectAnother: return []byte(s), nil case ReceiptItemPaymentSubjectFine: return []byte(s), nil case ReceiptItemPaymentSubjectTax: return []byte(s), nil case ReceiptItemPaymentSubjectLien: return []byte(s), nil case ReceiptItemPaymentSubjectCost: return []byte(s), nil case ReceiptItemPaymentSubjectPensionInsuranceWithoutPayouts: return []byte(s), nil case ReceiptItemPaymentSubjectPensionInsuranceWithPayouts: return []byte(s), nil case ReceiptItemPaymentSubjectHealthInsuranceWithoutPayouts: return []byte(s), nil case ReceiptItemPaymentSubjectHealthInsuranceWithPayouts: return []byte(s), nil case ReceiptItemPaymentSubjectHealthInsurance: return []byte(s), nil case ReceiptItemPaymentSubjectCasino: return []byte(s), nil case ReceiptItemPaymentSubjectAgentWithdrawals: return []byte(s), nil case ReceiptItemPaymentSubjectNonMarkedExcise: return []byte(s), nil case ReceiptItemPaymentSubjectMarkedExcise: return []byte(s), nil case ReceiptItemPaymentSubjectMarked: return []byte(s), nil case ReceiptItemPaymentSubjectNonMarked: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ReceiptItemPaymentSubject) UnmarshalText(data []byte) error { switch ReceiptItemPaymentSubject(data) { case ReceiptItemPaymentSubjectCommodity: *s = ReceiptItemPaymentSubjectCommodity return nil case ReceiptItemPaymentSubjectExcise: *s = ReceiptItemPaymentSubjectExcise return nil case ReceiptItemPaymentSubjectJob: *s = ReceiptItemPaymentSubjectJob return nil case ReceiptItemPaymentSubjectService: *s = ReceiptItemPaymentSubjectService return nil case ReceiptItemPaymentSubjectGamblingBet: *s = ReceiptItemPaymentSubjectGamblingBet return nil case ReceiptItemPaymentSubjectGamblingPrize: *s = ReceiptItemPaymentSubjectGamblingPrize return nil case ReceiptItemPaymentSubjectLottery: *s = ReceiptItemPaymentSubjectLottery return nil case ReceiptItemPaymentSubjectLotteryPrize: *s = ReceiptItemPaymentSubjectLotteryPrize return nil case ReceiptItemPaymentSubjectIntellectualActivity: *s = ReceiptItemPaymentSubjectIntellectualActivity return nil case ReceiptItemPaymentSubjectPayment: *s = ReceiptItemPaymentSubjectPayment return nil case ReceiptItemPaymentSubjectAgentCommission: *s = ReceiptItemPaymentSubjectAgentCommission return nil case ReceiptItemPaymentSubjectPropertyRight: *s = ReceiptItemPaymentSubjectPropertyRight return nil case ReceiptItemPaymentSubjectNonOperatingGain: *s = ReceiptItemPaymentSubjectNonOperatingGain return nil case ReceiptItemPaymentSubjectInsurancePremium: *s = ReceiptItemPaymentSubjectInsurancePremium return nil case ReceiptItemPaymentSubjectSalesTax: *s = ReceiptItemPaymentSubjectSalesTax return nil case ReceiptItemPaymentSubjectResortFee: *s = ReceiptItemPaymentSubjectResortFee return nil case ReceiptItemPaymentSubjectComposite: *s = ReceiptItemPaymentSubjectComposite return nil case ReceiptItemPaymentSubjectAnother: *s = ReceiptItemPaymentSubjectAnother return nil case ReceiptItemPaymentSubjectFine: *s = ReceiptItemPaymentSubjectFine return nil case ReceiptItemPaymentSubjectTax: *s = ReceiptItemPaymentSubjectTax return nil case ReceiptItemPaymentSubjectLien: *s = ReceiptItemPaymentSubjectLien return nil case ReceiptItemPaymentSubjectCost: *s = ReceiptItemPaymentSubjectCost return nil case ReceiptItemPaymentSubjectPensionInsuranceWithoutPayouts: *s = ReceiptItemPaymentSubjectPensionInsuranceWithoutPayouts return nil case ReceiptItemPaymentSubjectPensionInsuranceWithPayouts: *s = ReceiptItemPaymentSubjectPensionInsuranceWithPayouts return nil case ReceiptItemPaymentSubjectHealthInsuranceWithoutPayouts: *s = ReceiptItemPaymentSubjectHealthInsuranceWithoutPayouts return nil case ReceiptItemPaymentSubjectHealthInsuranceWithPayouts: *s = ReceiptItemPaymentSubjectHealthInsuranceWithPayouts return nil case ReceiptItemPaymentSubjectHealthInsurance: *s = ReceiptItemPaymentSubjectHealthInsurance return nil case ReceiptItemPaymentSubjectCasino: *s = ReceiptItemPaymentSubjectCasino return nil case ReceiptItemPaymentSubjectAgentWithdrawals: *s = ReceiptItemPaymentSubjectAgentWithdrawals return nil case ReceiptItemPaymentSubjectNonMarkedExcise: *s = ReceiptItemPaymentSubjectNonMarkedExcise return nil case ReceiptItemPaymentSubjectMarkedExcise: *s = ReceiptItemPaymentSubjectMarkedExcise return nil case ReceiptItemPaymentSubjectMarked: *s = ReceiptItemPaymentSubjectMarked return nil case ReceiptItemPaymentSubjectNonMarked: *s = ReceiptItemPaymentSubjectNonMarked return nil default: return errors.Errorf("invalid value: %q", data) } } type ReceiptItemPaymentSubjectIndustryDetails []IndustryDetails type ReceiptItemPlannedStatus int32 type ReceiptItemProductCode string type ReceiptItemQuantity float64 // Merged schema. // Ref: #/components/schemas/ReceiptItemSupplierWithInn type ReceiptItemSupplierWithInn struct { // Наименование поставщика (тег в 54 ФЗ — 1225). Параметр // предусмотрен форматом фискальных документов (ФФД) и // является обязательным, начиная с версии 1.1. Name OptString `json:"name"` Phone OptString `json:"phone"` Inn OptString `json:"inn"` } // GetName returns the value of Name. func (s *ReceiptItemSupplierWithInn) GetName() OptString { return s.Name } // GetPhone returns the value of Phone. func (s *ReceiptItemSupplierWithInn) GetPhone() OptString { return s.Phone } // GetInn returns the value of Inn. func (s *ReceiptItemSupplierWithInn) GetInn() OptString { return s.Inn } // SetName sets the value of Name. func (s *ReceiptItemSupplierWithInn) SetName(val OptString) { s.Name = val } // SetPhone sets the value of Phone. func (s *ReceiptItemSupplierWithInn) SetPhone(val OptString) { s.Phone = val } // SetInn sets the value of Inn. func (s *ReceiptItemSupplierWithInn) SetInn(val OptString) { s.Inn = val } type ReceiptItemVatCode int32 // Данные операционного реквизита чека. type ReceiptReceiptOperationalDetails struct { // Идентификатор операции (тег в 54 ФЗ — 1271). Число от 0 до // 255. OperationID int `json:"operation_id"` // Данные операции (тег в 54 ФЗ — 1272). Value string `json:"value"` // Время создания операции (тег в 54 ФЗ — 1273). Указывается // по UTC: https://ru.wikipedia. // org/wiki/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F и передается в формате ISO 8601: https://en.wikipedia.org/wiki/ISO_8601. Пример: 2017-11-03T11:52:31.827Z. CreatedAt time.Time `json:"created_at"` } // GetOperationID returns the value of OperationID. func (s *ReceiptReceiptOperationalDetails) GetOperationID() int { return s.OperationID } // GetValue returns the value of Value. func (s *ReceiptReceiptOperationalDetails) GetValue() string { return s.Value } // GetCreatedAt returns the value of CreatedAt. func (s *ReceiptReceiptOperationalDetails) GetCreatedAt() time.Time { return s.CreatedAt } // SetOperationID sets the value of OperationID. func (s *ReceiptReceiptOperationalDetails) SetOperationID(val int) { s.OperationID = val } // SetValue sets the value of Value. func (s *ReceiptReceiptOperationalDetails) SetValue(val string) { s.Value = val } // SetCreatedAt sets the value of CreatedAt. func (s *ReceiptReceiptOperationalDetails) SetCreatedAt(val time.Time) { s.CreatedAt = val } // Ref: #/components/schemas/ReceiptRegistrationStatus type ReceiptRegistrationStatus string const ( ReceiptRegistrationStatusPending ReceiptRegistrationStatus = "pending" ReceiptRegistrationStatusSucceeded ReceiptRegistrationStatus = "succeeded" ReceiptRegistrationStatusCanceled ReceiptRegistrationStatus = "canceled" ) // AllValues returns all ReceiptRegistrationStatus values. func (ReceiptRegistrationStatus) AllValues() []ReceiptRegistrationStatus { return []ReceiptRegistrationStatus{ ReceiptRegistrationStatusPending, ReceiptRegistrationStatusSucceeded, ReceiptRegistrationStatusCanceled, } } // MarshalText implements encoding.TextMarshaler. func (s ReceiptRegistrationStatus) MarshalText() ([]byte, error) { switch s { case ReceiptRegistrationStatusPending: return []byte(s), nil case ReceiptRegistrationStatusSucceeded: return []byte(s), nil case ReceiptRegistrationStatusCanceled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ReceiptRegistrationStatus) UnmarshalText(data []byte) error { switch ReceiptRegistrationStatus(data) { case ReceiptRegistrationStatusPending: *s = ReceiptRegistrationStatusPending return nil case ReceiptRegistrationStatusSucceeded: *s = ReceiptRegistrationStatusSucceeded return nil case ReceiptRegistrationStatusCanceled: *s = ReceiptRegistrationStatusCanceled return nil default: return errors.Errorf("invalid value: %q", data) } } type ReceiptStatus string const ( ReceiptStatusPending ReceiptStatus = "pending" ReceiptStatusSucceeded ReceiptStatus = "succeeded" ReceiptStatusCanceled ReceiptStatus = "canceled" ) // AllValues returns all ReceiptStatus values. func (ReceiptStatus) AllValues() []ReceiptStatus { return []ReceiptStatus{ ReceiptStatusPending, ReceiptStatusSucceeded, ReceiptStatusCanceled, } } // MarshalText implements encoding.TextMarshaler. func (s ReceiptStatus) MarshalText() ([]byte, error) { switch s { case ReceiptStatusPending: return []byte(s), nil case ReceiptStatusSucceeded: return []byte(s), nil case ReceiptStatusCanceled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ReceiptStatus) UnmarshalText(data []byte) error { switch ReceiptStatus(data) { case ReceiptStatusPending: *s = ReceiptStatusPending return nil case ReceiptStatusSucceeded: *s = ReceiptStatusSucceeded return nil case ReceiptStatusCanceled: *s = ReceiptStatusCanceled return nil default: return errors.Errorf("invalid value: %q", data) } } // Тип чека в онлайн-кассе: приход (payment) или возврат // прихода (refund). // Ref: #/components/schemas/ReceiptType type ReceiptType string const ( ReceiptTypePayment ReceiptType = "payment" ReceiptTypeRefund ReceiptType = "refund" ) // AllValues returns all ReceiptType values. func (ReceiptType) AllValues() []ReceiptType { return []ReceiptType{ ReceiptTypePayment, ReceiptTypeRefund, } } // MarshalText implements encoding.TextMarshaler. func (s ReceiptType) MarshalText() ([]byte, error) { switch s { case ReceiptTypePayment: return []byte(s), nil case ReceiptTypeRefund: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ReceiptType) UnmarshalText(data []byte) error { switch ReceiptType(data) { case ReceiptTypePayment: *s = ReceiptTypePayment return nil case ReceiptTypeRefund: *s = ReceiptTypeRefund return nil default: return errors.Errorf("invalid value: %q", data) } } // Список чеков, созданных за последние три года. Чеки // отсортированы по времени создания в порядке убывания // (от новых к старым). Если результатов больше, чем // задано в limit, список будет выводиться фрагментами. В // этом случае в ответе на запрос вернется фрагмент // списка и параметр next_cursor с указателем на следующий // фрагмент. type ReceiptsGetOK struct { // Формат выдачи результатов запроса. Возможное // значение: list (список). Type ReceiptsGetOKType `json:"type"` Items []Receipt `json:"items"` NextCursor OptNextCursor `json:"next_cursor"` } // GetType returns the value of Type. func (s *ReceiptsGetOK) GetType() ReceiptsGetOKType { return s.Type } // GetItems returns the value of Items. func (s *ReceiptsGetOK) GetItems() []Receipt { return s.Items } // GetNextCursor returns the value of NextCursor. func (s *ReceiptsGetOK) GetNextCursor() OptNextCursor { return s.NextCursor } // SetType sets the value of Type. func (s *ReceiptsGetOK) SetType(val ReceiptsGetOKType) { s.Type = val } // SetItems sets the value of Items. func (s *ReceiptsGetOK) SetItems(val []Receipt) { s.Items = val } // SetNextCursor sets the value of NextCursor. func (s *ReceiptsGetOK) SetNextCursor(val OptNextCursor) { s.NextCursor = val } func (*ReceiptsGetOK) receiptsGetRes() {} // Формат выдачи результатов запроса. Возможное // значение: list (список). type ReceiptsGetOKType string const ( ReceiptsGetOKTypeList ReceiptsGetOKType = "list" ) // AllValues returns all ReceiptsGetOKType values. func (ReceiptsGetOKType) AllValues() []ReceiptsGetOKType { return []ReceiptsGetOKType{ ReceiptsGetOKTypeList, } } // MarshalText implements encoding.TextMarshaler. func (s ReceiptsGetOKType) MarshalText() ([]byte, error) { switch s { case ReceiptsGetOKTypeList: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ReceiptsGetOKType) UnmarshalText(data []byte) error { switch ReceiptsGetOKType(data) { case ReceiptsGetOKTypeList: *s = ReceiptsGetOKTypeList return nil default: return errors.Errorf("invalid value: %q", data) } } // Merged schema. // Ref: #/components/schemas/ReceiverBankAccount type ReceiverBankAccount struct { Type ReceiverType `json:"type"` // Номер банковского счета. Формат — 20 символов. AccountNumber string `json:"account_number"` // Банковский идентификационный код (БИК) банка, в // котором открыт счет. Формат — 9 символов. Bic string `json:"bic"` } // GetType returns the value of Type. func (s *ReceiverBankAccount) GetType() ReceiverType { return s.Type } // GetAccountNumber returns the value of AccountNumber. func (s *ReceiverBankAccount) GetAccountNumber() string { return s.AccountNumber } // GetBic returns the value of Bic. func (s *ReceiverBankAccount) GetBic() string { return s.Bic } // SetType sets the value of Type. func (s *ReceiverBankAccount) SetType(val ReceiverType) { s.Type = val } // SetAccountNumber sets the value of AccountNumber. func (s *ReceiverBankAccount) SetAccountNumber(val string) { s.AccountNumber = val } // SetBic sets the value of Bic. func (s *ReceiverBankAccount) SetBic(val string) { s.Bic = val } // Merged schema. // Ref: #/components/schemas/ReceiverDigitalWallet type ReceiverDigitalWallet struct { Type ReceiverType `json:"type"` // Идентификатор электронного кошелька для пополнения. // Максимум 20 символов. AccountNumber string `json:"account_number"` } // GetType returns the value of Type. func (s *ReceiverDigitalWallet) GetType() ReceiverType { return s.Type } // GetAccountNumber returns the value of AccountNumber. func (s *ReceiverDigitalWallet) GetAccountNumber() string { return s.AccountNumber } // SetType sets the value of Type. func (s *ReceiverDigitalWallet) SetType(val ReceiverType) { s.Type = val } // SetAccountNumber sets the value of AccountNumber. func (s *ReceiverDigitalWallet) SetAccountNumber(val string) { s.AccountNumber = val } // Merged schema. // Ref: #/components/schemas/ReceiverMobileBalance type ReceiverMobileBalance struct { Type ReceiverType `json:"type"` Phone string `json:"phone"` } // GetType returns the value of Type. func (s *ReceiverMobileBalance) GetType() ReceiverType { return s.Type } // GetPhone returns the value of Phone. func (s *ReceiverMobileBalance) GetPhone() string { return s.Phone } // SetType sets the value of Type. func (s *ReceiverMobileBalance) SetType(val ReceiverType) { s.Type = val } // SetPhone sets the value of Phone. func (s *ReceiverMobileBalance) SetPhone(val string) { s.Phone = val } // Payment receiver code. // Ref: #/components/schemas/ReceiverType type ReceiverType string const ( ReceiverTypeMobileBalance ReceiverType = "mobile_balance" ReceiverTypeDigitalWallet ReceiverType = "digital_wallet" ReceiverTypeBankAccount ReceiverType = "bank_account" ) // AllValues returns all ReceiverType values. func (ReceiverType) AllValues() []ReceiverType { return []ReceiverType{ ReceiverTypeMobileBalance, ReceiverTypeDigitalWallet, ReceiverTypeBankAccount, } } // MarshalText implements encoding.TextMarshaler. func (s ReceiverType) MarshalText() ([]byte, error) { switch s { case ReceiverTypeMobileBalance: return []byte(s), nil case ReceiverTypeDigitalWallet: return []byte(s), nil case ReceiverTypeBankAccount: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ReceiverType) UnmarshalText(data []byte) error { switch ReceiverType(data) { case ReceiverTypeMobileBalance: *s = ReceiverTypeMobileBalance return nil case ReceiverTypeDigitalWallet: *s = ReceiverTypeDigitalWallet return nil case ReceiverTypeBankAccount: *s = ReceiverTypeBankAccount return nil default: return errors.Errorf("invalid value: %q", data) } } // Получатель платежа. Нужен, если вы разделяете потоки // платежей в рамках одного аккаунта или создаете // платеж в адрес другого аккаунта. // Ref: #/components/schemas/Recipient type Recipient struct { GatewayID GatewayId `json:"gateway_id"` } // GetGatewayID returns the value of GatewayID. func (s *Recipient) GetGatewayID() GatewayId { return s.GatewayID } // SetGatewayID sets the value of GatewayID. func (s *Recipient) SetGatewayID(val GatewayId) { s.GatewayID = val } // Refund object (Refund) contains all the relevant information about the payment refund. // Ref: #/components/schemas/Refund type Refund struct { ID RefundId `json:"id"` PaymentID PaymentId `json:"payment_id"` Status RefundStatus `json:"status"` CancellationDetails OptRefundCancellationDetails `json:"cancellation_details"` ReceiptRegistration OptRefundReceiptRegistration `json:"receipt_registration"` // Время создания возврата. Указывается по UTC: https://ru. // wikipedia. // org/wiki/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F и передается в формате ISO 8601: https://en.wikipedia.org/wiki/ISO_8601, например 2017-11-03T11:52:31.827Z. CreatedAt time.Time `json:"created_at"` Amount RefundAmount `json:"amount"` // Основание для возврата денег пользователю. Description OptString `json:"description"` // Данные о том, с какого магазина и какую сумму нужно // удержать для проведения возврата. Присутствует, если // вы используете Сплитование платежей: https://yookassa. // ru/developers/solutions-for-platforms/split-payments/basics. Sources []RefundSourcesData `json:"sources"` Deal OptRefundDealInfo `json:"deal"` RefundMethod OptRefundRefundMethod `json:"refund_method"` RefundAuthorizationDetails OptRefundAuthorizationDetails `json:"refund_authorization_details"` Metadata OptMetadata `json:"metadata"` } // GetID returns the value of ID. func (s *Refund) GetID() RefundId { return s.ID } // GetPaymentID returns the value of PaymentID. func (s *Refund) GetPaymentID() PaymentId { return s.PaymentID } // GetStatus returns the value of Status. func (s *Refund) GetStatus() RefundStatus { return s.Status } // GetCancellationDetails returns the value of CancellationDetails. func (s *Refund) GetCancellationDetails() OptRefundCancellationDetails { return s.CancellationDetails } // GetReceiptRegistration returns the value of ReceiptRegistration. func (s *Refund) GetReceiptRegistration() OptRefundReceiptRegistration { return s.ReceiptRegistration } // GetCreatedAt returns the value of CreatedAt. func (s *Refund) GetCreatedAt() time.Time { return s.CreatedAt } // GetAmount returns the value of Amount. func (s *Refund) GetAmount() RefundAmount { return s.Amount } // GetDescription returns the value of Description. func (s *Refund) GetDescription() OptString { return s.Description } // GetSources returns the value of Sources. func (s *Refund) GetSources() []RefundSourcesData { return s.Sources } // GetDeal returns the value of Deal. func (s *Refund) GetDeal() OptRefundDealInfo { return s.Deal } // GetRefundMethod returns the value of RefundMethod. func (s *Refund) GetRefundMethod() OptRefundRefundMethod { return s.RefundMethod } // GetRefundAuthorizationDetails returns the value of RefundAuthorizationDetails. func (s *Refund) GetRefundAuthorizationDetails() OptRefundAuthorizationDetails { return s.RefundAuthorizationDetails } // GetMetadata returns the value of Metadata. func (s *Refund) GetMetadata() OptMetadata { return s.Metadata } // SetID sets the value of ID. func (s *Refund) SetID(val RefundId) { s.ID = val } // SetPaymentID sets the value of PaymentID. func (s *Refund) SetPaymentID(val PaymentId) { s.PaymentID = val } // SetStatus sets the value of Status. func (s *Refund) SetStatus(val RefundStatus) { s.Status = val } // SetCancellationDetails sets the value of CancellationDetails. func (s *Refund) SetCancellationDetails(val OptRefundCancellationDetails) { s.CancellationDetails = val } // SetReceiptRegistration sets the value of ReceiptRegistration. func (s *Refund) SetReceiptRegistration(val OptRefundReceiptRegistration) { s.ReceiptRegistration = val } // SetCreatedAt sets the value of CreatedAt. func (s *Refund) SetCreatedAt(val time.Time) { s.CreatedAt = val } // SetAmount sets the value of Amount. func (s *Refund) SetAmount(val RefundAmount) { s.Amount = val } // SetDescription sets the value of Description. func (s *Refund) SetDescription(val OptString) { s.Description = val } // SetSources sets the value of Sources. func (s *Refund) SetSources(val []RefundSourcesData) { s.Sources = val } // SetDeal sets the value of Deal. func (s *Refund) SetDeal(val OptRefundDealInfo) { s.Deal = val } // SetRefundMethod sets the value of RefundMethod. func (s *Refund) SetRefundMethod(val OptRefundRefundMethod) { s.RefundMethod = val } // SetRefundAuthorizationDetails sets the value of RefundAuthorizationDetails. func (s *Refund) SetRefundAuthorizationDetails(val OptRefundAuthorizationDetails) { s.RefundAuthorizationDetails = val } // SetMetadata sets the value of Metadata. func (s *Refund) SetMetadata(val OptMetadata) { s.Metadata = val } func (*Refund) refundsPostRes() {} func (*Refund) refundsRefundIDGetRes() {} // Сумма в выбранной валюте. type RefundAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *RefundAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *RefundAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *RefundAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *RefundAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Refund authorization details. Presented only for refunds made by these payment methods: bank card, // Mir Pay. // Ref: #/components/schemas/RefundAuthorizationDetails type RefundAuthorizationDetails struct { Rrn OptRrn `json:"rrn"` } // GetRrn returns the value of Rrn. func (s *RefundAuthorizationDetails) GetRrn() OptRrn { return s.Rrn } // SetRrn sets the value of Rrn. func (s *RefundAuthorizationDetails) SetRrn(val OptRrn) { s.Rrn = val } // Комментарий к статусу canceled: кто отменил возврат и по // какой причине. // Ref: #/components/schemas/RefundCancellationDetails type RefundCancellationDetails struct { // Участник процесса возврата, который принял решение // отменить транзакцию. Перечень и описание возможных // значений: https://yookassa. // ru/developers/payment-acceptance/after-the-payment/refunds#declined-refunds-cancellation-details-party. Party RefundCancellationDetailsParty `json:"party"` // Причина отмены возврата. Перечень и описание // возможных значений: https://yookassa. // ru/developers/payment-acceptance/after-the-payment/refunds#declined-refunds-cancellation-details-reason. Reason RefundCancellationDetailsReason `json:"reason"` } // GetParty returns the value of Party. func (s *RefundCancellationDetails) GetParty() RefundCancellationDetailsParty { return s.Party } // GetReason returns the value of Reason. func (s *RefundCancellationDetails) GetReason() RefundCancellationDetailsReason { return s.Reason } // SetParty sets the value of Party. func (s *RefundCancellationDetails) SetParty(val RefundCancellationDetailsParty) { s.Party = val } // SetReason sets the value of Reason. func (s *RefundCancellationDetails) SetReason(val RefundCancellationDetailsReason) { s.Reason = val } // Участник процесса возврата, который принял решение // отменить транзакцию. Перечень и описание возможных // значений: https://yookassa. // ru/developers/payment-acceptance/after-the-payment/refunds#declined-refunds-cancellation-details-party. type RefundCancellationDetailsParty string const ( RefundCancellationDetailsPartyYooMoney RefundCancellationDetailsParty = "yoo_money" RefundCancellationDetailsPartyRefundNetwork RefundCancellationDetailsParty = "refund_network" ) // AllValues returns all RefundCancellationDetailsParty values. func (RefundCancellationDetailsParty) AllValues() []RefundCancellationDetailsParty { return []RefundCancellationDetailsParty{ RefundCancellationDetailsPartyYooMoney, RefundCancellationDetailsPartyRefundNetwork, } } // MarshalText implements encoding.TextMarshaler. func (s RefundCancellationDetailsParty) MarshalText() ([]byte, error) { switch s { case RefundCancellationDetailsPartyYooMoney: return []byte(s), nil case RefundCancellationDetailsPartyRefundNetwork: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *RefundCancellationDetailsParty) UnmarshalText(data []byte) error { switch RefundCancellationDetailsParty(data) { case RefundCancellationDetailsPartyYooMoney: *s = RefundCancellationDetailsPartyYooMoney return nil case RefundCancellationDetailsPartyRefundNetwork: *s = RefundCancellationDetailsPartyRefundNetwork return nil default: return errors.Errorf("invalid value: %q", data) } } // Причина отмены возврата. Перечень и описание // возможных значений: https://yookassa. // ru/developers/payment-acceptance/after-the-payment/refunds#declined-refunds-cancellation-details-reason. type RefundCancellationDetailsReason string const ( RefundCancellationDetailsReasonYooMoneyAccountClosed RefundCancellationDetailsReason = "yoo_money_account_closed" RefundCancellationDetailsReasonInsufficientFunds RefundCancellationDetailsReason = "insufficient_funds" RefundCancellationDetailsReasonGeneralDecline RefundCancellationDetailsReason = "general_decline" RefundCancellationDetailsReasonRejectedByPayee RefundCancellationDetailsReason = "rejected_by_payee" RefundCancellationDetailsReasonRejectedByTimeout RefundCancellationDetailsReason = "rejected_by_timeout" RefundCancellationDetailsReasonPaymentBasketIDNotFound RefundCancellationDetailsReason = "payment_basket_id_not_found" RefundCancellationDetailsReasonPaymentArticleNumberNotFound RefundCancellationDetailsReason = "payment_article_number_not_found" RefundCancellationDetailsReasonPaymentTruCodeNotFound RefundCancellationDetailsReason = "payment_tru_code_not_found" RefundCancellationDetailsReasonTooManyRefundingArticles RefundCancellationDetailsReason = "too_many_refunding_articles" RefundCancellationDetailsReasonSomeArticlesAlreadyRefunded RefundCancellationDetailsReason = "some_articles_already_refunded" ) // AllValues returns all RefundCancellationDetailsReason values. func (RefundCancellationDetailsReason) AllValues() []RefundCancellationDetailsReason { return []RefundCancellationDetailsReason{ RefundCancellationDetailsReasonYooMoneyAccountClosed, RefundCancellationDetailsReasonInsufficientFunds, RefundCancellationDetailsReasonGeneralDecline, RefundCancellationDetailsReasonRejectedByPayee, RefundCancellationDetailsReasonRejectedByTimeout, RefundCancellationDetailsReasonPaymentBasketIDNotFound, RefundCancellationDetailsReasonPaymentArticleNumberNotFound, RefundCancellationDetailsReasonPaymentTruCodeNotFound, RefundCancellationDetailsReasonTooManyRefundingArticles, RefundCancellationDetailsReasonSomeArticlesAlreadyRefunded, } } // MarshalText implements encoding.TextMarshaler. func (s RefundCancellationDetailsReason) MarshalText() ([]byte, error) { switch s { case RefundCancellationDetailsReasonYooMoneyAccountClosed: return []byte(s), nil case RefundCancellationDetailsReasonInsufficientFunds: return []byte(s), nil case RefundCancellationDetailsReasonGeneralDecline: return []byte(s), nil case RefundCancellationDetailsReasonRejectedByPayee: return []byte(s), nil case RefundCancellationDetailsReasonRejectedByTimeout: return []byte(s), nil case RefundCancellationDetailsReasonPaymentBasketIDNotFound: return []byte(s), nil case RefundCancellationDetailsReasonPaymentArticleNumberNotFound: return []byte(s), nil case RefundCancellationDetailsReasonPaymentTruCodeNotFound: return []byte(s), nil case RefundCancellationDetailsReasonTooManyRefundingArticles: return []byte(s), nil case RefundCancellationDetailsReasonSomeArticlesAlreadyRefunded: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *RefundCancellationDetailsReason) UnmarshalText(data []byte) error { switch RefundCancellationDetailsReason(data) { case RefundCancellationDetailsReasonYooMoneyAccountClosed: *s = RefundCancellationDetailsReasonYooMoneyAccountClosed return nil case RefundCancellationDetailsReasonInsufficientFunds: *s = RefundCancellationDetailsReasonInsufficientFunds return nil case RefundCancellationDetailsReasonGeneralDecline: *s = RefundCancellationDetailsReasonGeneralDecline return nil case RefundCancellationDetailsReasonRejectedByPayee: *s = RefundCancellationDetailsReasonRejectedByPayee return nil case RefundCancellationDetailsReasonRejectedByTimeout: *s = RefundCancellationDetailsReasonRejectedByTimeout return nil case RefundCancellationDetailsReasonPaymentBasketIDNotFound: *s = RefundCancellationDetailsReasonPaymentBasketIDNotFound return nil case RefundCancellationDetailsReasonPaymentArticleNumberNotFound: *s = RefundCancellationDetailsReasonPaymentArticleNumberNotFound return nil case RefundCancellationDetailsReasonPaymentTruCodeNotFound: *s = RefundCancellationDetailsReasonPaymentTruCodeNotFound return nil case RefundCancellationDetailsReasonTooManyRefundingArticles: *s = RefundCancellationDetailsReasonTooManyRefundingArticles return nil case RefundCancellationDetailsReasonSomeArticlesAlreadyRefunded: *s = RefundCancellationDetailsReasonSomeArticlesAlreadyRefunded return nil default: return errors.Errorf("invalid value: %q", data) } } // Данные о сделке, в составе которой проходит возврат. // Необходимо передавать, если вы проводите Безопасную // сделку: https://yookassa.ru/developers/solutions-for-platforms/safe-deal/basics. // Ref: #/components/schemas/RefundDealData type RefundDealData struct { RefundSettlements SettlementRefundArray `json:"refund_settlements"` } // GetRefundSettlements returns the value of RefundSettlements. func (s *RefundDealData) GetRefundSettlements() SettlementRefundArray { return s.RefundSettlements } // SetRefundSettlements sets the value of RefundSettlements. func (s *RefundDealData) SetRefundSettlements(val SettlementRefundArray) { s.RefundSettlements = val } // Данные о сделке, в составе которой проходит возврат. // Присутствует, если вы проводите Безопасную сделку: // https://yookassa.ru/developers/solutions-for-platforms/safe-deal/basics. // Ref: #/components/schemas/RefundDealInfo type RefundDealInfo struct { ID string `json:"id"` RefundSettlements SettlementRefundArray `json:"refund_settlements"` } // GetID returns the value of ID. func (s *RefundDealInfo) GetID() string { return s.ID } // GetRefundSettlements returns the value of RefundSettlements. func (s *RefundDealInfo) GetRefundSettlements() SettlementRefundArray { return s.RefundSettlements } // SetID sets the value of ID. func (s *RefundDealInfo) SetID(val string) { s.ID = val } // SetRefundSettlements sets the value of RefundSettlements. func (s *RefundDealInfo) SetRefundSettlements(val SettlementRefundArray) { s.RefundSettlements = val } type RefundId string // Список возвратов. Возвраты отсортированы по времени // создания в порядке убывания (от новых к старым). Если // результатов больше, чем задано в limit, список будет // выводиться фрагментами. В этом случае в ответе на // запрос вернется фрагмент списка и параметр next_cursor с // указателем на следующий фрагмент. // Ref: #/components/schemas/RefundList type RefundList struct { // Формат выдачи результатов запроса. Возможное // значение: list (список). Type RefundListType `json:"type"` Items []Refund `json:"items"` NextCursor OptNextCursor `json:"next_cursor"` } // GetType returns the value of Type. func (s *RefundList) GetType() RefundListType { return s.Type } // GetItems returns the value of Items. func (s *RefundList) GetItems() []Refund { return s.Items } // GetNextCursor returns the value of NextCursor. func (s *RefundList) GetNextCursor() OptNextCursor { return s.NextCursor } // SetType sets the value of Type. func (s *RefundList) SetType(val RefundListType) { s.Type = val } // SetItems sets the value of Items. func (s *RefundList) SetItems(val []Refund) { s.Items = val } // SetNextCursor sets the value of NextCursor. func (s *RefundList) SetNextCursor(val OptNextCursor) { s.NextCursor = val } func (*RefundList) refundsGetRes() {} // Формат выдачи результатов запроса. Возможное // значение: list (список). type RefundListType string const ( RefundListTypeList RefundListType = "list" ) // AllValues returns all RefundListType values. func (RefundListType) AllValues() []RefundListType { return []RefundListType{ RefundListTypeList, } } // MarshalText implements encoding.TextMarshaler. func (s RefundListType) MarshalText() ([]byte, error) { switch s { case RefundListTypeList: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *RefundListType) UnmarshalText(data []byte) error { switch RefundListType(data) { case RefundListTypeList: *s = RefundListTypeList return nil default: return errors.Errorf("invalid value: %q", data) } } // Код способа оплаты, который использовался при // проведении платежа. // Ref: #/components/schemas/RefundMethodType type RefundMethodType string const ( RefundMethodTypeSbp RefundMethodType = "sbp" RefundMethodTypeElectronicCertificate RefundMethodType = "electronic_certificate" ) // AllValues returns all RefundMethodType values. func (RefundMethodType) AllValues() []RefundMethodType { return []RefundMethodType{ RefundMethodTypeSbp, RefundMethodTypeElectronicCertificate, } } // MarshalText implements encoding.TextMarshaler. func (s RefundMethodType) MarshalText() ([]byte, error) { switch s { case RefundMethodTypeSbp: return []byte(s), nil case RefundMethodTypeElectronicCertificate: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *RefundMethodType) UnmarshalText(data []byte) error { switch RefundMethodType(data) { case RefundMethodTypeSbp: *s = RefundMethodTypeSbp return nil case RefundMethodTypeElectronicCertificate: *s = RefundMethodTypeElectronicCertificate return nil default: return errors.Errorf("invalid value: %q", data) } } type RefundReceiptRegistration string const ( RefundReceiptRegistrationPending RefundReceiptRegistration = "pending" RefundReceiptRegistrationSucceeded RefundReceiptRegistration = "succeeded" RefundReceiptRegistrationCanceled RefundReceiptRegistration = "canceled" ) // AllValues returns all RefundReceiptRegistration values. func (RefundReceiptRegistration) AllValues() []RefundReceiptRegistration { return []RefundReceiptRegistration{ RefundReceiptRegistrationPending, RefundReceiptRegistrationSucceeded, RefundReceiptRegistrationCanceled, } } // MarshalText implements encoding.TextMarshaler. func (s RefundReceiptRegistration) MarshalText() ([]byte, error) { switch s { case RefundReceiptRegistrationPending: return []byte(s), nil case RefundReceiptRegistrationSucceeded: return []byte(s), nil case RefundReceiptRegistrationCanceled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *RefundReceiptRegistration) UnmarshalText(data []byte) error { switch RefundReceiptRegistration(data) { case RefundReceiptRegistrationPending: *s = RefundReceiptRegistrationPending return nil case RefundReceiptRegistrationSucceeded: *s = RefundReceiptRegistrationSucceeded return nil case RefundReceiptRegistrationCanceled: *s = RefundReceiptRegistrationCanceled return nil default: return errors.Errorf("invalid value: %q", data) } } // RefundRefundMethod represents sum type. type RefundRefundMethod struct { Type RefundRefundMethodType // switch on this field SbpRefundMethod SbpRefundMethod ElectronicCertificateRefundMethod ElectronicCertificateRefundMethod } // RefundRefundMethodType is oneOf type of RefundRefundMethod. type RefundRefundMethodType string // Possible values for RefundRefundMethodType. const ( SbpRefundMethodRefundRefundMethod RefundRefundMethodType = "SbpRefundMethod" ElectronicCertificateRefundMethodRefundRefundMethod RefundRefundMethodType = "ElectronicCertificateRefundMethod" ) // IsSbpRefundMethod reports whether RefundRefundMethod is SbpRefundMethod. func (s RefundRefundMethod) IsSbpRefundMethod() bool { return s.Type == SbpRefundMethodRefundRefundMethod } // IsElectronicCertificateRefundMethod reports whether RefundRefundMethod is ElectronicCertificateRefundMethod. func (s RefundRefundMethod) IsElectronicCertificateRefundMethod() bool { return s.Type == ElectronicCertificateRefundMethodRefundRefundMethod } // SetSbpRefundMethod sets RefundRefundMethod to SbpRefundMethod. func (s *RefundRefundMethod) SetSbpRefundMethod(v SbpRefundMethod) { s.Type = SbpRefundMethodRefundRefundMethod s.SbpRefundMethod = v } // GetSbpRefundMethod returns SbpRefundMethod and true boolean if RefundRefundMethod is SbpRefundMethod. func (s RefundRefundMethod) GetSbpRefundMethod() (v SbpRefundMethod, ok bool) { if !s.IsSbpRefundMethod() { return v, false } return s.SbpRefundMethod, true } // NewSbpRefundMethodRefundRefundMethod returns new RefundRefundMethod from SbpRefundMethod. func NewSbpRefundMethodRefundRefundMethod(v SbpRefundMethod) RefundRefundMethod { var s RefundRefundMethod s.SetSbpRefundMethod(v) return s } // SetElectronicCertificateRefundMethod sets RefundRefundMethod to ElectronicCertificateRefundMethod. func (s *RefundRefundMethod) SetElectronicCertificateRefundMethod(v ElectronicCertificateRefundMethod) { s.Type = ElectronicCertificateRefundMethodRefundRefundMethod s.ElectronicCertificateRefundMethod = v } // GetElectronicCertificateRefundMethod returns ElectronicCertificateRefundMethod and true boolean if RefundRefundMethod is ElectronicCertificateRefundMethod. func (s RefundRefundMethod) GetElectronicCertificateRefundMethod() (v ElectronicCertificateRefundMethod, ok bool) { if !s.IsElectronicCertificateRefundMethod() { return v, false } return s.ElectronicCertificateRefundMethod, true } // NewElectronicCertificateRefundMethodRefundRefundMethod returns new RefundRefundMethod from ElectronicCertificateRefundMethod. func NewElectronicCertificateRefundMethodRefundRefundMethod(v ElectronicCertificateRefundMethod) RefundRefundMethod { var s RefundRefundMethod s.SetElectronicCertificateRefundMethod(v) return s } // Данные о том, с какого магазина и какую сумму нужно // удержать для проведения возврата. Сейчас в этом // параметре можно передать данные только одного // магазина. // Ref: #/components/schemas/RefundSourcesData type RefundSourcesData struct { AccountID string `json:"account_id"` Amount RefundSourcesDataAmount `json:"amount"` PlatformFeeAmount OptRefundSourcesDataPlatformFeeAmount `json:"platform_fee_amount"` } // GetAccountID returns the value of AccountID. func (s *RefundSourcesData) GetAccountID() string { return s.AccountID } // GetAmount returns the value of Amount. func (s *RefundSourcesData) GetAmount() RefundSourcesDataAmount { return s.Amount } // GetPlatformFeeAmount returns the value of PlatformFeeAmount. func (s *RefundSourcesData) GetPlatformFeeAmount() OptRefundSourcesDataPlatformFeeAmount { return s.PlatformFeeAmount } // SetAccountID sets the value of AccountID. func (s *RefundSourcesData) SetAccountID(val string) { s.AccountID = val } // SetAmount sets the value of Amount. func (s *RefundSourcesData) SetAmount(val RefundSourcesDataAmount) { s.Amount = val } // SetPlatformFeeAmount sets the value of PlatformFeeAmount. func (s *RefundSourcesData) SetPlatformFeeAmount(val OptRefundSourcesDataPlatformFeeAmount) { s.PlatformFeeAmount = val } // Merged schema. type RefundSourcesDataAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *RefundSourcesDataAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *RefundSourcesDataAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *RefundSourcesDataAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *RefundSourcesDataAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Merged schema. type RefundSourcesDataPlatformFeeAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *RefundSourcesDataPlatformFeeAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *RefundSourcesDataPlatformFeeAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *RefundSourcesDataPlatformFeeAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *RefundSourcesDataPlatformFeeAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Статус возврата платежа. Возможные значения: pending — // возврат создан, но пока еще обрабатывается; succeeded — // возврат успешно завершен, указанная в запросе сумма // переведена на платежное средство пользователя // (финальный и неизменяемый статус); canceled — возврат // отменен, инициатор и причина отмены указаны в объекте // cancellation_details (финальный и неизменяемый статус). // Ref: #/components/schemas/RefundStatus type RefundStatus string const ( RefundStatusPending RefundStatus = "pending" RefundStatusSucceeded RefundStatus = "succeeded" RefundStatusCanceled RefundStatus = "canceled" ) // AllValues returns all RefundStatus values. func (RefundStatus) AllValues() []RefundStatus { return []RefundStatus{ RefundStatusPending, RefundStatusSucceeded, RefundStatusCanceled, } } // MarshalText implements encoding.TextMarshaler. func (s RefundStatus) MarshalText() ([]byte, error) { switch s { case RefundStatusPending: return []byte(s), nil case RefundStatusSucceeded: return []byte(s), nil case RefundStatusCanceled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *RefundStatus) UnmarshalText(data []byte) error { switch RefundStatus(data) { case RefundStatusPending: *s = RefundStatusPending return nil case RefundStatusSucceeded: *s = RefundStatusSucceeded return nil case RefundStatusCanceled: *s = RefundStatusCanceled return nil default: return errors.Errorf("invalid value: %q", data) } } type RefundsPostReq struct { PaymentID PaymentId `json:"payment_id"` Amount RefundsPostReqAmount `json:"amount"` // Комментарий к возврату, основание для возврата денег // пользователю. Description OptString `json:"description"` Receipt OptReceiptData `json:"receipt"` // Данные о том, с какого магазина и какую сумму нужно // удержать для проведения возврата. Необходимо // передавать, если вы используете Сплитование // платежей: https://yookassa.ru/developers/solutions-for-platforms/split-payments/basics. // Сейчас в этом параметре можно передать данные только // одного магазина. Sources []RefundSourcesData `json:"sources"` Deal OptRefundDealData `json:"deal"` RefundMethodData OptRefundsPostReqRefundMethodData `json:"refund_method_data"` Metadata OptMetadata `json:"metadata"` } // GetPaymentID returns the value of PaymentID. func (s *RefundsPostReq) GetPaymentID() PaymentId { return s.PaymentID } // GetAmount returns the value of Amount. func (s *RefundsPostReq) GetAmount() RefundsPostReqAmount { return s.Amount } // GetDescription returns the value of Description. func (s *RefundsPostReq) GetDescription() OptString { return s.Description } // GetReceipt returns the value of Receipt. func (s *RefundsPostReq) GetReceipt() OptReceiptData { return s.Receipt } // GetSources returns the value of Sources. func (s *RefundsPostReq) GetSources() []RefundSourcesData { return s.Sources } // GetDeal returns the value of Deal. func (s *RefundsPostReq) GetDeal() OptRefundDealData { return s.Deal } // GetRefundMethodData returns the value of RefundMethodData. func (s *RefundsPostReq) GetRefundMethodData() OptRefundsPostReqRefundMethodData { return s.RefundMethodData } // GetMetadata returns the value of Metadata. func (s *RefundsPostReq) GetMetadata() OptMetadata { return s.Metadata } // SetPaymentID sets the value of PaymentID. func (s *RefundsPostReq) SetPaymentID(val PaymentId) { s.PaymentID = val } // SetAmount sets the value of Amount. func (s *RefundsPostReq) SetAmount(val RefundsPostReqAmount) { s.Amount = val } // SetDescription sets the value of Description. func (s *RefundsPostReq) SetDescription(val OptString) { s.Description = val } // SetReceipt sets the value of Receipt. func (s *RefundsPostReq) SetReceipt(val OptReceiptData) { s.Receipt = val } // SetSources sets the value of Sources. func (s *RefundsPostReq) SetSources(val []RefundSourcesData) { s.Sources = val } // SetDeal sets the value of Deal. func (s *RefundsPostReq) SetDeal(val OptRefundDealData) { s.Deal = val } // SetRefundMethodData sets the value of RefundMethodData. func (s *RefundsPostReq) SetRefundMethodData(val OptRefundsPostReqRefundMethodData) { s.RefundMethodData = val } // SetMetadata sets the value of Metadata. func (s *RefundsPostReq) SetMetadata(val OptMetadata) { s.Metadata = val } // Сумма в выбранной валюте. type RefundsPostReqAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *RefundsPostReqAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *RefundsPostReqAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *RefundsPostReqAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *RefundsPostReqAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // RefundsPostReqRefundMethodData represents sum type. type RefundsPostReqRefundMethodData struct { Type RefundsPostReqRefundMethodDataType // switch on this field ElectronicCertificateRefundMethodData ElectronicCertificateRefundMethodData } // RefundsPostReqRefundMethodDataType is oneOf type of RefundsPostReqRefundMethodData. type RefundsPostReqRefundMethodDataType string // Possible values for RefundsPostReqRefundMethodDataType. const ( ElectronicCertificateRefundMethodDataRefundsPostReqRefundMethodData RefundsPostReqRefundMethodDataType = "ElectronicCertificateRefundMethodData" ) // IsElectronicCertificateRefundMethodData reports whether RefundsPostReqRefundMethodData is ElectronicCertificateRefundMethodData. func (s RefundsPostReqRefundMethodData) IsElectronicCertificateRefundMethodData() bool { return s.Type == ElectronicCertificateRefundMethodDataRefundsPostReqRefundMethodData } // SetElectronicCertificateRefundMethodData sets RefundsPostReqRefundMethodData to ElectronicCertificateRefundMethodData. func (s *RefundsPostReqRefundMethodData) SetElectronicCertificateRefundMethodData(v ElectronicCertificateRefundMethodData) { s.Type = ElectronicCertificateRefundMethodDataRefundsPostReqRefundMethodData s.ElectronicCertificateRefundMethodData = v } // GetElectronicCertificateRefundMethodData returns ElectronicCertificateRefundMethodData and true boolean if RefundsPostReqRefundMethodData is ElectronicCertificateRefundMethodData. func (s RefundsPostReqRefundMethodData) GetElectronicCertificateRefundMethodData() (v ElectronicCertificateRefundMethodData, ok bool) { if !s.IsElectronicCertificateRefundMethodData() { return v, false } return s.ElectronicCertificateRefundMethodData, true } // NewElectronicCertificateRefundMethodDataRefundsPostReqRefundMethodData returns new RefundsPostReqRefundMethodData from ElectronicCertificateRefundMethodData. func NewElectronicCertificateRefundMethodDataRefundsPostReqRefundMethodData(v ElectronicCertificateRefundMethodData) RefundsPostReqRefundMethodData { var s RefundsPostReqRefundMethodData s.SetElectronicCertificateRefundMethodData(v) return s } type ReturnUrl string type Rrn string // Merged schema. // Ref: #/components/schemas/SafeDeal type SafeDeal struct { Type DealType `json:"type"` ID DealId `json:"id"` FeeMoment FeeMoment `json:"fee_moment"` Description OptString `json:"description"` Balance SafeDealBalance `json:"balance"` PayoutBalance SafeDealPayoutBalance `json:"payout_balance"` Status DealStatus `json:"status"` // Время создания сделки. Указывается по UTC: https://ru.wikipedia. // org/wiki/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F и передается в формате ISO 8601: https://en.wikipedia.org/wiki/ISO_8601. Пример: 2017-11-03T11:52:31.827Z. CreatedAt time.Time `json:"created_at"` // Время автоматического закрытия сделки. Если в // указанное время сделка всё еще в статусе opened, ЮKassa // вернет деньги покупателю и закроет сделку. По // умолчанию время жизни сделки составляет 90 дней. Время // указывается по UTC: https://ru.wikipedia. // org/wiki/%D0%92%D1%81%D0%B5%D0%BC%D0%B8%D1%80%D0%BD%D0%BE%D0%B5_%D0%BA%D0%BE%D0%BE%D1%80%D0%B4%D0%B8%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5_%D0%B2%D1%80%D0%B5%D0%BC%D1%8F и передается в формате ISO 8601: https://en.wikipedia.org/wiki/ISO_8601. Пример: 2017-11-03T11:52:31.827Z. ExpiresAt time.Time `json:"expires_at"` Metadata OptMetadata `json:"metadata"` Test Test `json:"test"` } // GetType returns the value of Type. func (s *SafeDeal) GetType() DealType { return s.Type } // GetID returns the value of ID. func (s *SafeDeal) GetID() DealId { return s.ID } // GetFeeMoment returns the value of FeeMoment. func (s *SafeDeal) GetFeeMoment() FeeMoment { return s.FeeMoment } // GetDescription returns the value of Description. func (s *SafeDeal) GetDescription() OptString { return s.Description } // GetBalance returns the value of Balance. func (s *SafeDeal) GetBalance() SafeDealBalance { return s.Balance } // GetPayoutBalance returns the value of PayoutBalance. func (s *SafeDeal) GetPayoutBalance() SafeDealPayoutBalance { return s.PayoutBalance } // GetStatus returns the value of Status. func (s *SafeDeal) GetStatus() DealStatus { return s.Status } // GetCreatedAt returns the value of CreatedAt. func (s *SafeDeal) GetCreatedAt() time.Time { return s.CreatedAt } // GetExpiresAt returns the value of ExpiresAt. func (s *SafeDeal) GetExpiresAt() time.Time { return s.ExpiresAt } // GetMetadata returns the value of Metadata. func (s *SafeDeal) GetMetadata() OptMetadata { return s.Metadata } // GetTest returns the value of Test. func (s *SafeDeal) GetTest() Test { return s.Test } // SetType sets the value of Type. func (s *SafeDeal) SetType(val DealType) { s.Type = val } // SetID sets the value of ID. func (s *SafeDeal) SetID(val DealId) { s.ID = val } // SetFeeMoment sets the value of FeeMoment. func (s *SafeDeal) SetFeeMoment(val FeeMoment) { s.FeeMoment = val } // SetDescription sets the value of Description. func (s *SafeDeal) SetDescription(val OptString) { s.Description = val } // SetBalance sets the value of Balance. func (s *SafeDeal) SetBalance(val SafeDealBalance) { s.Balance = val } // SetPayoutBalance sets the value of PayoutBalance. func (s *SafeDeal) SetPayoutBalance(val SafeDealPayoutBalance) { s.PayoutBalance = val } // SetStatus sets the value of Status. func (s *SafeDeal) SetStatus(val DealStatus) { s.Status = val } // SetCreatedAt sets the value of CreatedAt. func (s *SafeDeal) SetCreatedAt(val time.Time) { s.CreatedAt = val } // SetExpiresAt sets the value of ExpiresAt. func (s *SafeDeal) SetExpiresAt(val time.Time) { s.ExpiresAt = val } // SetMetadata sets the value of Metadata. func (s *SafeDeal) SetMetadata(val OptMetadata) { s.Metadata = val } // SetTest sets the value of Test. func (s *SafeDeal) SetTest(val Test) { s.Test = val } func (*SafeDeal) dealsDealIDGetRes() {} func (*SafeDeal) dealsPostRes() {} // Сумма в выбранной валюте. type SafeDealBalance struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *SafeDealBalance) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *SafeDealBalance) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *SafeDealBalance) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *SafeDealBalance) SetCurrency(val CurrencyCode) { s.Currency = val } // Сумма в выбранной валюте. type SafeDealPayoutBalance struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *SafeDealPayoutBalance) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *SafeDealPayoutBalance) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *SafeDealPayoutBalance) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *SafeDealPayoutBalance) SetCurrency(val CurrencyCode) { s.Currency = val } // Данные для создания сделки. // Ref: #/components/schemas/SafeDealRequest type SafeDealRequest struct { Type DealType `json:"type"` FeeMoment FeeMoment `json:"fee_moment"` Metadata OptMetadata `json:"metadata"` Description OptString `json:"description"` } // GetType returns the value of Type. func (s *SafeDealRequest) GetType() DealType { return s.Type } // GetFeeMoment returns the value of FeeMoment. func (s *SafeDealRequest) GetFeeMoment() FeeMoment { return s.FeeMoment } // GetMetadata returns the value of Metadata. func (s *SafeDealRequest) GetMetadata() OptMetadata { return s.Metadata } // GetDescription returns the value of Description. func (s *SafeDealRequest) GetDescription() OptString { return s.Description } // SetType sets the value of Type. func (s *SafeDealRequest) SetType(val DealType) { s.Type = val } // SetFeeMoment sets the value of FeeMoment. func (s *SafeDealRequest) SetFeeMoment(val FeeMoment) { s.FeeMoment = val } // SetMetadata sets the value of Metadata. func (s *SafeDealRequest) SetMetadata(val OptMetadata) { s.Metadata = val } // SetDescription sets the value of Description. func (s *SafeDealRequest) SetDescription(val OptString) { s.Description = val } type SavePaymentMethodAttribute bool // Merged schema. // Ref: #/components/schemas/SavePaymentMethodBankCard type SavePaymentMethodBankCard struct { Type SavePaymentMethodType `json:"type"` // Идентификатор сохраненного способа оплаты. ID string `json:"id"` // Признак сохранения способа оплаты для автоплатежей: // https://yookassa. // ru/developers/payment-acceptance/scenario-extensions/recurring-payments/pay-with-saved. // Возможные значения: * true — способ оплаты сохранен для // автоплатежей и выплат; * false — способ оплаты не // сохранен. Saved bool `json:"saved"` Status PaymentMethodStatus `json:"status"` // Данные магазина, для которого сохраняется способ // оплаты. Holder SavePaymentMethodBankCardHolder `json:"holder"` Title OptPaymentMethodTitle `json:"title"` Confirmation OptSavePaymentMethodBankCardConfirmation `json:"confirmation"` Card OptBankCardData `json:"card"` } // GetType returns the value of Type. func (s *SavePaymentMethodBankCard) GetType() SavePaymentMethodType { return s.Type } // GetID returns the value of ID. func (s *SavePaymentMethodBankCard) GetID() string { return s.ID } // GetSaved returns the value of Saved. func (s *SavePaymentMethodBankCard) GetSaved() bool { return s.Saved } // GetStatus returns the value of Status. func (s *SavePaymentMethodBankCard) GetStatus() PaymentMethodStatus { return s.Status } // GetHolder returns the value of Holder. func (s *SavePaymentMethodBankCard) GetHolder() SavePaymentMethodBankCardHolder { return s.Holder } // GetTitle returns the value of Title. func (s *SavePaymentMethodBankCard) GetTitle() OptPaymentMethodTitle { return s.Title } // GetConfirmation returns the value of Confirmation. func (s *SavePaymentMethodBankCard) GetConfirmation() OptSavePaymentMethodBankCardConfirmation { return s.Confirmation } // GetCard returns the value of Card. func (s *SavePaymentMethodBankCard) GetCard() OptBankCardData { return s.Card } // SetType sets the value of Type. func (s *SavePaymentMethodBankCard) SetType(val SavePaymentMethodType) { s.Type = val } // SetID sets the value of ID. func (s *SavePaymentMethodBankCard) SetID(val string) { s.ID = val } // SetSaved sets the value of Saved. func (s *SavePaymentMethodBankCard) SetSaved(val bool) { s.Saved = val } // SetStatus sets the value of Status. func (s *SavePaymentMethodBankCard) SetStatus(val PaymentMethodStatus) { s.Status = val } // SetHolder sets the value of Holder. func (s *SavePaymentMethodBankCard) SetHolder(val SavePaymentMethodBankCardHolder) { s.Holder = val } // SetTitle sets the value of Title. func (s *SavePaymentMethodBankCard) SetTitle(val OptPaymentMethodTitle) { s.Title = val } // SetConfirmation sets the value of Confirmation. func (s *SavePaymentMethodBankCard) SetConfirmation(val OptSavePaymentMethodBankCardConfirmation) { s.Confirmation = val } // SetCard sets the value of Card. func (s *SavePaymentMethodBankCard) SetCard(val OptBankCardData) { s.Card = val } // SavePaymentMethodBankCardConfirmation represents sum type. type SavePaymentMethodBankCardConfirmation struct { Type SavePaymentMethodBankCardConfirmationType // switch on this field PaymentMethodsConfirmationRedirect PaymentMethodsConfirmationRedirect } // SavePaymentMethodBankCardConfirmationType is oneOf type of SavePaymentMethodBankCardConfirmation. type SavePaymentMethodBankCardConfirmationType string // Possible values for SavePaymentMethodBankCardConfirmationType. const ( PaymentMethodsConfirmationRedirectSavePaymentMethodBankCardConfirmation SavePaymentMethodBankCardConfirmationType = "redirect" ) // IsPaymentMethodsConfirmationRedirect reports whether SavePaymentMethodBankCardConfirmation is PaymentMethodsConfirmationRedirect. func (s SavePaymentMethodBankCardConfirmation) IsPaymentMethodsConfirmationRedirect() bool { return s.Type == PaymentMethodsConfirmationRedirectSavePaymentMethodBankCardConfirmation } // SetPaymentMethodsConfirmationRedirect sets SavePaymentMethodBankCardConfirmation to PaymentMethodsConfirmationRedirect. func (s *SavePaymentMethodBankCardConfirmation) SetPaymentMethodsConfirmationRedirect(v PaymentMethodsConfirmationRedirect) { s.Type = PaymentMethodsConfirmationRedirectSavePaymentMethodBankCardConfirmation s.PaymentMethodsConfirmationRedirect = v } // GetPaymentMethodsConfirmationRedirect returns PaymentMethodsConfirmationRedirect and true boolean if SavePaymentMethodBankCardConfirmation is PaymentMethodsConfirmationRedirect. func (s SavePaymentMethodBankCardConfirmation) GetPaymentMethodsConfirmationRedirect() (v PaymentMethodsConfirmationRedirect, ok bool) { if !s.IsPaymentMethodsConfirmationRedirect() { return v, false } return s.PaymentMethodsConfirmationRedirect, true } // NewPaymentMethodsConfirmationRedirectSavePaymentMethodBankCardConfirmation returns new SavePaymentMethodBankCardConfirmation from PaymentMethodsConfirmationRedirect. func NewPaymentMethodsConfirmationRedirectSavePaymentMethodBankCardConfirmation(v PaymentMethodsConfirmationRedirect) SavePaymentMethodBankCardConfirmation { var s SavePaymentMethodBankCardConfirmation s.SetPaymentMethodsConfirmationRedirect(v) return s } // Данные магазина, для которого сохраняется способ // оплаты. type SavePaymentMethodBankCardHolder struct { AccountID AccountId `json:"account_id"` GatewayID OptGatewayId `json:"gateway_id"` } // GetAccountID returns the value of AccountID. func (s *SavePaymentMethodBankCardHolder) GetAccountID() AccountId { return s.AccountID } // GetGatewayID returns the value of GatewayID. func (s *SavePaymentMethodBankCardHolder) GetGatewayID() OptGatewayId { return s.GatewayID } // SetAccountID sets the value of AccountID. func (s *SavePaymentMethodBankCardHolder) SetAccountID(val AccountId) { s.AccountID = val } // SetGatewayID sets the value of GatewayID. func (s *SavePaymentMethodBankCardHolder) SetGatewayID(val OptGatewayId) { s.GatewayID = val } // Merged schema. // Ref: #/components/schemas/SavePaymentMethodDataBankCard type SavePaymentMethodDataBankCard struct { Type SavePaymentMethodDataBankCardType `json:"type"` Holder OptSavePaymentMethodDataBankCardHolder `json:"holder"` ClientIP OptClientIp `json:"client_ip"` Confirmation OptPaymentMethodsConfirmationDataRedirect `json:"confirmation"` Card OptCardRequestData `json:"card"` } // GetType returns the value of Type. func (s *SavePaymentMethodDataBankCard) GetType() SavePaymentMethodDataBankCardType { return s.Type } // GetHolder returns the value of Holder. func (s *SavePaymentMethodDataBankCard) GetHolder() OptSavePaymentMethodDataBankCardHolder { return s.Holder } // GetClientIP returns the value of ClientIP. func (s *SavePaymentMethodDataBankCard) GetClientIP() OptClientIp { return s.ClientIP } // GetConfirmation returns the value of Confirmation. func (s *SavePaymentMethodDataBankCard) GetConfirmation() OptPaymentMethodsConfirmationDataRedirect { return s.Confirmation } // GetCard returns the value of Card. func (s *SavePaymentMethodDataBankCard) GetCard() OptCardRequestData { return s.Card } // SetType sets the value of Type. func (s *SavePaymentMethodDataBankCard) SetType(val SavePaymentMethodDataBankCardType) { s.Type = val } // SetHolder sets the value of Holder. func (s *SavePaymentMethodDataBankCard) SetHolder(val OptSavePaymentMethodDataBankCardHolder) { s.Holder = val } // SetClientIP sets the value of ClientIP. func (s *SavePaymentMethodDataBankCard) SetClientIP(val OptClientIp) { s.ClientIP = val } // SetConfirmation sets the value of Confirmation. func (s *SavePaymentMethodDataBankCard) SetConfirmation(val OptPaymentMethodsConfirmationDataRedirect) { s.Confirmation = val } // SetCard sets the value of Card. func (s *SavePaymentMethodDataBankCard) SetCard(val OptCardRequestData) { s.Card = val } // Получатель платежа. Нужен, если вы разделяете потоки // платежей в рамках одного аккаунта или создаете // платеж в адрес другого аккаунта. type SavePaymentMethodDataBankCardHolder struct { GatewayID GatewayId `json:"gateway_id"` } // GetGatewayID returns the value of GatewayID. func (s *SavePaymentMethodDataBankCardHolder) GetGatewayID() GatewayId { return s.GatewayID } // SetGatewayID sets the value of GatewayID. func (s *SavePaymentMethodDataBankCardHolder) SetGatewayID(val GatewayId) { s.GatewayID = val } type SavePaymentMethodDataBankCardType string const ( SavePaymentMethodDataBankCardTypeBankCard SavePaymentMethodDataBankCardType = "bank_card" ) // AllValues returns all SavePaymentMethodDataBankCardType values. func (SavePaymentMethodDataBankCardType) AllValues() []SavePaymentMethodDataBankCardType { return []SavePaymentMethodDataBankCardType{ SavePaymentMethodDataBankCardTypeBankCard, } } // MarshalText implements encoding.TextMarshaler. func (s SavePaymentMethodDataBankCardType) MarshalText() ([]byte, error) { switch s { case SavePaymentMethodDataBankCardTypeBankCard: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *SavePaymentMethodDataBankCardType) UnmarshalText(data []byte) error { switch SavePaymentMethodDataBankCardType(data) { case SavePaymentMethodDataBankCardTypeBankCard: *s = SavePaymentMethodDataBankCardTypeBankCard return nil default: return errors.Errorf("invalid value: %q", data) } } // Тип способа оплаты. // Ref: #/components/schemas/SavePaymentMethodType type SavePaymentMethodType string const ( SavePaymentMethodTypeBankCard SavePaymentMethodType = "bank_card" ) // AllValues returns all SavePaymentMethodType values. func (SavePaymentMethodType) AllValues() []SavePaymentMethodType { return []SavePaymentMethodType{ SavePaymentMethodTypeBankCard, } } // MarshalText implements encoding.TextMarshaler. func (s SavePaymentMethodType) MarshalText() ([]byte, error) { switch s { case SavePaymentMethodTypeBankCard: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *SavePaymentMethodType) UnmarshalText(data []byte) error { switch SavePaymentMethodType(data) { case SavePaymentMethodTypeBankCard: *s = SavePaymentMethodTypeBankCard return nil default: return errors.Errorf("invalid value: %q", data) } } type SbpBankBic string type SbpBankId string type SbpBanksGetInternalServerError TooManyRequests func (*SbpBanksGetInternalServerError) sbpBanksGetRes() {} // Список участников СБП. Участники СБП отсортированы // по идентификатору участника в порядке убывания. type SbpBanksGetOK struct { // Формат выдачи результатов запроса. Возможное // значение: list (список). Type SbpBanksGetOKType `json:"type"` Items []SbpParticipantBank `json:"items"` } // GetType returns the value of Type. func (s *SbpBanksGetOK) GetType() SbpBanksGetOKType { return s.Type } // GetItems returns the value of Items. func (s *SbpBanksGetOK) GetItems() []SbpParticipantBank { return s.Items } // SetType sets the value of Type. func (s *SbpBanksGetOK) SetType(val SbpBanksGetOKType) { s.Type = val } // SetItems sets the value of Items. func (s *SbpBanksGetOK) SetItems(val []SbpParticipantBank) { s.Items = val } func (*SbpBanksGetOK) sbpBanksGetRes() {} // Формат выдачи результатов запроса. Возможное // значение: list (список). type SbpBanksGetOKType string const ( SbpBanksGetOKTypeList SbpBanksGetOKType = "list" ) // AllValues returns all SbpBanksGetOKType values. func (SbpBanksGetOKType) AllValues() []SbpBanksGetOKType { return []SbpBanksGetOKType{ SbpBanksGetOKTypeList, } } // MarshalText implements encoding.TextMarshaler. func (s SbpBanksGetOKType) MarshalText() ([]byte, error) { switch s { case SbpBanksGetOKTypeList: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *SbpBanksGetOKType) UnmarshalText(data []byte) error { switch SbpBanksGetOKType(data) { case SbpBanksGetOKTypeList: *s = SbpBanksGetOKTypeList return nil default: return errors.Errorf("invalid value: %q", data) } } type SbpBanksGetTooManyRequests TooManyRequests func (*SbpBanksGetTooManyRequests) sbpBanksGetRes() {} // FPS (Faster Payment System of the Russian Federation) participant object contains all the relevant // information about the bank or payment service connected to the FPS. // Ref: #/components/schemas/SbpParticipantBank type SbpParticipantBank struct { BankID SbpBankId `json:"bank_id"` // Название банка или платежного сервиса в СБП. Name string `json:"name"` Bic SbpBankBic `json:"bic"` } // GetBankID returns the value of BankID. func (s *SbpParticipantBank) GetBankID() SbpBankId { return s.BankID } // GetName returns the value of Name. func (s *SbpParticipantBank) GetName() string { return s.Name } // GetBic returns the value of Bic. func (s *SbpParticipantBank) GetBic() SbpBankBic { return s.Bic } // SetBankID sets the value of BankID. func (s *SbpParticipantBank) SetBankID(val SbpBankId) { s.BankID = val } // SetName sets the value of Name. func (s *SbpParticipantBank) SetName(val string) { s.Name = val } // SetBic sets the value of Bic. func (s *SbpParticipantBank) SetBic(val SbpBankBic) { s.Bic = val } // Реквизиты счета, который использовался для оплаты. // Обязательный параметр для платежей в статусе succeeded. В // остальных случаях может отсутствовать. // Ref: #/components/schemas/SbpPayerBankDetails type SbpPayerBankDetails struct { BankID SbpBankId `json:"bank_id"` Bic string `json:"bic"` } // GetBankID returns the value of BankID. func (s *SbpPayerBankDetails) GetBankID() SbpBankId { return s.BankID } // GetBic returns the value of Bic. func (s *SbpPayerBankDetails) GetBic() string { return s.Bic } // SetBankID sets the value of BankID. func (s *SbpPayerBankDetails) SetBankID(val SbpBankId) { s.BankID = val } // SetBic sets the value of Bic. func (s *SbpPayerBankDetails) SetBic(val string) { s.Bic = val } // Merged schema. // Ref: #/components/schemas/SbpPayoutRecipientPersonalDataRequest type SbpPayoutRecipientPersonalDataRequest struct { Type PersonalDataType `json:"type"` Metadata OptMetadata `json:"metadata"` LastName LastName `json:"last_name"` FirstName FirstName `json:"first_name"` MiddleName OptMiddleName `json:"middle_name"` } // GetType returns the value of Type. func (s *SbpPayoutRecipientPersonalDataRequest) GetType() PersonalDataType { return s.Type } // GetMetadata returns the value of Metadata. func (s *SbpPayoutRecipientPersonalDataRequest) GetMetadata() OptMetadata { return s.Metadata } // GetLastName returns the value of LastName. func (s *SbpPayoutRecipientPersonalDataRequest) GetLastName() LastName { return s.LastName } // GetFirstName returns the value of FirstName. func (s *SbpPayoutRecipientPersonalDataRequest) GetFirstName() FirstName { return s.FirstName } // GetMiddleName returns the value of MiddleName. func (s *SbpPayoutRecipientPersonalDataRequest) GetMiddleName() OptMiddleName { return s.MiddleName } // SetType sets the value of Type. func (s *SbpPayoutRecipientPersonalDataRequest) SetType(val PersonalDataType) { s.Type = val } // SetMetadata sets the value of Metadata. func (s *SbpPayoutRecipientPersonalDataRequest) SetMetadata(val OptMetadata) { s.Metadata = val } // SetLastName sets the value of LastName. func (s *SbpPayoutRecipientPersonalDataRequest) SetLastName(val LastName) { s.LastName = val } // SetFirstName sets the value of FirstName. func (s *SbpPayoutRecipientPersonalDataRequest) SetFirstName(val FirstName) { s.FirstName = val } // SetMiddleName sets the value of MiddleName. func (s *SbpPayoutRecipientPersonalDataRequest) SetMiddleName(val OptMiddleName) { s.MiddleName = val } // Merged schema. // Ref: #/components/schemas/SbpRefundMethod type SbpRefundMethod struct { Type RefundMethodType `json:"type"` // Идентификатор операции в СБП (НСПК). Пример: // 1027088AE4CB48CB81287833347A8777. Обязательный параметр для // возвратов в статусе succeeded. В остальных случаях может // отсутствовать. SbpOperationID OptString `json:"sbp_operation_id"` } // GetType returns the value of Type. func (s *SbpRefundMethod) GetType() RefundMethodType { return s.Type } // GetSbpOperationID returns the value of SbpOperationID. func (s *SbpRefundMethod) GetSbpOperationID() OptString { return s.SbpOperationID } // SetType sets the value of Type. func (s *SbpRefundMethod) SetType(val RefundMethodType) { s.Type = val } // SetSbpOperationID sets the value of SbpOperationID. func (s *SbpRefundMethod) SetSbpOperationID(val OptString) { s.SbpOperationID = val } type SelfEmployedId string // Информация о совершенных расчетах. // Ref: #/components/schemas/Settlement type Settlement struct { // Тип расчета. Перечень возможных значений * для Чеков // от ЮKassa: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/yoomoney/parameters-values#settlement-type * для // сторонних онлайн-касс: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/parameters-values#settlement-type. Type SettlementType `json:"type"` Amount SettlementAmount `json:"amount"` } // GetType returns the value of Type. func (s *Settlement) GetType() SettlementType { return s.Type } // GetAmount returns the value of Amount. func (s *Settlement) GetAmount() SettlementAmount { return s.Amount } // SetType sets the value of Type. func (s *Settlement) SetType(val SettlementType) { s.Type = val } // SetAmount sets the value of Amount. func (s *Settlement) SetAmount(val SettlementAmount) { s.Amount = val } // Сумма в выбранной валюте. type SettlementAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *SettlementAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *SettlementAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *SettlementAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *SettlementAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Transaction type. // Ref: #/components/schemas/SettlementItemType type SettlementItemType string const ( SettlementItemTypePayout SettlementItemType = "payout" ) // AllValues returns all SettlementItemType values. func (SettlementItemType) AllValues() []SettlementItemType { return []SettlementItemType{ SettlementItemTypePayout, } } // MarshalText implements encoding.TextMarshaler. func (s SettlementItemType) MarshalText() ([]byte, error) { switch s { case SettlementItemTypePayout: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *SettlementItemType) UnmarshalText(data []byte) error { switch SettlementItemType(data) { case SettlementItemTypePayout: *s = SettlementItemTypePayout return nil default: return errors.Errorf("invalid value: %q", data) } } type SettlementPaymentArray []SettlementPaymentArrayItem // SettlementPaymentArrayItem represents sum type. type SettlementPaymentArrayItem struct { Type SettlementPaymentArrayItemType // switch on this field SettlementPayoutPayment SettlementPayoutPayment } // SettlementPaymentArrayItemType is oneOf type of SettlementPaymentArrayItem. type SettlementPaymentArrayItemType string // Possible values for SettlementPaymentArrayItemType. const ( SettlementPayoutPaymentSettlementPaymentArrayItem SettlementPaymentArrayItemType = "SettlementPayoutPayment" ) // IsSettlementPayoutPayment reports whether SettlementPaymentArrayItem is SettlementPayoutPayment. func (s SettlementPaymentArrayItem) IsSettlementPayoutPayment() bool { return s.Type == SettlementPayoutPaymentSettlementPaymentArrayItem } // SetSettlementPayoutPayment sets SettlementPaymentArrayItem to SettlementPayoutPayment. func (s *SettlementPaymentArrayItem) SetSettlementPayoutPayment(v SettlementPayoutPayment) { s.Type = SettlementPayoutPaymentSettlementPaymentArrayItem s.SettlementPayoutPayment = v } // GetSettlementPayoutPayment returns SettlementPayoutPayment and true boolean if SettlementPaymentArrayItem is SettlementPayoutPayment. func (s SettlementPaymentArrayItem) GetSettlementPayoutPayment() (v SettlementPayoutPayment, ok bool) { if !s.IsSettlementPayoutPayment() { return v, false } return s.SettlementPayoutPayment, true } // NewSettlementPayoutPaymentSettlementPaymentArrayItem returns new SettlementPaymentArrayItem from SettlementPayoutPayment. func NewSettlementPayoutPaymentSettlementPaymentArrayItem(v SettlementPayoutPayment) SettlementPaymentArrayItem { var s SettlementPaymentArrayItem s.SetSettlementPayoutPayment(v) return s } // Merged schema. // Ref: #/components/schemas/SettlementPayoutPayment type SettlementPayoutPayment struct { Type SettlementItemType `json:"type"` Amount SettlementPayoutPaymentAmount `json:"amount"` } // GetType returns the value of Type. func (s *SettlementPayoutPayment) GetType() SettlementItemType { return s.Type } // GetAmount returns the value of Amount. func (s *SettlementPayoutPayment) GetAmount() SettlementPayoutPaymentAmount { return s.Amount } // SetType sets the value of Type. func (s *SettlementPayoutPayment) SetType(val SettlementItemType) { s.Type = val } // SetAmount sets the value of Amount. func (s *SettlementPayoutPayment) SetAmount(val SettlementPayoutPaymentAmount) { s.Amount = val } // Сумма в выбранной валюте. type SettlementPayoutPaymentAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *SettlementPayoutPaymentAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *SettlementPayoutPaymentAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *SettlementPayoutPaymentAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *SettlementPayoutPaymentAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Merged schema. // Ref: #/components/schemas/SettlementPayoutRefund type SettlementPayoutRefund struct { Type SettlementItemType `json:"type"` Amount SettlementPayoutRefundAmount `json:"amount"` } // GetType returns the value of Type. func (s *SettlementPayoutRefund) GetType() SettlementItemType { return s.Type } // GetAmount returns the value of Amount. func (s *SettlementPayoutRefund) GetAmount() SettlementPayoutRefundAmount { return s.Amount } // SetType sets the value of Type. func (s *SettlementPayoutRefund) SetType(val SettlementItemType) { s.Type = val } // SetAmount sets the value of Amount. func (s *SettlementPayoutRefund) SetAmount(val SettlementPayoutRefundAmount) { s.Amount = val } // Сумма в выбранной валюте. type SettlementPayoutRefundAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *SettlementPayoutRefundAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *SettlementPayoutRefundAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *SettlementPayoutRefundAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *SettlementPayoutRefundAmount) SetCurrency(val CurrencyCode) { s.Currency = val } type SettlementRefundArray []SettlementRefundArrayItem // SettlementRefundArrayItem represents sum type. type SettlementRefundArrayItem struct { Type SettlementRefundArrayItemType // switch on this field SettlementPayoutRefund SettlementPayoutRefund } // SettlementRefundArrayItemType is oneOf type of SettlementRefundArrayItem. type SettlementRefundArrayItemType string // Possible values for SettlementRefundArrayItemType. const ( SettlementPayoutRefundSettlementRefundArrayItem SettlementRefundArrayItemType = "SettlementPayoutRefund" ) // IsSettlementPayoutRefund reports whether SettlementRefundArrayItem is SettlementPayoutRefund. func (s SettlementRefundArrayItem) IsSettlementPayoutRefund() bool { return s.Type == SettlementPayoutRefundSettlementRefundArrayItem } // SetSettlementPayoutRefund sets SettlementRefundArrayItem to SettlementPayoutRefund. func (s *SettlementRefundArrayItem) SetSettlementPayoutRefund(v SettlementPayoutRefund) { s.Type = SettlementPayoutRefundSettlementRefundArrayItem s.SettlementPayoutRefund = v } // GetSettlementPayoutRefund returns SettlementPayoutRefund and true boolean if SettlementRefundArrayItem is SettlementPayoutRefund. func (s SettlementRefundArrayItem) GetSettlementPayoutRefund() (v SettlementPayoutRefund, ok bool) { if !s.IsSettlementPayoutRefund() { return v, false } return s.SettlementPayoutRefund, true } // NewSettlementPayoutRefundSettlementRefundArrayItem returns new SettlementRefundArrayItem from SettlementPayoutRefund. func NewSettlementPayoutRefundSettlementRefundArrayItem(v SettlementPayoutRefund) SettlementRefundArrayItem { var s SettlementRefundArrayItem s.SetSettlementPayoutRefund(v) return s } // Тип расчета. Перечень возможных значений * для Чеков // от ЮKassa: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/yoomoney/parameters-values#settlement-type * для // сторонних онлайн-касс: https://yookassa. // ru/developers/payment-acceptance/receipts/54fz/other-services/parameters-values#settlement-type. type SettlementType string const ( SettlementTypeCashless SettlementType = "cashless" SettlementTypePrepayment SettlementType = "prepayment" SettlementTypePostpayment SettlementType = "postpayment" SettlementTypeConsideration SettlementType = "consideration" ) // AllValues returns all SettlementType values. func (SettlementType) AllValues() []SettlementType { return []SettlementType{ SettlementTypeCashless, SettlementTypePrepayment, SettlementTypePostpayment, SettlementTypeConsideration, } } // MarshalText implements encoding.TextMarshaler. func (s SettlementType) MarshalText() ([]byte, error) { switch s { case SettlementTypeCashless: return []byte(s), nil case SettlementTypePrepayment: return []byte(s), nil case SettlementTypePostpayment: return []byte(s), nil case SettlementTypeConsideration: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *SettlementType) UnmarshalText(data []byte) error { switch SettlementType(data) { case SettlementTypeCashless: *s = SettlementTypeCashless return nil case SettlementTypePrepayment: *s = SettlementTypePrepayment return nil case SettlementTypePostpayment: *s = SettlementTypePostpayment return nil case SettlementTypeConsideration: *s = SettlementTypeConsideration return nil default: return errors.Errorf("invalid value: %q", data) } } type TaxSystemCode int32 type Test bool // Information about user’s 3‑D Secure authentication for confirming the payment. // Ref: #/components/schemas/ThreeDSecureDetails type ThreeDSecureDetails struct { // Information on whether the 3-D Secure authentication form is displayed to the user for confirming // the payment or not. Possible values: true: YooMoney displayed the form to the user, so that they // could complete 3-D Secure authentication; false: payment was processed without 3-D Secure // authentication. Applied bool `json:"applied"` } // GetApplied returns the value of Applied. func (s *ThreeDSecureDetails) GetApplied() bool { return s.Applied } // SetApplied sets the value of Applied. func (s *ThreeDSecureDetails) SetApplied(val bool) { s.Applied = val } // Merged schema. // Ref: #/components/schemas/TooManyRequests type TooManyRequests struct { // Тип объекта. Type OptTooManyRequestsType `json:"type"` // Идентификатор ошибки. Используйте его, если возникла // необходимость обратиться в техническую поддержку. ID OptString `json:"id"` // Подробное описание ошибки. Description OptString `json:"description"` // Название параметра, из-за которого произошла ошибка. Parameter OptString `json:"parameter"` // Рекомендуемое количество миллисекунд, спустя // которое следует повторить запрос. RetryAfter OptInt `json:"retry_after"` // Код ошибки. Code OptTooManyRequestsCode `json:"code"` } // GetType returns the value of Type. func (s *TooManyRequests) GetType() OptTooManyRequestsType { return s.Type } // GetID returns the value of ID. func (s *TooManyRequests) GetID() OptString { return s.ID } // GetDescription returns the value of Description. func (s *TooManyRequests) GetDescription() OptString { return s.Description } // GetParameter returns the value of Parameter. func (s *TooManyRequests) GetParameter() OptString { return s.Parameter } // GetRetryAfter returns the value of RetryAfter. func (s *TooManyRequests) GetRetryAfter() OptInt { return s.RetryAfter } // GetCode returns the value of Code. func (s *TooManyRequests) GetCode() OptTooManyRequestsCode { return s.Code } // SetType sets the value of Type. func (s *TooManyRequests) SetType(val OptTooManyRequestsType) { s.Type = val } // SetID sets the value of ID. func (s *TooManyRequests) SetID(val OptString) { s.ID = val } // SetDescription sets the value of Description. func (s *TooManyRequests) SetDescription(val OptString) { s.Description = val } // SetParameter sets the value of Parameter. func (s *TooManyRequests) SetParameter(val OptString) { s.Parameter = val } // SetRetryAfter sets the value of RetryAfter. func (s *TooManyRequests) SetRetryAfter(val OptInt) { s.RetryAfter = val } // SetCode sets the value of Code. func (s *TooManyRequests) SetCode(val OptTooManyRequestsCode) { s.Code = val } func (*TooManyRequests) meGetRes() {} func (*TooManyRequests) paymentsGetRes() {} func (*TooManyRequests) paymentsPaymentIDCancelPostRes() {} func (*TooManyRequests) paymentsPaymentIDCapturePostRes() {} func (*TooManyRequests) paymentsPaymentIDGetRes() {} func (*TooManyRequests) paymentsPostRes() {} func (*TooManyRequests) receiptsGetRes() {} func (*TooManyRequests) receiptsPostRes() {} func (*TooManyRequests) receiptsReceiptIDGetRes() {} func (*TooManyRequests) refundsGetRes() {} func (*TooManyRequests) refundsPostRes() {} func (*TooManyRequests) refundsRefundIDGetRes() {} func (*TooManyRequests) webhooksGetRes() {} func (*TooManyRequests) webhooksPostRes() {} func (*TooManyRequests) webhooksWebhookIDDeleteRes() {} // Код ошибки. type TooManyRequestsCode string const ( TooManyRequestsCodeTooManyRequests TooManyRequestsCode = "too_many_requests" ) // AllValues returns all TooManyRequestsCode values. func (TooManyRequestsCode) AllValues() []TooManyRequestsCode { return []TooManyRequestsCode{ TooManyRequestsCodeTooManyRequests, } } // MarshalText implements encoding.TextMarshaler. func (s TooManyRequestsCode) MarshalText() ([]byte, error) { switch s { case TooManyRequestsCodeTooManyRequests: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *TooManyRequestsCode) UnmarshalText(data []byte) error { switch TooManyRequestsCode(data) { case TooManyRequestsCodeTooManyRequests: *s = TooManyRequestsCodeTooManyRequests return nil default: return errors.Errorf("invalid value: %q", data) } } // Тип объекта. type TooManyRequestsType string const ( TooManyRequestsTypeError TooManyRequestsType = "error" ) // AllValues returns all TooManyRequestsType values. func (TooManyRequestsType) AllValues() []TooManyRequestsType { return []TooManyRequestsType{ TooManyRequestsTypeError, } } // MarshalText implements encoding.TextMarshaler. func (s TooManyRequestsType) MarshalText() ([]byte, error) { switch s { case TooManyRequestsTypeError: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *TooManyRequestsType) UnmarshalText(data []byte) error { switch TooManyRequestsType(data) { case TooManyRequestsTypeError: *s = TooManyRequestsTypeError return nil default: return errors.Errorf("invalid value: %q", data) } } // Information about money distribution: the amounts of transfers and the stores to be transferred to. // // Specified if you use Split payments: https://yookassa. // // ru/developers/solutions-for-platforms/split-payments/basics. // Ref: #/components/schemas/Transfer type Transfer struct { AccountID string `json:"account_id"` Amount TransferAmount `json:"amount"` Status TransferStatus `json:"status"` PlatformFeeAmount OptTransferPlatformFeeAmount `json:"platform_fee_amount"` // Transaction description (up to 128 characters), which the seller will see in the YooMoney Merchant // Profile. Example: "Marketplace order No. 72". Description OptString `json:"description"` Metadata OptMetadata `json:"metadata"` } // GetAccountID returns the value of AccountID. func (s *Transfer) GetAccountID() string { return s.AccountID } // GetAmount returns the value of Amount. func (s *Transfer) GetAmount() TransferAmount { return s.Amount } // GetStatus returns the value of Status. func (s *Transfer) GetStatus() TransferStatus { return s.Status } // GetPlatformFeeAmount returns the value of PlatformFeeAmount. func (s *Transfer) GetPlatformFeeAmount() OptTransferPlatformFeeAmount { return s.PlatformFeeAmount } // GetDescription returns the value of Description. func (s *Transfer) GetDescription() OptString { return s.Description } // GetMetadata returns the value of Metadata. func (s *Transfer) GetMetadata() OptMetadata { return s.Metadata } // SetAccountID sets the value of AccountID. func (s *Transfer) SetAccountID(val string) { s.AccountID = val } // SetAmount sets the value of Amount. func (s *Transfer) SetAmount(val TransferAmount) { s.Amount = val } // SetStatus sets the value of Status. func (s *Transfer) SetStatus(val TransferStatus) { s.Status = val } // SetPlatformFeeAmount sets the value of PlatformFeeAmount. func (s *Transfer) SetPlatformFeeAmount(val OptTransferPlatformFeeAmount) { s.PlatformFeeAmount = val } // SetDescription sets the value of Description. func (s *Transfer) SetDescription(val OptString) { s.Description = val } // SetMetadata sets the value of Metadata. func (s *Transfer) SetMetadata(val OptMetadata) { s.Metadata = val } // Merged schema. type TransferAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *TransferAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *TransferAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *TransferAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *TransferAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Information about money distribution: the amounts of transfers and the stores to be transferred to. // // Specified if you use Split payments: https://yookassa. // // ru/developers/solutions-for-platforms/split-payments/basics. // Ref: #/components/schemas/TransferData type TransferData struct { AccountID string `json:"account_id"` Amount TransferDataAmount `json:"amount"` PlatformFeeAmount OptTransferDataPlatformFeeAmount `json:"platform_fee_amount"` } // GetAccountID returns the value of AccountID. func (s *TransferData) GetAccountID() string { return s.AccountID } // GetAmount returns the value of Amount. func (s *TransferData) GetAmount() TransferDataAmount { return s.Amount } // GetPlatformFeeAmount returns the value of PlatformFeeAmount. func (s *TransferData) GetPlatformFeeAmount() OptTransferDataPlatformFeeAmount { return s.PlatformFeeAmount } // SetAccountID sets the value of AccountID. func (s *TransferData) SetAccountID(val string) { s.AccountID = val } // SetAmount sets the value of Amount. func (s *TransferData) SetAmount(val TransferDataAmount) { s.Amount = val } // SetPlatformFeeAmount sets the value of PlatformFeeAmount. func (s *TransferData) SetPlatformFeeAmount(val OptTransferDataPlatformFeeAmount) { s.PlatformFeeAmount = val } // Merged schema. type TransferDataAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *TransferDataAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *TransferDataAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *TransferDataAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *TransferDataAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Merged schema. // Ref: #/components/schemas/TransferDataPayment type TransferDataPayment struct { AccountID string `json:"account_id"` Amount TransferDataPaymentAmount `json:"amount"` PlatformFeeAmount OptTransferDataPaymentPlatformFeeAmount `json:"platform_fee_amount"` // Transaction description (up to 128 characters), which the seller will see in the YooMoney Merchant // Profile. Example: "Marketplace order No. 72". Description OptString `json:"description"` Metadata OptMetadata `json:"metadata"` } // GetAccountID returns the value of AccountID. func (s *TransferDataPayment) GetAccountID() string { return s.AccountID } // GetAmount returns the value of Amount. func (s *TransferDataPayment) GetAmount() TransferDataPaymentAmount { return s.Amount } // GetPlatformFeeAmount returns the value of PlatformFeeAmount. func (s *TransferDataPayment) GetPlatformFeeAmount() OptTransferDataPaymentPlatformFeeAmount { return s.PlatformFeeAmount } // GetDescription returns the value of Description. func (s *TransferDataPayment) GetDescription() OptString { return s.Description } // GetMetadata returns the value of Metadata. func (s *TransferDataPayment) GetMetadata() OptMetadata { return s.Metadata } // SetAccountID sets the value of AccountID. func (s *TransferDataPayment) SetAccountID(val string) { s.AccountID = val } // SetAmount sets the value of Amount. func (s *TransferDataPayment) SetAmount(val TransferDataPaymentAmount) { s.Amount = val } // SetPlatformFeeAmount sets the value of PlatformFeeAmount. func (s *TransferDataPayment) SetPlatformFeeAmount(val OptTransferDataPaymentPlatformFeeAmount) { s.PlatformFeeAmount = val } // SetDescription sets the value of Description. func (s *TransferDataPayment) SetDescription(val OptString) { s.Description = val } // SetMetadata sets the value of Metadata. func (s *TransferDataPayment) SetMetadata(val OptMetadata) { s.Metadata = val } // Merged schema. type TransferDataPaymentAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *TransferDataPaymentAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *TransferDataPaymentAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *TransferDataPaymentAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *TransferDataPaymentAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Merged schema. type TransferDataPaymentPlatformFeeAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *TransferDataPaymentPlatformFeeAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *TransferDataPaymentPlatformFeeAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *TransferDataPaymentPlatformFeeAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *TransferDataPaymentPlatformFeeAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Merged schema. type TransferDataPlatformFeeAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *TransferDataPlatformFeeAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *TransferDataPlatformFeeAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *TransferDataPlatformFeeAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *TransferDataPlatformFeeAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Merged schema. type TransferPlatformFeeAmount struct { // Сумма в выбранной валюте. Всегда дробное значение. // Разделитель дробной части — точка, разделитель тысяч // отсутствует. Количество знаков после точки зависит // от выбранной валюты. Пример: 1000.00. Value string `json:"value"` Currency CurrencyCode `json:"currency"` } // GetValue returns the value of Value. func (s *TransferPlatformFeeAmount) GetValue() string { return s.Value } // GetCurrency returns the value of Currency. func (s *TransferPlatformFeeAmount) GetCurrency() CurrencyCode { return s.Currency } // SetValue sets the value of Value. func (s *TransferPlatformFeeAmount) SetValue(val string) { s.Value = val } // SetCurrency sets the value of Currency. func (s *TransferPlatformFeeAmount) SetCurrency(val CurrencyCode) { s.Currency = val } // Status of the money distribution between stores. Possible values: pending, waiting_for_capture, // succeeded, canceled. // Ref: #/components/schemas/TransferStatus type TransferStatus string const ( TransferStatusPending TransferStatus = "pending" TransferStatusWaitingForCapture TransferStatus = "waiting_for_capture" TransferStatusSucceeded TransferStatus = "succeeded" TransferStatusCanceled TransferStatus = "canceled" ) // AllValues returns all TransferStatus values. func (TransferStatus) AllValues() []TransferStatus { return []TransferStatus{ TransferStatusPending, TransferStatusWaitingForCapture, TransferStatusSucceeded, TransferStatusCanceled, } } // MarshalText implements encoding.TextMarshaler. func (s TransferStatus) MarshalText() ([]byte, error) { switch s { case TransferStatusPending: return []byte(s), nil case TransferStatusWaitingForCapture: return []byte(s), nil case TransferStatusSucceeded: return []byte(s), nil case TransferStatusCanceled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *TransferStatus) UnmarshalText(data []byte) error { switch TransferStatus(data) { case TransferStatusPending: *s = TransferStatusPending return nil case TransferStatusWaitingForCapture: *s = TransferStatusWaitingForCapture return nil case TransferStatusSucceeded: *s = TransferStatusSucceeded return nil case TransferStatusCanceled: *s = TransferStatusCanceled return nil default: return errors.Errorf("invalid value: %q", data) } } // Данные о webhook. // Ref: #/components/schemas/Webhook type Webhook struct { // Идентификатор webhook. ID string `json:"id"` Event WebhookEvent `json:"event"` // URL, на который ЮKassa отправляет уведомления. URL string `json:"url"` } // GetID returns the value of ID. func (s *Webhook) GetID() string { return s.ID } // GetEvent returns the value of Event. func (s *Webhook) GetEvent() WebhookEvent { return s.Event } // GetURL returns the value of URL. func (s *Webhook) GetURL() string { return s.URL } // SetID sets the value of ID. func (s *Webhook) SetID(val string) { s.ID = val } // SetEvent sets the value of Event. func (s *Webhook) SetEvent(val WebhookEvent) { s.Event = val } // SetURL sets the value of URL. func (s *Webhook) SetURL(val string) { s.URL = val } func (*Webhook) webhooksPostRes() {} type WebhookEvent string const ( WebhookEventPaymentWaitingForCapture WebhookEvent = "payment.waiting_for_capture" WebhookEventPaymentSucceeded WebhookEvent = "payment.succeeded" WebhookEventPaymentCanceled WebhookEvent = "payment.canceled" WebhookEventRefundSucceeded WebhookEvent = "refund.succeeded" ) // AllValues returns all WebhookEvent values. func (WebhookEvent) AllValues() []WebhookEvent { return []WebhookEvent{ WebhookEventPaymentWaitingForCapture, WebhookEventPaymentSucceeded, WebhookEventPaymentCanceled, WebhookEventRefundSucceeded, } } // MarshalText implements encoding.TextMarshaler. func (s WebhookEvent) MarshalText() ([]byte, error) { switch s { case WebhookEventPaymentWaitingForCapture: return []byte(s), nil case WebhookEventPaymentSucceeded: return []byte(s), nil case WebhookEventPaymentCanceled: return []byte(s), nil case WebhookEventRefundSucceeded: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *WebhookEvent) UnmarshalText(data []byte) error { switch WebhookEvent(data) { case WebhookEventPaymentWaitingForCapture: *s = WebhookEventPaymentWaitingForCapture return nil case WebhookEventPaymentSucceeded: *s = WebhookEventPaymentSucceeded return nil case WebhookEventPaymentCanceled: *s = WebhookEventPaymentCanceled return nil case WebhookEventRefundSucceeded: *s = WebhookEventRefundSucceeded return nil default: return errors.Errorf("invalid value: %q", data) } } // Список webhook. // Ref: #/components/schemas/WebhookList type WebhookList struct { // Формат выдачи результатов запроса. Возможное // значение: list (список). Type WebhookListType `json:"type"` Items []Webhook `json:"items"` } // GetType returns the value of Type. func (s *WebhookList) GetType() WebhookListType { return s.Type } // GetItems returns the value of Items. func (s *WebhookList) GetItems() []Webhook { return s.Items } // SetType sets the value of Type. func (s *WebhookList) SetType(val WebhookListType) { s.Type = val } // SetItems sets the value of Items. func (s *WebhookList) SetItems(val []Webhook) { s.Items = val } func (*WebhookList) webhooksGetRes() {} // Формат выдачи результатов запроса. Возможное // значение: list (список). type WebhookListType string const ( WebhookListTypeList WebhookListType = "list" ) // AllValues returns all WebhookListType values. func (WebhookListType) AllValues() []WebhookListType { return []WebhookListType{ WebhookListTypeList, } } // MarshalText implements encoding.TextMarshaler. func (s WebhookListType) MarshalText() ([]byte, error) { switch s { case WebhookListTypeList: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *WebhookListType) UnmarshalText(data []byte) error { switch WebhookListType(data) { case WebhookListTypeList: *s = WebhookListTypeList return nil default: return errors.Errorf("invalid value: %q", data) } } type WebhooksPostReq struct { Event WebhooksPostReqEvent `json:"event"` // URL, на который ЮKassa будет отправлять уведомления. URL string `json:"url"` } // GetEvent returns the value of Event. func (s *WebhooksPostReq) GetEvent() WebhooksPostReqEvent { return s.Event } // GetURL returns the value of URL. func (s *WebhooksPostReq) GetURL() string { return s.URL } // SetEvent sets the value of Event. func (s *WebhooksPostReq) SetEvent(val WebhooksPostReqEvent) { s.Event = val } // SetURL sets the value of URL. func (s *WebhooksPostReq) SetURL(val string) { s.URL = val } type WebhooksPostReqEvent string const ( WebhooksPostReqEventPaymentWaitingForCapture WebhooksPostReqEvent = "payment.waiting_for_capture" WebhooksPostReqEventPaymentSucceeded WebhooksPostReqEvent = "payment.succeeded" WebhooksPostReqEventPaymentCanceled WebhooksPostReqEvent = "payment.canceled" WebhooksPostReqEventRefundSucceeded WebhooksPostReqEvent = "refund.succeeded" ) // AllValues returns all WebhooksPostReqEvent values. func (WebhooksPostReqEvent) AllValues() []WebhooksPostReqEvent { return []WebhooksPostReqEvent{ WebhooksPostReqEventPaymentWaitingForCapture, WebhooksPostReqEventPaymentSucceeded, WebhooksPostReqEventPaymentCanceled, WebhooksPostReqEventRefundSucceeded, } } // MarshalText implements encoding.TextMarshaler. func (s WebhooksPostReqEvent) MarshalText() ([]byte, error) { switch s { case WebhooksPostReqEventPaymentWaitingForCapture: return []byte(s), nil case WebhooksPostReqEventPaymentSucceeded: return []byte(s), nil case WebhooksPostReqEventPaymentCanceled: return []byte(s), nil case WebhooksPostReqEventRefundSucceeded: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *WebhooksPostReqEvent) UnmarshalText(data []byte) error { switch WebhooksPostReqEvent(data) { case WebhooksPostReqEventPaymentWaitingForCapture: *s = WebhooksPostReqEventPaymentWaitingForCapture return nil case WebhooksPostReqEventPaymentSucceeded: *s = WebhooksPostReqEventPaymentSucceeded return nil case WebhooksPostReqEventPaymentCanceled: *s = WebhooksPostReqEventPaymentCanceled return nil case WebhooksPostReqEventRefundSucceeded: *s = WebhooksPostReqEventRefundSucceeded return nil default: return errors.Errorf("invalid value: %q", data) } } type WebhooksWebhookIDDeleteOK struct{} func (*WebhooksWebhookIDDeleteOK) webhooksWebhookIDDeleteRes() {} type YooMoneyAccountNumber string