Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1571

Merged
merged 5 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v499
v510
2 changes: 2 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
require __DIR__ . '/lib/PaymentIntent.php';
require __DIR__ . '/lib/PaymentLink.php';
require __DIR__ . '/lib/PaymentMethod.php';
require __DIR__ . '/lib/PaymentMethodDomain.php';
require __DIR__ . '/lib/Payout.php';
require __DIR__ . '/lib/Person.php';
require __DIR__ . '/lib/Plan.php';
Expand Down Expand Up @@ -190,6 +191,7 @@
require __DIR__ . '/lib/Service/MandateService.php';
require __DIR__ . '/lib/Service/PaymentIntentService.php';
require __DIR__ . '/lib/Service/PaymentLinkService.php';
require __DIR__ . '/lib/Service/PaymentMethodDomainService.php';
require __DIR__ . '/lib/Service/PaymentMethodService.php';
require __DIR__ . '/lib/Service/PayoutService.php';
require __DIR__ . '/lib/Service/PlanService.php';
Expand Down
2 changes: 1 addition & 1 deletion lib/AccountLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Account Links are the means by which a Connect platform grants a connected account permission to access
* Stripe-hosted applications, such as Connect Onboarding.
*
* Related guide: <a href="https://stripe.com/docs/connect/connect-onboarding">Connect Onboarding</a>
* Related guide: <a href="https://stripe.com/docs/connect/custom/hosted-onboarding">Connect Onboarding</a>
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down
29 changes: 28 additions & 1 deletion lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ class Event extends ApiResource
const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified';
const INVOICEITEM_CREATED = 'invoiceitem.created';
const INVOICEITEM_DELETED = 'invoiceitem.deleted';
const INVOICEITEM_UPDATED = 'invoiceitem.updated';
const INVOICE_CREATED = 'invoice.created';
const INVOICE_DELETED = 'invoice.deleted';
const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
Expand Down Expand Up @@ -475,4 +474,32 @@ class Event extends ApiResource
const TYPE_TRANSFER_CREATED = 'transfer.created';
const TYPE_TRANSFER_REVERSED = 'transfer.reversed';
const TYPE_TRANSFER_UPDATED = 'transfer.updated';
const TYPE_TREASURY_CREDIT_REVERSAL_CREATED = 'treasury.credit_reversal.created';
const TYPE_TREASURY_CREDIT_REVERSAL_POSTED = 'treasury.credit_reversal.posted';
const TYPE_TREASURY_DEBIT_REVERSAL_COMPLETED = 'treasury.debit_reversal.completed';
const TYPE_TREASURY_DEBIT_REVERSAL_CREATED = 'treasury.debit_reversal.created';
const TYPE_TREASURY_DEBIT_REVERSAL_INITIAL_CREDIT_GRANTED = 'treasury.debit_reversal.initial_credit_granted';
const TYPE_TREASURY_FINANCIAL_ACCOUNT_CLOSED = 'treasury.financial_account.closed';
const TYPE_TREASURY_FINANCIAL_ACCOUNT_CREATED = 'treasury.financial_account.created';
const TYPE_TREASURY_FINANCIAL_ACCOUNT_FEATURES_STATUS_UPDATED = 'treasury.financial_account.features_status_updated';
const TYPE_TREASURY_INBOUND_TRANSFER_CANCELED = 'treasury.inbound_transfer.canceled';
const TYPE_TREASURY_INBOUND_TRANSFER_CREATED = 'treasury.inbound_transfer.created';
const TYPE_TREASURY_INBOUND_TRANSFER_FAILED = 'treasury.inbound_transfer.failed';
const TYPE_TREASURY_INBOUND_TRANSFER_SUCCEEDED = 'treasury.inbound_transfer.succeeded';
const TYPE_TREASURY_OUTBOUND_PAYMENT_CANCELED = 'treasury.outbound_payment.canceled';
const TYPE_TREASURY_OUTBOUND_PAYMENT_CREATED = 'treasury.outbound_payment.created';
const TYPE_TREASURY_OUTBOUND_PAYMENT_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_payment.expected_arrival_date_updated';
const TYPE_TREASURY_OUTBOUND_PAYMENT_FAILED = 'treasury.outbound_payment.failed';
const TYPE_TREASURY_OUTBOUND_PAYMENT_POSTED = 'treasury.outbound_payment.posted';
const TYPE_TREASURY_OUTBOUND_PAYMENT_RETURNED = 'treasury.outbound_payment.returned';
const TYPE_TREASURY_OUTBOUND_TRANSFER_CANCELED = 'treasury.outbound_transfer.canceled';
const TYPE_TREASURY_OUTBOUND_TRANSFER_CREATED = 'treasury.outbound_transfer.created';
const TYPE_TREASURY_OUTBOUND_TRANSFER_EXPECTED_ARRIVAL_DATE_UPDATED = 'treasury.outbound_transfer.expected_arrival_date_updated';
const TYPE_TREASURY_OUTBOUND_TRANSFER_FAILED = 'treasury.outbound_transfer.failed';
const TYPE_TREASURY_OUTBOUND_TRANSFER_POSTED = 'treasury.outbound_transfer.posted';
const TYPE_TREASURY_OUTBOUND_TRANSFER_RETURNED = 'treasury.outbound_transfer.returned';
const TYPE_TREASURY_RECEIVED_CREDIT_CREATED = 'treasury.received_credit.created';
const TYPE_TREASURY_RECEIVED_CREDIT_FAILED = 'treasury.received_credit.failed';
const TYPE_TREASURY_RECEIVED_CREDIT_SUCCEEDED = 'treasury.received_credit.succeeded';
const TYPE_TREASURY_RECEIVED_DEBIT_CREATED = 'treasury.received_debit.created';
}
49 changes: 49 additions & 0 deletions lib/PaymentMethodDomain.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;

/**
* A payment method domain represents a web domain that you have registered with Stripe.
* Stripe Elements use registered payment method domains to control where certain payment methods are shown.
*
* Related guides: <a href="https://stripe.com/docs/payments/payment-methods/pmd-registration">Payment method domains</a>.
*
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property \Stripe\StripeObject $apple_pay Indicates the status of a specific payment method on a payment method domain.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $domain_name The domain name that this payment method domain object represents.
* @property bool $enabled Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
* @property \Stripe\StripeObject $google_pay Indicates the status of a specific payment method on a payment method domain.
* @property \Stripe\StripeObject $link Indicates the status of a specific payment method on a payment method domain.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property \Stripe\StripeObject $paypal Indicates the status of a specific payment method on a payment method domain.
*/
class PaymentMethodDomain extends ApiResource
{
const OBJECT_NAME = 'payment_method_domain';

use ApiOperations\All;
use ApiOperations\Create;
use ApiOperations\Retrieve;
use ApiOperations\Update;

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodDomain the validated payment method domain
*/
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;
}
}
2 changes: 1 addition & 1 deletion lib/Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @property null|string[] $full_name_aliases A list of alternate names or aliases that the person is known by.
* @property null|\Stripe\StripeObject $future_requirements Information about the <a href="https://stripe.com/docs/connect/custom-accounts/future-requirements">upcoming new requirements for this person</a>, including what information needs to be collected, and by when.
* @property null|string $gender The person's gender (International regulations require either &quot;male&quot; or &quot;female&quot;).
* @property null|bool $id_number_provided Whether the person's <code>id_number</code> was provided.
* @property null|bool $id_number_provided Whether the person's <code>id_number</code> was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by <code>ssn_last_4_provided</code>).
* @property null|bool $id_number_secondary_provided Whether the person's <code>id_number_secondary</code> was provided.
* @property null|string $last_name The person's last name.
* @property null|string $last_name_kana The Kana variation of the person's last name (Japan only).
Expand Down
1 change: 1 addition & 0 deletions lib/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string|\Stripe\Price $default_price The ID of the <a href="https://stripe.com/docs/api/prices">Price</a> object that is the default price for this product.
* @property null|string $description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
* @property \Stripe\StripeObject[] $features A list of up to 15 features for this product. These are displayed in <a href="https://stripe.com/docs/payments/checkout/pricing-table">pricing tables</a>.
* @property string[] $images A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Expand Down
2 changes: 2 additions & 0 deletions lib/Service/CoreServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* @property OAuthService $oauth
* @property PaymentIntentService $paymentIntents
* @property PaymentLinkService $paymentLinks
* @property PaymentMethodDomainService $paymentMethodDomains
* @property PaymentMethodService $paymentMethods
* @property PayoutService $payouts
* @property PlanService $plans
Expand Down Expand Up @@ -103,6 +104,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
'oauth' => OAuthService::class,
'paymentIntents' => PaymentIntentService::class,
'paymentLinks' => PaymentLinkService::class,
'paymentMethodDomains' => PaymentMethodDomainService::class,
'paymentMethods' => PaymentMethodService::class,
'payouts' => PayoutService::class,
'plans' => PlanService::class,
Expand Down
97 changes: 97 additions & 0 deletions lib/Service/PaymentMethodDomainService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service;

class PaymentMethodDomainService extends \Stripe\Service\AbstractService
{
/**
* Lists the details of existing payment method domains.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\PaymentMethodDomain>
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/payment_method_domains', $params, $opts);
}

/**
* Creates a payment method domain.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodDomain
*/
public function create($params = null, $opts = null)
{
return $this->request('post', '/v1/payment_method_domains', $params, $opts);
}

/**
* Retrieves the details of an existing payment method domain.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodDomain
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/payment_method_domains/%s', $id), $params, $opts);
}

/**
* Updates an existing payment method domain.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodDomain
*/
public function update($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/payment_method_domains/%s', $id), $params, $opts);
}

/**
* Some payment methods such as Apple Pay require additional steps to verify a
* domain. If the requirements weren’t satisfied when the domain was created, the
* payment method will be inactive on the domain. The payment method doesn’t appear
* in Elements for this domain until it is active.
*
* To activate a payment method on an existing payment method domain, complete the
* required validation steps specific to the payment method, and then validate the
* payment method domain with this endpoint.
*
* Related guides: <a
* href="/docs/payments/payment-methods/pmd-registration">Payment method
* domains</a>.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\PaymentMethodDomain
*/
public function validate($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/payment_method_domains/%s/validate', $id), $params, $opts);
}
}
1 change: 1 addition & 0 deletions lib/StripeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* @property \Stripe\Service\OAuthService $oauth
* @property \Stripe\Service\PaymentIntentService $paymentIntents
* @property \Stripe\Service\PaymentLinkService $paymentLinks
* @property \Stripe\Service\PaymentMethodDomainService $paymentMethodDomains
* @property \Stripe\Service\PaymentMethodService $paymentMethods
* @property \Stripe\Service\PayoutService $payouts
* @property \Stripe\Service\PlanService $plans
Expand Down
1 change: 1 addition & 0 deletions lib/Util/ObjectTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class ObjectTypes
\Stripe\PaymentIntent::OBJECT_NAME => \Stripe\PaymentIntent::class,
\Stripe\PaymentLink::OBJECT_NAME => \Stripe\PaymentLink::class,
\Stripe\PaymentMethod::OBJECT_NAME => \Stripe\PaymentMethod::class,
\Stripe\PaymentMethodDomain::OBJECT_NAME => \Stripe\PaymentMethodDomain::class,
\Stripe\Payout::OBJECT_NAME => \Stripe\Payout::class,
\Stripe\Person::OBJECT_NAME => \Stripe\Person::class,
\Stripe\Plan::OBJECT_NAME => \Stripe\Plan::class,
Expand Down