ChargeBeeComponent
extends Injectable
in package
Table of Contents
Constants
- IGNORE_PAGINATION = true
- ITEMS_PER_PAGE = 100
- PAYMENT_ROLE = ['primary', 'backup']
Properties
- $isDebug : bool
- $cacheService : CacheService
- $cardList : mixed
- $chargeBeePlansRepositoryShared : ChargeBeePlansRepository
- $chargeBeeTokenComponent : ChargeBeeTokenComponent
- $checkoutRequestRepository : CheckoutRequestRepository
- $clientRepository : ClientRepository
- $currencyString : mixed
- $customer : mixed
- $logger : Logger
- $redis : Redis
- $subscriptionList : mixed
- $subscriptionsRepository : SubscriptionsRepository
- $user : mixed
Methods
- __construct() : mixed
- billingDetailsToFormEntity() : mixed
- cancelFreemiumSubscription() : Subscription
- changePaymentRole() : mixed
- configureChargeBee() : mixed
- createAddonsInvoice() : mixed
- createBankAccount() : mixed
- createCard() : mixed
- createCustomer() : mixed
- createNewCustomer() : Customer|null
- createSubscription() : mixed
- deletePaymentSource() : mixed
- downloadCreditNote() : mixed
- downloadInvoice() : mixed
- enableDirectDebitIfDisabled() : mixed
- formatAmount() : mixed
- formatDate() : mixed
- formatInvoice() : mixed
- formatUserBillingDataFromPost() : array<string|int, mixed>
- getActivePlans() : mixed
- getCards() : mixed
- getClient() : mixed
- getCountryIdByTwo() : mixed
- getCountryName() : mixed
- getCountryTwoById() : mixed
- getCredit() : mixed
- getCreditNotes() : mixed
- getCurrencyIcon() : mixed
- getCurrencyString() : mixed
- Get the value of currencyString by three.
- getCustomer() : mixed
- getCustomerTaxRate() : int|float
- getFormatedSubscriptionList() : mixed
- getFreePlanIds() : array<string|int, mixed>
- getFullSubscriptionList() : array<string|int, mixed>
- getInvoices() : mixed
- getNoramilzedCreditNotes() : mixed
- getStatusIcon() : mixed
- getSubscriptionList() : array<string|int, Subscription>
- getSubscriptionsByUserId() : array<string|int, mixed>|null
- getTransactionList() : mixed
- getUser() : UserWrapper|null
- Get the value of user.
- isActiveSubscriptionByUserIdAndCountryIsoCode2() : bool
- loadSubscriptionList() : array<string|int, mixed>
- setCurrencyString() : self
- Add value for currencyString by three and icon.
- setUser() : self
- Set the value of user.
- updateBillingData() : mixed
- validateUser() : mixed
- _cancelFreemiumSubscription() : Subscription
- _loadSubscriptionList() : array<string|int, mixed>
- chargeBeeOverviewComponent() : ChargeBeeOverviewComponent
- sortSubscriptionListByUser() : mixed
Constants
IGNORE_PAGINATION
public
mixed
IGNORE_PAGINATION
= true
ITEMS_PER_PAGE
public
mixed
ITEMS_PER_PAGE
= 100
PAYMENT_ROLE
public
mixed
PAYMENT_ROLE
= ['primary', 'backup']
Properties
$isDebug
public
bool
$isDebug
$cacheService
private
CacheService
$cacheService
$cardList
private
mixed
$cardList
= []
$chargeBeePlansRepositoryShared
private
ChargeBeePlansRepository
$chargeBeePlansRepositoryShared
$chargeBeeTokenComponent
private
ChargeBeeTokenComponent
$chargeBeeTokenComponent
$checkoutRequestRepository
private
CheckoutRequestRepository
$checkoutRequestRepository
$clientRepository
private
ClientRepository
$clientRepository
$currencyString
private
mixed
$currencyString
= []
$customer
private
mixed
$customer
= null
$logger
private
Logger
$logger
$redis
private
Redis
$redis
$subscriptionList
private
mixed
$subscriptionList
$subscriptionsRepository
private
SubscriptionsRepository
$subscriptionsRepository
$user
private
mixed
$user
= null
Methods
__construct()
public
__construct() : mixed
billingDetailsToFormEntity()
public
billingDetailsToFormEntity(mixed $chargeBeeCustomerValues) : mixed
Parameters
- $chargeBeeCustomerValues : mixed
cancelFreemiumSubscription()
public
cancelFreemiumSubscription(Subscription $subscription) : Subscription
Parameters
- $subscription : Subscription
Return values
SubscriptionchangePaymentRole()
public
changePaymentRole(UserWrapper $userWrapper, mixed $paymentSourceId, mixed $role) : mixed
Parameters
- $userWrapper : UserWrapper
- $paymentSourceId : mixed
- $role : mixed
configureChargeBee()
public
configureChargeBee() : mixed
createAddonsInvoice()
public
createAddonsInvoice(UserWrapper $userWrapper, array<string|int, Addon> $addons) : mixed
Parameters
- $userWrapper : UserWrapper
- $addons : array<string|int, Addon>
createBankAccount()
public
createBankAccount(UserWrapper $userWrapper, mixed $mandate) : mixed
Parameters
- $userWrapper : UserWrapper
- $mandate : mixed
createCard()
public
createCard(UserWrapper $userWrapper, ICard $card) : mixed
Parameters
- $userWrapper : UserWrapper
- $card : ICard
createCustomer()
public
createCustomer(UserWrapper $userWrapper) : mixed
Parameters
- $userWrapper : UserWrapper
createNewCustomer()
public
createNewCustomer(UserWrapper $userWrapper[, array<string|int, mixed> $post = [] ]) : Customer|null
Parameters
- $userWrapper : UserWrapper
- $post : array<string|int, mixed> = []
Return values
Customer|nullcreateSubscription()
public
createSubscription(UserWrapper $userWrapper) : mixed
Parameters
- $userWrapper : UserWrapper
deletePaymentSource()
public
deletePaymentSource(mixed $id[, UserWrapper $userWrapper = null ]) : mixed
Parameters
- $id : mixed
- $userWrapper : UserWrapper = null
downloadCreditNote()
public
downloadCreditNote(mixed $id) : mixed
Parameters
- $id : mixed
downloadInvoice()
public
downloadInvoice(mixed $id) : mixed
Parameters
- $id : mixed
enableDirectDebitIfDisabled()
public
enableDirectDebitIfDisabled(UserWrapper $userWrapper) : mixed
Parameters
- $userWrapper : UserWrapper
formatAmount()
public
final formatAmount(mixed $amount[, mixed $delimiters = [".", ","] ]) : mixed
Parameters
- $amount : mixed
- $delimiters : mixed = [".", ","]
formatDate()
public
final formatDate(mixed $dateNumber[, mixed $formatWithTime = false ]) : mixed
Parameters
- $dateNumber : mixed
- $formatWithTime : mixed = false
formatInvoice()
public
formatInvoice(mixed $invoice) : mixed
Parameters
- $invoice : mixed
formatUserBillingDataFromPost()
public
formatUserBillingDataFromPost(mixed $data) : array<string|int, mixed>
Parameters
- $data : mixed
Return values
array<string|int, mixed>getActivePlans()
public
getActivePlans() : mixed
getCards()
public
getCards(UserWrapper $userWrapper) : mixed
Parameters
- $userWrapper : UserWrapper
getClient()
public
getClient(UserWrapper $userWrapper) : mixed
Parameters
- $userWrapper : UserWrapper
getCountryIdByTwo()
public
getCountryIdByTwo(mixed $countryTwo) : mixed
Parameters
- $countryTwo : mixed
getCountryName()
public
getCountryName(mixed $countryTwo) : mixed
Parameters
- $countryTwo : mixed
getCountryTwoById()
public
getCountryTwoById(mixed $id) : mixed
Parameters
- $id : mixed
getCredit()
public
getCredit(UserWrapper $userWrapper[, mixed $limit = 1 ]) : mixed
Parameters
- $userWrapper : UserWrapper
- $limit : mixed = 1
getCreditNotes()
public
getCreditNotes(UserWrapper $userWrapper[, int|null $requestedPage = 1 ]) : mixed
Parameters
- $userWrapper : UserWrapper
- $requestedPage : int|null = 1
getCurrencyIcon()
public
getCurrencyIcon(mixed $currencyThree) : mixed
Parameters
- $currencyThree : mixed
getCurrencyString()
Get the value of currencyString by three.
public
getCurrencyString(mixed $currencyThree) : mixed
Parameters
- $currencyThree : mixed
getCustomer()
public
getCustomer(UserWrapper $userWrapper[, mixed $forceUpdate = false ]) : mixed
Parameters
- $userWrapper : UserWrapper
- $forceUpdate : mixed = false
getCustomerTaxRate()
public
getCustomerTaxRate(mixed $user) : int|float
Parameters
- $user : mixed
Return values
int|floatgetFormatedSubscriptionList()
public
getFormatedSubscriptionList(UserWrapper $userWrapper) : mixed
Parameters
- $userWrapper : UserWrapper
getFreePlanIds()
public
getFreePlanIds() : array<string|int, mixed>
Return values
array<string|int, mixed>getFullSubscriptionList()
public
getFullSubscriptionList() : array<string|int, mixed>
Return values
array<string|int, mixed>getInvoices()
public
getInvoices(UserWrapper $userWrapper[, int|null $requestedPage = 1 ]) : mixed
Parameters
- $userWrapper : UserWrapper
- $requestedPage : int|null = 1
getNoramilzedCreditNotes()
public
getNoramilzedCreditNotes(UserWrapper $userWrapper) : mixed
Parameters
- $userWrapper : UserWrapper
getStatusIcon()
public
getStatusIcon(mixed $status) : mixed
Parameters
- $status : mixed
getSubscriptionList()
public
getSubscriptionList(UserWrapper $userWrapper[, bool $includeExpired = false ]) : array<string|int, Subscription>
Parameters
- $userWrapper : UserWrapper
- $includeExpired : bool = false
Return values
array<string|int, Subscription>getSubscriptionsByUserId()
public
getSubscriptionsByUserId(mixed $userId) : array<string|int, mixed>|null
Parameters
- $userId : mixed
Return values
array<string|int, mixed>|nullgetTransactionList()
public
getTransactionList(UserWrapper $userWrapper[, int|null $requestedPage = 1 ]) : mixed
Parameters
- $userWrapper : UserWrapper
- $requestedPage : int|null = 1
getUser()
Get the value of user.
public
getUser() : UserWrapper|null
Return values
UserWrapper|nullisActiveSubscriptionByUserIdAndCountryIsoCode2()
public
isActiveSubscriptionByUserIdAndCountryIsoCode2(int $userId, string $countryIsoCode2) : bool
Parameters
- $userId : int
- $countryIsoCode2 : string
Return values
boolloadSubscriptionList()
public
loadSubscriptionList() : array<string|int, mixed>
Return values
array<string|int, mixed>setCurrencyString()
Add value for currencyString by three and icon.
public
setCurrencyString(mixed $three, mixed $icon) : self
Parameters
- $three : mixed
- $icon : mixed
Return values
selfsetUser()
Set the value of user.
public
setUser(UserWrapper|null $user) : self
Parameters
- $user : UserWrapper|null
Return values
selfupdateBillingData()
public
updateBillingData(UserWrapper $userWrapper[, array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $userWrapper : UserWrapper
- $data : array<string|int, mixed> = []
Tags
validateUser()
public
validateUser(UserWrapper $userWrapper) : mixed
Parameters
- $userWrapper : UserWrapper
_cancelFreemiumSubscription()
private
_cancelFreemiumSubscription(Subscription $subscription) : Subscription
Parameters
- $subscription : Subscription
Return values
Subscription_loadSubscriptionList()
private
_loadSubscriptionList([int|null $lastUserChangeTime = null ]) : array<string|int, mixed>
Parameters
- $lastUserChangeTime : int|null = null
Return values
array<string|int, mixed>chargeBeeOverviewComponent()
private
chargeBeeOverviewComponent() : ChargeBeeOverviewComponent
Return values
ChargeBeeOverviewComponentsortSubscriptionListByUser()
private
sortSubscriptionListByUser(mixed $subscriptionList) : mixed
Parameters
- $subscriptionList : mixed