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

API Updates #1158

Merged
merged 1 commit into from
Jul 14, 2021
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
8 changes: 8 additions & 0 deletions lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class Event extends ApiResource
const APPLICATION_FEE_REFUNDED = 'application_fee.refunded';
const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated';
const BALANCE_AVAILABLE = 'balance.available';
const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created';
const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated';
const CAPABILITY_UPDATED = 'capability.updated';
const CHARGE_CAPTURED = 'charge.captured';
const CHARGE_EXPIRED = 'charge.expired';
Expand Down Expand Up @@ -115,6 +117,12 @@ class Event extends ApiResource
const CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted';
const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated';
const FILE_CREATED = 'file.created';
const IDENTITY_VERIFICATION_SESSION_CANCELED = 'identity.verification_session.canceled';
const IDENTITY_VERIFICATION_SESSION_CREATED = 'identity.verification_session.created';
const IDENTITY_VERIFICATION_SESSION_PROCESSING = 'identity.verification_session.processing';
const IDENTITY_VERIFICATION_SESSION_REDACTED = 'identity.verification_session.redacted';
const IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT = 'identity.verification_session.requires_input';
const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified';
Comment on lines +120 to +125
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Do we usually include new events in the changelog?

const INVOICE_CREATED = 'invoice.created';
const INVOICE_DELETED = 'invoice.deleted';
const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
Expand Down
19 changes: 19 additions & 0 deletions lib/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,25 @@ public function finalizeQuote($params = null, $opts = null)
return $this;
}

/**
* @param null|array $params
* @param null|array|string $opts
* @param mixed $id
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection list of LineItems
*/
public static function allComputedUpfrontLineItems($id, $params = null, $opts = null)
{
$url = static::resourceUrl($id) . '/computed_upfront_line_items';
list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);

return $obj;
}

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down
8 changes: 4 additions & 4 deletions lib/Service/AccountService.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,10 @@ public function updateCapability($parentId, $id, $params = null, $opts = null)
}

/**
* Updates the metadata, account holder name, and account holder type of a bank
* account belonging to a <a href="/docs/connect/custom-accounts">Custom
* account</a>, and optionally sets it as the default for its currency. Other bank
* account details are not editable by design.
* Updates the metadata, account holder name, account holder type of a bank account
* belonging to a <a href="/docs/connect/custom-accounts">Custom account</a>, and
* optionally sets it as the default for its currency. Other bank account details
* are not editable by design.
*
* You can re-enable a disabled bank account by performing an update call without
* providing any arguments or changes.
Expand Down
19 changes: 19 additions & 0 deletions lib/Service/QuoteService.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,25 @@ public function all($params = null, $opts = null)
return $this->requestCollection('get', '/v1/quotes', $params, $opts);
}

/**
* When retrieving a quote, there is an includable
* <strong>upfront.line_items</strong> property containing the first handful of
* those items. There is also a URL where you can retrieve the full (paginated)
* list of upfront line items.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection
*/
public function allComputedUpfrontLineItems($id, $params = null, $opts = null)
{
return $this->requestCollection('get', $this->buildPath('/v1/quotes/%s/computed_upfront_line_items', $id), $params, $opts);
}

/**
* When retrieving a quote, there is an includable <strong>line_items</strong>
* property containing the first handful of those items. There is also a URL where
Expand Down