Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 🐝 Update SDK - Generate 5.0.0-beta.5 #11

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,784 changes: 1,233 additions & 551 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
csharp:
version: 5.0.0-beta.4
version: 5.0.0-beta.5
additionalDependencies: []
author: Shippo
clientServerStatusCodesAsErrors: true
disableNamespacePascalCasingApr2024: true
dotnetVersion: net6.0
enableSourceLink: false
flattenGlobalSecurity: true
imports:
option: openapi
Expand All @@ -27,9 +28,12 @@ csharp:
operations: Models/Requests
shared: Models/Components
webhooks: Models/Webhooks
includeDebugSymbols: false
inputModelSuffix: input
license: MIT License
maxMethodParams: 3
outputModelSuffix: output
packageName: Shippo
packageTags: ""
responseFormat: flat
sourceDirectory: ""
11 changes: 5 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
speakeasyVersion: 1.327.0
speakeasyVersion: 1.401.2
sources:
openapi:
sourceNamespace: openapi
sourceRevisionDigest: sha256:b5a922d3b0c4c6410583f963b8af59c7e544e81490db81bd004e86fe8cf06d45
sourceBlobDigest: sha256:d22d7427b397fc6b66ed98e3075265860e4caab1485770e98ab979ce468057f2
sourceRevisionDigest: sha256:6c174e4396bf7257a6e1e755c9cf74d699fe12acf90d720564f9bd29b3f2146a
sourceBlobDigest: sha256:d20d1d724adbc75bf8db343aa4c16e626daaadbb57e55e4d1b486ea2277b1bb5
tags:
- latest
- main
targets:
csharp:
source: openapi
sourceNamespace: openapi
sourceRevisionDigest: sha256:b5a922d3b0c4c6410583f963b8af59c7e544e81490db81bd004e86fe8cf06d45
sourceBlobDigest: sha256:d22d7427b397fc6b66ed98e3075265860e4caab1485770e98ab979ce468057f2
outLocation: /github/workspace/repo
sourceRevisionDigest: sha256:6c174e4396bf7257a6e1e755c9cf74d699fe12acf90d720564f9bd29b3f2146a
sourceBlobDigest: sha256:d20d1d724adbc75bf8db343aa4c16e626daaadbb57e55e4d1b486ea2277b1bb5
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing to This Repository

Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements.

## How to Report Issues

If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes:

- A clear and descriptive title
- Steps to reproduce the issue
- Expected and actual behavior
- Any relevant logs, screenshots, or error messages
- Information about your environment (e.g., operating system, software versions)
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed

## Issue Triage and Upstream Fixes

We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code.

## Contact

If you have any questions or need further assistance, please feel free to reach out by opening an issue.

Thank you for your understanding and cooperation!

The Maintainers
86 changes: 28 additions & 58 deletions NUGET.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,23 @@

```csharp
using Shippo;
using Shippo.Models.Components;
using Shippo.Models.Requests;

var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08");

var res = await sdk.Addresses.ListAsync(
page: 1,
results: 5,
shippoApiVersion: "2018-02-08");

// handle response
```
<!-- End SDK Example Usage [usage] -->

<!-- Start Global Parameters [global-parameters] -->
## Global Parameters

## Global Parameters

A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.

For example, you can set `SHIPPO-API-VERSION` to `"2018-02-08"` at SDK initialization and then you do not have to pass the same value on calls to operations like `List`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.


### Available Globals

The following global parameter is available.

| Name | Type | Required | Description |
| ---- | ---- |:--------:| ----------- |
| shippoApiVersion | string | | String used to pick a non-default API version to use |


### Example

```csharp
using Shippo;
using Shippo.Models.Components;
using Shippo.Models.Requests;

var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08");
shippoApiVersion: "2018-02-08"
);

var res = await sdk.Addresses.ListAsync(
page: 1,
results: 5,
shippoApiVersion: "2018-02-08");
shippoApiVersion: "2018-02-08"
);

// handle response
```
<!-- End Global Parameters [global-parameters] -->
<!-- End SDK Example Usage [usage] -->

<!-- Start Error Handling [errors] -->
## Error Handling
Expand All @@ -79,45 +42,50 @@ Handling errors in this SDK should largely match your expectations. All operati

```csharp
using Shippo;
using Shippo.Models.Requests;
using Shippo.Models.Components;
using System;
using Shippo.Models.Errors;
using Shippo.Models.Requests;

var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08");

InitiateOauth2SigninRequest req = new InitiateOauth2SigninRequest() {
CarrierAccountObjectId = "<value>",
RedirectUri = "http://fine-cummerbund.biz",
};
shippoApiVersion: "2018-02-08"
);

try
{
InitiateOauth2SigninRequest req = new InitiateOauth2SigninRequest() {
CarrierAccountObjectId = "<value>",
RedirectUri = "https://enlightened-mortise.com/",
};

var res = await sdk.CarrierAccounts.InitiateOauth2SigninAsync(req);

// handle response
}
catch (Exception ex)
{
if (ex is InitiateOauth2SigninResponseBody)
{
// handle exception
// Handle exception data
throw;
}
else if (ex is InitiateOauth2SigninCarrierAccountsResponseBody)
{
// handle exception
// Handle exception data
throw;
}
else if (ex is InitiateOauth2SigninCarrierAccountsResponseResponseBody)
{
// handle exception
// Handle exception data
throw;
}
else if (ex is Shippo.Models.Errors.SDKException)
else if (ex is Models.Errors.SDKException)
{
// handle exception
// Handle default exception
throw;
}
}

```
<!-- End Error Handling [errors] -->

Expand Down Expand Up @@ -154,17 +122,19 @@ This SDK supports the following security scheme globally:
To authenticate with the API the `APIKeyHeader` parameter must be set when initializing the SDK client instance. For example:
```csharp
using Shippo;
using Shippo.Models.Components;
using Shippo.Models.Requests;
using Shippo.Models.Components;

var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08");
shippoApiVersion: "2018-02-08"
);

var res = await sdk.Addresses.ListAsync(
page: 1,
results: 5,
shippoApiVersion: "2018-02-08");
shippoApiVersion: "2018-02-08"
);

// handle response
```
Expand Down
73 changes: 50 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,38 @@ apiKeyHeader:"shippo_test_595d9cb0c0e14497bf07e75ecfec6c6d"
```


<!-- Start Summary [summary] -->
## Summary

Shippo external API.: Use this API to integrate with the Shippo service
<!-- End Summary [summary] -->

<!-- Start Table of Contents [toc] -->
## Table of Contents

* [SDK Installation](#sdk-installation)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Authentication](#authentication)
<!-- End Table of Contents [toc] -->

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

### NuGet

To add the [NuGet](https://www.nuget.org/) package to a .NET project:
```bash
dotnet add package Shippo
```

### Locally

To add a reference to a local instance of the SDK in a .NET project:
```bash
dotnet add reference path/to/Shippo.csproj
dotnet add reference Shippo/Shippo.csproj
```
<!-- End SDK Installation [installation] -->

Expand All @@ -36,17 +55,19 @@ dotnet add reference path/to/Shippo.csproj

```csharp
using Shippo;
using Shippo.Models.Components;
using Shippo.Models.Requests;
using Shippo.Models.Components;

var sdk = new ShippoSDK(
apiKeyHeader: "<YOUR_API_KEY_HERE>",
shippoApiVersion: "2018-02-08");
shippoApiVersion: "2018-02-08"
);

var res = await sdk.Addresses.ListAsync(
page: 1,
results: 5,
shippoApiVersion: "2018-02-08");
shippoApiVersion: "2018-02-08"
);

// handle response
```
Expand Down Expand Up @@ -101,6 +122,9 @@ Review our full guides and references at [https://docs.goshippo.com/](https://do
<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations

<details open>
<summary>Available methods</summary>

### [Addresses](docs/sdks/addresses/README.md)

* [List](docs/sdks/addresses/README.md#list) - List all addresses
Expand All @@ -126,6 +150,11 @@ Review our full guides and references at [https://docs.goshippo.com/](https://do
* [Register](docs/sdks/carrieraccounts/README.md#register) - Add a Shippo carrier account
* [GetRegistrationStatus](docs/sdks/carrieraccounts/README.md#getregistrationstatus) - Get Carrier Registration status

### [CarrierParcelTemplates](docs/sdks/carrierparceltemplates/README.md)

* [List](docs/sdks/carrierparceltemplates/README.md#list) - List all carrier parcel templates
* [Get](docs/sdks/carrierparceltemplates/README.md#get) - Retrieve a carrier parcel templates

### [CustomsDeclarations](docs/sdks/customsdeclarations/README.md)

* [List](docs/sdks/customsdeclarations/README.md#list) - List all customs declarations
Expand All @@ -138,13 +167,6 @@ Review our full guides and references at [https://docs.goshippo.com/](https://do
* [Create](docs/sdks/customsitems/README.md#create) - Create a new customs item
* [Get](docs/sdks/customsitems/README.md#get) - Retrieve a customs item

### [RatesAtCheckout](docs/sdks/ratesatcheckout/README.md)

* [Create](docs/sdks/ratesatcheckout/README.md#create) - Generate a live rates request
* [GetDefaultParcelTemplate](docs/sdks/ratesatcheckout/README.md#getdefaultparceltemplate) - Show current default parcel template
* [UpdateDefaultParcelTemplate](docs/sdks/ratesatcheckout/README.md#updatedefaultparceltemplate) - Update default parcel template
* [DeleteDefaultParcelTemplate](docs/sdks/ratesatcheckout/README.md#deletedefaultparceltemplate) - Clear current default parcel template

### [Manifests](docs/sdks/manifests/README.md)

* [List](docs/sdks/manifests/README.md#list) - List all manifests
Expand All @@ -157,11 +179,6 @@ Review our full guides and references at [https://docs.goshippo.com/](https://do
* [Create](docs/sdks/orders/README.md#create) - Create a new order
* [Get](docs/sdks/orders/README.md#get) - Retrieve an order

### [CarrierParcelTemplates](docs/sdks/carrierparceltemplates/README.md)

* [List](docs/sdks/carrierparceltemplates/README.md#list) - List all carrier parcel templates
* [Get](docs/sdks/carrierparceltemplates/README.md#get) - Retrieve a carrier parcel templates

### [Parcels](docs/sdks/parcels/README.md)

* [List](docs/sdks/parcels/README.md#list) - List all parcels
Expand All @@ -178,6 +195,13 @@ Review our full guides and references at [https://docs.goshippo.com/](https://do
* [ListShipmentRates](docs/sdks/rates/README.md#listshipmentrates) - Retrieve shipment rates
* [ListShipmentRatesByCurrencyCode](docs/sdks/rates/README.md#listshipmentratesbycurrencycode) - Retrieve shipment rates in currency

### [RatesAtCheckout](docs/sdks/ratesatcheckout/README.md)

* [Create](docs/sdks/ratesatcheckout/README.md#create) - Generate a live rates request
* [GetDefaultParcelTemplate](docs/sdks/ratesatcheckout/README.md#getdefaultparceltemplate) - Show current default parcel template
* [UpdateDefaultParcelTemplate](docs/sdks/ratesatcheckout/README.md#updatedefaultparceltemplate) - Update default parcel template
* [DeleteDefaultParcelTemplate](docs/sdks/ratesatcheckout/README.md#deletedefaultparceltemplate) - Clear current default parcel template

### [Refunds](docs/sdks/refunds/README.md)

* [Create](docs/sdks/refunds/README.md#create) - Create a refund
Expand All @@ -197,6 +221,14 @@ Review our full guides and references at [https://docs.goshippo.com/](https://do
* [Create](docs/sdks/shipments/README.md#create) - Create a new shipment
* [Get](docs/sdks/shipments/README.md#get) - Retrieve a shipment

### [ShippoAccounts](docs/sdks/shippoaccounts/README.md)

* [List](docs/sdks/shippoaccounts/README.md#list) - List all Shippo Accounts
* [Create](docs/sdks/shippoaccounts/README.md#create) - Create a Shippo Account
* [Get](docs/sdks/shippoaccounts/README.md#get) - Retrieve a Shippo Account
* [Update](docs/sdks/shippoaccounts/README.md#update) - Update a Shippo Account


### [TrackingStatus](docs/sdks/trackingstatus/README.md)

* [Create](docs/sdks/trackingstatus/README.md#create) - Register a tracking webhook
Expand All @@ -216,20 +248,15 @@ Review our full guides and references at [https://docs.goshippo.com/](https://do
* [Get](docs/sdks/userparceltemplates/README.md#get) - Retrieves a user parcel template
* [Update](docs/sdks/userparceltemplates/README.md#update) - Update an existing user parcel template

### [ShippoAccounts](docs/sdks/shippoaccounts/README.md)

* [List](docs/sdks/shippoaccounts/README.md#list) - List all Shippo Accounts
* [Create](docs/sdks/shippoaccounts/README.md#create) - Create a Shippo Account
* [Get](docs/sdks/shippoaccounts/README.md#get) - Retrieve a Shippo Account
* [Update](docs/sdks/shippoaccounts/README.md#update) - Update a Shippo Account

### [Webhooks](docs/sdks/webhooks/README.md)

* [CreateWebhook](docs/sdks/webhooks/README.md#createwebhook) - Create a new webhook
* [ListWebhooks](docs/sdks/webhooks/README.md#listwebhooks) - List all webhooks
* [GetWebhook](docs/sdks/webhooks/README.md#getwebhook) - Retrieve a specific webhook
* [UpdateWebhook](docs/sdks/webhooks/README.md#updatewebhook) - Update an existing webhook
* [DeleteWebhook](docs/sdks/webhooks/README.md#deletewebhook) - Delete a specific webhook

</details>
<!-- End Available Resources and Operations [operations] -->


Expand Down
Loading