JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrISO currency code, in lowercase. Must be a supported currency. * @property null|\Stripe\StripeObject $fee_source Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property null|string|\Stripe\Charge $originating_transaction ID of the corresponding charge on the platform account, if this fee was the result of a charge using the destination parameter. * @property bool $refunded Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. * @property \Stripe\Collection<\Stripe\ApplicationFeeRefund> $refunds A list of refunds that have been applied to the fee. */ class ApplicationFee extends ApiResource { const OBJECT_NAME = 'application_fee'; use ApiOperations\NestedResource; /** * Returns a list of application fees you’ve previously collected. The application * fees are returned in sorted order, with the most recent fees appearing first. * * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Collection<\Stripe\ApplicationFee> of ApiResources */ public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, \Stripe\Collection::class, $params, $opts); } /** * Retrieves the details of an application fee that your account has collected. The * same information is returned when refunding the application fee. * * @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\ApplicationFee */ public static function retrieve($id, $opts = null) { $opts = \Stripe\Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; } const PATH_REFUNDS = '/refunds'; /** * @param string $id the ID of the application fee on which to retrieve the application fee refunds * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Collection<\Stripe\ApplicationFeeRefund> the list of application fee refunds */ public static function allRefunds($id, $params = null, $opts = null) { return self::_allNestedResources($id, static::PATH_REFUNDS, $params, $opts); } /** * @param string $id the ID of the application fee on which to create the application fee refund * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\ApplicationFeeRefund */ public static function createRefund($id, $params = null, $opts = null) { return self::_createNestedResource($id, static::PATH_REFUNDS, $params, $opts); } /** * @param string $id the ID of the application fee to which the application fee refund belongs * @param string $refundId the ID of the application fee refund to retrieve * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\ApplicationFeeRefund */ public static function retrieveRefund($id, $refundId, $params = null, $opts = null) { return self::_retrieveNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts); } /** * @param string $id the ID of the application fee to which the application fee refund belongs * @param string $refundId the ID of the application fee refund to update * @param null|array $params * @param null|array|string $opts * * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\ApplicationFeeRefund */ public static function updateRefund($id, $refundId, $params = null, $opts = null) { return self::_updateNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts); } }