postCommerceStoreByStoreidCaptureByOrderidWithHttpInfo method

Future<Response> postCommerceStoreByStoreidCaptureByOrderidWithHttpInfo(
  1. String storeid,
  2. String orderid
)

Capture a previously authorized order and settle the payment

Settles the order named in the path — the second half of the two-step flow — and answers the updated order with a Location header. Dispatch follows the order's STORED payment type, and a successful capture is the moment the rest of the system learns about the sale: order and payment rows are updated, coupon redemptions, referral, cart and stats are written, the confirmation email goes out, and the paid and completed events are emitted. A capture failure releases the order's inventory reservations and answers 400, so a failed settlement never leaves items held.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> postCommerceStoreByStoreidCaptureByOrderidWithHttpInfo(String storeid, String orderid,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/commerce/store/{storeid}/capture/{orderid}'
    .replaceAll('{storeid}', storeid)
    .replaceAll('{orderid}', orderid);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}