Skip to content

Commit

Permalink
Merge 3d3f6da into 13314f8
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-stripe committed Nov 9, 2020
2 parents 13314f8 + 3d3f6da commit 7ed6daf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private function serializeAdditionalOwners($legalEntity, $additionalOwners)
foreach ($additionalOwners as $i => $v) {
$update = ($v instanceof StripeObject) ? $v->serializeParameters() : $v;

if ([] !== $update) {
if ($update !== []) {
if (!$originalValue ||
!\array_key_exists($i, $originalValue) ||
($update !== $legalEntity->serializeParamsValue($originalValue[$i], null, false, true))) {
Expand Down
19 changes: 19 additions & 0 deletions lib/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ 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 CAPABILITY_UPDATED = 'capability.updated';
const CHARGE_CAPTURED = 'charge.captured';
const CHARGE_EXPIRED = 'charge.expired';
const CHARGE_FAILED = 'charge.failed';
Expand Down Expand Up @@ -106,11 +107,17 @@ class Event extends ApiResource
const CUSTOMER_SOURCE_UPDATED = 'customer.source.updated';
const CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created';
const CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted';
const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_APPLIED = 'customer.subscription.pending_update_applied';
const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_EXPIRED = 'customer.subscription.pending_update_expired';
const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end';
const CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated';
const CUSTOMER_TAX_ID_CREATED = 'customer.tax_id.created';
const CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted';
const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated';
const FILE_CREATED = 'file.created';
const INVOICE_CREATED = 'invoice.created';
const INVOICE_DELETED = 'invoice.deleted';
const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';
const INVOICE_FINALIZED = 'invoice.finalized';
const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible';
const INVOICE_PAID = 'invoice.paid';
Expand All @@ -132,11 +139,14 @@ class Event extends ApiResource
const ISSUING_CARD_UPDATED = 'issuing_card.updated';
const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created';
const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated';
const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed';
const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created';
const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated';
const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted';
const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated';
const ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created';
const ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated';
const MANDATE_UPDATED = 'mandate.updated';
const ORDER_CREATED = 'order.created';
const ORDER_PAYMENT_FAILED = 'order.payment_failed';
const ORDER_PAYMENT_SUCCEEDED = 'order.payment_succeeded';
Expand All @@ -146,8 +156,11 @@ class Event extends ApiResource
const PAYMENT_INTENT_CANCELED = 'payment_intent.canceled';
const PAYMENT_INTENT_CREATED = 'payment_intent.created';
const PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed';
const PAYMENT_INTENT_PROCESSING = 'payment_intent.processing';
const PAYMENT_INTENT_REQUIRES_ACTION = 'payment_intent.requires_action';
const PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded';
const PAYMENT_METHOD_ATTACHED = 'payment_method.attached';
const PAYMENT_METHOD_AUTOMATICALLY_UPDATED = 'payment_method.automatically_updated';
const PAYMENT_METHOD_CARD_AUTOMATICALLY_UPDATED = 'payment_method.card_automatically_updated';
const PAYMENT_METHOD_DETACHED = 'payment_method.detached';
const PAYMENT_METHOD_UPDATED = 'payment_method.updated';
Expand All @@ -169,6 +182,11 @@ class Event extends ApiResource
const PRODUCT_CREATED = 'product.created';
const PRODUCT_DELETED = 'product.deleted';
const PRODUCT_UPDATED = 'product.updated';
const PROMOTION_CODE_CREATED = 'promotion_code.created';
const PROMOTION_CODE_DELETED = 'promotion_code.deleted';
const PROMOTION_CODE_UPDATED = 'promotion_code.updated';
const RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created';
const RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated';
const RECIPIENT_CREATED = 'recipient.created';
const RECIPIENT_DELETED = 'recipient.deleted';
const RECIPIENT_UPDATED = 'recipient.updated';
Expand All @@ -179,6 +197,7 @@ class Event extends ApiResource
const REVIEW_OPENED = 'review.opened';
const SETUP_INTENT_CANCELED = 'setup_intent.canceled';
const SETUP_INTENT_CREATED = 'setup_intent.created';
const SETUP_INTENT_REQUIRES_ACTION = 'setup_intent.requires_action';
const SETUP_INTENT_SETUP_FAILED = 'setup_intent.setup_failed';
const SETUP_INTENT_SUCCEEDED = 'setup_intent.succeeded';
const SIGMA_SCHEDULED_QUERY_RUN_CREATED = 'sigma.scheduled_query_run.created';
Expand Down
2 changes: 1 addition & 1 deletion lib/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function detach($params = null, $opts = null)

$id = $this['id'];
if (!$id) {
$class = static::class;
$class = \get_class($this);
$msg = "Could not determine which URL to request: {$class} instance "
. "has invalid ID: {$id}";

Expand Down

0 comments on commit 7ed6daf

Please sign in to comment.