@@ -334,13 +334,13 @@ class Endpoint {
334334 public string $ sort_order = 'SORT_ASC ' ;
335335
336336 /**
337- * @var string $sort_flags
337+ * @var string|null $sort_flags
338338 * Sets the default value for the `sort_flags` field in the request data. This value is used to control the sorting
339339 * flags of the Model objects returned by this Endpoint. This value can be overridden by the client in the request
340340 * data. This value only takes effect when the `sort_by` field is also set. This value must be the name of a valid
341341 * PHP sort flags constant (e.g. 'SORT_REGULAR', 'SORT_NATURAL')
342342 */
343- public string $ sort_flags = ' SORT_REGULAR ' ;
343+ public string | null $ sort_flags = null ;
344344
345345 /**
346346 * @var bool $append
@@ -1157,7 +1157,7 @@ class Endpoint {
11571157 # Allow the endpoint/client to override the Model's sort_by and sort_order properties
11581158 $ this ->model ->sort_by = $ this ->sort_by ?? $ this ->model ->sort_by ;
11591159 $ this ->model ->sort_order = constant ($ this ->sort_order ) ?? $ this ->model ->sort_order ;
1160- $ this ->model ->sort_flags = constant ($ this ->sort_flags ) ?? $ this ->model ->sort_flags ;
1160+ $ this ->model ->sort_flags = $ this -> sort_flags ? constant ($ this ->sort_flags ) : $ this ->model ->sort_flags ;
11611161
11621162 # Create the object and return it
11631163 return $ this ->model ->create (apply: $ this ->request_data ['apply ' ] === true );
@@ -1181,7 +1181,7 @@ class Endpoint {
11811181 # Allow the endpoint/client to override the Model's sort_by and sort_order properties
11821182 $ this ->model ->sort_by = $ this ->sort_by ?? $ this ->model ->sort_by ;
11831183 $ this ->model ->sort_order = constant ($ this ->sort_order ) ?? $ this ->model ->sort_order ;
1184- $ this ->model ->sort_flags = constant ($ this ->sort_flags ) ?? $ this ->model ->sort_flags ;
1184+ $ this ->model ->sort_flags = $ this -> sort_flags ? constant ($ this ->sort_flags ) : $ this ->model ->sort_flags ;
11851185
11861186 # Update the object and return it
11871187 return $ this ->model ->update (
0 commit comments