@bebapps/rapyd-sdk
Version:
An un-official [Rapyd](https://rapyd.net) SDK for Node.js.
81 lines (80 loc) • 2.58 kB
text/typescript
export interface SKU {
/**
* ID of the SKU object. Alphanumeric characters and underscores (_). Defined by the merchant, or a string starting with **sku_**.
*/
id: `sku_${string}`;
/**
* Indicates whether the product is currently being sold. Default is **false**.
*/
active: boolean;
/**
* Up to 5 alphanumeric key-value pairs defined by the merchant. For example:
*
* {
*
* > "size": 12,
* > "color": "red"
*
* }
*
* Each key must match a string in the 'attributes' list of the corresponding 'product' object.
*/
attributes: object;
/**
* Time of creation of this SKU, in [*Unix time*](ref:glossary). Response only.
*/
created_at: number;
/**
* Three-letter ISO 4217 code for the currency used in the `price` field. Uppercase.
*/
currency: string;
/**
* URL of image associated with the product.
*/
image: string;
/**
* Contains the following fields:
* * `type` - One of the following values:
* * **finite** - Physical objects that can be counted.
* * **infinite** - Products such as downloadable software.
* * **bucket** - Products that are sold by measurable quantity.
* * `quantity` - The number of units available in inventory. Integer. Relevant when `type` is **finite**.
* * `value` - The status of the product on hand in inventory. Relevant when `type` is **bucket**. One of the following:
* * **in_stock** - A normal amount of product is available in inventory.
* * **limited** - There is enough product in inventory for small orders only.
* * **out_of_stock** - No product remains in inventory.
*/
inventory: { type: unknown; quantity: unknown; value: unknown };
/**
* A JSON object defined by the client.
*/
metadata: object;
/**
* Physical attributes of the SKU item. Contains the following fields:
* * `height`
* * `length`
* * `weight`
* * `width`
*
* These fields are represented as numbers, but it is the responsibility of the merchant to define and interpret the relevant units of length and weight.
*/
package_dimensions: { height: unknown; length: unknown; weight: unknown; width: unknown };
/**
* Price of one unit. Decimal.
*/
price: number;
/**
* ID of the product that this SKU relates to.
*
* For more information, see [Product Object](ref:product-object).
*/
product: string;
/**
* The size of the SKU.
*/
size: string;
/**
* Time that this product was last updated, in [*Unix time*](ref:glossary). Response only.
*/
updated_at: number;
};