Skip to content

Commit

Permalink
[Librarian] Regenerated @ a412066ed53a791734369f33f4b2f579662850b3 e4…
Browse files Browse the repository at this point in the history
…3180215d9b6a7f705d187446184940bb3dfac1
  • Loading branch information
twilio-dx committed Jul 2, 2024
1 parent 239281b commit 0ff51fd
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 40 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
twilio-node changelog
=====================

[2024-07-02] Version 5.2.2
--------------------------
**Intelligence**
- Deprecate account flag api.twilio-intelligence.v2


[2024-06-27] Version 5.2.1
--------------------------
**Api**
Expand Down
20 changes: 9 additions & 11 deletions src/rest/numbers/V1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import { PortingPortInPhoneNumberListInstance } from "./v1/portingPortInPhoneNum
import { PortingPortabilityListInstance } from "./v1/portingPortability";
import { PortingWebhookConfigurationListInstance } from "./v1/portingWebhookConfiguration";
import { PortingWebhookConfigurationDeleteListInstance } from "./v1/portingWebhookConfigurationDelete";
import { PortingWebhookConfigurationFetchListInstance } from "./v1/portingWebhookConfigurationFetch";
import { SigningRequestConfigurationListInstance } from "./v1/signingRequestConfiguration";
import { WebhookListInstance } from "./v1/webhook";

export default class V1 extends Version {
/**
Expand All @@ -48,10 +48,10 @@ export default class V1 extends Version {
protected _portingWebhookConfigurations?: PortingWebhookConfigurationListInstance;
/** portingWebhookConfigurationsDelete - { Twilio.Numbers.V1.PortingWebhookConfigurationDeleteListInstance } resource */
protected _portingWebhookConfigurationsDelete?: PortingWebhookConfigurationDeleteListInstance;
/** portingWebhookConfigurationFetch - { Twilio.Numbers.V1.PortingWebhookConfigurationFetchListInstance } resource */
protected _portingWebhookConfigurationFetch?: PortingWebhookConfigurationFetchListInstance;
/** signingRequestConfigurations - { Twilio.Numbers.V1.SigningRequestConfigurationListInstance } resource */
protected _signingRequestConfigurations?: SigningRequestConfigurationListInstance;
/** webhook - { Twilio.Numbers.V1.WebhookListInstance } resource */
protected _webhook?: WebhookListInstance;

/** Getter for bulkEligibilities resource */
get bulkEligibilities(): BulkEligibilityListInstance {
Expand Down Expand Up @@ -104,19 +104,17 @@ export default class V1 extends Version {
return this._portingWebhookConfigurationsDelete;
}

/** Getter for portingWebhookConfigurationFetch resource */
get portingWebhookConfigurationFetch(): PortingWebhookConfigurationFetchListInstance {
this._portingWebhookConfigurationFetch =
this._portingWebhookConfigurationFetch ||
PortingWebhookConfigurationFetchListInstance(this);
return this._portingWebhookConfigurationFetch;
}

/** Getter for signingRequestConfigurations resource */
get signingRequestConfigurations(): SigningRequestConfigurationListInstance {
this._signingRequestConfigurations =
this._signingRequestConfigurations ||
SigningRequestConfigurationListInstance(this);
return this._signingRequestConfigurations;
}

/** Getter for webhook resource */
get webhook(): WebhookListInstance {
this._webhook = this._webhook || WebhookListInstance(this);
return this._webhook;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,23 @@ const deserialize = require("../../../base/deserialize");
const serialize = require("../../../base/serialize");
import { isValidPathParam } from "../../../base/utility";

export interface PortingWebhookConfigurationFetchSolution {}
export interface WebhookSolution {}

export interface PortingWebhookConfigurationFetchListInstance {
export interface WebhookListInstance {
_version: V1;
_solution: PortingWebhookConfigurationFetchSolution;
_solution: WebhookSolution;
_uri: string;

/**
* Fetch a PortingWebhookConfigurationFetchInstance
* Fetch a WebhookInstance
*
* @param callback - Callback to handle processed record
*
* @returns Resolves to processed PortingWebhookConfigurationFetchInstance
* @returns Resolves to processed WebhookInstance
*/
fetch(
callback?: (
error: Error | null,
item?: PortingWebhookConfigurationFetchInstance
) => any
): Promise<PortingWebhookConfigurationFetchInstance>;
callback?: (error: Error | null, item?: WebhookInstance) => any
): Promise<WebhookInstance>;

/**
* Provide a user-friendly representation
Expand All @@ -46,30 +43,24 @@ export interface PortingWebhookConfigurationFetchListInstance {
[inspect.custom](_depth: any, options: InspectOptions): any;
}

export function PortingWebhookConfigurationFetchListInstance(
version: V1
): PortingWebhookConfigurationFetchListInstance {
const instance = {} as PortingWebhookConfigurationFetchListInstance;
export function WebhookListInstance(version: V1): WebhookListInstance {
const instance = {} as WebhookListInstance;

instance._version = version;
instance._solution = {};
instance._uri = `/Porting/Configuration/Webhook`;

instance.fetch = function fetch(
callback?: (
error: Error | null,
items: PortingWebhookConfigurationFetchInstance
) => any
): Promise<PortingWebhookConfigurationFetchInstance> {
callback?: (error: Error | null, items: WebhookInstance) => any
): Promise<WebhookInstance> {
let operationVersion = version,
operationPromise = operationVersion.fetch({
uri: instance._uri,
method: "get",
});

operationPromise = operationPromise.then(
(payload) =>
new PortingWebhookConfigurationFetchInstance(operationVersion, payload)
(payload) => new WebhookInstance(operationVersion, payload)
);

operationPromise = instance._version.setPromiseCallback(
Expand All @@ -93,10 +84,9 @@ export function PortingWebhookConfigurationFetchListInstance(
return instance;
}

interface PortingWebhookConfigurationFetchPayload
extends PortingWebhookConfigurationFetchResource {}
interface WebhookPayload extends WebhookResource {}

interface PortingWebhookConfigurationFetchResource {
interface WebhookResource {
url: string;
port_in_target_url: string;
port_out_target_url: string;
Expand All @@ -105,11 +95,8 @@ interface PortingWebhookConfigurationFetchResource {
port_out_target_date_created: Date;
}

export class PortingWebhookConfigurationFetchInstance {
constructor(
protected _version: V1,
payload: PortingWebhookConfigurationFetchResource
) {
export class WebhookInstance {
constructor(protected _version: V1, payload: WebhookResource) {
this.url = payload.url;
this.portInTargetUrl = payload.port_in_target_url;
this.portOutTargetUrl = payload.port_out_target_url;
Expand Down

0 comments on commit 0ff51fd

Please sign in to comment.