code
stringlengths
15
9.96M
docstring
stringlengths
1
10.1k
func_name
stringlengths
1
124
language
stringclasses
1 value
repo
stringlengths
7
63
path
stringlengths
6
186
url
stringlengths
50
236
license
stringclasses
4 values
public static function create($params = null, $options = null) { self::_validateParams($params); $url = static::classUrl(); list($response, $opts) = static::_staticRequest('post', $url, $params, $options); $obj = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Creates a new source object. @param null|array{amount?: int, currency?: string, customer?: string, expand?: string[], flow?: string, mandate?: array{acceptance?: array{date?: int, ip?: string, offline?: array{contact_email: string}, online?: array{date?: int, ip?: string, user_agent?: string}, status: string, type?: string, user_agent?: string}, amount?: null|int, currency?: string, interval?: string, notification_method?: string}, metadata?: StripeObject, original_source?: string, owner?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: string, name?: string, phone?: string}, receiver?: array{refund_attributes_method?: string}, redirect?: array{return_url: string}, source_order?: array{items?: array{amount?: int, currency?: string, description?: string, parent?: string, quantity?: int, type?: string}[], shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name?: string, phone?: string, tracking_number?: string}}, statement_descriptor?: string, token?: string, type?: string, usage?: string} $params @param null|array|string $options @return Source the created resource @throws Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Source.php
https://github.com/stripe/stripe-php/blob/master/lib/Source.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information. @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 Source @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Source.php
https://github.com/stripe/stripe-php/blob/master/lib/Source.php
MIT
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 = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts the <code>metadata</code> and <code>owner</code> as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our <a href="/docs/sources">payment method guides</a> for more detail. @param string $id the ID of the resource to update @param null|array{amount?: int, expand?: string[], mandate?: array{acceptance?: array{date?: int, ip?: string, offline?: array{contact_email: string}, online?: array{date?: int, ip?: string, user_agent?: string}, status: string, type?: string, user_agent?: string}, amount?: null|int, currency?: string, interval?: string, notification_method?: string}, metadata?: null|StripeObject, owner?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: string, name?: string, phone?: string}, source_order?: array{items?: array{amount?: int, currency?: string, description?: string, parent?: string, quantity?: int, type?: string}[], shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name?: string, phone?: string, tracking_number?: string}}} $params @param null|array|string $opts @return Source the updated resource @throws Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Source.php
https://github.com/stripe/stripe-php/blob/master/lib/Source.php
MIT
public function detach($params = null, $opts = null) { self::_validateParams($params); $id = $this['id']; if (!$id) { $class = static::class; $msg = "Could not determine which URL to request: {$class} instance " . "has invalid ID: {$id}"; throw new Exception\UnexpectedValueException($msg, null); } if ($this['customer']) { $base = Customer::classUrl(); $parentExtn = \urlencode(Util\Util::utf8($this['customer'])); $extn = \urlencode(Util\Util::utf8($id)); $url = "{$base}/{$parentExtn}/sources/{$extn}"; list($response, $opts) = $this->_request('delete', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } $message = 'This source object does not appear to be currently attached ' . 'to a customer object.'; throw new Exception\UnexpectedValueException($message); }
@param null|array $params @param null|array|string $opts @return Source the detached source @throws Exception\UnexpectedValueException if the source is not attached to a customer @throws Exception\ApiErrorException if the request fails
detach
php
stripe/stripe-php
lib/Source.php
https://github.com/stripe/stripe-php/blob/master/lib/Source.php
MIT
public static function allSourceTransactions($id, $params = null, $opts = null) { $url = static::resourceUrl($id) . '/source_transactions'; list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); $obj = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
@param string $id @param null|array $params @param null|array|string $opts @return Collection<SourceTransaction> list of source transactions @throws Exception\ApiErrorException if the request fails
allSourceTransactions
php
stripe/stripe-php
lib/Source.php
https://github.com/stripe/stripe-php/blob/master/lib/Source.php
MIT
public function verify($params = null, $opts = null) { $url = $this->instanceUrl() . '/verify'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return Source the verified source @throws Exception\ApiErrorException if the request fails
verify
php
stripe/stripe-php
lib/Source.php
https://github.com/stripe/stripe-php/blob/master/lib/Source.php
MIT
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; }
Invalidates a short-lived API key for a given resource. @param null|array{expand?: string[]} $params @param null|array|string $opts @return EphemeralKey the deleted resource @throws Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/EphemeralKey.php
https://github.com/stripe/stripe-php/blob/master/lib/EphemeralKey.php
MIT
public static function create($params = null, $opts = null) { if (!$opts || !isset($opts['stripe_version'])) { throw new Exception\InvalidArgumentException('stripe_version must be specified to create an ephemeral key'); } return self::_create($params, $opts); }
@param null|array $params @param null|array|string $opts @return EphemeralKey the created key @throws Exception\InvalidArgumentException if stripe_version is missing @throws Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/EphemeralKey.php
https://github.com/stripe/stripe-php/blob/master/lib/EphemeralKey.php
MIT
public static function create($params = null, $options = null) { self::_validateParams($params); $url = static::classUrl(); list($response, $opts) = static::_staticRequest('post', $url, $params, $options); $obj = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Creates a new shipping rate object. @param null|array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, expand?: string[], fixed_amount?: array{amount: int, currency: string, currency_options?: StripeObject}, metadata?: StripeObject, tax_behavior?: string, tax_code?: string, type?: string} $params @param null|array|string $options @return ShippingRate the created resource @throws Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/ShippingRate.php
https://github.com/stripe/stripe-php/blob/master/lib/ShippingRate.php
MIT
public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, Collection::class, $params, $opts); }
Returns a list of your shipping rates. @param null|array{active?: bool, created?: array|int, currency?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|array|string $opts @return Collection<ShippingRate> of ApiResources @throws Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/ShippingRate.php
https://github.com/stripe/stripe-php/blob/master/lib/ShippingRate.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Returns the shipping rate object with the given 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 ShippingRate @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/ShippingRate.php
https://github.com/stripe/stripe-php/blob/master/lib/ShippingRate.php
MIT
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 = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Updates an existing shipping rate object. @param string $id the ID of the resource to update @param null|array{active?: bool, expand?: string[], fixed_amount?: array{currency_options?: StripeObject}, metadata?: null|StripeObject, tax_behavior?: string} $params @param null|array|string $opts @return ShippingRate the updated resource @throws Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/ShippingRate.php
https://github.com/stripe/stripe-php/blob/master/lib/ShippingRate.php
MIT
public static function create($params = null, $options = null) { self::_validateParams($params); $url = static::classUrl(); list($response, $opts) = static::_staticRequest('post', $url, $params, $options); $obj = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Creates a single-use token that represents a bank account’s details. You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a <a href="#accounts">connected account</a> where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a> is <code>application</code>, which includes Custom accounts. @param null|array{account?: array{business_type?: string, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_declaration_shown_and_signed?: bool, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|StripeObject, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|StripeObject, nationality?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, pii?: array{id_number?: string}} $params @param null|array|string $options @return Token the created resource @throws Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Token.php
https://github.com/stripe/stripe-php/blob/master/lib/Token.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Retrieves the token with the given 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 Token @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Token.php
https://github.com/stripe/stripe-php/blob/master/lib/Token.php
MIT
public function __construct($body, $code, $headers, $json) { $this->body = $body; $this->code = $code; $this->headers = $headers; $this->json = $json; }
@param string $body @param int $code @param null|array|CaseInsensitiveArray $headers @param null|array $json
__construct
php
stripe/stripe-php
lib/ApiResponse.php
https://github.com/stripe/stripe-php/blob/master/lib/ApiResponse.php
MIT
public function instanceUrl() { $customer = $this['customer']; $customer = Util\Util::utf8($customer); $base = Customer::classUrl(); $customerExtn = \urlencode($customer); return "{$base}/{$customerExtn}/cash_balance"; }
@return string the API URL for this balance transaction
instanceUrl
php
stripe/stripe-php
lib/CashBalance.php
https://github.com/stripe/stripe-php/blob/master/lib/CashBalance.php
MIT
public static function retrieve($_id, $_opts = null) { $msg = 'Customer Cash Balance cannot be retrieved without a ' . 'customer ID. Retrieve a Customer Cash Balance using ' . "`Customer::retrieveCashBalance('customer_id')`."; throw new Exception\BadMethodCallException($msg); }
@param array|string $_id @param null|array|string $_opts @throws Exception\BadMethodCallException
retrieve
php
stripe/stripe-php
lib/CashBalance.php
https://github.com/stripe/stripe-php/blob/master/lib/CashBalance.php
MIT
public static function update($_id, $_params = null, $_options = null) { $msg = 'Customer Cash Balance cannot be updated without a ' . 'customer ID. Retrieve a Customer Cash Balance using ' . "`Customer::updateCashBalance('customer_id')`."; throw new Exception\BadMethodCallException($msg); }
@param string $_id @param null|array $_params @param null|array|string $_options @throws Exception\BadMethodCallException
update
php
stripe/stripe-php
lib/CashBalance.php
https://github.com/stripe/stripe-php/blob/master/lib/CashBalance.php
MIT
public static function create($params = null, $options = null) { self::_validateParams($params); $url = static::classUrl(); list($response, $opts) = static::_staticRequest('post', $url, $params, $options); $obj = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
A webhook endpoint must have a <code>url</code> and a list of <code>enabled_events</code>. You may optionally specify the Boolean <code>connect</code> parameter. If set to true, then a Connect webhook endpoint that notifies the specified <code>url</code> about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified <code>url</code> only about events from your account is created. You can also create webhook endpoints in the <a href="https://dashboard.stripe.com/account/webhooks">webhooks settings</a> section of the Dashboard. @param null|array{api_version?: string, connect?: bool, description?: null|string, enabled_events: string[], expand?: string[], metadata?: null|StripeObject, url: string} $params @param null|array|string $options @return WebhookEndpoint the created resource @throws Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/WebhookEndpoint.php
https://github.com/stripe/stripe-php/blob/master/lib/WebhookEndpoint.php
MIT
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; }
You can also delete webhook endpoints via the <a href="https://dashboard.stripe.com/account/webhooks">webhook endpoint management</a> page of the Stripe dashboard. @param null|array $params @param null|array|string $opts @return WebhookEndpoint the deleted resource @throws Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/WebhookEndpoint.php
https://github.com/stripe/stripe-php/blob/master/lib/WebhookEndpoint.php
MIT
public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, Collection::class, $params, $opts); }
Returns a list of your webhook endpoints. @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|array|string $opts @return Collection<WebhookEndpoint> of ApiResources @throws Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/WebhookEndpoint.php
https://github.com/stripe/stripe-php/blob/master/lib/WebhookEndpoint.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Retrieves the webhook endpoint with the given 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 WebhookEndpoint @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/WebhookEndpoint.php
https://github.com/stripe/stripe-php/blob/master/lib/WebhookEndpoint.php
MIT
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 = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Updates the webhook endpoint. You may edit the <code>url</code>, the list of <code>enabled_events</code>, and the status of your endpoint. @param string $id the ID of the resource to update @param null|array{description?: null|string, disabled?: bool, enabled_events?: string[], expand?: string[], metadata?: null|StripeObject, url?: string} $params @param null|array|string $opts @return WebhookEndpoint the updated resource @throws Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/WebhookEndpoint.php
https://github.com/stripe/stripe-php/blob/master/lib/WebhookEndpoint.php
MIT
public function instanceUrl() { $id = $this['id']; $fee = $this['fee']; if (!$id) { throw new Exception\UnexpectedValueException( 'Could not determine which URL to request: ' . "class instance has invalid ID: {$id}", null ); } $id = Util\Util::utf8($id); $fee = Util\Util::utf8($fee); $base = ApplicationFee::classUrl(); $feeExtn = \urlencode($fee); $extn = \urlencode($id); return "{$base}/{$feeExtn}/refunds/{$extn}"; }
@return string the API URL for this Stripe refund
instanceUrl
php
stripe/stripe-php
lib/ApplicationFeeRefund.php
https://github.com/stripe/stripe-php/blob/master/lib/ApplicationFeeRefund.php
MIT
public function save($opts = null) { return $this->_save($opts); }
@param null|array|string $opts @return ApplicationFeeRefund the saved refund
save
php
stripe/stripe-php
lib/ApplicationFeeRefund.php
https://github.com/stripe/stripe-php/blob/master/lib/ApplicationFeeRefund.php
MIT
public static function create($params = null, $options = null) { self::_validateParams($params); $url = static::classUrl(); list($response, $opts) = static::_staticRequest('post', $url, $params, $options); $obj = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions. @param null|array{customer?: string, default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], from_subscription?: string, metadata?: null|StripeObject, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], end_date?: int, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: StripeObject, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], iterations?: int, metadata?: StripeObject, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: int})[], start_date?: array|int|string} $params @param null|array|string $options @return SubscriptionSchedule the created resource @throws Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/SubscriptionSchedule.php
https://github.com/stripe/stripe-php/blob/master/lib/SubscriptionSchedule.php
MIT
public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, Collection::class, $params, $opts); }
Retrieves the list of your subscription schedules. @param null|array{canceled_at?: array|int, completed_at?: array|int, created?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, released_at?: array|int, scheduled?: bool, starting_after?: string} $params @param null|array|string $opts @return Collection<SubscriptionSchedule> of ApiResources @throws Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/SubscriptionSchedule.php
https://github.com/stripe/stripe-php/blob/master/lib/SubscriptionSchedule.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation. @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 SubscriptionSchedule @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/SubscriptionSchedule.php
https://github.com/stripe/stripe-php/blob/master/lib/SubscriptionSchedule.php
MIT
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 = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Updates an existing subscription schedule. @param string $id the ID of the resource to update @param null|array{default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], metadata?: null|StripeObject, phases?: (array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, items: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: StripeObject, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], iterations?: int, metadata?: StripeObject, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string} $params @param null|array|string $opts @return SubscriptionSchedule the updated resource @throws Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/SubscriptionSchedule.php
https://github.com/stripe/stripe-php/blob/master/lib/SubscriptionSchedule.php
MIT
public function cancel($params = null, $opts = null) { $url = $this->instanceUrl() . '/cancel'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return SubscriptionSchedule the canceled subscription schedule @throws Exception\ApiErrorException if the request fails
cancel
php
stripe/stripe-php
lib/SubscriptionSchedule.php
https://github.com/stripe/stripe-php/blob/master/lib/SubscriptionSchedule.php
MIT
public function release($params = null, $opts = null) { $url = $this->instanceUrl() . '/release'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return SubscriptionSchedule the released subscription schedule @throws Exception\ApiErrorException if the request fails
release
php
stripe/stripe-php
lib/SubscriptionSchedule.php
https://github.com/stripe/stripe-php/blob/master/lib/SubscriptionSchedule.php
MIT
public static function create($params = null, $options = null) { self::_validateParams($params); $url = static::classUrl(); list($response, $opts) = static::_staticRequest('post', $url, $params, $options); $obj = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you <a href="#finalize_invoice">finalize</a> the invoice, which allows you to <a href="#pay_invoice">pay</a> or <a href="#send_invoice">send</a> the invoice to your customers. @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, currency?: string, custom_fields?: null|array{name: string, value: string}[], customer?: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: int, expand?: string[], footer?: string, from_invoice?: array{action: string, invoice: string}, issuer?: array{account?: string, type: string}, metadata?: null|StripeObject, number?: string, on_behalf_of?: string, payment_settings?: array{default_mandate?: null|string, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[]}, pending_invoice_items_behavior?: string, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: StripeObject}, metadata?: StripeObject, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, subscription?: string, transfer_data?: array{amount?: int, destination: string}} $params @param null|array|string $options @return Invoice the created resource @throws Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
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; }
Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be <a href="#void_invoice">voided</a>. @param null|array $params @param null|array|string $opts @return Invoice the deleted resource @throws Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, Collection::class, $params, $opts); }
You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first. @param null|array{collection_method?: string, created?: array|int, customer?: string, due_date?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string, subscription?: string} $params @param null|array|string $opts @return Collection<Invoice> of ApiResources @throws Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Retrieves the invoice with the given 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 Invoice @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
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 = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Draft invoices are fully editable. Once an invoice is <a href="/docs/billing/invoices/workflow#finalized">finalized</a>, monetary values, as well as <code>collection_method</code>, become uneditable. If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or <a href="/docs/billing/invoices/reconciliation">automatically reconciling</a> invoices, pass <code>auto_advance=false</code>. @param string $id the ID of the resource to update @param null|array{account_tax_ids?: null|string[], application_fee_amount?: int, auto_advance?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, automatically_finalizes_at?: int, collection_method?: string, custom_fields?: null|array{name: string, value: string}[], days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], due_date?: int, effective_at?: null|int, expand?: string[], footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|StripeObject, number?: null|string, on_behalf_of?: null|string, payment_settings?: array{default_mandate?: null|string, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[]}, rendering?: array{amount_tax_display?: null|string, pdf?: array{page_size?: string}, template?: string, template_version?: null|int}, shipping_cost?: null|array{shipping_rate?: string, shipping_rate_data?: array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, fixed_amount?: array{amount: int, currency: string, currency_options?: StripeObject}, metadata?: StripeObject, tax_behavior?: string, tax_code?: string, type?: string}}, shipping_details?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: null|string}, statement_descriptor?: string, transfer_data?: null|array{amount?: int, destination: string}} $params @param null|array|string $opts @return Invoice the updated resource @throws Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public function addLines($params = null, $opts = null) { $url = $this->instanceUrl() . '/add_lines'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return Invoice the added invoice @throws Exception\ApiErrorException if the request fails
addLines
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public static function createPreview($params = null, $opts = null) { $url = static::classUrl() . '/create_preview'; list($response, $opts) = static::_staticRequest('post', $url, $params, $opts); $obj = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
@param null|array $params @param null|array|string $opts @return Invoice the created invoice @throws Exception\ApiErrorException if the request fails
createPreview
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public function finalizeInvoice($params = null, $opts = null) { $url = $this->instanceUrl() . '/finalize'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return Invoice the finalized invoice @throws Exception\ApiErrorException if the request fails
finalizeInvoice
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public function markUncollectible($params = null, $opts = null) { $url = $this->instanceUrl() . '/mark_uncollectible'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return Invoice the uncollectible invoice @throws Exception\ApiErrorException if the request fails
markUncollectible
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public function pay($params = null, $opts = null) { $url = $this->instanceUrl() . '/pay'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return Invoice the paid invoice @throws Exception\ApiErrorException if the request fails
pay
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public function removeLines($params = null, $opts = null) { $url = $this->instanceUrl() . '/remove_lines'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return Invoice the removed invoice @throws Exception\ApiErrorException if the request fails
removeLines
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public function sendInvoice($params = null, $opts = null) { $url = $this->instanceUrl() . '/send'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return Invoice the sent invoice @throws Exception\ApiErrorException if the request fails
sendInvoice
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public function updateLines($params = null, $opts = null) { $url = $this->instanceUrl() . '/update_lines'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return Invoice the updated invoice @throws Exception\ApiErrorException if the request fails
updateLines
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public function voidInvoice($params = null, $opts = null) { $url = $this->instanceUrl() . '/void'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return Invoice the voided invoice @throws Exception\ApiErrorException if the request fails
voidInvoice
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public static function search($params = null, $opts = null) { $url = '/v1/invoices/search'; return static::_requestPage($url, SearchResult::class, $params, $opts); }
@param null|array $params @param null|array|string $opts @return SearchResult<Invoice> the invoice search results @throws Exception\ApiErrorException if the request fails
search
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public static function allLines($id, $params = null, $opts = null) { return self::_allNestedResources($id, static::PATH_LINES, $params, $opts); }
@param string $id the ID of the invoice on which to retrieve the invoice line items @param null|array $params @param null|array|string $opts @return Collection<InvoiceLineItem> the list of invoice line items @throws Exception\ApiErrorException if the request fails
allLines
php
stripe/stripe-php
lib/Invoice.php
https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php
MIT
public function refreshFrom($values, $opts, $partial = false, $apiMode = 'v1') { // Unlike most other API resources, the API will omit attributes in // error objects when they have a null value. We manually set default // values here to facilitate generic error handling. $values = \array_merge([ 'charge' => null, 'code' => null, 'decline_code' => null, 'doc_url' => null, 'message' => null, 'param' => null, 'payment_intent' => null, 'payment_method' => null, 'setup_intent' => null, 'source' => null, 'type' => null, ], $values); parent::refreshFrom($values, $opts, $partial); }
Refreshes this object using the provided values. @param array $values @param null|array|string|Util\RequestOptions $opts @param bool $partial defaults to false @param 'v1'|'v2' $apiMode
refreshFrom
php
stripe/stripe-php
lib/ErrorObject.php
https://github.com/stripe/stripe-php/blob/master/lib/ErrorObject.php
MIT
public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, Collection::class, $params, $opts); }
List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in <a href="https://docs.stripe.com/api/events/object">event object</a> <code>api_version</code> attribute (not according to your current Stripe API version or <code>Stripe-Version</code> header). @param null|array{created?: array|int, delivery_success?: bool, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, type?: string, types?: string[]} $params @param null|array|string $opts @return Collection<Event> of ApiResources @throws Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Event.php
https://github.com/stripe/stripe-php/blob/master/lib/Event.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook. @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 Event @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Event.php
https://github.com/stripe/stripe-php/blob/master/lib/Event.php
MIT
public static function create($params = null, $options = null) { self::_validateParams($params); $url = static::classUrl(); list($response, $opts) = static::_staticRequest('post', $url, $params, $options); $obj = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. @param null|array{active?: bool, code?: string, coupon: string, customer?: string, expand?: string[], expires_at?: int, max_redemptions?: int, metadata?: StripeObject, restrictions?: array{currency_options?: StripeObject, first_time_transaction?: bool, minimum_amount?: int, minimum_amount_currency?: string}} $params @param null|array|string $options @return PromotionCode the created resource @throws Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/PromotionCode.php
https://github.com/stripe/stripe-php/blob/master/lib/PromotionCode.php
MIT
public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, Collection::class, $params, $opts); }
Returns a list of your promotion codes. @param null|array{active?: bool, code?: string, coupon?: string, created?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|array|string $opts @return Collection<PromotionCode> of ApiResources @throws Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/PromotionCode.php
https://github.com/stripe/stripe-php/blob/master/lib/PromotionCode.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing <code>code</code> use <a href="/docs/api/promotion_codes/list">list</a> with the desired <code>code</code>. @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 PromotionCode @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/PromotionCode.php
https://github.com/stripe/stripe-php/blob/master/lib/PromotionCode.php
MIT
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 = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. @param string $id the ID of the resource to update @param null|array{active?: bool, expand?: string[], metadata?: null|StripeObject, restrictions?: array{currency_options?: StripeObject}} $params @param null|array|string $opts @return PromotionCode the updated resource @throws Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/PromotionCode.php
https://github.com/stripe/stripe-php/blob/master/lib/PromotionCode.php
MIT
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 = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Updates an invoice’s line item. Some fields, such as <code>tax_amounts</code>, only live on the invoice line item, so they can only be updated through this endpoint. Other fields, such as <code>amount</code>, live on both the invoice item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. Updating an invoice’s line item is only possible before the invoice is finalized. @param string $id the ID of the resource to update @param null|array{amount?: int, description?: string, discountable?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: null|StripeObject, period?: array{end: int, start: int}, price_data?: array{currency: string, product?: string, product_data?: array{description?: string, images?: string[], metadata?: StripeObject, name: string, tax_code?: string}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, pricing?: array{price?: string}, quantity?: int, tax_amounts?: null|array{amount: int, tax_rate_data: array{country?: string, description?: string, display_name: string, inclusive: bool, jurisdiction?: string, jurisdiction_level?: string, percentage: float, state?: string, tax_type?: string}, taxability_reason?: string, taxable_amount: int}[], tax_rates?: null|string[]} $params @param null|array|string $opts @return InvoiceLineItem the updated resource @throws Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/InvoiceLineItem.php
https://github.com/stripe/stripe-php/blob/master/lib/InvoiceLineItem.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Retrieves a Mandate 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 @return Mandate @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Mandate.php
https://github.com/stripe/stripe-php/blob/master/lib/Mandate.php
MIT
public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, Collection::class, $params, $opts); }
Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, purpose?: string, starting_after?: string} $params @param null|array|string $opts @return Collection<File> of ApiResources @throws Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/File.php
https://github.com/stripe/stripe-php/blob/master/lib/File.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to <a href="/docs/file-upload#download-file-contents">access file contents</a>. @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 File @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/File.php
https://github.com/stripe/stripe-php/blob/master/lib/File.php
MIT
public static function create($params = null, $opts = null) { $opts = Util\RequestOptions::parse($opts); if (null === $opts->apiBase) { $opts->apiBase = Stripe::$apiUploadBase; } // Manually flatten params, otherwise curl's multipart encoder will // choke on nested arrays. $flatParams = \array_column(Util\Util::flattenParams($params), 1, 0); return static::_create($flatParams, $opts); }
@param null|array $params @param null|array|string $opts @return File the created file @throws Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/File.php
https://github.com/stripe/stripe-php/blob/master/lib/File.php
MIT
public function instanceUrl() { $id = $this['id']; $account = $this['account']; if (!$id) { throw new Exception\UnexpectedValueException( 'Could not determine which URL to request: ' . "class instance has invalid ID: {$id}", null ); } $id = Util\Util::utf8($id); $account = Util\Util::utf8($account); $base = Account::classUrl(); $accountExtn = \urlencode($account); $extn = \urlencode($id); return "{$base}/{$accountExtn}/persons/{$extn}"; }
@return string the API URL for this Stripe account reversal
instanceUrl
php
stripe/stripe-php
lib/Person.php
https://github.com/stripe/stripe-php/blob/master/lib/Person.php
MIT
public static function retrieve($_id, $_opts = null) { $msg = 'Persons cannot be retrieved without an account ID. Retrieve ' . "a person using `Account::retrievePerson('account_id', " . "'person_id')`."; throw new Exception\BadMethodCallException($msg); }
@param array|string $_id @param null|array|string $_opts @throws Exception\BadMethodCallException
retrieve
php
stripe/stripe-php
lib/Person.php
https://github.com/stripe/stripe-php/blob/master/lib/Person.php
MIT
public static function update($_id, $_params = null, $_options = null) { $msg = 'Persons cannot be updated without an account ID. Update ' . "a person using `Account::updatePerson('account_id', " . "'person_id', \$updateParams)`."; throw new Exception\BadMethodCallException($msg); }
@param string $_id @param null|array $_params @param null|array|string $_options @throws Exception\BadMethodCallException
update
php
stripe/stripe-php
lib/Person.php
https://github.com/stripe/stripe-php/blob/master/lib/Person.php
MIT
public function save($opts = null) { $params = $this->serializeParameters(); if (\count($params) > 0) { $url = $this->instanceUrl(); list($response, $opts) = $this->_request('post', $url, $params, $opts, ['save']); $this->refreshFrom($response, $opts); } return $this; }
@param null|array|string $opts @return static the saved resource @throws Exception\ApiErrorException if the request fails @deprecated The `save` method is deprecated and will be removed in a future major version of the library. Use the static method `update` on the resource instead.
save
php
stripe/stripe-php
lib/Person.php
https://github.com/stripe/stripe-php/blob/master/lib/Person.php
MIT
public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, Collection::class, $params, $opts); }
Returns a list of your disputes. @param null|array{charge?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, payment_intent?: string, starting_after?: string} $params @param null|array|string $opts @return Collection<Dispute> of ApiResources @throws Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Dispute.php
https://github.com/stripe/stripe-php/blob/master/lib/Dispute.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Retrieves the dispute with the given 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 Dispute @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Dispute.php
https://github.com/stripe/stripe-php/blob/master/lib/Dispute.php
MIT
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 = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your <a href="https://dashboard.stripe.com/disputes">dashboard</a>, but if you prefer, you can use the API to submit evidence programmatically. Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our <a href="/docs/disputes/categories">guide to dispute types</a>. @param string $id the ID of the resource to update @param null|array{evidence?: array{access_activity_log?: string, billing_address?: string, cancellation_policy?: string, cancellation_policy_disclosure?: string, cancellation_rebuttal?: string, customer_communication?: string, customer_email_address?: string, customer_name?: string, customer_purchase_ip?: string, customer_signature?: string, duplicate_charge_documentation?: string, duplicate_charge_explanation?: string, duplicate_charge_id?: string, enhanced_evidence?: null|array{visa_compelling_evidence_3?: array{disputed_transaction?: array{customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, merchandise_or_services?: string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}}, prior_undisputed_transactions?: (array{charge: string, customer_account_id?: null|string, customer_device_fingerprint?: null|string, customer_device_id?: null|string, customer_email_address?: null|string, customer_purchase_ip?: null|string, product_description?: null|string, shipping_address?: array{city?: null|string, country?: null|string, line1?: null|string, line2?: null|string, postal_code?: null|string, state?: null|string}})[]}, visa_compliance?: array{fee_acknowledged?: bool}}, product_description?: string, receipt?: string, refund_policy?: string, refund_policy_disclosure?: string, refund_refusal_explanation?: string, service_date?: string, service_documentation?: string, shipping_address?: string, shipping_carrier?: string, shipping_date?: string, shipping_documentation?: string, shipping_tracking_number?: string, uncategorized_file?: string, uncategorized_text?: string}, expand?: string[], metadata?: null|StripeObject, submit?: bool} $params @param null|array|string $opts @return Dispute the updated resource @throws Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Dispute.php
https://github.com/stripe/stripe-php/blob/master/lib/Dispute.php
MIT
public function close($params = null, $opts = null) { $url = $this->instanceUrl() . '/close'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return Dispute the closed dispute @throws Exception\ApiErrorException if the request fails
close
php
stripe/stripe-php
lib/Dispute.php
https://github.com/stripe/stripe-php/blob/master/lib/Dispute.php
MIT
public static function getSavedNestedResources() { static $savedNestedResources = null; if (null === $savedNestedResources) { $savedNestedResources = new Util\Set(); } return $savedNestedResources; }
@return Util\Set A list of fields that can be their own type of API resource (say a nested card under an account for example), and if that resource is set, it should be transmitted to the API on a create or update. Doing so is not the default behavior because API resources should normally be persisted on their own RESTful endpoints.
getSavedNestedResources
php
stripe/stripe-php
lib/ApiResource.php
https://github.com/stripe/stripe-php/blob/master/lib/ApiResource.php
MIT
public function refresh() { $requestor = new ApiRequestor($this->_opts->apiKey, static::baseUrl()); $url = $this->instanceUrl(); list($response, $this->_opts->apiKey) = $requestor->request( 'get', $url, $this->_retrieveOptions, $this->_opts->headers ); $this->setLastResponse($response); $this->refreshFrom($response->json, $this->_opts); return $this; }
@return ApiResource the refreshed resource @throws Exception\ApiErrorException
refresh
php
stripe/stripe-php
lib/ApiResource.php
https://github.com/stripe/stripe-php/blob/master/lib/ApiResource.php
MIT
public static function baseUrl() { return Stripe::$apiBase; }
@return string the base URL for the given class
baseUrl
php
stripe/stripe-php
lib/ApiResource.php
https://github.com/stripe/stripe-php/blob/master/lib/ApiResource.php
MIT
public static function classUrl() { // Replace dots with slashes for namespaced resources, e.g. if the object's name is // "foo.bar", then its URL will be "/v1/foo/bars". /** @phpstan-ignore-next-line */ $base = \str_replace('.', '/', static::OBJECT_NAME); return "/v1/{$base}s"; }
@return string the endpoint URL for the given class
classUrl
php
stripe/stripe-php
lib/ApiResource.php
https://github.com/stripe/stripe-php/blob/master/lib/ApiResource.php
MIT
public static function resourceUrl($id) { if (null === $id) { $class = static::class; $message = 'Could not determine which URL to request: ' . "{$class} instance has invalid ID: {$id}"; throw new Exception\UnexpectedValueException($message); } $id = Util\Util::utf8($id); $base = static::classUrl(); $extn = \urlencode($id); return "{$base}/{$extn}"; }
@param null|string $id the ID of the resource @return string the instance endpoint URL for the given class @throws Exception\UnexpectedValueException if $id is null
resourceUrl
php
stripe/stripe-php
lib/ApiResource.php
https://github.com/stripe/stripe-php/blob/master/lib/ApiResource.php
MIT
public function instanceUrl() { return static::resourceUrl($this['id']); }
@return string the full API URL for this API resource
instanceUrl
php
stripe/stripe-php
lib/ApiResource.php
https://github.com/stripe/stripe-php/blob/master/lib/ApiResource.php
MIT
public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, Collection::class, $params, $opts); }
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{charge?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|array|string $opts @return Collection<ApplicationFee> of ApiResources @throws Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/ApplicationFee.php
https://github.com/stripe/stripe-php/blob/master/lib/ApplicationFee.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
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 @return ApplicationFee @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/ApplicationFee.php
https://github.com/stripe/stripe-php/blob/master/lib/ApplicationFee.php
MIT
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 retrieve the application fee refunds @param null|array $params @param null|array|string $opts @return Collection<ApplicationFeeRefund> the list of application fee refunds @throws Exception\ApiErrorException if the request fails
allRefunds
php
stripe/stripe-php
lib/ApplicationFee.php
https://github.com/stripe/stripe-php/blob/master/lib/ApplicationFee.php
MIT
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 on which to create the application fee refund @param null|array $params @param null|array|string $opts @return ApplicationFeeRefund @throws Exception\ApiErrorException if the request fails
createRefund
php
stripe/stripe-php
lib/ApplicationFee.php
https://github.com/stripe/stripe-php/blob/master/lib/ApplicationFee.php
MIT
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 retrieve @param null|array $params @param null|array|string $opts @return ApplicationFeeRefund @throws Exception\ApiErrorException if the request fails
retrieveRefund
php
stripe/stripe-php
lib/ApplicationFee.php
https://github.com/stripe/stripe-php/blob/master/lib/ApplicationFee.php
MIT
public static function updateRefund($id, $refundId, $params = null, $opts = null) { return self::_updateNestedResource($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 @return ApplicationFeeRefund @throws Exception\ApiErrorException if the request fails
updateRefund
php
stripe/stripe-php
lib/ApplicationFee.php
https://github.com/stripe/stripe-php/blob/master/lib/ApplicationFee.php
MIT
public static function baseUrl() { return Stripe::$apiBase; }
@return string the base URL for the given class
baseUrl
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function getFilters() { return $this->filters; }
Returns the filters. @return array the filters
getFilters
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function setFilters($filters) { $this->filters = $filters; }
Sets the filters, removing paging options. @param array $filters the filters
setFilters
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function offsetGet($k) { if (\is_string($k)) { return parent::offsetGet($k); } $msg = "You tried to access the {$k} index, but Collection " . 'types only support string keys. (HINT: List calls ' . 'return an object with a `data` (which is the data ' . "array). You likely want to call ->data[{$k}])"; throw new Exception\InvalidArgumentException($msg); }
[\ReturnTypeWillChange]
offsetGet
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function all($params = null, $opts = null) { self::_validateParams($params); list($url, $params) = $this->extractPathAndUpdateParams($params); list($response, $opts) = $this->_request('get', $url, $params, $opts); $obj = Util\Util::convertToStripeObject($response, $opts); if (!$obj instanceof Collection) { throw new Exception\UnexpectedValueException( 'Expected type ' . Collection::class . ', got "' . \get_class($obj) . '" instead.' ); } $obj->setFilters($params); return $obj; }
@param null|array $params @param null|array|string $opts @return Collection<TStripeObject> @throws Exception\ApiErrorException
all
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function create($params = null, $opts = null) { self::_validateParams($params); list($url, $params) = $this->extractPathAndUpdateParams($params); list($response, $opts) = $this->_request('post', $url, $params, $opts); return Util\Util::convertToStripeObject($response, $opts); }
@param null|array $params @param null|array|string $opts @return TStripeObject @throws Exception\ApiErrorException
create
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function retrieve($id, $params = null, $opts = null) { self::_validateParams($params); list($url, $params) = $this->extractPathAndUpdateParams($params); $id = Util\Util::utf8($id); $extn = \urlencode($id); list($response, $opts) = $this->_request( 'get', "{$url}/{$extn}", $params, $opts ); return Util\Util::convertToStripeObject($response, $opts); }
@param string $id @param null|array $params @param null|array|string $opts @return TStripeObject @throws Exception\ApiErrorException
retrieve
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function count() { return \count($this->data); }
[\ReturnTypeWillChange]
count
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function getIterator() { return new \ArrayIterator($this->data); }
[\ReturnTypeWillChange]
getIterator
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function getReverseIterator() { return new \ArrayIterator(\array_reverse($this->data)); }
@return \ArrayIterator an iterator that can be used to iterate backwards across objects in the current page
getReverseIterator
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function autoPagingIterator() { $page = $this; while (true) { $filters = $this->filters ?: []; if (\array_key_exists('ending_before', $filters) && !\array_key_exists('starting_after', $filters)) { foreach ($page->getReverseIterator() as $item) { yield $item; } $page = $page->previousPage(); } else { foreach ($page as $item) { yield $item; } $page = $page->nextPage(); } if ($page->isEmpty()) { break; } } }
@return \Generator|TStripeObject[] A generator that can be used to iterate across all objects across all pages. As page boundaries are encountered, the next page will be fetched automatically for continued iteration. @throws Exception\ApiErrorException
autoPagingIterator
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function isEmpty() { return empty($this->data); }
Returns true if the page object contains no element. @return bool
isEmpty
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function nextPage($params = null, $opts = null) { if (!$this->has_more) { return static::emptyCollection($opts); } $lastId = \end($this->data)->id; $params = \array_merge( $this->filters ?: [], ['starting_after' => $lastId], $params ?: [] ); return $this->all($params, $opts); }
Fetches the next page in the resource list (if there is one). This method will try to respect the limit of the current page. If none was given, the default limit will be fetched again. @param null|array $params @param null|array|string $opts @return Collection<TStripeObject> @throws Exception\ApiErrorException
nextPage
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function previousPage($params = null, $opts = null) { if (!$this->has_more) { return static::emptyCollection($opts); } $firstId = $this->data[0]->id; $params = \array_merge( $this->filters ?: [], ['ending_before' => $firstId], $params ?: [] ); return $this->all($params, $opts); }
Fetches the previous page in the resource list (if there is one). This method will try to respect the limit of the current page. If none was given, the default limit will be fetched again. @param null|array $params @param null|array|string $opts @return Collection<TStripeObject> @throws Exception\ApiErrorException
previousPage
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function first() { return \count($this->data) > 0 ? $this->data[0] : null; }
Gets the first item from the current page. Returns `null` if the current page is empty. @return null|TStripeObject
first
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public function last() { return \count($this->data) > 0 ? $this->data[\count($this->data) - 1] : null; }
Gets the last item from the current page. Returns `null` if the current page is empty. @return null|TStripeObject
last
php
stripe/stripe-php
lib/Collection.php
https://github.com/stripe/stripe-php/blob/master/lib/Collection.php
MIT
public static function create($params = null, $options = null) { self::_validateParams($params); $url = static::classUrl(); list($response, $opts) = static::_staticRequest('post', $url, $params, $options); $obj = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Creates a payment method domain. @param null|array{domain_name: string, enabled?: bool, expand?: string[]} $params @param null|array|string $options @return PaymentMethodDomain the created resource @throws Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/PaymentMethodDomain.php
https://github.com/stripe/stripe-php/blob/master/lib/PaymentMethodDomain.php
MIT
public static function all($params = null, $opts = null) { $url = static::classUrl(); return static::_requestPage($url, Collection::class, $params, $opts); }
Lists the details of existing payment method domains. @param null|array{domain_name?: string, enabled?: bool, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|array|string $opts @return Collection<PaymentMethodDomain> of ApiResources @throws Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/PaymentMethodDomain.php
https://github.com/stripe/stripe-php/blob/master/lib/PaymentMethodDomain.php
MIT
public static function retrieve($id, $opts = null) { $opts = Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); return $instance; }
Retrieves the details of an existing payment method domain. @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 PaymentMethodDomain @throws Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/PaymentMethodDomain.php
https://github.com/stripe/stripe-php/blob/master/lib/PaymentMethodDomain.php
MIT
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 = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); return $obj; }
Updates an existing payment method domain. @param string $id the ID of the resource to update @param null|array{enabled?: bool, expand?: string[]} $params @param null|array|string $opts @return PaymentMethodDomain the updated resource @throws Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/PaymentMethodDomain.php
https://github.com/stripe/stripe-php/blob/master/lib/PaymentMethodDomain.php
MIT
public function validate($params = null, $opts = null) { $url = $this->instanceUrl() . '/validate'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; }
@param null|array $params @param null|array|string $opts @return PaymentMethodDomain the validated payment method domain @throws Exception\ApiErrorException if the request fails
validate
php
stripe/stripe-php
lib/PaymentMethodDomain.php
https://github.com/stripe/stripe-php/blob/master/lib/PaymentMethodDomain.php
MIT