Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Use date_accessor to define next_interval_start methods #27

Merged
merged 1 commit into from over 1 year ago

2 participants

Tim Craft Harry Marr
Tim Craft

The next_interval_start methods on subscription and pre-auth classes are currently defined using attr_accessor instead of date_accessor.

Values can potentially be null/nil, but date_accessor appears to handle that already (it will only parse strings to DateTime.parse).

Cheers,
Tim

Harry Marr hmarr merged commit 384aba1 into from
Harry Marr hmarr closed this
Harry Marr
Owner

Thanks - pushed out v1.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 29, 2012
Tim Craft timcraft Use date_accessor to define next_interval_start methods c0c75e4
This page is out of date. Refresh to see the latest.
6 lib/gocardless/pre_authorization.rb
@@ -11,11 +11,11 @@ class PreAuthorization < Resource
11 11 :description,
12 12 :plan_id,
13 13 :status,
14   - :remaining_amount,
15   - :next_interval_start
  14 + :remaining_amount
16 15
17 16 reference_accessor :merchant_id, :user_id
18   - date_accessor :expires_at, :created_at
  17 +
  18 + date_accessor :expires_at, :created_at, :next_interval_start
19 19
20 20 # Create a new bill under this pre-authorization. Similar to
21 21 # {Client#create_bill}, but only requires the amount to be specified.
5 lib/gocardless/subscription.rb
@@ -13,12 +13,11 @@ class Subscription < Resource
13 13 :status,
14 14 :setup_fee,
15 15 :trial_length,
16   - :trial_unit,
17   - :next_interval_start
  16 + :trial_unit
18 17
19 18 reference_accessor :merchant_id, :user_id
20 19
21   - date_accessor :start_at, :expires_at, :created_at
  20 + date_accessor :start_at, :expires_at, :created_at, :next_interval_start
22 21
23 22
24 23 def cancel!

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.