Releases: bavix/laravel-wallet
Releases · bavix/laravel-wallet
1.1.1
Changed
- Update readme.
- New indexes have names for quick removal.
Fixed
- Fixed
down
migration methodtransfers
.
What's Changed
- Scrutinizer Auto-Fixes by @scrutinizer-auto-fixer in #8
Full Changelog: 1.1.0...1.1.1
1.1.0
Added
- Added index for fields in "transfers" table: ['from_type', 'from_id', 'refund'].
- Added index for fields in "transfers" table: ['to_type', 'to_id', 'refund'].
- In the table "transactions" added to the type index.
- Exception ProductEnded
- Method public paid(Product $product): ?Transfer.
- Method public canBuy(Customer $customer): bool.
- Static balance caching. Also the description for what it is necessary.
Changed
- In the table "transactions" is deleted the index of the field "uuid" and added a unique index.
- In the table "transfers" is deleted the index of the field "uuid" and added a unique index.
- Method
pay
began to check the possibility of buying.
Removed
- public resetBalance(): void
What's Changed
- add paid by @rez1dent3 in #4
- add canBuy by @rez1dent3 in #5
- update method pay by @rez1dent3 in #6
- Scrutinizer Auto-Fixes by @scrutinizer-auto-fixer in #7
Full Changelog: 1.0.0...1.1.0
1.0.0
Added
- Added
refund
field totransfers
table.
Changed
- Updated the
refund
method.
The operation is now executed in the transaction and updates the newrefund
field.
Deprecated
- public resetBalance(): void
What's Changed
- Scrutinizer Auto-Fixes by @scrutinizer-auto-fixer in #2
Full Changelog: 0.0.1...1.0.0
0.0.1
Added
- written README.
- Project configuration file created.
- Migration 2018_11_06_222923_create_transactions_table.
- Migration 2018_11_07_192923_create_transfers_table.
HasWallet
trait andWallet
interface.- methods:
- private checkAmount(int $amount): void
- public forceWithdraw(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
- public deposit(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
- public withdraw(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
- public canWithdraw(int $amount): bool
- public transfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
- public safeTransfer(Wallet $wallet, int $amount, ?array $meta = null): ?Transfer
- public forceTransfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
- protected assemble(Wallet $wallet, Transaction $withdraw, Transaction $deposit): Transfer
- protected change(int $amount, ?array $meta, bool $confirmed): Transaction
- public resetBalance(): void
- relations:
- public transactions(): MorphMany
- public transfers(): MorphMany
- magic property
- public getBalanceAttribute(): int
- methods:
CanBePaid
trait andProduct
,Costomer
interface's- methods:
- public pay(Product $product): Transfer
- public safePay(Product $product): ?Transfer
- public refund(Product $product): bool
- public safeRefund(Product $product): bool
- methods:
- Exceptions: AmountInvalid, BalanceIsEmpty.
- Models: Transfer, Transaction.
What's Changed
- Scrutinizer Auto-Fixes by @scrutinizer-auto-fixer in #1
Full Changelog: https://github.com/bavix/laravel-wallet/commits/0.0.1