Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Adaptive Point Ratio

Step 1: How to get adaptive point ratio

When a user go to checkout page, there will be hit api adaptive_points.json, and the api will accept restaurant_id in the payload. Like the endpoint below.

  POST
  `/adaptive_points.json`
  payload: {
    restaurantId: <restaurant_id we got from id restaurant>
  }

Api will output data response bath_value, id, and points_value.

Step 2: How to using adaptive point ratio

Data from response api adaptive_points.json, will parse to voucher store, pointRate will get data from points_value, adaptivePointsRationId will get data from id from response api. Then pointRate will send to component BookingOffers.vue which is in folder partial with props point-rate, then will send to component BookingOffers.vue again but which is in folder section with same props, then from BookingOffers.vue in folder section, will send to pointRate to component PointRedemption.vue with same props too. For show amount redeem in Total pay by point.