Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
yejia-stripe committed Feb 3, 2022
1 parent 932feff commit a611807
Show file tree
Hide file tree
Showing 163 changed files with 3,058 additions and 2,785 deletions.
1 change: 1 addition & 0 deletions init.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -129,9 +130,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 @@ -212,7 +213,6 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand All @@ -22,5 +23,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -27,5 +28,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

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


const PATH_REFUNDS = '/refunds';

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

// File generated from our OpenAPI spec

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


use ApiOperations\Update {
save as protected _save;
}
Expand Down Expand Up @@ -63,5 +63,4 @@ public function save($opts = null)
{
return $this->_save($opts);
}

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

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -30,7 +31,6 @@ class Balance extends SingletonApiResource
{
const OBJECT_NAME = 'balance';


/**
* @param null|array|string $opts
*
Expand All @@ -42,5 +42,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -67,5 +68,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -129,5 +130,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\BillingPortal;
Expand Down Expand Up @@ -28,5 +29,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\BillingPortal;
Expand Down Expand Up @@ -37,5 +38,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -67,5 +68,4 @@ public function instanceUrl()

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

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

// File generated from our OpenAPI spec

namespace Stripe;
Expand All @@ -15,6 +16,4 @@
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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -84,5 +85,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -138,5 +139,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -142,5 +143,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe\Checkout;
Expand Down Expand Up @@ -114,7 +115,6 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -26,5 +27,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -37,5 +38,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

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


const PATH_LINES = '/lines';

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

// File generated from our OpenAPI spec

namespace Stripe;
Expand All @@ -22,6 +23,4 @@
class CreditNoteLineItem extends ApiResource
{
const OBJECT_NAME = 'credit_note_line_item';


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

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -75,12 +76,14 @@ 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 @@ -96,7 +99,6 @@ public static function allPaymentMethods($id, $params = null, $opts = null)
return $obj;
}


const PATH_BALANCE_TRANSACTIONS = '/balance_transactions';

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

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -34,7 +35,6 @@ 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,5 +100,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -78,5 +79,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand All @@ -16,12 +17,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 @@ -39,5 +40,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -235,5 +236,4 @@ 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,4 +1,5 @@
<?php

// File generated from our OpenAPI spec

namespace Stripe;
Expand Down Expand Up @@ -26,5 +27,4 @@ class ExchangeRate extends ApiResource

use ApiOperations\All;
use ApiOperations\Retrieve;

}
Loading

0 comments on commit a611807

Please sign in to comment.