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 #1586

Merged
merged 6 commits into from
Oct 5, 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 @@
v563
v581
2 changes: 2 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
require __DIR__ . '/lib/Issuing/Card.php';
require __DIR__ . '/lib/Issuing/Cardholder.php';
require __DIR__ . '/lib/Issuing/Dispute.php';
require __DIR__ . '/lib/Issuing/Token.php';
require __DIR__ . '/lib/Issuing/Transaction.php';
require __DIR__ . '/lib/LineItem.php';
require __DIR__ . '/lib/LoginLink.php';
Expand Down Expand Up @@ -188,6 +189,7 @@
require __DIR__ . '/lib/Service/Issuing/CardholderService.php';
require __DIR__ . '/lib/Service/Issuing/DisputeService.php';
require __DIR__ . '/lib/Service/Issuing/IssuingServiceFactory.php';
require __DIR__ . '/lib/Service/Issuing/TokenService.php';
require __DIR__ . '/lib/Service/Issuing/TransactionService.php';
require __DIR__ . '/lib/Service/MandateService.php';
require __DIR__ . '/lib/Service/PaymentIntentService.php';
Expand Down
6 changes: 3 additions & 3 deletions lib/BalanceTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
*
* @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 int $amount Gross amount of the transaction (in cents (or local equivalent)).
* @property int $amount Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party.
* @property int $available_on The date that the transaction's net funds become available in the Stripe balance.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
* @property null|float $exchange_rate If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the <code>amount</code> in currency A, multipled by the <code>exchange_rate</code>, equals the <code>amount</code> in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's <code>amount</code> is <code>1000</code> and <code>currency</code> is <code>eur</code>. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's <code>amount</code> is <code>1234</code>, its <code>currency</code> is <code>usd</code>, and the <code>exchange_rate</code> is <code>1.234</code>.
* @property int $fee Fees (in cents (or local equivalent)) paid for this transaction.
* @property int $fee Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
* @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
* @property int $net Net amount of the transaction (in cents (or local equivalent)).
* @property int $net Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by <code>amount</code> - <code>fee</code>
* @property string $reporting_category Learn more about how [reporting categories] (https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.
* @property null|string|\Stripe\StripeObject $source This transaction relates to the Stripe object.
* @property string $status The transaction's net funds status in the Stripe balance, which are either <code>available</code> or <code>pending</code>.
Expand Down
1 change: 1 addition & 0 deletions lib/Issuing/Authorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an <code>issuing_authorization.request</code> webhook.
* @property \Stripe\StripeObject[] $request_history History of every time a <code>pending_request</code> authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.
* @property string $status The current status of the authorization in its lifecycle.
* @property null|string|\Stripe\Issuing\Token $token <a href="https://stripe.com/docs/api/issuing/tokens/object">Token</a> object used for this authorization. If a network token was not used for this authorization, this field will be null.
* @property \Stripe\Issuing\Transaction[] $transactions List of <a href="https://stripe.com/docs/api/issuing/transactions">transactions</a> associated with this authorization.
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this authorization if it was created on a <a href="https://stripe.com/docs/api/treasury/financial_accounts">FinancialAccount</a>.
* @property \Stripe\StripeObject $verification_data
Expand Down
42 changes: 42 additions & 0 deletions lib/Issuing/Token.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Issuing;

/**
* An issuing token object is created when an issued card is added to a digital wallet. As a <a href="https://stripe.com/docs/issuing">card issuer</a>, you can view and manage these tokens through Stripe.
*
* @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 string|\Stripe\Issuing\Card $card Card associated with this token.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property null|string $device_fingerprint The hashed ID derived from the device ID from the card network associated with the token
* @property null|string $last4 The last four digits of the token.
* @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 string $network The token service provider / card network associated with the token.
* @property null|\Stripe\StripeObject $network_data
* @property int $network_updated_at Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
* @property string $status The usage state of the token.
* @property null|string $wallet_provider The digital wallet for this token, if one was used.
*/
class Token extends \Stripe\ApiResource
{
const OBJECT_NAME = 'issuing.token';

use \Stripe\ApiOperations\All;
use \Stripe\ApiOperations\Retrieve;
use \Stripe\ApiOperations\Update;

const NETWORK_MASTERCARD = 'mastercard';
const NETWORK_VISA = 'visa';

const STATUS_ACTIVE = 'active';
const STATUS_DELETED = 'deleted';
const STATUS_REQUESTED = 'requested';
const STATUS_SUSPENDED = 'suspended';

const WALLET_PROVIDER_APPLE_PAY = 'apple_pay';
const WALLET_PROVIDER_GOOGLE_PAY = 'google_pay';
const WALLET_PROVIDER_SAMSUNG_PAY = 'samsung_pay';
}
1 change: 1 addition & 0 deletions lib/Issuing/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* @property \Stripe\StripeObject $merchant_data
* @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.
* @property null|\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant.
* @property null|string|\Stripe\Issuing\Token $token <a href="https://stripe.com/docs/api/issuing/tokens/object">Token</a> object used for this transaction. If a network token was not used for this transaction, this field will be null.
* @property null|\Stripe\StripeObject $treasury <a href="https://stripe.com/docs/api/treasury">Treasury</a> details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
* @property string $type The nature of the transaction.
* @property null|string $wallet The digital wallet used for this transaction. One of <code>apple_pay</code>, <code>google_pay</code>, or <code>samsung_pay</code>.
Expand Down
23 changes: 18 additions & 5 deletions lib/PaymentMethodConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@
namespace Stripe;

/**
* An object detailing payment method configurations.
* PaymentMethodConfigurations control which payment methods are displayed to your customers when you don't explicitly specify payment method types. You can have multiple configurations with different sets of payment methods for different scenarios.
*
* There are two types of PaymentMethodConfigurations. Which is used depends on the <a href="https://stripe.com/docs/connect/charges">charge type</a>:
*
* <strong>Direct</strong> configurations apply to payments created on your account, including Connect destination charges, Connect separate charges and transfers, and payments not involving Connect.
*
* <strong>Child</strong> configurations apply to payments created on your connected accounts using direct charges, and charges with the on_behalf_of parameter.
*
* Child configurations have a <code>parent</code> that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account’s associated child configuration. Parent configurations are <a href="https://dashboard.stripe.com/settings/payment_methods/connected_accounts">managed in the dashboard</a> and are not available in this API.
*
* Related guides:
* - <a href="https://stripe.com/docs/connect/payment-method-configurations">Payment Method Configurations API</a>
* - <a href="https://stripe.com/docs/payments/multiple-payment-method-configs">Multiple payment method configurations on dynamic payment methods</a>
* - <a href="https://stripe.com/docs/connect/multiple-payment-method-configurations">Multiple configurations for your Connect accounts</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.
Expand All @@ -15,7 +28,7 @@
* @property null|\Stripe\StripeObject $afterpay_clearpay
* @property null|\Stripe\StripeObject $alipay
* @property null|\Stripe\StripeObject $apple_pay
* @property null|string $application The Connect application associated with this configuration.
* @property null|string $application For child configs, the Connect application associated with the configuration.
* @property null|\Stripe\StripeObject $au_becs_debit
* @property null|\Stripe\StripeObject $bacs_debit
* @property null|\Stripe\StripeObject $bancontact
Expand All @@ -31,18 +44,18 @@
* @property null|\Stripe\StripeObject $grabpay
* @property null|\Stripe\StripeObject $id_bank_transfer
* @property null|\Stripe\StripeObject $ideal
* @property bool $is_default The default configuration is used whenever no payment method configuration is specified.
* @property bool $is_default The default configuration is used whenever a payment method configuration is not specified.
* @property null|\Stripe\StripeObject $jcb
* @property null|\Stripe\StripeObject $klarna
* @property null|\Stripe\StripeObject $konbini
* @property null|\Stripe\StripeObject $link
* @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 null|\Stripe\StripeObject $multibanco
* @property string $name Configuration name.
* @property string $name The configuration's name.
* @property null|\Stripe\StripeObject $netbanking
* @property null|\Stripe\StripeObject $oxxo
* @property null|\Stripe\StripeObject $p24
* @property null|string $parent The configuration's parent configuration.
* @property null|string $parent For child configs, the configuration's parent configuration.
* @property null|\Stripe\StripeObject $pay_by_bank
* @property null|\Stripe\StripeObject $paynow
* @property null|\Stripe\StripeObject $paypal
Expand Down
2 changes: 2 additions & 0 deletions lib/Service/Issuing/IssuingServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @property CardholderService $cardholders
* @property CardService $cards
* @property DisputeService $disputes
* @property TokenService $tokens
* @property TransactionService $transactions
*/
class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
Expand All @@ -23,6 +24,7 @@ class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory
'cardholders' => CardholderService::class,
'cards' => CardService::class,
'disputes' => DisputeService::class,
'tokens' => TokenService::class,
'transactions' => TransactionService::class,
];

Expand Down
56 changes: 56 additions & 0 deletions lib/Service/Issuing/TokenService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Service\Issuing;

class TokenService extends \Stripe\Service\AbstractService
{
/**
* Lists all Issuing <code>Token</code> objects for a given card.
*
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Issuing\Token>
*/
public function all($params = null, $opts = null)
{
return $this->requestCollection('get', '/v1/issuing/tokens', $params, $opts);
}

/**
* Retrieves an Issuing <code>Token</code> object.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Token
*/
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/issuing/tokens/%s', $id), $params, $opts);
}

/**
* Attempts to update the specified Issuing <code>Token</code> object to the status
* specified.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Issuing\Token
*/
public function update($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/issuing/tokens/%s', $id), $params, $opts);
}
}
4 changes: 2 additions & 2 deletions lib/Service/SetupIntentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public function confirm($id, $params = null, $opts = null)
/**
* Creates a SetupIntent object.
*
* After the SetupIntent is created, attach a payment method and <a
* href="/docs/api/setup_intents/confirm">confirm</a> to collect any required
* After you create the SetupIntent, attach a payment method and <a
* href="/docs/api/setup_intents/confirm">confirm</a> it to collect any required
* permissions to charge the payment method later.
*
* @param null|array $params
Expand Down
6 changes: 3 additions & 3 deletions lib/Service/TokenService.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
class TokenService extends \Stripe\Service\AbstractService
{
/**
* Creates a single-use token that represents a bank account’s details. This token
* can be used with any API method in place of a bank account dictionary. This
* token can be used only once, by attaching it to a <a href="#accounts">Custom
* Creates a single-use token that represents a bank account’s details. You can use
* this token with any 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">Custom
* account</a>.
*
* @param null|array $params
Expand Down
Loading