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

RecurlyClient.Operations.List_coupons

Description

Contains the different functions to run the operation list_coupons

Synopsis

Documentation

list_coupons Source #

Arguments

:: forall m. MonadHTTP m 
=> List_couponsParameters

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

-> ClientT m (Response List_couponsResponse)

Monadic computation which returns the result of the operation

GET /coupons

See the Pagination Guide to learn how to use pagination in the API and Client Libraries.

data List_couponsParameters Source #

Defines the object schema located at paths./coupons.GET.parameters in the specification.

Constructors

List_couponsParameters 

Fields

  • list_couponsParametersQueryBegin_time :: Maybe JsonDateTime

    queryBegin_time: Represents the parameter named 'begin_time'

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

  • list_couponsParametersQueryEnd_time :: Maybe JsonDateTime

    queryEnd_time: Represents the parameter named 'end_time'

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

  • list_couponsParametersQueryIds :: 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_couponsParametersQueryLimit :: Maybe Int

    queryLimit: Represents the parameter named 'limit'

    Limit number of records 1-200.

    Constraints:

    • Maxium of 200.0
    • Minimum of 1.0
  • list_couponsParametersQueryOrder :: Maybe List_couponsParametersQueryOrder

    queryOrder: Represents the parameter named 'order'

    Sort order.

  • list_couponsParametersQuerySort :: Maybe List_couponsParametersQuerySort

    querySort: Represents the parameter named 'sort'

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

data List_couponsParametersQueryOrder Source #

Defines the enum schema located at paths./coupons.GET.parameters.properties.queryOrder in the specification.

Represents the parameter named 'order'

Sort order.

Constructors

List_couponsParametersQueryOrderOther Value

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

List_couponsParametersQueryOrderTyped Text

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

List_couponsParametersQueryOrderEnumAsc

Represents the JSON value "asc"

List_couponsParametersQueryOrderEnumDesc

Represents the JSON value "desc"

data List_couponsParametersQuerySort Source #

Defines the enum schema located at paths./coupons.GET.parameters.properties.querySort in the specification.

Represents the parameter named 'sort'

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

Constructors

List_couponsParametersQuerySortOther Value

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

List_couponsParametersQuerySortTyped Text

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

List_couponsParametersQuerySortEnumCreated_at

Represents the JSON value "created_at"

List_couponsParametersQuerySortEnumUpdated_at

Represents the JSON value "updated_at"

data List_couponsResponse Source #

Represents a response of the operation list_coupons.

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_couponsResponseError is used.

Constructors

List_couponsResponseError String

Means either no matching case available or a parse error

List_couponsResponse200 CouponList

A list of the site's coupons.

List_couponsResponse400 Error

Invalid or unpermitted parameter.

List_couponsResponse404 Error

Incorrect site ID.

List_couponsResponseDefault Error

Unexpected error.

list_couponsWithConfiguration Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> List_couponsParameters

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

-> m (Response List_couponsResponse)

Monadic computation which returns the result of the operation

GET /coupons

The same as list_coupons but accepts an explicit configuration.

list_couponsRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> List_couponsParameters

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 /coupons

The same as list_coupons but returns the raw ByteString.

list_couponsWithConfigurationRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> List_couponsParameters

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

-> m (Response ByteString)

Monadic computation which returns the result of the operation

GET /coupons

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