Skip to content

Commit 5e1fcc0

Browse files
chore: pass correct param names in request body for php (#628)
# 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.
1 parent 24901e1 commit 5e1fcc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/resources/twilio-php/models/modelClass.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class {{classname}} implements \JsonSerializable
1010
{{/vars}}
1111
public function __construct(array $payload = []) {
1212
{{#vars}}
13-
$this->{{#lambda.camelcase}}{{baseName}}{{/lambda.camelcase}} = Values::array_get($payload, '{{#lambda.camelcase}}{{baseName}}{{/lambda.camelcase}}');
13+
$this->{{#lambda.camelcase}}{{baseName}}{{/lambda.camelcase}} = Values::array_get($payload, '{{name}}');
1414
{{/vars}}
1515
}
1616

0 commit comments

Comments
 (0)