Skip to content

Commit

Permalink
Add descriptions for API resource fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe committed Feb 7, 2020
1 parent f636532 commit 32c65f7
Show file tree
Hide file tree
Showing 60 changed files with 970 additions and 928 deletions.
42 changes: 23 additions & 19 deletions lib/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@
/**
* Class Account
*
* @property string $id
* @property string $object
* @property \Stripe\StripeObject|null $business_profile
* @property string|null $business_type
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property \Stripe\StripeObject|null $business_profile Business information about the account.
* @property string|null $business_type The business type.
* @property \Stripe\StripeObject $capabilities
* @property bool $charges_enabled
* @property bool $charges_enabled Whether the account can create live charges.
* @property \Stripe\StripeObject $company
* @property string $country
* @property int $created
* @property string $default_currency
* @property bool $details_submitted
* @property string|null $email
* @property \Stripe\Collection $external_accounts
* @property string $country The account's country.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that <a href="https://stripe.com/docs/payouts">Stripe supports in the account's country</a>.
* @property bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.
* @property string|null $email The primary user's email address.
* @property \Stripe\Collection $external_accounts External accounts (bank accounts and debit cards) currently attached to this account
* @property \Stripe\Person $individual
* @property \Stripe\StripeObject $metadata
* @property bool $payouts_enabled
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property bool $payouts_enabled Whether Stripe can send payouts to this account.
* @property \Stripe\StripeObject $requirements
* @property \Stripe\StripeObject|null $settings
* @property \Stripe\StripeObject|null $settings Options for customizing how the account functions within Stripe.
* @property \Stripe\StripeObject $tos_acceptance
* @property string $type
* @property string $type The Stripe account type. Can be <code>standard</code>, <code>express</code>, or <code>custom</code>.
*
* @package Stripe
*/
Expand All @@ -44,14 +44,16 @@ class Account extends ApiResource

/**
* Possible string representations of an account's business type.
* @link https://stripe.com/docs/api/accounts/object#account_object-business_type
*
* @see https://stripe.com/docs/api/accounts/object#account_object-business_type
*/
const BUSINESS_TYPE_COMPANY = 'company';
const BUSINESS_TYPE_INDIVIDUAL = 'individual';

/**
* Possible string representations of an account's capabilities.
* @link https://stripe.com/docs/api/accounts/object#account_object-capabilities
*
* @see https://stripe.com/docs/api/accounts/object#account_object-capabilities
*/
const CAPABILITY_CARD_PAYMENTS = 'card_payments';
const CAPABILITY_LEGACY_PAYMENTS = 'legacy_payments';
Expand All @@ -60,15 +62,17 @@ class Account extends ApiResource

/**
* Possible string representations of an account's capability status.
* @link https://stripe.com/docs/api/accounts/object#account_object-capabilities
*
* @see https://stripe.com/docs/api/accounts/object#account_object-capabilities
*/
const CAPABILITY_STATUS_ACTIVE = 'active';
const CAPABILITY_STATUS_INACTIVE = 'inactive';
const CAPABILITY_STATUS_PENDING = 'pending';

/**
* Possible string representations of an account's type.
* @link https://stripe.com/docs/api/accounts/object#account_object-type
*
* @see https://stripe.com/docs/api/accounts/object#account_object-type
*/
const TYPE_CUSTOM = 'custom';
const TYPE_EXPRESS = 'express';
Expand Down
8 changes: 4 additions & 4 deletions lib/AccountLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
/**
* Class AccountLink
*
* @property string $object
* @property int $created
* @property int $expires_at
* @property string $url
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property int $expires_at The timestamp at which this account link will expire.
* @property string $url The URL for the account link.
*
* @package Stripe
*/
Expand Down
8 changes: 4 additions & 4 deletions lib/ApplePayDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
/**
* Class ApplePayDomain
*
* @property string $id
* @property string $object
* @property int $created
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $domain_name
* @property bool $livemode
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
*
* @package Stripe
*/
Expand Down
28 changes: 14 additions & 14 deletions lib/ApplicationFee.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
/**
* Class ApplicationFee
*
* @property string $id
* @property string $object
* @property string|\Stripe\Account $account
* @property int $amount
* @property int $amount_refunded
* @property string|\Stripe\StripeObject $application
* @property string|\Stripe\BalanceTransaction|null $balance_transaction
* @property string|\Stripe\Charge $charge
* @property int $created
* @property string $currency
* @property bool $livemode
* @property string|\Stripe\Charge|null $originating_transaction
* @property bool $refunded
* @property \Stripe\Collection $refunds
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property string|\Stripe\Account $account ID of the Stripe account this fee was taken from.
* @property int $amount Amount earned, in %s.
* @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued)
* @property string|\Stripe\StripeObject $application ID of the Connect application that earned the fee.
* @property string|\Stripe\BalanceTransaction|null $balance_transaction Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).
* @property string|\Stripe\Charge $charge ID of the charge that the application fee was taken from.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property string|\Stripe\Charge|null $originating_transaction ID of the corresponding charge on the platform account, if this fee was the result of a charge using the <code>destination</code> parameter.
* @property bool $refunded Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.
* @property \Stripe\Collection $refunds A list of refunds that have been applied to the fee.
*
* @package Stripe
*/
Expand Down
10 changes: 5 additions & 5 deletions lib/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
/**
* Class Balance
*
* @property string $object
* @property \Stripe\StripeObject[] $available
* @property \Stripe\StripeObject[] $connect_reserved
* @property bool $livemode
* @property \Stripe\StripeObject[] $pending
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property \Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the <a href="#transfers">Transfers API</a> or <a href="#payouts">Payouts API</a>. The available balance for each currency and payment type can be found in the <code>source_types</code> property.
* @property \Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the <code>source_types</code> property.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property \Stripe\StripeObject[] $pending Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the <code>source_types</code> property.
*
* @package Stripe
*/
Expand Down
33 changes: 17 additions & 16 deletions lib/BalanceTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
/**
* Class BalanceTransaction
*
* @property string $id
* @property string $object
* @property int $amount
* @property int $available_on
* @property int $created
* @property string $currency
* @property string|null $description
* @property float|null $exchange_rate
* @property int $fee
* @property \Stripe\StripeObject[] $fee_details
* @property int $net
* @property string $reporting_category
* @property string|\Stripe\StripeObject|null $source
* @property string $status
* @property string $type
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property int $amount Gross amount of the transaction, in %s.
* @property int $available_on The date the transaction's net funds will become available in the Stripe balance.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
* @property string|null $description An arbitrary string attached to the object. Often useful for displaying to users.
* @property float|null $exchange_rate The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the <code>amount</code> in currency A, times <code>exchange_rate</code>, would be the <code>amount</code> in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's <code>amount</code> would be <code>1000</code> and <code>currency</code> would be <code>eur</code>. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's <code>amount</code> would be <code>1234</code>, <code>currency</code> would be <code>usd</code>, and <code>exchange_rate</code> would be <code>1.234</code>.
* @property int $fee Fees (in %s) paid for this transaction.
* @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in %s) paid for this transaction.
* @property int $net Net amount of the transaction, in %s.
* @property string $reporting_category <a href="https://stripe.com/docs/reports/reporting-categories">Learn more</a> about how reporting categories can help you understand balance transactions from an accounting perspective.
* @property string|\Stripe\StripeObject|null $source The Stripe object to which this transaction is related.
* @property string $status If the transaction's net funds are available in the Stripe balance yet. Either <code>available</code> or <code>pending</code>.
* @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>connect_collection_transfer</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_transaction</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_refund</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. <a href="https://stripe.com/docs/reports/balance-transaction-types">Learn more</a> about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider <code>reporting_category</code> instead.
*
* @package Stripe
*/
Expand All @@ -32,7 +32,8 @@ class BalanceTransaction extends ApiResource

/**
* Possible string representations of the type of balance transaction.
* @link https://stripe.com/docs/api/balance/balance_transaction#balance_transaction_object-type
*
* @see https://stripe.com/docs/api/balance/balance_transaction#balance_transaction_object-type
*/
const TYPE_ADJUSTMENT = 'adjustment';
const TYPE_ADVANCE = 'advance';
Expand Down
33 changes: 17 additions & 16 deletions lib/BankAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
/**
* Class BankAccount
*
* @property string $id
* @property string $object
* @property string|\Stripe\Account|null $account
* @property string|null $account_holder_name
* @property string|null $account_holder_type
* @property string|null $bank_name
* @property string $country
* @property string $currency
* @property string|\Stripe\Customer|null $customer
* @property bool|null $default_for_currency
* @property string|null $fingerprint
* @property string $last4
* @property \Stripe\StripeObject|null $metadata
* @property string|null $routing_number
* @property string $status
* @property string $id Unique identifier for the object.
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property string|\Stripe\Account|null $account The ID of the account that the bank account is associated with.
* @property string|null $account_holder_name The name of the person or business that owns the bank account.
* @property string|null $account_holder_type The type of entity that holds the account. This can be either <code>individual</code> or <code>company</code>.
* @property string|null $bank_name Name of the bank associated with the routing number (e.g., <code>WELLS FARGO</code>).
* @property string $country Two-letter ISO code representing the country the bank account is located in.
* @property string $currency Three-letter <a href="https://stripe.com/docs/payouts">ISO code for the currency</a> paid out to the bank account.
* @property string|\Stripe\Customer|null $customer The ID of the customer that the bank account is associated with.
* @property bool|null $default_for_currency Whether this bank account is the default external account for its currency.
* @property string|null $fingerprint Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
* @property string $last4 The last four digits of the bank account number.
* @property \Stripe\StripeObject|null $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property string|null $routing_number The routing transit number for the bank account.
* @property string $status <p>For bank accounts, possible values are <code>new</code>, <code>validated</code>, <code>verified</code>, <code>verification_failed</code>, or <code>errored</code>. A bank account that hasn't had any activity or validation performed is <code>new</code>. If Stripe can determine that the bank account exists, its status will be <code>validated</code>. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be <code>verified</code>. If the verification failed for any reason, such as microdeposit failure, the status will be <code>verification_failed</code>. If a transfer sent to this bank account fails, we'll set the status to <code>errored</code> and will not continue to send transfers until the bank details are updated.</p><p>For external accounts, possible values are <code>new</code> and <code>errored</code>. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to <code>errored</code> and transfers are stopped until account details are updated.</p>
*
* @package Stripe
*/
Expand All @@ -32,7 +32,8 @@ class BankAccount extends ApiResource

/**
* Possible string representations of the bank verification status.
* @link https://stripe.com/docs/api/external_account_bank_accounts/object#account_bank_account_object-status
*
* @see https://stripe.com/docs/api/external_account_bank_accounts/object#account_bank_account_object-status
*/
const STATUS_NEW = 'new';
const STATUS_VALIDATED = 'validated';
Expand Down

0 comments on commit 32c65f7

Please sign in to comment.