// This is Generated Source. import GetStateInfoResponse from "../definitions/GetStateInfoResponse"; import GetStateListResponse from "../definitions/GetStateListResponse"; import PathSegment from "../PathSegment"; export default class State extends PathSegment { constructor(prv: PathSegment, id?: string, service?) { super("state", id, prv, service); } /** *

Since 1.0.10 (Release 6.2)

Returns all the states for a certain country.

Usage Plan Group

Light

*/ list(query?: ListQuery): Promise { return this._send({ body: undefined, ignoreId: false, method: "get", query: query, }).then((res) => { return res.json(); }); } /** *

Since 1.0.10 (Release 6.2)

Returns all the states for a certain country.

Usage Plan Group

Light

* return {ApiResponse} */ listRaw(query?: ListQuery): Promise { return this._send({ body: undefined, ignoreId: false, method: "get", query: query, }); } /** *

Since 1.0.10 (Release 6.2)

Returns the information on the required state.

Usage Plan Group

Light

*/ get(): Promise { return this._send({ body: undefined, ignoreId: true, method: "get", query: undefined, }).then((res) => { return res.json(); }); } /** *

Since 1.0.10 (Release 6.2)

Returns the information on the required state.

Usage Plan Group

Light

* return {ApiResponse} */ getRaw(): Promise { return this._send({ body: undefined, ignoreId: true, method: "get", query: undefined, }); } } export interface ListQuery { /** * Internal identifier of a country */ countryId?: number; /** * Indicates the page number to retrieve. Only positive number values are allowed. Default value is '1'. */ page?: number; /** * Indicates the page size (number of items). If not specified, the value is '100' by default */ perPage?: number; /** * If 'True', the list of states with phone numbers available for buying is returned. The default value is 'False' */ withPhoneNumbers?: boolean; }