diff --git a/CHANGELOG.md b/CHANGELOG.md index be5c260..9ed912c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 2.15.0 + +* [BC] Set default Stripe API to "2015-03-24" version. This adds the property `discountable` for `createInvoiceItem` +and `updateInvoiceItem` for all descriptors. + # 2.14.1 * Fix missing import diff --git a/README.md b/README.md index c53210e..944a0c8 100644 --- a/README.md +++ b/README.md @@ -30,11 +30,11 @@ $client = new StripeClient('my-api-key'); > You can change the API key for the client using the `setApiKey` method. This is useful if you are using Stripe Connect and make both your own API calls and API calls on behalf of your users. -The currently latest supported version of the API is **2015-02-18**. You can (and should) also explicitly specify the version +The currently latest supported version of the API is **2015-03-24**. You can (and should) also explicitly specify the version of the client using the second parameter: ```php -$client = new StripeClient('my-api-key', '2015-02-18'); +$client = new StripeClient('my-api-key', '2015-03-24'); ``` ### Versioning @@ -50,7 +50,7 @@ However, each new minor version (2.1.0 to 2.2.0 for instance) will update the St Currently, the following Stripe API versions are accepted by ZfrStripe: `2014-03-28`, `2014-05-19`, `2014-06-13`, `2014-06-17`, `2014-07-22`, `2014-07-26`, `2014-08-04`, `2014-08-20`, `2014-09-08`, `2014-10-07`, `2014-11-05`, `2014-11-20`, `2014-12-08`, `2014-12-17`, `2014-12-22`, `2015-01-11`, `2015-01-26`, `2015-02-10`, `2015-02-16`, -`2015-02-18`. I will try to update the library as soon as new version are released. +`2015-02-18`, `2015-03-24`. I will try to update the library as soon as new version are released. > If you need support for older versions, please use branch v1 of ZfrStripe. diff --git a/src/Client/ServiceDescription/Stripe-v1.0.php b/src/Client/ServiceDescription/Stripe-v1.0.php index 8c2cd04..582faab 100644 --- a/src/Client/ServiceDescription/Stripe-v1.0.php +++ b/src/Client/ServiceDescription/Stripe-v1.0.php @@ -2220,6 +2220,13 @@ 'type' => 'string', 'required' => false ], + 'discountable' => [ + 'description' => 'Controls whether discounts apply to this invoice item', + 'location' => 'query', + 'type' => 'boolean', + 'filters' => ['ZfrStripe\Client\Filter\BooleanFilter::encodeValue'], + 'required' => false + ], 'metadata' => [ 'description' => 'Optional metadata', 'location' => 'query', @@ -2361,6 +2368,13 @@ 'type' => 'string', 'required' => false ], + 'discountable' => [ + 'description' => 'Controls whether discounts apply to this invoice item', + 'location' => 'query', + 'type' => 'boolean', + 'filters' => ['ZfrStripe\Client\Filter\BooleanFilter::encodeValue'], + 'required' => false + ], 'metadata' => [ 'description' => 'Optional metadata', 'location' => 'query', diff --git a/src/Client/ServiceDescription/Stripe-v1.1.php b/src/Client/ServiceDescription/Stripe-v1.1.php index bb2bd56..edd9c77 100644 --- a/src/Client/ServiceDescription/Stripe-v1.1.php +++ b/src/Client/ServiceDescription/Stripe-v1.1.php @@ -2220,6 +2220,13 @@ 'type' => 'string', 'required' => false ], + 'discountable' => [ + 'description' => 'Controls whether discounts apply to this invoice item', + 'location' => 'query', + 'type' => 'boolean', + 'filters' => ['ZfrStripe\Client\Filter\BooleanFilter::encodeValue'], + 'required' => false + ], 'metadata' => [ 'description' => 'Optional metadata', 'location' => 'query', @@ -2361,6 +2368,13 @@ 'type' => 'string', 'required' => false ], + 'discountable' => [ + 'description' => 'Controls whether discounts apply to this invoice item', + 'location' => 'query', + 'type' => 'boolean', + 'filters' => ['ZfrStripe\Client\Filter\BooleanFilter::encodeValue'], + 'required' => false + ], 'metadata' => [ 'description' => 'Optional metadata', 'location' => 'query', diff --git a/src/Client/ServiceDescription/Stripe-v1.2.php b/src/Client/ServiceDescription/Stripe-v1.2.php index 831ab66..5d89e19 100644 --- a/src/Client/ServiceDescription/Stripe-v1.2.php +++ b/src/Client/ServiceDescription/Stripe-v1.2.php @@ -2220,6 +2220,13 @@ 'type' => 'string', 'required' => false ], + 'discountable' => [ + 'description' => 'Controls whether discounts apply to this invoice item', + 'location' => 'query', + 'type' => 'boolean', + 'filters' => ['ZfrStripe\Client\Filter\BooleanFilter::encodeValue'], + 'required' => false + ], 'metadata' => [ 'description' => 'Optional metadata', 'location' => 'query', @@ -2361,6 +2368,13 @@ 'type' => 'string', 'required' => false ], + 'discountable' => [ + 'description' => 'Controls whether discounts apply to this invoice item', + 'location' => 'query', + 'type' => 'boolean', + 'filters' => ['ZfrStripe\Client\Filter\BooleanFilter::encodeValue'], + 'required' => false + ], 'metadata' => [ 'description' => 'Optional metadata', 'location' => 'query', diff --git a/src/Client/ServiceDescription/Stripe-v1.3.php b/src/Client/ServiceDescription/Stripe-v1.3.php index 63f922e..e83abf8 100644 --- a/src/Client/ServiceDescription/Stripe-v1.3.php +++ b/src/Client/ServiceDescription/Stripe-v1.3.php @@ -2220,6 +2220,13 @@ 'type' => 'string', 'required' => false ], + 'discountable' => [ + 'description' => 'Controls whether discounts apply to this invoice item', + 'location' => 'query', + 'type' => 'boolean', + 'filters' => ['ZfrStripe\Client\Filter\BooleanFilter::encodeValue'], + 'required' => false + ], 'metadata' => [ 'description' => 'Optional metadata', 'location' => 'query', @@ -2361,6 +2368,13 @@ 'type' => 'string', 'required' => false ], + 'discountable' => [ + 'description' => 'Controls whether discounts apply to this invoice item', + 'location' => 'query', + 'type' => 'boolean', + 'filters' => ['ZfrStripe\Client\Filter\BooleanFilter::encodeValue'], + 'required' => false + ], 'metadata' => [ 'description' => 'Optional metadata', 'location' => 'query', diff --git a/src/Client/StripeClient.php b/src/Client/StripeClient.php index a8f8282..2fd290d 100644 --- a/src/Client/StripeClient.php +++ b/src/Client/StripeClient.php @@ -199,7 +199,7 @@ class StripeClient extends Client /** * Stripe API version */ - const LATEST_API_VERSION = '2015-02-18'; + const LATEST_API_VERSION = '2015-03-24'; /** * @var array @@ -207,7 +207,7 @@ class StripeClient extends Client protected $availableVersions = [ '2014-03-28', '2014-05-19', '2014-06-13', '2014-06-17', '2014-07-22', '2014-07-26', '2014-08-04', '2014-08-20', '2014-09-08', '2014-10-07', '2014-11-05', '2014-11-20', '2014-12-08', '2014-12-17', '2014-12-22', '2015-01-11', - '2015-01-26', '2015-02-10', '2015-02-16', '2015-02-18' + '2015-01-26', '2015-02-10', '2015-02-16', '2015-02-18', '2015-03-24' ]; /**