diff --git a/src/main/resources/twilio-php/models/modelClass.mustache b/src/main/resources/twilio-php/models/modelClass.mustache index 4dac96780..4bdb0ca43 100644 --- a/src/main/resources/twilio-php/models/modelClass.mustache +++ b/src/main/resources/twilio-php/models/modelClass.mustache @@ -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}} }