monobank_api 3.0.0
monobank_api: ^3.0.0 copied to clipboard
Simplifies interaction with public Monobank API Supports getting currencies and statement info, includes currency and MCC datasets
3.0.0 #
Breaking Changes #
- All mentions of
Accountin statement-related classes were replaced withStatementSource BankCard.typeandAccount.typeare now aCardTypeClassinstance instead of aCardTypeenum- In
Statement.list,reverseparameter was renamed toisReverseChronologicaland now defaults totrue - In
Statement.list,ignoreErrorsparameter was removed - The statement stream may now include service messages, notifying about possible
discrepancies in the data. Right now such messages may be yielded when response length
equals
maxPossibleItemsand the requested time range can't be smaller. This means some data might get truncated in the requested time range. You can check for service messages usingStatementItem.isServiceMessage. You can also setignoreServiceMessagestotrue. CashbackType.toStringnow returns the same kind of string as API returns instead of enum nameLazyAccountwas replaced withLazyStatementSource, the class was completely removed. The change also impactsLazyStatementItemclass. You can cast the result of theLazyStatementSource.resolvemethod toAccountorJarto get specific fields.
What's New #
AccountandJarare now subclasses ofStatementSource, this allows to fetch statements from jars too now usingStatementSource.statement- Added support for
madeInUkrainecard type - Added access to raw card type string in
BankCard.type.raw - Exposed
lastRequestsTimesandglobalLastRequestTimein API class to allow for state restoration and notifying the user about rate limits - Added fields and data types related to service messages in statement items
- Added
AbortControllerclass to API to allow for cancelling requests. If the request is still in the cart, it will not be sent to the server when its turn comes.APIErrorwith code 3 will be thrown as a response. - Added support for
AbortControllerinAPIRequest - Added
abortControllerargument toStatement.list - Added methods
BankCard.isMastercardandBankCard.isVisa - Made most of constructors in mono library public, including
fromJSON, to support persistence - Added
toJSON()methods to many classes in mono library for persistence support APIErrornow has a new type -isCancelled, triggered when the request was cancelled usingAbortController- Added
Cashback.fromTypefactory - Added
StatementItemServiceMessageCodeenum to distinguish between different service message types
What's Changed #
- Rewritten
Statement.listto handle cases when more than maxPossibleItems are returned by the API Statement.maxRequestRangeis now set to 31 days and 1 hour instead of 31 days- Made
Statement.maxRequestRangeandStatement.maxPossibleItemsmodifiable API.globalTimeoutis not final anymore
2.1.0 #
- Bump http to 1.1.x
2.0.3 #
- Added rebuilding card type
- More careful sendId parsing to avoid exceptions
2.0.2 #
- Added support for
counterNamefield inStatementItem - Increased upper SDK constraint to declare support for Dart 3
- Documentation fixes
2.0.1 #
Mono library #
- Don't throw exception when backend returns
nullas cashback type (happens withfopaccount type)
2.0.0 #
Breaking Changes #
- Minimum Dart version is 2.17.0
Money library
CurrencyInfonow requires a date parameter for both its constructors
Mono library
Client.idandAccount.sendIdchanged their types fromStringtoSendIdCashback.typeandAccount.cashbackTypechanged their types fromStringtoCashbackType. Arbitrary money cashback is not supported anymore.
What's New #
- Added support for card type
eAid - Added
toString()implementations forCardType,BankCard,Client,Account - Fields
Client.idandAccount.sendIdcan now be used to generatesend.monobank.ualinks thanks to the newSendIdtype and itsSendId.urlgetter - Support for getting
webhookUrlunderClientand setting one usingClient.setWebhook - Permissions list of the current token with
Client.permissions - Jars list of the current user with
Client.jars - Access FOP invoice ID with
StatementItem.invoiceId - Parse webhook events with
WebhookEvent.fromJson - Added
CurrencyInfo.dateproperty
1.4.5 #
- Minor refactoring
1.4.4 #
- Added support for new API fields
1.4.3 #
- Dependency update
1.4.2 #
- Max date range extended to 31 days
1.4.1 #
- Bugs fixed
1.4.0 #
- Null safety
- Bugs fixed
1.4.0-nullsafety.1 #
- Null safety
- Bugs fixed
1.3.0 #
- Breaking change: /mcc/mcc.dart removed
- Docs fixes
1.2.2 #
- Fixed CurrencyInfo integer parsing error
1.2.0 #
- Support for iban
- Support for fop account type
1.1.2 #
- isCreditUsed works properly now
1.1.1 #
- Changed card mask type to String so leading zeros won't ruin the actual value
1.1.0 #
- Fixed currency getting
- Getting currency example
1.0.7 #
- Formatting
1.0.6 #
- Renamed files
1.0.5 #
- more dartfmt
1.0.4 #
- dartfmt fixes
1.0.3 #
- Combined examples to a single file
1.0.2 #
- Added examples
1.0.1 #
- Fix metadata
1.0.0 #
- Initial version