Skip to content

Commit

Permalink
chore: pass correct param names in request body for php (#628)
Browse files Browse the repository at this point in the history
# Fixes #
In PHP, the JSON request body params were not resolved correctly. They
were to be read from `name` instead of `baseName` since baseName is
explicitly being converted to camelCase. Fixing this enable users to
access the JSON Payload APIs correctly.
  • Loading branch information
tiwarishubham635 authored Jan 6, 2025
1 parent 24901e1 commit 5e1fcc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/resources/twilio-php/models/modelClass.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class {{classname}} implements \JsonSerializable
{{/vars}}
public function __construct(array $payload = []) {
{{#vars}}
$this->{{#lambda.camelcase}}{{baseName}}{{/lambda.camelcase}} = Values::array_get($payload, '{{#lambda.camelcase}}{{baseName}}{{/lambda.camelcase}}');
$this->{{#lambda.camelcase}}{{baseName}}{{/lambda.camelcase}} = Values::array_get($payload, '{{name}}');
{{/vars}}
}

Expand Down

0 comments on commit 5e1fcc0

Please sign in to comment.