Class: Stripe::PromotionCode::UpdateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/promotion_code.rb

Defined Under Namespace

Classes: Restrictions

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(active: nil, expand: nil, metadata: nil, restrictions: nil) ⇒ UpdateParams

Returns a new instance of UpdateParams.



204
205
206
207
208
209
# File 'lib/stripe/resources/promotion_code.rb', line 204

def initialize(active: nil, expand: nil, metadata: nil, restrictions: nil)
  @active = active
  @expand = expand
  @metadata = 
  @restrictions = restrictions
end

Instance Attribute Details

#activeObject

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.



196
197
198
# File 'lib/stripe/resources/promotion_code.rb', line 196

def active
  @active
end

#expandObject

Specifies which fields in the response should be expanded.



198
199
200
# File 'lib/stripe/resources/promotion_code.rb', line 198

def expand
  @expand
end

#metadataObject

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`.



200
201
202
# File 'lib/stripe/resources/promotion_code.rb', line 200

def 
  @metadata
end

#restrictionsObject

Settings that restrict the redemption of the promotion code.



202
203
204
# File 'lib/stripe/resources/promotion_code.rb', line 202

def restrictions
  @restrictions
end