# Class Opencart\Admin\Model\Sale\Voucher

`extends` | `Model`

Class Voucher

- Opencart\System\Engine\Model
  - Opencart\Admin\Model\Sale\Voucher

Located at admin\model\sale\voucher.php

Methods
`public` | `addVoucher(array<string, mixed> $data): int` Add Voucher Add Voucher | #
`public` | `editVoucher(int $voucher_id, array<string, mixed> $data): void` Edit Voucher Edit Voucher | #
`public` | `deleteVoucher(int $voucher_id): void` Delete Voucher Delete Voucher | #
`public` | `getVoucher(int $voucher_id): array<string, mixed>` Get Voucher Get Voucher | #
`public` | `getVoucherByCode(string $code): array<string, mixed>` Get Voucher By Code Get Voucher By Code | #
`public` | `getVouchers(array<string, mixed> $data = []): array<int, array<string, mixed>>` Get Vouchers Get Vouchers | #
`public` | `getTotalVouchers(): int` Get Total Vouchers Get Total Vouchers | #
`public` | `getTotalVouchersByVoucherThemeId(int $voucher_theme_id): int` Get Total Vouchers By Voucher Theme ID Get Total Vouchers By Voucher Theme ID | #
`public` | `deleteHistories(int $voucher_id): void` Delete Voucher Histories Delete Voucher Histories | #
`public` | `deleteHistoriesByOrderId(int $order_id): void` Delete Voucher Histories By Order ID Delete Voucher Histories By Order ID | #
`public` | `getHistories(int $voucher_id, int $start = 0, int $limit = 10): array<int, array<string, mixed>>` Get Histories Get Histories | #
`public` | `getTotalHistories(int $voucher_id): int` Get Total Histories Get Total Histories | #

Methods inherited from Opencart\System\Engine\Model
`__construct(), __get(), __set(), __isset()`

Properties inherited from Opencart\System\Engine\Model
`$registry`

OpenCart API API documentation generated by ApiGen dev-master