katana_public_api_client.api.variant.update_variant¶
katana_public_api_client.api.variant.update_variant
¶
Classes¶
Functions¶
asyncio(id, *, client, body)
async
¶
Update a variant
Updates the specified variant by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Parameters:
-
id(int) – -
body(UpdateVariantRequest) –Request payload for updating product variant details including pricing, configuration, and inventory information Example: {'sku': 'KNF-PRO-8PC-UPD', 'sales_price': 319.99, 'purchase_price': 160.0, 'product_id': 101, 'material_id': None, 'supplier_item_codes': ['SUP-KNF-8PC-002'], 'internal_barcode': 'INT-KNF-002', 'registered_barcode': '789123456790', 'lead_time': 5, 'minimum_order_quantity': 1, 'config_attributes': [{'config_name': 'Piece Count', 'config_value': '8-piece'}, {'config_name': 'Handle Material', 'config_value': 'Premium Steel'}], 'custom_fields': [{'field_name': 'Warranty Period', 'field_value': '7 years'}]}.
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
DetailedErrorResponse | ErrorResponse | Variant | None–Union[DetailedErrorResponse, ErrorResponse, Variant]
Source code in katana_public_api_client/api/variant/update_variant.py
asyncio_detailed(id, *, client, body)
async
¶
Update a variant
Updates the specified variant by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Parameters:
-
id(int) – -
body(UpdateVariantRequest) –Request payload for updating product variant details including pricing, configuration, and inventory information Example: {'sku': 'KNF-PRO-8PC-UPD', 'sales_price': 319.99, 'purchase_price': 160.0, 'product_id': 101, 'material_id': None, 'supplier_item_codes': ['SUP-KNF-8PC-002'], 'internal_barcode': 'INT-KNF-002', 'registered_barcode': '789123456790', 'lead_time': 5, 'minimum_order_quantity': 1, 'config_attributes': [{'config_name': 'Piece Count', 'config_value': '8-piece'}, {'config_name': 'Handle Material', 'config_value': 'Premium Steel'}], 'custom_fields': [{'field_name': 'Warranty Period', 'field_value': '7 years'}]}.
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
Response[DetailedErrorResponse | ErrorResponse | Variant]–Response[Union[DetailedErrorResponse, ErrorResponse, Variant]]
Source code in katana_public_api_client/api/variant/update_variant.py
sync(id, *, client, body)
¶
Update a variant
Updates the specified variant by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Parameters:
-
id(int) – -
body(UpdateVariantRequest) –Request payload for updating product variant details including pricing, configuration, and inventory information Example: {'sku': 'KNF-PRO-8PC-UPD', 'sales_price': 319.99, 'purchase_price': 160.0, 'product_id': 101, 'material_id': None, 'supplier_item_codes': ['SUP-KNF-8PC-002'], 'internal_barcode': 'INT-KNF-002', 'registered_barcode': '789123456790', 'lead_time': 5, 'minimum_order_quantity': 1, 'config_attributes': [{'config_name': 'Piece Count', 'config_value': '8-piece'}, {'config_name': 'Handle Material', 'config_value': 'Premium Steel'}], 'custom_fields': [{'field_name': 'Warranty Period', 'field_value': '7 years'}]}.
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
DetailedErrorResponse | ErrorResponse | Variant | None–Union[DetailedErrorResponse, ErrorResponse, Variant]
Source code in katana_public_api_client/api/variant/update_variant.py
sync_detailed(id, *, client, body)
¶
Update a variant
Updates the specified variant by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Parameters:
-
id(int) – -
body(UpdateVariantRequest) –Request payload for updating product variant details including pricing, configuration, and inventory information Example: {'sku': 'KNF-PRO-8PC-UPD', 'sales_price': 319.99, 'purchase_price': 160.0, 'product_id': 101, 'material_id': None, 'supplier_item_codes': ['SUP-KNF-8PC-002'], 'internal_barcode': 'INT-KNF-002', 'registered_barcode': '789123456790', 'lead_time': 5, 'minimum_order_quantity': 1, 'config_attributes': [{'config_name': 'Piece Count', 'config_value': '8-piece'}, {'config_name': 'Handle Material', 'config_value': 'Premium Steel'}], 'custom_fields': [{'field_name': 'Warranty Period', 'field_value': '7 years'}]}.
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
Response[DetailedErrorResponse | ErrorResponse | Variant]–Response[Union[DetailedErrorResponse, ErrorResponse, Variant]]