stripeapi-0.1.0.2: Stripe-Library

Safe HaskellNone
LanguageHaskell2010

StripeAPI.Operations.PostProducts

Description

Contains the different functions to run the operation postProducts

Synopsis

Documentation

postProducts Source #

Arguments

:: (MonadHTTP m, SecurityScheme s) 
=> Configuration s

The configuration to use in the request

-> PostProductsRequestBody

The request body to send

-> m (Either HttpException (Response PostProductsResponse))

Monad containing the result of the operation

POST /v1/products

<p>Creates a new product object. To create a product for use with orders, see <a href="#create_product">Products</a>.</p>

postProductsRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> PostProductsRequestBody -> m (Either HttpException (Response ByteString)) Source #

POST /v1/products

The same as postProducts but returns the raw ByteString

data PostProductsRequestBody Source #

Defines the data type for the schema postProductsRequestBody

Constructors

PostProductsRequestBody 

Fields

  • postProductsRequestBodyActive :: Maybe Bool

    active: Whether the product is currently available for purchase. Defaults to `true`.

  • postProductsRequestBodyAttributes :: Maybe ([] Text)

    attributes: A list of up to 5 alphanumeric attributes.

  • postProductsRequestBodyCaption :: Maybe Text

    caption: A short one-line description of the product, meant to be displayable to the customer. May only be set if type=`good`.

    Constraints:

    • Maximum length of 5000
  • postProductsRequestBodyDeactivateOn :: Maybe ([] Text)

    deactivate_on: An array of Connect application names or identifiers that should not be able to order the SKUs for this product. May only be set if type=`good`.

  • postProductsRequestBodyDescription :: Maybe Text

    description: The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.

    Constraints:

    • Maximum length of 40000
  • postProductsRequestBodyExpand :: Maybe ([] Text)

    expand: Specifies which fields in the response should be expanded.

  • postProductsRequestBodyId :: Maybe Text

    id: An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.

    Constraints:

    • Maximum length of 5000
  • postProductsRequestBodyImages :: Maybe ([] Text)

    images: A list of up to 8 URLs of images for this product, meant to be displayable to the customer.

  • postProductsRequestBodyMetadata :: Maybe PostProductsRequestBodyMetadata'

    metadata: Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.

  • postProductsRequestBodyName :: Text

    name: The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions.

    Constraints:

    • Maximum length of 5000
  • postProductsRequestBodyPackageDimensions :: Maybe PostProductsRequestBodyPackageDimensions'

    package_dimensions: The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own `package_dimensions`. May only be set if type=`good`.

  • postProductsRequestBodyShippable :: Maybe Bool

    shippable: Whether this product is shipped (i.e., physical goods). Defaults to `true`. May only be set if type=`good`.

  • postProductsRequestBodyStatementDescriptor :: Maybe Text

    statement_descriptor: An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.

    This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. It must contain at least one letter.

    Constraints:

    • Maximum length of 22
  • postProductsRequestBodyType :: Maybe PostProductsRequestBodyType'

    type: The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons.

    Constraints:

    • Maximum length of 5000
  • postProductsRequestBodyUnitLabel :: Maybe Text

    unit_label: A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions.

    Constraints:

    • Maximum length of 12
  • postProductsRequestBodyUrl :: Maybe Text

    url: A URL of a publicly-accessible webpage for this product. May only be set if type=`good`.

    Constraints:

    • Maximum length of 5000

data PostProductsRequestBodyMetadata' Source #

Defines the data type for the schema postProductsRequestBodyMetadata'

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.

data PostProductsRequestBodyPackageDimensions' Source #

Defines the data type for the schema postProductsRequestBodyPackage_dimensions'

The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own `package_dimensions`. May only be set if type=`good`.

data PostProductsRequestBodyType' Source #

Defines the enum schema postProductsRequestBodyType'

The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons.

data PostProductsResponse Source #

Represents a response of the operation postProducts.

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), PostProductsResponseError is used.

Constructors

PostProductsResponseError String

Means either no matching case available or a parse error

PostProductsResponse200 Product

Successful response.

PostProductsResponseDefault Error

Error response.