Class: Stripe::CouponCreateParams::ServicePeriod

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/coupon_create_params.rb

Defined Under Namespace

Classes: Iterations

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(interval: nil, interval_count: nil, iterations: nil) ⇒ ServicePeriod

Returns a new instance of ServicePeriod.



55
56
57
58
59
# File 'lib/stripe/params/coupon_create_params.rb', line 55

def initialize(interval: nil, interval_count: nil, iterations: nil)
  @interval = interval
  @interval_count = interval_count
  @iterations = iterations
end

Instance Attribute Details

#intervalObject

Specifies coupon frequency. Either ‘day`, `week`, `month` or `year`.



49
50
51
# File 'lib/stripe/params/coupon_create_params.rb', line 49

def interval
  @interval
end

#interval_countObject

The number of intervals for which the coupon will be applied.



51
52
53
# File 'lib/stripe/params/coupon_create_params.rb', line 51

def interval_count
  @interval_count
end

#iterationsObject

Specifies the number of times the coupon is contiguously applied.



53
54
55
# File 'lib/stripe/params/coupon_create_params.rb', line 53

def iterations
  @iterations
end