stripeapi-2.0.0.1: Stripe-Library
Safe HaskellNone
LanguageHaskell2010

StripeAPI.Types.Order

Description

Contains the types generated from the schema Order

Synopsis

Documentation

data Order Source #

Defines the object schema located at components.schemas.order in the specification.

Order objects are created to handle end customers' purchases of previously defined products. You can create, retrieve, and pay individual orders, as well as list all orders. Orders are identified by a unique, random ID.

Related guide: Tax, Shipping, and Inventory.

Constructors

Order 

Fields

  • orderAmount :: Int

    amount: A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.

  • orderAmountReturned :: Maybe Int

    amount_returned: The total amount that was returned to the customer.

  • orderApplication :: Maybe Text

    application: ID of the Connect Application that created the order.

    Constraints:

    • Maximum length of 5000
  • orderApplicationFee :: Maybe Int

    application_fee: A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation.

  • orderCharge :: Maybe OrderCharge'Variants

    charge: The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`.

  • orderCreated :: Int

    created: Time at which the object was created. Measured in seconds since the Unix epoch.

  • orderCurrency :: Text

    currency: Three-letter ISO currency code, in lowercase. Must be a supported currency.

  • orderCustomer :: Maybe OrderCustomer'Variants

    customer: The customer used for the order.

  • orderEmail :: Maybe Text

    email: The email address of the customer placing the order.

    Constraints:

    • Maximum length of 5000
  • orderExternalCouponCode :: Maybe Text

    external_coupon_code: External coupon code to load for this order.

    Constraints:

    • Maximum length of 5000
  • orderId :: Text

    id: Unique identifier for the object.

    Constraints:

    • Maximum length of 5000
  • orderItems :: [OrderItem]

    items: List of items constituting the order. An order can have up to 25 items.

  • orderLivemode :: Bool

    livemode: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.

  • orderMetadata :: Maybe Object

    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.

  • orderReturns :: Maybe OrderReturns'

    returns: A list of returns that have taken place for this order.

  • orderSelectedShippingMethod :: Maybe Text

    selected_shipping_method: The shipping method that is currently selected for this order, if any. If present, it is equal to one of the `id`s of shipping methods in the `shipping_methods` array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method.

    Constraints:

    • Maximum length of 5000
  • orderShipping :: Maybe OrderShipping'

    shipping: The shipping address for the order. Present if the order is for goods to be shipped.

  • orderShippingMethods :: Maybe [ShippingMethod]

    shipping_methods: A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it.

  • orderStatus :: Text

    status: Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More details in the Orders Guide.

    Constraints:

    • Maximum length of 5000
  • orderStatusTransitions :: Maybe OrderStatusTransitions'

    status_transitions: The timestamps at which the order status was updated.

  • orderUpdated :: Maybe Int

    updated: Time at which the object was last updated. Measured in seconds since the Unix epoch.

  • orderUpstreamId :: Maybe Text

    upstream_id: The user's order ID if it is different from the Stripe order ID.

    Constraints:

    • Maximum length of 5000

Instances

Instances details
Eq Order Source # 
Instance details

Defined in StripeAPI.Types.Order

Methods

(==) :: Order -> Order -> Bool #

(/=) :: Order -> Order -> Bool #

Show Order Source # 
Instance details

Defined in StripeAPI.Types.Order

Methods

showsPrec :: Int -> Order -> ShowS #

show :: Order -> String #

showList :: [Order] -> ShowS #

ToJSON Order Source # 
Instance details

Defined in StripeAPI.Types.Order

FromJSON Order Source # 
Instance details

Defined in StripeAPI.Types.Order

data OrderCharge'Variants Source #

Defines the oneOf schema located at components.schemas.order.properties.charge.anyOf in the specification.

The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`.

data OrderReturns' Source #

Defines the object schema located at components.schemas.order.properties.returns in the specification.

A list of returns that have taken place for this order.

Constructors

OrderReturns' 

Fields

data OrderShipping' Source #

Defines the object schema located at components.schemas.order.properties.shipping.anyOf in the specification.

The shipping address for the order. Present if the order is for goods to be shipped.

Constructors

OrderShipping' 

Fields

mkOrderShipping' :: OrderShipping' Source #

Create a new OrderShipping' with all required fields.

data OrderStatusTransitions' Source #

Defines the object schema located at components.schemas.order.properties.status_transitions.anyOf in the specification.

The timestamps at which the order status was updated.

Constructors

OrderStatusTransitions' 

Fields