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 for beta branch #1423

Merged
merged 4 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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 @@
v217
v218
3 changes: 2 additions & 1 deletion init.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

require __DIR__ . '/lib/Util/ApiVersion.php';
Expand Down Expand Up @@ -165,6 +164,7 @@
require __DIR__ . '/lib/SubscriptionItem.php';
require __DIR__ . '/lib/SubscriptionSchedule.php';
require __DIR__ . '/lib/Tax/Calculation.php';
require __DIR__ . '/lib/Tax/Registration.php';
require __DIR__ . '/lib/Tax/Transaction.php';
require __DIR__ . '/lib/TaxCode.php';
require __DIR__ . '/lib/TaxId.php';
Expand Down Expand Up @@ -260,6 +260,7 @@
require __DIR__ . '/lib/Service/SubscriptionItemService.php';
require __DIR__ . '/lib/Service/SubscriptionScheduleService.php';
require __DIR__ . '/lib/Service/Tax/CalculationService.php';
require __DIR__ . '/lib/Service/Tax/RegistrationService.php';
require __DIR__ . '/lib/Service/Tax/TransactionService.php';
require __DIR__ . '/lib/Service/TaxCodeService.php';
require __DIR__ . '/lib/Service/TaxRateService.php';
Expand Down
8 changes: 4 additions & 4 deletions lib/Account.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -140,9 +139,9 @@ private function serializeAdditionalOwners($legalEntity, $additionalOwners)
$update = ($v instanceof StripeObject) ? $v->serializeParameters() : $v;

if ([] !== $update) {
if (!$originalValue
|| !\array_key_exists($i, $originalValue)
|| ($update !== $legalEntity->serializeParamsValue($originalValue[$i], null, false, true))) {
if (!$originalValue ||
!\array_key_exists($i, $originalValue) ||
($update !== $legalEntity->serializeParamsValue($originalValue[$i], null, false, true))) {
$updateArr[$i] = $update;
}
}
Expand Down Expand Up @@ -186,6 +185,7 @@ public function reject($params = null, $opts = null)
return $this;
}


const PATH_CAPABILITIES = '/capabilities';

/**
Expand Down
1 change: 0 additions & 1 deletion lib/AccountLink.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
1 change: 0 additions & 1 deletion lib/AccountSession.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
1 change: 0 additions & 1 deletion lib/ApplePayDomain.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
2 changes: 1 addition & 1 deletion lib/ApplicationFee.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -28,6 +27,7 @@ class ApplicationFee extends ApiResource
use ApiOperations\NestedResource;
use ApiOperations\Retrieve;


const PATH_REFUNDS = '/refunds';

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/ApplicationFeeRefund.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand All @@ -26,6 +25,7 @@ class ApplicationFeeRefund extends ApiResource
{
const OBJECT_NAME = 'fee_refund';


use ApiOperations\Update {
save as protected _save;
}
Expand Down
1 change: 0 additions & 1 deletion lib/Apps/Secret.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Apps;
Expand Down
1 change: 0 additions & 1 deletion lib/Balance.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
1 change: 0 additions & 1 deletion lib/BalanceTransaction.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
1 change: 0 additions & 1 deletion lib/BankAccount.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
1 change: 0 additions & 1 deletion lib/BillingPortal/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\BillingPortal;
Expand Down
1 change: 0 additions & 1 deletion lib/BillingPortal/Session.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\BillingPortal;
Expand Down
1 change: 0 additions & 1 deletion lib/Capability.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
1 change: 0 additions & 1 deletion lib/Capital/FinancingOffer.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Capital;
Expand Down
1 change: 0 additions & 1 deletion lib/Capital/FinancingSummary.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Capital;
Expand Down
1 change: 0 additions & 1 deletion lib/Capital/FinancingTransaction.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Capital;
Expand Down
1 change: 0 additions & 1 deletion lib/Card.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
2 changes: 1 addition & 1 deletion lib/CashBalance.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand All @@ -19,6 +18,7 @@ class CashBalance extends ApiResource
{
const OBJECT_NAME = 'cash_balance';


/**
* @return string the API URL for this balance transaction
*/
Expand Down
2 changes: 0 additions & 2 deletions lib/Charge.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -160,7 +159,6 @@ public function capture($params = null, $opts = null)
public static function search($params = null, $opts = null)
{
$url = '/v1/charges/search';

return self::_searchResource($url, $params, $opts);
}
}
1 change: 0 additions & 1 deletion lib/Checkout/Session.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Checkout;
Expand Down
1 change: 0 additions & 1 deletion lib/CountrySpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
1 change: 0 additions & 1 deletion lib/Coupon.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
2 changes: 1 addition & 1 deletion lib/CreditNote.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -113,6 +112,7 @@ public function voidCreditNote($params = null, $opts = null)
return $this;
}


const PATH_LINES = '/lines';

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/CreditNoteLineItem.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand All @@ -25,4 +24,5 @@
class CreditNoteLineItem extends ApiResource
{
const OBJECT_NAME = 'credit_note_line_item';

}
6 changes: 1 addition & 5 deletions lib/Customer.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -80,7 +79,6 @@ public function deleteDiscount($params = null, $opts = null)
$url = $this->instanceUrl() . '/discount';
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom(['discount' => null], $opts, true);

return $this;
}

Expand Down Expand Up @@ -133,17 +131,16 @@ public function retrievePaymentMethod($payment_method, $params = null, $opts = n
public static function search($params = null, $opts = null)
{
$url = '/v1/customers/search';

return self::_searchResource($url, $params, $opts);
}


const PATH_CASH_BALANCE = '/cash_balance';

/**
* @param string $id the ID of the customer to which the cash balance belongs
* @param null|array $params
* @param null|array|string $opts
* @param mixed $cashBalanceId
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
Expand All @@ -158,7 +155,6 @@ public static function retrieveCashBalance($id, $cashBalanceId, $params = null,
* @param string $id the ID of the customer to which the cash balance belongs
* @param null|array $params
* @param null|array|string $opts
* @param mixed $cashBalanceId
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
Expand Down
2 changes: 1 addition & 1 deletion lib/CustomerBalanceTransaction.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -35,6 +34,7 @@ class CustomerBalanceTransaction extends ApiResource
{
const OBJECT_NAME = 'customer_balance_transaction';


const TYPE_ADJUSTMENT = 'adjustment';
const TYPE_APPLIED_TO_INVOICE = 'applied_to_invoice';
const TYPE_CREDIT_NOTE = 'credit_note';
Expand Down
1 change: 0 additions & 1 deletion lib/CustomerCashBalanceTransaction.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
1 change: 0 additions & 1 deletion lib/Dispute.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
5 changes: 2 additions & 3 deletions lib/EphemeralKey.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand All @@ -16,12 +15,12 @@ class EphemeralKey extends ApiResource
{
const OBJECT_NAME = 'ephemeral_key';

use ApiOperations\Delete;

use ApiOperations\Create {
create as protected _create;
}

use ApiOperations\Delete;

/**
* @param null|array $params
* @param null|array|string $opts
Expand Down
4 changes: 3 additions & 1 deletion lib/Event.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -197,9 +196,12 @@ class Event extends ApiResource
const PROMOTION_CODE_CREATED = 'promotion_code.created';
const PROMOTION_CODE_UPDATED = 'promotion_code.updated';
const QUOTE_ACCEPTED = 'quote.accepted';
const QUOTE_ACCEPTING = 'quote.accepting';
const QUOTE_CANCELED = 'quote.canceled';
const QUOTE_CREATED = 'quote.created';
const QUOTE_FINALIZED = 'quote.finalized';
const QUOTE_REESTIMATED = 'quote.reestimated';
const QUOTE_STALE = 'quote.stale';
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';
Expand Down
1 change: 0 additions & 1 deletion lib/ExchangeRate.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
1 change: 0 additions & 1 deletion lib/File.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
1 change: 0 additions & 1 deletion lib/FileLink.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down
1 change: 0 additions & 1 deletion lib/FinancialConnections/Account.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\FinancialConnections;
Expand Down
2 changes: 1 addition & 1 deletion lib/FinancialConnections/AccountOwner.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\FinancialConnections;
Expand All @@ -17,4 +16,5 @@
class AccountOwner extends \Stripe\ApiResource
{
const OBJECT_NAME = 'financial_connections.account_owner';

}
2 changes: 1 addition & 1 deletion lib/FinancialConnections/AccountOwnership.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\FinancialConnections;
Expand All @@ -15,4 +14,5 @@
class AccountOwnership extends \Stripe\ApiResource
{
const OBJECT_NAME = 'financial_connections.account_ownership';

}
1 change: 0 additions & 1 deletion lib/FinancialConnections/Session.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\FinancialConnections;
Expand Down
Loading