<commit_before><?php
require_once("Shirtsio.php");

Shirtsio::setApiKey('0ef58f89c6c8d0ce3f71e4ab3537db4e24d6ac40');

/************ quote /************/
$quote_resp = Quote::get_quote(Array('garment[0][product_id]'=> 3, 'garment[0][color]'=> 'White', 'garment[0][sizes][med]'=> 100,
                          'print[front][color_count]'=> 5));
print_r($quote_resp['subtotal']);

/************ End quote /************/


/************Order /************/
//place order

$art_work_file_front = realpath("./front.png");
$proof_file_front = realpath("./front.jpg");
$art_work_file_back = realpath("./back.png");
$proof_front_file_back = realpath("./back.jpg");

$data = array(
        'test'=> True, 
        'price'=> 79.28,
        'print[back][color_count]'=> 4, 
        'print[back][colors][0]'=> "101C", 
        'print[back][colors][1]'=> '107U',
        'addresses[0][name]'=> '<NAME>', 
        'addresses[0][address]'=> '123 Hope Ln.',
        'addresses[0][city]'=> 'Las Vegas', 
        'addresses[0][state]'=> 'Nevada', 
        'addresses[0][country]'=> 'US',
        'addresses[0][zipcode]'=> '12345', 
        'addresses[0][batch]'=> 1,
        'addresses[0][sizes][med]'=> 2,
        'addresses[0][sizes][lrg]'=> 2,
        'print_type'=> 'Digital Print', 
        'ship_type'=> 'Standard',
        'garment[0][product_id]'=> 2, 
        'garment[0][color]'=> "White",
        'garment[0][sizes][med]'=> 2, 
        'garment[0][sizes][lrg]'=> 2, 
        'print[front][color_count]'=> 5);
$files = array(
        'print[front][artwork]'=> '@'.$art_work_file_front, 
        'print[front][proof]'=> '@'.$proof_file_front,
        'print[back][artwork]'=> '@'.$art_work_file_back, 
        'print[back][proof]'=> '@'.$proof_front_file_back);
$order_resp = Order::place_order($data, $files);
print_r($order_resp);
print_r($order_resp['order_id']);

//get order status
$Orderid=array('order_id'=>'9999999');
$order_status_resp = Order::get_order_status($Orderid);
print_r($order_status_resp);

/************ End Order /************/

/************ Products /************/
//list categories

$categories_resp = Products::list_categories();
print_r($categories_resp);

// list products

$products_resp = Products::list_products($categories_resp[0]['category_id']);
print_r($products_resp);

$product_resp = Products::get_product($products_resp[0]['product_id']);
print_r($product_resp);<commit_msg>Update example.php<commit_after><?php
require_once("Shirtsio.php");

Shirtsio::setApiKey('0ef58f89c6c8d0ce3f71e4ab3537db4e24d6ac40');

/************ quote /************/
$quote_resp = Quote::get_quote(Array('garment[0][product_id]'=> 3, 'garment[0][color]'=> 'White', 'garment[0][sizes][med]'=> 100,
                          'print[front][color_count]'=> 5));
print_r($quote_resp['subtotal']);

/************ End quote /************/


/************Order /************/
//place order

$art_work_file_front = realpath("./front.png");
$proof_file_front = realpath("./front.jpg");
$art_work_file_back = realpath("./back.png");
$proof_front_file_back = realpath("./back.jpg");

$data = array(
        'test'=> True, 
        'price'=> 79.28,
        'print[back][color_count]'=> 4, 
        'print[back][colors][0]'=> "101C", 
        'print[back][colors][1]'=> '107U',
        'addresses[0][name]'=> '<NAME>', 
        'addresses[0][address]'=> '123 Hope Ln.',
        'addresses[0][city]'=> 'Las Vegas', 
        'addresses[0][state]'=> 'Nevada', 
        'addresses[0][country]'=> 'US',
        'addresses[0][zipcode]'=> '12345', 
        'addresses[0][batch]'=> 1,
        'addresses[0][sizes][med]'=> 2,
        'addresses[0][sizes][lrg]'=> 2,
        'print_type'=> 'Digital Print', 
        'ship_type'=> 'Standard',
        'garment[0][product_id]'=> 2, 
        'garment[0][color]'=> "White",
        'garment[0][sizes][med]'=> 2, 
        'garment[0][sizes][lrg]'=> 2, 
        'print[front][color_count]'=> 5);
$files = array(
        'print[front][artwork]'=> '@'.$art_work_file_front, 
        'print[front][proof]'=> '@'.$proof_file_front,
        'print[back][artwork]'=> '@'.$art_work_file_back, 
        'print[back][proof]'=> '@'.$proof_front_file_back);
$order_resp = Order::place_order($data, $files);
print_r($order_resp);
print_r($order_resp['order_id']);

<<<<<<< HEAD
//get order status
=======
// get order status

>>>>>>> 7103e491d5284e55d3bff1e1a39c7338d41c42c6
$Orderid=array('order_id'=>'9999999');
$order_status_resp = Order::get_order_status($Orderid);
print_r($order_status_resp);

/************ End Order /************/

/************ Products /************/
//list categories

$categories_resp = Products::list_categories();
print_r($categories_resp);

// list products

$products_resp = Products::list_products($categories_resp[0]['category_id']);
print_r($products_resp);

$product_resp = Products::get_product($products_resp[0]['product_id']);
print_r($product_resp);
{'fraction_non_alphanumeric': 0.25927435792906645, 'fraction_numerical': 0.03811659192825112, 'mean_word_length': 4.620847651775486, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 72, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4576547', 'n_tokens_mistral': 1829, 'n_tokens_neox': 1739, 'n_words': 231}