Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the descriptions of request bodies
- Loading branch information
Showing
6 changed files
with
183 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
api_docs/swagger/components/requestBodies/renewal/partner_order_payload.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
partner_order: | ||
required: true | ||
type: object | ||
description: Object which represents the order to be renewed. | ||
properties: | ||
oem_token: | ||
$ref: '/swagger/components/requestBodies/fields.yaml#/oem_token' | ||
purchased_at: | ||
$ref: '/swagger/components/requestBodies/fields.yaml#/purchased_at' | ||
email: | ||
$ref: '/swagger/components/requestBodies/fields.yaml#/email' | ||
partner_order_items: | ||
required: true | ||
type: array | ||
description: List of order items to be changed. | ||
items: | ||
$ref: '/swagger/components/requestBodies/partner_order_item_payload.yaml' | ||
description: |- | ||
Payload to renew an existing OEM partner order on SCC API. | ||
The request's payload *must* contain a JSON object that *should* correspond to | ||
a single order. | ||
At the root of the main JSON object, there *must* be an unique key named | ||
`"partner_order"`, whose value *should* be an JSON object representing an OEM | ||
partner order, containing the following keys: | ||
- `"oem_token"`: string, **required** | ||
Value *must* be a string, with a maximum length of 255 characters. | ||
It *should not* be empty. The informed token *should* match one of an | ||
existing order placed by the OEM partner. This means that renewals | ||
*should* only be applied to existing orders whose subscriptions are active. | ||
- `"purchased_at"`: string, **required** | ||
Value *must* be a string, ISO8601-formatted. It must be older than the | ||
current date and time (cannot be a moment in the future). It represents | ||
the date and time at which the customer placed the order with the OEM | ||
partner. | ||
- `"email"`: string, *optional* | ||
Value *must* be a string, email-formatted. The key-value pair *may* be | ||
ommited. It represents the customer's email address to be notified aboutt | ||
activated subscriptions. | ||
- `"partner_order_items"`: array of JSON objects, **required** | ||
Value *must* be an array of JSON objects representing the order items. | ||
It *may* be empty if there are no items to be changed. Those objects | ||
*should* contain the following keys: | ||
- `"sku"`: string, **required** | ||
Value *must* be a string and *must* match a valid SUSE SKU. Renewal | ||
orders *should* only contain SKUs that match active subscriptions from | ||
the initial order. | ||
E.g., suppose an initial order which contains exactly the order items | ||
**SUSE-SKU-PRODUCT-A-1Y** and **SUSE-SKU-PRODUCT-B-1Y*,* both 1-year | ||
subscriptions. A renewal order *may* contain the same SKUs or SKUs | ||
which related to the same products, like **SUSE-SKU-PRODUCT-A-3Y** | ||
(3 years) or **SUSE-SKU-PRODUCT-B-5Y** (5 years), but not a SKU for a | ||
new subscription, like **SKU-PRODUCT-C-1Y** for product C, which is | ||
not included in the initial order. | ||
- `"system_limit"`: integer, **required** | ||
Value *must* be an integer greater than one. It represents the maximum | ||
number of systems which can use the given SKU simultaneously. It *may* | ||
be different from values of a previous order, meaning the system limit | ||
for a given SKU *may* be updated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters