Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
b47a6db
chore: created java modern generator for rc release (#663)
sbansla Aug 5, 2025
3cefa7f
chore: Java Enum processors and factory (#664)
sbansla Aug 6, 2025
9e2a1d8
doc: added uml diagram for enum processor design (#665)
sbansla Aug 6, 2025
fa68524
chore: Create common factory for enum (#666)
sbansla Aug 6, 2025
14b6c73
chore: Parameter processor for twilio-java generatiom (#667)
sbansla Aug 6, 2025
fe09ea5
created operation processor (#668)
sbansla Aug 6, 2025
43f51ff
added urlencoded processor (#669)
sbansla Aug 6, 2025
010b0e8
Update schema mapping (#670)
sbansla Aug 6, 2025
f73f7ad
added mustache template files (#671)
sbansla Aug 6, 2025
d9871ef
added constructor, settermethod and inequality feature (#672)
sbansla Aug 6, 2025
17ed8bc
Add format specific features (#673)
sbansla Aug 6, 2025
5048693
added recursive traverser, json response processor, model processor, …
sbansla Aug 6, 2025
117de52
fixed promoter and corrected api class names (#676)
sbansla Aug 6, 2025
b7b4520
Testing twilio-java modernisation (#678)
sbansla Aug 29, 2025
6271159
chore: prepared java modern for release (#682)
sbansla Sep 12, 2025
b064d81
test enabled
sbansla Sep 12, 2025
404c17c
Merge branch 'main' into twilio-java-generation-modernisation
sbansla Sep 12, 2025
6ccaae0
disabled sonar
sbansla Sep 12, 2025
154efe7
Merge branch 'twilio-java-generation-modernisation' of https://github…
sbansla Sep 12, 2025
8c68fae
disabled python release
sbansla Sep 12, 2025
e25edfc
remove spec
sbansla Sep 12, 2025
6609f4a
skipped orgs spec
sbansla Sep 12, 2025
96724ed
renamed twilio-java to twilio-java-legacy
sbansla Sep 12, 2025
053a83d
keeping java tests only
sbansla Sep 12, 2025
065c7e7
disabled python generator and moved spec out of scripts
sbansla Sep 16, 2025
9511886
added scim+json support
sbansla Sep 17, 2025
0636037
added noauth changes
sbansla Sep 18, 2025
3f92850
removed noauth unused extensions
sbansla Sep 18, 2025
3872c9a
refactored constructor generator to use path, query, header param ins…
sbansla Sep 20, 2025
2807d60
fixed Endpoint and Twiml data types
sbansla Sep 24, 2025
c1abd8a
fixed uri promoters
sbansla Sep 24, 2025
65e6d1f
fixed constructor generation due to similar data types
sbansla Sep 24, 2025
0a3db3d
fixed Enum datatype is getting appended by resource name multiple times
sbansla Sep 25, 2025
487250f
fixed the array items appending inner in inline schema
sbansla Sep 28, 2025
6f8795b
using builder pattern for twilio-java nested model generation
sbansla Sep 29, 2025
8dc540b
chore: changes in different languages for openapi-generator-cli versi…
tiwarishubham635 Oct 28, 2025
f7b84bb
Merge branch 'main' into twilio-java-generation-modernisation
tiwarishubham635 Oct 28, 2025
8e2b658
Merge branch 'main' into twilio-java-generation-modernisation
tiwarishubham635 Oct 28, 2025
c5bf548
Merge branch 'main' into twilio-java-generation-modernisation
tiwarishubham635 Nov 4, 2025
63a6ffb
added optional properties for model
sbansla Nov 5, 2025
4d03ba4
fix: Python generator fix for 7.x open api generator (#693)
kridai Nov 5, 2025
20f3f07
chore: java added apistandard validation
sbansla Nov 5, 2025
e4d39eb
Merge branch 'twilio-java-generation-modernisation' of https://github…
sbansla Nov 5, 2025
0e2e3ab
chore: remove openjdk 8 from java dockerfile (#701)
tiwarishubham635 Nov 6, 2025
c81e1af
feat: support nested response schema in csharp (#704)
tiwarishubham635 Nov 10, 2025
9e4b097
Java - update to delete allowed status (#697)
shrutiburman Nov 11, 2025
85aa85a
Merge branch 'main' into twilio-java-generation-modernisation
tiwarishubham635 Nov 12, 2025
267eaf0
test: update test functionality and fix failing tests (#710)
kridai Nov 20, 2025
7b8e9eb
fix: Fix page size not picked up (#711)
sbansla Nov 20, 2025
ba2bc3c
update test
kridai Nov 20, 2025
11178b0
test fix
kridai Nov 20, 2025
816e0e0
chore: enable tests for all languages
tiwarishubham635 Nov 20, 2025
804cf90
Merge remote-tracking branch 'origin/twilio-java-generation-modernisa…
tiwarishubham635 Nov 20, 2025
8b0d28c
chore: add null check for ref in php
tiwarishubham635 Nov 20, 2025
5fe259b
chore: add decimal type in python
tiwarishubham635 Nov 20, 2025
dfb2db0
chore: update examples
tiwarishubham635 Nov 20, 2025
a598880
chore: update examples
tiwarishubham635 Nov 20, 2025
bba060f
chore: update examples php
tiwarishubham635 Nov 20, 2025
3aa78e8
chore: remove unused files in node example
tiwarishubham635 Nov 20, 2025
8f40935
feat: add support for nested response body in csharp (#707)
tiwarishubham635 Nov 21, 2025
46fadd5
chore: fix ruby tests
tiwarishubham635 Nov 21, 2025
d4af612
chore: use latest php version
tiwarishubham635 Nov 21, 2025
17ed43a
Merge branch 'main' into twilio_api_standards_changes
tiwarishubham635 Nov 24, 2025
204ffb8
feat: Add support for token pagination in java (#717)
tiwarishubham635 Nov 24, 2025
3a9af75
feat: Add support for token pagination in php (#716)
tiwarishubham635 Nov 27, 2025
b39f18a
feat: twilio-python token pagination support (#729)
kridai Dec 8, 2025
bafea0c
fix: Support for custom error response ruby (#727)
manisha1997 Dec 8, 2025
484910d
chore: add support for new error response (#731)
tiwarishubham635 Dec 12, 2025
c429cc2
Ruby error response new design (#736)
manisha1997 Dec 15, 2025
ac76b12
chore: Ruby pagination (#734)
manisha1997 Dec 15, 2025
ee51cf0
feat: adding response headers and metadata (#738)
tiwarishubham635 Dec 19, 2025
c6b375b
chore: sync with main (#744)
tiwarishubham635 Jan 7, 2026
e3d4f98
Merge branch 'main' into twilio_api_standards_changes
tiwarishubham635 Jan 7, 2026
d13a9b5
Ruby pagination (#739)
manisha1997 Jan 13, 2026
3e3be9d
feat: multi response models (#742)
manisha1997 Jan 13, 2026
ec817d9
chore: add support for multiple response schemas in php (#741)
tiwarishubham635 Jan 13, 2026
f728c94
feat: add support for New error response (#747)
tiwarishubham635 Jan 13, 2026
d908dc8
feat: add support for token pagination in go (#746)
tiwarishubham635 Jan 16, 2026
6666bdc
chore: twilio-python response headers (#749)
kridai Jan 16, 2026
9fb9c97
chore: added multiple response types in a resource support in csharp
sbansla Jan 18, 2026
36ab775
remove unused code
sbansla Jan 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/go/go-client/helper/rest/api/v2010/api_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func (c *ApiService) RequestHandler() *twilio.RequestHandler {
}

func NewApiService(requestHandler *twilio.RequestHandler) *ApiService {

return &ApiService{
requestHandler: requestHandler,
baseURL: "https://api.twilio.com",
Expand Down
1 change: 1 addition & 0 deletions examples/go/go-client/helper/rest/flex/v1/api_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func (c *ApiService) RequestHandler() *twilio.RequestHandler {
}

func NewApiService(requestHandler *twilio.RequestHandler) *ApiService {

return &ApiService{
requestHandler: requestHandler,
baseURL: "https://flex-api.twilio.com",
Expand Down
1 change: 1 addition & 0 deletions examples/go/go-client/helper/rest/oauth/v2/api_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func (c *ApiService) RequestHandler() *twilio.RequestHandler {
}

func NewApiService(requestHandler *twilio.RequestHandler) *ApiService {

return &ApiService{
requestHandler: requestHandler,
baseURL: "https://oauth.twilio.com",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public AccountReader setPageSize(final Integer pageSize){
public ResourceSet<Account> read(final TwilioRestClient client) {
return new ResourceSet<>(this, client, firstPage(client));
}

public Page<Account> firstPage(final TwilioRestClient client) {

String path = "/2010-04-01/Accounts.json";
Expand All @@ -103,7 +103,7 @@ private Page<Account> pageForRequest(final TwilioRestClient client, final Reques
RestException restException = RestException.fromJson(
response.getStream(),
client.getObjectMapper());

if (restException == null) {
throw new ApiException("Server Error, no content", response.getStatusCode());
}
Expand All @@ -126,14 +126,15 @@ public Page<Account> previousPage(final Page<Account> page, final TwilioRestClie
@Override
public Page<Account> nextPage(final Page<Account> page, final TwilioRestClient client) {
Request request = new Request(HttpMethod.GET, page.getNextPageUrl(Domains.API.toString()));
return pageForRequest(client, request);
return pageForRequest(client, request);
}

@Override
public Page<Account> getPage(final String targetUrl, final TwilioRestClient client) {
Request request = new Request(HttpMethod.GET, targetUrl);
return pageForRequest(client, request);
return pageForRequest(client, request);
}

private void addQueryParams(final Request request) {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public AwsReader setPageSize(final Integer pageSize){
public ResourceSet<Aws> read(final TwilioRestClient client) {
return new ResourceSet<>(this, client, firstPage(client));
}

public Page<Aws> firstPage(final TwilioRestClient client) {

String path = "/v1/Credentials/AWS";
Expand All @@ -73,7 +73,7 @@ private Page<Aws> pageForRequest(final TwilioRestClient client, final Request re
RestException restException = RestException.fromJson(
response.getStream(),
client.getObjectMapper());

if (restException == null) {
throw new ApiException("Server Error, no content", response.getStatusCode());
}
Expand All @@ -96,14 +96,15 @@ public Page<Aws> previousPage(final Page<Aws> page, final TwilioRestClient clien
@Override
public Page<Aws> nextPage(final Page<Aws> page, final TwilioRestClient client) {
Request request = new Request(HttpMethod.GET, page.getNextPageUrl(Domains.API.toString()));
return pageForRequest(client, request);
return pageForRequest(client, request);
}

@Override
public Page<Aws> getPage(final String targetUrl, final TwilioRestClient client) {
Request request = new Request(HttpMethod.GET, targetUrl);
return pageForRequest(client, request);
return pageForRequest(client, request);
}

private void addQueryParams(final Request request) {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public AssistantReader setPageSize(final Integer pageSize){
public ResourceSet<Assistant> read(final TwilioRestClient client) {
return new ResourceSet<>(this, client, firstPage(client));
}

public Page<Assistant> firstPage(final TwilioRestClient client) {

String path = "/understand/Assistants";
Expand All @@ -73,7 +73,7 @@ private Page<Assistant> pageForRequest(final TwilioRestClient client, final Requ
RestException restException = RestException.fromJson(
response.getStream(),
client.getObjectMapper());

if (restException == null) {
throw new ApiException("Server Error, no content", response.getStatusCode());
}
Expand All @@ -96,14 +96,15 @@ public Page<Assistant> previousPage(final Page<Assistant> page, final TwilioRest
@Override
public Page<Assistant> nextPage(final Page<Assistant> page, final TwilioRestClient client) {
Request request = new Request(HttpMethod.GET, page.getNextPageUrl(Domains.API.toString()));
return pageForRequest(client, request);
return pageForRequest(client, request);
}

@Override
public Page<Assistant> getPage(final String targetUrl, final TwilioRestClient client) {
Request request = new Request(HttpMethod.GET, targetUrl);
return pageForRequest(client, request);
return pageForRequest(client, request);
}

private void addQueryParams(final Request request) {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
use Twilio\Values;
use Twilio\Version;
use Twilio\InstanceContext;
use Twilio\Http\Response;
use Twilio\Metadata\ResourceMetadata;
use Twilio\Serialize;


Expand Down Expand Up @@ -55,17 +57,16 @@ public function __construct(
}

/**
* Update the FeedbackCallSummaryInstance
* Helper function for Update
*
* @param \DateTime $endDate
* @param \DateTime $startDate
* @param array|Options $options Optional Arguments
* @return FeedbackCallSummaryInstance Updated FeedbackCallSummaryInstance
* @return Response Updated Response
* @throws TwilioException When an HTTP error occurs.
*/
public function update(\DateTime $endDate, \DateTime $startDate, array $options = []): FeedbackCallSummaryInstance
private function _update(\DateTime $endDate, \DateTime $startDate, array $options = []): Response
{

$options = new Values($options);

$data = Values::of([
Expand All @@ -78,14 +79,53 @@ public function update(\DateTime $endDate, \DateTime $startDate, array $options
]);

$headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded', 'Accept' => 'application/json' ]);
$payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return $this->version->handleRequest('POST', $this->uri, [], $data, $headers, "update");
}

/**
* Update the FeedbackCallSummaryInstance
*
* @param \DateTime $endDate
* @param \DateTime $startDate
* @param array|Options $options Optional Arguments
* @return FeedbackCallSummaryInstance Updated FeedbackCallSummaryInstance
* @throws TwilioException When an HTTP error occurs.
*/
public function update(\DateTime $endDate, \DateTime $startDate, array $options = []): FeedbackCallSummaryInstance
{
$response = $this->_update( $endDate, $startDate, $options);
return new FeedbackCallSummaryInstance(
$this->version,
$payload,
$response->getContent(),
$this->solution['accountSid'],
$this->solution['sid']
);

}

/**
* Update the FeedbackCallSummaryInstance with Metadata
*
* @param \DateTime $endDate
* @param \DateTime $startDate
* @param array|Options $options Optional Arguments
* @return ResourceMetadata The Updated Resource with Metadata
* @throws TwilioException When an HTTP error occurs.
*/
public function updateWithMetadata(\DateTime $endDate, \DateTime $startDate, array $options = []): ResourceMetadata
{
$response = $this->_update( $endDate, $startDate, $options);
$resource = new FeedbackCallSummaryInstance(
$this->version,
$response->getContent(),
$this->solution['accountSid'],
$this->solution['sid']
);
return new ResourceMetadata(
$resource,
$response->getStatusCode(),
$response->getHeaders()
);
}


Expand Down
77 changes: 70 additions & 7 deletions examples/php/src/Twilio/Rest/Api/V2010/Account/CallContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
use Twilio\Values;
use Twilio\Version;
use Twilio\InstanceContext;
use Twilio\Http\Response;
use Twilio\Metadata\ResourceMetadata;


/**
Expand Down Expand Up @@ -56,6 +58,18 @@ public function __construct(
.'.json';
}

/**
* Helper function for Delete
*
* @return Response Deleted Response
* @throws TwilioException When an HTTP error occurs.
*/
private function _delete(): Response
{
$headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
return $this->version->handleRequest('DELETE', $this->uri, [], [], $headers, "delete");
}

/**
* Delete the CallInstance
*
Expand All @@ -64,12 +78,41 @@ public function __construct(
*/
public function delete(): bool
{
$response = $this->_delete();

return true;
}

$headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
return $this->version->delete('DELETE', $this->uri, [], [], $headers);
/**
* Delete the CallInstance with Metadata
*
* @return ResourceMetadata The Deleted Resource with Metadata
* @throws TwilioException When an HTTP error occurs.
*/
public function deleteWithMetadata(): ResourceMetadata
{
$response = $this->_delete();

return new ResourceMetadata(
null,
$response->getStatusCode(),
$response->getHeaders()
);
}


/**
* Helper function for Fetch
*
* @return Response Fetched Response
* @throws TwilioException When an HTTP error occurs.
*/
private function _fetch(): Response
{
$headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded', 'Accept' => 'application/json' ]);
return $this->version->handleRequest('GET', $this->uri, [], [], $headers, "fetch");
}

/**
* Fetch the CallInstance
*
Expand All @@ -78,16 +121,36 @@ public function delete(): bool
*/
public function fetch(): CallInstance
{

$headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded', 'Accept' => 'application/json' ]);
$payload = $this->version->fetch('GET', $this->uri, [], [], $headers);

$response = $this->_fetch();
return new CallInstance(
$this->version,
$payload,
$response->getContent(),
$this->solution['accountSid'],
$this->solution['testInteger']
);

}

/**
* Fetch the CallInstance with Metadata
*
* @return ResourceMetadata The Fetched Resource with Metadata
* @throws TwilioException When an HTTP error occurs.
*/
public function fetchWithMetadata(): ResourceMetadata
{
$response = $this->_fetch();
$resource = new CallInstance(
$this->version,
$response->getContent(),
$this->solution['accountSid'],
$this->solution['testInteger']
);
return new ResourceMetadata(
$resource,
$response->getStatusCode(),
$response->getHeaders()
);
}


Expand Down
Loading