From 75160b12821f7f4299cce7f0b69c83c1502ae071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 27 May 2024 13:08:29 +0200 Subject: 2024-02-19 upstream --- .../stripe-php/lib/Service/CreditNoteService.php | 312 ++++++++++----------- 1 file changed, 156 insertions(+), 156 deletions(-) (limited to 'vendor/stripe/stripe-php/lib/Service/CreditNoteService.php') diff --git a/vendor/stripe/stripe-php/lib/Service/CreditNoteService.php b/vendor/stripe/stripe-php/lib/Service/CreditNoteService.php index 39807dc..ce6402a 100644 --- a/vendor/stripe/stripe-php/lib/Service/CreditNoteService.php +++ b/vendor/stripe/stripe-php/lib/Service/CreditNoteService.php @@ -1,156 +1,156 @@ -requestCollection('get', '/v1/credit_notes', $params, $opts); - } - - /** - * When retrieving a credit note, you’ll get a lines property - * containing the the first handful of those items. There is also a URL where you - * can retrieve the full (paginated) list of line items. - * - * @param string $parentId - * @param null|array $params - * @param null|array|\Stripe\Util\RequestOptions $opts - * - * @throws \Stripe\Exception\ApiErrorException if the request fails - * - * @return \Stripe\Collection - */ - public function allLines($parentId, $params = null, $opts = null) - { - return $this->requestCollection('get', $this->buildPath('/v1/credit_notes/%s/lines', $parentId), $params, $opts); - } - - /** - * Issue a credit note to adjust the amount of a finalized invoice. For a - * status=open invoice, a credit note reduces its - * amount_due. For a status=paid invoice, a credit note - * does not affect its amount_due. Instead, it can result in any - * combination of the following:. - * - * - * - * For post-payment credit notes the sum of the refund, credit and outside of - * Stripe amounts must equal the credit note total. - * - * You may issue multiple credit notes for an invoice. Each credit note will - * increment the invoice’s pre_payment_credit_notes_amount or - * post_payment_credit_notes_amount depending on its - * status at the time of credit note creation. - * - * @param null|array $params - * @param null|array|\Stripe\Util\RequestOptions $opts - * - * @throws \Stripe\Exception\ApiErrorException if the request fails - * - * @return \Stripe\CreditNote - */ - public function create($params = null, $opts = null) - { - return $this->request('post', '/v1/credit_notes', $params, $opts); - } - - /** - * Get a preview of a credit note without creating it. - * - * @param null|array $params - * @param null|array|\Stripe\Util\RequestOptions $opts - * - * @throws \Stripe\Exception\ApiErrorException if the request fails - * - * @return \Stripe\CreditNote - */ - public function preview($params = null, $opts = null) - { - return $this->request('get', '/v1/credit_notes/preview', $params, $opts); - } - - /** - * When retrieving a credit note preview, you’ll get a lines - * property containing the first handful of those items. This URL you can retrieve - * the full (paginated) list of line items. - * - * @param null|array $params - * @param null|array|\Stripe\Util\RequestOptions $opts - * - * @throws \Stripe\Exception\ApiErrorException if the request fails - * - * @return \Stripe\CreditNote - */ - public function previewLines($params = null, $opts = null) - { - return $this->request('get', '/v1/credit_notes/preview/lines', $params, $opts); - } - - /** - * Retrieves the credit note object with the given identifier. - * - * @param string $id - * @param null|array $params - * @param null|array|\Stripe\Util\RequestOptions $opts - * - * @throws \Stripe\Exception\ApiErrorException if the request fails - * - * @return \Stripe\CreditNote - */ - public function retrieve($id, $params = null, $opts = null) - { - return $this->request('get', $this->buildPath('/v1/credit_notes/%s', $id), $params, $opts); - } - - /** - * Updates an existing credit note. - * - * @param string $id - * @param null|array $params - * @param null|array|\Stripe\Util\RequestOptions $opts - * - * @throws \Stripe\Exception\ApiErrorException if the request fails - * - * @return \Stripe\CreditNote - */ - public function update($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/credit_notes/%s', $id), $params, $opts); - } - - /** - * Marks a credit note as void. Learn more about voiding credit notes. - * - * @param string $id - * @param null|array $params - * @param null|array|\Stripe\Util\RequestOptions $opts - * - * @throws \Stripe\Exception\ApiErrorException if the request fails - * - * @return \Stripe\CreditNote - */ - public function voidCreditNote($id, $params = null, $opts = null) - { - return $this->request('post', $this->buildPath('/v1/credit_notes/%s/void', $id), $params, $opts); - } -} + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/credit_notes', $params, $opts); + } + + /** + * When retrieving a credit note, you’ll get a lines property + * containing the the first handful of those items. There is also a URL where you + * can retrieve the full (paginated) list of line items. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection<\Stripe\CreditNoteLineItem> + */ + public function allLines($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/credit_notes/%s/lines', $parentId), $params, $opts); + } + + /** + * Issue a credit note to adjust the amount of a finalized invoice. For a + * status=open invoice, a credit note reduces its + * amount_due. For a status=paid invoice, a credit note + * does not affect its amount_due. Instead, it can result in any + * combination of the following:. + * + * + * + * For post-payment credit notes the sum of the refund, credit and outside of + * Stripe amounts must equal the credit note total. + * + * You may issue multiple credit notes for an invoice. Each credit note will + * increment the invoice’s pre_payment_credit_notes_amount or + * post_payment_credit_notes_amount depending on its + * status at the time of credit note creation. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/credit_notes', $params, $opts); + } + + /** + * Get a preview of a credit note without creating it. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote + */ + public function preview($params = null, $opts = null) + { + return $this->request('get', '/v1/credit_notes/preview', $params, $opts); + } + + /** + * When retrieving a credit note preview, you’ll get a lines + * property containing the first handful of those items. This URL you can retrieve + * the full (paginated) list of line items. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection<\Stripe\CreditNote> + */ + public function previewLines($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/credit_notes/preview/lines', $params, $opts); + } + + /** + * Retrieves the credit note object with the given identifier. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/credit_notes/%s', $id), $params, $opts); + } + + /** + * Updates an existing credit note. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/credit_notes/%s', $id), $params, $opts); + } + + /** + * Marks a credit note as void. Learn more about voiding credit notes. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote + */ + public function voidCreditNote($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/credit_notes/%s/void', $id), $params, $opts); + } +} -- cgit v1.2.3