Skip to content

Latest commit

 

History

History
262 lines (173 loc) · 6.62 KB

AddressApi.md

File metadata and controls

262 lines (173 loc) · 6.62 KB

Flipdish.AddressApi

All URIs are relative to https://api.flipdish.co

Method HTTP request Description
addressTemplates POST /api/v1.0/address/templates
formByApp GET /api/v1.0/app/{appId}/address/form
formByCountry GET /api/v1.0/address/country/{countryCode}/form
formatGoogleAddress POST /api/v1.0/address/google
getCountries GET /api/v1.0/address/countries

addressTemplates

RestApiStringResult addressTemplates(address)

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.AddressApi();
let address = new Flipdish.StoreAddressForm(); // StoreAddressForm | 
apiInstance.addressTemplates(address, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
address StoreAddressForm

Return type

RestApiStringResult

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml, Data

formByApp

RestApiResultAddressFormResponse formByApp(appId, opts)

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.AddressApi();
let appId = "appId_example"; // String | 
let opts = {
  'language': "language_example" // String | 
};
apiInstance.formByApp(appId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
appId String
language String [optional]

Return type

RestApiResultAddressFormResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Data, Message, ErrorCode, StackTrace

formByCountry

RestApiResultAddressFormResponse formByCountry(countryCode, opts)

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.AddressApi();
let countryCode = "countryCode_example"; // String | 
let opts = {
  'language': "language_example" // String | 
};
apiInstance.formByCountry(countryCode, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
countryCode String
language String [optional]

Return type

RestApiResultAddressFormResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Data, Message, ErrorCode, StackTrace

formatGoogleAddress

RestApiResultAddressFormResponse formatGoogleAddress(googleAddress, opts)

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.AddressApi();
let googleAddress = new Flipdish.GoogleAddress(); // GoogleAddress | 
let opts = {
  'language': "language_example" // String | 
};
apiInstance.formatGoogleAddress(googleAddress, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
googleAddress GoogleAddress
language String [optional]

Return type

RestApiResultAddressFormResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml, Data, Message, ErrorCode, StackTrace

getCountries

RestApiResultCountryFormResponse getCountries(opts)

Example

import Flipdish from '@flipdish/api-client-javascript';
let defaultClient = Flipdish.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Flipdish.AddressApi();
let opts = {
  'language': "language_example" // String | 
};
apiInstance.getCountries(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
language String [optional]

Return type

RestApiResultCountryFormResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, Data