true if the object exists in live mode or the value false if the object exists in test mode. * @property null|string $name String indicating the name of the Configuration object, set by the user * @property null|\Stripe\StripeObject $offline * @property null|\Stripe\StripeObject $reboot_window * @property null|\Stripe\StripeObject $stripe_s700 * @property null|\Stripe\StripeObject $tipping * @property null|\Stripe\StripeObject $verifone_p400 */ class Configuration extends \Stripe\ApiResource { const OBJECT_NAME = 'terminal.configuration'; use \Stripe\ApiOperations\Update; /** * Creates a new Configuration object. * * @param null|array $params * @param null|array|string $options * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Terminal\Configuration the created resource */ public static function create($params = null, $options = null) { self::_validateParams($params); $url = static::classUrl(); list($response, $opts) = static::_staticRequest('post', $url, $params, $options); $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; } /** * Deletes a Configuration object. * * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Terminal\Configuration the deleted resource */ public function delete($params = null, $opts = null) { self::_validateParams($params); $url = $this->instanceUrl(); list($response, $opts) = $this->_request('delete', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } /** * Returns a list of Configuration objects. * * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Collection<\Stripe\Terminal\Configuration> of ApiResources */ public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, \Stripe\Collection::class, $params, $opts); } /** * Retrieves a Configuration object. * * @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\Terminal\Configuration */ public static function retrieve($id, $opts = null) { $opts = \Stripe\Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; } /** * Updates a new Configuration object. * * @param string $id the ID of the resource to update * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Terminal\Configuration the updated resource */ public static function update($id, $params = null, $opts = null) { self::_validateParams($params); $url = static::resourceUrl($id); list($response, $opts) = static::_staticRequest('post', $url, $params, $opts); $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; } }