Using php, I trying to get a particular coupon.
require_once './lib/Stripe.php';
Stripe::setApiKey(STRIPE_SK);
$response = Stripe_Coupon::retrieve('coupon id here');
print_r($response);
print_r($response); gave me the object below. My question is how can retrieve the [id] from the object? Thanks for helping
Stripe_Coupon Object
(
[_apiKey:protected] => sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxx
[_values:protected] => Array
(
[id] => 10percent
[created] => 1395914393
[percent_off] => 10
[amount_off] =>
[currency] =>
[object] => coupon
[livemode] =>
[duration] => repeating
[redeem_by] =>
[max_redemptions] =>
[times_redeemed] => 2
[duration_in_months] => 12
[valid] => 1
)
)