UNPKG

@ringer-tel/ivy

Version:
64 lines (53 loc) 2.45 kB
/* tslint:disable */ /* eslint-disable */ /** * Ringer Business API * This API provides comprehensive endpoints for the Ringer Business system. It includes functionality for managing customer accounts, addresses, sites, phone numbers, payments, users, and other business resources. Operations typically require authentication and appropriate permissions. * * The version of the OpenAPI document: 1.0.6 * Contact: support@ringer.tel * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { CountryCodeListResponse, } from '../models/index'; import { CountryCodeListResponseFromJSON, CountryCodeListResponseToJSON, } from '../models/index'; /** * */ export class CountryCodesApi extends runtime.BaseAPI { /** * Retrieves a list of all country codes supported by the system, often grouped by region or zone. This information is useful for configuring features like outbound call permissions on Sites. * List Available Country Codes */ async listAvailableCountryCodesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CountryCodeListResponse>> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.accessToken) { // oauth required headerParameters["Authorization"] = await this.configuration.accessToken("oAuth2", []); } const response = await this.request({ path: `/country-codes`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CountryCodeListResponseFromJSON(jsonValue)); } /** * Retrieves a list of all country codes supported by the system, often grouped by region or zone. This information is useful for configuring features like outbound call permissions on Sites. * List Available Country Codes */ async listAvailableCountryCodes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CountryCodeListResponse> { const response = await this.listAvailableCountryCodesRaw(initOverrides); return await response.value(); } }