Skip to content

Commit

Permalink
Codegen for openapi 6ec1613
Browse files Browse the repository at this point in the history
  • Loading branch information
dcr-stripe committed Dec 9, 2021
1 parent 4d92710 commit 1ff6348
Show file tree
Hide file tree
Showing 161 changed files with 2,767 additions and 3,031 deletions.
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

// Stripe singleton
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 @@ -130,9 +129,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 @@ -213,6 +212,7 @@ public function reject($params = null, $opts = null)
return $this;
}


/*
* Capabilities methods
* We can not add the capabilities() method today as the Account object already has a
Expand Down
2 changes: 1 addition & 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 All @@ -23,4 +22,5 @@ class AccountLink extends ApiResource
const OBJECT_NAME = 'account_link';

use ApiOperations\Create;

}
2 changes: 1 addition & 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 Expand Up @@ -28,4 +27,5 @@ public static function classUrl()
{
return '/v1/apple_pay/domains';
}

}
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
3 changes: 2 additions & 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 Expand Up @@ -63,4 +63,5 @@ public function save($opts = null)
{
return $this->_save($opts);
}

}
3 changes: 2 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 Expand Up @@ -31,6 +30,7 @@ class Balance extends SingletonApiResource
{
const OBJECT_NAME = 'balance';


/**
* @param null|array|string $opts
*
Expand All @@ -42,4 +42,5 @@ public static function retrieve($opts = null)
{
return self::_singletonRetrieve($opts);
}

}
2 changes: 1 addition & 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 Expand Up @@ -68,4 +67,5 @@ class BalanceTransaction extends ApiResource
const TYPE_TRANSFER_CANCEL = 'transfer_cancel';
const TYPE_TRANSFER_FAILURE = 'transfer_failure';
const TYPE_TRANSFER_REFUND = 'transfer_refund';

}
2 changes: 1 addition & 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 Expand Up @@ -130,4 +129,5 @@ public function verify($params = null, $opts = null)

return $this;
}

}
2 changes: 1 addition & 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 Expand Up @@ -28,4 +27,5 @@ class Configuration extends \Stripe\ApiResource
use \Stripe\ApiOperations\Create;
use \Stripe\ApiOperations\Retrieve;
use \Stripe\ApiOperations\Update;

}
2 changes: 1 addition & 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 Expand Up @@ -38,4 +37,5 @@ class Session extends \Stripe\ApiResource
const OBJECT_NAME = 'billing_portal.session';

use \Stripe\ApiOperations\Create;

}
2 changes: 1 addition & 1 deletion lib/BitcoinReceiver.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 @@ -68,4 +67,5 @@ public function instanceUrl()

return "{$base}/{$extn}";
}

}
3 changes: 2 additions & 1 deletion lib/BitcoinTransaction.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,4 +15,6 @@
class BitcoinTransaction extends ApiResource
{
const OBJECT_NAME = 'bitcoin_transaction';


}
2 changes: 1 addition & 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 Expand Up @@ -85,4 +84,5 @@ public static function update($_id, $_params = null, $_options = null)

throw new Exception\BadMethodCallException($msg);
}

}
2 changes: 1 addition & 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 Expand Up @@ -139,4 +138,5 @@ public static function update($_id, $_params = null, $_options = null)

throw new Exception\BadMethodCallException($msg);
}

}
2 changes: 1 addition & 1 deletion 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 @@ -143,4 +142,5 @@ public function capture($params = null, $opts = null)

return $this;
}

}
2 changes: 1 addition & 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 Expand Up @@ -110,6 +109,7 @@ public function expire($params = null, $opts = null)
return $this;
}


const PATH_LINE_ITEMS = '/line_items';

/**
Expand Down
2 changes: 1 addition & 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 Expand Up @@ -27,4 +26,5 @@ class CountrySpec extends ApiResource

use ApiOperations\All;
use ApiOperations\Retrieve;

}
2 changes: 1 addition & 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 Expand Up @@ -38,4 +37,5 @@ class Coupon extends ApiResource
use ApiOperations\Delete;
use ApiOperations\Retrieve;
use ApiOperations\Update;

}
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 @@ -93,6 +92,7 @@ public function voidCreditNote($params = null, $opts = null)
return $this;
}


const PATH_LINES = '/lines';

/**
Expand Down
3 changes: 2 additions & 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 @@ -23,4 +22,6 @@
class CreditNoteLineItem extends ApiResource
{
const OBJECT_NAME = 'credit_note_line_item';


}
4 changes: 1 addition & 3 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 @@ -78,14 +77,12 @@ 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;
}

/**
* @param null|array $params
* @param null|array|string $opts
* @param mixed $id
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
Expand All @@ -101,6 +98,7 @@ public static function allPaymentMethods($id, $params = null, $opts = null)
return $obj;
}


const PATH_BALANCE_TRANSACTIONS = '/balance_transactions';

/**
Expand Down
3 changes: 2 additions & 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 Expand Up @@ -100,4 +100,5 @@ public static function update($_id, $_params = null, $_options = null)

throw new Exception\BadMethodCallException($msg);
}

}
2 changes: 1 addition & 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 Expand Up @@ -79,4 +78,5 @@ public function close($opts = null)

return $this;
}

}
6 changes: 3 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 @@ -17,12 +16,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 All @@ -40,4 +39,5 @@ public static function create($params = null, $opts = null)

return self::_create($params, $opts);
}

}
2 changes: 1 addition & 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 @@ -236,4 +235,5 @@ class Event extends ApiResource
const TRANSFER_CREATED = 'transfer.created';
const TRANSFER_REVERSED = 'transfer.reversed';
const TRANSFER_UPDATED = 'transfer.updated';

}
2 changes: 1 addition & 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 Expand Up @@ -27,4 +26,5 @@ class ExchangeRate extends ApiResource

use ApiOperations\All;
use ApiOperations\Retrieve;

}
Loading

0 comments on commit 1ff6348

Please sign in to comment.