Method: AdvancedBilling::CalendarBilling#initialize

Defined in:
lib/advanced_billing/models/calendar_billing.rb

#initialize(snap_day: SKIP, calendar_billing_first_charge: SKIP, additional_properties: {}) ⇒ CalendarBilling

Returns a new instance of CalendarBilling.



44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/advanced_billing/models/calendar_billing.rb', line 44

def initialize(snap_day: SKIP, calendar_billing_first_charge: SKIP,
               additional_properties: {})
  # Add additional model properties to the instance.
  additional_properties.each do |_name, _value|
    instance_variable_set("@#{_name}", _value)
  end

  @snap_day = snap_day unless snap_day == SKIP
  unless calendar_billing_first_charge == SKIP
    @calendar_billing_first_charge =
      calendar_billing_first_charge
  end
end