From 45b72d28dff505fece2e5ed516d72f35a6ba7f25 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 30 Mar 2018 14:53:32 -0400 Subject: [PATCH] Update docs for each method in billing support class Making sure to include php docblocks for each billingSupport method. --- classes/billingSupport.php | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/classes/billingSupport.php b/classes/billingSupport.php index 8be0568..37bcd92 100644 --- a/classes/billingSupport.php +++ b/classes/billingSupport.php @@ -164,6 +164,17 @@ class GlmBillingSupport } + /** + * createPayment + * + * Insert payment into the database + * + * @param int $account Account id + * @param float $payment Payment Amount + * + * @access public + * @return payment id + */ public function createPayment( $account, $payment ) { // Insert the payment @@ -742,6 +753,14 @@ class GlmBillingSupport } + /** + * getInvoiceTypeById + * + * @param int $id Id to use for type + * + * @access public + * @return array + */ public function getInvoiceTypeById( $id ) { return $this->wpdb->get_row( @@ -755,6 +774,12 @@ class GlmBillingSupport ); } + /** + * getMembersInvoiceTypeByRefDest + * + * @access public + * @return mixed + */ public function getMembersInvoiceTypeByRefDest( $ref_dest ) { return $this->wpdb->get_var( @@ -770,6 +795,14 @@ class GlmBillingSupport ); } + /** + * getAllPayableInvoiceTypes + * + * Get all invoice types that have amounts + * + * @access public + * @return array + */ public function getAllPayableInvoiceTypes() { return $this->wpdb->get_results( @@ -783,6 +816,14 @@ class GlmBillingSupport ); } + /** + * getListOfAccountEmployees + * + * @param int $member_id Member id + * + * @access public + * @return array + */ public function getListOfAccountEmployees( $member_id ) { $accounts = array(); @@ -843,6 +884,12 @@ class GlmBillingSupport return $accounts; } + /** + * createMemberInvoiceWithEmployees + * + * @access public + * @return int + */ public function createMemberInvoiceWithEmployees( $invoice_data ) { // Make sure the required parts of $invoice_data exists. @@ -923,6 +970,14 @@ class GlmBillingSupport return $invoice_id; } + /** + * createLineItemForInvoice + * + * @param array $data Data array for the invoice + * + * @access public + * @return void + */ public function createLineItemForInvoice( $data ) { // Make sure the required parts of $data exists. @@ -969,6 +1024,17 @@ class GlmBillingSupport ); } + /** + * processMemberRenewal + * + * @param int $account_id Id of the account + * @param int $invoice_id Id of the invoice + * @param float $amount Amount of the total invoice + * @param array $employees Array of employees + * + * @access public + * @return array + */ public function processMemberRenewal( $account_id, $invoice_id, $amount, $employees = array() ) { $errors = array(); @@ -1137,6 +1203,14 @@ class GlmBillingSupport } + /** + * removeInvoiceById + * + * @param int $invoice_id Id of invoice to delete. + * + * @access public + * @return void + */ public function removeInvoiceById( $invoice_id ) { $this->wpdb->delete( -- 2.17.1