Skip to content

Commit

Permalink
v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rattrayalex committed Mar 20, 2023
1 parent 5e1e7b0 commit 4f59c32
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The API documentation can be found [here](https://docs.lithic.com).
#### Gradle

```kotlin
implementation("com.lithic.api:lithic-java:0.4.0")
implementation("com.lithic.api:lithic-java:0.5.0")
```

#### Maven
Expand All @@ -28,7 +28,7 @@ implementation("com.lithic.api:lithic-java:0.4.0")
<dependency>
<groupId>com.lithic.api</groupId>
<artifactId>lithic-java</artifactId>
<version>0.4.0</version>
<version>0.5.0</version>
</dependency>
```

Expand Down Expand Up @@ -57,10 +57,10 @@ LithicClient client = LithicOkHttpClient.builder()
.build();
```

| Property | Environment variable | Required | Default value |
| ------------- | ----------------------- | -------- | ------------- |
| apiKey | `LITHIC_API_KEY` | true | |
| webhookSecret | `LITHIC_WEBHOOK_SECRET` | false | |
| Property | Environment variable | Required | Default value |
| -------- | ------------------------- | -------- | ------------- |
| apiKey | `LITHIC_API_KEY` | true ||
| webhookSecret | `LITHIC_WEBHOOK_SECRET` | false ||

Read the documentation for more configuration options.

Expand Down Expand Up @@ -137,6 +137,12 @@ To write an unrecognized enum value, pass a string to the wrapper class's `of` c
Card.builder().state(State.of("NEW_STATE")).build()
```







## Requests

### Parameters and bodies
Expand Down Expand Up @@ -193,6 +199,7 @@ if (state().isMissing()) {
}
```


### Additional model properties

Sometimes, the server response may include additional properties that are not yet available in this library's types. You can access them using the model's `_additionalProperties` method:
Expand All @@ -201,6 +208,7 @@ Sometimes, the server response may include additional properties that are not ye
String secret = card._additionalProperties().get("secret_field");
```


---

## Pagination
Expand Down Expand Up @@ -258,6 +266,7 @@ You can use `lithic.webhooks().verifySignature(body, headers, secret?)` or `lith

---


## Error handling

This library throws exceptions in a single hierarchy for easy handling:
Expand All @@ -284,35 +293,27 @@ This library throws exceptions in a single hierarchy for easy handling:
## Network options

### Retries

Requests that experience certain errors are automatically retried 2 times by default, with a short exponential backoff. Connection errors (for example, due to a network connectivity problem), 409 Conflict, 429 Rate Limit, and >=500 Internal errors will all be retried by default.
You can provide a `maxRetries` on the client builder to configure this:

```java
LithicClient client = LithicOkHttpClient.builder()
.fromEnv()
.maxRetries(4)
.build();
```

### Timeouts

Requests time out after 60 seconds by default. You can configure this on the client builder:

```java
LithicClient client = LithicOkHttpClient.builder()
.fromEnv()
.timeout(Duration.ofSeconds(30))
.build();
```

### Environments

Requests are made to the production environment by default. You can connect to other environments, like `sandbox`, via the client builder:

```java
LithicClient client = LithicOkHttpClient.builder()
.fromEnv()
.sandbox()
.build();
```
```
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {

allprojects {
group = "com.lithic.api"
version = "0.4.0"
version = "0.5.0"
}

nexusPublishing {
Expand Down

0 comments on commit 4f59c32

Please sign in to comment.