Skip to content

Commit

Permalink
v0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie committed May 12, 2023
1 parent e9a29bf commit eef279d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Lithic Java API Library

[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.8.1)
[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.9.0)

The Lithic Java SDK provides convenient access to the Lithic REST API from applications written in Java. It includes helper classes with helpful types and documentation for every request and response property.

Expand All @@ -21,7 +21,7 @@ The API documentation can be found [here](https://docs.lithic.com).
#### Gradle

```kotlin
implementation("com.lithic.api:lithic-java:0.8.1")
implementation("com.lithic.api:lithic-java:0.9.0")
```

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

Expand Down Expand Up @@ -59,10 +59,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 @@ -139,6 +139,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 @@ -195,6 +201,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 @@ -203,6 +210,7 @@ Sometimes, the server response may include additional properties that are not ye
JsonValue secret = card._additionalProperties().get("secret_field");
```


---

## Pagination
Expand Down Expand Up @@ -268,6 +276,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 @@ -294,32 +303,24 @@ 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();
```

### Proxies

Requests can be routed through a proxy. You can configure this on the client builder:

```java
LithicClient client = LithicOkHttpClient.builder()
.fromEnv()
Expand All @@ -329,14 +330,11 @@ LithicClient client = LithicOkHttpClient.builder()
))
.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.8.1"
version = "0.9.0"
}

nexusPublishing {
Expand Down

0 comments on commit eef279d

Please sign in to comment.