Sha256: 405f18b52050d1b95f91e7dad5db8969c662ff304b06eac65efe719837696e61

Contents?: true

Size: 1.12 KB

Versions: 8

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

module ChartMogul
  module Metrics
    module Customers
      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::Customers::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
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
chartmogul-ruby-3.3.0 lib/chartmogul/metrics/customers/subscription.rb
chartmogul-ruby-3.2.0 lib/chartmogul/metrics/customers/subscription.rb
chartmogul-ruby-3.1.0 lib/chartmogul/metrics/customers/subscription.rb
chartmogul-ruby-3.0.2 lib/chartmogul/metrics/customers/subscription.rb
chartmogul-ruby-3.0.0 lib/chartmogul/metrics/customers/subscription.rb
chartmogul-ruby-2.9.0 lib/chartmogul/metrics/customers/subscription.rb
chartmogul-ruby-2.1.0 lib/chartmogul/metrics/customers/subscription.rb
chartmogul-ruby-2.0.0 lib/chartmogul/metrics/customers/subscription.rb