Skip to main content

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​

PropsTypeDescriptionPayload
getCountryfunctionThis function fetches country details based on the provided ISO code and returns a promise that either resolves with the data or rejects with an errorgetCountry({ countryIsoCode })
getLocalityfunctionThis function encodes the given pincode in the payload and retrieves locality information using an API call.getLocality({ localityType: 'pincode', localityValue: '560103'})
getLocalitiesfunctionThis 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 })
checkServiceabilityfunctionThis asynchronous function checks serviceability for a given payload indicating whether the service is availablecheckServiceability({ area_code: this.pincode })

Example​

<fdk-location>
<template slot-scope="location">
//code
</template
</fdk-pincode>

Was this section helpful?