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(per_page: 2)
ChartMogul.PlanGroup.all(config, {per_page: 2});
<?php

ChartMogul\PlanGroup::all(["per_page" => 2]);
?>
api.ListPlanGroups(&cm.Cursor{PerPage: 2})
chartmogul.PlanGroup.all(config, per_page=2)
Result Format
{
  "plan_groups": [
    {
      "name": "Growth Plans",
      "uuid": "plg_3c2b0732-cff0-437f-9f8d-a575ccc8b7e9",
       "plans_count": 2
    },
    {
      "name": "Enterprise Plans",
       "uuid": "plg_1d960363-a335-4e21-90cd-f3686c143453",
       "plans_count": 6
    }
  ],
  "current_page": 1, // deprecated
  "total_pages": 1, // deprecated
  "cursor":"AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  "has_more": true
}
#<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="Enterprise Plans",
    @plans_count=6
    >
	],
 @current_page=1, # deprecated with version 4.0.0
 @total_pages=1, # deprecated with version 4.0.0
 @cursor="AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
 @has_more=true
>
{
  "plan_groups": [
    {
      "name": "Growth Plans",
      "uuid": "plg_3c2b0732-cff0-437f-9f8d-a575ccc8b7e9",
       "plans_count": 2
    },
    {
      "name": "Enterprise Plans",
       "uuid": "plg_1d960363-a335-4e21-90cd-f3686c143453",
       "plans_count": 6
    }
  ],
  "current_page": 1, // deprecated with version 3.0.0
  "total_pages": 2, // deprecated with version 3.0.0
  "cursor":"AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
  "has_more": true
}
<?php

Doctrine\Common\Collections\ArrayCollection::__set_state(array(
   "elements" => 
  array (
    0 => 
    ChartMogul\PlanGroup::__set_state(array(
       "uuid" => "plg_3c2b0732-cff0-437f-9f8d-a575ccc8b7e9",
       "name" => "Growth Plans",
       "plans_count" => 2
    )),
    1 => 
    ChartMogul\PlanGroup::__set_state(array(
       "uuid" => "plg_1d960363-a335-4e21-90cd-f3686c143453",
       "name" => "Enterprise Plans",
       "plans_count" => 6
    ))
  ),
 "current_page" => 1, # deprecated with version 6.0.0
 "total_pages" => 2, # deprecated with version 6.0.0
 "cursor" => "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
 "has_more" => true
));
?>
(*chartmogul.PlanGroups)(0xc0420b0f60)({
 PlanGroups: ([]*chartmogul.PlanGroup) (len=2) {
  (*chartmogul.PlanGroup)(0xc04201aae0)({
   UUID: (string) (len=39) "plg_3c2b0732-cff0-437f-9f8d-a575ccc8b7e9",
   Name: (string) (len=12) "Growth Plans",
   PlansCount: (uint32) 2
  }),
  (*chartmogul.PlanGroup)(0xc04201ab40)({
   UUID: (string) (len=39) "plg_1d960363-a335-4e21-90cd-f3686c143453",
   Name: (string) (len=9) "Enterprise Plans",
   PlansCount: (uint32) 6
  })
 },
TotalPages: (uint32) 1, // deprecated with version v4
CurrentPage: (uint32) 1, // deprecated with version v4
Cursor: (string) (len=44) "AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k",
HasMore: (bool) true
})
PlanGroups(plan_groups=[
    <PlanGroup{
        plans_count=2,
        name='Growth Plans',
        uuid='plg_3c2b0732-cff0-437f-9f8d-a575ccc8b7e9'}>,
    <PlanGroup{
        plans_count=6,
        name='Enterprise Plans',
        uuid='plg_1d960363-a335-4e21-90cd-f3686c143453'}>],
current_page=1,  # deprecated with version 4.0.0
total_pages=1,  # deprecated with version 4.0.0
cursor='AjMx90kC0yMVQwNNwoYToyNC4wMDAwMDAwMDBgks68k',
has_more=True)

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:

  • cursor - A value that should be used in the next API request to fetch the next page of plan groups. Request for next page should be initiated only if has_more is set to true indicating that there are more plan groups to list.
  • has_more - One of true or false depending on whether there are more pages with results for this request.
  • total_pages - DEPRECATED The total number of pages with results for this request.
  • current_page - DEPRECATED The page number of this response.
Language
Authorization
Basic
base64
: