Skip to content

Latest commit

 

History

History
728 lines (400 loc) · 19.1 KB

index.QIWI.Wallet.md

File metadata and controls

728 lines (400 loc) · 19.1 KB

QIWI SDK / Modules / index / QIWI / Wallet

Class: Wallet

index.QIWI.Wallet

API Кошелька

Документация QIWI

Export

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Wallet(options?)

Creates an instance of Wallet.

Memberof

Wallet

Parameters

Name Type
options? Partial<WalletApiOptions>

Overrides

ApiClass.constructor

Defined in

apis/wallet/wallet.ts:193

Properties

_options

Protected Readonly _options: WalletApiOptions

Memberof

OptionsWrapper

Inherited from

ApiClass._options

Defined in

apis/options-wrapper.ts:16


bills

Readonly bills: WalletBillsApi

Defined in

apis/wallet/wallet.ts:209


cards

Readonly cards: WalletCardsApi

Defined in

apis/wallet/wallet.ts:207


fundingSources

Readonly fundingSources: WalletFundingSourcesApi

Defined in

apis/wallet/wallet.ts:206


identification

Readonly identification: WalletIdentificationApi

Defined in

apis/wallet/wallet.ts:202


limits

Readonly limits: WalletLimitsApi

Defined in

apis/wallet/wallet.ts:203


nickname

Readonly nickname: WalletNicknameApi

Defined in

apis/wallet/wallet.ts:212


oauth

Readonly oauth: WalletOauthApi

Defined in

apis/wallet/wallet.ts:213


paymentHistory

Readonly paymentHistory: WalletPaymentHistoryApi

Defined in

apis/wallet/wallet.ts:205


payments

Readonly payments: WalletPaymentsApi

Defined in

apis/wallet/wallet.ts:208


personProfile

Readonly personProfile: WalletPersonProfileApi

Defined in

apis/wallet/wallet.ts:201


providers

Readonly providers: WalletProvidersApi

Defined in

apis/wallet/wallet.ts:211


restrictions

Readonly restrictions: WalletRestrictionsApi

Defined in

apis/wallet/wallet.ts:204


webhooks

Readonly webhooks: WalletWebhooksApi

Defined in

apis/wallet/wallet.ts:210


BillsApi

Static Readonly BillsApi: typeof WalletBillsApi = WalletBillsApi

Defined in

apis/wallet/wallet.ts:77


CardActionStatus

Static Readonly CardActionStatus: typeof CardActionStatus = CardActionStatus

Defined in

apis/wallet/wallet.ts:65


CardStatus

Static Readonly CardStatus: typeof CardStatus = CardStatus

Defined in

apis/wallet/wallet.ts:64


CardsApi

Static Readonly CardsApi: typeof WalletCardsApi = WalletCardsApi

Defined in

apis/wallet/wallet.ts:75


ChequeFormat

Static Readonly ChequeFormat: typeof ChequeFormat = ChequeFormat

Defined in

apis/wallet/wallet.ts:60


Currency

Static Readonly Currency: typeof Currency = Currency

Defined in

apis/wallet/wallet.ts:59


FundingSourcesApi

Static Readonly FundingSourcesApi: typeof WalletFundingSourcesApi = WalletFundingSourcesApi

Defined in

apis/wallet/wallet.ts:74


IdentificationApi

Static Readonly IdentificationApi: typeof WalletIdentificationApi = WalletIdentificationApi

Defined in

apis/wallet/wallet.ts:70


IdentificationLevel

Static Readonly IdentificationLevel: typeof PersonIdentificationLevel = PersonIdentificationLevel

Defined in

apis/wallet/wallet.ts:66


LimitType

Static Readonly LimitType: typeof LimitType = LimitType

Defined in

apis/wallet/wallet.ts:63


LimitsApi

Static Readonly LimitsApi: typeof WalletLimitsApi = WalletLimitsApi

Defined in

apis/wallet/wallet.ts:71


NicknameApi

Static Readonly NicknameApi: typeof WalletNicknameApi = WalletNicknameApi

Defined in

apis/wallet/wallet.ts:80


OauthApi

Static Readonly OauthApi: typeof WalletOauthApi = WalletOauthApi

Defined in

apis/wallet/wallet.ts:81


PaymentHistoryApi

Static Readonly PaymentHistoryApi: typeof WalletPaymentHistoryApi = WalletPaymentHistoryApi

Defined in

apis/wallet/wallet.ts:73


PaymentHistorySource

Static Readonly PaymentHistorySource: typeof PaymentHistorySource = PaymentHistorySource

Defined in

apis/wallet/wallet.ts:62


PaymentsApi

Static Readonly PaymentsApi: typeof WalletPaymentsApi = WalletPaymentsApi

Defined in

apis/wallet/wallet.ts:76


PersonIdentificationLevel

Static Readonly PersonIdentificationLevel: typeof PersonIdentificationLevel = PersonIdentificationLevel

Defined in

apis/wallet/wallet.ts:56


PersonProfileApi

Static Readonly PersonProfileApi: typeof WalletPersonProfileApi = WalletPersonProfileApi

Defined in

apis/wallet/wallet.ts:69


ProvidersApi

Static Readonly ProvidersApi: typeof WalletProvidersApi = WalletProvidersApi

Defined in

apis/wallet/wallet.ts:79


ReceiptFormat

Static Readonly ReceiptFormat: typeof ChequeFormat = ChequeFormat

Defined in

apis/wallet/wallet.ts:67


Recipients

Static Readonly Recipients: typeof Recipients = Recipients

Defined in

apis/wallet/wallet.ts:61


RestrictionsApi

Static Readonly RestrictionsApi: typeof WalletRestrictionsApi = WalletRestrictionsApi

Defined in

apis/wallet/wallet.ts:72


TransactionStatus

Static Readonly TransactionStatus: typeof TransactionStatus = TransactionStatus

Defined in

apis/wallet/wallet.ts:58


TransactionType

Static Readonly TransactionType: typeof TransactionType = TransactionType

Defined in

apis/wallet/wallet.ts:57


WebhooksApi

Static Readonly WebhooksApi: typeof WalletWebhooksApi = WalletWebhooksApi

Defined in

apis/wallet/wallet.ts:78

Accessors

agent

get agent(): any

Memberof

WalletCompat

Returns

any

Inherited from

ApiClass.agent

Defined in

apis/api.ts:23

set agent(agent): void

Memberof

WalletCompat

Parameters

Name Type
agent any

Returns

void

Inherited from

ApiClass.agent

Defined in

apis/api.ts:32


options

get options(): T

Memberof

OptionsWrapperWithGetter

Returns

T

Inherited from

ApiClass.options

Defined in

apis/options-wrapper.ts:44

Methods

createOauthToken

createOauthToken(): Promise<PrettyTokenResponse<Wallet>>

Создаёт токен с увеличенным сроком действия (10 лет)

Документация

Returns

Promise<PrettyTokenResponse<Wallet>>

Defined in

apis/wallet/wallet.ts:220


create

Static create(token, walletId?): Wallet

Создаёт экземпляр класса.

Если используете с переменными окружения, то:

  • Переименуйте переменную с токеном в QIWI_TOKEN
  • Переименуйте переменную с номером кошелька (если есть) в QIWI_WALLET
  • Используйте статический метод env вместо этого

Static

Memberof

Wallet

Parameters

Name Type Default value
token string undefined
walletId? string ""

Returns

Wallet

Wallet

Defined in

apis/wallet/wallet.ts:126


createAndFetchWalletId

Static createAndFetchWalletId(token, «destructured»?): Promise<Wallet>

Автоматически подтягивает номер телефона из API QIWI. Номер телефона требуется для вызова большинства методов из классов API:

Static

Memberof

Wallet

Parameters

Name Type
token string
«destructured» CreateAndFetchWalletIdParameters

Returns

Promise<Wallet>

Promise

Defined in

apis/wallet/wallet.ts:169


env

Static env(token?, walletId?): Wallet

Подхватывает токен из переменной окружения QIWI_TOKEN и номер телефона из переменной QIWI_WALLET и использует их для создания экземпляра

Static

Memberof

Wallet

Parameters

Name Type Default value
token? string environment.QIWI_TOKEN
walletId? string environment.QIWI_WALLET

Returns

Wallet

Wallet

Defined in

apis/wallet/wallet.ts:145


httpClientFactory

Static httpClientFactory(token): SimpleJsonHttp

Static

Memberof

Wallet

Parameters

Name Type
token string

Returns

SimpleJsonHttp

SimpleJsonHttp

Defined in

apis/wallet/wallet.ts:91