MetaFox

PointConversion
in package
implements PointConversionInterface

Table of Contents

Interfaces

PointConversionInterface

Constants

DEFAULT_CONVERSION_RATE_CURRENCY_TO_MONEY  = 'USD'
TRANSACTION_STATUS_APPROVED  = 'approved'
TRANSACTION_STATUS_CANCELLED  = 'cancelled'
TRANSACTION_STATUS_DENIED  = 'denied'
TRANSACTION_STATUS_PENDING  = 'pending'

Properties

$grantedCurrencies  : array<string|int, mixed>

Methods

aggregateConversionRequest()  : int
getAvailableUserPoints()  : int
getCommissionFee()  : float
getCommissionPercentage()  : float
getConversionAmount()  : float
getConversionCurrencies()  : array<string|int, mixed>
getConversionRequestStatusOptions()  : array<string|int, mixed>
getExchangedPointsInMonth()  : int
getExchangedPointsInYear()  : int
getExchangeRateFormat()  : string|null
getMaxPointsCanCreate()  : int
getMinPointsCanCreate()  : int
getPendingConversionPoints()  : int
getRestPointsPerDay()  : int|null
getRestPointsPerMonth()  : int|null
getTotalPointsPerDay()  : int
getTotalPointsPerMonth()  : int

Constants

DEFAULT_CONVERSION_RATE_CURRENCY_TO_MONEY

public mixed DEFAULT_CONVERSION_RATE_CURRENCY_TO_MONEY = 'USD'

TRANSACTION_STATUS_APPROVED

public mixed TRANSACTION_STATUS_APPROVED = 'approved'

TRANSACTION_STATUS_CANCELLED

public mixed TRANSACTION_STATUS_CANCELLED = 'cancelled'

TRANSACTION_STATUS_DENIED

public mixed TRANSACTION_STATUS_DENIED = 'denied'

TRANSACTION_STATUS_PENDING

public mixed TRANSACTION_STATUS_PENDING = 'pending'

Properties

$grantedCurrencies

private array<string|int, mixed> $grantedCurrencies = ['USD']

Methods

aggregateConversionRequest()

public aggregateConversionRequest(Carbon $start, Carbon $end) : int
Parameters
$start : Carbon
$end : Carbon
Return values
int

getAvailableUserPoints()

public getAvailableUserPoints(User $user) : int
Parameters
$user : User
Return values
int

getCommissionFee()

public getCommissionFee(float $total) : float
Parameters
$total : float
Return values
float

getCommissionPercentage()

public getCommissionPercentage() : float
Return values
float

getConversionAmount()

public getConversionAmount(int $points, string $currency) : float
Parameters
$points : int
$currency : string
Return values
float

getConversionCurrencies()

public getConversionCurrencies() : array<string|int, mixed>
Return values
array<string|int, mixed>

getConversionRequestStatusOptions()

public getConversionRequestStatusOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getExchangedPointsInMonth()

public getExchangedPointsInMonth(User $user) : int
Parameters
$user : User
Return values
int

getExchangedPointsInYear()

public getExchangedPointsInYear(User $user) : int
Parameters
$user : User
Return values
int

getExchangeRateFormat()

public getExchangeRateFormat([string $currency = self::DEFAULT_CONVERSION_RATE_CURRENCY_TO_MONEY ]) : string|null
Parameters
$currency : string = self::DEFAULT_CONVERSION_RATE_CURRENCY_TO_MONEY
Return values
string|null

getMaxPointsCanCreate()

public getMaxPointsCanCreate(User $user) : int
Parameters
$user : User
Return values
int

getMinPointsCanCreate()

public getMinPointsCanCreate(User $user) : int
Parameters
$user : User
Return values
int

getPendingConversionPoints()

public getPendingConversionPoints(User $user) : int
Parameters
$user : User
Return values
int

getRestPointsPerDay()

public getRestPointsPerDay(User $user) : int|null
Parameters
$user : User
Return values
int|null

getRestPointsPerMonth()

public getRestPointsPerMonth(User $user) : int|null
Parameters
$user : User
Return values
int|null

getTotalPointsPerDay()

public getTotalPointsPerDay(User $user) : int
Parameters
$user : User
Return values
int

getTotalPointsPerMonth()

public getTotalPointsPerMonth(User $user) : int
Parameters
$user : User
Return values
int

        
On this page

Search results