Sha256: cd1d1246a0f45c7ee0991a7a2867eef43aa7ac7f850a36b601c2f3bd1dd8e223

Contents?: true

Size: 479 Bytes

Versions: 13

Compression:

Stored size: 479 Bytes

Contents

module Chargify
  class Invoice < Base

    def self.find_by_invoice_id(id)
      find(:first, {:params => {:id => id}})
    end

    def self.find_by_subscription_id(id)
      find(:all, {:params => {:subscription_id => id}})
    end

    def self.unpaid_from_subscription(subscription_id)
      find(:all, {:params => {:subscription_id => subscription_id, :state => "unpaid"}})
    end

    def self.unpaid
      find(:all, {:params => {:state => "unpaid"}})
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
chargify_api_ares-1.4.4 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.4.3 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.4.2 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.4.1 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.4.0 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.3.5 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.3.4 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.3.3 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.3.2 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.3.1 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.3.0 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.2.1 lib/chargify_api_ares/resources/invoice.rb
chargify_api_ares-1.1.0 lib/chargify_api_ares/resources/invoice.rb