Permalink
Browse files

Add some missing attributes to resources

  • Loading branch information...
1 parent 242d25a commit fa04df7f6d989e96bcc8e625eff188e2bdb92f9c @hmarr hmarr committed Jun 19, 2012
Showing with 21 additions and 10 deletions.
  1. +2 −1 lib/gocardless/bill.rb
  2. +9 −6 lib/gocardless/merchant.rb
  3. +3 −1 lib/gocardless/pre_authorization.rb
  4. +7 −2 lib/gocardless/subscription.rb
View
3 lib/gocardless/bill.rb
@@ -8,7 +8,8 @@ class Bill < Resource
:source_type,
:description,
:name,
- :plan_id
+ :plan_id,
+ :status
# @attribute source_id
# @return [String] the ID of the bill's source (eg subscription, pre_authorization)
View
15 lib/gocardless/merchant.rb
@@ -2,12 +2,15 @@ module GoCardless
class Merchant < Resource
self.endpoint = '/merchants/:id'
- attr_accessor :name
- attr_accessor :description
- attr_accessor :email
- attr_accessor :first_name
- attr_accessor :last_name
- date_accessor :created_at
+ attr_accessor :name,
+ :description,
+ :email,
+ :first_name,
+ :last_name,
+ :balance,
+ :pending_balance,
+ :next_payout_amount
+ date_accessor :created_at, :next_payout_date
def subscriptions(params = {})
path = "/merchants/#{self.id}/subscriptions"
View
4 lib/gocardless/pre_authorization.rb
@@ -10,7 +10,9 @@ class PreAuthorization < Resource
:name,
:description,
:plan_id,
- :status
+ :status,
+ :remaining_amount,
+ :next_interval_start
reference_accessor :merchant_id, :user_id
date_accessor :expires_at, :created_at
View
9 lib/gocardless/subscription.rb
@@ -9,11 +9,16 @@ class Subscription < Resource
:interval_unit,
:name,
:description,
- :plan_id
+ :plan_id,
+ :status,
+ :setup_fee,
+ :trial_length,
+ :trial_unit,
+ :next_interval_start
reference_accessor :merchant_id, :user_id
- date_accessor :expires_at, :created_at
+ date_accessor :start_at, :expires_at, :created_at
def cancel!

0 comments on commit fa04df7

Please sign in to comment.