Documentation

Addon
in package
implements CheckoutAddon

Table of Contents

Interfaces

CheckoutAddon

Constants

KEY_COUPON  = "coupon"
KEY_CREDIT  = "credit"
KEY_CREDIT_PROMO  = "credit_promo"
KEY_CREDIT_REFUND  = "credit_refund"
KEY_DISCOUNT_ON_INVOICE  = "discount_on_invoice"
KEY_ON_INVOICE  = "on_invoice"
KEY_ON_ITEM  = "on_item"
KEY_SUBTOTAL  = "subtotal"
KEY_TOTAL  = "total"
KEY_UNIT_PRICE  = "unit_price"
MAP_CREDIT_APPLY_TO  = [\Vatjar\Checkout\DTO\Balance::NAME_PROMOTIONAL_CREDITS => self::KEY_CREDIT_PROMO, \Vatjar\Checkout\DTO\Balance::NAME_REFUNDABLE_CREDITS => self::KEY_CREDIT_REFUND]

Properties

$coupons  : array<string|int, Coupon>
$vat  : array<string|int, mixed>
$chargeBeeId  : string
$discount  : array<string|int, mixed>
$gross  : mixed
$id  : int
$isRecurring  : bool
$net  : mixed
$periodUnitId  : int|null
$quantity  : int
$unitPrice  : int

Methods

__construct()  : mixed
getChargeBeeId()  : string
getCoupons()  : array<string|int, Coupon>
getDiscount()  : mixed
getDiscountAmountFor()  : int|null
getDiscountFor()  : mixed
getGross()  : mixed
getGrossFor()  : mixed
getGrossForAmount()  : mixed
getId()  : mixed
getIsRecurring()  : bool
getListPriceFor()  : mixed
getNet()  : mixed
getNetFor()  : mixed
getNetVatGrossArrayFor()  : mixed
getPeriodUnitId()  : int|null
getPrice()  : mixed
getQuantity()  : int
getUnitPrice()  : int
getVat()  : mixed
getVatFor()  : mixed
getVatForAmount()  : mixed
setCoupons()  : self
setDiscountFor()  : mixed
setGrossFor()  : mixed
setNetAndVatFor()  : mixed
setNetFor()  : mixed
setQuantity()  : self
setVatFor()  : mixed
getRoundedPercentage()  : mixed
hasVat()  : mixed

Constants

KEY_COUPON

public mixed KEY_COUPON = "coupon"

KEY_CREDIT

public mixed KEY_CREDIT = "credit"

KEY_CREDIT_PROMO

public mixed KEY_CREDIT_PROMO = "credit_promo"

KEY_CREDIT_REFUND

public mixed KEY_CREDIT_REFUND = "credit_refund"

KEY_DISCOUNT_ON_INVOICE

public mixed KEY_DISCOUNT_ON_INVOICE = "discount_on_invoice"

KEY_ON_INVOICE

public mixed KEY_ON_INVOICE = "on_invoice"

KEY_ON_ITEM

public mixed KEY_ON_ITEM = "on_item"

KEY_SUBTOTAL

public mixed KEY_SUBTOTAL = "subtotal"

KEY_TOTAL

public mixed KEY_TOTAL = "total"

KEY_UNIT_PRICE

public mixed KEY_UNIT_PRICE = "unit_price"

MAP_CREDIT_APPLY_TO

public mixed MAP_CREDIT_APPLY_TO = [\Vatjar\Checkout\DTO\Balance::NAME_PROMOTIONAL_CREDITS => self::KEY_CREDIT_PROMO, \Vatjar\Checkout\DTO\Balance::NAME_REFUNDABLE_CREDITS => self::KEY_CREDIT_REFUND]

Properties

$coupons

protected array<string|int, Coupon> $coupons = []

$vat

protected array<string|int, mixed> $vat = []

$chargeBeeId

private string $chargeBeeId

$discount

private array<string|int, mixed> $discount = []

$isRecurring

private bool $isRecurring

$periodUnitId

private int|null $periodUnitId

$quantity

private int $quantity = 1

$unitPrice

private int $unitPrice

Methods

__construct()

public __construct(int $id, string $chargeBeeId, int $unitPrice, bool $isRecurring, int|null $periodUnitId) : mixed
Parameters
$id : int
$chargeBeeId : string
$unitPrice : int
$isRecurring : bool
$periodUnitId : int|null

getChargeBeeId()

public getChargeBeeId() : string
Return values
string

getCoupons()

public getCoupons() : array<string|int, Coupon>
Return values
array<string|int, Coupon>

getDiscount()

public getDiscount() : mixed

getDiscountAmountFor()

public getDiscountAmountFor([mixed $element = null ][, mixed $source = null ]) : int|null
Parameters
$element : mixed = null
$source : mixed = null
Return values
int|null

getDiscountFor()

public getDiscountFor(mixed $element[, mixed $source = null ][, mixed $group = null ]) : mixed
Parameters
$element : mixed
$source : mixed = null
$group : mixed = null

getGross()

public getGross() : mixed

getGrossFor()

public getGrossFor(mixed $key) : mixed
Parameters
$key : mixed

getGrossForAmount()

public getGrossForAmount(mixed $amount[, mixed $rate = null ]) : mixed
Parameters
$amount : mixed
$rate : mixed = null

getId()

public getId() : mixed

getIsRecurring()

public getIsRecurring() : bool
Return values
bool

getListPriceFor()

public getListPriceFor(mixed $key) : mixed
Parameters
$key : mixed

getNet()

public getNet() : mixed

getNetFor()

public getNetFor(mixed $key) : mixed
Parameters
$key : mixed

getNetVatGrossArrayFor()

public final getNetVatGrossArrayFor(string $key) : mixed
Parameters
$key : string

getPeriodUnitId()

public getPeriodUnitId() : int|null
Return values
int|null

getPrice()

public getPrice() : mixed

getQuantity()

public getQuantity() : int
Return values
int

getUnitPrice()

public getUnitPrice() : int
Return values
int

getVat()

public getVat() : mixed

getVatFor()

public getVatFor(mixed $key) : mixed
Parameters
$key : mixed

getVatForAmount()

public getVatForAmount(mixed $amount[, mixed $rate = null ]) : mixed
Parameters
$amount : mixed
$rate : mixed = null

setCoupons()

public setCoupons(array<string|int, Coupon$coupons) : self
Parameters
$coupons : array<string|int, Coupon>
Return values
self

setDiscountFor()

public setDiscountFor(mixed $element, mixed $source, mixed $group, mixed $discount) : mixed
Parameters
$element : mixed
$source : mixed
$group : mixed
$discount : mixed

setGrossFor()

public setGrossFor(mixed $key, mixed $amount) : mixed
Parameters
$key : mixed
$amount : mixed

setNetAndVatFor()

public setNetAndVatFor(mixed $key, mixed $netAmount, mixed $vatAmount) : mixed
Parameters
$key : mixed
$netAmount : mixed
$vatAmount : mixed

setNetFor()

public setNetFor(mixed $key, mixed $amount) : mixed
Parameters
$key : mixed
$amount : mixed

setQuantity()

public setQuantity(int $quantity) : self
Parameters
$quantity : int
Return values
self

setVatFor()

public setVatFor(mixed $key, mixed $amount) : mixed
Parameters
$key : mixed
$amount : mixed

getRoundedPercentage()

private getRoundedPercentage(int $base, float $percentage) : mixed
Parameters
$base : int
$percentage : float

hasVat()

private hasVat() : mixed

        
On this page

Search results