Skip to content

Commit

Permalink
Early codegen fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe committed Oct 31, 2019
1 parent 3371f2a commit 0ef4739
Show file tree
Hide file tree
Showing 42 changed files with 255 additions and 157 deletions.
4 changes: 2 additions & 2 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
require(dirname(__FILE__) . '/lib/Reporting/ReportType.php');
require(dirname(__FILE__) . '/lib/Review.php');
require(dirname(__FILE__) . '/lib/SetupIntent.php');
require(dirname(__FILE__) . '/lib/SKU.php');
require(dirname(__FILE__) . '/lib/Sigma/ScheduledQueryRun.php');
require(dirname(__FILE__) . '/lib/SKU.php');
require(dirname(__FILE__) . '/lib/Source.php');
require(dirname(__FILE__) . '/lib/SourceTransaction.php');
require(dirname(__FILE__) . '/lib/Subscription.php');
Expand All @@ -138,12 +138,12 @@
require(dirname(__FILE__) . '/lib/TransferReversal.php');
require(dirname(__FILE__) . '/lib/UsageRecord.php');
require(dirname(__FILE__) . '/lib/UsageRecordSummary.php');
require(dirname(__FILE__) . '/lib/WebhookEndpoint.php');

// OAuth
require(dirname(__FILE__) . '/lib/OAuth.php');
require(dirname(__FILE__) . '/lib/OAuthErrorObject.php');

// Webhooks
require(dirname(__FILE__) . '/lib/Webhook.php');
require(dirname(__FILE__) . '/lib/WebhookEndpoint.php');
require(dirname(__FILE__) . '/lib/WebhookSignature.php');
8 changes: 5 additions & 3 deletions lib/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ public static function retrieveCapability($id, $capabilityId, $params = null, $o
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Capability
*/
public static function updateCapability($id, $capabilityId, $params = null, $opts = null)
Expand Down Expand Up @@ -288,16 +290,16 @@ public static function createLoginLink($id, $params = null, $opts = null)

/**
* @param array|null $params
* @param array|string|null $options
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Collection The list of persons.
*/
public function persons($params = null, $options = null)
public function persons($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/persons';
list($response, $opts) = $this->_request('get', $url, $params, $options);
list($response, $opts) = $this->_request('get', $url, $params, $opts);
$obj = Util\Util::convertToStripeObject($response, $opts);
$obj->setLastResponse($response);
return $obj;
Expand Down
6 changes: 6 additions & 0 deletions lib/ApplePayDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
/**
* Class ApplePayDomain
*
* @property string $id
* @property string $object
* @property int $created
* @property string $domain_name
* @property bool $livemode
*
* @package Stripe
*/
class ApplePayDomain extends ApiResource
Expand Down
14 changes: 7 additions & 7 deletions lib/ApplicationFee.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ApplicationFee extends ApiResource
const PATH_REFUNDS = '/refunds';

/**
* @param string|null $id The ID of the application fee on which to create the refund.
* @param string $id The ID of the application fee on which to create the fee refund.
* @param array|null $params
* @param array|string|null $opts
*
Expand All @@ -47,8 +47,8 @@ public static function createRefund($id, $params = null, $opts = null)
}

/**
* @param string|null $id The ID of the application fee to which the refund belongs.
* @param array|null $refundId The ID of the refund to retrieve.
* @param string $id The ID of the application fee to which the fee refund belongs.
* @param string $refundId The ID of the fee refund to retrieve.
* @param array|null $params
* @param array|string|null $opts
*
Expand All @@ -62,8 +62,8 @@ public static function retrieveRefund($id, $refundId, $params = null, $opts = nu
}

/**
* @param string|null $id The ID of the application fee to which the refund belongs.
* @param array|null $refundId The ID of the refund to update.
* @param string $id The ID of the application fee to which the fee refund belongs.
* @param string $refundId The ID of the fee refund to update.
* @param array|null $params
* @param array|string|null $opts
*
Expand All @@ -77,13 +77,13 @@ public static function updateRefund($id, $refundId, $params = null, $opts = null
}

/**
* @param string|null $id The ID of the application fee on which to retrieve the refunds.
* @param string $id The ID of the application fee on which to retrieve the fee refunds.
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Collection The list of refunds.
* @return Collection The list of fee refunds.
*/
public static function allRefunds($id, $params = null, $opts = null)
{
Expand Down
14 changes: 7 additions & 7 deletions lib/BankAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,17 @@ public static function update($_id, $_params = null, $_options = null)
}

/**
* @param array|null $params
* @param array|string|null $options
* @param array|null $params
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return BankAccount The verified bank account.
*/
public function verify($params = null, $options = null)
*
* @return BankAccount The verified bank account.
*/
public function verify($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/verify';
list($response, $opts) = $this->_request('post', $url, $params, $options);
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
}
Expand Down
27 changes: 25 additions & 2 deletions lib/BitcoinReceiver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,33 @@
/**
* Class BitcoinReceiver
*
* @package Stripe
*
* @deprecated Bitcoin receivers are deprecated. Please use the sources API instead.
* @link https://stripe.com/docs/sources/bitcoin
*
* @property string $id
* @property string $object
* @property bool $active
* @property int $amount
* @property int $amount_received
* @property int $bitcoin_amount
* @property int $bitcoin_amount_received
* @property string $bitcoin_uri
* @property int $created
* @property string $currency
* @property string $customer
* @property string $description
* @property string $email
* @property bool $filled
* @property string $inbound_address
* @property bool $livemode
* @property StripeObject $metadata
* @property string $payment
* @property string $refund_address
* @property mixed $transactions
* @property bool $uncaptured_funds
* @property bool $used_for_payment
*
* @package Stripe
*/
class BitcoinReceiver extends ApiResource
{
Expand Down
7 changes: 4 additions & 3 deletions lib/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* @property mixed $source
* @property string $source_transfer
* @property string $statement_descriptor
* @property string $statement_descriptor_suffix
* @property string $status
* @property string $transfer
* @property mixed $transfer_data
Expand Down Expand Up @@ -122,16 +123,16 @@ class Charge extends ApiResource

/**
* @param array|null $params
* @param array|string|null $options
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return Charge The captured charge.
*/
public function capture($params = null, $options = null)
public function capture($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/capture';
list($response, $opts) = $this->_request('post', $url, $params, $options);
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
}
Expand Down
3 changes: 2 additions & 1 deletion lib/Checkout/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
* @property string $customer_email
* @property mixed $display_items
* @property bool $livemode
* @property string $mode
* @property string $payment_intent
* @property string[] $payment_method_types
* @property string $setup_intent
* @property string $submit_type
* @property string $subscription
* @property string $success_url
*
* @package Stripe
* @package Stripe\Checkout
*/
class Session extends \Stripe\ApiResource
{
Expand Down
3 changes: 2 additions & 1 deletion lib/CreditNote.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* @property string $id
* @property string $object
* @property int $amount
* @property string $customer_balance_transaction
* @property int $created
* @property string $currency
* @property string $customer
* @property string $customer_balance_transaction
* @property string $invoice
* @property bool $livemode
* @property string $memo
Expand All @@ -22,6 +22,7 @@
* @property string $refund
* @property string $status
* @property string $type
* @property int $voided_at
*
* @package Stripe
*/
Expand Down
Loading

0 comments on commit 0ef4739

Please sign in to comment.