fdk-location
Deprecation Notice
Vue-based themes will soon be deprecated. Please switch to React-based themes, as all future updates and support will focus exclusively on React.
Location Action Component
Tag
fdk-location
Description
This action component is used to perform actions related to country-specific information. It includes methods such as getCountry
, getLocality
, getLocalities
, and checkServiceability
. These methods provide functionality for managing and retrieving country and locality information.
Props
Props | Type | Description | Payload |
---|---|---|---|
getCountry | function | This function fetches country details based on the provided ISO code and returns a promise that either resolves with the data or rejects with an error | getCountry({ countryIsoCode }) |
getLocality | function | This function encodes the given pincode in the payload and retrieves locality information using an API call. | getLocality({ localityType: 'pincode', localityValue: '560103'}) |
getLocalities | function | This function's parameters include localityType , localityValue , country , state , and city , representing details needed to fetch a specific locality. | getLocality({ localityType : value, localityValue : value, country : value, state : value, city : value }) |
checkServiceability | function | This asynchronous function checks serviceability for a given payload indicating whether the service is available | checkServiceability({ area_code: this.pincode }) |
Example
<fdk-location>
<template slot-scope="location">
//code
</template
</fdk-pincode>