Sha256: e36a0ecffb1d8f5f3d90c559a42a4466c87438e90f794a29254d2dcc2e5057c7

Contents?: true

Size: 544 Bytes

Versions: 18

Compression:

Stored size: 544 Bytes

Contents

module Chargify
  class Customer < Base
    def self.find_by_reference(reference)
      find(:one, :from => :lookup, :params => {:reference => reference})
    end

    class Subscription < Base
      self.prefix = "/customers/:customer_id/"
    end

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

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

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
chargify_api_ares-1.3.3 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.3.2 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.3.1 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.3.0 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.2.1 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.1.0 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.1.0.pre lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.0.5 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.0.4 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.0.3 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.0.2 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.0.1 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-1.0.0 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-0.6.1 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-0.6.0 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-0.5.4 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-0.5.2 lib/chargify_api_ares/resources/customer.rb
chargify_api_ares-0.5.1 lib/chargify_api_ares/resources/customer.rb