JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrtrue if the object exists in live mode or the value false if the object exists in test mode. * @property null|\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 $nickname A brief description of the template, hidden from customers * @property string $status The status of the template, one of active or archived. * @property int $version Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering */ class InvoiceRenderingTemplate extends ApiResource { const OBJECT_NAME = 'invoice_rendering_template'; const STATUS_ACTIVE = 'active'; const STATUS_ARCHIVED = 'archived'; /** * List all templates, ordered by creation date, with the most recently created * template appearing first. * * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Collection<\Stripe\InvoiceRenderingTemplate> of ApiResources */ public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, \Stripe\Collection::class, $params, $opts); } /** * Retrieves an invoice rendering template with the given ID. It by default returns * the latest version of the template. Optionally, specify a version to see * previous versions. * * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\InvoiceRenderingTemplate */ public static function retrieve($id, $opts = null) { $opts = \Stripe\Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; } /** * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\InvoiceRenderingTemplate the archived invoice rendering template */ public function archive($params = null, $opts = null) { $url = $this->instanceUrl() . '/archive'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } /** * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\InvoiceRenderingTemplate the unarchived invoice rendering template */ public function unarchive($params = null, $opts = null) { $url = $this->instanceUrl() . '/unarchive'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } }