Skip to content

Commit

Permalink
Update generated code for v425 (#1533)
Browse files Browse the repository at this point in the history
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] committed Jul 20, 2023
1 parent 7648cf5 commit 9578beb
Show file tree
Hide file tree
Showing 26 changed files with 240 additions and 45 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v417
v425
2 changes: 1 addition & 1 deletion lib/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @property null|\Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts.
* @property null|\Stripe\StripeObject $issuing
* @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[] $pending Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the <code>source_types</code> property.
* @property \Stripe\StripeObject[] $pending Funds that are not yet available in the balance. The pending balance for each currency, and for each payment type, can be found in the <code>source_types</code> property.
*/
class Balance extends SingletonApiResource
{
Expand Down
4 changes: 4 additions & 0 deletions lib/Coupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ class Coupon extends ApiResource
use ApiOperations\Delete;
use ApiOperations\Retrieve;
use ApiOperations\Update;

const DURATION_FOREVER = 'forever';
const DURATION_ONCE = 'once';
const DURATION_REPEATING = 'repeating';
}
2 changes: 1 addition & 1 deletion lib/CustomerCashBalanceTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @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 int $net_amount The amount by which the cash balance changed, represented in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
* @property null|\Stripe\StripeObject $refunded_from_payment
* @property string $type The type of the cash balance transaction. One of <code>applied_to_payment</code>, <code>unapplied_from_payment</code>, <code>refunded_from_payment</code>, <code>funded</code>, <code>return_initiated</code>, or <code>return_canceled</code>. New types may be added in future. See <a href="https://stripe.com/docs/payments/customer-balance#types">Customer Balance</a> to learn more about these types.
* @property string $type The type of the cash balance transaction. New types may be added in future. See <a href="https://stripe.com/docs/payments/customer-balance#types">Customer Balance</a> to learn more about these types.
* @property null|\Stripe\StripeObject $unapplied_from_payment
*/
class CustomerCashBalanceTransaction extends ApiResource
Expand Down
4 changes: 4 additions & 0 deletions lib/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ class Invoice extends ApiResource
const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically';
const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice';

const CUSTOMER_TAX_EXEMPT_EXEMPT = 'exempt';
const CUSTOMER_TAX_EXEMPT_NONE = 'none';
const CUSTOMER_TAX_EXEMPT_REVERSE = 'reverse';

/** @deprecated */
const STATUS_DELETED = 'deleted';
const STATUS_DRAFT = 'draft';
Expand Down
10 changes: 10 additions & 0 deletions lib/Issuing/Authorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ class Authorization extends \Stripe\ApiResource
use \Stripe\ApiOperations\Retrieve;
use \Stripe\ApiOperations\Update;

const AUTHORIZATION_METHOD_CHIP = 'chip';
const AUTHORIZATION_METHOD_CONTACTLESS = 'contactless';
const AUTHORIZATION_METHOD_KEYED_IN = 'keyed_in';
const AUTHORIZATION_METHOD_ONLINE = 'online';
const AUTHORIZATION_METHOD_SWIPE = 'swipe';

const STATUS_CLOSED = 'closed';
const STATUS_PENDING = 'pending';
const STATUS_REVERSED = 'reversed';

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down
16 changes: 16 additions & 0 deletions lib/Issuing/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,20 @@ class Card extends \Stripe\ApiResource
use \Stripe\ApiOperations\Create;
use \Stripe\ApiOperations\Retrieve;
use \Stripe\ApiOperations\Update;

const CANCELLATION_REASON_DESIGN_REJECTED = 'design_rejected';
const CANCELLATION_REASON_LOST = 'lost';
const CANCELLATION_REASON_STOLEN = 'stolen';

const REPLACEMENT_REASON_DAMAGED = 'damaged';
const REPLACEMENT_REASON_EXPIRED = 'expired';
const REPLACEMENT_REASON_LOST = 'lost';
const REPLACEMENT_REASON_STOLEN = 'stolen';

const STATUS_ACTIVE = 'active';
const STATUS_CANCELED = 'canceled';
const STATUS_INACTIVE = 'inactive';

const TYPE_PHYSICAL = 'physical';
const TYPE_VIRTUAL = 'virtual';
}
7 changes: 7 additions & 0 deletions lib/Issuing/Cardholder.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,11 @@ class Cardholder extends \Stripe\ApiResource
use \Stripe\ApiOperations\Create;
use \Stripe\ApiOperations\Retrieve;
use \Stripe\ApiOperations\Update;

const STATUS_ACTIVE = 'active';
const STATUS_BLOCKED = 'blocked';
const STATUS_INACTIVE = 'inactive';

const TYPE_COMPANY = 'company';
const TYPE_INDIVIDUAL = 'individual';
}
6 changes: 6 additions & 0 deletions lib/Issuing/Dispute.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ class Dispute extends \Stripe\ApiResource
use \Stripe\ApiOperations\Retrieve;
use \Stripe\ApiOperations\Update;

const STATUS_EXPIRED = 'expired';
const STATUS_LOST = 'lost';
const STATUS_SUBMITTED = 'submitted';
const STATUS_UNSUBMITTED = 'unsubmitted';
const STATUS_WON = 'won';

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down
7 changes: 7 additions & 0 deletions lib/Issuing/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@ class Transaction extends \Stripe\ApiResource
use \Stripe\ApiOperations\All;
use \Stripe\ApiOperations\Retrieve;
use \Stripe\ApiOperations\Update;

const TYPE_CAPTURE = 'capture';
const TYPE_REFUND = 'refund';

const WALLET_APPLE_PAY = 'apple_pay';
const WALLET_GOOGLE_PAY = 'google_pay';
const WALLET_SAMSUNG_PAY = 'samsung_pay';
}
7 changes: 7 additions & 0 deletions lib/Mandate.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,11 @@ class Mandate extends ApiResource
const OBJECT_NAME = 'mandate';

use ApiOperations\Retrieve;

const STATUS_ACTIVE = 'active';
const STATUS_INACTIVE = 'inactive';
const STATUS_PENDING = 'pending';

const TYPE_MULTI_USE = 'multi_use';
const TYPE_SINGLE_USE = 'single_use';
}
23 changes: 18 additions & 5 deletions lib/PaymentIntent.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,24 @@ class PaymentIntent extends ApiResource
use ApiOperations\Search;
use ApiOperations\Update;

const CANCELLATION_REASON_ABANDONED = 'abandoned';
const CANCELLATION_REASON_AUTOMATIC = 'automatic';
const CANCELLATION_REASON_DUPLICATE = 'duplicate';
const CANCELLATION_REASON_FAILED_INVOICE = 'failed_invoice';
const CANCELLATION_REASON_FRAUDULENT = 'fraudulent';
const CANCELLATION_REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer';
const CANCELLATION_REASON_VOID_INVOICE = 'void_invoice';

const CAPTURE_METHOD_AUTOMATIC = 'automatic';
const CAPTURE_METHOD_AUTOMATIC_ASYNC = 'automatic_async';
const CAPTURE_METHOD_MANUAL = 'manual';

const CONFIRMATION_METHOD_AUTOMATIC = 'automatic';
const CONFIRMATION_METHOD_MANUAL = 'manual';

const SETUP_FUTURE_USAGE_OFF_SESSION = 'off_session';
const SETUP_FUTURE_USAGE_ON_SESSION = 'on_session';

const STATUS_CANCELED = 'canceled';
const STATUS_PROCESSING = 'processing';
const STATUS_REQUIRES_ACTION = 'requires_action';
Expand All @@ -75,11 +93,6 @@ class PaymentIntent extends ApiResource
const STATUS_REQUIRES_PAYMENT_METHOD = 'requires_payment_method';
const STATUS_SUCCEEDED = 'succeeded';

const CANCELLATION_REASON_DUPLICATE = 'duplicate';
const CANCELLATION_REASON_FRAUDULENT = 'fraudulent';
const CANCELLATION_REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer';
const CANCELLATION_REASON_ABANDONED = 'abandoned';

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down
34 changes: 34 additions & 0 deletions lib/PaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,40 @@ class PaymentMethod extends ApiResource
use ApiOperations\Retrieve;
use ApiOperations\Update;

const TYPE_ACSS_DEBIT = 'acss_debit';
const TYPE_AFFIRM = 'affirm';
const TYPE_AFTERPAY_CLEARPAY = 'afterpay_clearpay';
const TYPE_ALIPAY = 'alipay';
const TYPE_AU_BECS_DEBIT = 'au_becs_debit';
const TYPE_BACS_DEBIT = 'bacs_debit';
const TYPE_BANCONTACT = 'bancontact';
const TYPE_BLIK = 'blik';
const TYPE_BOLETO = 'boleto';
const TYPE_CARD = 'card';
const TYPE_CARD_PRESENT = 'card_present';
const TYPE_CASHAPP = 'cashapp';
const TYPE_CUSTOMER_BALANCE = 'customer_balance';
const TYPE_EPS = 'eps';
const TYPE_FPX = 'fpx';
const TYPE_GIROPAY = 'giropay';
const TYPE_GRABPAY = 'grabpay';
const TYPE_IDEAL = 'ideal';
const TYPE_INTERAC_PRESENT = 'interac_present';
const TYPE_KLARNA = 'klarna';
const TYPE_KONBINI = 'konbini';
const TYPE_LINK = 'link';
const TYPE_OXXO = 'oxxo';
const TYPE_P24 = 'p24';
const TYPE_PAYNOW = 'paynow';
const TYPE_PAYPAL = 'paypal';
const TYPE_PIX = 'pix';
const TYPE_PROMPTPAY = 'promptpay';
const TYPE_SEPA_DEBIT = 'sepa_debit';
const TYPE_SOFORT = 'sofort';
const TYPE_US_BANK_ACCOUNT = 'us_bank_account';
const TYPE_WECHAT_PAY = 'wechat_pay';
const TYPE_ZIP = 'zip';

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down
19 changes: 19 additions & 0 deletions lib/Plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,23 @@ class Plan extends ApiResource
use ApiOperations\Delete;
use ApiOperations\Retrieve;
use ApiOperations\Update;

const AGGREGATE_USAGE_LAST_DURING_PERIOD = 'last_during_period';
const AGGREGATE_USAGE_LAST_EVER = 'last_ever';
const AGGREGATE_USAGE_MAX = 'max';
const AGGREGATE_USAGE_SUM = 'sum';

const BILLING_SCHEME_PER_UNIT = 'per_unit';
const BILLING_SCHEME_TIERED = 'tiered';

const INTERVAL_DAY = 'day';
const INTERVAL_MONTH = 'month';
const INTERVAL_WEEK = 'week';
const INTERVAL_YEAR = 'year';

const TIERS_MODE_GRADUATED = 'graduated';
const TIERS_MODE_VOLUME = 'volume';

const USAGE_TYPE_LICENSED = 'licensed';
const USAGE_TYPE_METERED = 'metered';
}
37 changes: 19 additions & 18 deletions lib/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,6 @@ class Quote extends ApiResource
const STATUS_DRAFT = 'draft';
const STATUS_OPEN = 'open';

/**
* @param callable $readBodyChunkCallable
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*/
public function pdf($readBodyChunkCallable, $params = null, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
if (null === $opts->apiBase) {
$opts->apiBase = Stripe::$apiUploadBase;
}

$url = $this->instanceUrl() . '/pdf';
$this->_requestStream('get', $url, $readBodyChunkCallable, $params, $opts);
}

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down Expand Up @@ -167,4 +149,23 @@ public static function allLineItems($id, $params = null, $opts = null)

return $obj;
}

/**
* @param callable $readBodyChunkCallable
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return void
*/
public function pdf($readBodyChunkCallable, $params = null, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
if (!isset($opts->apiBase)) {
$opts->apiBase = Stripe::$apiUploadBase;
}
$url = $this->instanceUrl() . '/pdf';
$this->_requestStream('get', $url, $readBodyChunkCallable, $params, $opts);
}
}
9 changes: 9 additions & 0 deletions lib/Radar/ValueList.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,13 @@ class ValueList extends \Stripe\ApiResource
use \Stripe\ApiOperations\Delete;
use \Stripe\ApiOperations\Retrieve;
use \Stripe\ApiOperations\Update;

const ITEM_TYPE_CARD_BIN = 'card_bin';
const ITEM_TYPE_CARD_FINGERPRINT = 'card_fingerprint';
const ITEM_TYPE_CASE_SENSITIVE_STRING = 'case_sensitive_string';
const ITEM_TYPE_COUNTRY = 'country';
const ITEM_TYPE_CUSTOMER_ID = 'customer_id';
const ITEM_TYPE_EMAIL = 'email';
const ITEM_TYPE_IP_ADDRESS = 'ip_address';
const ITEM_TYPE_STRING = 'string';
}
9 changes: 9 additions & 0 deletions lib/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ class Review extends ApiResource
use ApiOperations\All;
use ApiOperations\Retrieve;

const CLOSED_REASON_APPROVED = 'approved';
const CLOSED_REASON_DISPUTED = 'disputed';
const CLOSED_REASON_REDACTED = 'redacted';
const CLOSED_REASON_REFUNDED = 'refunded';
const CLOSED_REASON_REFUNDED_AS_FRAUD = 'refunded_as_fraud';

const OPENED_REASON_MANUAL = 'manual';
const OPENED_REASON_RULE = 'rule';

/**
* Possible string representations of the current, the opening or the closure reason of the review.
* Not all of these enumeration apply to all of the ´reason´ fields. Please consult the Review object to
Expand Down
33 changes: 18 additions & 15 deletions lib/Service/QuoteService.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,29 @@ public function finalizeQuote($id, $params = null, $opts = null)
}

/**
* Retrieves the quote with the given ID.
* Download the PDF for a finalized quote.
*
* @param string $id
* @param callable $readBodyChunkCallable
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Quote
* @return mixed
*/
public function retrieve($id, $params = null, $opts = null)
public function pdf($id, $readBodyChunkCallable, $params = null, $opts = null)
{
return $this->request('get', $this->buildPath('/v1/quotes/%s', $id), $params, $opts);
$opts = \Stripe\Util\RequestOptions::parse($opts);
if (!isset($opts->apiBase)) {
$opts->apiBase = $this->getClient()->getFilesBase();
}

return $this->requestStream('get', $this->buildPath('/v1/quotes/%s/pdf', $id), $readBodyChunkCallable, $params, $opts);
}

/**
* A quote models prices and services for a customer.
* Retrieves the quote with the given ID.
*
* @param string $id
* @param null|array $params
Expand All @@ -151,27 +157,24 @@ public function retrieve($id, $params = null, $opts = null)
*
* @return \Stripe\Quote
*/
public function update($id, $params = null, $opts = null)
public function retrieve($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/quotes/%s', $id), $params, $opts);
return $this->request('get', $this->buildPath('/v1/quotes/%s', $id), $params, $opts);
}

/**
* Download the PDF for a finalized quote.
* A quote models prices and services for a customer.
*
* @param string $id
* @param callable $readBodyChunkCallable
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Quote
*/
public function pdf($id, $readBodyChunkCallable, $params = null, $opts = null)
public function update($id, $params = null, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
if (!isset($opts->apiBase)) {
$opts->apiBase = $this->getClient()->getFilesBase();
}
$this->requestStream('get', $this->buildPath('/v1/quotes/%s/pdf', $id), $readBodyChunkCallable, $params, $opts);
return $this->request('post', $this->buildPath('/v1/quotes/%s', $id), $params, $opts);
}
}
4 changes: 4 additions & 0 deletions lib/SetupIntent.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ class SetupIntent extends ApiResource
use ApiOperations\Retrieve;
use ApiOperations\Update;

const CANCELLATION_REASON_ABANDONED = 'abandoned';
const CANCELLATION_REASON_DUPLICATE = 'duplicate';
const CANCELLATION_REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer';

const STATUS_CANCELED = 'canceled';
const STATUS_PROCESSING = 'processing';
const STATUS_REQUIRES_ACTION = 'requires_action';
Expand Down

0 comments on commit 9578beb

Please sign in to comment.