Class: Stripe::V2::Billing::CadenceCreateParams::BillingCycle

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

Defined Under Namespace

Classes: Day, Month, Week, Year

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(day: nil, interval_count: nil, month: nil, type: nil, week: nil, year: nil) ⇒ BillingCycle

Returns a new instance of BillingCycle.



167
168
169
170
171
172
173
174
# File 'lib/stripe/params/v2/billing/cadence_create_params.rb', line 167

def initialize(day: nil, interval_count: nil, month: nil, type: nil, week: nil, year: nil)
  @day = day
  @interval_count = interval_count
  @month = month
  @type = type
  @week = week
  @year = year
end

Instance Attribute Details

#dayObject

Specific configuration for determining billing dates when type=day.



153
154
155
# File 'lib/stripe/params/v2/billing/cadence_create_params.rb', line 153

def day
  @day
end

#interval_countObject

The number of intervals (specified in the interval attribute) between cadence billings. For example, type=month and interval_count=3 bills every 3 months. If this is not provided, it will default to 1.



157
158
159
# File 'lib/stripe/params/v2/billing/cadence_create_params.rb', line 157

def interval_count
  @interval_count
end

#monthObject

Specific configuration for determining billing dates when type=month.



159
160
161
# File 'lib/stripe/params/v2/billing/cadence_create_params.rb', line 159

def month
  @month
end

#typeObject

The frequency at which a cadence bills.



161
162
163
# File 'lib/stripe/params/v2/billing/cadence_create_params.rb', line 161

def type
  @type
end

#weekObject

Specific configuration for determining billing dates when type=week.



163
164
165
# File 'lib/stripe/params/v2/billing/cadence_create_params.rb', line 163

def week
  @week
end

#yearObject

Specific configuration for determining billing dates when type=year.



165
166
167
# File 'lib/stripe/params/v2/billing/cadence_create_params.rb', line 165

def year
  @year
end