# Apigee API . organizations . developers . subscriptions

## Instance Methods

Close httplib2 connections.

Creates a subscription to an API product.

Expires an API product subscription immediately.

Gets details for an API product subscription.

Lists all API product subscriptions for a developer.

### Method Details

`close()`

    Close httplib2 connections.

`create(parent, body=None, x__xgafv=None)`

    Creates a subscription to an API product.

    Args:
      parent: string, Required. Email address of the developer that is purchasing a subscription to the API product. Use the following structure in your request: `organizations/{org}/developers/{developer_email}` (required)
      body: object, The request body.
        The object takes the form of:

    { # Structure of a DeveloperSubscription.
      "apiproduct": "A String", # Name of the API product for which the developer is purchasing a subscription.
      "createdAt": "A String", # Output only. Time when the API product subscription was created in milliseconds since epoch.
      "endTime": "A String", # Time when the API product subscription ends in milliseconds since epoch.
      "lastModifiedAt": "A String", # Output only. Time when the API product subscription was last modified in milliseconds since epoch.
      "name": "A String", # Output only. Name of the API product subscription.
      "startTime": "A String", # Time when the API product subscription starts in milliseconds since epoch.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Structure of a DeveloperSubscription.
      "apiproduct": "A String", # Name of the API product for which the developer is purchasing a subscription.
      "createdAt": "A String", # Output only. Time when the API product subscription was created in milliseconds since epoch.
      "endTime": "A String", # Time when the API product subscription ends in milliseconds since epoch.
      "lastModifiedAt": "A String", # Output only. Time when the API product subscription was last modified in milliseconds since epoch.
      "name": "A String", # Output only. Name of the API product subscription.
      "startTime": "A String", # Time when the API product subscription starts in milliseconds since epoch.
    }

`expire(name, body=None, x__xgafv=None)`

    Expires an API product subscription immediately.

    Args:
      name: string, Required. Name of the API product subscription. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/subscriptions/{subscription}` (required)
      body: object, The request body.
        The object takes the form of:

    { # Request for ExpireDeveloperSubscription.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Structure of a DeveloperSubscription.
      "apiproduct": "A String", # Name of the API product for which the developer is purchasing a subscription.
      "createdAt": "A String", # Output only. Time when the API product subscription was created in milliseconds since epoch.
      "endTime": "A String", # Time when the API product subscription ends in milliseconds since epoch.
      "lastModifiedAt": "A String", # Output only. Time when the API product subscription was last modified in milliseconds since epoch.
      "name": "A String", # Output only. Name of the API product subscription.
      "startTime": "A String", # Time when the API product subscription starts in milliseconds since epoch.
    }

`get(name, x__xgafv=None)`

    Gets details for an API product subscription.

    Args:
      name: string, Required. Name of the API product subscription. Use the following structure in your request: `organizations/{org}/developers/{developer_email}/subscriptions/{subscription}` (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Structure of a DeveloperSubscription.
      "apiproduct": "A String", # Name of the API product for which the developer is purchasing a subscription.
      "createdAt": "A String", # Output only. Time when the API product subscription was created in milliseconds since epoch.
      "endTime": "A String", # Time when the API product subscription ends in milliseconds since epoch.
      "lastModifiedAt": "A String", # Output only. Time when the API product subscription was last modified in milliseconds since epoch.
      "name": "A String", # Output only. Name of the API product subscription.
      "startTime": "A String", # Time when the API product subscription starts in milliseconds since epoch.
    }

`list(parent, count=None, startKey=None, x__xgafv=None)`

    Lists all API product subscriptions for a developer.

    Args:
      parent: string, Required. Email address of the developer. Use the following structure in your request: `organizations/{org}/developers/{developer_email}` (required)
      count: integer, Number of API product subscriptions to return in the API call. Use with `startKey` to provide more targeted filtering. Defaults to 100. The maximum limit is 1000.
      startKey: string, Name of the API product subscription from which to start displaying the list of subscriptions. If omitted, the list starts from the first item. For example, to view the API product subscriptions from 51-150, set the value of `startKey` to the name of the 51st subscription and set the value of `count` to 100.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Response for ListDeveloperSubscriptions.
      "developerSubscriptions": [ # List of all subscriptions.
        { # Structure of a DeveloperSubscription.
          "apiproduct": "A String", # Name of the API product for which the developer is purchasing a subscription.
          "createdAt": "A String", # Output only. Time when the API product subscription was created in milliseconds since epoch.
          "endTime": "A String", # Time when the API product subscription ends in milliseconds since epoch.
          "lastModifiedAt": "A String", # Output only. Time when the API product subscription was last modified in milliseconds since epoch.
          "name": "A String", # Output only. Name of the API product subscription.
          "startTime": "A String", # Time when the API product subscription starts in milliseconds since epoch.
        },
      ],
      "nextStartKey": "A String", # Value that can be sent as `startKey` to retrieve the next page of content. If this field is omitted, there are no subsequent pages.
    }