Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • AbstractServiceChangeBuilder
  • ServiceChangeBuilder

Interfaces

  • ServiceChangeBuilderInterface
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class ServiceChangeBuilder

Service change builder

Blesta\Core\Pricing\Presenter\Build\Options\AbstractOptions implements Blesta\Core\Pricing\Presenter\Build\Options\OptionsInterface
Extended by Blesta\Core\Pricing\Presenter\Build\ServiceChange\AbstractServiceChangeBuilder implements Blesta\Core\Pricing\Presenter\Build\ServiceChange\ServiceChangeBuilderInterface
Extended by Blesta\Core\Pricing\Presenter\Build\ServiceChange\ServiceChangeBuilder uses Blesta\Core\Pricing\MetaItem\Meta
Namespace: Blesta\Core\Pricing\Presenter\Build\ServiceChange
Package: blesta\core\Pricing\Presenter\Build\ServiceChange
Copyright: Copyright (c) 2019, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at core/Pricing/Presenter/Build/ServiceChange/ServiceChangeBuilder.php
Methods summary
public Blesta\Core\Pricing\Presenter\Type\ServiceChangePresenter
# build( stdClass $service, array $vars, stdClass $package, stdClass $pricing, array $options )

Retrieve a ServiceChangePresenter

Retrieve a ServiceChangePresenter

Parameters

$service

An stdClass object representing the original service, including:

  • name The service's name
  • qty The service quantity
  • override_price The service's override price
  • override_currency The service's override currency
  • date_renews The service renew date
  • options An array of service options, each option an stdClass object containing:
    • id The option value ID
    • service_id The service ID
    • option_pricing_id The option's pricing ID
    • qty The option quantity
    • option_value The option value
    • option_value_name The option value name
    • option_id The option's ID
    • option_label The option's label
    • option_name The name of the option
    • option_type The type of option
    • option_pricing_term The option's pricing term
    • option_pricing_period The option's pricing period
    • option_pricing_price The option's pricing price
    • option_pricing_setup_fee The option's pricing setup fee
    • option_pricing_currency The option's pricing currency
  • package_pricing An stdClass object representing the service's package pricing, including:
    • id The package pricing ID
    • package_id The package ID
    • term The pricing term
    • period The pricing period
    • setup_fee The pricing setup fee
    • cancel_fee The pricing cancelation fee
    • currency The pricing currency
  • package An stdClass object representing the service's package, including:
    • name The package name
    • taxable 1 or 0, whether the package is taxable
    • prorata_day The package pro rata day
    • prorata_cutoff The package pro rata cutoff day
$vars

An array of input data, including:

  • pricing_id The ID of the selected package pricing
  • qty The new service quantity - default's to current service quantity if not specified
  • override_price The new override price
  • override_currency The new override currency
  • configoptions An array of new config options where each key is the option ID and the value is the selected option value
$package

An stdClass object representing the new package being changed to, including:

  • id The package ID
  • name The package's name
  • taxable 1 or 0, whether the package is taxable
  • prorata_day The package pro rata day
  • prorata_cutoff The package pro rata cutoff day
$pricing

An stdClass object representing the new service's package pricing, including:

  • id The package pricing ID
  • package_id The package ID
  • term The pricing term
  • period The pricing period
  • setup_fee The pricing setup fee
  • cancel_fee The pricing cancelation fee
  • currency The pricing currency
$options

An array of stdClass objects representing all new service package options, each including:

  • id The option ID
  • label The option label
  • name The option name
  • type The option type
  • values An array of stdClass objects representing each option value, including:
    • id The option value ID
    • option_id The option ID
    • value The option value
    • min The minimum value
    • max The maximum value
    • step The step value
    • pricing An array whose first index contains an stdClass object representing the option value pricing, including:
      • id The option value pricing ID
      • pricing_id The pricing ID
      • option_value_id The option value ID
      • term The pricing term
      • period The pricing period
      • price The option value price
      • setup_fee The option value setup fee
      • cancel_fee The option value cancelation fee
      • currency The option value currency

Returns

Blesta\Core\Pricing\Presenter\Type\ServiceChangePresenter
An instance of the ServiceChangePresenter
Methods inherited from Blesta\Core\Pricing\Presenter\Build\ServiceChange\AbstractServiceChangeBuilder
__construct(), discounts()
Methods inherited from Blesta\Core\Pricing\Presenter\Build\Options\AbstractOptions
formatDiscounts(), formatOptions(), formatSettings(), formatTaxes(), options(), settings(), taxes()
Methods used from Blesta\Core\Pricing\MetaItem\Meta
getMeta(), getMetaFromCollection()
Properties inherited from Blesta\Core\Pricing\Presenter\Build\ServiceChange\AbstractServiceChangeBuilder
$formatFactory, $itemFactory, $presenterFactory, $pricingFactory, $serviceFactory
Properties inherited from Blesta\Core\Pricing\Presenter\Build\Options\AbstractOptions
$discounts, $options, $settings, $taxes
Blesta API documentation generated by ApiGen