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 3.0.0-alpha #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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,974 changes: 1,393 additions & 581 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ info:
description: Packagist library which integrates with Shippo Multi Carrier Shipping API. This library provides access to Shippo (goshippo.com) API capabilities. Including label generation, rating, tracking and more.
php:
version: 3.0.0-alpha
additionalDependencies:
autoload: {}
autoload-dev: {}
require: {}
require-dev: {}
author: Shippo
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKError
Expand All @@ -39,6 +44,7 @@ php:
svcName: openapi
license: MIT License
maxMethodParams: 3
methodArguments: infer-optional-args
namespace: Shippo\API
outputModelSuffix: output
packageName: shippo/shippo-php
Expand Down
26 changes: 21 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
speakeasyVersion: 1.310.0
speakeasyVersion: 1.459.2
sources:
openapi:
sourceNamespace: openapi
sourceRevisionDigest: sha256:3099fc4c926ab05099ea5c4cbb918e6423a03874cea38c8791efa7efbe6c5706
sourceBlobDigest: sha256:234f83b39101f22af624857db75abc2440fbe9c279d457ab0a7c8a393245cab1
sourceRevisionDigest: sha256:5b31d9279d3617db15807aec050465e6358639f87e42627f0d50c1511f894b9e
sourceBlobDigest: sha256:cd9da3407a166b3f3649622b362cd9710086eee23be01fef701736f0c030f6ed
tags:
- latest
- speakeasy-sdk-regen-1731434842
- "2018-02-08"
targets:
my-first-target:
source: openapi
sourceNamespace: openapi
sourceRevisionDigest: sha256:3099fc4c926ab05099ea5c4cbb918e6423a03874cea38c8791efa7efbe6c5706
sourceBlobDigest: sha256:234f83b39101f22af624857db75abc2440fbe9c279d457ab0a7c8a393245cab1
outLocation: /Users/mike.lueders/dev/shippo-php-sdk
php:
source: openapi
sourceNamespace: openapi
sourceRevisionDigest: sha256:5b31d9279d3617db15807aec050465e6358639f87e42627f0d50c1511f894b9e
sourceBlobDigest: sha256:cd9da3407a166b3f3649622b362cd9710086eee23be01fef701736f0c030f6ed
codeSamplesNamespace: openapi-php-code-samples
codeSamplesRevisionDigest: sha256:2d82bc43cfdb303d456275f52f5055f6f3c612b4198421fda027cbc1b295cc1b
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand All @@ -23,6 +31,14 @@ workflow:
registry:
location: registry.speakeasyapi.dev/shippo/shippo/openapi
targets:
my-first-target:
php:
target: php
source: openapi
publish:
packagist:
username: [email protected]
token: $packagist_token
codeSamples:
registry:
location: registry.speakeasyapi.dev/shippo/shippo/openapi-php-code-samples
blocking: false
4 changes: 4 additions & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ targets:
packagist:
username: [email protected]
token: $packagist_token
codeSamples:
registry:
location: registry.speakeasyapi.dev/shippo/shippo/openapi-php-code-samples
blocking: false
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
122 changes: 61 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,28 @@ Shippo external API.: Use this API to integrate with the Shippo service

<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [<img src="https://docs.goshippo.com/images/Logo.png" width="30" alt="Shippo logo"> Shippo PHP SDK](#img-srchttpsdocsgoshippocomimageslogopng-width30-altshippo-logo-shippo-php-sdk)
* [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)
* [Development](#development)
* [Maturity](#maturity)
* [Contributions](#contributions)
* [About Shippo](#about-shippo)

* [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)
<!-- End Table of Contents [toc] -->

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

The SDK relies on [Composer](https://getcomposer.org/) to manage its dependencies.

To install the SDK first add the below to your `composer.json` file:

```json
{
"repositories": [
{
"type": "github",
"url": "<UNSET>.git"
}
],
"require": {
"Shippo": "*"
}
}
```

Then run the following command:

To install the SDK and add it as a dependency to an existing `composer.json` file:
```bash
composer update
composer require "shippo/shippo-php"
```
<!-- End SDK Installation [installation] -->

Expand All @@ -68,23 +57,19 @@ declare(strict_types=1);
require 'vendor/autoload.php';

use Shippo\API;

$security = '<YOUR_API_KEY_HERE>';
use Shippo\API\Models\Components;

$sdk = API\Shippo::builder()
->setShippoApiVersion('2018-02-08')
->setSecurity($security)->build();

->build();

$request = new Components\WebhookPayloadBatch();

$response = $sdk->addresses->list(
page: 1,
results: 5,
shippoApiVersion: '2018-02-08'

$response = $sdk->batch(
request: $request
);

if ($response->addressPaginatedList !== null) {
if ($response->statusCode === 200) {
// handle response
}
```
Expand All @@ -98,63 +83,63 @@ if ($response->addressPaginatedList !== null) {

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

* [list](docs/sdks/addresses/README.md#list) - List all addresses
* [create](docs/sdks/addresses/README.md#create) - Create a new address
* [get](docs/sdks/addresses/README.md#get) - Retrieve an address
* [list](docs/sdks/addresses/README.md#list) - List all addresses
* [validate](docs/sdks/addresses/README.md#validate) - Validate an address

### [batches](docs/sdks/batches/README.md)

* [addShipments](docs/sdks/batches/README.md#addshipments) - Add shipments to a batch
* [create](docs/sdks/batches/README.md#create) - Create a batch
* [get](docs/sdks/batches/README.md#get) - Retrieve a batch
* [addShipments](docs/sdks/batches/README.md#addshipments) - Add shipments to a batch
* [purchase](docs/sdks/batches/README.md#purchase) - Purchase a batch
* [removeShipments](docs/sdks/batches/README.md#removeshipments) - Remove shipments from a batch

### [carrierAccounts](docs/sdks/carrieraccounts/README.md)

* [list](docs/sdks/carrieraccounts/README.md#list) - List all carrier accounts
* [create](docs/sdks/carrieraccounts/README.md#create) - Create a new carrier account
* [get](docs/sdks/carrieraccounts/README.md#get) - Retrieve a carrier account
* [update](docs/sdks/carrieraccounts/README.md#update) - Update a carrier account
* [getRegistrationStatus](docs/sdks/carrieraccounts/README.md#getregistrationstatus) - Get Carrier Registration status
* [initiateOauth2Signin](docs/sdks/carrieraccounts/README.md#initiateoauth2signin) - Connect an existing carrier account using OAuth 2.0
* [list](docs/sdks/carrieraccounts/README.md#list) - List all carrier accounts
* [register](docs/sdks/carrieraccounts/README.md#register) - Add a Shippo carrier account
* [getRegistrationStatus](docs/sdks/carrieraccounts/README.md#getregistrationstatus) - Get Carrier Registration status
* [update](docs/sdks/carrieraccounts/README.md#update) - Update a carrier account

### [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
* [list](docs/sdks/carrierparceltemplates/README.md#list) - List all carrier parcel templates

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

* [list](docs/sdks/customsdeclarations/README.md#list) - List all customs declarations
* [create](docs/sdks/customsdeclarations/README.md#create) - Create a new customs declaration
* [get](docs/sdks/customsdeclarations/README.md#get) - Retrieve a customs declaration
* [list](docs/sdks/customsdeclarations/README.md#list) - List all customs declarations

### [customsItems](docs/sdks/customsitems/README.md)

* [list](docs/sdks/customsitems/README.md#list) - List all customs items
* [create](docs/sdks/customsitems/README.md#create) - Create a new customs item
* [get](docs/sdks/customsitems/README.md#get) - Retrieve a customs item
* [list](docs/sdks/customsitems/README.md#list) - List all customs items

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

* [list](docs/sdks/manifests/README.md#list) - List all manifests
* [create](docs/sdks/manifests/README.md#create) - Create a new manifest
* [get](docs/sdks/manifests/README.md#get) - Retrieve a manifest
* [list](docs/sdks/manifests/README.md#list) - List all manifests

### [orders](docs/sdks/orders/README.md)

* [list](docs/sdks/orders/README.md#list) - List all orders
* [create](docs/sdks/orders/README.md#create) - Create a new order
* [get](docs/sdks/orders/README.md#get) - Retrieve an order
* [list](docs/sdks/orders/README.md#list) - List all orders

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

* [list](docs/sdks/parcels/README.md#list) - List all parcels
* [create](docs/sdks/parcels/README.md#create) - Create a new parcel
* [get](docs/sdks/parcels/README.md#get) - Retrieve an existing parcel
* [list](docs/sdks/parcels/README.md#list) - List all parcels

### [pickups](docs/sdks/pickups/README.md)

Expand All @@ -169,35 +154,35 @@ if ($response->addressPaginatedList !== null) {
### [ratesAtCheckout](docs/sdks/ratesatcheckout/README.md)

* [create](docs/sdks/ratesatcheckout/README.md#create) - Generate a live rates request
* [deleteDefaultParcelTemplate](docs/sdks/ratesatcheckout/README.md#deletedefaultparceltemplate) - Clear current default parcel template
* [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
* [list](docs/sdks/refunds/README.md#list) - List all refunds
* [get](docs/sdks/refunds/README.md#get) - Retrieve a refund
* [list](docs/sdks/refunds/README.md#list) - List all refunds

### [serviceGroups](docs/sdks/servicegroups/README.md)

* [list](docs/sdks/servicegroups/README.md#list) - List all service groups
* [create](docs/sdks/servicegroups/README.md#create) - Create a new service group
* [update](docs/sdks/servicegroups/README.md#update) - Update an existing service group
* [delete](docs/sdks/servicegroups/README.md#delete) - Delete a service group
* [list](docs/sdks/servicegroups/README.md#list) - List all service groups
* [update](docs/sdks/servicegroups/README.md#update) - Update an existing service group

### [shipments](docs/sdks/shipments/README.md)

* [list](docs/sdks/shipments/README.md#list) - List all shipments
* [create](docs/sdks/shipments/README.md#create) - Create a new shipment
* [get](docs/sdks/shipments/README.md#get) - Retrieve a shipment
* [list](docs/sdks/shipments/README.md#list) - List all shipments


### [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
* [list](docs/sdks/shippoaccounts/README.md#list) - List all Shippo Accounts
* [update](docs/sdks/shippoaccounts/README.md#update) - Update a Shippo Account

### [trackingStatus](docs/sdks/trackingstatus/README.md)
Expand All @@ -207,25 +192,25 @@ if ($response->addressPaginatedList !== null) {

### [transactions](docs/sdks/transactions/README.md)

* [list](docs/sdks/transactions/README.md#list) - List all shipping labels
* [create](docs/sdks/transactions/README.md#create) - Create a shipping label
* [get](docs/sdks/transactions/README.md#get) - Retrieve a shipping label
* [list](docs/sdks/transactions/README.md#list) - List all shipping labels

### [userParcelTemplates](docs/sdks/userparceltemplates/README.md)

* [list](docs/sdks/userparceltemplates/README.md#list) - List all user parcel templates
* [create](docs/sdks/userparceltemplates/README.md#create) - Create a new user parcel template
* [delete](docs/sdks/userparceltemplates/README.md#delete) - Delete a user parcel template
* [get](docs/sdks/userparceltemplates/README.md#get) - Retrieves a user parcel template
* [list](docs/sdks/userparceltemplates/README.md#list) - List all user parcel templates
* [update](docs/sdks/userparceltemplates/README.md#update) - Update an existing user parcel template

### [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
* [deleteWebhook](docs/sdks/webhooks/README.md#deletewebhook) - Delete a specific webhook
* [getWebhook](docs/sdks/webhooks/README.md#getwebhook) - Retrieve a specific webhook
* [listWebhooks](docs/sdks/webhooks/README.md#listwebhooks) - List all webhooks
* [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 Expand Up @@ -310,24 +295,39 @@ declare(strict_types=1);
require 'vendor/autoload.php';

use Shippo\API;
use Shippo\API\Models\Components;

$security = '<YOUR_API_KEY_HERE>';

$sdk = API\Shippo::builder()
->setServerURL("https://api.goshippo.com")
->setServerURL('https://api.goshippo.com')
->setShippoApiVersion('2018-02-08')
->setSecurity($security)->build();

$addressCreateRequest = new Components\AddressCreateRequest(
country: 'US',
name: 'Shwan Ippotle',
company: 'Shippo',
street1: '215 Clayton St.',
street3: '',
streetNo: '',
city: 'San Francisco',
state: 'CA',
zip: '94117',
phone: '+1 555 341 9393',
email: '[email protected]',
isResidential: true,
metadata: 'Customer ID 123456',
validate: true,
);


$response = $sdk->addresses->list(
page: 1,
results: 5,
$response = $sdk->addresses->create(
addressCreateRequest: $addressCreateRequest,
shippoApiVersion: '2018-02-08'

);

if ($response->addressPaginatedList !== null) {
if ($response->address !== null) {
// handle response
}
```
Expand Down
11 changes: 11 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


## 2024-12-23 00:29:11
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.459.2 (2.483.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [php v3.0.0-alpha] .
### Releases
- [Composer v3.0.0-alpha] https://packagist.org/packages/shippo/shippo-php#v3.0.0-alpha - .
Loading