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

  • PostalMethods
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class PostalMethods

PostalMethods service for physically mailing letters

Package: blesta\components\delivery\postal\methods
Copyright: Copyright (c) 2011, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at components/delivery/postal_methods/postal_methods.php
Methods summary
public
# __construct( )

Constructs a new PostalMethods component

Constructs a new PostalMethods component

public
# setApiKey( string $api_key )

Sets the Postal Methods API Key required for making requests

Sets the Postal Methods API Key required for making requests

Parameters

$api_key
The Postal Methods API key
public
# setFile( array $file )

Sets the file and file type of the file to be mailed

Sets the file and file type of the file to be mailed

Parameters

$file

A key=>value array of the file and it's extension:

  • file The bitstream of the file to send in binary
  • type The type of file this is (i.e. HTML, DOC, DOCX, or PDF), (optional, default PDF)
public
# setToAddress( array $address )

Sets the outside address

Sets the outside address

Parameters

$address

A list of attributes attributes including:

  • name The name of the recipient
  • company The company name
  • address1 Address1
  • address2 Address2
  • city The city
  • state The ISO 3166-2 subdivision code
  • zip The postal code
  • country_code The ISO 3166-1 alpha3 country code
public
# setReplyEnvelope( boolean $include_reply_envelope )

Sets a reply envelope to be included in the mail

Sets a reply envelope to be included in the mail

Parameters

$include_reply_envelope

True to include a reply envelope in the mail, false to not include a reply envelope

See

PostalMethods::setToAddress()

Notes

An address must be explicitly set in order to include a reply envelope
public
# setColored( boolean $colored )

Sets whether to print in color

Sets whether to print in color

Parameters

$colored
True to print in color, false to print in black-and-white
public
# setDoubleSided( boolean $double_sided )

Sets whether to print on both sides of a page

Sets whether to print on both sides of a page

Parameters

$double_sided
True to print on both sides of a page, false to print on one
public
# setPerforated( boolean $perforated )

Sets whether the bottom-third of the letter sent to PostalMethods should be perforated

Sets whether the bottom-third of the letter sent to PostalMethods should be perforated

Parameters

$perforated

True to have the bottom-third of the letter perforated, false to not perforate the letter

See

PostalMethods::setToAddress()

Notes

An address must be explicitly set in order to have this letter perforated
public
# setDescription( string $description )

Sets a description to associate with this letter in the PostalMethods account

Sets a description to associate with this letter in the PostalMethods account

Parameters

$description
A description to associate with this letter. Limit 100 characters
public array
# getFileTypes( )

Retrieves a list of available file types accepted by Postal Methods

Retrieves a list of available file types accepted by Postal Methods

Returns

array
A numerically-indexed array of available file types
public
# resetAll( )

Resets all settings back to default except for the account username and password

Resets all settings back to default except for the account username and password

public
# send( )

Sends the document to Postal Methods for mailing

Sends the document to Postal Methods for mailing

public array
# errors( )

Returns all errors set in this object

Returns all errors set in this object

Returns

array
An array of error info
Blesta API documentation generated by ApiGen