lib/mollie/customer/subscription.rb in mollie-api-ruby-4.1.1 vs lib/mollie/customer/subscription.rb in mollie-api-ruby-4.1.2
- old
+ new
@@ -12,13 +12,16 @@
:mode,
:created_at,
:status,
:amount,
:times,
+ :times_remaining,
:interval,
+ :next_payment_date,
:description,
:method,
+ :mandate_id,
:canceled_at,
:webhook_url
def active?
status == STATUS_ACTIVE
@@ -60,9 +63,17 @@
@amount = Mollie::Amount.new(amount)
end
def times=(times)
@times = times.to_i
+ end
+
+ def next_payment_date=(next_payment_date)
+ @next_payment_date = begin
+ Date.parse(next_payment_date)
+ rescue StandardError
+ nil
+ end
end
def customer(options = {})
Customer.get(customer_id, options)
end