diff --git a/init.php b/init.php index b40ebad3f..e45f7da89 100644 --- a/init.php +++ b/init.php @@ -236,6 +236,7 @@ require __DIR__ . '/lib/Service/Terminal/ConnectionTokenService.php'; require __DIR__ . '/lib/Service/Terminal/LocationService.php'; require __DIR__ . '/lib/Service/Terminal/ReaderService.php'; +require __DIR__ . '/lib/Service/TestHelpers/RefundService.php'; require __DIR__ . '/lib/Service/TestHelpers/Terminal/ReaderService.php'; require __DIR__ . '/lib/Service/TestHelpers/TestClockService.php'; require __DIR__ . '/lib/Service/TokenService.php'; diff --git a/lib/BillingPortal/Configuration.php b/lib/BillingPortal/Configuration.php index cb6007796..fd7393eaf 100644 --- a/lib/BillingPortal/Configuration.php +++ b/lib/BillingPortal/Configuration.php @@ -11,7 +11,7 @@ * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property bool $active Whether the configuration is active and can be used to create portal sessions. - * @property null|string $application ID of the Connect Application that created the configuration. + * @property null|string|\Stripe\StripeObject $application ID of the Connect Application that created the configuration. * @property \Stripe\StripeObject $business_profile * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $default_return_url The default URL to redirect customers to when they click on the portal's link to return to your website. This can be overriden when creating the session. diff --git a/lib/Product.php b/lib/Product.php index 68dc428bc..bd1025b3e 100644 --- a/lib/Product.php +++ b/lib/Product.php @@ -35,7 +35,7 @@ * @property null|\Stripe\StripeObject $package_dimensions The dimensions of this product for shipping purposes. * @property null|bool $shippable Whether this product is shipped (i.e., physical goods). * @property null|string $statement_descriptor Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. - * @property null|string|\Stripe\TaxCode $tax_code A tax code ID. + * @property null|string|\Stripe\TaxCode $tax_code A tax code ID. * @property string $type The type of the product. The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans. * @property null|string $unit_label A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. diff --git a/lib/Service/CustomerService.php b/lib/Service/CustomerService.php index 2a7be0f47..d6086d8a2 100644 --- a/lib/Service/CustomerService.php +++ b/lib/Service/CustomerService.php @@ -132,7 +132,7 @@ public function createBalanceTransaction($parentId, $params = null, $opts = null * * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return \Stripe\FundingInstructions + * @return \Stripe\Customer */ public function createFundingInstructions($id, $params = null, $opts = null) { diff --git a/lib/Service/TaxCodeService.php b/lib/Service/TaxCodeService.php index 1e5bbfeb4..fd167a101 100644 --- a/lib/Service/TaxCodeService.php +++ b/lib/Service/TaxCodeService.php @@ -7,7 +7,7 @@ class TaxCodeService extends \Stripe\Service\AbstractService { /** - * A list of all tax codes + * A list of all tax codes * available to add to Products in order to allow specific tax calculations. * * @param null|array $params diff --git a/lib/Service/TestHelpers/RefundService.php b/lib/Service/TestHelpers/RefundService.php new file mode 100644 index 000000000..de0e4d10b --- /dev/null +++ b/lib/Service/TestHelpers/RefundService.php @@ -0,0 +1,24 @@ +requires_action. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Refund + */ + public function expire($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/refunds/%s/expire', $id), $params, $opts); + } +} diff --git a/lib/Service/TestHelpers/TestHelpersServiceFactory.php b/lib/Service/TestHelpers/TestHelpersServiceFactory.php index 222fe1587..aaf827514 100644 --- a/lib/Service/TestHelpers/TestHelpersServiceFactory.php +++ b/lib/Service/TestHelpers/TestHelpersServiceFactory.php @@ -7,6 +7,7 @@ /** * Service factory class for API resources in the TestHelpers namespace. * + * @property RefundService $refunds * @property Terminal\TerminalServiceFactory $terminal * @property TestClockService $testClocks */ @@ -16,6 +17,7 @@ class TestHelpersServiceFactory extends \Stripe\Service\AbstractServiceFactory * @var array */ private static $classMap = [ + 'refunds' => RefundService::class, 'terminal' => Terminal\TerminalServiceFactory::class, 'testClocks' => TestClockService::class, ]; diff --git a/lib/ShippingRate.php b/lib/ShippingRate.php index 9091b688c..e63daf1a7 100644 --- a/lib/ShippingRate.php +++ b/lib/ShippingRate.php @@ -20,7 +20,7 @@ * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $tax_behavior Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. - * @property null|string|\Stripe\TaxCode $tax_code A tax code ID. The Shipping tax code is txcd_92010001. + * @property null|string|\Stripe\TaxCode $tax_code A tax code ID. The Shipping tax code is txcd_92010001. * @property string $type The type of calculation to use on the shipping rate. Can only be fixed_amount for now. */ class ShippingRate extends ApiResource diff --git a/lib/TaxCode.php b/lib/TaxCode.php index bfdbf03ac..0dfc49e8a 100644 --- a/lib/TaxCode.php +++ b/lib/TaxCode.php @@ -5,8 +5,8 @@ namespace Stripe; /** - * Tax codes classify goods and - * services for tax purposes. + * Tax codes classify + * goods and services for tax purposes. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php index 1b3596f67..c839360e4 100644 --- a/tests/Stripe/GeneratedExamplesTest.php +++ b/tests/Stripe/GeneratedExamplesTest.php @@ -2815,4 +2815,11 @@ public function testDeleteConfiguration() $result = $this->client->terminal->configurations->delete('uc_123', []); static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result); } + + public function testExpireRefund() + { + $this->expectsRequest('post', '/v1/test_helpers/refunds/re_123/expire'); + $result = $this->client->testHelpers->refunds->expire('re_123', []); + static::assertInstanceOf(\Stripe\Refund::class, $result); + } }