PaymentSystem
extends Element
in package
Uses
ElementTrait, IdentifiableElementTrait, IntegrableElementTrait, EnumResolverTrait, ElementModuleTrait
This is the basket payment system class.
The basket payment systems information will be stored in that class and will remain immutable (only get methods are available)
Tags
Table of Contents
$appliedTaxes | : array<string|int, mixed> | |
---|---|---|
$cashOnDelivery | : bool | |
$error | : Error|null | |
$id | Autonumeric element id. | : int |
$increaseFrom | : float | |
$increaseMin | : float | |
$increaseTo | : float | |
$increaseType | : string | |
$increaseValue | : float | |
$language | : PaymentSystemLanguage|null | |
$logo | : string | |
$maxOrder | : float | |
$minOrder | : float | |
$module | : string | |
$pId | Public and readable element id. | : string |
$price | : float | |
$priority | : int | |
$properties | : array<string|int, mixed> | |
$taxes | : array<string|int, mixed> | |
__construct() | Elements constructor. | : mixed |
__toString() | Uses "json_encode" function to return the JSON format of the element. | : string |
getAppliedTaxes() | Returns the payment system applied taxes. | : array<string|int, AppliedTax> |
getCashOnDelivery() | Returns if the payment system is for cash on delivery or not. | : bool |
getError() | Returns the current element error (if there is error). | : Error|null |
getId() | Returns the element id. | : int |
getIncreaseFrom() | Returns the payment system increaseFrom. | : float |
getIncreaseMin() | Returns the payment system minimum increase value. | : float |
getIncreaseTo() | Returns the payment system increaseTo. | : float |
getIncreaseType() | Returns the payment system increase type. | : string |
getIncreaseValue() | Returns the payment system increase value. | : float |
getLanguage() | Returns the payment system language. | : PaymentSystemLanguage|null |
getLogo() | Returns the payment system logo. | : string |
getMaxOrder() | Returns the payment system maxOrder. | : float |
getMinOrder() | Returns the payment system minOrder. | : float |
getModule() | Returns the element module. | : string |
getPId() | Returns the element public id (pId). | : string |
getPrice() | Returns the payment system price. | : float |
getPriority() | Returns the payment system priority. | : int |
getProperties() | Returns the payment system properties. | : array<string|int, PaymentSystemProperty> |
getTaxes() | Returns the payment system taxes. | : array<string|int, ItemTax> |
jsonSerialize() | Allow elements to be serialized. | : array<string|int, mixed> |
toArray() | Used to allow elements to be serialized. | : array<string|int, mixed> |
getFieldItem() | : object|null | |
getFormattedData() | : mixed | |
setAppliedTaxes() | : void | |
setArrayField() | Convert an API array of objects to a PHP array of objects. | : array<string|int, mixed> |
setError() | : void | |
setLanguage() | : void | |
setProperties() | : void | |
setTaxes() | : void |
Properties
$appliedTaxes
protected
array<string|int, mixed>
$appliedTaxes
= []
$cashOnDelivery
protected
bool
$cashOnDelivery
= false
$error
protected
Error|null
$error
= null
$id
Autonumeric element id.
protected
int
$id
= 0
All the given elements by the LogiCommerce API will send it.
$increaseFrom
protected
float
$increaseFrom
= 0.0
$increaseMin
protected
float
$increaseMin
= 0.0
$increaseTo
protected
float
$increaseTo
= 0.0
$increaseType
protected
string
$increaseType
= ''
$increaseValue
protected
float
$increaseValue
= 0.0
$language
protected
PaymentSystemLanguage|null
$language
= null
$logo
protected
string
$logo
= ''
$maxOrder
protected
float
$maxOrder
= 0.0
$minOrder
protected
float
$minOrder
= 0.0
$module
protected
string
$module
= ''
$pId
Public and readable element id.
protected
string
$pId
= ''
Setted by the user on LogiCommerce. All the integrable elements by the LogiCommerce API will send it. Useful for integrations and other 3rd party softwares that need to connect to LogiCommerce software.
$price
protected
float
$price
= 0.0
$priority
protected
int
$priority
= 0
$properties
protected
array<string|int, mixed>
$properties
= []
$taxes
protected
array<string|int, mixed>
$taxes
= []
Methods
__construct()
Elements constructor.
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
-
Array that contains all the values to the object to initialize
Return values
mixed —__toString()
Uses "json_encode" function to return the JSON format of the element.
public
__toString() : string
Auto-invoked using echo or concatenations.
Return values
string —getAppliedTaxes()
Returns the payment system applied taxes.
public
getAppliedTaxes() : array<string|int, AppliedTax>
Return values
array<string|int, AppliedTax> —getCashOnDelivery()
Returns if the payment system is for cash on delivery or not.
public
getCashOnDelivery() : bool
Return values
bool —getError()
Returns the current element error (if there is error).
public
getError() : Error|null
Return values
Error|null —getId()
Returns the element id.
public
getId() : int
Return values
int —getIncreaseFrom()
Returns the payment system increaseFrom.
public
getIncreaseFrom() : float
Return values
float —getIncreaseMin()
Returns the payment system minimum increase value.
public
getIncreaseMin() : float
Return values
float —getIncreaseTo()
Returns the payment system increaseTo.
public
getIncreaseTo() : float
Return values
float —getIncreaseType()
Returns the payment system increase type.
public
getIncreaseType() : string
Return values
string —getIncreaseValue()
Returns the payment system increase value.
public
getIncreaseValue() : float
Return values
float —getLanguage()
Returns the payment system language.
public
getLanguage() : PaymentSystemLanguage|null
Return values
PaymentSystemLanguage|null —getLogo()
Returns the payment system logo.
public
getLogo() : string
Return values
string —getMaxOrder()
Returns the payment system maxOrder.
public
getMaxOrder() : float
Return values
float —getMinOrder()
Returns the payment system minOrder.
public
getMinOrder() : float
Return values
float —getModule()
Returns the element module.
public
getModule() : string
Return values
string —getPId()
Returns the element public id (pId).
public
getPId() : string
Return values
string —getPrice()
Returns the payment system price.
public
getPrice() : float
Return values
float —getPriority()
Returns the payment system priority.
public
getPriority() : int
Return values
int —getProperties()
Returns the payment system properties.
public
getProperties() : array<string|int, PaymentSystemProperty>
Return values
array<string|int, PaymentSystemProperty> —getTaxes()
Returns the payment system taxes.
public
getTaxes() : array<string|int, ItemTax>
Return values
array<string|int, ItemTax> —jsonSerialize()
Allow elements to be serialized.
public
jsonSerialize() : array<string|int, mixed>
Auto-invoked using "json_encode" function.
Return values
array<string|int, mixed> —toArray()
Used to allow elements to be serialized.
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFieldItem()
protected
getFieldItem(array<string|int, mixed> $item, string $class) : object|null
Parameters
- $item : array<string|int, mixed>
- $class : string
Return values
object|null —getFormattedData()
protected
getFormattedData(mixed $value) : mixed
Parameters
- $value : mixed
Return values
mixed —setAppliedTaxes()
protected
setAppliedTaxes(array<string|int, mixed> $appliedTaxes) : void
Parameters
- $appliedTaxes : array<string|int, mixed>
Return values
void —setArrayField()
Convert an API array of objects to a PHP array of objects.
protected
setArrayField(array<string|int, mixed> $data, string $class) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
-
Array that contains all the values to the objects to initialize
- $class : string
-
The PHP class we want the objects to be
Return values
array<string|int, mixed> —setError()
protected
setError(mixed $error) : void
Parameters
- $error : mixed
Return values
void —setLanguage()
protected
setLanguage(array<string|int, mixed> $language) : void
Parameters
- $language : array<string|int, mixed>
Return values
void —setProperties()
protected
setProperties(array<string|int, mixed> $properties) : void
Parameters
- $properties : array<string|int, mixed>
Return values
void —setTaxes()
protected
setTaxes(array<string|int, mixed> $taxes) : void
Parameters
- $taxes : array<string|int, mixed>