Skip to content

Instantly share code, notes, and snippets.

@tobio
Created June 6, 2012 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobio/2885166 to your computer and use it in GitHub Desktop.
Save tobio/2885166 to your computer and use it in GitHub Desktop.
Getting client currency and markup values
<?php
require_once '../../csrest_clients.php';
$wrap = new CS_REST_Clients('Your clients ID', 'Your API Key');
$result = $wrap->get();
echo "Result of GET /api/v3/clients/{id}\n<br />";
if($result->was_successful()) {
echo "Got client";
$billingDetails = $result->response->BillingDetails;
$currency = $billingDetails->Currency;
$markupPerRecipient = $billingDetails->MarkupPerRecipient;
echo '<br />Currency: '.$currency.'<br />Markup: '.$markupPerRecipient;
} else {
echo 'Failed with code '.$result->http_status_code."\n<br /><pre>";
var_dump($result->response);
}
echo '</pre>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment