Sha256: 1301e6d7cada047a380c7e074ad04bdeb3ad041e80b35099f851896499c2aaf6

Contents?: true

Size: 991 Bytes

Versions: 6

Compression:

Stored size: 991 Bytes

Contents

module ChartMogul
  module Metrics
    class Subscription < ChartMogul::Object
      readonly_attr :id
      readonly_attr :plan
      readonly_attr :quantity
      readonly_attr :mrr
      readonly_attr :arr
      readonly_attr :status
      readonly_attr :billing_cycle
      readonly_attr :billing_cycle_count
      readonly_attr :start_date, type: :time
      readonly_attr :end_date, type: :time
      readonly_attr :currency
      readonly_attr :currency_sign

      def self.all(customer_uuid, options = {})
        ChartMogul::Metrics::Subscriptions.all(customer_uuid, options)
      end
    end

    class Subscriptions < APIResource
      set_resource_name 'Subscriptions'
      set_resource_path '/v1/customers/:customer_uuid/subscriptions'

      include Concerns::Entries
      include Concerns::Pageable

      set_entry_class Subscription

      def self.all(customer_uuid, options = {})
        super(options.merge(customer_uuid: customer_uuid))
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
chartmogul-ruby-1.0.2 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.0.1 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.0.0 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-0.1.4 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-0.1.3 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-0.1.2 lib/chartmogul/metrics/subscription.rb