From 112d09b00ede418a004d51319168cb31ae6a1bba Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Tue, 14 Nov 2017 19:19:54 +0100 Subject: [PATCH] Alphabetize list and add missing objects --- lib/Util/Util.php | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/Util/Util.php b/lib/Util/Util.php index b91d92a58..acd0f95af 100644 --- a/lib/Util/Util.php +++ b/lib/Util/Util.php @@ -65,11 +65,19 @@ public static function convertStripeObjectToArray($values) public static function convertToStripeObject($resp, $opts) { $types = array( + // data structures + 'list' => 'Stripe\\Collection', + + // business objects 'account' => 'Stripe\\Account', 'alipay_account' => 'Stripe\\AlipayAccount', 'apple_pay_domain' => 'Stripe\\ApplePayDomain', - 'bank_account' => 'Stripe\\BankAccount', + 'application_fee' => 'Stripe\\ApplicationFee', + 'balance' => 'Stripe\\Balance', 'balance_transaction' => 'Stripe\\BalanceTransaction', + 'bank_account' => 'Stripe\\BankAccount', + 'bitcoin_receiver' => 'Stripe\\BitcoinReceiver', + 'bitcoin_transaction' => 'Stripe\\BitcoinTransaction', 'card' => 'Stripe\\Card', 'charge' => 'Stripe\\Charge', 'country_spec' => 'Stripe\\CountrySpec', @@ -77,16 +85,13 @@ public static function convertToStripeObject($resp, $opts) 'customer' => 'Stripe\\Customer', 'dispute' => 'Stripe\\Dispute', 'ephemeral_key' => 'Stripe\\EphemeralKey', + 'event' => 'Stripe\\Event', 'exchange_rate' => 'Stripe\\ExchangeRate', - 'list' => 'Stripe\\Collection', - 'login_link' => 'Stripe\\LoginLink', + 'fee_refund' => 'Stripe\\ApplicationFeeRefund', + 'file_upload' => 'Stripe\\FileUpload', 'invoice' => 'Stripe\\Invoice', 'invoiceitem' => 'Stripe\\InvoiceItem', - 'event' => 'Stripe\\Event', - 'file_upload' => 'Stripe\\FileUpload', - 'token' => 'Stripe\\Token', - 'transfer' => 'Stripe\\Transfer', - 'transfer_reversal' => 'Stripe\\TransferReversal', + 'login_link' => 'Stripe\\LoginLink', 'order' => 'Stripe\\Order', 'order_return' => 'Stripe\\OrderReturn', 'payout' => 'Stripe\\Payout', @@ -101,9 +106,9 @@ public static function convertToStripeObject($resp, $opts) 'subscription' => 'Stripe\\Subscription', 'subscription_item' => 'Stripe\\SubscriptionItem', 'three_d_secure' => 'Stripe\\ThreeDSecure', - 'fee_refund' => 'Stripe\\ApplicationFeeRefund', - 'bitcoin_receiver' => 'Stripe\\BitcoinReceiver', - 'bitcoin_transaction' => 'Stripe\\BitcoinTransaction', + 'token' => 'Stripe\\Token', + 'transfer' => 'Stripe\\Transfer', + 'transfer_reversal' => 'Stripe\\TransferReversal', ); if (self::isList($resp)) { $mapped = array();