{
  "openapi": "3.0.1",
  "info": {
    "title": "Calculation Codes",
    "version": "9.1.20.0",
    "description": "Create and administer a collection of calculation codes.",
    "x-introduced": "9.1.0.0"
  },
  "servers": [
    {
      "url": "https://{hostname}:{port}/rest/admin/v2",
      "variables": {
        "port": {
          "default": "443",
          "enum": [
            "443",
            "8000"
          ]
        },
        "hostname": {
          "default": "localhost",
          "enum": [
            "localhost",
            "test.hcl.com"
          ]
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Calculation Codes",
      "description": "Provide RESTful services to manage Calculation Codes."
    }
  ],
  "paths": {
    "/calculation-codes": {
      "get": {
        "tags": [
          "Calculation Codes"
        ],
        "description": "Get a collection of calculation codes.",
        "operationId": "getCalculationCodes",
        "parameters": [
          {
            "name": "searchString",
            "in": "query",
            "description": "Limits search results to only include calculation codes with a calculationCode that matches the value of this parameter. Searches are case-insensitive.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "The unique numeric ID for identifying the calculation Code.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "excludeId",
            "in": "query",
            "description": "The unique numeric ID for identifying calculation codes to be excluded from the result set.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "calculationCode",
            "in": "query",
            "description": "The external identifier or name for identifying the calculation code, given a particular calculation usage and store ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "combination",
            "in": "query",
            "description": "Specify the bit flag to determine how this calculation rule can be combined with other calculation rules, 0 = The rule can be combined with any other rule. 1 = The rule can only be combined with rules that have the combination type 0 rules. 2 = The rule cannot be combined with rules that have the combination type 1.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "groupBy",
            "in": "query",
            "description": "A Bit flag to indicate how the calculation method groups order items when performing calculations. Each group of order itmes is used to calculate a monetary amount, which is applied separately. The default calculation method recognizes the following groupings, 1 by product - Order items with different catalog entries should be grouped separately. When a catalog entry has a parent catalog entry, then the parent catalog entry is used instead. 2 by trading agreement - Order items with different trading agreements should be grouped separately. 4 by offer - Order items with different Offers should be grouped separately. 8 by address - Order items with different shipping addresses should be grouped separately. Bit flags can be added together to combine groupings. For example, 0 = No grouping. Place all applicable order items in a single group. 1 = Use for product grouping. 2 = Use for trading agreement grouping. 3 = Use for product and for trading agreement grouping. 4 = Use for offer grouping. 6 = Use for offer and for trading agreement grouping. 9 = Use for product and for address grouping.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "published",
            "in": "query",
            "description": "Specifies whether or not the calculation code is published, 0 = not published (temporarily disabled). 1 = published.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "sequence",
            "in": "query",
            "description": "When multiple calculation codes with the same calculation usage are processed, they are processed in ascending order based on the numeric values of this property.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "storeId",
            "in": "query",
            "description": "The store ID this calculation code is associated with.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "taxCodeClassId",
            "in": "query",
            "description": "If this calculation code is used to calculate taxes, then it can be grouped together with other tax calculation codes into a tax code classification. When the calculation code is used for shipping, this value can be null.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "updatedDate",
            "in": "query",
            "description": "The time this calculation code was most recently updated.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "field1",
            "in": "query",
            "description": "A customizable field.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "A brief description of this calculation code, suitable for display by a user interface that manages calculation codes.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "displayLevel",
            "in": "query",
            "description": "Amounts calculated by this calculation code should be displayed with each, 0 = OrderItem, 1 = Order, 2 = Product, 3 = Item, 4 = Contract.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "The date and time this calculation code begins being effective.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "The date and time this calculation code stops being effective.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "precedence",
            "in": "query",
            "description": "Reserved for HCL Internal use.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "calculationUsageId",
            "in": "query",
            "description": "default is, -2. The calculation usage identifier. Indicates the kind of calculation this calculation code is used for. For example, the calculation code may be used to calculate one of the following monetary amounts, discounts, shipping charges, sales tax, or shipping tax. Out of box, -1 is for Discount, -2 is for Shipping, -3 is for Sales Tax. -4 is for Shipping Tax, -5 is for Coupon and -6 is for surcharge. For shipping always use the value -2.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "calculationMethodId",
            "in": "query",
            "description": "default is, -23. The calculation code calculate method that defines how to calculate a monetary amount for this calculation code. For shipping, the calculation method ID must be -23.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "calculationCodeApplyMethodId",
            "in": "query",
            "description": "default is, -24. The calculation code apply method that stores the calculated amount for the associated order items. For shipping, the calculation code apply method ID must be -24.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "calculationCodeQualifyMethodId",
            "in": "query",
            "description": "default is, -22. The calculation code qualify method that defines which order items are associated with this valculation code. For shipping, the calculation code qualify methodID must be -22.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "calculationCodeQualifyMethodMode",
            "in": "query",
            "description": "The mode which controls whether the qualify calculation method ID (calculationCodeQualifyMethodId) of this calculation code should be invoked. Allowed values are, 0 = unrestricted, the method will not be invoked, and 1 = restricted, the method will be invoked. Default is 0.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The position within the resulting dataset where the query begins returning item records. If the offset is \"5\", the records that returned begin with the sixth record that matches the query parameters. If the offset is \"0\", the records that are returned begin with the first record that matches the query parameters.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of records to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "The comma-separated set of properties which controls the order of the items being listed, prefixed by either (-) to sort by descending order, or optionally (+) to sort by ascending order. For example, sort=name,-d which means, order the items based on the name value in ascending order, then by the id value in descending order.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A collection of calculation Codes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationCodeCollection"
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Calculation Codes"
        ],
        "description": "Create a calculation code.",
        "operationId": "createCalculationCode",
        "requestBody": {
          "description": "The calculation code.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationCodes"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The operation was successful.",
            "content": {},
            "headers": {
              "Location": {
                "description": "The URI of the calculation codes.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "links": {
              "GetCalculationCodeById": {
                "operationRef": "#/paths/~1calculation-codes~1{id}/get",
                "parameters": {
                  "id": "$request.body#/id"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `GET /calculation-codes/{id}`.\n"
              },
              "DeleteCalculationCodeById": {
                "operationRef": "#/paths/~1calculation-codes~1{id}/delete",
                "parameters": {
                  "id": "$request.body#/id"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `DELETE /calculation-codes/{id}`.\n"
              },
              "UpdateCalculationCodeById": {
                "operationRef": "#/paths/~1calculation-codes~1{id}/patch",
                "parameters": {
                  "id": "$request.body#/id"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `PATCH /calculation-codes/{id}`.\n"
              },
              "GetCalculationCodeDescriptionById": {
                "operationRef": "#/paths/~1calculation-codes~1{id}~1descriptions/get",
                "parameters": {
                  "id": "$request.body#/id"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `GET /calculation-codes/{id}/descriptions`.\n"
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "CalculationCode"
      }
    },
    "/calculation-codes/{id}": {
      "get": {
        "tags": [
          "Calculation Codes"
        ],
        "description": "Get a calculation code.",
        "operationId": "getCalculationCodeById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique numeric ID for identifying the calculation Code.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "The comma-separated set of properties which controls the order of the items being listed, prefixed by either (-) to sort by descending order, or optionally (+) to sort by ascending order. For example, sort=name,-d which means, order the items based on the name value in ascending order, then by the id value in descending order.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The calculation code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationCode"
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Calculation Codes"
        ],
        "description": "Delete a calculation code.",
        "operationId": "deleteCalculationCodeById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique numeric ID for identifying the calculation Code.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The operation was successful.",
            "content": {}
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Calculation Codes"
        ],
        "description": "Update a calculation code.",
        "operationId": "updateCalculationCodeById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique numeric ID for identifying the calculation Code.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The calculation code.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationCodes"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The operation was successful.",
            "content": {}
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "CalculationCode"
      }
    },
    "/calculation-codes/{id}/descriptions": {
      "get": {
        "tags": [
          "Calculation Codes"
        ],
        "operationId": "getDescriptionsOfCalculationCode",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique numeric ID for identifying the calculation Code.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The position within the resulting dataset where the query begins returning item records. If the offset is \"5\", the records that returned begin with the sixth record that matches the query parameters. If the offset is \"0\", the records that are returned begin with the first record that matches the query parameters.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of records to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "The comma-separated set of properties which controls the order of the items being listed, prefixed by either (-) to sort by descending order, or optionally (+) to sort by ascending order. For example, sort=name,-d which means, order the items based on the name value in ascending order, then by the id value in descending order.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A collection of calculation code descriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationCodeDescriptionCollection"
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "The error message code."
          },
          "errorMessage": {
            "type": "string",
            "description": "The error message."
          },
          "errorKey": {
            "type": "string",
            "description": "The error message key."
          },
          "errorParameters": {
            "type": "array",
            "description": "The arguments used to construct the error message.",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "errorLevel": {
            "type": "string",
            "description": "The error level."
          },
          "errorHref": {
            "type": "string",
            "description": "The error hypertext reference."
          }
        },
        "description": "The error message item model."
      },
      "ErrorResponseContainer": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "description": "The request identifier."
          },
          "errors": {
            "type": "array",
            "description": "The errors.",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The error message model."
      },
      "CalculationCodes": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The unique numeric ID for identifying the calculation Code.",
            "format": "int32"
          },
          "calculationCode": {
            "type": "string",
            "description": "The external identifier or name for identifying the calculation code, given a particular calculation usage and store ID."
          },
          "combination": {
            "nullable": true,
            "type": "integer",
            "description": "Specify the bit flag to determine how this calculation rule can be combined with other calculation rules, 0 = The rule can be combined with any other rule. 1 = The rule can only be combined with rules that have the combination type 0 rules. 2 = The rule cannot be combined with rules that have the combination type 1.",
            "format": "int32"
          },
          "groupBy": {
            "type": "integer",
            "description": "A Bit flag to indicate how the calculation method groups order items when performing calculations. Each group of order itmes is used to calculate a monetary amount, which is applied separately. The default calculation method recognizes the following groupings, 1 by product - Order items with different catalog entries should be grouped separately. When a catalog entry has a parent catalog entry, then the parent catalog entry is used instead. 2 by trading agreement - Order items with different trading agreements should be grouped separately. 4 by offer - Order items with different Offers should be grouped separately. 8 by address - Order items with different shipping addresses should be grouped separately. Bit flags can be added together to combine groupings. For example, 0 = No grouping. Place all applicable order items in a single group. 1 = Use for product grouping. 2 = Use for trading agreement grouping. 3 = Use for product and for trading agreement grouping. 4 = Use for offer grouping. 6 = Use for offer and for trading agreement grouping. 9 = Use for product and for address grouping.",
            "format": "int32"
          },
          "published": {
            "type": "integer",
            "description": "Specifies whether or not the calculation code is published, 0 = not published (temporarily disabled). 1 = published.",
            "format": "int32"
          },
          "sequence": {
            "type": "number",
            "description": "When multiple calculation codes with the same calculation usage are processed, they are processed in ascending order based on the numeric values of this property.",
            "format": "double"
          },
          "storeId": {
            "type": "integer",
            "description": "The store ID this calculation code is associated with.",
            "format": "int32"
          },
          "taxCodeClassId": {
            "nullable": true,
            "type": "integer",
            "description": "If this calculation code is used to calculate taxes, then it can be grouped together with other tax calculation codes into a tax code classification. When the calculation code is used for shipping, this value can be null.",
            "format": "int32"
          },
          "updatedDate": {
            "nullable": true,
            "type": "string",
            "description": "The time this calculation code was most recently updated.",
            "format": "date-time"
          },
          "field1": {
            "nullable": true,
            "type": "string",
            "description": "A customizable field."
          },
          "description": {
            "nullable": true,
            "type": "string",
            "description": "A brief description of this calculation code, suitable for display by a user interface that manages calculation codes."
          },
          "displayLevel": {
            "type": "integer",
            "description": "Amounts calculated by this calculation code should be displayed with each, 0 = OrderItem, 1 = Order, 2 = Product, 3 = Item, 4 = Contract.",
            "format": "int32"
          },
          "startDate": {
            "nullable": true,
            "type": "string",
            "description": "The date and time this calculation code begins being effective.",
            "format": "date-time"
          },
          "endDate": {
            "nullable": true,
            "type": "string",
            "description": "The date and time this calculation code stops being effective.",
            "format": "date-time"
          },
          "precedence": {
            "type": "number",
            "description": "Reserved for HCL Internal use.",
            "format": "double"
          },
          "calculationUsageId": {
            "type": "integer",
            "description": "default is, -2. The calculation usage identifier. Indicates the kind of calculation this calculation code is used for. For example, the calculation code may be used to calculate one of the following monetary amounts, discounts, shipping charges, sales tax, or shipping tax. Out of box, -1 is for Discount, -2 is for Shipping, -3 is for Sales Tax. -4 is for Shipping Tax, -5 is for Coupon and -6 is for surcharge. For shipping always use the value -2.",
            "format": "int32"
          },
          "calculationMethodId": {
            "type": "integer",
            "description": "default is, -23. The calculation code calculate method that defines how to calculate a monetary amount for this calculation code. For shipping, the calculation method ID must be -23.",
            "format": "int32"
          },
          "calculationCodeApplyMethodId": {
            "type": "integer",
            "description": "default is, -24. The calculation code apply method that stores the calculated amount for the associated order items. For shipping, the calculation code apply method ID must be -24.",
            "format": "int32"
          },
          "calculationCodeQualifyMethodId": {
            "type": "integer",
            "description": "default is, -22. The calculation code qualify method that defines which order items are associated with this valculation code. For shipping, the calculation code qualify methodID must be -22.",
            "format": "int32"
          },
          "calculationCodeQualifyMethodMode": {
            "type": "integer",
            "description": "The mode which controls whether the qualify calculation method ID (calculationCodeQualifyMethodId) of this calculation code should be invoked. Allowed values are, 0 = unrestricted, the method will not be invoked, and 1 = restricted, the method will be invoked. Default is 0.",
            "format": "int32"
          }
        }
      },
      "CalculationCode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The unique numeric ID for identifying the calculation Code.",
            "format": "int32"
          },
          "calculationCode": {
            "type": "string",
            "description": "The external identifier or name for identifying the calculation code, given a particular calculation usage and store ID."
          },
          "combination": {
            "nullable": true,
            "type": "integer",
            "description": "Specify the bit flag to determine how this calculation rule can be combined with other calculation rules, 0 = The rule can be combined with any other rule. 1 = The rule can only be combined with rules that have the combination type 0 rules. 2 = The rule cannot be combined with rules that have the combination type 1.",
            "format": "int32"
          },
          "groupBy": {
            "type": "integer",
            "description": "A Bit flag to indicate how the calculation method groups order items when performing calculations. Each group of order itmes is used to calculate a monetary amount, which is applied separately. The default calculation method recognizes the following groupings, 1 by product - Order items with different catalog entries should be grouped separately. When a catalog entry has a parent catalog entry, then the parent catalog entry is used instead. 2 by trading agreement - Order items with different trading agreements should be grouped separately. 4 by offer - Order items with different Offers should be grouped separately. 8 by address - Order items with different shipping addresses should be grouped separately. Bit flags can be added together to combine groupings. For example, 0 = No grouping. Place all applicable order items in a single group. 1 = Use for product grouping. 2 = Use for trading agreement grouping. 3 = Use for product and for trading agreement grouping. 4 = Use for offer grouping. 6 = Use for offer and for trading agreement grouping. 9 = Use for product and for address grouping.",
            "format": "int32"
          },
          "published": {
            "type": "integer",
            "description": "Specifies whether or not the calculation code is published, 0 = not published (temporarily disabled). 1 = published.",
            "format": "int32"
          },
          "sequence": {
            "type": "number",
            "description": "When multiple calculation codes with the same calculation usage are processed, they are processed in ascending order based on the numeric values of this property.",
            "format": "double"
          },
          "storeId": {
            "type": "integer",
            "description": "The store ID this calculation code is associated with.",
            "format": "int32"
          },
          "taxCodeClassId": {
            "nullable": true,
            "type": "integer",
            "description": "If this calculation code is used to calculate taxes, then it can be grouped together with other tax calculation codes into a tax code classification. When the calculation code is used for shipping, this value can be null.",
            "format": "int32"
          },
          "updatedDate": {
            "nullable": true,
            "type": "string",
            "description": "The time this calculation code was most recently updated.",
            "format": "date-time"
          },
          "field1": {
            "nullable": true,
            "type": "string",
            "description": "A customizable field."
          },
          "description": {
            "nullable": true,
            "type": "string",
            "description": "A brief description of this calculation code, suitable for display by a user interface that manages calculation codes."
          },
          "displayLevel": {
            "type": "integer",
            "description": "Amounts calculated by this calculation code should be displayed with each, 0 = OrderItem, 1 = Order, 2 = Product, 3 = Item, 4 = Contract.",
            "format": "int32"
          },
          "startDate": {
            "nullable": true,
            "type": "string",
            "description": "The date and time this calculation code begins being effective.",
            "format": "date-time"
          },
          "endDate": {
            "nullable": true,
            "type": "string",
            "description": "The date and time this calculation code stops being effective.",
            "format": "date-time"
          },
          "precedence": {
            "type": "number",
            "description": "Reserved for HCL Internal use.",
            "format": "double"
          },
          "calculationUsageId": {
            "type": "integer",
            "description": "default is, -2. The calculation usage identifier. Indicates the kind of calculation this calculation code is used for. For example, the calculation code may be used to calculate one of the following monetary amounts, discounts, shipping charges, sales tax, or shipping tax. Out of box, -1 is for Discount, -2 is for Shipping, -3 is for Sales Tax. -4 is for Shipping Tax, -5 is for Coupon and -6 is for surcharge. For shipping always use the value -2.",
            "format": "int32"
          },
          "calculationMethodId": {
            "type": "integer",
            "description": "default is, -23. The calculation code calculate method that defines how to calculate a monetary amount for this calculation code. For shipping, the calculation method ID must be -23.",
            "format": "int32"
          },
          "calculationCodeApplyMethodId": {
            "type": "integer",
            "description": "default is, -24. The calculation code apply method that stores the calculated amount for the associated order items. For shipping, the calculation code apply method ID must be -24.",
            "format": "int32"
          },
          "calculationCodeQualifyMethodId": {
            "type": "integer",
            "description": "default is, -22. The calculation code qualify method that defines which order items are associated with this valculation code. For shipping, the calculation code qualify methodID must be -22.",
            "format": "int32"
          },
          "calculationCodeQualifyMethodMode": {
            "type": "integer",
            "description": "The mode which controls whether the qualify calculation method ID (calculationCodeQualifyMethodId) of this calculation code should be invoked. Allowed values are, 0 = unrestricted, the method will not be invoked, and 1 = restricted, the method will be invoked. Default is 0.",
            "format": "int32"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "descriptions": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "description": "The calculation code."
      },
      "CalculationCodeCollection": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/CalculationCode"
            }
          },
          "href": {
            "type": "string"
          }
        },
        "description": "A collection of calculation Codes."
      },
      "CalculationCodeDescription": {
        "type": "object",
        "properties": {
          "calculationCodeId": {
            "type": "integer",
            "description": "The calculation code ID.",
            "format": "int32"
          },
          "languageId": {
            "type": "integer",
            "description": "The language ID for which this information applies.",
            "format": "int32"
          },
          "description": {
            "type": "string",
            "description": "A short description of the calculation code."
          },
          "longDescription": {
            "type": "string",
            "description": "A detailed description of the calculation code."
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "description": "The calculation code description."
      },
      "CalculationCodeDescriptionCollection": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/CalculationCodeDescription"
            }
          },
          "href": {
            "type": "string"
          }
        },
        "description": "A collection of calculation code descriptions."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ]
}
