function __construct($debug = false)
 {
     $serviceUrl = "https://" . GetApiHostname() . "/api/0_5/AppointmentService.asmx?wsdl";
     $this->debug = $debug;
     $option = array();
     if ($debug) {
         $option = array('trace' => 1);
     }
     $this->client = new soapclient($serviceUrl, $option);
 }
 function __construct($debug = false)
 {
     $serviceUrl = "https://" . GetApiHostname() . "/api/0_5/ClientService.asmx?wsdl";
     $this->debug = $debug;
     $option = array('connection_timeout' => 3, 'cache_wsdl' => WSDL_CACHE_NONE, 'soap_version' => SOAP_1_1, 'exceptions' => true);
     if ($debug) {
         $option = array('trace' => 1);
     }
     // Use a local copy of the WSDL
     $this->client = new SoapClient(dirname(__FILE__) . "/ClientService.wsdl", $option);
 }
 function __construct($debug = false)
 {
     $endpointUrl = "https://" . GetApiHostname() . "/0_5/ClassService.asmx";
     $wsdlUrl = $endpointUrl . "?wsdl";
     $this->debug = $debug;
     $option = array();
     if ($debug) {
         $option = array('trace' => 1);
     }
     $this->client = new soapclient($wsdlUrl, $option);
     $this->client->__setLocation($endpointUrl);
 }
Esempio n. 4
0
 /**
  * AddOrUpdateClientsRaw is identical to AddOrUpdateClients, but returns the raw result of the SOAP call,
  * which may have additional information but will not be nicely formatted.
  * @param $clients An array of Client objects
  * @param $test If true, the call is made and validated but no changes are made.
  * @param SourceCredentials $credentials A source credentials object to use with this call
  * @param string $XMLDetail
  * @param int $PageSize
  * @param int $CurrentPage
  * @param string $Fields
  * @return bool Returns true if the arrival was successfully added.
  */
 public function AddOrUpdateClients($clients, $test = false, SourceCredentials $credentials = null, $XMLDetail = XMLDetail::Full, $PageSize = NULL, $CurrentPage = NULL, $Fields = NULL)
 {
     $additions['Test'] = $test;
     $additions['Clients'] = $clients;
     $params = $this->GetMindbodyParams($additions, $this->GetCredentials($credentials), $XMLDetail, $PageSize, $CurrentPage, $Fields);
     $this->client->__setLocation("https://" . GetApiHostname() . "/0_5/ClientService.asmx");
     //Setting the Endpoint to use SSL
     try {
         $result = $this->client->AddOrUpdateClients($params);
     } catch (SoapFault $fault) {
         // <xmp> tag displays xml output in html
         echo 'Request : <br/><xmp>', $this->client->__getLastRequest(), '</xmp><br/><br/> Error Message : <br/>', $fault->getMessage();
     }
     if ($this->debug) {
         echo 'Request : <br/><xmp>', $this->client->__getLastRequest(), '</xmp><br/><br/>';
         echo '<h2>AddOrUpdateClientsRaw Result</h2><pre>';
         print_r($result);
         echo "</pre>";
     }
     return $result;
 }
Esempio n. 5
0
 /**
  * Returns the raw result of the MINDBODY SOAP call.
  * @param int $PageSize
  * @param int $CurrentPage
  * @param string $XMLDetail
  * @param string $Fields
  * @param SourceCredentials $credentials A source credentials object to use with this call
  * @return object The raw result of the SOAP call
  */
 public function CheckoutShoppingCart($cartID = null, $clientID, $Test = false, array $cartItems, array $payments, SourceCredentials $credentials = null, $XMLDetail = XMLDetail::Full, $PageSize = NULL, $CurrentPage = NULL, $Fields = NULL)
 {
     $additions = array();
     $additions['ClientID'] = $clientID;
     $additions['CartItems'] = $cartItems;
     $additions['Payments'] = $payments;
     if (isset($cartID)) {
         $additions['CartID'] = $cartID;
     }
     if (isset($Test)) {
         $additions['Test'] = $Test;
     }
     $params = $this->GetMindbodyParams($additions, $this->GetCredentials($credentials), $XMLDetail, $PageSize, $CurrentPage, $Fields);
     $this->client->__setLocation("https://" . GetApiHostname() . "/0_5/SaleService.asmx");
     //Setting the Endpoint to use SSL
     try {
         $result = $this->client->CheckoutShoppingCart($params);
     } catch (SoapFault $fault) {
         DebugResponse($this->client, $fault->getMessage());
         // <xmp> tag displays xml output in html
         echo '</xmp><br/><br/> Error Message : <br/>', $fault->getMessage();
     }
     if ($this->debug) {
         DebugRequest($this->client);
         DebugResponse($this->client, $result);
     }
     return $result;
 }
Esempio n. 6
0
 /**
  * Returns the raw result of the MINDBODY SOAP call.
  * @param int $PageSize
  * @param int $CurrentPage
  * @param string $XMLDetail
  * @param string $Fields
  * @param SourceCredentials $credentials A source credentials object to use with this call
  * @return object The raw result of the SOAP call
  */
 public function FinderCheckoutShoppingCart($mbfClassID, $partnerID, $searchLatitude, $searchLongitude, $paymentInfo, $test = false, $PageSize = null, $CurrentPage = null, $XMLDetail = XMLDetail::Full, $Fields = NULL, SourceCredentials $credentials = null, UserCredentials $usercredentials = null)
 {
     $additions = array();
     $additions['MBFClassID'] = $mbfClassID;
     $additions['SearchLatitude'] = $searchLatitude;
     $additions['SearchLongitude'] = $searchLongitude;
     $additions['PaymentInfo'] = $paymentInfo;
     $additions['PartnerID'] = $partnerID;
     if (isset($test)) {
         $additions['Test'] = $test;
     }
     $params = $this->GetMindbodyParams($additions, $this->GetCredentials($credentials), $XMLDetail, $PageSize, $CurrentPage, $Fields, $this->GetUserCredentials($usercredentials));
     $this->client->__setLocation("https://" . GetApiHostname() . "/0_5/FinderService.asmx");
     //Setting the Endpoint to use SSL
     try {
         $result = $this->client->FinderCheckoutShoppingCart($params);
     } catch (SoapFault $fault) {
         DebugResponse($this->client);
         // <xmp> tag displays xml output in html
         echo '</xmp><br/><br/> Error Message : <br/>', $fault->getMessage();
     }
     if ($this->debug) {
         DebugRequest($this->client);
         DebugResponse($this->client, $result);
     }
     return $result;
 }