Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.441.2 (#18)
Browse files Browse the repository at this point in the history
Co-authored-by: speakeasybot <[email protected]>
  • Loading branch information
github-actions[bot] and speakeasybot authored Nov 21, 2024
1 parent 309bf60 commit b68f5ef
Show file tree
Hide file tree
Showing 9 changed files with 315 additions and 188 deletions.
9 changes: 5 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ id: 83c79445-e1aa-4008-8835-519234c13f68
management:
docChecksum: bf61704a99aaaf3476d24bb0d505a88c
docVersion: "2018-02-08"
speakeasyVersion: 1.441.1
generationVersion: 2.461.2
releaseVersion: 1.0.0-beta
configChecksum: dad5be879d82ab7fba0fcf7b441ed4a8
speakeasyVersion: 1.441.2
generationVersion: 2.461.4
releaseVersion: 1.0.0-beta.1
configChecksum: 8a2d90092207cde728720bd7a0fbc889
repoURL: https://github.com/goshippo/shippo-java-sdk.git
published: true
features:
java:
additionalDependencies: 0.1.0
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
java:
version: 1.0.0-beta
version: 1.0.0-beta.1
additionalDependencies: []
additionalPlugins:
- id 'groovy'
Expand Down
19 changes: 13 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
speakeasyVersion: 1.441.1
speakeasyVersion: 1.441.2
sources:
my-first-source:
sourceNamespace: my-first-source
sourceRevisionDigest: sha256:9627d5070a4f07da7f5477caf13cb84b0fa477fef32e716629630248b09349b3
sourceBlobDigest: sha256:cb17e1095674471608b63041b0cd3a59f9f47028eeb45c5f22004f7f6fbb19c1
sourceRevisionDigest: sha256:b7a5f00224fde68f5c68a9f4dd3d077b0d25f491e519ffc69758b407a0e2909c
sourceBlobDigest: sha256:b267e444289e13e5381eb13cc6671b99c9498b3c6f27111df668633f7ebb7f43
tags:
- latest
- speakeasy-sdk-regen-1732213941
targets:
my-first-target:
source: my-first-source
sourceNamespace: my-first-source
sourceRevisionDigest: sha256:9627d5070a4f07da7f5477caf13cb84b0fa477fef32e716629630248b09349b3
sourceBlobDigest: sha256:cb17e1095674471608b63041b0cd3a59f9f47028eeb45c5f22004f7f6fbb19c1
sourceRevisionDigest: sha256:b7a5f00224fde68f5c68a9f4dd3d077b0d25f491e519ffc69758b407a0e2909c
sourceBlobDigest: sha256:b267e444289e13e5381eb13cc6671b99c9498b3c6f27111df668633f7ebb7f43
codeSamplesNamespace: my-first-source-code-samples
codeSamplesRevisionDigest: sha256:bdad0d51db4fe89fe0123c96bd9fb5d22a650ae33f9fcc291de08e1dd7ae750c
codeSamplesRevisionDigest: sha256:45c308b6146e78c1e75de14d33c990910dba6e191df6adb384da7a1f35aa73df
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand All @@ -27,6 +28,12 @@ workflow:
my-first-target:
target: java
source: my-first-source
publish:
java:
ossrhUsername: lucas-shippo
ossrhPassword: $ossrh_password
gpgSecretKey: $java_gpg_secret_key
gpgPassPhrase: $java_gpg_passphrase
codeSamples:
registry:
location: registry.speakeasyapi.dev/shippo/shippo/my-first-source-code-samples
Expand Down
244 changes: 165 additions & 79 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,91 +44,15 @@ The samples below show how a published SDK artifact is used:

Gradle:
```groovy
implementation 'com.shippo:sdk:1.0.0-beta'
```

Maven:
```xml
<dependency>
<groupId>com.shippo</groupId>
<artifactId>sdk</artifactId>
<version>1.0.0-beta</version>
</dependency>
```

## SDK Example Usage

### Example

```java
package hello.world;

import com.shippo.sdk.Shippo;
import com.shippo.sdk.models.components.Security;
import com.shippo.sdk.utils.EventStream;

import org.openapitools.jackson.nullable.JsonNullable;

public class Application {

public static void main(String[] args) throws Exception {
try {
Shippo sdk = Shippo.builder()
.apiKeyHeader("<YOUR_API_KEY_HERE>")
// the API version can be globally set, though this is normally not required
// .shippoApiVersion("<YYYY-MM-DD>")
.build();

ListAddressesResponse res = sdk.addresses().list()
.page(1L)
.results(5L)
.call();

if (res.addressPaginatedList().isPresent()) {
// handle response
}
} catch (com.shippo.sdk.models.errors.SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
}
}
```

<!-- No SDK Example Usage [usage] -->
<!-- No Error Handling [errors] -->
<!-- No Server Selection [server] -->
<!-- No Authentication [security] -->
<!-- No Global Parameters [global-parameters] -->

## Documentation
Review our full guides and references at [https://docs.goshippo.com/](https://docs.goshippo.com/).

<!-- Placeholder for Future Speakeasy SDK Sections -->

<!-- Start SDK Installation [installation] -->
## SDK Installation

### Getting started

JDK 11 or later is required.

The samples below show how a published SDK artifact is used:

Gradle:
```groovy
implementation 'com.goshippo:sdk:1.0.0-beta'
implementation 'com.goshippo:sdk:1.0.0-beta.1'
```

Maven:
```xml
<dependency>
<groupId>com.goshippo</groupId>
<artifactId>sdk</artifactId>
<version>1.0.0-beta</version>
<version>1.0.0-beta.1</version>
</dependency>
```

Expand All @@ -147,6 +71,41 @@ gradlew.bat publishToMavenLocal -Pskip.signing
```
<!-- End SDK Installation [installation] -->

<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage

### Example

```java
package hello.world;

import com.goshippo.sdk.Shippo;
import com.goshippo.sdk.models.operations.ListAddressesResponse;
import java.lang.Exception;

public class Application {

public static void main(String[] args) throws Exception {

Shippo sdk = Shippo.builder()
.apiKeyHeader("<YOUR_API_KEY_HERE>")
.shippoApiVersion("2018-02-08")
.build();

ListAddressesResponse res = sdk.addresses().list()
.page(1L)
.results(5L)
.shippoApiVersion("2018-02-08")
.call();

if (res.addressPaginatedList().isPresent()) {
// handle response
}
}
}
```
<!-- End SDK Example Usage [usage] -->

<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations

Expand Down Expand Up @@ -304,4 +263,131 @@ Feel free to open a PR or a Github issue as a proof of concept and we'll do our
Connect with multiple different carriers, get discounted shipping labels, track parcels, and much more with just one integration.
You can use your own carrier accounts or take advantage of our discounted rates with the Shippo carrier accounts.
Using Shippo makes it easy to deal with multiple carrier integrations, rate shopping, tracking and other parts of the shipping workflow.
We provide the API and web app for all your shipping needs.
We provide the API and web app for all your shipping needs.<!-- Start Error Handling [errors] -->
## Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.

By default, an API error will throw a `models/errors/SDKError` exception. When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `initiateOauth2Signin` method throws the following exceptions:

| Error Type | Status Code | Content Type |
| --------------------------------------------------------------------- | ----------- | ---------------- |
| models/errors/InitiateOauth2SigninResponseBody | 400 | application/json |
| models/errors/InitiateOauth2SigninCarrierAccountsResponseBody | 401 | application/json |
| models/errors/InitiateOauth2SigninCarrierAccountsResponseResponseBody | 404 | application/json |
| models/errors/SDKError | 4XX, 5XX | \*/\* |

### Example

```java
package hello.world;

import com.goshippo.sdk.Shippo;
import com.goshippo.sdk.models.errors.InitiateOauth2SigninCarrierAccountsResponseBody;
import com.goshippo.sdk.models.errors.InitiateOauth2SigninCarrierAccountsResponseResponseBody;
import com.goshippo.sdk.models.errors.InitiateOauth2SigninResponseBody;
import com.goshippo.sdk.models.operations.InitiateOauth2SigninResponse;
import java.lang.Exception;

public class Application {

public static void main(String[] args) throws InitiateOauth2SigninResponseBody, InitiateOauth2SigninCarrierAccountsResponseBody, InitiateOauth2SigninCarrierAccountsResponseResponseBody, Exception {

Shippo sdk = Shippo.builder()
.apiKeyHeader("<YOUR_API_KEY_HERE>")
.shippoApiVersion("2018-02-08")
.build();

InitiateOauth2SigninResponse res = sdk.carrierAccounts().initiateOauth2Signin()
.carrierAccountObjectId("<id>")
.redirectUri("https://enlightened-mortise.com/")
.state("Louisiana")
.shippoApiVersion("2018-02-08")
.call();

// handle response
}
}
```
<!-- End Error Handling [errors] -->

<!-- Start Server Selection [server] -->
## Server Selection

### Override Server URL Per-Client

The default server can also be overridden globally using the `.serverURL(String serverUrl)` builder method when initializing the SDK client instance. For example:
```java
package hello.world;

import com.goshippo.sdk.Shippo;
import com.goshippo.sdk.models.operations.ListAddressesResponse;
import java.lang.Exception;

public class Application {

public static void main(String[] args) throws Exception {

Shippo sdk = Shippo.builder()
.serverURL("https://api.goshippo.com")
.apiKeyHeader("<YOUR_API_KEY_HERE>")
.shippoApiVersion("2018-02-08")
.build();

ListAddressesResponse res = sdk.addresses().list()
.page(1L)
.results(5L)
.shippoApiVersion("2018-02-08")
.call();

if (res.addressPaginatedList().isPresent()) {
// handle response
}
}
}
```
<!-- End Server Selection [server] -->

<!-- Start Authentication [security] -->
## Authentication

### Per-Client Security Schemes

This SDK supports the following security scheme globally:

| Name | Type | Scheme |
| -------------- | ------ | ------- |
| `apiKeyHeader` | apiKey | API key |

To authenticate with the API the `apiKeyHeader` parameter must be set when initializing the SDK client instance. For example:
```java
package hello.world;

import com.goshippo.sdk.Shippo;
import com.goshippo.sdk.models.operations.ListAddressesResponse;
import java.lang.Exception;

public class Application {

public static void main(String[] args) throws Exception {

Shippo sdk = Shippo.builder()
.apiKeyHeader("<YOUR_API_KEY_HERE>")
.shippoApiVersion("2018-02-08")
.build();

ListAddressesResponse res = sdk.addresses().list()
.page(1L)
.results(5L)
.shippoApiVersion("2018-02-08")
.call();

if (res.addressPaginatedList().isPresent()) {
// handle response
}
}
}
```
<!-- End Authentication [security] -->


12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,14 @@ Based on:
- OpenAPI Doc
- Speakeasy CLI 1.401.2 (2.421.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.4.0] .
- [java v0.4.0] .

## 2024-11-21 18:32:17
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.441.2 (2.461.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v1.0.0-beta.1] .
### Releases
- [Maven Central v1.0.0-beta.1] https://central.sonatype.com/artifact/com.goshippo/sdk/1.0.0-beta.1 - .
Loading

0 comments on commit b68f5ef

Please sign in to comment.