Skip to content

Commit

Permalink
Codegen for openapi v219
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Jan 19, 2023
1 parent c7c4acc commit 3b23692
Show file tree
Hide file tree
Showing 207 changed files with 3,831 additions and 4,401 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v216
v219
1 change: 0 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
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/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/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
3 changes: 2 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 @@ -204,6 +203,8 @@ class Event extends ApiResource
const RECIPIENT_CREATED = 'recipient.created';
const RECIPIENT_DELETED = 'recipient.deleted';
const RECIPIENT_UPDATED = 'recipient.updated';
const REFUND_CREATED = 'refund.created';
const REFUND_UPDATED = 'refund.updated';
const REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed';
const REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded';
const REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated';
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
4 changes: 2 additions & 2 deletions lib/FundingInstructions.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 @@ -12,7 +11,7 @@
* initiating a bank transfer to any account in the
* <code>financial_addresses</code> field. Related guide: <a
* href="https://stripe.com/docs/payments/customer-balance/funding-instructions">Customer
* Balance - Funding Instructions</a> to learn more.
* Balance - Funding Instructions</a> to learn more
*
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property \Stripe\StripeObject $bank_transfer
Expand All @@ -24,5 +23,6 @@ class FundingInstructions extends ApiResource
{
const OBJECT_NAME = 'funding_instructions';


const FUNDING_TYPE_BANK_TRANSFER = 'bank_transfer';
}
1 change: 0 additions & 1 deletion lib/Identity/VerificationReport.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

// File generated from our OpenAPI spec

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

// File generated from our OpenAPI spec

namespace Stripe\Identity;
Expand Down
Loading

0 comments on commit 3b23692

Please sign in to comment.