Created
June 6, 2012 22:15
-
-
Save tobio/2885166 to your computer and use it in GitHub Desktop.
Getting client currency and markup values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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