-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from polarsource/speakeasy-sdk-regen-1734528750
chore: 🐝 Update SDK - Generate 0.0.3
- Loading branch information
Showing
578 changed files
with
1,951 additions
and
5,599 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,50 +61,51 @@ package main | |
|
||
import ( | ||
"context" | ||
polargo "github.com/polarsource/polar-go" | ||
"github.com/polarsource/polar-go/models/components" | ||
"github.com/polarsource/polar-go/types" | ||
"log" | ||
"polar" | ||
"polar/models/components" | ||
"polar/types" | ||
) | ||
|
||
func main() { | ||
ctx := context.Background() | ||
|
||
s := polar.New() | ||
s := polargo.New() | ||
|
||
res, err := s.EndpointcheckoutCreatedPost(ctx, components.WebhookCheckoutCreatedPayload{ | ||
Data: components.Checkout{ | ||
CreatedAt: types.MustTimeFromString("2024-11-12T14:26:42.882Z"), | ||
ModifiedAt: types.MustNewTimeFromString("2023-05-28T05:08:06.235Z"), | ||
ID: "<value>", | ||
PaymentProcessor: components.PaymentProcessorStripe, | ||
Status: components.CheckoutStatusFailed, | ||
ClientSecret: "<value>", | ||
URL: "https://heavy-beret.com/", | ||
ExpiresAt: types.MustTimeFromString("2022-02-25T02:26:48.460Z"), | ||
SuccessURL: "https://sardonic-final.info/", | ||
EmbedOrigin: polar.String("<value>"), | ||
Amount: polar.Int64(962818), | ||
TaxAmount: polar.Int64(6400), | ||
Currency: polar.String("Yen"), | ||
SubtotalAmount: polar.Int64(648726), | ||
TotalAmount: polar.Int64(210702), | ||
EmbedOrigin: polargo.String("<value>"), | ||
Amount: polargo.Int64(962818), | ||
TaxAmount: polargo.Int64(6400), | ||
Currency: polargo.String("Yen"), | ||
SubtotalAmount: polargo.Int64(648726), | ||
TotalAmount: polargo.Int64(210702), | ||
ProductID: "<value>", | ||
ProductPriceID: "<value>", | ||
DiscountID: polar.String("<value>"), | ||
DiscountID: polargo.String("<value>"), | ||
AllowDiscountCodes: true, | ||
IsDiscountApplicable: false, | ||
IsFreeProductPrice: false, | ||
IsPaymentRequired: false, | ||
IsPaymentSetupRequired: false, | ||
IsPaymentFormRequired: false, | ||
CustomerID: polar.String("<value>"), | ||
CustomerName: polar.String("<value>"), | ||
CustomerEmail: polar.String("[email protected]"), | ||
CustomerIPAddress: polar.String("<value>"), | ||
CustomerID: polargo.String("<value>"), | ||
CustomerName: polargo.String("<value>"), | ||
CustomerEmail: polargo.String("[email protected]"), | ||
CustomerIPAddress: polargo.String("<value>"), | ||
CustomerBillingAddress: &components.Address{ | ||
Country: "South Africa", | ||
}, | ||
CustomerTaxID: polar.String("<id>"), | ||
CustomerTaxID: polargo.String("<id>"), | ||
PaymentProcessorMetadata: components.PaymentProcessorMetadata{}, | ||
Metadata: map[string]components.CheckoutMetadata{ | ||
"key": components.CreateCheckoutMetadataInteger( | ||
|
@@ -119,7 +120,7 @@ func main() { | |
ModifiedAt: types.MustNewTimeFromString("2023-12-16T03:02:38.803Z"), | ||
ID: "<value>", | ||
Name: "<value>", | ||
Description: polar.String("for embarrassment untidy long-term near honestly separate yet"), | ||
Description: polargo.String("for embarrassment untidy long-term near honestly separate yet"), | ||
IsRecurring: true, | ||
IsArchived: false, | ||
OrganizationID: "<value>", | ||
|
@@ -133,9 +134,9 @@ func main() { | |
IsArchived: false, | ||
ProductID: "<value>", | ||
PriceCurrency: "<value>", | ||
MinimumAmount: polar.Int64(691423), | ||
MaximumAmount: polar.Int64(499526), | ||
PresetAmount: polar.Int64(18677), | ||
MinimumAmount: polargo.Int64(691423), | ||
MaximumAmount: polargo.Int64(499526), | ||
PresetAmount: polargo.Int64(18677), | ||
}, | ||
), | ||
), | ||
|
@@ -160,12 +161,12 @@ func main() { | |
Path: "/private/var", | ||
MimeType: "<value>", | ||
Size: 245189, | ||
StorageVersion: polar.String("<value>"), | ||
ChecksumEtag: polar.String("<value>"), | ||
ChecksumSha256Base64: polar.String("<value>"), | ||
ChecksumSha256Hex: polar.String("<value>"), | ||
StorageVersion: polargo.String("<value>"), | ||
ChecksumEtag: polargo.String("<value>"), | ||
ChecksumSha256Base64: polargo.String("<value>"), | ||
ChecksumSha256Hex: polargo.String("<value>"), | ||
LastModifiedAt: types.MustNewTimeFromString("2022-11-03T15:00:03.276Z"), | ||
Version: polar.String("<value>"), | ||
Version: polargo.String("<value>"), | ||
IsUploaded: false, | ||
CreatedAt: types.MustTimeFromString("2024-06-07T13:47:02.365Z"), | ||
SizeReadable: "<value>", | ||
|
@@ -193,10 +194,10 @@ func main() { | |
BasisPoints: 341163, | ||
ID: "<value>", | ||
Name: "<value>", | ||
Code: polar.String("<value>"), | ||
Code: polargo.String("<value>"), | ||
}, | ||
), | ||
SubscriptionID: polar.String("<value>"), | ||
SubscriptionID: polargo.String("<value>"), | ||
AttachedCustomFields: []components.AttachedCustomField{ | ||
components.AttachedCustomField{ | ||
CustomFieldID: "<value>", | ||
|
@@ -307,17 +308,17 @@ package main | |
|
||
import ( | ||
"context" | ||
polargo "github.com/polarsource/polar-go" | ||
"github.com/polarsource/polar-go/models/operations" | ||
"log" | ||
"os" | ||
"polar" | ||
"polar/models/operations" | ||
) | ||
|
||
func main() { | ||
ctx := context.Background() | ||
|
||
s := polar.New( | ||
polar.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
s := polargo.New( | ||
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
) | ||
|
||
res, err := s.ExternalOrganizations.List(ctx, operations.ExternalOrganizationsListRequest{}) | ||
|
@@ -543,17 +544,17 @@ package main | |
|
||
import ( | ||
"context" | ||
polargo "github.com/polarsource/polar-go" | ||
"github.com/polarsource/polar-go/models/operations" | ||
"log" | ||
"os" | ||
"polar" | ||
"polar/models/operations" | ||
) | ||
|
||
func main() { | ||
ctx := context.Background() | ||
|
||
s := polar.New( | ||
polar.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
s := polargo.New( | ||
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
) | ||
|
||
res, err := s.ExternalOrganizations.List(ctx, operations.ExternalOrganizationsListRequest{}) | ||
|
@@ -591,19 +592,19 @@ package main | |
|
||
import ( | ||
"context" | ||
polargo "github.com/polarsource/polar-go" | ||
"github.com/polarsource/polar-go/models/operations" | ||
"github.com/polarsource/polar-go/retry" | ||
"log" | ||
"models/operations" | ||
"os" | ||
"polar" | ||
"polar/models/operations" | ||
"polar/retry" | ||
) | ||
|
||
func main() { | ||
ctx := context.Background() | ||
|
||
s := polar.New( | ||
polar.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
s := polargo.New( | ||
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
) | ||
|
||
res, err := s.ExternalOrganizations.List(ctx, operations.ExternalOrganizationsListRequest{}, operations.WithRetries( | ||
|
@@ -645,18 +646,18 @@ package main | |
|
||
import ( | ||
"context" | ||
polargo "github.com/polarsource/polar-go" | ||
"github.com/polarsource/polar-go/models/operations" | ||
"github.com/polarsource/polar-go/retry" | ||
"log" | ||
"os" | ||
"polar" | ||
"polar/models/operations" | ||
"polar/retry" | ||
) | ||
|
||
func main() { | ||
ctx := context.Background() | ||
|
||
s := polar.New( | ||
polar.WithRetryConfig( | ||
s := polargo.New( | ||
polargo.WithRetryConfig( | ||
retry.Config{ | ||
Strategy: "backoff", | ||
Backoff: &retry.BackoffStrategy{ | ||
|
@@ -667,7 +668,7 @@ func main() { | |
}, | ||
RetryConnectionErrors: false, | ||
}), | ||
polar.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
) | ||
|
||
res, err := s.ExternalOrganizations.List(ctx, operations.ExternalOrganizationsListRequest{}) | ||
|
@@ -716,18 +717,18 @@ package main | |
import ( | ||
"context" | ||
"errors" | ||
polargo "github.com/polarsource/polar-go" | ||
"github.com/polarsource/polar-go/models/apierrors" | ||
"github.com/polarsource/polar-go/models/operations" | ||
"log" | ||
"os" | ||
"polar" | ||
"polar/models/apierrors" | ||
"polar/models/operations" | ||
) | ||
|
||
func main() { | ||
ctx := context.Background() | ||
|
||
s := polar.New( | ||
polar.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
s := polargo.New( | ||
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
) | ||
|
||
res, err := s.ExternalOrganizations.List(ctx, operations.ExternalOrganizationsListRequest{}) | ||
|
@@ -769,18 +770,18 @@ package main | |
|
||
import ( | ||
"context" | ||
polargo "github.com/polarsource/polar-go" | ||
"github.com/polarsource/polar-go/models/operations" | ||
"log" | ||
"os" | ||
"polar" | ||
"polar/models/operations" | ||
) | ||
|
||
func main() { | ||
ctx := context.Background() | ||
|
||
s := polar.New( | ||
polar.WithServer("sandbox"), | ||
polar.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
s := polargo.New( | ||
polargo.WithServer("sandbox"), | ||
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
) | ||
|
||
res, err := s.ExternalOrganizations.List(ctx, operations.ExternalOrganizationsListRequest{}) | ||
|
@@ -814,18 +815,18 @@ package main | |
|
||
import ( | ||
"context" | ||
polargo "github.com/polarsource/polar-go" | ||
"github.com/polarsource/polar-go/models/operations" | ||
"log" | ||
"os" | ||
"polar" | ||
"polar/models/operations" | ||
) | ||
|
||
func main() { | ||
ctx := context.Background() | ||
|
||
s := polar.New( | ||
polar.WithServerURL("https://api.polar.sh"), | ||
polar.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
s := polargo.New( | ||
polargo.WithServerURL("https://api.polar.sh"), | ||
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")), | ||
) | ||
|
||
res, err := s.ExternalOrganizations.List(ctx, operations.ExternalOrganizationsListRequest{}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.