kfrancis/chargify-dot-net

Make NextBillingAt nullable on CreateSubscription?

bevnetcraven opened this issue · 3 comments

Per the chargify API, this is an optional parameter: https://docs.chargify.com/api-subscriptions (scroll to "next_billing_at)

This is actually pretty important in that a null value collects payment immediately / when the subscription is created. If this value is set (event to a date in the past), there's a delay.

Any chance you can change this to be DateTime? in the applicable methods? I'm particularly interested in the one that takes in a paymentProfileID.

PS -- Thanks for adding the payment profile stuff so quickly!!

Ok, so looking at the source it seems as though passing in DateTime.MinValue achieves the desired result.

I tried to use a known value for all items for that purpose, rather than play with nullable objects (minus string, of course). Mostly because I didn't want to deal with the parsing of nulls.

Oh, and you're welcome!