true. If the object exists in test mode, the value is false. * @property string $status The feedback option's status. * @property (object{deactivated_at: null|int}&\Stripe\StripeObject) $status_transitions */ class FeedbackOption extends \Stripe\ApiResource { const OBJECT_NAME = 'billing.feedback_option'; use \Stripe\ApiOperations\Update; const STATUS_ACTIVE = 'active'; const STATUS_INACTIVE = 'inactive'; /** * Creates a new feedback option. * * @param null|array{description: string, expand?: string[]} $params * @param null|array|string $options * * @return FeedbackOption the created resource * * @throws \Stripe\Exception\ApiErrorException if the request fails */ 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; } /** * An API method for listing the feedback options model. * * @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params * @param null|array|string $opts * * @return \Stripe\Collection of ApiResources * * @throws \Stripe\Exception\ApiErrorException if the request fails */ public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, \Stripe\Collection::class, $params, $opts); } /** * Retrieves a feedback options object given an ID. * * @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 * * @return FeedbackOption * * @throws \Stripe\Exception\ApiErrorException if the request fails */ public static function retrieve($id, $opts = null) { $opts = \Stripe\Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; } /** * Updates the description of an existing feedback option. * * @param string $id the ID of the resource to update * @param null|array{description?: string, expand?: string[]} $params * @param null|array|string $opts * * @return FeedbackOption the updated resource * * @throws \Stripe\Exception\ApiErrorException if the request fails */ 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; } /** * @param null|array $params * @param null|array|string $opts * * @return FeedbackOption the deactivated feedback option * * @throws \Stripe\Exception\ApiErrorException if the request fails */ public function deactivate($params = null, $opts = null) { $url = $this->instanceUrl() . '/deactivate'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } }