<?php
// File generated from our OpenAPI spec
namespace Stripe\Service;
class CreditNoteService extends \Stripe\Service\AbstractService
{
/**
* Returns a list of credit notes.
*
* @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 all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/credit_notes', $params, $opts);
}
/**
* When retrieving a credit note, you’ll get a <strong>lines</strong> 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
* <code>status=open</code> invoice, a credit note reduces its
* <code>amount_due</code>. For a <code>status=paid</code> invoice, a credit note
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX