@@ -596,7 +596,9 @@ import com.tryfinch.api.models.AccessTokenCreateParams;
596
596
import com.tryfinch.api.models.HrisDirectoryListParams ;
597
597
598
598
HrisDirectoryListParams params = AccessTokenCreateParams . builder()
599
- .code(JsonMissing . of())
599
+ .clientSecret(" client_secret" )
600
+ .code(" code" )
601
+ .clientId(JsonMissing . of())
600
602
.build();
601
603
```
602
604
@@ -638,19 +640,19 @@ To access a property's raw JSON value, which may be undocumented, call its `_` p
638
640
import com.tryfinch.api.core.JsonField ;
639
641
import java.util.Optional ;
640
642
641
- JsonField<String > code = client. accessTokens(). create(params). _code ();
643
+ JsonField<String > clientId = client. accessTokens(). create(params). _clientId ();
642
644
643
- if (code . isMissing()) {
645
+ if (clientId . isMissing()) {
644
646
// The property is absent from the JSON response
645
- } else if (code . isNull()) {
647
+ } else if (clientId . isNull()) {
646
648
// The property was set to literal null
647
649
} else {
648
650
// Check if value was provided as a string
649
651
// Other methods include `asNumber()`, `asBoolean()`, etc.
650
- Optional<String > jsonString = code . asString();
652
+ Optional<String > jsonString = clientId . asString();
651
653
652
654
// Try to deserialize into a custom type
653
- MyClass myObject = code . asUnknown(). orElseThrow(). convert(MyClass . class);
655
+ MyClass myObject = clientId . asUnknown(). orElseThrow(). convert(MyClass . class);
654
656
}
655
657
```
656
658
0 commit comments