Skip to content

Commit 0f28b13

Browse files
feat(api): api update
1 parent e7e3c8d commit 0f28b13

File tree

10 files changed

+1829
-1287
lines changed

10 files changed

+1829
-1287
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 45
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e8b684dbd61d1724b5e516a573a952bb6906d63840e27ebda7731a2f71061aff.yml
3-
openapi_spec_hash: 8baff9577d4e721d0494ff315da267ca
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-6d0c6a1feba5ccb895a6779cd98c2a0ae87d6394f5e98a9da51f17258c4eb297.yml
3+
openapi_spec_hash: ac3be0c8a992103e5f467fe1bcb20a81
44
config_hash: 5146b12344dae76238940989dac1e8a0

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,9 @@ import com.tryfinch.api.models.AccessTokenCreateParams;
596596
import com.tryfinch.api.models.HrisDirectoryListParams;
597597

598598
HrisDirectoryListParams params = AccessTokenCreateParams.builder()
599-
.code(JsonMissing.of())
599+
.clientSecret("client_secret")
600+
.code("code")
601+
.clientId(JsonMissing.of())
600602
.build();
601603
```
602604

@@ -638,19 +640,19 @@ To access a property's raw JSON value, which may be undocumented, call its `_` p
638640
import com.tryfinch.api.core.JsonField;
639641
import java.util.Optional;
640642

641-
JsonField<String> code = client.accessTokens().create(params)._code();
643+
JsonField<String> clientId = client.accessTokens().create(params)._clientId();
642644

643-
if (code.isMissing()) {
645+
if (clientId.isMissing()) {
644646
// The property is absent from the JSON response
645-
} else if (code.isNull()) {
647+
} else if (clientId.isNull()) {
646648
// The property was set to literal null
647649
} else {
648650
// Check if value was provided as a string
649651
// Other methods include `asNumber()`, `asBoolean()`, etc.
650-
Optional<String> jsonString = code.asString();
652+
Optional<String> jsonString = clientId.asString();
651653

652654
// 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);
654656
}
655657
```
656658

0 commit comments

Comments
 (0)