Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/speakeasy-sdks/orb-go
A go SDK for accessing the orb-go API.
https://github.com/speakeasy-sdks/orb-go
Last synced: 2 days ago
JSON representation
A go SDK for accessing the orb-go API.
- Host: GitHub
- URL: https://github.com/speakeasy-sdks/orb-go
- Owner: speakeasy-sdks
- License: mit
- Created: 2023-04-04T10:44:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-02T21:19:45.000Z (7 months ago)
- Last Synced: 2024-04-28T05:14:48.531Z (6 months ago)
- Size: 157 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## SDK Installation
```bash
go get github.com/speakeasy-sdks/orb-go
```## SDK Example Usage
```go
package mainimport (
"context"
"log"
"Orb"
"Orb/pkg/models/shared"
"Orb/pkg/models/operations"
)func main() {
s := sdk.New(
sdk.WithSecurity(shared.Security{
BearerAuth: "Bearer YOUR_BEARER_TOKEN_HERE",
}),
)req := operations.PostCustomersRequestBody{
BillingAddress: &operations.PostCustomersRequestBodyBillingAddress{
City: "Laruecester",
Country: "US",
Line1: "quibusdam",
Line2: "unde",
PostalCode: "58466-3428",
State: "ipsa",
},
Currency: "delectus",
Email: "[email protected]",
ExternalCustomerID: "iusto",
Name: "excepturi",
PaymentProvider: "bill.com",
PaymentProviderID: "recusandae",
ShippingAddress: &operations.PostCustomersRequestBodyShippingAddress{
City: "Belleville",
Country: "US",
Line1: "quis",
Line2: "veritatis",
PostalCode: "03897-1889",
State: "molestiae",
},
Timezone: "Etc/UTC",
}ctx := context.Background()
res, err := s.Customer.Create(ctx, req)
if err != nil {
log.Fatal(err)
}if res.Customer != nil {
// handle response
}
}
```## Available Resources and Operations
### Availability
* `Ping` - Check availability
### Credits
* `Create` - Add credit ledger entry
* `GetCredits` - Retrieve credit balance
* `GetCreditsLedger` - View credits ledger### Customer
* `Create` - Create customer
* `Get` - Retrieve a customer
* `GetBalance` - Get customer balance transactions
* `GetByExternalID` - Retrieve a customer by external ID
* `GetCosts` - View customer costs
* `GetCostsByExternalID` - View customer costs by external customer ID
* `List` - List customers
* `Update` - Update customer
* `UpdateByExternalID` - Update a customer by external ID
* `UpdateUsage` - Amend customer usage
* `UpdateUsageByExternalID` - Amend customer usage by external ID### Event
* `Deprecate` - Deprecate single event
* `Ingest` - Ingest events
* `Search` - Search events
* `Update` - Amend single event### Invoice
* `Get` - Retrieve an Invoice
* `GetUpcoming` - Retrieve upcoming invoice
* `List` - List invoices### Plan
* `Get` - Retrieve a plan
* `GetByExternalID` - Retrieve a plan by external plan ID
* `List` - List plans### Subscription
* `Cancel` - Cancel subscription
* `ChangeSchedule` - Schedule plan change
* `Create` - Create subscription
* `Get` - Retrieve a subscription
* `GetCost` - View subscription costs
* `GetSchedule` - View subscription schedule
* `GetUsage` - View subscription usage
* `List` - List subscriptions
* `Unschedule` - Unschedule pending plan changes### Maturity
This SDK is in beta and therefore, we recommend pinning usage to a specific package version.
This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.### Contributions
While we value open-source contributions to this SDK, this library is generated and maintained programmatically.
Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release !### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)