Skip to content

Instantly share code, notes, and snippets.

@pnegri
Created July 17, 2014 18:05
Show Gist options
  • Save pnegri/7f22942a27f1b2ca6969 to your computer and use it in GitHub Desktop.
Save pnegri/7f22942a27f1b2ca6969 to your computer and use it in GitHub Desktop.
<?php
include("lib/Iugu.php");
// Iugu::setApiKey("6de701b310dd429546d35ee54f195d67");
class Ts_Iugu_ChurnRate extends APIResource {
public static function last30Days() {
$url = Iugu::getBaseURI() . "/accounts/last_30_days_churn_rate";
$response = self::API()->request(
"GET",
$url,
Array(
"mode" => "LIVE",
"api_token" => "2e64d0252d19373dafa0aed5bac69f9c"
)
);
echo $response;
}
}
Ts_Iugu_ChurnRate::last30Days();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment