View Source Stripe.Climate.Order (stripity_stripe v3.2.0)
Orders represent your intent to purchase a particular Climate product. When you create an order, the payment is deducted from your merchant balance.
Summary
Types
Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
The climate.order type.
Functions
Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds thereservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
provides 90 days advance notice and refunds the amount_total.
Creates a Climate order object for a given Climate product. The order will be processed immediatelyafter creation and payment will be deducted your Stripe balance.
Lists all Climate order objects. The orders are returned sorted by creation date, with themost recently created orders appearing first.
Retrieves the details of a Climate order object with the given ID.
Updates the specified order by setting the values of the parameters passed.
Types
@type beneficiary() :: %{optional(:public_name) => binary()}
Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
@type t() :: %Stripe.Climate.Order{ amount_fees: integer(), amount_subtotal: integer(), amount_total: integer(), beneficiary: term(), canceled_at: integer() | nil, cancellation_reason: binary() | nil, certificate: binary() | nil, confirmed_at: integer() | nil, created: integer(), currency: binary(), delayed_at: integer() | nil, delivered_at: integer() | nil, delivery_details: term(), expected_delivery_year: integer(), id: binary(), livemode: boolean(), metadata: term(), metric_tons: binary(), object: binary(), product: binary() | Stripe.Climate.Product.t(), product_substituted_at: integer() | nil, status: binary() }
The climate.order type.
amount_feesTotal amount of Frontier's service fees in the currency's smallest unit.amount_subtotalTotal amount of the carbon removal in the currency's smallest unit.amount_totalTotal amount of the order including fees in the currency's smallest unit.beneficiarycanceled_atTime at which the order was canceled. Measured in seconds since the Unix epoch.cancellation_reasonReason for the cancellation of this order.certificateFor delivered orders, a URL to a delivery certificate for the order.confirmed_atTime at which the order was confirmed. Measured in seconds since the Unix epoch.createdTime at which the object was created. Measured in seconds since the Unix epoch.currencyThree-letter ISO currency code, in lowercase, representing the currency for this order.delayed_atTime at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch.delivered_atTime at which the order was delivered. Measured in seconds since the Unix epoch.delivery_detailsDetails about the delivery of carbon removal for this order.expected_delivery_yearThe year this order is expected to be delivered.idUnique identifier for the object.livemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.metadataSet 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.metric_tonsQuantity of carbon removal that is included in this order.objectString representing the object's type. Objects of the same type share the same value.productUnique ID for the ClimateProductthis order is purchasing.product_substituted_atTime at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch.statusThe current status of this order.
Functions
@spec cancel( order :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds thereservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
provides 90 days advance notice and refunds the amount_total.
@spec create( params :: %{ optional(:amount) => integer(), optional(:beneficiary) => beneficiary(), optional(:currency) => binary(), optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()}, optional(:metric_tons) => binary(), optional(:product) => binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Creates a Climate order object for a given Climate product. The order will be processed immediatelyafter creation and payment will be deducted your Stripe balance.
#### Details * Method: `post` * Path: `/v1/climate/orders`@spec list( params :: %{ optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:limit) => integer(), optional(:starting_after) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Lists all Climate order objects. The orders are returned sorted by creation date, with themost recently created orders appearing first.
#### Details * Method: `get` * Path: `/v1/climate/orders`@spec retrieve( order :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves the details of a Climate order object with the given ID.
Details
- Method:
get - Path:
/v1/climate/orders/{order}
@spec update( order :: binary(), params :: %{ optional(:beneficiary) => beneficiary() | binary(), optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()} }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Updates the specified order by setting the values of the parameters passed.
Details
- Method:
post - Path:
/v1/climate/orders/{order}