/** * Get all * * @access public * @return array $users */ public static function get_all() { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/invoice_queue?wsdl'); $details = $client->get_by_reseller(\Tigron\CP\User::get()->reseller_id); $users = array(); foreach ($details as $detail) { $temp_invoice_queue = new self(); $temp_invoice_queue->id = $detail['id']; $temp_invoice_queue->details = $detail; $invoice_queue[] = $temp_invoice_queue; } return $invoice_queue; }
/** * Get by user * * @access public * @param \Tigron\User $user * @return array $invoices */ public static function get_paged($sort, $direction, $page, $extra_conditions) { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/invoice?wsdl'); $data = $client->get_paged($sort, $direction, $page, $extra_conditions); $invoices = []; foreach ($data as $details) { $invoice = new self(); $invoice->details = $details; $invoice->id = $details['id']; $invoices[] = $invoice; } return $invoices; }
/** * Get by identifier * * @access public * @param string $identifier * @return Category */ public static function get_by_identifier($identifier) { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/product_type_category?wsdl'); $details = $client->get_by_identifier($identifier); $category = new self(); $category->details = $details; $category->id = $details['id']; return $category; }
/** * Get by user category * * @access public * @param \Tigron\User $user * @param \Tigron\Product\Category $category * @return array $products */ public static function get_by_user_category(\Tigron\CP\User $user, \Tigron\CP\Product\Type\Category $category) { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/product?wsdl'); $data = $client->get_by_user_category($user->id, $category->id); $products = []; foreach ($data as $details) { $product = new self(); $product->details = $details; $product->id = $details['id']; $products[] = $product; } return $products; }
/** * Get by id * * @access public * @return Invoice_Contact $order_item */ public static function get_by_id($id) { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/invoice_contact?wsdl'); $details = $client->get_by_id($id); $invoice_contact = new self(); $invoice_contact->id = $details['id']; $invoice_contact->details = $details; return $invoice_contact; }
/** * Get all resellers * * @access public * @return array Reseller */ public static function get_all() { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/reseller?wsdl'); $reseller_info = $client->get_all(); $resellers = []; foreach ($reseller_info as $info) { $resellers[] = Reseller::get_by_id($info['id']); } return $resellers; }
/** * Get by id * * @access public * @return Order $order */ public static function get_by_id($id) { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/order?wsdl'); $details = $client->get_by_id($id); $order = new self(); $order->id = $details['id']; $order->details = $details; return $order; }
/** * Get by id * * @access public * @return Product_Type $product_type */ public static function get_by_product_type_category(\Tigron\CP\Product\Type\Category $product_type_category) { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/product_type?wsdl'); $details = $client->get_by_product_type_category_reseller($product_type_category->id, \Tigron\CP\User::get()->reseller_id); $types = []; foreach ($details as $detail) { $type = new self(); $type->id = $detail['id']; $type->details = $detail; $types[] = $type; } return $types; }
/** * Search a user * * @access public * @return array $users * @param string $search */ public static function search($search) { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/user?wsdl'); $data = $client->search($search); $users = array(); foreach ($data as $details) { $user = new self(); $user->details = $details; $user->id = $details['id']; $users[] = $user; } return $users; }
/** * Get by user * * @access public * @param \Tigron\User $user * @return array $contacts */ public static function get_by_user(\Tigron\User $user) { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/contact?wsdl'); $data = $client->get_by_user($user->id); $contacts = []; foreach ($data as $details) { $contact = new self(); $contact->details = $details; $contact->id = $details['id']; $contacts[] = $contact; } return $contacts; }
/** * Get by domain tld * * @access public * @param string $name * @param string $domain * @param string $tld * @return array $subdomains */ public static function get_by_name_domain_tld($name, $domain, $tld) { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/subdomain?wsdl'); $details = $client->get_by_name_domain_tld($name, $domain, $tld); $subdomain = new self(); $subdomain->details = $details; $subdomain->id = $details['id']; return $subdomain; }
/** * Get all * * @access public * @return array $countries */ public static function get_all() { $client = new \Tigron\CP\Client\Soap('http://api.tigron.net/soap/country?wsdl'); $data = $client->get_all(); $countries = []; foreach ($data as $details) { $country = new self(); $country->id = $details['id']; $country->details = $details; $countries[] = $country; } return $countries; }