Class: Chargify::Customer

Inherits:
Base
  • Object
show all
Defined in:
lib/chargify_api_ares/resources/customer.rb

Defined Under Namespace

Classes: Subscription

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

element_name, #to_xml

Class Method Details

.find_by_reference(reference) ⇒ Object



3
4
5
# File 'lib/chargify_api_ares/resources/customer.rb', line 3

def self.find_by_reference(reference)
  find(:one, :from => :lookup, :params => {:reference => reference})
end

Instance Method Details

#payment_profiles(params = {}) ⇒ Object



16
17
18
19
# File 'lib/chargify_api_ares/resources/customer.rb', line 16

def payment_profiles(params = {})
  params.merge!({:customer_id => self.id})
  PaymentProfile.find(:all, :params => params)
end

#subscriptions(params = {}) ⇒ Object



11
12
13
14
# File 'lib/chargify_api_ares/resources/customer.rb', line 11

def subscriptions(params = {})
  params.merge!({:customer_id => self.id})
  Subscription.find(:all, :params => params)
end