1 min read
Customisations
Add custom data in Cart model
To add custom data to the Cart model you need to:
- Receive your custom data in the network model
NetworkCart. - Create a new implementation of
Mapper<Any, Map<String, Any>>. - Provide your new mapper via Koin using the name
cartCustomMapToAnyMapperName.
Add custom data to CartItem Model
To add custom data to the CartItem model you need to:
- Receive your custom data in the network model
NetworkCartItem. - Create a new implementation of
Mapper<Any, Map<String, Any>>. - Provide your new mapper via Koin using the name
cartItemCustomMapToAnyMapperName.
Add custom data to Applied Vouchers CartItem Model
To add custom data to the AppliedVoucherCartItem model you need to:
- Receive your custom data in the network model
NetworkVoucher. - Create a new implementation of
Mapper<Any, Map<String, Any>>. - Provide your new mapper via Koin using the name
voucherCustomMapToAnyMapperName.
Add custom data to Promotions Model
To add custom data to the Promotion model you need to:
- Receive your custom data in the network model
NetworkPromotion. - Create a new implementation of
Mapper<Any, Map<String, Any>>. - Provide your new mapper via Koin using the name
promotionCustomMapToAnyMapperName.
Send Custom Data in NetworkUpdateCartItem model
To send custom data in the NetworkUpdateCartItem model you need to:
- Set your extra data to
UpdateCartItem.customData. - Create a new implementation of
Mapper<Map<String, Any, Any>>. - Provide your new mapper via Koin using the name
updateCartItemCustomAnyToMapMapperName.
Send Custom Data in NetworkAddVoucherRequest model
To send custom data in the NetworkAddVoucherRequest model you need to:
- Set your extra data to
AddVoucherRequest.customData. - Create a new implementation of
Mapper<Map<String, Any, Any>>. - Provide your new mapper via Koin using the name
addVoucherCustomAnyToMapMapperName.