{
  "openapi": "3.0.1",
  "info": {
    "title": "Calculation Rules",
    "version": "9.1.20.0",
    "description": "Create and administer a collection of calculation rules.",
    "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 Rules",
      "description": "Provide RESTful service to calculation rules."
    }
  ],
  "paths": {
    "/calculation-rules": {
      "get": {
        "tags": [
          "Calculation Rules"
        ],
        "description": "Get a collection of Calculation Rule.",
        "operationId": "getCalculationRules",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "The calculation rule ID.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "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": "endDate",
            "in": "query",
            "description": "The time this calculation rule stops being effective. This is a SQL TIMESTAMP value. You can specify a null value. If you do not specify a value, the default value is 9999-12-31 23 59 59.0, which means that the calculation code never expires.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sequence",
            "in": "query",
            "description": "Calculation rules for the same calculation code are processed in sequence from lowest to highest value.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "The time this calculation rule begins being effective. This is a SQL TIMESTAMP value formatted as, YYYY-MM-DD HH MM SS.ff.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "taxCategoryId",
            "in": "query",
            "description": "For TaxType CalculationUsages, the TaxCategory for which this CalculationRule is effective.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "field1",
            "in": "query",
            "description": "Customizable.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "field2",
            "in": "query",
            "description": "Customizable.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "flags",
            "in": "query",
            "description": "Use to determine how this calculation rule may be combined with other calculation rules. Contains the following bit flag indicating special processing to be performed by the defaulti implementation, 1 = restricted - certain conditions must be met before the calculation rule qualifies. If this flag is not 1, then the calculation rule always qualifies. Example 1, For discount calculation rules, the customer must be in one of the associated member groups recognized by the Store as customer groups. Example 2, For shipping calculation rules, the shipping address, shipping mode and fulfillment center must match one of the shipping jurisdiction group calculation rules. Example 3, For tax calculation rules the shipping address and fulfillment center must match one of the tax jurisdiction group calculation rules.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "identifier",
            "in": "query",
            "description": "Uniquely identifies this Calculation Rule, along with its Calculation Code.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "calculationCodeId",
            "in": "query",
            "description": "The calculationCodeId of which this calculation rule is a part. You can get all the calculation codes by calling, /store/{storeId}/calculation-codes",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "calculationMethodId",
            "in": "query",
            "description": "The calculationMethodId calculates a monetary result for a set of order items.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "calculationRuleQualifyMethodId",
            "in": "query",
            "description": "The CalculationRuleQualifyMethod that determines which of a set of OrderItems should be sent to the CalculationRuleCalculateMethod.",
            "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 Rules.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationRuleCollection"
                }
              }
            }
          },
          "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 Rules"
        ],
        "description": "Create a calculation rule.",
        "operationId": "createCalculationRule",
        "requestBody": {
          "description": "A calculation rule defines how to arrive at a monetary amount for a set of order items.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationRules"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The operation was successful.",
            "content": {},
            "headers": {
              "Location": {
                "description": "The URI of the Calculation Rules .",
                "schema": {
                  "type": "string"
                }
              }
            },
            "links": {
              "GetCalculationRulesById": {
                "operationRef": "#/paths/~1calculation-rules~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-rules/{id}`.\n"
              },
              "DeleteCalculationRulesById": {
                "operationRef": "#/paths/~1calculation-rules~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-rules/{id}`.\n"
              },
              "UpdateCalculationRulesById": {
                "operationRef": "#/paths/~1calculation-rules~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-rules/{id}`.\n"
              },
              "GetCalculationRulesById-rules": {
                "operationRef": "#/paths/~1calculation-rules~1{id}~rules/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-rules/{id}/rules`.\n"
              },
              "GetCalculationRulesById-scales": {
                "operationRef": "#/paths/~1calculation-rules~1{id}~scales/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-rules/{id}/scales`.\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": "CalculationRule"
      }
    },
    "/calculation-rules/{id}": {
      "get": {
        "tags": [
          "Calculation Rules"
        ],
        "description": "Get a calculation rule.",
        "operationId": "getCalculationRuleById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The calculation rule ID.",
            "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": "A calculation rule defines how to arrive at a monetary amount for a set of order items.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationRule"
                }
              }
            }
          },
          "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 Rules"
        ],
        "description": "Delete a calculation rule.",
        "operationId": "deleteCalculationRuleById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The calculation rule ID.",
            "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 Rules"
        ],
        "description": "Update a calculation rule.",
        "operationId": "updateCalculationRuleById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The calculation rule ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "A calculation rule defines how to arrive at a monetary amount for a set of order items.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationRules"
              }
            }
          },
          "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": "CalculationRule"
      }
    },
    "/calculation-rules/{id}/scales": {
      "get": {
        "tags": [
          "Calculation Rules"
        ],
        "operationId": "getCalculationScalesOfCalculationRule",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The calculation rule ID.",
            "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-rule-scale.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculationRuleScaleCollection"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/calculation-rules/{id}/rules": {
      "get": {
        "tags": [
          "Calculation Rules"
        ],
        "operationId": "getShippingJurisdictionCalculationRulesOfCalculationRule",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The calculation rule ID.",
            "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 shipping jurisdiction calculation rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingJurisdictionCalculationRuleCollection"
                }
              }
            }
          },
          "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."
      },
      "CalculationRules": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The calculation rule ID.",
            "format": "int32"
          },
          "combination": {
            "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"
          },
          "endDate": {
            "type": "string",
            "description": "The time this calculation rule stops being effective. This is a SQL TIMESTAMP value. You can specify a null value. If you do not specify a value, the default value is 9999-12-31 23 59 59.0, which means that the calculation code never expires.",
            "format": "date-time",
            "nullable": true
          },
          "sequence": {
            "type": "number",
            "description": "Calculation rules for the same calculation code are processed in sequence from lowest to highest value.",
            "format": "double"
          },
          "startDate": {
            "type": "string",
            "description": "The time this calculation rule begins being effective. This is a SQL TIMESTAMP value formatted as, YYYY-MM-DD HH MM SS.ff.",
            "format": "date-time",
            "nullable": true
          },
          "taxCategoryId": {
            "type": "integer",
            "description": "For TaxType CalculationUsages, the TaxCategory for which this CalculationRule is effective.",
            "format": "int32",
            "nullable": true
          },
          "field1": {
            "type": "number",
            "description": "Customizable.",
            "nullable": true
          },
          "field2": {
            "type": "string",
            "description": "Customizable.",
            "nullable": true
          },
          "flags": {
            "type": "integer",
            "description": "Use to determine how this calculation rule may be combined with other calculation rules. Contains the following bit flag indicating special processing to be performed by the defaulti implementation, 1 = restricted - certain conditions must be met before the calculation rule qualifies. If this flag is not 1, then the calculation rule always qualifies. Example 1, For discount calculation rules, the customer must be in one of the associated member groups recognized by the Store as customer groups. Example 2, For shipping calculation rules, the shipping address, shipping mode and fulfillment center must match one of the shipping jurisdiction group calculation rules. Example 3, For tax calculation rules the shipping address and fulfillment center must match one of the tax jurisdiction group calculation rules.",
            "format": "int32"
          },
          "identifier": {
            "type": "integer",
            "description": "Uniquely identifies this Calculation Rule, along with its Calculation Code.",
            "format": "int32"
          },
          "calculationCodeId": {
            "type": "integer",
            "description": "The calculationCodeId of which this calculation rule is a part. You can get all the calculation codes by calling, /store/{storeId}/calculation-codes",
            "format": "int32"
          },
          "calculationMethodId": {
            "type": "integer",
            "description": "The calculationMethodId calculates a monetary result for a set of order items.",
            "format": "int32"
          },
          "calculationRuleQualifyMethodId": {
            "type": "integer",
            "description": "The CalculationRuleQualifyMethod that determines which of a set of OrderItems should be sent to the CalculationRuleCalculateMethod.",
            "format": "int32"
          }
        }
      },
      "CalculationRule": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The calculation rule ID.",
            "format": "int32"
          },
          "combination": {
            "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"
          },
          "endDate": {
            "type": "string",
            "description": "The time this calculation rule stops being effective. This is a SQL TIMESTAMP value. You can specify a null value. If you do not specify a value, the default value is 9999-12-31 23 59 59.0, which means that the calculation code never expires.",
            "format": "date-time",
            "nullable": true
          },
          "sequence": {
            "type": "number",
            "description": "Calculation rules for the same calculation code are processed in sequence from lowest to highest value.",
            "format": "double"
          },
          "startDate": {
            "type": "string",
            "description": "The time this calculation rule begins being effective. This is a SQL TIMESTAMP value formatted as, YYYY-MM-DD HH MM SS.ff.",
            "format": "date-time",
            "nullable": true
          },
          "taxCategoryId": {
            "type": "integer",
            "description": "For TaxType CalculationUsages, the TaxCategory for which this CalculationRule is effective.",
            "format": "int32",
            "nullable": true
          },
          "field1": {
            "type": "number",
            "description": "Customizable.",
            "nullable": true
          },
          "field2": {
            "type": "string",
            "description": "Customizable.",
            "nullable": true
          },
          "flags": {
            "type": "integer",
            "description": "Use to determine how this calculation rule may be combined with other calculation rules. Contains the following bit flag indicating special processing to be performed by the defaulti implementation, 1 = restricted - certain conditions must be met before the calculation rule qualifies. If this flag is not 1, then the calculation rule always qualifies. Example 1, For discount calculation rules, the customer must be in one of the associated member groups recognized by the Store as customer groups. Example 2, For shipping calculation rules, the shipping address, shipping mode and fulfillment center must match one of the shipping jurisdiction group calculation rules. Example 3, For tax calculation rules the shipping address and fulfillment center must match one of the tax jurisdiction group calculation rules.",
            "format": "int32"
          },
          "identifier": {
            "type": "integer",
            "description": "Uniquely identifies this Calculation Rule, along with its Calculation Code.",
            "format": "int32"
          },
          "calculationCodeId": {
            "type": "integer",
            "description": "The calculationCodeId of which this calculation rule is a part. You can get all the calculation codes by calling, /store/{storeId}/calculation-codes",
            "format": "int32"
          },
          "calculationMethodId": {
            "type": "integer",
            "description": "The calculationMethodId calculates a monetary result for a set of order items.",
            "format": "int32"
          },
          "calculationRuleQualifyMethodId": {
            "type": "integer",
            "description": "The CalculationRuleQualifyMethod that determines which of a set of OrderItems should be sent to the CalculationRuleCalculateMethod.",
            "format": "int32"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "scales": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "rules": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "description": "A calculation rule defines how to arrive at a monetary amount for a set of order items."
      },
      "CalculationRuleCollection": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/CalculationRule"
            }
          },
          "href": {
            "type": "string"
          }
        },
        "description": "A collection of Calculation Rules."
      },
      "CalculationRuleScale": {
        "type": "object",
        "properties": {
          "calculationScaleId": {
            "type": "integer",
            "description": "The calculation scale ID.",
            "format": "int32"
          },
          "calculationRuleId": {
            "type": "integer",
            "description": "The calculation rule ID.",
            "format": "int32"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "description": "A calculation-rule-scale."
      },
      "CalculationRuleScaleCollection": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/CalculationRuleScale"
            }
          },
          "href": {
            "type": "string"
          }
        },
        "description": "A collection of calculation-rule-scale."
      },
      "ShippingJurisdictionCalculationRule": {
        "required": [
          "id",
          "calculationRuleId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The shipping jurisdiction calculation rule ID.",
            "format": "int32"
          },
          "precedence": {
            "type": "number",
            "description": "When a shipping address falls within more than one of the specified ShippingJurisdictionGroups, for the same FulfillmentCenter and ShippingMode, only the CalculationRule with the highest SHPJCRULE.PRECEDENCE value qualifies.",
            "format": "double"
          },
          "calculationRuleId": {
            "type": "integer",
            "description": "The calculation rule ID.",
            "format": "int32"
          },
          "jurisdictionGroupId": {
            "type": "integer",
            "description": "The jurisdiction group ID.",
            "format": "int32"
          },
          "fulfillmentCenterId": {
            "type": "integer",
            "description": "The fulfillment center ID.",
            "format": "int32",
            "nullable": true
          },
          "shippingModeId": {
            "type": "integer",
            "description": "The shipping mode ID.",
            "format": "int32"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "description": "A Shipping jurisdiction calculation rule."
      },
      "ShippingJurisdictionCalculationRuleCollection": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/ShippingJurisdictionCalculationRule"
            }
          },
          "href": {
            "type": "string"
          }
        },
        "description": "A collection of shipping jurisdiction calculation rule."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ]
}
