Skip to content

Commit

Permalink
Updated API from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Jan 13, 2025
1 parent e3d5bc9 commit ed2b07d
Show file tree
Hide file tree
Showing 74 changed files with 3,356 additions and 0 deletions.
31 changes: 31 additions & 0 deletions api-specs/mist/annotations.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#%RAML 1.0 Library
usage: Generator annotation types.

annotationTypes:
methodName:
type: string
package:
description: |
Allows to specify a target package for a generator for a RAML library.
This package name should be a language indepedent logical name (e.g. "products"), which a generator then uses to
generate a language-specific package name (e.g. "com.myapi.jvm.products") from its configuration.
allowedTargets:
- Library
type: string
beta:
type: boolean
enumDescriptions:
description: |
Allows to describe the values of an enum type.
type: object
properties:
//:
description: |
Adds a description for the enum value given by the key.
type: string
products:
allowedTargets:
- API
type: array
items:
type: string
17 changes: 17 additions & 0 deletions api-specs/mist/api.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#%RAML 1.0
---
title: commercetools MIST API
uses:
annotations: annotations.raml
(annotations.products):
- InStore
version: v1
mediaType: application/json
baseUri: https://api.nebulaterra.com
types: !include types/types.raml

/location: !include resources/location.raml
/role: !include resources/role.raml
/session: !include resources/session.raml
/workstation: !include resources/workstation.raml
/workstations: !include resources/workstations.raml
77 changes: 77 additions & 0 deletions api-specs/mist/examples/callbacks/cart-retrieval-response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"location": "001",
"workstation": "01",
"reference": "001010500813",
"customer": {
"customer_number": "jr5129991111",
"salutation": "",
"first_name": "Jerry",
"middle_name": "",
"last_name": "Rightmer"
},
"carts": [
{
"id": "001010500813",
"type": "sale",
"transaction_line_items": [
{
"cart_item_id": "1ca6823d-1c7d-42ec-af4f-a93da38f1178",
"item_id": "sling-bagCB20Q",
"description": "Sling Bag",
"quantity": 1,
"price": 2895,
"extended_price": 2895,
"tax_code": "US",
"price_modifiers": [{ "description": "discount", "amount": 579 }],
"gift_receipt": false,
"attributes": [{ "label": "brand", "value": "Varsity" }]
}
],
"cart_total": 2455,
"cart_origin": "commercetools",
"gift_receipt": false
},
{
"id": "001010500813",
"type": "order",
"transaction_line_items": [
{
"cart_item_id": "eff2925d-f3de-47c2-a8d4-183b3d275b8f",
"item_id": "racerbacktank395795492701",
"description": "Distance Lite Splice Back Tank",
"quantity": 1,
"price": 5000,
"extended_price": 5000,
"tax_code": "US",
"price_modifiers": [{ "description": "discount", "amount": 1000 }],
"gift_receipt": false,
"attributes": [
{ "label": "size", "value": "M" },
{ "label": "color", "value": "Dark Blue" },
{ "label": "brand", "value": "Peloton" }
]
}
],
"cart_total": 4240,
"cart_origin": "commercetools",
"gift_receipt": false
}
],
"currency": "USD",
"locale": "en-US",
"total_gross": 8815,
"total_net": 8316,
"total_tax": 499,
"total_saved": 1579,
"tax_included_in_price": false,
"tax_summary": [
{
"code": "US",
"total_net": 8317,
"total_gross": 8816,
"tax_rate": 6,
"total_tax": 499,
"tax_included_in_price": false
}
]
}
4 changes: 4 additions & 0 deletions api-specs/mist/examples/callbacks/item-attribute.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "brand",
"value": "Varsity"
}
4 changes: 4 additions & 0 deletions api-specs/mist/examples/callbacks/price-modifier.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"description": "discount",
"amount": 579
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"location": "001",
"workstation": "01",
"reference": "001010499453",
"carts": [
{
"id": "001010150829",
"type": "return",
"transaction_line_items": [
{
"cart_item_id": "6a35471a-0021-4cc6-978d-22ee6dfe7798",
"item_id": "90s-jeans",
"description": "Super High Waisted Light Wash Front Seam 90s Slim Jeans",
"quantity": 1,
"price": 5600,
"extended_price": 5600,
"tax_code": "US",
"price_modifiers": [{ "description": "discount", "amount": 1120 }],
"gift_receipt": false,
"attributes": [
{ "label": "size", "value": "2" },
{ "label": "color", "value": "Light Wash" },
{ "label": "brand", "value": "Express" }
],
"original_line_id": "3f19705f-f89e-46c6-99bf-0b511c0edbbc",
"return_reason": "Wrong size"
}
],
"tender_line_items": [
{
"tender_type": "Credit",
"amount": 10158,
"currency": "USD",
"processor": "Stripe",
"processor_id": "pi_3OD88AC24rtrkoWS1yMbPozG",
"last4": "4242",
"brand": "visa",
"account_type": "credit",
"application_preferred_name": "",
"dedicated_file_name": "",
"authorization_response_code": "3030",
"application_cryptogram": "",
"terminal_verification_results": "",
"transaction_status_information": "",
"refunded": 0
}
],
"cart_total": 4838,
"cart_origin": "commercetools",
"gift_receipt": false
},
{
"id": "unknown",
"type": "return",
"transaction_line_items": [
{
"cart_item_id": "7b3313d6-2c28-4ec1-8859-31911a3d0bf2",
"item_id": "davidoffcoolwater2493205",
"description": "Davidoff Cool Water for Men Eau De Toilette Spray 125mL",
"quantity": 1,
"price": 2565,
"extended_price": 2565,
"tax_code": "US",
"price_modifiers": [],
"gift_receipt": false,
"attributes": [{ "label": "brand", "value": "Davidoff" }],
"original_line_id": "unknown",
"return_reason": "no_longer_needed"
}
],
"tender_line_items": [],
"cart_total": 2719,
"cart_origin": "commercetools",
"gift_receipt": false
}
],
"currency": "USD",
"locale": "en-US",
"total_gross": 7468,
"total_net": 7045,
"total_tax": 423,
"total_saved": 0,
"tax_included_in_price": false,
"tax_summary": [
{
"code": "US",
"total_net": 7050,
"total_gross": 7473,
"tax_rate": 6,
"total_tax": 423,
"tax_included_in_price": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJKV1IiLCJ0ZW5hbnRfaWQiOiJkNDM4LTZlNjgtNGMwMC0zYzYxIiwic2Vzc2lvbl9pZCI6InRyYW5zaWVudCIsInNjb3BlcyI6WyJjYXNoaW4iLCJwYXltZW50Iiwic2FmZWRlcG9zaXQiLCJkZXZpY2VtYW5hZ2VtZW50IiwiY2FzaG91dCIsInJlZnVuZCIsImNhc2hjb3VudCIsInRyYW5zZmVyaW4iLCJjYXNoYXVkaXQiLCJ0cmFuc2Zlcm91dCIsImJhbmtkZXBvc2l0IiwicmVwcmludCJdLCJ1c2VyX2lkIjoiSldSIiwiaWF0IjoxNzAxMDU0MjM1LCJleHAiOjE3MDEwOTc0MzV9.y0aKUzaDHA5t7--OzhIlMOz2XucCPoYwM8yVmQFS4uw"
}
30 changes: 30 additions & 0 deletions api-specs/mist/examples/locations/location.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"__v": 0,
"_id": "601b651e291fbe4692a3a876",
"address_line_1": "123133",
"address_line_2": "45677",
"aliases": null,
"alternate_currencies": null,
"card_payment_provider": "Simulator",
"gift_card_processor": "None",
"citcon_token": "A59EC58D",
"city": null,
"country": "USA",
"created_at": "2021-02-04T03:08:14.634Z",
"description": "Barton Creek Mall",
"locale": "en-US",
"location_id": "002",
"location_name": "Store 002",
"parameters": "JL Params",
"postal_code": "7875491",
"safe_id": "03",
"state": "",
"status": "active",
"supported_languages": null,
"telephone_number": null,
"templates": "JL templates",
"tenant_id": "b12c-caf4-37e0-94a1",
"type": "01",
"updated_at": "2023-05-25T04:58:31.962Z",
"wallet_processor": "Citcon"
}
Loading

0 comments on commit ed2b07d

Please sign in to comment.