List Plan Groups

Returns a list of plan_group objects in your ChartMogul account.

Examples
curl -X GET "https://api.chartmogul.com/v1/plan_groups?per_page=2" \
     -u YOUR_API_KEY:
ChartMogul::PlanGroup.all(page: 1, per_page: 200)
ChartMogul.PlanGroup.all(config, { page: 1, per_page: 20 } function (err, res) {
 // asynchronously called
});
<?php

ChartMogul\PlanGroup::all(["per_page" => 3]);
?>
api.ListPlanGroups(&cm.Cursor{PerPage: 200, Page: 1})
chartmogul.PlanGroup.all(config, page=1, per_page=20)
Result Format
{
  "plan_groups": [
    {
      "name": "Growth Plans",
      "uuid": "plg_3c2b0732-cff0-437f-9f8d-a575ccc8b7e9",
       "plans_count": 2
    },
    {
      "name": "Growth Plan Group",
       "uuid": "plg_1d960363-a335-4e21-90cd-f3686c143453",
       "plans_count": 6
    }
  ],
  "current_page": 1,
  "total_pages": 1
}
#<ChartMogul::PlanGroups:0x00000003eb9e18
 @plan_groups=
  [#<ChartMogul::PlanGroup:0x007fb4993f25a0 
    @uuid="plg_3c2b0732-cff0-437f-9f8d-a575ccc8b7e9",
    @name="Growth Plans", 
    @plans_count=2
    >,
    #<ChartMogul::PlanGroup:0x007fb4993f25a0 
    @uuid="plg_1d960363-a335-4e21-90cd-f3686c143453",
    @name="Growth Plan Group",
    @plans_count=6
    >
    ],
 @current_page=1,
 @total_pages=1>
{
  "plan_groups": [
    {
      "name": "Growth Plans",
      "uuid": "plg_3c2b0732-cff0-437f-9f8d-a575ccc8b7e9",
       "plans_count": 2
    },
    {
      "name": "Growth Plan Group",
       "uuid": "plg_1d960363-a335-4e21-90cd-f3686c143453",
       "plans_count": 6
    }
  ],
  "current_page": 1,
  "total_pages": 1
}
<?php

Doctrine\Common\Collections\ArrayCollection::__set_state(array(
   "elements" => 
  array (
    0 => 
    ChartMogul\PlanGroup::__set_state(array(
       "uuid" => "plg_eed05d54-75b4-431b-adb2-eb6b9e543206",
       "name" => "Growth Plans",
       "plans_count" => 2
    )),
    1 => 
    ChartMogul\PlanGroup::__set_state(array(
       "uuid" => "plg_cdb35d54-75b4-431b-adb2-eb6b9e873425",
       "name" => "Growth Plan Group",
       "plans_count" => 6
    ))
  ),
  "current_page" => 1,
  "total_pages" => 1
));
?>
(*chartmogul.PlanGroups)(0xc0420b0f60)({
 PlanGroups: ([]*chartmogul.PlanGroup) (len=2) {
  (*chartmogul.PlanGroup)(0xc04201aae0)({
   UUID: (string) (len=39) "plg_86382dae-ee0c-11e6-ba5f-d71bf57a88d3",
   Name: (string) (len=12) "Growth Plans",
   PlansCount: (uint32) 2
  }),
  (*chartmogul.PlanGroup)(0xc04201ab40)({
   UUID: (string) (len=39) "plg_8da1caec-ee0b-11e6-a4d9-dbe62a1a1694",
   Name: (string) (len=9) "Growth Plan Group",
   PlansCount: (uint32) 6
  })
 },
 TotalPages: (uint32) 1,
 CurrentPage: (uint32) 1
})
PlanGroups(plan_groups=[
    <PlanGroup{
        plans_count=2,
        name='Growth Plans',
        uuid='plg_86382dae-ee0c-11e6-ba5f-d71bf57a88d3'}>,
    <PlanGroup{
        plans_count=6,
        name='Growth Plan Group',
        uuid='plg_8da1caec-ee0b-11e6-a4d9-dbe62a1a1694'}>],
current_page=1,
total_pages=1)

In the response, plan_groups contains an array of plan_group objects with the following data:

  • name - Name of this plan group, as specified by you.
  • uuid - The UUID of the plan_group object generated by ChartMogul.
  • plans_count - The number of plans in the plan group.

The other keys represent pagination attributes:

  • total_pages - The total number of pages with results for this request.
  • current_page - The page number of this response.
Language
Authentication
Basic
base64
: