Class: Stripe::PromotionCodeService::UpdateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::PromotionCodeService::UpdateParams
- Defined in:
- lib/stripe/services/promotion_code_service.rb
Defined Under Namespace
Classes: Restrictions
Instance Attribute Summary collapse
-
#active ⇒ Object
Whether the promotion code is currently active.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#restrictions ⇒ Object
Settings that restrict the redemption of the promotion code.
Instance Method Summary collapse
-
#initialize(active: nil, expand: nil, metadata: nil, restrictions: nil) ⇒ UpdateParams
constructor
A new instance of UpdateParams.
Methods inherited from RequestParams
Constructor Details
#initialize(active: nil, expand: nil, metadata: nil, restrictions: nil) ⇒ UpdateParams
Returns a new instance of UpdateParams.
184 185 186 187 188 189 |
# File 'lib/stripe/services/promotion_code_service.rb', line 184 def initialize(active: nil, expand: nil, metadata: nil, restrictions: nil) @active = active @expand = @metadata = @restrictions = restrictions end |
Instance Attribute Details
#active ⇒ Object
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.
176 177 178 |
# File 'lib/stripe/services/promotion_code_service.rb', line 176 def active @active end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
178 179 180 |
# File 'lib/stripe/services/promotion_code_service.rb', line 178 def @expand end |
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.
180 181 182 |
# File 'lib/stripe/services/promotion_code_service.rb', line 180 def @metadata end |
#restrictions ⇒ Object
Settings that restrict the redemption of the promotion code.
182 183 184 |
# File 'lib/stripe/services/promotion_code_service.rb', line 182 def restrictions @restrictions end |