Class: Stripe::V2::Billing::CadenceService::CreateParams::BillingCycle

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

Defined Under Namespace

Classes: Day, Month, Week, Year

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(interval_count: nil, type: nil, day: nil, month: nil, week: nil, year: nil) ⇒ BillingCycle

Returns a new instance of BillingCycle.



193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/stripe/services/v2/billing/cadence_service.rb', line 193

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

Instance Attribute Details

#dayObject

Specific configuration for determining billing dates when type=day.



185
186
187
# File 'lib/stripe/services/v2/billing/cadence_service.rb', line 185

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.



181
182
183
# File 'lib/stripe/services/v2/billing/cadence_service.rb', line 181

def interval_count
  @interval_count
end

#monthObject

Specific configuration for determining billing dates when type=month.



187
188
189
# File 'lib/stripe/services/v2/billing/cadence_service.rb', line 187

def month
  @month
end

#typeObject

The frequency at which a cadence bills.



183
184
185
# File 'lib/stripe/services/v2/billing/cadence_service.rb', line 183

def type
  @type
end

#weekObject

Specific configuration for determining billing dates when type=week.



189
190
191
# File 'lib/stripe/services/v2/billing/cadence_service.rb', line 189

def week
  @week
end

#yearObject

Specific configuration for determining billing dates when type=year.



191
192
193
# File 'lib/stripe/services/v2/billing/cadence_service.rb', line 191

def year
  @year
end