From 00a05ad113fe741dfcf5f995613f8f5fa454791a Mon Sep 17 00:00:00 2001 From: Nicolai Cornelis Date: Wed, 7 Feb 2018 15:01:38 +0100 Subject: [PATCH 1/3] Updated @property docs to reflect API version 2018-02-05 Also cleaned up and corrected a few mistakes I found. --- lib/Invoice.php | 66 +++++++++++++++++++-------------------- lib/InvoiceItem.php | 4 +-- lib/Payout.php | 2 +- lib/Plan.php | 4 +-- lib/Product.php | 2 ++ lib/RecipientTransfer.php | 2 +- lib/Subscription.php | 2 +- lib/SubscriptionItem.php | 2 +- 8 files changed, 43 insertions(+), 41 deletions(-) diff --git a/lib/Invoice.php b/lib/Invoice.php index 988437a0c..30f5dc183 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -5,40 +5,40 @@ /** * Class Invoice * - * @property string $id - * @property string $object - * @property int $amount_due - * @property int $application_fee - * @property int $attempt_count - * @property bool $attempted - * @property string $billing - * @property string $charge - * @property bool $closed - * @property string $currency - * @property string $customer - * @property int $date - * @property string $description - * @property mixed $discount - * @property int $due_date - * @property int $ending_balance - * @property bool $forgiven + * @property string $id + * @property string $object + * @property int $amount_due + * @property int $application_fee + * @property int $attempt_count + * @property bool $attempted + * @property string $billing + * @property string $charge + * @property bool $closed + * @property string $currency + * @property string $customer + * @property int $date + * @property string $description + * @property mixed $discount + * @property int $due_date + * @property int $ending_balance + * @property bool $forgiven * @property Collection $lines - * @property bool $livemode - * @property AttachedObject $metadata - * @property int $next_payment_attempt - * @property string $number - * @property bool $paid - * @property int $period_end - * @property int $period_start - * @property string $receipt_number - * @property int $starting_balance - * @property string $statement_descriptor - * @property string $subscription - * @property int $subscription_proration_date - * @property int $subtotal - * @property int $tax - * @property float $tax_percent - * @property int $total + * @property bool $livemode + * @property AttachedObject $metadata + * @property int $next_payment_attempt + * @property string $number + * @property bool $paid + * @property int $period_end + * @property int $period_start + * @property string $receipt_number + * @property int $starting_balance + * @property string $statement_descriptor + * @property string $subscription + * @property int $subscription_proration_date + * @property int $subtotal + * @property int $tax + * @property float $tax_percent + * @property int $total * @property int $webhooks_delivered_at * * @package Stripe diff --git a/lib/InvoiceItem.php b/lib/InvoiceItem.php index 6b133695d..5f8eb6ed8 100644 --- a/lib/InvoiceItem.php +++ b/lib/InvoiceItem.php @@ -16,8 +16,8 @@ * @property string $invoice * @property bool $livemode * @property AttachedObject $metadata - * @property array $period - * @property mixed $plan + * @property mixed $period + * @property Plan $plan * @property bool $proration * @property int $quantity * @property string $subscription diff --git a/lib/Payout.php b/lib/Payout.php index 9a0eb1831..5c1fe6991 100644 --- a/lib/Payout.php +++ b/lib/Payout.php @@ -17,7 +17,7 @@ * @property string $failure_code * @property string $failure_message * @property bool $livemode - * @property mixed $metadata + * @property AttachedObject $metadata * @property string $method * @property string $recipient * @property string $source_type diff --git a/lib/Plan.php b/lib/Plan.php index 34ae9ed74..c2dce32b3 100644 --- a/lib/Plan.php +++ b/lib/Plan.php @@ -16,8 +16,8 @@ * @property int $interval_count * @property bool $livemode * @property AttachedObject $metadata - * @property string $name - * @property string $statement_descriptor + * @property string $nickname + * @property string $product * @property int $trial_period_days */ class Plan extends ApiResource diff --git a/lib/Product.php b/lib/Product.php index e7c2b2480..22d013ac7 100644 --- a/lib/Product.php +++ b/lib/Product.php @@ -20,6 +20,8 @@ * @property mixed $package_dimensions * @property bool $shippable * @property Collection $skus + * @property string $statement_descriptor + * @property string $type * @property int $updated * @property string $url * diff --git a/lib/RecipientTransfer.php b/lib/RecipientTransfer.php index f4e46db38..713752e8b 100644 --- a/lib/RecipientTransfer.php +++ b/lib/RecipientTransfer.php @@ -20,7 +20,7 @@ * @property string $failure_code * @property string $failure_message * @property bool $livemode - * @property mixed $metadata + * @property AttachedObject $metadata * @property string $method * @property string $recipient * @property mixed $reversals diff --git a/lib/Subscription.php b/lib/Subscription.php index 260521a60..b7257cebf 100644 --- a/lib/Subscription.php +++ b/lib/Subscription.php @@ -21,7 +21,7 @@ * @property Collection $items * @property boolean $livemode * @property AttachedObject $metadata - * @property mixed $plan + * @property Plan $plan * @property int $quantity * @property int $start * @property string $status diff --git a/lib/SubscriptionItem.php b/lib/SubscriptionItem.php index 74e1c3990..10e252c3b 100644 --- a/lib/SubscriptionItem.php +++ b/lib/SubscriptionItem.php @@ -9,7 +9,7 @@ * @property string $object * @property int $created * @property AttachedObject $metadata - * @property mixed $plan + * @property Plan $plan * @property int $quantity * @property string $subscription * From e6a42679f9ded1c4a73a87aeea4f3750a9f29b15 Mon Sep 17 00:00:00 2001 From: Nicolai Cornelis Date: Wed, 7 Feb 2018 15:42:09 +0100 Subject: [PATCH 2/3] Added phpdocs to CountrySpec class --- lib/CountrySpec.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/CountrySpec.php b/lib/CountrySpec.php index 81bf54b90..5d079c35c 100644 --- a/lib/CountrySpec.php +++ b/lib/CountrySpec.php @@ -5,6 +5,14 @@ /** * Class CountrySpec * + * @property string $id + * @property string $object + * @property string $default_currency + * @property mixed supported_bank_account_currencies + * @property string[] supported_payment_currencies + * @property string[] supported_payment_methods + * @property mixed verification_fields + * * @package Stripe */ class CountrySpec extends ApiResource From b2d81898ec18e3821cdad2e27d073895e16334ba Mon Sep 17 00:00:00 2001 From: Nicolai Cornelis Date: Wed, 7 Feb 2018 15:44:03 +0100 Subject: [PATCH 3/3] forgot $ prefixes --- lib/CountrySpec.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/CountrySpec.php b/lib/CountrySpec.php index 5d079c35c..5a4ee8a0f 100644 --- a/lib/CountrySpec.php +++ b/lib/CountrySpec.php @@ -8,10 +8,10 @@ * @property string $id * @property string $object * @property string $default_currency - * @property mixed supported_bank_account_currencies - * @property string[] supported_payment_currencies - * @property string[] supported_payment_methods - * @property mixed verification_fields + * @property mixed $supported_bank_account_currencies + * @property string[] $supported_payment_currencies + * @property string[] $supported_payment_methods + * @property mixed $verification_fields * * @package Stripe */