@@ -650,6 +650,26 @@ export class ContactListImport {
650650 }
651651}
652652
653+ export class CountryListIds {
654+ /**
655+ * Array of country ids
656+ */
657+ 'countryListIds': Array<number>;
658+
659+ static discriminator: string | undefined = undefined;
660+
661+ static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
662+ {
663+ "name": "countryListIds",
664+ "baseName": "country_list_ids",
665+ "type": "Array<number>"
666+ } ];
667+
668+ static getAttributeTypeMap() {
669+ return CountryListIds.attributeTypeMap;
670+ }
671+ }
672+
653673/**
654674* Credit card model
655675*/
@@ -2800,6 +2820,7 @@ let typeMap: {[index: string]: any} = {
28002820 "Contact": Contact,
28012821 "ContactList": ContactList,
28022822 "ContactListImport": ContactListImport,
2823+ "CountryListIds": CountryListIds,
28032824 "CreditCard": CreditCard,
28042825 "DateBefore": DateBefore,
28052826 "DeliveryIssue": DeliveryIssue,
@@ -4044,9 +4065,10 @@ export class ContactApi {
40444065 * @param listId Contact list ID
40454066 * @param page Page number
40464067 * @param limit Number of records per page
4068+ * @param updatedAfter Get all contacts updated after a given timestamp.
40474069 * @param {*} [options] Override http request options.
40484070 */
4049- public listsContactsByListIdGet (listId: number, page?: number, limit?: number, options: any = {}) : Promise<{ response: http.IncomingMessage; body: string; }> {
4071+ public listsContactsByListIdGet (listId: number, page?: number, limit?: number, updatedAfter?: number, options: any = {}) : Promise<{ response: http.IncomingMessage; body: string; }> {
40504072 const localVarPath = this.basePath + '/lists/{list_id}/contacts'
40514073 .replace('{' + 'list_id' + '}', encodeURIComponent(String(listId)));
40524074 let localVarQueryParameters: any = {};
@@ -4066,6 +4088,10 @@ export class ContactApi {
40664088 localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
40674089 }
40684090
4091+ if (updatedAfter !== undefined) {
4092+ localVarQueryParameters['updated_after'] = ObjectSerializer.serialize(updatedAfter, "number");
4093+ }
4094+
40694095 (<any>Object).assign(localVarHeaderParams, options.headers);
40704096
40714097 let localVarUseFormData = false;
@@ -7800,6 +7826,269 @@ export class FAXDeliveryReceiptRulesApi {
78007826 });
78017827 }
78027828}
7829+ export enum GlobalSendingApiApiKeys {
7830+ }
7831+
7832+ export class GlobalSendingApi {
7833+ protected _basePath = defaultBasePath;
7834+ protected defaultHeaders : any = {};
7835+ protected _useQuerystring : boolean = false;
7836+
7837+ protected authentications = {
7838+ 'default': <Authentication>new VoidAuth(),
7839+ 'BasicAuth': new HttpBasicAuth(),
7840+ }
7841+
7842+ constructor(basePath?: string);
7843+ constructor(username: string, password: string, basePath?: string);
7844+ constructor(basePathOrUsername: string, password?: string, basePath?: string) {
7845+ if (password) {
7846+ this.username = basePathOrUsername;
7847+ this.password = password
7848+ if (basePath) {
7849+ this.basePath = basePath;
7850+ }
7851+ } else {
7852+ if (basePathOrUsername) {
7853+ this.basePath = basePathOrUsername
7854+ }
7855+ }
7856+ }
7857+
7858+ set useQuerystring(value: boolean) {
7859+ this._useQuerystring = value;
7860+ }
7861+
7862+ set basePath(basePath: string) {
7863+ this._basePath = basePath;
7864+ }
7865+
7866+ get basePath() {
7867+ return this._basePath;
7868+ }
7869+
7870+ public setDefaultAuthentication(auth: Authentication) {
7871+ this.authentications.default = auth;
7872+ }
7873+
7874+ public setApiKey(key: GlobalSendingApiApiKeys, value: string) {
7875+ (this.authentications as any)[GlobalSendingApiApiKeys[key]].apiKey = value;
7876+ }
7877+ set username(username: string) {
7878+ this.authentications.BasicAuth.username = username;
7879+ }
7880+
7881+ set password(password: string) {
7882+ this.authentications.BasicAuth.password = password;
7883+ }
7884+ /**
7885+ * List of countries with IDs that can be used in selecting countries for Global sending.
7886+ * @summary List of countries
7887+ * @param {*} [options] Override http request options.
7888+ */
7889+ public listCountriesGet (options: any = {}) : Promise<{ response: http.IncomingMessage; body: string; }> {
7890+ const localVarPath = this.basePath + '/country-list';
7891+ let localVarQueryParameters: any = {};
7892+ let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
7893+ let localVarFormParams: any = {};
7894+
7895+ (<any>Object).assign(localVarHeaderParams, options.headers);
7896+
7897+ let localVarUseFormData = false;
7898+
7899+ let localVarRequestOptions: localVarRequest.Options = {
7900+ method: 'GET',
7901+ qs: localVarQueryParameters,
7902+ headers: localVarHeaderParams,
7903+ uri: localVarPath,
7904+ useQuerystring: this._useQuerystring,
7905+ json: true,
7906+ };
7907+
7908+ this.authentications.BasicAuth.applyToRequest(localVarRequestOptions);
7909+
7910+ this.authentications.default.applyToRequest(localVarRequestOptions);
7911+
7912+ if (Object.keys(localVarFormParams).length) {
7913+ if (localVarUseFormData) {
7914+ (<any>localVarRequestOptions).formData = localVarFormParams;
7915+ } else {
7916+ localVarRequestOptions.form = localVarFormParams;
7917+ }
7918+ }
7919+ return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => {
7920+ localVarRequest(localVarRequestOptions, (error, response, body) => {
7921+ if (error) {
7922+ reject(error);
7923+ } else {
7924+ body = ObjectSerializer.deserialize(body, "string");
7925+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
7926+ resolve({ response: response, body: body });
7927+ } else {
7928+ reject({ response: response, body: body });
7929+ }
7930+ }
7931+ });
7932+ });
7933+ }
7934+ /**
7935+ * To agree on rules and regulations of selected countries and confirm selection.
7936+ * @summary Agree to rules and regulation
7937+ * @param {*} [options] Override http request options.
7938+ */
7939+ public userCountriesAgreePost (options: any = {}) : Promise<{ response: http.IncomingMessage; body: string; }> {
7940+ const localVarPath = this.basePath + '/user-countries/agree';
7941+ let localVarQueryParameters: any = {};
7942+ let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
7943+ let localVarFormParams: any = {};
7944+
7945+ (<any>Object).assign(localVarHeaderParams, options.headers);
7946+
7947+ let localVarUseFormData = false;
7948+
7949+ let localVarRequestOptions: localVarRequest.Options = {
7950+ method: 'POST',
7951+ qs: localVarQueryParameters,
7952+ headers: localVarHeaderParams,
7953+ uri: localVarPath,
7954+ useQuerystring: this._useQuerystring,
7955+ json: true,
7956+ };
7957+
7958+ this.authentications.BasicAuth.applyToRequest(localVarRequestOptions);
7959+
7960+ this.authentications.default.applyToRequest(localVarRequestOptions);
7961+
7962+ if (Object.keys(localVarFormParams).length) {
7963+ if (localVarUseFormData) {
7964+ (<any>localVarRequestOptions).formData = localVarFormParams;
7965+ } else {
7966+ localVarRequestOptions.form = localVarFormParams;
7967+ }
7968+ }
7969+ return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => {
7970+ localVarRequest(localVarRequestOptions, (error, response, body) => {
7971+ if (error) {
7972+ reject(error);
7973+ } else {
7974+ body = ObjectSerializer.deserialize(body, "string");
7975+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
7976+ resolve({ response: response, body: body });
7977+ } else {
7978+ reject({ response: response, body: body });
7979+ }
7980+ }
7981+ });
7982+ });
7983+ }
7984+ /**
7985+ * Get the list of selected countries.
7986+ * @summary Get Countries for Global Sending
7987+ * @param {*} [options] Override http request options.
7988+ */
7989+ public userCountriesGet (options: any = {}) : Promise<{ response: http.IncomingMessage; body: string; }> {
7990+ const localVarPath = this.basePath + '/user-countries';
7991+ let localVarQueryParameters: any = {};
7992+ let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
7993+ let localVarFormParams: any = {};
7994+
7995+ (<any>Object).assign(localVarHeaderParams, options.headers);
7996+
7997+ let localVarUseFormData = false;
7998+
7999+ let localVarRequestOptions: localVarRequest.Options = {
8000+ method: 'GET',
8001+ qs: localVarQueryParameters,
8002+ headers: localVarHeaderParams,
8003+ uri: localVarPath,
8004+ useQuerystring: this._useQuerystring,
8005+ json: true,
8006+ };
8007+
8008+ this.authentications.BasicAuth.applyToRequest(localVarRequestOptions);
8009+
8010+ this.authentications.default.applyToRequest(localVarRequestOptions);
8011+
8012+ if (Object.keys(localVarFormParams).length) {
8013+ if (localVarUseFormData) {
8014+ (<any>localVarRequestOptions).formData = localVarFormParams;
8015+ } else {
8016+ localVarRequestOptions.form = localVarFormParams;
8017+ }
8018+ }
8019+ return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => {
8020+ localVarRequest(localVarRequestOptions, (error, response, body) => {
8021+ if (error) {
8022+ reject(error);
8023+ } else {
8024+ body = ObjectSerializer.deserialize(body, "string");
8025+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
8026+ resolve({ response: response, body: body });
8027+ } else {
8028+ reject({ response: response, body: body });
8029+ }
8030+ }
8031+ });
8032+ });
8033+ }
8034+ /**
8035+ * Use this endpoint to select countries that you intend to send sms / mms to. To remove / unselect a country, just remove the country id from the array in the payload.
8036+ * @summary Select Countries for Global Sending
8037+ * @param countryListIds Id of countr(ies) you want to select, you can get them from GET /country-list response
8038+ * @param {*} [options] Override http request options.
8039+ */
8040+ public userCountriesPost (countryListIds: CountryListIds, options: any = {}) : Promise<{ response: http.IncomingMessage; body: string; }> {
8041+ const localVarPath = this.basePath + '/user-countries';
8042+ let localVarQueryParameters: any = {};
8043+ let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
8044+ let localVarFormParams: any = {};
8045+
8046+ // verify required parameter 'countryListIds' is not null or undefined
8047+ if (countryListIds === null || countryListIds === undefined) {
8048+ throw new Error('Required parameter countryListIds was null or undefined when calling userCountriesPost.');
8049+ }
8050+
8051+ (<any>Object).assign(localVarHeaderParams, options.headers);
8052+
8053+ let localVarUseFormData = false;
8054+
8055+ let localVarRequestOptions: localVarRequest.Options = {
8056+ method: 'POST',
8057+ qs: localVarQueryParameters,
8058+ headers: localVarHeaderParams,
8059+ uri: localVarPath,
8060+ useQuerystring: this._useQuerystring,
8061+ json: true,
8062+ body: ObjectSerializer.serialize(countryListIds, "CountryListIds")
8063+ };
8064+
8065+ this.authentications.BasicAuth.applyToRequest(localVarRequestOptions);
8066+
8067+ this.authentications.default.applyToRequest(localVarRequestOptions);
8068+
8069+ if (Object.keys(localVarFormParams).length) {
8070+ if (localVarUseFormData) {
8071+ (<any>localVarRequestOptions).formData = localVarFormParams;
8072+ } else {
8073+ localVarRequestOptions.form = localVarFormParams;
8074+ }
8075+ }
8076+ return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => {
8077+ localVarRequest(localVarRequestOptions, (error, response, body) => {
8078+ if (error) {
8079+ reject(error);
8080+ } else {
8081+ body = ObjectSerializer.deserialize(body, "string");
8082+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
8083+ resolve({ response: response, body: body });
8084+ } else {
8085+ reject({ response: response, body: body });
8086+ }
8087+ }
8088+ });
8089+ });
8090+ }
8091+ }
78038092export enum InboundFAXRulesApiApiKeys {
78048093}
78058094
0 commit comments