@epilot/pricing-client 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +61 -69
- package/package.json +4 -2
- package/src/openapi.d.ts +61 -69
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){for(var a in t)e[a]=t[a];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,a){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=i(a(279));t.default=n.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Pricing API","description":"This API hub sets the foundations for the following Pricing APIs:\\n\\n- Order API, provides a way to manage orders, keep track of inventory, with individual adjustments, tax calculation, and shipping, apply discounts, store tracking information, and handle returns. The responsibilities of this API contemplate the following set of features:\\n - Create or update a new Order from a Shopping Cart\\n - Marking a Shopping Cart as complete once the Order is set as open (immutable/closed for modification)\\n - Pricing features such as automatic calculation of totals and price breakdowns for taxes\\n\\n- Shopping Cart API, used to interact with a cart during a customer\'s checkout session, and is responsible for providing the following set of features:\\n - A unified data model to model a Shopping Cart\\n - Cart abandonment recovery\\n - Pricing features such as automatic calculation of totals and price breakdowns for taxes\\n - Product and pricing data validation\\n","contact":{"name":"Maintainers Channel","url":"https://epilot.slack.com/archives/C020B4URQNS"},"version":"1.0.0"},"externalDocs":{"description":"Read the full RFC here","url":"https://e-pilot.atlassian.net/wiki/spaces/~880810188/pages/5459705918/Shopping+Cart+Orders+API"},"tags":[{"name":"Public","description":"Customer-facing Endpoints (requiring a X-Ivy-Org-ID identification)"},{"name":"Cart","description":"The shopping cart management operations"},{"name":"Order","description":"The order management operations"}],"security":[{"EpilotAuth":[]},{"AsOrganization":[]}],"paths":{"/v1/public/cart":{"put":{"description":"Creates a new cart or updates an existing one.","operationId":"upsertCart","summary":"upsertCart","security":[],"tags":["Cart","Public"],"parameters":[{"in":"header","name":"X-Ivy-Org-ID","description":"The target Organization Id represented by the caller","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"},"examples":{"Cart with Line Items":{"$ref":"#/components/examples/cartCreationPayload"}}}}},"responses":{"200":{"description":"The updated Cart.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"},"examples":{"Cart with Totals and Tax Breakdown":{"$ref":"#/components/examples/cart"}}}}},"201":{"description":"The new Cart.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"},"examples":{"Cart with Totals and Tax Breakdown":{"$ref":"#/components/examples/cart"}}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"Modifying a cart marked as complete":{"value":{"message":"The cart is marked as complete and can no longer be modified."}},"Modifying a cart with an invalid price":{"value":{"message":"The cart update failed due to an invalid price provided."}},"Modifying a cart with an invalid product":{"value":{"message":"The cart update failed due to an invalid provided provided."}}}}}}}}},"/v1/public/cart:finalize":{"post":{"description":"Finalizes the cart by changing its status to \'complete\'.\\nThe cart can no longer be modified after this operation.\\n","operationId":"finalizeCart","summary":"finalizeCart","tags":["Cart","Public"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"cart_id":{"type":"string","description":"The card_id to be finalized."}}}}}},"responses":{"200":{"description":"The customer\'s cart reflecting the new finalized state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"},"examples":{"Cart with Totals and Tax Breakdown":{"$ref":"#/components/examples/cartComplete"}}}}},"400":{"description":"Invalid payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Cart not found."}}}},"/v1/cart/{cart-id}":{"get":{"description":"Retrieves a cart by id.","operationId":"getCart","summary":"getCart","tags":["Cart"],"parameters":[{"in":"path","name":"cart-id","description":"The id of the cart to be fetched","required":true}],"responses":{"200":{"description":"The customer\'s cart.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"},"examples":{"Cart with Totals and Tax Breakdown":{"$ref":"#/components/examples/cart"}}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Cart not found"}}},"delete":{"description":"Deletes the Cart specified and returns its content.","operationId":"deleteCart","summary":"deleteCart","tags":["Cart"],"parameters":[{"in":"path","name":"cart-id","description":"The id of the cart to be deleted","required":true}],"responses":{"200":{"description":"The customer\'s cart.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"},"examples":{"Content of the deleted Cart":{"$ref":"#/components/examples/cart"}}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/order":{"put":{"description":"Creates a new order or updates an existing one.\\nThe upsert operation is idempotent, meaning that multiple calls will have effect just once.\\nCalling the upsert multiple times will not duplicate the items on an order.\\n\\nWhen the the `cart_id` is specified, the cart items are appended to the existing order items, or replaced in-place if they belong to the same `cart_id`.\\n\\nOn multiple updates with the same `cart_id` the line items linked with that `cart_id` (`order.line_items[]?.metadata.cart_id`) are removed and re-added.\\n","operationId":"upsertOrder","summary":"upsertOrder","tags":["Order"],"parameters":[{"in":"query","name":"cart_id","description":"The `cart_id` used to explode order items into the order.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"examples":{"Sample order creation":{"$ref":"#/components/examples/orderCreationPayload"}}}}},"responses":{"200":{"description":"The updated Order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"examples":{"Order with Totals and Tax Breakdown":{"$ref":"#/components/examples/order"}}}}},"201":{"description":"The new Order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"examples":{"Order with Totals and Tax Breakdown":{"$ref":"#/components/examples/order"}}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pricing/calculate":{"post":{"description":"Calculates the pricing amounts for a set of price items, including aggregated totals such as subtotal, total and aggregates per tax rate.\\n","operationId":"calculatePricing","summary":"calculatePricing","tags":["Pricing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceItems"},"examples":{"Price items sample":{"$ref":"#/components/examples/priceItemsPayload"}}}}},"responses":{"200":{"description":"The","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"examples":{"Order with Totals and Tax Breakdown":{"$ref":"#/components/examples/order"}}}}},"201":{"description":"The new Order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"examples":{"Order with Totals and Tax Breakdown":{"$ref":"#/components/examples/order"}}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id when using internal auth"},"AsUser":{"type":"apiKey","in":"header","name":"x-ivy-user-id","description":"Set user id when using internal auth"}},"schemas":{"Error":{"required":["message"],"properties":{"message":{"type":"string","description":"Error message"}}},"MetaData":{"description":"A set of key-value pairs.","type":"array","items":{"oneOf":[{"type":"object","description":"Key value pair entry","properties":{"key":{"type":"string","description":"Item key"},"value":{"type":"string","description":"Item value"}}}]}},"Cart":{"description":"Supports shopping for products and services until ready for converting to an order.","properties":{"id":{"type":"string","description":"The cart identifier"},"org_id":{"type":"string","description":"The user\'s Organization Id the cart belongs to","readOnly":true},"status":{"enum":["open","complete","expired"],"type":"string","readOnly":true,"description":"The status of the Cart:\\n- open - the cart checkout is still in progress. Payment processing has not started\\n- complete - the cart checkout is complete. Payment processing may still be in progress\\n- expired - the cart checkout has expired. No further processing will occur\\n"},"customer":{"readOnly":true,"type":"string","description":"ID of an existing Customer, if one exists. Or the customer data object."},"customer_email":{"type":"string","description":"A valid email identifying the customer."},"metadata":{"$ref":"#/components/schemas/MetaData"},"line_items":{"$ref":"#/components/schemas/PriceItems"},"amount_subtotal":{"readOnly":true,"type":"integer","description":"Total of all items before (discounts or) taxes are applied."},"amount_total":{"readOnly":true,"type":"integer","description":"Total of all items after (discounts and) taxes are applied."},"total_details":{"$ref":"#/components/schemas/TotalDetails"},"created_at":{"readOnly":true,"type":"string","format":"date-time"},"updated_at":{"readOnly":true,"type":"string","format":"date-time"}}},"Order":{"type":"object","description":"The order entity","properties":{"order_number":{"type":"string","description":"The Order Id Number for the customer"},"customer_email":{"type":"string","description":"A valid email identifying the customer. \\nWhen the `customer` field is filled with an ID, this field is populated/overwritten with that customer\'s email.\\n"},"customer":{"readOnly":true,"type":"string","description":"ID of an existing Customer, if one exists. Or the customer data object."},"type":{"type":"string","enum":["Draft","Open","Paid","Shipped","Delivered","Complete"],"description":"The order status"},"billing_first_name":{"type":"string"},"billing_last_name":{"type":"string"},"billing_company_name":{"type":"string"},"billing_vat":{"type":"string"},"billing_email":{"type":"string"},"billing_phone":{"type":"string"},"billing_address":{"type":"string"},"billing_contact":{"type":"string"},"metadata":{"$ref":"#/components/schemas/MetaData"},"line_items":{"$ref":"#/components/schemas/PriceItems"},"amount_subtotal":{"readOnly":true,"type":"integer","description":"Total of all items before (discounts or) taxes are applied."},"amount_total":{"readOnly":true,"type":"integer","description":"Total of all items after (discounts and) taxes are applied."},"total_details":{"$ref":"#/components/schemas/TotalDetails"},"_org_id":{"type":"string","description":"Organization Id the order belongs to"},"_id":{"type":"string","readOnly":true},"_created_at":{"type":"string","readOnly":true},"_updated_at":{"type":"string","readOnly":true}}},"PriceItems":{"description":"Tracks a set of product prices, quantities, (discounts) and taxes.","type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/PriceItem"}]}},"PriceItem":{"description":"Represents a price item","type":"object","properties":{"id":{"type":"string","description":"price item id","readOnly":true},"metadata":{"$ref":"#/components/schemas/MetaData"},"amount_subtotal":{"type":"integer","description":"Total before any (discounts or) taxes are applied.","readOnly":true},"amount_total":{"type":"integer","description":"Total after (discounts and) taxes.","readOnly":true},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase. \\nDefaults to the customer currency when the customer or customer_email field is provided, or to EUR as a fallback.\\n"},"description":{"type":"string","description":"An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name."},"quantity":{"type":"integer","description":"The quantity of products being purchased."},"product":{"oneOf":[{"type":"string","description":"The id of the product."},{"$ref":"#/components/schemas/Product"}]},"price":{"oneOf":[{"type":"string","description":"The id of the price."},{"$ref":"#/components/schemas/Price"}]},"taxes":{"type":"array","description":"The taxes applied to the price item.","readOnly":true,"items":{"oneOf":[{"$ref":"#/components/schemas/TaxAmount"}]}}}},"TaxAmount":{"type":"object","description":"A tax amount associated with a specific tax rate.","readOnly":true,"properties":{"amount":{"type":"integer","description":"The tax amount."},"rate":{"type":"string","description":"The tax rate applied."}}},"TotalDetails":{"type":"object","description":"The total details with tax (and discount) aggregated totals.","readOnly":true,"properties":{"amount_shipping":{"type":"integer","description":"This is the sum of all the price item shipping amounts."},"amount_tax":{"type":"integer","description":"This is the sum of all the price item tax amounts."},"breakdown":{"type":"object","description":"Breakdown of individual tax (and discount) amounts that add up to the totals.","properties":{"taxes":{"type":"array","description":"The aggregated price items tax amount per rate.","items":{"oneOf":[{"$ref":"#/components/schemas/TaxAmount"}]}}}}}},"Product":{"type":"object","description":"The product configuration","readOnly":true,"properties":{"code":{"type":"string"},"type":{"type":"string","enum":["Product","Service"]},"categories":{"type":"array","items":[{"type":"string"}]},"name":{"type":"string"},"feature":{"type":"array","items":[{"type":"object","properties":{"_tags":{"type":"array","items":[{"type":"string"}]},"feature":{"type":"string"}}}]},"active":{"type":"boolean"},"_id":{"type":"string"},"_files":{"$ref":"#/components/schemas/FileField"},"_images":{"$ref":"#/components/schemas/FileField"},"_created_at":{"type":"string"},"_updated_at":{"type":"string"},"_title":{"type":"string"},"_tags":{"type":"array","items":[{"type":"string"}]}},"example":{"$ref":"#/components/examples/product"}},"Price":{"type":"object","description":"The price configuration","readOnly":true,"properties":{"active":{"type":"boolean"},"billing_scheme":{"type":"string","enum":["Per Unit"]},"description":{"type":"string"},"sales_tax":{"type":"string","enum":["Nontaxable","Reduced (7%)","Standard (19%)"]},"tax_behavior":{"type":"string","enum":["Inclusive (Price amount includes Tax)","Exclusive (Price amount excludes Tax)"]},"tiers_mode":{"type":"string","enum":["Standard"]},"type":{"type":"string","enum":["One Time","Recurring"]},"unit_amount":{"type":"string"},"_created_at":{"type":"string"},"_id":{"type":"string"},"_title":{"type":"string"},"_updated_at":{"type":"string"}},"example":{"$ref":"#/components/examples/price"}},"FileField":{"description":"The file field","properties":{"type":{"type":"string","enum":["file","image"]},"attachments":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string"},"mime":{"type":"string"},"name":{"type":"string"},"size":{"type":"number"},"image_url":{"type":"string"},"download_url":{"type":"string"}}}]}}},"example":{"$ref":"#/components/examples/price"}}},"examples":{"cart":{"description":"Example of a Shopping Cart","value":{"id":"p0ZoB1FwH6","status":"open","org_id":123,"customer":"fe2ce36e-7577-4dff-b33e-1c7da6f91c89","customer_email":"johndoe@epilot.cloud","metadata":[{"key":"journey-id","value":"8d0a2235-97ce-42d0-88a3-e374634ca44e"}],"line_items":[{"id":"mSjGCTfn8w","description":"Wallbox Premium - Premium Price","currency":"EUR","amount_subtotal":50000,"amount_total":61500,"quantity":1,"product":{"_id":"b7185fb7-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"df240bab-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":11500,"rate":"MwSt. 23%"}]},{"id":"mZkGCTfn6p","description":"Wallbox Basic with Full Add-ons - Basic Price","currency":"EUR","amount_subtotal":50000,"amount_total":53500,"quantity":1,"product":{"_id":"zzzzzz-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":3500,"rate":"MwSt. 7%"}]}],"amount_subtotal":100000,"amount_total":115000,"total_details":{"amount_shipping":10000,"amount_tax":15000,"breakdown":[{"amount":11500,"rate":"MwSt. 23%"},{"amount":3500,"rate":"MwSt. 7%"}]},"created_at":"2021-11-10T18:02:58.318Z","updated_at":"2021-11-10T18:02:58.318Z"}},"cartComplete":{"description":"Example of a Shopping Cart marked as complete","value":{"id":"p0ZoB1FwH6","status":"complete","org_id":123,"customer":"fe2ce36e-7577-4dff-b33e-1c7da6f91c89","customer_email":"johndoe@epilot.cloud","metadata":[{"key":"journey-id","value":"8d0a2235-97ce-42d0-88a3-e374634ca44e"}],"line_items":[{"id":"mSjGCTfn8w","description":"Wallbox Premium - Premium Price","currency":"EUR","amount_subtotal":50000,"amount_total":61500,"quantity":1,"product":{"_id":"b7185fb7-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"df240bab-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":11500,"rate":"MwSt. 23%"}]},{"id":"mZkGCTfn6p","description":"Wallbox Basic with Full Add-ons - Basic Price","currency":"EUR","amount_subtotal":50000,"amount_total":53500,"quantity":1,"product":{"_id":"zzzzzz-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":3500,"rate":"MwSt. 7%"}]}],"amount_subtotal":100000,"amount_total":115000,"total_details":{"amount_shipping":10000,"amount_tax":15000,"breakdown":[{"amount":11500,"rate":"MwSt. 23%"},{"amount":3500,"rate":"MwSt. 7%"}]},"created_at":"2021-11-10T18:02:58.318Z","updated_at":"2021-11-10T18:02:58.318Z"}},"cartCreationPayload":{"description":"Example of a Cart creation payload","value":{"customer_email":"johndoe@epilot.cloud","metadata":[{"key":"journey-id","value":"8d0a2235-97ce-42d0-88a3-e374634ca44e"}],"line_items":[{"quantity":1,"product":"b7185fb7-b10f-4875-bda7-288631446555","price":"df240bab-9f71-4a9a-a9e1-59f18827dbf9"},{"quantity":1,"product":"zzzzzz-b10f-4875-bda7-288631446555","price":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9"}]}},"orderCreationPayload":{"description":"Example of an Order creation payload","value":{"order_number":"a34234jd","customer_email":"johndoe@epilot.cloud","metadata":[{"key":"journey-id","value":"8d0a2235-97ce-42d0-88a3-e374634ca44e"}],"billing_first_name":"john","billing_last_name":"doe","billing_company_name":"i me and myself","billing_vat":234823948,"billing_email":"johndoe@nowhere.com","billing_phone":1234234545,"billing_address":"wallstreet, 1","billing_contact":"villy or zilly","line_items":[{"quantity":1,"product":"b7185fb7-b10f-4875-bda7-288631446555","price":"df240bab-9f71-4a9a-a9e1-59f18827dbf9"},{"quantity":1,"product":"zzzzzz-b10f-4875-bda7-288631446555","price":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9"}]}},"order":{"description":"Example of an Order","value":{"_id":"d1ZoC1FwZ6","type":"open","_org_id":123,"customer":"fe2ce36e-7577-4dff-b33e-1c7da6f91c89","customer_email":"johndoe@epilot.cloud","metadata":[{"key":"journey-id","value":"8d0a2235-97ce-42d0-88a3-e374634ca44e"},{"key":"cart-id-1","value":"p0ZoB1FwH6"}],"billing_first_name":"john","billing_last_name":"doe","billing_company_name":"i me and myself","billing_vat":234823948,"billing_email":"johndoe@nowhere.com","billing_phone":1234234545,"billing_address":"wallstreet, 1","billing_contact":"villy or zilly","line_items":[{"id":"mSjGCTfn8w","cart_id":"p0ZoB1FwH6","description":"Wallbox Premium - Premium Price","currency":"EUR","amount_subtotal":50000,"amount_total":61500,"quantity":1,"product":{"_id":"b7185fb7-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"df240bab-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":11500,"rate":"MwSt. 23%"}]},{"id":"mZkGCTfn6p","cart_id":"p0ZoB1FwH6","description":"Wallbox Basic with Full Add-ons - Basic Price","currency":"EUR","amount_subtotal":50000,"amount_total":53500,"quantity":1,"product":{"_id":"zzzzzz-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":3500,"rate":"MwSt. 7%"}]}],"amount_subtotal":100000,"amount_total":115000,"total_details":{"amount_shipping":10000,"amount_tax":15000,"breakdown":[{"amount":11500,"rate":"MwSt. 23%"},{"amount":3500,"rate":"MwSt. 7%"}]},"_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z"}},"priceItemsPayload":{"description":"A price items payload example","value":{"items":[{"id":"mSjGCTfn8w","cart_id":"p0ZoB1FwH6","description":"Wallbox Premium - Premium Price","currency":"EUR","amount_subtotal":50000,"amount_total":61500,"quantity":1,"product":{"_id":"b7185fb7-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"df240bab-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":11500,"rate":"MwSt. 23%"}]},{"id":"mZkGCTfn6p","cart_id":"p0ZoB1FwH6","description":"Wallbox Basic with Full Add-ons - Basic Price","currency":"EUR","amount_subtotal":50000,"amount_total":53500,"quantity":1,"product":{"_id":"zzzzzz-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":3500,"rate":"MwSt. 7%"}]}]}},"product":{"description":"A product example","value":{"name":"Alfen Eve Single S-line Wallbox","code":"904460583","categories":["House Connection"],"type":"Product","active":true,"_id":"b7185fb7-b10f-4875-bda7-288631446555","_created_at":"2021-11-10T18:01:39.681Z","_updated_at":"2021-11-11T10:40:23.430Z","_title":"Alfen Eve Single S-line Wallbox","_tags":["product review demo"],"feature":[{"_tags":[],"feature":"Bis zu 11 kW Ladeleistung (5x schneller laden)"},{"_tags":[],"feature":"Konfigurierbare Ladeleistung"},{"_tags":[],"feature":"Zugangskontrolle über RFID-Karten"}],"_images":{"type":"image","attachments":[{"key":"files/ckvtu0lq5000108me1pdc7y4k/original","mime":"image/jpeg","name":"juice-charger-me_closeup_bottom.jpeg","size":38210,"image_url":"https://avkhavsdjq.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu0lq5000108me1pdc7y4k/original?w=100","download_url":"https://e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu0lq5000108me1pdc7y4k/original","alt_text":""},{"key":"files/ckvtu06ny000008me01xl79ot/original","mime":"image/jpeg","name":"eve-single-s-line-socket-front-_1__web_1.jpeg","size":11587,"image_url":"https://avkhavsdjq.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu06ny000008me01xl79ot/original?w=100","download_url":"https://e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu06ny000008me01xl79ot/original","alt_text":""}]},"_files":{"type":"file","attachments":[{"key":"files/ckvutl6wp00000al5cx8063nz/original","mime":"application/pdf","name":"Wallbox_Pulsar-Plus_technisches-Datenblatt.pdf","size":171501,"image_url":"https://avkhavsdjq.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvutl6wp00000al5cx8063nz/original?w=100","download_url":"https://e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvutl6wp00000al5cx8063nz/original","alt_text":""}]}}},"price":{"description":"A price example","value":{"unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_schema":"price","_id":"8ca293d6-89f5-4b20-98f5-fa68341ef611","_org":"739224","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"}},"fileField":{"description":"A File Field example","value":{"type":"image","attachments":[{"key":"files/ckvtu0lq5000108me1pdc7y4k/original","mime":"image/jpeg","name":"juice-charger-me_closeup_bottom.jpeg","size":38210,"image_url":"https://avkhavsdjq.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu0lq5000108me1pdc7y4k/original?w=100","download_url":"https://e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu0lq5000108me1pdc7y4k/original","alt_text":""},{"key":"files/ckvtu06ny000008me01xl79ot/original","mime":"image/jpeg","name":"eve-single-s-line-socket-front-_1__web_1.jpeg","size":11587,"image_url":"https://avkhavsdjq.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu06ny000008me01xl79ot/original?w=100","download_url":"https://e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu06ny000008me01xl79ot/original","alt_text":""}]}}}}}')}},t={};return function a(i){if(t[i])return t[i].exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,a),n.exports}(914)})());
|
|
1
|
+
!function(e,t){for(var a in t)e[a]=t[a];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,a){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=i(a(279));t.default=n.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Pricing API","description":"This API hub sets the foundations for the following Pricing APIs:\\n\\n- Order API, provides a way to manage orders, keep track of inventory, with individual adjustments, tax calculation, and shipping, apply discounts, store tracking information, and handle returns. The responsibilities of this API contemplate the following set of features:\\n - Create or update a new Order from a Shopping Cart\\n - Marking a Shopping Cart as complete once the Order is set as open (immutable/closed for modification)\\n - Pricing features such as automatic calculation of totals and price breakdowns for taxes\\n\\n- Shopping Cart API, used to interact with a cart during a customer\'s checkout session, and is responsible for providing the following set of features:\\n - A unified data model to model a Shopping Cart\\n - Cart abandonment recovery\\n - Pricing features such as automatic calculation of totals and price breakdowns for taxes\\n - Product and pricing data validation\\n","contact":{"name":"Maintainers Channel","url":"https://epilot.slack.com/archives/C020B4URQNS"},"version":"1.0.0"},"externalDocs":{"description":"Read the full RFC here","url":"https://e-pilot.atlassian.net/wiki/spaces/~880810188/pages/5459705918/Shopping+Cart+Orders+API"},"tags":[{"name":"Public","description":"Customer-facing Endpoints (requiring a X-Ivy-Org-ID identification)"},{"name":"Cart","description":"The shopping cart management operations"},{"name":"Order","description":"Order management operations"},{"name":"Pricing","description":"Pricing utility operations"}],"security":[{"EpilotAuth":[]},{"AsOrganization":[]}],"paths":{"/v1/public/cart":{"put":{"description":"Creates a new cart or updates an existing one.","operationId":"upsertCart","summary":"upsertCart","security":[],"tags":["Cart","Public"],"parameters":[{"in":"header","name":"X-Ivy-Org-ID","description":"The target Organization Id represented by the caller","schema":{"type":"string"},"required":true},{"in":"query","name":"action","description":"Used for performing an action over the cart during the upsert mutation operation.\\nAvailable actions:\\n\\n**finalize**, calling `/v1/public/cart?action=finalize` will upsert a cart and immediately finalize it. Finalizing a cart automatically changes its status to `complete`. The cart can no longer be modified after this operation.\\n","schema":{"type":"string","enum":["finalize"]},"required":false}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"},"examples":{"Cart with Line Items":{"$ref":"#/components/examples/cartCreationPayload"}}}}},"responses":{"200":{"description":"The updated Cart.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"},"examples":{"Cart with Totals and Tax Breakdown":{"$ref":"#/components/examples/cart"}}}}},"201":{"description":"The new Cart.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"},"examples":{"Cart with Totals and Tax Breakdown":{"$ref":"#/components/examples/cart"}}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"Modifying a cart marked as complete":{"value":{"message":"The cart is marked as complete and can no longer be modified."}},"Modifying a cart with an invalid price":{"value":{"message":"The cart update failed due to an invalid price provided."}},"Modifying a cart with an invalid product":{"value":{"message":"The cart update failed due to an invalid provided provided."}}}}}}}}},"/v1/cart/{cart-id}":{"get":{"description":"Retrieves a cart by id.","operationId":"getCart","summary":"getCart","tags":["Cart"],"parameters":[{"in":"path","name":"cart-id","schema":{"type":"string"},"description":"The id of the cart to be fetched","required":true}],"responses":{"200":{"description":"The customer\'s cart.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"},"examples":{"Cart with Totals and Tax Breakdown":{"$ref":"#/components/examples/cart"}}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Cart not found"}}},"delete":{"description":"Deletes the Cart specified and returns its content.","operationId":"deleteCart","summary":"deleteCart","tags":["Cart"],"parameters":[{"in":"path","name":"cart-id","schema":{"type":"string"},"description":"The id of the cart to be deleted","required":true}],"responses":{"200":{"description":"The customer\'s cart.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cart"},"examples":{"Content of the deleted Cart":{"$ref":"#/components/examples/cart"}}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/order":{"put":{"description":"Creates a new order or updates an existing one. During the creation of an order, an unique customer-readable `order_number` will be generated.\\nThe `order_number` can be used to universally identify an order within epilot platform.\\n\\nThe upsert operation is idempotent, meaning that multiple calls will have effect just once. Calling the upsert multiple times will not duplicate the items on an order.\\n\\nWhen the the `cart_id` payload field is specified, the cart items are appended to the existing order items, or replaced in-place if they belong to the same `cart_id`.\\n\\nOn multiple updates with the same `cart_id` the line items linked with that `cart_id` (`order.line_items[]?.metadata.cart_id`) are removed and re-added.\\n","operationId":"upsertOrder","summary":"upsertOrder","tags":["Order"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"examples":{"Sample order creation":{"$ref":"#/components/examples/orderCreationPayload"}}}}},"responses":{"200":{"description":"The updated Order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"examples":{"Order with Totals and Tax Breakdown":{"$ref":"#/components/examples/order"}}}}},"201":{"description":"The new Order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"examples":{"Order with Totals and Tax Breakdown":{"$ref":"#/components/examples/order"}}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/public/pricing:calculate":{"post":{"description":"Calculates the pricing amounts for a set of price items, including aggregated totals such as subtotal, total and aggregates per tax rate.\\n","operationId":"calculatePricing","summary":"calculatePricing","tags":["Pricing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/PriceItems"}]}},"examples":{"Price items sample":{"$ref":"#/components/examples/priceItemsPayload"}}}}},"responses":{"200":{"description":"The","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceItemsCalculateResult"},"examples":{"Pricing Items Calculation example":{"$ref":"#/components/examples/priceItemsResult"}}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id when using internal auth"},"AsUser":{"type":"apiKey","in":"header","name":"x-ivy-user-id","description":"Set user id when using internal auth"}},"schemas":{"Error":{"required":["message"],"properties":{"message":{"type":"string","description":"Error message"}}},"MetaData":{"description":"A set of key-value pairs.","type":"array","items":{"oneOf":[{"type":"object","description":"Key value pair entry","properties":{"key":{"type":"string","description":"Item key"},"value":{"type":"string","description":"Item value"}}}]}},"Cart":{"description":"Supports shopping for products and services until ready for converting to an order.","properties":{"id":{"type":"string","description":"The cart identifier"},"org_id":{"type":"string","description":"The user\'s Organization Id the cart belongs to","readOnly":true},"status":{"enum":["open","complete","expired"],"type":"string","readOnly":true,"description":"The status of the Cart:\\n- open - the cart checkout is still in progress. Payment processing has not started\\n- complete - the cart checkout is complete. Payment processing may still be in progress\\n- expired - the cart checkout has expired. No further processing will occur\\n"},"customer":{"readOnly":true,"type":"string","description":"ID of an existing Customer, if one exists. Or the customer data object."},"customer_email":{"type":"string","description":"A valid email identifying the customer."},"metadata":{"$ref":"#/components/schemas/MetaData"},"line_items":{"$ref":"#/components/schemas/PriceItems"},"amount_subtotal":{"readOnly":true,"type":"integer","description":"Total of all items before (discounts or) taxes are applied."},"amount_total":{"readOnly":true,"type":"integer","description":"Total of all items after (discounts and) taxes are applied."},"total_details":{"$ref":"#/components/schemas/TotalDetails"},"created_at":{"readOnly":true,"type":"string","format":"date-time"},"updated_at":{"readOnly":true,"type":"string","format":"date-time"}}},"Order":{"type":"object","description":"The order entity","properties":{"order_number":{"type":"string","description":"The Order Id Number for the customer"},"cart_id":{"type":"string","description":"The Cart Id that originated or is associated with the order"},"customer_email":{"type":"string","description":"A valid email identifying the customer. \\nWhen the `customer` field is filled with an ID, this field is populated/overwritten with that customer\'s email.\\n"},"customer":{"readOnly":true,"type":"string","description":"ID of an existing Customer, if one exists. Or the customer data object."},"type":{"type":"string","enum":["Draft","Open","Paid","Shipped","Delivered","Complete"],"description":"The order status"},"billing_first_name":{"type":"string"},"billing_last_name":{"type":"string"},"billing_company_name":{"type":"string"},"billing_vat":{"type":"string"},"billing_email":{"type":"string"},"billing_phone":{"type":"string"},"billing_address":{"type":"string"},"billing_contact":{"type":"string"},"metadata":{"$ref":"#/components/schemas/MetaData"},"line_items":{"$ref":"#/components/schemas/PriceItems"},"amount_subtotal":{"readOnly":true,"type":"integer","description":"Total of all items before (discounts or) taxes are applied."},"amount_total":{"readOnly":true,"type":"integer","description":"Total of all items after (discounts and) taxes are applied."},"total_details":{"$ref":"#/components/schemas/TotalDetails"},"_org_id":{"type":"string","description":"Organization Id the order belongs to"},"_id":{"type":"string","readOnly":true},"_created_at":{"type":"string","readOnly":true},"_updated_at":{"type":"string","readOnly":true}}},"PriceItems":{"description":"Tracks a set of product prices, quantities, (discounts) and taxes.","type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/PriceItem"}]}},"PriceItem":{"description":"Represents a price item","type":"object","properties":{"id":{"type":"string","description":"price item id","readOnly":true},"metadata":{"$ref":"#/components/schemas/MetaData"},"amount_subtotal":{"type":"integer","description":"Total before any (discounts or) taxes are applied.","readOnly":true},"amount_total":{"type":"integer","description":"Total after (discounts and) taxes.","readOnly":true},"currency":{"type":"string","description":"Three-letter ISO currency code, in lowercase. \\nDefaults to the customer currency when the customer or customer_email field is provided, or to EUR as a fallback.\\n"},"description":{"type":"string","description":"An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name."},"quantity":{"type":"integer","description":"The quantity of products being purchased."},"product":{"oneOf":[{"type":"string","description":"The id of the product."},{"$ref":"#/components/schemas/Product"}]},"price":{"oneOf":[{"type":"string","description":"The id of the price."},{"$ref":"#/components/schemas/Price"}]},"taxes":{"type":"array","description":"The taxes applied to the price item.","readOnly":true,"items":{"oneOf":[{"$ref":"#/components/schemas/TaxAmount"}]}}}},"TaxAmount":{"type":"object","description":"A tax amount associated with a specific tax rate.","readOnly":true,"properties":{"amount":{"type":"integer","description":"The tax amount."},"rate":{"type":"string","description":"The tax rate applied."}}},"TotalDetails":{"type":"object","description":"The total details with tax (and discount) aggregated totals.","readOnly":true,"properties":{"amount_shipping":{"type":"integer","description":"This is the sum of all the price item shipping amounts."},"amount_tax":{"type":"integer","description":"This is the sum of all the price item tax amounts."},"breakdown":{"type":"object","description":"Breakdown of individual tax (and discount) amounts that add up to the totals.","properties":{"taxes":{"type":"array","description":"The aggregated price items tax amount per rate.","items":{"oneOf":[{"$ref":"#/components/schemas/TaxAmount"}]}}}}}},"PriceItemsCalculateResult":{"type":"object","description":"The result from the calculation of a set of price items.","properties":{"items":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/PriceItems"}]}},"amount_subtotal":{"type":"integer","description":"Total of all items before (discounts or) taxes are applied."},"amount_total":{"type":"integer","description":"Total of all items after (discounts and) taxes are applied."},"total_details":{"$ref":"#/components/schemas/TotalDetails"}}},"Product":{"type":"object","description":"The product configuration","readOnly":true,"properties":{"code":{"type":"string"},"type":{"type":"string","enum":["Product","Service"]},"categories":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"feature":{"type":"array","items":{"type":"object","properties":{"_tags":{"type":"array","items":{"type":"string"}},"feature":{"type":"string"}}}},"active":{"type":"boolean"},"_id":{"type":"string"},"_files":{"$ref":"#/components/schemas/FileField"},"_images":{"$ref":"#/components/schemas/FileField"},"_created_at":{"type":"string"},"_updated_at":{"type":"string"},"_title":{"type":"string"},"_tags":{"type":"array","items":{"type":"string"}}},"example":{"$ref":"#/components/examples/product"}},"Price":{"type":"object","description":"The price configuration","readOnly":true,"properties":{"active":{"type":"boolean"},"billing_scheme":{"type":"string","enum":["Per Unit"]},"description":{"type":"string"},"sales_tax":{"type":"string","enum":["Nontaxable","Reduced (7%)","Standard (19%)"]},"tax_behavior":{"type":"string","enum":["Inclusive (Price amount includes Tax)","Exclusive (Price amount excludes Tax)"]},"tiers_mode":{"type":"string","enum":["Standard"]},"type":{"type":"string","enum":["One Time","Recurring"]},"unit_amount":{"type":"string"},"_created_at":{"type":"string"},"_id":{"type":"string"},"_title":{"type":"string"},"_updated_at":{"type":"string"}},"example":{"$ref":"#/components/examples/price"}},"FileField":{"description":"The file field","properties":{"type":{"type":"string","enum":["file","image"]},"attachments":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string"},"mime":{"type":"string"},"name":{"type":"string"},"size":{"type":"number"},"image_url":{"type":"string"},"download_url":{"type":"string"}}}]}}},"example":{"$ref":"#/components/examples/price"}}},"examples":{"cart":{"description":"Example of a Shopping Cart","value":{"id":"p0ZoB1FwH6","status":"open","org_id":123,"customer":"fe2ce36e-7577-4dff-b33e-1c7da6f91c89","customer_email":"johndoe@epilot.cloud","metadata":[{"key":"journey-id","value":"8d0a2235-97ce-42d0-88a3-e374634ca44e"}],"line_items":[{"id":"mSjGCTfn8w","description":"Wallbox Premium - Premium Price","currency":"EUR","amount_subtotal":50000,"amount_total":61500,"quantity":1,"product":{"_id":"b7185fb7-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"df240bab-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":11500,"rate":"MwSt. 23%"}]},{"id":"mZkGCTfn6p","description":"Wallbox Basic with Full Add-ons - Basic Price","currency":"EUR","amount_subtotal":50000,"amount_total":53500,"quantity":1,"product":{"_id":"zzzzzz-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":3500,"rate":"MwSt. 7%"}]}],"amount_subtotal":100000,"amount_total":115000,"total_details":{"amount_shipping":10000,"amount_tax":15000,"breakdown":[{"amount":11500,"rate":"MwSt. 23%"},{"amount":3500,"rate":"MwSt. 7%"}]},"created_at":"2021-11-10T18:02:58.318Z","updated_at":"2021-11-10T18:02:58.318Z"}},"cartComplete":{"description":"Example of a Shopping Cart marked as complete","value":{"id":"p0ZoB1FwH6","status":"complete","org_id":123,"customer":"fe2ce36e-7577-4dff-b33e-1c7da6f91c89","customer_email":"johndoe@epilot.cloud","metadata":[{"key":"journey-id","value":"8d0a2235-97ce-42d0-88a3-e374634ca44e"}],"line_items":[{"id":"mSjGCTfn8w","description":"Wallbox Premium - Premium Price","currency":"EUR","amount_subtotal":50000,"amount_total":61500,"quantity":1,"product":{"_id":"b7185fb7-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"df240bab-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":11500,"rate":"MwSt. 23%"}]},{"id":"mZkGCTfn6p","description":"Wallbox Basic with Full Add-ons - Basic Price","currency":"EUR","amount_subtotal":50000,"amount_total":53500,"quantity":1,"product":{"_id":"zzzzzz-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":3500,"rate":"MwSt. 7%"}]}],"amount_subtotal":100000,"amount_total":115000,"total_details":{"amount_shipping":10000,"amount_tax":15000,"breakdown":[{"amount":11500,"rate":"MwSt. 23%"},{"amount":3500,"rate":"MwSt. 7%"}]},"created_at":"2021-11-10T18:02:58.318Z","updated_at":"2021-11-10T18:02:58.318Z"}},"cartCreationPayload":{"description":"Example of a Cart creation payload","value":{"customer_email":"johndoe@epilot.cloud","metadata":[{"key":"journey-id","value":"8d0a2235-97ce-42d0-88a3-e374634ca44e"}],"line_items":[{"quantity":1,"product":"b7185fb7-b10f-4875-bda7-288631446555","price":"df240bab-9f71-4a9a-a9e1-59f18827dbf9"},{"quantity":1,"product":"zzzzzz-b10f-4875-bda7-288631446555","price":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9"}]}},"orderCreationPayload":{"description":"Example of an Order creation payload","value":{"order_number":"a34234jd","customer_email":"johndoe@epilot.cloud","metadata":[{"key":"journey-id","value":"8d0a2235-97ce-42d0-88a3-e374634ca44e"}],"billing_first_name":"john","billing_last_name":"doe","billing_company_name":"i me and myself","billing_vat":234823948,"billing_email":"johndoe@nowhere.com","billing_phone":1234234545,"billing_address":"wallstreet, 1","billing_contact":"villy or zilly","line_items":[{"quantity":1,"product":"b7185fb7-b10f-4875-bda7-288631446555","price":"df240bab-9f71-4a9a-a9e1-59f18827dbf9"},{"quantity":1,"product":"zzzzzz-b10f-4875-bda7-288631446555","price":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9"}]}},"order":{"description":"Example of an Order","value":{"_id":"d1ZoC1FwZ6","type":"open","cart_id":"p0ZoB1FwH6","_org_id":123,"customer":"fe2ce36e-7577-4dff-b33e-1c7da6f91c89","customer_email":"johndoe@epilot.cloud","metadata":[{"key":"journey-id","value":"8d0a2235-97ce-42d0-88a3-e374634ca44e"}],"billing_first_name":"john","billing_last_name":"doe","billing_company_name":"i me and myself","billing_vat":234823948,"billing_email":"johndoe@nowhere.com","billing_phone":1234234545,"billing_address":"wallstreet, 1","billing_contact":"villy or zilly","line_items":[{"id":"mSjGCTfn8w","cart_id":"p0ZoB1FwH6","description":"Wallbox Premium - Premium Price","currency":"EUR","amount_subtotal":50000,"amount_total":61500,"quantity":1,"product":{"_id":"b7185fb7-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"df240bab-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":11500,"rate":"MwSt. 23%"}]},{"id":"mZkGCTfn6p","cart_id":"p0ZoB1FwH6","description":"Wallbox Basic with Full Add-ons - Basic Price","currency":"EUR","amount_subtotal":50000,"amount_total":53500,"quantity":1,"product":{"_id":"zzzzzz-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":3500,"rate":"MwSt. 7%"}]}],"amount_subtotal":100000,"amount_total":115000,"total_details":{"amount_shipping":10000,"amount_tax":15000,"breakdown":[{"amount":11500,"rate":"MwSt. 23%"},{"amount":3500,"rate":"MwSt. 7%"}]},"_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z"}},"priceItemsPayload":{"description":"A price items payload example","value":[{"id":"mSjGCTfn8w","cart_id":"p0ZoB1FwH6","description":"Wallbox Premium - Premium Price","currency":"EUR","amount_subtotal":50000,"amount_total":61500,"quantity":1,"product":{"_id":"b7185fb7-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"df240bab-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":11500,"rate":"MwSt. 23%"}]},{"id":"mZkGCTfn6p","cart_id":"p0ZoB1FwH6","description":"Wallbox Basic with Full Add-ons - Basic Price","currency":"EUR","amount_subtotal":50000,"amount_total":53500,"quantity":1,"product":{"_id":"zzzzzz-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":3500,"rate":"MwSt. 7%"}]}]},"priceItemsResult":{"description":"A price items calculation result example","value":{"amount_subtotal":100000,"amount_total":115000,"total_details":{"amount_shipping":10000,"amount_tax":15000,"breakdown":[{"amount":11500,"rate":"MwSt. 23%"},{"amount":3500,"rate":"MwSt. 7%"}]},"items":[{"id":"mSjGCTfn8w","cart_id":"p0ZoB1FwH6","description":"Wallbox Premium - Premium Price","currency":"EUR","amount_subtotal":50000,"amount_total":61500,"quantity":1,"product":{"_id":"b7185fb7-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"df240bab-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":11500,"rate":"MwSt. 23%"}]},{"id":"mZkGCTfn6p","cart_id":"p0ZoB1FwH6","description":"Wallbox Basic with Full Add-ons - Basic Price","currency":"EUR","amount_subtotal":50000,"amount_total":53500,"quantity":1,"product":{"_id":"zzzzzz-b10f-4875-bda7-288631446555","name":"Alfen Eve Single S-line Wallbox","code":904460583,"categories":["House Connection"]},"price":{"_id":"zzzzz-9f71-4a9a-a9e1-59f18827dbf9","unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"},"taxes":[{"amount":3500,"rate":"MwSt. 7%"}]}]}},"product":{"description":"A product example","value":{"name":"Alfen Eve Single S-line Wallbox","code":"904460583","categories":["House Connection"],"type":"Product","active":true,"_id":"b7185fb7-b10f-4875-bda7-288631446555","_created_at":"2021-11-10T18:01:39.681Z","_updated_at":"2021-11-11T10:40:23.430Z","_title":"Alfen Eve Single S-line Wallbox","_tags":["product review demo"],"feature":[{"_tags":[],"feature":"Bis zu 11 kW Ladeleistung (5x schneller laden)"},{"_tags":[],"feature":"Konfigurierbare Ladeleistung"},{"_tags":[],"feature":"Zugangskontrolle über RFID-Karten"}],"_images":{"type":"image","attachments":[{"key":"files/ckvtu0lq5000108me1pdc7y4k/original","mime":"image/jpeg","name":"juice-charger-me_closeup_bottom.jpeg","size":38210,"image_url":"https://avkhavsdjq.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu0lq5000108me1pdc7y4k/original?w=100","download_url":"https://e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu0lq5000108me1pdc7y4k/original","alt_text":""},{"key":"files/ckvtu06ny000008me01xl79ot/original","mime":"image/jpeg","name":"eve-single-s-line-socket-front-_1__web_1.jpeg","size":11587,"image_url":"https://avkhavsdjq.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu06ny000008me01xl79ot/original?w=100","download_url":"https://e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu06ny000008me01xl79ot/original","alt_text":""}]},"_files":{"type":"file","attachments":[{"key":"files/ckvutl6wp00000al5cx8063nz/original","mime":"application/pdf","name":"Wallbox_Pulsar-Plus_technisches-Datenblatt.pdf","size":171501,"image_url":"https://avkhavsdjq.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvutl6wp00000al5cx8063nz/original?w=100","download_url":"https://e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvutl6wp00000al5cx8063nz/original","alt_text":""}]}}},"price":{"description":"A price example","value":{"unit_amount":"€ 789","type":"One Time","active":true,"sales_tax":"Standard (19%)","tax_behavior":"Inclusive (Price amount includes Tax)","description":"Winter Sale","billing_scheme":"Per Unit","tiers_mode":"Standard","_schema":"price","_id":"8ca293d6-89f5-4b20-98f5-fa68341ef611","_org":"739224","_created_at":"2021-11-10T18:02:58.318Z","_updated_at":"2021-11-10T18:02:58.318Z","_title":"Winter Sale"}},"fileField":{"description":"A File Field example","value":{"type":"image","attachments":[{"key":"files/ckvtu0lq5000108me1pdc7y4k/original","mime":"image/jpeg","name":"juice-charger-me_closeup_bottom.jpeg","size":38210,"image_url":"https://avkhavsdjq.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu0lq5000108me1pdc7y4k/original?w=100","download_url":"https://e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu0lq5000108me1pdc7y4k/original","alt_text":""},{"key":"files/ckvtu06ny000008me01xl79ot/original","mime":"image/jpeg","name":"eve-single-s-line-socket-front-_1__web_1.jpeg","size":11587,"image_url":"https://avkhavsdjq.cloudimg.io/v7/e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu06ny000008me01xl79ot/original?w=100","download_url":"https://e-mage-sam-bucket-dev.s3.eu-central-1.amazonaws.com/files/ckvtu06ny000008me01xl79ot/original","alt_text":""}]}}}}}')}},t={};return function a(i){if(t[i])return t[i].exports;var n=t[i]={exports:{}};return e[i].call(n.exports,n,n.exports,a),n.exports}(914)})());
|
package/dist/openapi.d.ts
CHANGED
|
@@ -96,6 +96,10 @@ declare namespace Components {
|
|
|
96
96
|
* The Order Id Number for the customer
|
|
97
97
|
*/
|
|
98
98
|
order_number?: string;
|
|
99
|
+
/**
|
|
100
|
+
* The Cart Id that originated or is associated with the order
|
|
101
|
+
*/
|
|
102
|
+
cart_id?: string;
|
|
99
103
|
/**
|
|
100
104
|
* A valid email identifying the customer.
|
|
101
105
|
* When the `customer` field is filled with an ID, this field is populated/overwritten with that customer's email.
|
|
@@ -200,6 +204,21 @@ declare namespace Components {
|
|
|
200
204
|
* Tracks a set of product prices, quantities, (discounts) and taxes.
|
|
201
205
|
*/
|
|
202
206
|
export type PriceItems = (PriceItem)[];
|
|
207
|
+
/**
|
|
208
|
+
* The result from the calculation of a set of price items.
|
|
209
|
+
*/
|
|
210
|
+
export interface PriceItemsCalculateResult {
|
|
211
|
+
items?: (PriceItems)[];
|
|
212
|
+
/**
|
|
213
|
+
* Total of all items before (discounts or) taxes are applied.
|
|
214
|
+
*/
|
|
215
|
+
amount_subtotal?: number;
|
|
216
|
+
/**
|
|
217
|
+
* Total of all items after (discounts and) taxes are applied.
|
|
218
|
+
*/
|
|
219
|
+
amount_total?: number;
|
|
220
|
+
total_details?: TotalDetails;
|
|
221
|
+
}
|
|
203
222
|
/**
|
|
204
223
|
* The product configuration
|
|
205
224
|
* example:
|
|
@@ -210,12 +229,12 @@ declare namespace Components {
|
|
|
210
229
|
export interface Product {
|
|
211
230
|
code?: string;
|
|
212
231
|
type?: "Product" | "Service";
|
|
213
|
-
categories?:
|
|
232
|
+
categories?: string[];
|
|
214
233
|
name?: string;
|
|
215
|
-
feature?:
|
|
216
|
-
_tags?:
|
|
234
|
+
feature?: {
|
|
235
|
+
_tags?: string[];
|
|
217
236
|
feature?: string;
|
|
218
|
-
}
|
|
237
|
+
}[];
|
|
219
238
|
active?: boolean;
|
|
220
239
|
_id?: string;
|
|
221
240
|
_files?: FileField;
|
|
@@ -223,7 +242,7 @@ declare namespace Components {
|
|
|
223
242
|
_created_at?: string;
|
|
224
243
|
_updated_at?: string;
|
|
225
244
|
_title?: string;
|
|
226
|
-
_tags?:
|
|
245
|
+
_tags?: string[];
|
|
227
246
|
}
|
|
228
247
|
/**
|
|
229
248
|
* A tax amount associated with a specific tax rate.
|
|
@@ -264,25 +283,18 @@ declare namespace Components {
|
|
|
264
283
|
}
|
|
265
284
|
declare namespace Paths {
|
|
266
285
|
namespace CalculatePricing {
|
|
267
|
-
export type RequestBody = Components.Schemas.PriceItems;
|
|
286
|
+
export type RequestBody = (Components.Schemas.PriceItems)[];
|
|
268
287
|
namespace Responses {
|
|
269
|
-
export type $200 = Components.Schemas.
|
|
270
|
-
export type $201 = Components.Schemas.Order;
|
|
288
|
+
export type $200 = Components.Schemas.PriceItemsCalculateResult;
|
|
271
289
|
export type $400 = Components.Schemas.Error;
|
|
272
290
|
}
|
|
273
291
|
}
|
|
274
292
|
namespace DeleteCart {
|
|
275
|
-
namespace
|
|
276
|
-
export type
|
|
277
|
-
export type $400 = Components.Schemas.Error;
|
|
293
|
+
namespace Parameters {
|
|
294
|
+
export type CartId = string;
|
|
278
295
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
export interface RequestBody {
|
|
282
|
-
/**
|
|
283
|
-
* The card_id to be finalized.
|
|
284
|
-
*/
|
|
285
|
-
cart_id?: string;
|
|
296
|
+
export interface PathParameters {
|
|
297
|
+
"cart-id": Parameters.CartId;
|
|
286
298
|
}
|
|
287
299
|
namespace Responses {
|
|
288
300
|
export type $200 = Components.Schemas.Cart;
|
|
@@ -290,6 +302,12 @@ declare namespace Paths {
|
|
|
290
302
|
}
|
|
291
303
|
}
|
|
292
304
|
namespace GetCart {
|
|
305
|
+
namespace Parameters {
|
|
306
|
+
export type CartId = string;
|
|
307
|
+
}
|
|
308
|
+
export interface PathParameters {
|
|
309
|
+
"cart-id": Parameters.CartId;
|
|
310
|
+
}
|
|
293
311
|
namespace Responses {
|
|
294
312
|
export type $200 = Components.Schemas.Cart;
|
|
295
313
|
export type $400 = Components.Schemas.Error;
|
|
@@ -300,8 +318,12 @@ declare namespace Paths {
|
|
|
300
318
|
"X-Ivy-Org-ID": Parameters.XIvyOrgID;
|
|
301
319
|
}
|
|
302
320
|
namespace Parameters {
|
|
321
|
+
export type Action = "finalize";
|
|
303
322
|
export type XIvyOrgID = string;
|
|
304
323
|
}
|
|
324
|
+
export interface QueryParameters {
|
|
325
|
+
action?: Parameters.Action;
|
|
326
|
+
}
|
|
305
327
|
export type RequestBody = Components.Schemas.Cart;
|
|
306
328
|
namespace Responses {
|
|
307
329
|
export type $200 = Components.Schemas.Cart;
|
|
@@ -310,12 +332,6 @@ declare namespace Paths {
|
|
|
310
332
|
}
|
|
311
333
|
}
|
|
312
334
|
namespace UpsertOrder {
|
|
313
|
-
namespace Parameters {
|
|
314
|
-
export type CartId = string;
|
|
315
|
-
}
|
|
316
|
-
export interface QueryParameters {
|
|
317
|
-
cart_id?: Parameters.CartId;
|
|
318
|
-
}
|
|
319
335
|
export type RequestBody = Components.Schemas.Order;
|
|
320
336
|
namespace Responses {
|
|
321
337
|
export type $200 = Components.Schemas.Order;
|
|
@@ -332,29 +348,17 @@ export interface OperationMethods {
|
|
|
332
348
|
* Creates a new cart or updates an existing one.
|
|
333
349
|
*/
|
|
334
350
|
'upsertCart'(
|
|
335
|
-
parameters?: Parameters<Paths.UpsertCart.HeaderParameters> | null,
|
|
351
|
+
parameters?: Parameters<Paths.UpsertCart.QueryParameters & Paths.UpsertCart.HeaderParameters> | null,
|
|
336
352
|
data?: Paths.UpsertCart.RequestBody,
|
|
337
353
|
config?: AxiosRequestConfig
|
|
338
354
|
): OperationResponse<Paths.UpsertCart.Responses.$200 | Paths.UpsertCart.Responses.$201 | Paths.UpsertCart.Responses.$400>
|
|
339
|
-
/**
|
|
340
|
-
* finalizeCart - finalizeCart
|
|
341
|
-
*
|
|
342
|
-
* Finalizes the cart by changing its status to 'complete'.
|
|
343
|
-
* The cart can no longer be modified after this operation.
|
|
344
|
-
*
|
|
345
|
-
*/
|
|
346
|
-
'finalizeCart'(
|
|
347
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
348
|
-
data?: Paths.FinalizeCart.RequestBody,
|
|
349
|
-
config?: AxiosRequestConfig
|
|
350
|
-
): OperationResponse<Paths.FinalizeCart.Responses.$200 | Paths.FinalizeCart.Responses.$400>
|
|
351
355
|
/**
|
|
352
356
|
* getCart - getCart
|
|
353
357
|
*
|
|
354
358
|
* Retrieves a cart by id.
|
|
355
359
|
*/
|
|
356
360
|
'getCart'(
|
|
357
|
-
parameters?: Parameters<
|
|
361
|
+
parameters?: Parameters<Paths.GetCart.PathParameters> | null,
|
|
358
362
|
data?: any,
|
|
359
363
|
config?: AxiosRequestConfig
|
|
360
364
|
): OperationResponse<Paths.GetCart.Responses.$200 | Paths.GetCart.Responses.$400>
|
|
@@ -364,24 +368,25 @@ export interface OperationMethods {
|
|
|
364
368
|
* Deletes the Cart specified and returns its content.
|
|
365
369
|
*/
|
|
366
370
|
'deleteCart'(
|
|
367
|
-
parameters?: Parameters<
|
|
371
|
+
parameters?: Parameters<Paths.DeleteCart.PathParameters> | null,
|
|
368
372
|
data?: any,
|
|
369
373
|
config?: AxiosRequestConfig
|
|
370
374
|
): OperationResponse<Paths.DeleteCart.Responses.$200 | Paths.DeleteCart.Responses.$400>
|
|
371
375
|
/**
|
|
372
376
|
* upsertOrder - upsertOrder
|
|
373
377
|
*
|
|
374
|
-
* Creates a new order or updates an existing one.
|
|
375
|
-
* The
|
|
376
|
-
* Calling the upsert multiple times will not duplicate the items on an order.
|
|
378
|
+
* Creates a new order or updates an existing one. During the creation of an order, an unique customer-readable `order_number` will be generated.
|
|
379
|
+
* The `order_number` can be used to universally identify an order within epilot platform.
|
|
377
380
|
*
|
|
378
|
-
*
|
|
381
|
+
* The upsert operation is idempotent, meaning that multiple calls will have effect just once. Calling the upsert multiple times will not duplicate the items on an order.
|
|
382
|
+
*
|
|
383
|
+
* When the the `cart_id` payload field is specified, the cart items are appended to the existing order items, or replaced in-place if they belong to the same `cart_id`.
|
|
379
384
|
*
|
|
380
385
|
* On multiple updates with the same `cart_id` the line items linked with that `cart_id` (`order.line_items[]?.metadata.cart_id`) are removed and re-added.
|
|
381
386
|
*
|
|
382
387
|
*/
|
|
383
388
|
'upsertOrder'(
|
|
384
|
-
parameters?: Parameters<
|
|
389
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
385
390
|
data?: Paths.UpsertOrder.RequestBody,
|
|
386
391
|
config?: AxiosRequestConfig
|
|
387
392
|
): OperationResponse<Paths.UpsertOrder.Responses.$200 | Paths.UpsertOrder.Responses.$201 | Paths.UpsertOrder.Responses.$400>
|
|
@@ -395,7 +400,7 @@ export interface OperationMethods {
|
|
|
395
400
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
396
401
|
data?: Paths.CalculatePricing.RequestBody,
|
|
397
402
|
config?: AxiosRequestConfig
|
|
398
|
-
): OperationResponse<Paths.CalculatePricing.Responses.$200 | Paths.CalculatePricing.Responses.$
|
|
403
|
+
): OperationResponse<Paths.CalculatePricing.Responses.$200 | Paths.CalculatePricing.Responses.$400>
|
|
399
404
|
}
|
|
400
405
|
|
|
401
406
|
export interface PathsDictionary {
|
|
@@ -406,25 +411,11 @@ export interface PathsDictionary {
|
|
|
406
411
|
* Creates a new cart or updates an existing one.
|
|
407
412
|
*/
|
|
408
413
|
'put'(
|
|
409
|
-
parameters?: Parameters<Paths.UpsertCart.HeaderParameters> | null,
|
|
414
|
+
parameters?: Parameters<Paths.UpsertCart.QueryParameters & Paths.UpsertCart.HeaderParameters> | null,
|
|
410
415
|
data?: Paths.UpsertCart.RequestBody,
|
|
411
416
|
config?: AxiosRequestConfig
|
|
412
417
|
): OperationResponse<Paths.UpsertCart.Responses.$200 | Paths.UpsertCart.Responses.$201 | Paths.UpsertCart.Responses.$400>
|
|
413
418
|
}
|
|
414
|
-
['/v1/public/cart:finalize']: {
|
|
415
|
-
/**
|
|
416
|
-
* finalizeCart - finalizeCart
|
|
417
|
-
*
|
|
418
|
-
* Finalizes the cart by changing its status to 'complete'.
|
|
419
|
-
* The cart can no longer be modified after this operation.
|
|
420
|
-
*
|
|
421
|
-
*/
|
|
422
|
-
'post'(
|
|
423
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
424
|
-
data?: Paths.FinalizeCart.RequestBody,
|
|
425
|
-
config?: AxiosRequestConfig
|
|
426
|
-
): OperationResponse<Paths.FinalizeCart.Responses.$200 | Paths.FinalizeCart.Responses.$400>
|
|
427
|
-
}
|
|
428
419
|
['/v1/cart/{cart-id}']: {
|
|
429
420
|
/**
|
|
430
421
|
* getCart - getCart
|
|
@@ -432,7 +423,7 @@ export interface PathsDictionary {
|
|
|
432
423
|
* Retrieves a cart by id.
|
|
433
424
|
*/
|
|
434
425
|
'get'(
|
|
435
|
-
parameters?: Parameters<
|
|
426
|
+
parameters?: Parameters<Paths.GetCart.PathParameters> | null,
|
|
436
427
|
data?: any,
|
|
437
428
|
config?: AxiosRequestConfig
|
|
438
429
|
): OperationResponse<Paths.GetCart.Responses.$200 | Paths.GetCart.Responses.$400>
|
|
@@ -442,7 +433,7 @@ export interface PathsDictionary {
|
|
|
442
433
|
* Deletes the Cart specified and returns its content.
|
|
443
434
|
*/
|
|
444
435
|
'delete'(
|
|
445
|
-
parameters?: Parameters<
|
|
436
|
+
parameters?: Parameters<Paths.DeleteCart.PathParameters> | null,
|
|
446
437
|
data?: any,
|
|
447
438
|
config?: AxiosRequestConfig
|
|
448
439
|
): OperationResponse<Paths.DeleteCart.Responses.$200 | Paths.DeleteCart.Responses.$400>
|
|
@@ -451,22 +442,23 @@ export interface PathsDictionary {
|
|
|
451
442
|
/**
|
|
452
443
|
* upsertOrder - upsertOrder
|
|
453
444
|
*
|
|
454
|
-
* Creates a new order or updates an existing one.
|
|
455
|
-
* The
|
|
456
|
-
*
|
|
445
|
+
* Creates a new order or updates an existing one. During the creation of an order, an unique customer-readable `order_number` will be generated.
|
|
446
|
+
* The `order_number` can be used to universally identify an order within epilot platform.
|
|
447
|
+
*
|
|
448
|
+
* The upsert operation is idempotent, meaning that multiple calls will have effect just once. Calling the upsert multiple times will not duplicate the items on an order.
|
|
457
449
|
*
|
|
458
|
-
* When the the `cart_id` is specified, the cart items are appended to the existing order items, or replaced in-place if they belong to the same `cart_id`.
|
|
450
|
+
* When the the `cart_id` payload field is specified, the cart items are appended to the existing order items, or replaced in-place if they belong to the same `cart_id`.
|
|
459
451
|
*
|
|
460
452
|
* On multiple updates with the same `cart_id` the line items linked with that `cart_id` (`order.line_items[]?.metadata.cart_id`) are removed and re-added.
|
|
461
453
|
*
|
|
462
454
|
*/
|
|
463
455
|
'put'(
|
|
464
|
-
parameters?: Parameters<
|
|
456
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
465
457
|
data?: Paths.UpsertOrder.RequestBody,
|
|
466
458
|
config?: AxiosRequestConfig
|
|
467
459
|
): OperationResponse<Paths.UpsertOrder.Responses.$200 | Paths.UpsertOrder.Responses.$201 | Paths.UpsertOrder.Responses.$400>
|
|
468
460
|
}
|
|
469
|
-
['/v1/pricing
|
|
461
|
+
['/v1/public/pricing:calculate']: {
|
|
470
462
|
/**
|
|
471
463
|
* calculatePricing - calculatePricing
|
|
472
464
|
*
|
|
@@ -477,7 +469,7 @@ export interface PathsDictionary {
|
|
|
477
469
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
478
470
|
data?: Paths.CalculatePricing.RequestBody,
|
|
479
471
|
config?: AxiosRequestConfig
|
|
480
|
-
): OperationResponse<Paths.CalculatePricing.Responses.$200 | Paths.CalculatePricing.Responses.$
|
|
472
|
+
): OperationResponse<Paths.CalculatePricing.Responses.$200 | Paths.CalculatePricing.Responses.$400>
|
|
481
473
|
}
|
|
482
474
|
}
|
|
483
475
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/pricing-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Client for epilot Pricing APIs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
},
|
|
12
12
|
"homepage": "https://gitlab.com/e-pilot/product/checkout-and-pricing/pricing#readme",
|
|
13
13
|
"keywords": [
|
|
14
|
-
"order",
|
|
14
|
+
"order",
|
|
15
|
+
"cart",
|
|
16
|
+
"pricing"
|
|
15
17
|
],
|
|
16
18
|
"scripts": {
|
|
17
19
|
"test": "jest",
|
package/src/openapi.d.ts
CHANGED
|
@@ -96,6 +96,10 @@ declare namespace Components {
|
|
|
96
96
|
* The Order Id Number for the customer
|
|
97
97
|
*/
|
|
98
98
|
order_number?: string;
|
|
99
|
+
/**
|
|
100
|
+
* The Cart Id that originated or is associated with the order
|
|
101
|
+
*/
|
|
102
|
+
cart_id?: string;
|
|
99
103
|
/**
|
|
100
104
|
* A valid email identifying the customer.
|
|
101
105
|
* When the `customer` field is filled with an ID, this field is populated/overwritten with that customer's email.
|
|
@@ -200,6 +204,21 @@ declare namespace Components {
|
|
|
200
204
|
* Tracks a set of product prices, quantities, (discounts) and taxes.
|
|
201
205
|
*/
|
|
202
206
|
export type PriceItems = (PriceItem)[];
|
|
207
|
+
/**
|
|
208
|
+
* The result from the calculation of a set of price items.
|
|
209
|
+
*/
|
|
210
|
+
export interface PriceItemsCalculateResult {
|
|
211
|
+
items?: (PriceItems)[];
|
|
212
|
+
/**
|
|
213
|
+
* Total of all items before (discounts or) taxes are applied.
|
|
214
|
+
*/
|
|
215
|
+
amount_subtotal?: number;
|
|
216
|
+
/**
|
|
217
|
+
* Total of all items after (discounts and) taxes are applied.
|
|
218
|
+
*/
|
|
219
|
+
amount_total?: number;
|
|
220
|
+
total_details?: TotalDetails;
|
|
221
|
+
}
|
|
203
222
|
/**
|
|
204
223
|
* The product configuration
|
|
205
224
|
* example:
|
|
@@ -210,12 +229,12 @@ declare namespace Components {
|
|
|
210
229
|
export interface Product {
|
|
211
230
|
code?: string;
|
|
212
231
|
type?: "Product" | "Service";
|
|
213
|
-
categories?:
|
|
232
|
+
categories?: string[];
|
|
214
233
|
name?: string;
|
|
215
|
-
feature?:
|
|
216
|
-
_tags?:
|
|
234
|
+
feature?: {
|
|
235
|
+
_tags?: string[];
|
|
217
236
|
feature?: string;
|
|
218
|
-
}
|
|
237
|
+
}[];
|
|
219
238
|
active?: boolean;
|
|
220
239
|
_id?: string;
|
|
221
240
|
_files?: FileField;
|
|
@@ -223,7 +242,7 @@ declare namespace Components {
|
|
|
223
242
|
_created_at?: string;
|
|
224
243
|
_updated_at?: string;
|
|
225
244
|
_title?: string;
|
|
226
|
-
_tags?:
|
|
245
|
+
_tags?: string[];
|
|
227
246
|
}
|
|
228
247
|
/**
|
|
229
248
|
* A tax amount associated with a specific tax rate.
|
|
@@ -264,25 +283,18 @@ declare namespace Components {
|
|
|
264
283
|
}
|
|
265
284
|
declare namespace Paths {
|
|
266
285
|
namespace CalculatePricing {
|
|
267
|
-
export type RequestBody = Components.Schemas.PriceItems;
|
|
286
|
+
export type RequestBody = (Components.Schemas.PriceItems)[];
|
|
268
287
|
namespace Responses {
|
|
269
|
-
export type $200 = Components.Schemas.
|
|
270
|
-
export type $201 = Components.Schemas.Order;
|
|
288
|
+
export type $200 = Components.Schemas.PriceItemsCalculateResult;
|
|
271
289
|
export type $400 = Components.Schemas.Error;
|
|
272
290
|
}
|
|
273
291
|
}
|
|
274
292
|
namespace DeleteCart {
|
|
275
|
-
namespace
|
|
276
|
-
export type
|
|
277
|
-
export type $400 = Components.Schemas.Error;
|
|
293
|
+
namespace Parameters {
|
|
294
|
+
export type CartId = string;
|
|
278
295
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
export interface RequestBody {
|
|
282
|
-
/**
|
|
283
|
-
* The card_id to be finalized.
|
|
284
|
-
*/
|
|
285
|
-
cart_id?: string;
|
|
296
|
+
export interface PathParameters {
|
|
297
|
+
"cart-id": Parameters.CartId;
|
|
286
298
|
}
|
|
287
299
|
namespace Responses {
|
|
288
300
|
export type $200 = Components.Schemas.Cart;
|
|
@@ -290,6 +302,12 @@ declare namespace Paths {
|
|
|
290
302
|
}
|
|
291
303
|
}
|
|
292
304
|
namespace GetCart {
|
|
305
|
+
namespace Parameters {
|
|
306
|
+
export type CartId = string;
|
|
307
|
+
}
|
|
308
|
+
export interface PathParameters {
|
|
309
|
+
"cart-id": Parameters.CartId;
|
|
310
|
+
}
|
|
293
311
|
namespace Responses {
|
|
294
312
|
export type $200 = Components.Schemas.Cart;
|
|
295
313
|
export type $400 = Components.Schemas.Error;
|
|
@@ -300,8 +318,12 @@ declare namespace Paths {
|
|
|
300
318
|
"X-Ivy-Org-ID": Parameters.XIvyOrgID;
|
|
301
319
|
}
|
|
302
320
|
namespace Parameters {
|
|
321
|
+
export type Action = "finalize";
|
|
303
322
|
export type XIvyOrgID = string;
|
|
304
323
|
}
|
|
324
|
+
export interface QueryParameters {
|
|
325
|
+
action?: Parameters.Action;
|
|
326
|
+
}
|
|
305
327
|
export type RequestBody = Components.Schemas.Cart;
|
|
306
328
|
namespace Responses {
|
|
307
329
|
export type $200 = Components.Schemas.Cart;
|
|
@@ -310,12 +332,6 @@ declare namespace Paths {
|
|
|
310
332
|
}
|
|
311
333
|
}
|
|
312
334
|
namespace UpsertOrder {
|
|
313
|
-
namespace Parameters {
|
|
314
|
-
export type CartId = string;
|
|
315
|
-
}
|
|
316
|
-
export interface QueryParameters {
|
|
317
|
-
cart_id?: Parameters.CartId;
|
|
318
|
-
}
|
|
319
335
|
export type RequestBody = Components.Schemas.Order;
|
|
320
336
|
namespace Responses {
|
|
321
337
|
export type $200 = Components.Schemas.Order;
|
|
@@ -332,29 +348,17 @@ export interface OperationMethods {
|
|
|
332
348
|
* Creates a new cart or updates an existing one.
|
|
333
349
|
*/
|
|
334
350
|
'upsertCart'(
|
|
335
|
-
parameters?: Parameters<Paths.UpsertCart.HeaderParameters> | null,
|
|
351
|
+
parameters?: Parameters<Paths.UpsertCart.QueryParameters & Paths.UpsertCart.HeaderParameters> | null,
|
|
336
352
|
data?: Paths.UpsertCart.RequestBody,
|
|
337
353
|
config?: AxiosRequestConfig
|
|
338
354
|
): OperationResponse<Paths.UpsertCart.Responses.$200 | Paths.UpsertCart.Responses.$201 | Paths.UpsertCart.Responses.$400>
|
|
339
|
-
/**
|
|
340
|
-
* finalizeCart - finalizeCart
|
|
341
|
-
*
|
|
342
|
-
* Finalizes the cart by changing its status to 'complete'.
|
|
343
|
-
* The cart can no longer be modified after this operation.
|
|
344
|
-
*
|
|
345
|
-
*/
|
|
346
|
-
'finalizeCart'(
|
|
347
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
348
|
-
data?: Paths.FinalizeCart.RequestBody,
|
|
349
|
-
config?: AxiosRequestConfig
|
|
350
|
-
): OperationResponse<Paths.FinalizeCart.Responses.$200 | Paths.FinalizeCart.Responses.$400>
|
|
351
355
|
/**
|
|
352
356
|
* getCart - getCart
|
|
353
357
|
*
|
|
354
358
|
* Retrieves a cart by id.
|
|
355
359
|
*/
|
|
356
360
|
'getCart'(
|
|
357
|
-
parameters?: Parameters<
|
|
361
|
+
parameters?: Parameters<Paths.GetCart.PathParameters> | null,
|
|
358
362
|
data?: any,
|
|
359
363
|
config?: AxiosRequestConfig
|
|
360
364
|
): OperationResponse<Paths.GetCart.Responses.$200 | Paths.GetCart.Responses.$400>
|
|
@@ -364,24 +368,25 @@ export interface OperationMethods {
|
|
|
364
368
|
* Deletes the Cart specified and returns its content.
|
|
365
369
|
*/
|
|
366
370
|
'deleteCart'(
|
|
367
|
-
parameters?: Parameters<
|
|
371
|
+
parameters?: Parameters<Paths.DeleteCart.PathParameters> | null,
|
|
368
372
|
data?: any,
|
|
369
373
|
config?: AxiosRequestConfig
|
|
370
374
|
): OperationResponse<Paths.DeleteCart.Responses.$200 | Paths.DeleteCart.Responses.$400>
|
|
371
375
|
/**
|
|
372
376
|
* upsertOrder - upsertOrder
|
|
373
377
|
*
|
|
374
|
-
* Creates a new order or updates an existing one.
|
|
375
|
-
* The
|
|
376
|
-
* Calling the upsert multiple times will not duplicate the items on an order.
|
|
378
|
+
* Creates a new order or updates an existing one. During the creation of an order, an unique customer-readable `order_number` will be generated.
|
|
379
|
+
* The `order_number` can be used to universally identify an order within epilot platform.
|
|
377
380
|
*
|
|
378
|
-
*
|
|
381
|
+
* The upsert operation is idempotent, meaning that multiple calls will have effect just once. Calling the upsert multiple times will not duplicate the items on an order.
|
|
382
|
+
*
|
|
383
|
+
* When the the `cart_id` payload field is specified, the cart items are appended to the existing order items, or replaced in-place if they belong to the same `cart_id`.
|
|
379
384
|
*
|
|
380
385
|
* On multiple updates with the same `cart_id` the line items linked with that `cart_id` (`order.line_items[]?.metadata.cart_id`) are removed and re-added.
|
|
381
386
|
*
|
|
382
387
|
*/
|
|
383
388
|
'upsertOrder'(
|
|
384
|
-
parameters?: Parameters<
|
|
389
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
385
390
|
data?: Paths.UpsertOrder.RequestBody,
|
|
386
391
|
config?: AxiosRequestConfig
|
|
387
392
|
): OperationResponse<Paths.UpsertOrder.Responses.$200 | Paths.UpsertOrder.Responses.$201 | Paths.UpsertOrder.Responses.$400>
|
|
@@ -395,7 +400,7 @@ export interface OperationMethods {
|
|
|
395
400
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
396
401
|
data?: Paths.CalculatePricing.RequestBody,
|
|
397
402
|
config?: AxiosRequestConfig
|
|
398
|
-
): OperationResponse<Paths.CalculatePricing.Responses.$200 | Paths.CalculatePricing.Responses.$
|
|
403
|
+
): OperationResponse<Paths.CalculatePricing.Responses.$200 | Paths.CalculatePricing.Responses.$400>
|
|
399
404
|
}
|
|
400
405
|
|
|
401
406
|
export interface PathsDictionary {
|
|
@@ -406,25 +411,11 @@ export interface PathsDictionary {
|
|
|
406
411
|
* Creates a new cart or updates an existing one.
|
|
407
412
|
*/
|
|
408
413
|
'put'(
|
|
409
|
-
parameters?: Parameters<Paths.UpsertCart.HeaderParameters> | null,
|
|
414
|
+
parameters?: Parameters<Paths.UpsertCart.QueryParameters & Paths.UpsertCart.HeaderParameters> | null,
|
|
410
415
|
data?: Paths.UpsertCart.RequestBody,
|
|
411
416
|
config?: AxiosRequestConfig
|
|
412
417
|
): OperationResponse<Paths.UpsertCart.Responses.$200 | Paths.UpsertCart.Responses.$201 | Paths.UpsertCart.Responses.$400>
|
|
413
418
|
}
|
|
414
|
-
['/v1/public/cart:finalize']: {
|
|
415
|
-
/**
|
|
416
|
-
* finalizeCart - finalizeCart
|
|
417
|
-
*
|
|
418
|
-
* Finalizes the cart by changing its status to 'complete'.
|
|
419
|
-
* The cart can no longer be modified after this operation.
|
|
420
|
-
*
|
|
421
|
-
*/
|
|
422
|
-
'post'(
|
|
423
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
424
|
-
data?: Paths.FinalizeCart.RequestBody,
|
|
425
|
-
config?: AxiosRequestConfig
|
|
426
|
-
): OperationResponse<Paths.FinalizeCart.Responses.$200 | Paths.FinalizeCart.Responses.$400>
|
|
427
|
-
}
|
|
428
419
|
['/v1/cart/{cart-id}']: {
|
|
429
420
|
/**
|
|
430
421
|
* getCart - getCart
|
|
@@ -432,7 +423,7 @@ export interface PathsDictionary {
|
|
|
432
423
|
* Retrieves a cart by id.
|
|
433
424
|
*/
|
|
434
425
|
'get'(
|
|
435
|
-
parameters?: Parameters<
|
|
426
|
+
parameters?: Parameters<Paths.GetCart.PathParameters> | null,
|
|
436
427
|
data?: any,
|
|
437
428
|
config?: AxiosRequestConfig
|
|
438
429
|
): OperationResponse<Paths.GetCart.Responses.$200 | Paths.GetCart.Responses.$400>
|
|
@@ -442,7 +433,7 @@ export interface PathsDictionary {
|
|
|
442
433
|
* Deletes the Cart specified and returns its content.
|
|
443
434
|
*/
|
|
444
435
|
'delete'(
|
|
445
|
-
parameters?: Parameters<
|
|
436
|
+
parameters?: Parameters<Paths.DeleteCart.PathParameters> | null,
|
|
446
437
|
data?: any,
|
|
447
438
|
config?: AxiosRequestConfig
|
|
448
439
|
): OperationResponse<Paths.DeleteCart.Responses.$200 | Paths.DeleteCart.Responses.$400>
|
|
@@ -451,22 +442,23 @@ export interface PathsDictionary {
|
|
|
451
442
|
/**
|
|
452
443
|
* upsertOrder - upsertOrder
|
|
453
444
|
*
|
|
454
|
-
* Creates a new order or updates an existing one.
|
|
455
|
-
* The
|
|
456
|
-
*
|
|
445
|
+
* Creates a new order or updates an existing one. During the creation of an order, an unique customer-readable `order_number` will be generated.
|
|
446
|
+
* The `order_number` can be used to universally identify an order within epilot platform.
|
|
447
|
+
*
|
|
448
|
+
* The upsert operation is idempotent, meaning that multiple calls will have effect just once. Calling the upsert multiple times will not duplicate the items on an order.
|
|
457
449
|
*
|
|
458
|
-
* When the the `cart_id` is specified, the cart items are appended to the existing order items, or replaced in-place if they belong to the same `cart_id`.
|
|
450
|
+
* When the the `cart_id` payload field is specified, the cart items are appended to the existing order items, or replaced in-place if they belong to the same `cart_id`.
|
|
459
451
|
*
|
|
460
452
|
* On multiple updates with the same `cart_id` the line items linked with that `cart_id` (`order.line_items[]?.metadata.cart_id`) are removed and re-added.
|
|
461
453
|
*
|
|
462
454
|
*/
|
|
463
455
|
'put'(
|
|
464
|
-
parameters?: Parameters<
|
|
456
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
465
457
|
data?: Paths.UpsertOrder.RequestBody,
|
|
466
458
|
config?: AxiosRequestConfig
|
|
467
459
|
): OperationResponse<Paths.UpsertOrder.Responses.$200 | Paths.UpsertOrder.Responses.$201 | Paths.UpsertOrder.Responses.$400>
|
|
468
460
|
}
|
|
469
|
-
['/v1/pricing
|
|
461
|
+
['/v1/public/pricing:calculate']: {
|
|
470
462
|
/**
|
|
471
463
|
* calculatePricing - calculatePricing
|
|
472
464
|
*
|
|
@@ -477,7 +469,7 @@ export interface PathsDictionary {
|
|
|
477
469
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
478
470
|
data?: Paths.CalculatePricing.RequestBody,
|
|
479
471
|
config?: AxiosRequestConfig
|
|
480
|
-
): OperationResponse<Paths.CalculatePricing.Responses.$200 | Paths.CalculatePricing.Responses.$
|
|
472
|
+
): OperationResponse<Paths.CalculatePricing.Responses.$200 | Paths.CalculatePricing.Responses.$400>
|
|
481
473
|
}
|
|
482
474
|
}
|
|
483
475
|
|