Skip to content

Commit

Permalink
Update generated code (#1718)
Browse files Browse the repository at this point in the history
* Update generated code for v1097

* Update generated code for v1105

* Update generated code for v1111

* Update generated code for v1112

* Update generated code for v1113

* Update generated code for v1115

* Update generated code for v1116

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Jul 5, 2024
1 parent 96f0dbe commit 97a51f1
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 12 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1095
v1116
4 changes: 2 additions & 2 deletions lib/Billing/MeterEventSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
* @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 float $aggregated_value Aggregated value of all the events within <code>start_time</code> (inclusive) and <code>end_time</code> (inclusive). The aggregation strategy is defined on meter via <code>default_aggregation</code>.
* @property int $end_time End timestamp for this event summary (inclusive).
* @property int $end_time End timestamp for this event summary (exclusive). Must be aligned with minute boundaries.
* @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 $meter The meter associated with this event summary.
* @property int $start_time Start timestamp for this event summary (inclusive).
* @property int $start_time Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries.
*/
class MeterEventSummary extends \Stripe\ApiResource
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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 null|\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|string $name The customer's full name or business name.
* @property null|int $next_invoice_sequence The suffix of the customer's next invoice number (for example, 0001).
* @property null|int $next_invoice_sequence The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses.
* @property null|string $phone The customer's phone number.
* @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference.
* @property null|\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
Expand Down
14 changes: 7 additions & 7 deletions lib/CustomerSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
namespace Stripe;

/**
* A customer session allows you to grant client access to Stripe's frontend SDKs (like StripeJs)
* control over a customer.
* A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access
* control over a Customer.
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property string $client_secret <p>The client secret of this customer session. Used on the client to set up secure access to the given <code>customer</code>.</p><p>The client secret can be used to provide access to <code>customer</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.</p>
* @property null|\Stripe\StripeObject $components Configuration for the components supported by this customer session.
* @property string $client_secret <p>The client secret of this Customer Session. Used on the client to set up secure access to the given <code>customer</code>.</p><p>The client secret can be used to provide access to <code>customer</code> from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.</p>
* @property null|\Stripe\StripeObject $components Configuration for the components supported by this Customer Session.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string|\Stripe\Customer $customer The customer the customer session was created for.
* @property int $expires_at The timestamp at which this customer session will expire.
* @property string|\Stripe\Customer $customer The Customer the Customer Session was created for.
* @property int $expires_at The timestamp at which this Customer Session will expire.
* @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.
*/
class CustomerSession extends ApiResource
{
const OBJECT_NAME = 'customer_session';

/**
* Creates a customer session object that includes a single-use client secret that
* Creates a Customer Session object that includes a single-use client secret that
* you can use on your front-end to grant client-side API access for certain
* customer resources.
*
Expand Down
1 change: 1 addition & 0 deletions lib/ErrorObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ class ErrorObject extends StripeObject
const CODE_PARAMETERS_EXCLUSIVE = 'parameters_exclusive';
const CODE_PAYMENT_INTENT_ACTION_REQUIRED = 'payment_intent_action_required';
const CODE_PAYMENT_INTENT_AUTHENTICATION_FAILURE = 'payment_intent_authentication_failure';
const CODE_PAYMENT_INTENT_FX_QUOTE_INVALID = 'payment_intent_fx_quote_invalid';
const CODE_PAYMENT_INTENT_INCOMPATIBLE_PAYMENT_METHOD = 'payment_intent_incompatible_payment_method';
const CODE_PAYMENT_INTENT_INVALID_PARAMETER = 'payment_intent_invalid_parameter';
const CODE_PAYMENT_INTENT_KONBINI_REJECTED_CONFIRMATION_NUMBER = 'payment_intent_konbini_rejected_confirmation_number';
Expand Down
51 changes: 51 additions & 0 deletions lib/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,23 @@ public static function update($id, $params = null, $opts = null)
const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically';
const BILLING_SEND_INVOICE = 'send_invoice';

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice the added invoice
*/
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
Expand Down Expand Up @@ -340,6 +357,23 @@ public function pay($params = null, $opts = null)
return $this;
}

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice the removed invoice
*/
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
Expand Down Expand Up @@ -393,6 +427,23 @@ public static function upcomingLines($params = null, $opts = null)
return $obj;
}

/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice the updated invoice
*/
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
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/CustomerSessionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class CustomerSessionService extends \Stripe\Service\AbstractService
{
/**
* Creates a customer session object that includes a single-use client secret that
* Creates a Customer Session object that includes a single-use client secret that
* you can use on your front-end to grant client-side API access for certain
* customer resources.
*
Expand Down
51 changes: 51 additions & 0 deletions lib/Service/InvoiceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@
*/
class InvoiceService extends \Stripe\Service\AbstractService
{
/**
* Adds multiple line items to an invoice. This is only possible when an invoice is
* still a draft.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*/
public function addLines($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/invoices/%s/add_lines', $id), $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
Expand Down Expand Up @@ -177,6 +194,23 @@ public function pay($id, $params = null, $opts = null)
return $this->request('post', $this->buildPath('/v1/invoices/%s/pay', $id), $params, $opts);
}

/**
* Removes multiple line items from an invoice. This is only possible when an
* invoice is still a draft.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*/
public function removeLines($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/invoices/%s/remove_lines', $id), $params, $opts);
}

/**
* Retrieves the invoice with the given ID.
*
Expand Down Expand Up @@ -338,6 +372,23 @@ public function updateLine($parentId, $id, $params = null, $opts = null)
return $this->request('post', $this->buildPath('/v1/invoices/%s/lines/%s', $parentId, $id), $params, $opts);
}

/**
* Updates multiple line items on an invoice. This is only possible when an invoice
* is still a draft.
*
* @param string $id
* @param null|array $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Invoice
*/
public function updateLines($id, $params = null, $opts = null)
{
return $this->request('post', $this->buildPath('/v1/invoices/%s/update_lines', $id), $params, $opts);
}

/**
* Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is
* similar to <a href="#delete_invoice">deletion</a>, however it only applies to
Expand Down
1 change: 1 addition & 0 deletions lib/Tax/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* @property null|\Stripe\Collection<\Stripe\Tax\TransactionLineItem> $line_items The tax collected or refunded, by line item.
* @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 $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 int $posted_at The Unix timestamp representing when the tax liability is assumed or reduced.
* @property string $reference A custom unique identifier, such as 'myOrder_123'.
* @property null|\Stripe\StripeObject $reversal If <code>type=reversal</code>, contains information about what was reversed.
* @property null|\Stripe\StripeObject $ship_from_details The details of the ship from location, such as the address.
Expand Down
1 change: 1 addition & 0 deletions lib/Terminal/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,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 null|string $name String indicating the name of the Configuration object, set by the user
* @property null|\Stripe\StripeObject $offline
* @property null|\Stripe\StripeObject $reboot_window
* @property null|\Stripe\StripeObject $stripe_s700
* @property null|\Stripe\StripeObject $tipping
* @property null|\Stripe\StripeObject $verifone_p400
Expand Down

0 comments on commit 97a51f1

Please sign in to comment.