Blesta Source Documentation

PackageFeed extends AbstractDataFeed

Package feed

Table of Contents

Properties

$Html
$options

Methods

__construct() Initialize package feed
errors() Retrieves any errors associated with the captcha
get() Executes and returns the result of a given endpoint
getDescription() Returns the description of the data feed
getName() Returns the name of the data feed
getOptionFields() Gets a list of the options input fields
setOptions() Sets options for the data feed
setErrors() Sets the given errors
clientLimitEndpoint() Gets the limit quantity per client of a given package
descriptionEndpoint() Gets the description of a package in the given format and language
nameEndpoint() Gets the name of a package in the given language
pricingEndpoint() Gets the price, renewing price, fees, currency, term and period of a pricing
quantityEndpoint() Gets the quantity (available stock) of given package
Properties

$options

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

An array of options

Methods

__construct()

Initialize package feed

public __construct() : mixed

errors()

Retrieves any errors associated with the captcha

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

An array of errors

get()

Executes and returns the result of a given endpoint

public get(string $endpoint[, array<string|int, mixed> $vars = [] ]) : mixed
Parameters
$endpoint : string

The endpoint to execute

$vars : array<string|int, mixed> = []

An array containing the feed parameters

Return values
mixed

The data feed response

getDescription()

Returns the description of the data feed

public getDescription() : string
Return values
string

The description of the data feed

getName()

Returns the name of the data feed

public getName() : string
Return values
string

The name of the data feed

getOptionFields()

Gets a list of the options input fields

public getOptionFields([array<string|int, mixed> $vars = [] ]) : InputFields
Parameters
$vars : array<string|int, mixed> = []

An array containing the posted fields

Return values
InputFields

An object representing the list of input fields

setOptions()

Sets options for the data feed

public setOptions(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>

An array of options

setErrors()

Sets the given errors

protected setErrors(array<string|int, mixed> $errors) : mixed
Parameters
$errors : array<string|int, mixed>

An array of error messages in the format:

  • ['name' => ['type' => 'Error Message']]

clientLimitEndpoint()

Gets the limit quantity per client of a given package

private clientLimitEndpoint(array<string|int, mixed> $vars) : mixed
Parameters
$vars : array<string|int, mixed>

An array containing the following items:

  • package_id The ID of the package to fetch the limit quantity

descriptionEndpoint()

Gets the description of a package in the given format and language

private descriptionEndpoint(array<string|int, mixed> $vars) : mixed
Parameters
$vars : array<string|int, mixed>

An array containing the following items:

  • package_id The ID of the package to fetch the name
  • lang The language in which to fetch the name (optional)
  • format In what format the data should be returned, it can be 'html' or 'text' (optional, default html)

nameEndpoint()

Gets the name of a package in the given language

private nameEndpoint(array<string|int, mixed> $vars) : mixed
Parameters
$vars : array<string|int, mixed>

An array containing the following items:

  • package_id The ID of the package to fetch the name
  • lang The language in which to fetch the name (optional)

pricingEndpoint()

Gets the price, renewing price, fees, currency, term and period of a pricing

private pricingEndpoint(array<string|int, mixed> $vars) : mixed
Parameters
$vars : array<string|int, mixed>

An array containing the following items:

  • pricing_id The ID of the pricing to fetch the price
  • get The price to be obtained, it can be 'price', 'price_renews', 'price_transfer', 'setup_fee', 'cancel_fee', 'currency', 'term' or 'period' (optional, default price)

quantityEndpoint()

Gets the quantity (available stock) of given package

private quantityEndpoint(array<string|int, mixed> $vars) : mixed
Parameters
$vars : array<string|int, mixed>

An array containing the following items:

  • package_id The ID of the package to fetch the quantity
Tags
subpackage

core.Util.DataFeed.Feeds

copyright

Copyright (c) 2022, Phillips Data, Inc.

license

http://www.blesta.com/license/ The Blesta License Agreement

link

Blesta


        
On this page

Search results