Skip to content

0.0.1

Compare
Choose a tag to compare
@rez1dent3 rez1dent3 released this 07 Nov 14:24
· 2095 commits to master since this release
e0882e2

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 and Wallet 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
  • CanBePaid trait and Product, Costomer interface's
    • methods:
      • public pay(Product $product): Transfer
      • public safePay(Product $product): ?Transfer
      • public refund(Product $product): bool
      • public safeRefund(Product $product): bool
  • Exceptions: AmountInvalid, BalanceIsEmpty.
  • Models: Transfer, Transaction.

What's Changed

Full Changelog: https://github.com/bavix/laravel-wallet/commits/0.0.1