Sha256: 08396cc4b45c809f2603207994c6829cbdcbc806d0596f6860c522c9c7228ef5

Contents?: true

Size: 1.03 KB

Versions: 11

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

module ChartMogul
  module Metrics
    class Subscription < ChartMogul::Object
      readonly_attr :id
      readonly_attr :external_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

11 entries across 11 versions & 1 rubygems

Version Path
chartmogul-ruby-1.7.3 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.7.2 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.7.1 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.6.9 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.6.8 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.6.7 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.6.6 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.6.4 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.6.3 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.6.2 lib/chartmogul/metrics/subscription.rb
chartmogul-ruby-1.6.1 lib/chartmogul/metrics/subscription.rb