recurly-client-0.1.0.0: Client for Recurly subscription management
Safe HaskellSafe-Inferred
LanguageHaskell2010

RecurlyClient.Operations.List_usage

Description

Contains the different functions to run the operation list_usage

Synopsis

Documentation

list_usage Source #

Arguments

:: forall m. MonadHTTP m 
=> List_usageParameters

Contains all available parameters of this operation (query and path parameters)

-> ClientT m (Response List_usageResponse)

Monadic computation which returns the result of the operation

GET /subscriptions/{subscription_id}/add_ons/{add_on_id}/usage

List a subscription add-on's usage records

data List_usageParameters Source #

Defines the object schema located at paths./subscriptions/{subscription_id}/add_ons/{add_on_id}/usage.GET.parameters in the specification.

Constructors

List_usageParameters 

Fields

  • list_usageParametersPathAdd_on_id :: Text

    pathAdd_on_id: Represents the parameter named 'add_on_id'

    Add-on ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`.

  • list_usageParametersPathSubscription_id :: Text

    pathSubscription_id: Represents the parameter named 'subscription_id'

    Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`.

  • list_usageParametersQueryBegin_time :: Maybe JsonDateTime

    queryBegin_time: Represents the parameter named 'begin_time'

    Inclusively filter by begin_time when `sort=usage_timestamp` or `sort=recorded_timestamp`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.

  • list_usageParametersQueryBilling_status :: Maybe List_usageParametersQueryBilling_status

    queryBilling_status: Represents the parameter named 'billing_status'

    Filter by usage record's billing status

  • list_usageParametersQueryEnd_time :: Maybe JsonDateTime

    queryEnd_time: Represents the parameter named 'end_time'

    Inclusively filter by end_time when `sort=usage_timestamp` or `sort=recorded_timestamp`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.

  • list_usageParametersQueryIds :: Maybe [Text]

    queryIds: Represents the parameter named 'ids'

    Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.

    • *Important notes:**
    • The `ids` parameter cannot be used with any other ordering or filtering parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
    • Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request.
    • Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself.
  • list_usageParametersQueryLimit :: Maybe Int

    queryLimit: Represents the parameter named 'limit'

    Limit number of records 1-200.

    Constraints:

    • Maxium of 200.0
    • Minimum of 1.0
  • list_usageParametersQueryOrder :: Maybe List_usageParametersQueryOrder

    queryOrder: Represents the parameter named 'order'

    Sort order.

  • list_usageParametersQuerySort :: Maybe List_usageParametersQuerySort

    querySort: Represents the parameter named 'sort'

    Sort field. You *really* only want to sort by `usage_timestamp` in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.

data List_usageParametersQueryBilling_status Source #

Defines the enum schema located at paths./subscriptions/{subscription_id}/add_ons/{add_on_id}/usage.GET.parameters.properties.queryBilling_status in the specification.

Represents the parameter named 'billing_status'

Filter by usage record's billing status

Constructors

List_usageParametersQueryBilling_statusOther Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

List_usageParametersQueryBilling_statusTyped Text

This constructor can be used to send values to the server which are not present in the specification yet.

List_usageParametersQueryBilling_statusEnumUnbilled

Represents the JSON value "unbilled"

List_usageParametersQueryBilling_statusEnumBilled

Represents the JSON value "billed"

List_usageParametersQueryBilling_statusEnumAll

Represents the JSON value "all"

data List_usageParametersQueryOrder Source #

Defines the enum schema located at paths./subscriptions/{subscription_id}/add_ons/{add_on_id}/usage.GET.parameters.properties.queryOrder in the specification.

Represents the parameter named 'order'

Sort order.

Constructors

List_usageParametersQueryOrderOther Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

List_usageParametersQueryOrderTyped Text

This constructor can be used to send values to the server which are not present in the specification yet.

List_usageParametersQueryOrderEnumAsc

Represents the JSON value "asc"

List_usageParametersQueryOrderEnumDesc

Represents the JSON value "desc"

data List_usageParametersQuerySort Source #

Defines the enum schema located at paths./subscriptions/{subscription_id}/add_ons/{add_on_id}/usage.GET.parameters.properties.querySort in the specification.

Represents the parameter named 'sort'

Sort field. You *really* only want to sort by `usage_timestamp` in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.

Constructors

List_usageParametersQuerySortOther Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

List_usageParametersQuerySortTyped Text

This constructor can be used to send values to the server which are not present in the specification yet.

List_usageParametersQuerySortEnumRecorded_timestamp

Represents the JSON value "recorded_timestamp"

List_usageParametersQuerySortEnumUsage_timestamp

Represents the JSON value "usage_timestamp"

data List_usageResponse Source #

Represents a response of the operation list_usage.

The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), List_usageResponseError is used.

Constructors

List_usageResponseError String

Means either no matching case available or a parse error

List_usageResponse200 UsageList

A list of the subscription add-on's usage records.

List_usageResponse400 Error

Invalid or unpermitted parameter.

List_usageResponse404 Error

Incorrect site or subscription ID or add-on id.

List_usageResponseDefault Error

Unexpected error.

list_usageWithConfiguration Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> List_usageParameters

Contains all available parameters of this operation (query and path parameters)

-> m (Response List_usageResponse)

Monadic computation which returns the result of the operation

GET /subscriptions/{subscription_id}/add_ons/{add_on_id}/usage

The same as list_usage but accepts an explicit configuration.

list_usageRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> List_usageParameters

Contains all available parameters of this operation (query and path parameters)

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

GET /subscriptions/{subscription_id}/add_ons/{add_on_id}/usage

The same as list_usage but returns the raw ByteString.

list_usageWithConfigurationRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> List_usageParameters

Contains all available parameters of this operation (query and path parameters)

-> m (Response ByteString)

Monadic computation which returns the result of the operation

GET /subscriptions/{subscription_id}/add_ons/{add_on_id}/usage

The same as list_usage but accepts an explicit configuration and returns the raw ByteString.