Stripe::PromotionCodesApi
Constants
Constructors
Instance methods
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
Returns a list of your promotion codes.
@optional @param ending_before [String?] A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. @optional @param created [Stripe::GetAccountsCreatedParameter?] A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param active [Bool?] Filter promotion codes by whether they are active. @optional @param coupon [String?] Only return promotion codes for this coupon. @optional @param customer [String?] Only return promotion codes that are restricted to this customer. @optional @param code [String?] Only return promotion codes that have this case-insensitive code. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::PromotionCodesResourcePromotionCodeList]<p>Returns a list of your promotion codes.</p>
@optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.
@optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.
@optional @param created [Stripe::GetAccountsCreatedParameter?] A filter on the list, based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
@optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
@optional @param active [Bool?] Filter promotion codes by whether they are active.
@optional @param coupon [String?] Only return promotion codes for this coupon.
@optional @param customer [String?] Only return promotion codes that are restricted to this customer.
@optional @param code [String?] Only return promotion codes that have this case-insensitive code.
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return nil
Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.
<p>Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing <code>code</code> use <a href="/docs/api/promotion_codes/list">list</a> with the desired <code>code</code>.</p> @required @param promotion_code [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil
<p>Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing <code>code</code> use <a href="/docs/api/promotion_codes/list">list</a> with the desired <code>code</code>.</p> @required @param promotion_code [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::PromotionCode, Integer, Hash)] Stripe::PromotionCode, response status code and response headers
<p>Returns a list of your promotion codes.</p>
@optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.
@optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.
@optional @param created [Stripe::GetAccountsCreatedParameter?] A filter on the list, based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
@optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
@optional @param active [Bool?] Filter promotion codes by whether they are active.
@optional @param coupon [String?] Only return promotion codes for this coupon.
@optional @param customer [String?] Only return promotion codes that are restricted to this customer.
@optional @param code [String?] Only return promotion codes that have this case-insensitive code.
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return [Tuple(Stripe::PromotionCodesResourcePromotionCodeList, Integer, Hash)] Stripe::PromotionCodesResourcePromotionCodeList, response status code and response headers
A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
@required @param coupon [String?] The coupon for this promotion code. @optional @param active [Bool?] Whether the promotion code is currently active. @optional @param code [String?] The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. @optional @param customer [String?] The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param expires_at [Int32?] The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. @optional @param max_redemptions [Int32?] A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. @optional @param metadata [Hash(String, String)?] @optional @param restrictions [Stripe::RestrictionsParams?] @return [Stripe::PromotionCode]<p>A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.</p>
@required @param coupon [String?] The coupon for this promotion code.
@optional @param active [Bool?] Whether the promotion code is currently active.
@optional @param code [String?] The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically.
@optional @param customer [String?] The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param expires_at [Int32?] The timestamp at which this promotion code will expire. If the coupon has specified a redeems_by, then this value cannot be after the coupon's redeems_by.
@optional @param max_redemptions [Int32?] A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a max_redemptions, then this value cannot be greater than the coupon's max_redemptions.
@optional @param metadata [Hash(String, String)?]
@optional @param restrictions [Stripe::RestrictionsParams?]
@return nil
Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
@required @param promotion_code [String?] @optional @param active [Bool?] Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param restrictions [Stripe::RestrictionsParams?] @return [Stripe::PromotionCode]<p>Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.</p> @required @param promotion_code [String?] @optional @param active [Bool?] Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param restrictions [Stripe::RestrictionsParams?] @return nil
<p>Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.</p> @required @param promotion_code [String?] @optional @param active [Bool?] Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param restrictions [Stripe::RestrictionsParams?] @return [Tuple(Stripe::PromotionCode, Integer, Hash)] Stripe::PromotionCode, response status code and response headers
<p>A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.</p>
@required @param coupon [String?] The coupon for this promotion code.
@optional @param active [Bool?] Whether the promotion code is currently active.
@optional @param code [String?] The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically.
@optional @param customer [String?] The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param expires_at [Int32?] The timestamp at which this promotion code will expire. If the coupon has specified a redeems_by, then this value cannot be after the coupon's redeems_by.
@optional @param max_redemptions [Int32?] A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a max_redemptions, then this value cannot be greater than the coupon's max_redemptions.
@optional @param metadata [Hash(String, String)?]
@optional @param restrictions [Stripe::RestrictionsParams?]
@return [Tuple(Stripe::PromotionCode, Integer, Hash)] Stripe::PromotionCode, response status code and response headers