Sha256: b63a73809da01bd5d2a7be76b98fd997f183ffb6a0c34386a6b0c8582eed400c

Contents?: true

Size: 773 Bytes

Versions: 7

Compression:

Stored size: 773 Bytes

Contents

# frozen_string_literal: true

module ChartMogul
  module PlanGroups
    class Plans < APIResource
      set_resource_name 'Plans'
      set_resource_path '/v1/plan_groups/:plan_group_uuid/plans'

      set_resource_root_key :plans

      include Concerns::Entries
      include Concerns::Pageable2
      include Concerns::PageableWithCursor
      include API::Actions::Custom

      set_entry_class Plan

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

      def next(plan_group_uuid, options = {})
        path = ChartMogul::ResourcePath.new("/v1/plan_groups/#{plan_group_uuid}/plans")
        custom!(:get, path.apply_with_get_params(options.merge(cursor: cursor)))
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
chartmogul-ruby-4.6.0 lib/chartmogul/plan_groups/plans.rb
chartmogul-ruby-4.4.0 lib/chartmogul/plan_groups/plans.rb
chartmogul-ruby-4.3.0 lib/chartmogul/plan_groups/plans.rb
chartmogul-ruby-4.2.0 lib/chartmogul/plan_groups/plans.rb
chartmogul-ruby-4.1.0 lib/chartmogul/plan_groups/plans.rb
chartmogul-ruby-4.0.0 lib/chartmogul/plan_groups/plans.rb
chartmogul-ruby-3.3.1 lib/chartmogul/plan_groups/plans.rb