Class: Stripe::V2::Billing::IntentCreateParams::Action::Apply::Discount

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/v2/billing/intent_create_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(coupon: nil, promotion_code: nil, type: nil) ⇒ Discount

Returns a new instance of Discount.



18
19
20
21
22
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 18

def initialize(coupon: nil, promotion_code: nil, type: nil)
  @coupon = coupon
  @promotion_code = promotion_code
  @type = type
end

Instance Attribute Details

#couponObject

The ID of the Coupon to apply.



12
13
14
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 12

def coupon
  @coupon
end

#promotion_codeObject

The ID of the PromotionCode to apply.



14
15
16
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 14

def promotion_code
  @promotion_code
end

#typeObject

Type of the discount.



16
17
18
# File 'lib/stripe/params/v2/billing/intent_create_params.rb', line 16

def type
  @type
end