Class PostalMethods
	
	
PostalMethods service for physically mailing letters
	 
	
		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_keystring$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_modeboolean$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
						$filearray$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 Parameters
						$addressarray$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_envelopeboolean$include_reply_envelope True to include a reply envelope in the mail, false to
not include a reply envelope
SeeNotes
							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
						$perforatedboolean$perforated True to have the bottom-third of the letter perforated, false to not
perforate the letter
SeeNotes
							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
						$descriptionstring$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
						arrayA 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
						arrayAn array of error info
 
 | 
		
		Magic methods summary