Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/speakeasy-sdks/lago-go-sdk
Go wrapper for the Lago Rest API
https://github.com/speakeasy-sdks/lago-go-sdk
api billing go sdk
Last synced: 2 days ago
JSON representation
Go wrapper for the Lago Rest API
- Host: GitHub
- URL: https://github.com/speakeasy-sdks/lago-go-sdk
- Owner: speakeasy-sdks
- Created: 2023-02-13T22:05:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-02T21:12:41.000Z (7 months ago)
- Last Synced: 2024-04-28T05:14:45.827Z (6 months ago)
- Topics: api, billing, go, sdk
- Language: Go
- Homepage: https://doc.getlago.com/docs/api/intro
- Size: 106 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lago Go SDK
## SDK Installation
```bash
go get github.com/speakeasy-sdks/lago-go-sdk
```## SDK Example Usage
```go
package mainimport (
"log"
"github.com/speakeasy-sdks/lago-go-sdk"
"github.com/speakeasy-sdks/lago-go-sdk/pkg/models/shared"
"github.com/speakeasy-sdks/lago-go-sdk/pkg/models/operations"
)func main() {
opts := []lago.SDKOption{
lago.WithSecurity(
shared.Security{
BearerAuth: shared.SchemeBearerAuth{
Authorization: "Bearer YOUR_BEARER_TOKEN_HERE",
},
}
),
}s := lago.New(opts...)
req := operations.FindAddOnRequest{
PathParams: operations.FindAddOnPathParams{
Code: "unde",
},
}
res, err := s.AddOns.FindAddOn(ctx, req)
if err != nil {
log.Fatal(err)
}if res.AddOn != nil {
// handle response
}
```## SDK Available Operations
### AddOns
* `FindAddOn` - Find add-on by code
* `ApplyAddOn` - Apply an add-on to a customer
* `CreateAddOn` - Create a new add-on
* `DestroyAddOn` - Delete an add-on
* `FindAllAddOns` - Find add-ons
* `UpdateAddOn` - Update an existing add-on### BillableMetrics
* `FindBillableMetric` - Find billable metric by code
* `CreateBillableMetric` - Create a new billable metric
* `DestroyBillableMetric` - Delete a billable metric
* `FindAllBillableMetricGroups` - Find Billable metric groups
* `FindAllBillableMetrics` - Find Billable metrics
* `UpdateBillableMetric` - Update an existing billable metric### Coupons
* `FindCoupon` - Find coupon by code
* `ApplyCoupon` - Apply a coupon to a customer
* `CreateCoupon` - Create a new coupon
* `DestroyCoupon` - Delete a coupon
* `FindAllAppliedCoupons` - Find Applied Coupons
* `FindAllCoupons` - Find Coupons
* `UpdateCoupon` - Update an existing coupon### CreditNotes
* `FindCreditNote` - Find credit note
* `CreateCreditNote` - Create a new Credit note
* `DownloadCreditNote` - Download an existing credit note
* `FindAllCreditNotes` - Find Credit notes
* `UpdateCreditNote` - Update an existing credit note
* `VoidCreditNote` - Void existing credit note### Customers
* `DeleteCustomer` - Delete a customer
* `FindCustomer` - Find customer by external ID
* `FindCustomerCurrentUsage` - Find customer current usage
* `CreateCustomer` - Create a customer
* `FindAllCustomers` - Find customers### Events
* `FindEvent` - Find event by transaction ID
* `CreateBatchEvents` - Create batch events
* `CreateEvent` - Create a new event### Invoices
* `FindInvoice` - Find invoice by ID
* `DownloadInvoice` - Download an existing invoice
* `FinalizeInvoice` - Finalize a draft invoice
* `FindAllInvoices` - Find all invoices
* `RefreshInvoice` - Refresh a draft invoice
* `RetryPayment` - Retry invoice payment
* `UpdateInvoice` - Update an existing invoice status### Organizations
* `UpdateOrganization` - Update an existing Organization
### Plans
* `FindPlan` - Fin plan by code
* `CreatePlan` - Create a new plan
* `DestroyPlan` - Delete a plan
* `FindAllPlans` - Find plans
* `UpdatePlan` - Update an existing plan### Subscriptions
* `CreateSubscription` - Assign a plan to a customer
* `DestroySubscription` - Terminate a subscription
* `FindAllSubscriptions` - Find subscriptions
* `UpdateSubscription` - Update an existing subscription### Wallets
* `FindWallet` - Find wallet
* `CreateWallet` - Create a new wallet
* `CreateWalletTransaction` - Create a new wallet transaction
* `DestroyWallet` - Delete a wallet
* `FindAllWalletTransactions` - Find wallet transactions
* `FindAllWallets` - Find wallets
* `UpdateWallet` - Update an existing wallet### Webhooks
* `FetchPublicKey` - Fetch webhook public key
### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)