-
Notifications
You must be signed in to change notification settings - Fork 850
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate Discount, SourceTransaction and use sections in more places (#…
- Loading branch information
1 parent
7d0a907
commit 4a9474e
Showing
6 changed files
with
189 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe; | ||
|
||
/** | ||
* Class Discount. | ||
* A discount represents the actual application of a <a href="https://stripe.com/docs/api#coupons">coupon</a> or <a href="https://stripe.com/docs/api#promotion_codes">promotion code</a>. | ||
* It contains information about when the discount began, when it will end, and what it is applied to. | ||
* | ||
* Related guide: <a href="https://stripe.com/docs/billing/subscriptions/discounts">Applying discounts to subscriptions</a> | ||
* | ||
* @property string $id The ID of the discount object. Discounts cannot be fetched by ID. Use <code>expand[]=discounts</code> in API calls to expand discount IDs in an array. | ||
* @property string $object String representing the object's type. Objects of the same type share the same value. | ||
* @property null|string $checkout_session The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. | ||
* @property \Stripe\Coupon $coupon Hash describing the coupon applied to create this discount. | ||
* @property string|\Stripe\Customer $customer The ID of the customer associated with this discount. | ||
* @property null|int $end If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null. | ||
* @property string $id The ID of the discount object. | ||
* @property null|string $invoice The invoice that the discount’s coupon was applied to, if it was applied directly to a particular invoice. | ||
* @property null|string $invoice_item The invoice item id (or invoice line item id for invoice line items of type=‘subscription’) that the discount’s coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. | ||
* @property string $object String representing the object’s type. Objects of the same type share the same value. | ||
* @property null|string $promotion_code The promotion code applied to create this discount. | ||
* @property \Stripe\Coupon $coupon A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to <a href="https://stripe.com/docs/api#subscriptions">subscriptions</a>, <a href="https://stripe.com/docs/api#invoices">invoices</a>, <a href="https://stripe.com/docs/api/checkout/sessions">checkout sessions</a>, <a href="https://stripe.com/docs/api#quotes">quotes</a>, and more. Coupons do not work with conventional one-off <a href="https://stripe.com/docs/api#create_charge">charges</a> or <a href="https://stripe.com/docs/api/payment_intents">payment intents</a>. | ||
* @property null|string|\Stripe\Customer $customer The ID of the customer associated with this discount. | ||
* @property null|int $end If the coupon has a duration of <code>repeating</code>, the date that this discount will end. If the coupon has a duration of <code>once</code> or <code>forever</code>, this attribute will be null. | ||
* @property null|string $invoice The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. | ||
* @property null|string $invoice_item The invoice item <code>id</code> (or invoice line item <code>id</code> for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. | ||
* @property null|string|\Stripe\PromotionCode $promotion_code The promotion code applied to create this discount. | ||
* @property int $start Date that the coupon was applied. | ||
* @property null|string $subscription The subscription that this coupon is applied to, if it is applied to a particular subscription. | ||
*/ | ||
class Discount extends StripeObject | ||
class Discount extends ApiResource | ||
{ | ||
const OBJECT_NAME = 'discount'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,48 @@ | ||
<?php | ||
|
||
// File generated from our OpenAPI spec | ||
|
||
namespace Stripe; | ||
|
||
/** | ||
* Class SourceTransaction. | ||
* Some payment methods have no required amount that a customer must send. | ||
* Customers can be instructed to send any amount, and it can be made up of | ||
* multiple transactions. As such, sources can have multiple associated | ||
* transactions. | ||
* | ||
* @property string $id | ||
* @property string $object | ||
* @property \Stripe\StripeObject $ach_credit_transfer | ||
* @property int $amount | ||
* @property int $created | ||
* @property string $customer_data | ||
* @property string $currency | ||
* @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 null|\Stripe\StripeObject $ach_credit_transfer | ||
* @property int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. | ||
* @property null|\Stripe\StripeObject $chf_credit_transfer | ||
* @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 null|\Stripe\StripeObject $gbp_credit_transfer | ||
* @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 null|\Stripe\StripeObject $paper_check | ||
* @property null|\Stripe\StripeObject $sepa_credit_transfer | ||
* @property string $source The ID of the source this transaction is attached to. | ||
* @property string $status The status of the transaction, one of <code>succeeded</code>, <code>pending</code>, or <code>failed</code>. | ||
* @property string $type The type of source this transaction is attached to. | ||
*/ | ||
class SourceTransaction extends ApiResource | ||
{ | ||
const OBJECT_NAME = 'source_transaction'; | ||
|
||
const TYPE_ACH_CREDIT_TRANSFER = 'ach_credit_transfer'; | ||
const TYPE_ACH_DEBIT = 'ach_debit'; | ||
const TYPE_ALIPAY = 'alipay'; | ||
const TYPE_BANCONTACT = 'bancontact'; | ||
const TYPE_CARD = 'card'; | ||
const TYPE_CARD_PRESENT = 'card_present'; | ||
const TYPE_EPS = 'eps'; | ||
const TYPE_GIROPAY = 'giropay'; | ||
const TYPE_IDEAL = 'ideal'; | ||
const TYPE_KLARNA = 'klarna'; | ||
const TYPE_MULTIBANCO = 'multibanco'; | ||
const TYPE_P24 = 'p24'; | ||
const TYPE_SEPA_DEBIT = 'sepa_debit'; | ||
const TYPE_SOFORT = 'sofort'; | ||
const TYPE_THREE_D_SECURE = 'three_d_secure'; | ||
const TYPE_WECHAT = 'wechat'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.