You are here

public static function Braintree_Discount::all in Commerce Braintree 7

1 call to Braintree_Discount::all()
Braintree_DiscountTest::testAll_returnsAllDiscounts in braintree_php/tests/integration/DiscountTest.php

File

braintree_php/lib/Braintree/Discount.php, line 4

Class

Braintree_Discount

Code

public static function all() {
  $response = Braintree_Http::get('/discounts');
  $discounts = array(
    "discount" => $response['discounts'],
  );
  return Braintree_Util::extractAttributeAsArray($discounts, 'discount');
}