Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • areyouahuman
      • auth
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
        • default
      • exchange
        • rates
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • quickbooks
            • invoice
      • json
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • recaptcha
      • reports
        • aging
          • invoices
        • custom
          • report
        • invoice
          • creation
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • form
      • html
      • javascript
      • xml
    • lib
  • None
  • PHP

Classes

  • PostalMethods

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
string
$api_key The Postal Methods API key
public
# setTestMode( boolean $test_mode )

Sets whether Postal Methods should physically mail the document, or simulate it

Sets whether Postal Methods should physically mail the document, or simulate it

Parameters

$test_mode
boolean
$test_mode False to physically mail documents, true to only simulate it
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
array
$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
array
$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
boolean
$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
# 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
boolean
$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
string
$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

Magic methods summary

Blesta API documentation generated by ApiGen 2.8.0