Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.91 KB

File metadata and controls

36 lines (27 loc) · 1.91 KB

CustomEffectProps

If you want to return data as an effect but no effect matches your use case, you can create a custom effect. Custom effects can be used as both rule effects and failure effects. The structure of a custom effect depends on your specifications but is always named customEffect.

Properties

Name Type Description Notes
effect_id int The ID of the custom effect that was triggered.
name str The type of the custom effect.
cart_item_position float The index of the item in the cart item list to which the custom effect is applied. [optional]
cart_item_sub_position float For cart items with quantity > 1, the sub position indicates to which item unit the custom effect is applied. [optional]
bundle_index int The position of the bundle in a list of item bundles created from the same bundle definition. [optional]
bundle_name str The name of the bundle definition. [optional]
payload object The JSON payload of the custom effect.

Example

from talon_one.models.custom_effect_props import CustomEffectProps

# TODO update the JSON string below
json = "{}"
# create an instance of CustomEffectProps from a JSON string
custom_effect_props_instance = CustomEffectProps.from_json(json)
# print the JSON string representation of the object
print(CustomEffectProps.to_json())

# convert the object into a dict
custom_effect_props_dict = custom_effect_props_instance.to_dict()
# create an instance of CustomEffectProps from a dict
custom_effect_props_from_dict = CustomEffectProps.from_dict(custom_effect_props_dict)

[Back to Model list] [Back to API list] [Back to README]