diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 912a137..f108332 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 1773e9c7-1931-4663-8ac8-4deaf8db76f5 management: - docChecksum: 721d398075627f52145125ad6074cef5 + docChecksum: e79768bd6535cef0d8d78eefb5ac63e1 docVersion: 0.0.1 - speakeasyVersion: 1.385.0 - generationVersion: 2.407.2 - releaseVersion: 0.8.3 - configChecksum: 3e166aa94dbbe0e682863a8e921fd3de + speakeasyVersion: 1.390.1 + generationVersion: 2.409.0 + releaseVersion: 0.8.4 + configChecksum: d80689321ee4af28fe3bd50ad2aadef1 repoURL: https://github.com/dubinc/dub-go.git installationURL: https://github.com/dubinc/dub-go features: @@ -68,6 +68,7 @@ generatedFiles: - /models/operations/deletelink.go - /models/operations/updatelink.go - /models/operations/bulkcreatelinks.go + - /models/operations/bulkdeletelinks.go - /models/operations/bulkupdatelinks.go - /models/operations/upsertlink.go - /models/operations/getqrcode.go @@ -138,6 +139,8 @@ generatedFiles: - docs/models/operations/bulkcreatelinkstagids.md - docs/models/operations/bulkcreatelinkstagnames.md - docs/models/operations/requestbody.md + - docs/models/operations/bulkdeletelinksrequest.md + - docs/models/operations/bulkdeletelinksresponsebody.md - docs/models/operations/bulkupdatelinkstagids.md - docs/models/operations/bulkupdatelinkstagnames.md - docs/models/operations/data.md @@ -173,18 +176,13 @@ generatedFiles: - docs/models/operations/updatedomainrequestbody.md - docs/models/operations/updatedomainrequest.md - docs/models/operations/trackleadrequestbody.md - - docs/models/operations/customer.md - docs/models/operations/click.md - - docs/models/operations/geo.md - - docs/models/operations/link.md + - docs/models/operations/customer.md - docs/models/operations/trackleadresponsebody.md - docs/models/operations/paymentprocessor.md - docs/models/operations/tracksalerequestbody.md - docs/models/operations/tracksalecustomer.md - docs/models/operations/sale.md - - docs/models/operations/tracksaleclick.md - - docs/models/operations/tracksalegeo.md - - docs/models/operations/tracksalelink.md - docs/models/operations/tracksaleresponsebody.md - docs/models/operations/trackcustomerrequestbody.md - docs/models/operations/trackcustomerresponsebody.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index b981a24..00c79ec 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true go: - version: 0.8.3 + version: 0.8.4 additionalDependencies: {} allowUnknownFieldsInWeakUnions: false clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 948e28d..5fae75c 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.385.0 +speakeasyVersion: 1.390.1 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:6f51a92a8181d22e519f6a9e133de91aa1869660eb0b4489531a4921451f9a80 - sourceBlobDigest: sha256:2917324289fcad4862f27d0936635702b26bd1d50702ee75cb33b7374e3218d6 + sourceRevisionDigest: sha256:9b23095f0ee1a4785428a8c33a4fdcd78d16084867e20cea62500d56f1e4931a + sourceBlobDigest: sha256:0610a3a3d2096fc72cdfd1c92b1be59f41530f7b48dc93566bc297baefcf3882 tags: - latest - main @@ -11,10 +11,10 @@ targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:6f51a92a8181d22e519f6a9e133de91aa1869660eb0b4489531a4921451f9a80 - sourceBlobDigest: sha256:2917324289fcad4862f27d0936635702b26bd1d50702ee75cb33b7374e3218d6 + sourceRevisionDigest: sha256:9b23095f0ee1a4785428a8c33a4fdcd78d16084867e20cea62500d56f1e4931a + sourceBlobDigest: sha256:0610a3a3d2096fc72cdfd1c92b1be59f41530f7b48dc93566bc297baefcf3882 codeSamplesNamespace: code-samples-go-my-first-target - codeSamplesRevisionDigest: sha256:6283859044efd071481fc79c39b803ead94d4d28842b253b94ffbf7cff0e6484 + codeSamplesRevisionDigest: sha256:1ebc6edd35fc9e9c677056f38ae4b27292dc9c7cfc5962103b32fb2ee60754bf outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/README.md b/README.md index 3d47876..44a6d73 100644 --- a/README.md +++ b/README.md @@ -56,15 +56,15 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var request *operations.CreateLinkRequestBody = &operations.CreateLinkRequestBody{ + + ctx := context.Background() + res, err := s.Links.Create(ctx, &operations.CreateLinkRequestBody{ URL: "https://google.com", ExternalID: dubgo.String("123456"), TagIds: operations.CreateTagIdsStr( "[\"clux0rgak00011...\"]", ), - } - ctx := context.Background() - res, err := s.Links.Create(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -91,7 +91,9 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var request *operations.UpsertLinkRequestBody = &operations.UpsertLinkRequestBody{ + + ctx := context.Background() + res, err := s.Links.Upsert(ctx, &operations.UpsertLinkRequestBody{ URL: "https://google.com", ExternalID: dubgo.String("123456"), TagIds: operations.CreateUpsertLinkTagIdsArrayOfStr( @@ -99,9 +101,7 @@ func main() { "clux0rgak00011...", }, ), - } - ctx := context.Background() - res, err := s.Links.Upsert(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -125,6 +125,7 @@ func main() { * [Delete](docs/sdks/links/README.md#delete) - Delete a link * [Update](docs/sdks/links/README.md#update) - Update a link * [CreateMany](docs/sdks/links/README.md#createmany) - Bulk create links +* [DeleteMany](docs/sdks/links/README.md#deletemany) - Bulk delete links * [UpdateMany](docs/sdks/links/README.md#updatemany) - Bulk update links * [Upsert](docs/sdks/links/README.md#upsert) - Upsert a link @@ -205,12 +206,12 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetLinksRequest{ + + ctx := context.Background() + res, err := s.Links.List(ctx, operations.GetLinksRequest{ Page: dubgo.Float64(1), PageSize: dubgo.Float64(50), - } - ctx := context.Background() - res, err := s.Links.List(ctx, request) + }) if err != nil { var e *sdkerrors.BadRequest @@ -306,12 +307,12 @@ func main() { dubgo.WithServerIndex(0), dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetLinksRequest{ + + ctx := context.Background() + res, err := s.Links.List(ctx, operations.GetLinksRequest{ Page: dubgo.Float64(1), PageSize: dubgo.Float64(50), - } - ctx := context.Background() - res, err := s.Links.List(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -354,12 +355,12 @@ func main() { dubgo.WithServerURL("https://api.dub.co"), dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetLinksRequest{ + + ctx := context.Background() + res, err := s.Links.List(ctx, operations.GetLinksRequest{ Page: dubgo.Float64(1), PageSize: dubgo.Float64(50), - } - ctx := context.Background() - res, err := s.Links.List(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -439,12 +440,12 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetLinksRequest{ + + ctx := context.Background() + res, err := s.Links.List(ctx, operations.GetLinksRequest{ Page: dubgo.Float64(1), PageSize: dubgo.Float64(50), - } - ctx := context.Background() - res, err := s.Links.List(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -497,12 +498,12 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetLinksRequest{ + + ctx := context.Background() + res, err := s.Links.List(ctx, operations.GetLinksRequest{ Page: dubgo.Float64(1), PageSize: dubgo.Float64(50), - } - ctx := context.Background() - res, err := s.Links.List(ctx, request, operations.WithRetries( + }, operations.WithRetries( retry.Config{ Strategy: "backoff", Backoff: &retry.BackoffStrategy{ @@ -563,12 +564,12 @@ func main() { }), dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetLinksRequest{ + + ctx := context.Background() + res, err := s.Links.List(ctx, operations.GetLinksRequest{ Page: dubgo.Float64(1), PageSize: dubgo.Float64(50), - } - ctx := context.Background() - res, err := s.Links.List(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -615,12 +616,12 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetLinksRequest{ + + ctx := context.Background() + res, err := s.Links.List(ctx, operations.GetLinksRequest{ Page: dubgo.Float64(1), PageSize: dubgo.Float64(50), - } - ctx := context.Background() - res, err := s.Links.List(ctx, request) + }) if err != nil { log.Fatal(err) } diff --git a/RELEASES.md b/RELEASES.md index 76ef040..b48cc16 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -268,4 +268,14 @@ Based on: ### Generated - [go v0.8.3] . ### Releases -- [Go v0.8.3] https://github.com/dubinc/dub-go/releases/tag/v0.8.3 - . \ No newline at end of file +- [Go v0.8.3] https://github.com/dubinc/dub-go/releases/tag/v0.8.3 - . + +## 2024-09-04 00:57:47 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.390.1 (2.409.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.8.4] . +### Releases +- [Go v0.8.4] https://github.com/dubinc/dub-go/releases/tag/v0.8.4 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index b509ff2..6a5f789 100644 --- a/USAGE.md +++ b/USAGE.md @@ -13,15 +13,15 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var request *operations.CreateLinkRequestBody = &operations.CreateLinkRequestBody{ + + ctx := context.Background() + res, err := s.Links.Create(ctx, &operations.CreateLinkRequestBody{ URL: "https://google.com", ExternalID: dubgo.String("123456"), TagIds: operations.CreateTagIdsStr( "[\"clux0rgak00011...\"]", ), - } - ctx := context.Background() - res, err := s.Links.Create(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -46,7 +46,9 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var request *operations.UpsertLinkRequestBody = &operations.UpsertLinkRequestBody{ + + ctx := context.Background() + res, err := s.Links.Upsert(ctx, &operations.UpsertLinkRequestBody{ URL: "https://google.com", ExternalID: dubgo.String("123456"), TagIds: operations.CreateUpsertLinkTagIdsArrayOfStr( @@ -54,9 +56,7 @@ func main() { "clux0rgak00011...", }, ), - } - ctx := context.Background() - res, err := s.Links.Upsert(ctx, request) + }) if err != nil { log.Fatal(err) } diff --git a/codeSamples.yaml b/codeSamples.yaml index 945d206..5801349 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,153 +3,159 @@ info: title: CodeSamples overlay for go target version: 0.0.0 actions: - - target: $["paths"]["/links/{linkId}"]["patch"] + - target: $["paths"]["/links"]["post"] update: "x-codeSamples": - "lang": "go" - "label": "updateLink" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var linkID string = \"\"\n\n var requestBody *operations.UpdateLinkRequestBody = &operations.UpdateLinkRequestBody{\n URL: dubgo.String(\"https://google.com\"),\n ExternalID: dubgo.String(\"123456\"),\n TagIds: operations.CreateUpdateLinkTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n ),\n }\n ctx := context.Background()\n res, err := s.Links.Update(ctx, linkID, requestBody)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/qr"]["get"] + "label": "createLink" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Create(ctx, &operations.CreateLinkRequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: operations.CreateTagIdsStr(\n \"[\\\"clux0rgak00011...\\\"]\",\n ),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/links/bulk"]["delete"] update: "x-codeSamples": - "lang": "go" - "label": "getQRCode" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n request := operations.GetQRCodeRequest{\n URL: \"https://brief-micronutrient.org\",\n }\n ctx := context.Background()\n res, err := s.QRCodes.Get(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/tags"]["post"] + "label": "bulkDeleteLinks" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.DeleteMany(ctx, operations.BulkDeleteLinksRequest{\n LinkIds: \"clux0rgak00011...,clux0rgak00022...\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] update: "x-codeSamples": - "lang": "go" - "label": "createTag" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.Create(ctx, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/track/sale"]["post"] + "label": "getWorkspace" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Workspaces.Get(ctx, operations.GetWorkspaceRequest{\n IDOrSlug: \"\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/tags"]["get"] update: "x-codeSamples": - "lang": "go" - "label": "trackSale" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var request *operations.TrackSaleRequestBody = &operations.TrackSaleRequestBody{\n CustomerID: \"\",\n Amount: 996500,\n PaymentProcessor: operations.PaymentProcessorShopify,\n EventName: dubgo.String(\"Purchase\"),\n }\n ctx := context.Background()\n res, err := s.Track.Sale(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/track/customer"]["post"] + "label": "getTags" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.List(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/domains/{slug}"]["patch"] update: "x-codeSamples": - "lang": "go" - "label": "trackCustomer" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Track.Customer(ctx, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + "label": "updateDomain" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.Update(ctx, \"acme.com\", &operations.UpdateDomainRequestBody{\n Slug: dubgo.String(\"acme.com\"),\n ExpiredURL: dubgo.String(\"https://acme.com/expired\"),\n Archived: dubgo.Bool(false),\n Placeholder: dubgo.String(\"https://dub.co/help/article/what-is-dub\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - target: $["paths"]["/metatags"]["get"] update: "x-codeSamples": - "lang": "go" "label": "getMetatags" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n request := operations.GetMetatagsRequest{\n URL: \"https://dub.co\",\n }\n ctx := context.Background()\n res, err := s.Metatags.Get(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/links/info"]["get"] + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Metatags.Get(ctx, operations.GetMetatagsRequest{\n URL: \"https://dub.co\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/links/upsert"]["put"] update: "x-codeSamples": - "lang": "go" - "label": "getLinkInfo" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n request := operations.GetLinkInfoRequest{\n LinkID: dubgo.String(\"clux0rgak00011...\"),\n ExternalID: dubgo.String(\"ext_123456\"),\n }\n ctx := context.Background()\n res, err := s.Links.Get(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] + "label": "upsertLink" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Upsert(ctx, &operations.UpsertLinkRequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: operations.CreateUpsertLinkTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n ),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/links/{linkId}"]["delete"] update: "x-codeSamples": - "lang": "go" - "label": "getWorkspace" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n request := operations.GetWorkspaceRequest{\n IDOrSlug: \"\",\n }\n ctx := context.Background()\n res, err := s.Workspaces.Get(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/tags"]["get"] + "label": "deleteLink" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Delete(ctx, \"\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/links/bulk"]["post"] update: "x-codeSamples": - "lang": "go" - "label": "getTags" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.List(ctx)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/tags/{id}"]["patch"] + "label": "bulkCreateLinks" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.CreateMany(ctx, []operations.RequestBody{\n operations.RequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: operations.CreateBulkCreateLinksTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n ),\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/track/customer"]["post"] update: "x-codeSamples": - "lang": "go" - "label": "updateTag" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var id string = \"\"\n ctx := context.Background()\n res, err := s.Tags.Update(ctx, id, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/domains"]["get"] + "label": "trackCustomer" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Track.Customer(ctx, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/track/lead"]["post"] update: "x-codeSamples": - "lang": "go" - "label": "listDomains" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n request := operations.ListDomainsRequest{\n Page: dubgo.Float64(1),\n PageSize: dubgo.Float64(50),\n }\n ctx := context.Background()\n res, err := s.Domains.List(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n for {\n // handle items\n \n res, err = res.Next()\n \n if err != nil {\n // handle error\n }\n \n if res == nil {\n break\n }\n }\n \n }\n}" - - target: $["paths"]["/domains"]["post"] + "label": "trackLead" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Track.Lead(ctx, &operations.TrackLeadRequestBody{\n ClickID: \"\",\n EventName: \"Sign up\",\n CustomerID: \"\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/links/count"]["get"] update: "x-codeSamples": - "lang": "go" - "label": "createDomain" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var request *operations.CreateDomainRequestBody = &operations.CreateDomainRequestBody{\n Slug: \"acme.com\",\n ExpiredURL: dubgo.String(\"https://acme.com/expired\"),\n Archived: dubgo.Bool(false),\n Placeholder: dubgo.String(\"https://dub.co/help/article/what-is-dub\"),\n }\n ctx := context.Background()\n res, err := s.Domains.Create(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/links/upsert"]["put"] + "label": "getLinksCount" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Count(ctx, operations.GetLinksCountRequest{})\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/links/bulk"]["patch"] update: "x-codeSamples": - "lang": "go" - "label": "upsertLink" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var request *operations.UpsertLinkRequestBody = &operations.UpsertLinkRequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: operations.CreateUpsertLinkTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n ),\n }\n ctx := context.Background()\n res, err := s.Links.Upsert(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/links/count"]["get"] + "label": "bulkUpdateLinks" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.UpdateMany(ctx, &operations.BulkUpdateLinksRequestBody{\n LinkIds: []string{\n \"\",\n },\n Data: operations.Data{\n URL: dubgo.String(\"https://google.com\"),\n TagIds: operations.CreateBulkUpdateLinksTagIdsStr(\n \"[\\\"clux0rgak00011...\\\"]\",\n ),\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/qr"]["get"] update: "x-codeSamples": - "lang": "go" - "label": "getLinksCount" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n request := operations.GetLinksCountRequest{}\n ctx := context.Background()\n res, err := s.Links.Count(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/links/{linkId}"]["delete"] + "label": "getQRCode" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.QRCodes.Get(ctx, operations.GetQRCodeRequest{\n URL: \"https://brief-micronutrient.org\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/workspaces/{idOrSlug}"]["patch"] update: "x-codeSamples": - "lang": "go" - "label": "deleteLink" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var linkID string = \"\"\n ctx := context.Background()\n res, err := s.Links.Delete(ctx, linkID)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/links/bulk"]["post"] + "label": "updateWorkspace" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Workspaces.Update(ctx, \"\", nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/tags/{id}"]["patch"] update: "x-codeSamples": - "lang": "go" - "label": "bulkCreateLinks" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var request []operations.RequestBody = []operations.RequestBody{\n operations.RequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: operations.CreateBulkCreateLinksTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n ),\n },\n }\n ctx := context.Background()\n res, err := s.Links.CreateMany(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/links/bulk"]["patch"] + "label": "updateTag" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.Update(ctx, \"\", nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/domains"]["get"] update: "x-codeSamples": - "lang": "go" - "label": "bulkUpdateLinks" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var request *operations.BulkUpdateLinksRequestBody = &operations.BulkUpdateLinksRequestBody{\n LinkIds: []string{\n \"\",\n },\n Data: operations.Data{\n URL: dubgo.String(\"https://google.com\"),\n TagIds: operations.CreateBulkUpdateLinksTagIdsStr(\n \"[\\\"clux0rgak00011...\\\"]\",\n ),\n },\n }\n ctx := context.Background()\n res, err := s.Links.UpdateMany(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/analytics"]["get"] + "label": "listDomains" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.List(ctx, operations.ListDomainsRequest{\n Page: dubgo.Float64(1),\n PageSize: dubgo.Float64(50),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n for {\n // handle items\n \n res, err = res.Next()\n \n if err != nil {\n // handle error\n }\n \n if res == nil {\n break\n }\n }\n \n }\n}" + - target: $["paths"]["/domains"]["post"] update: "x-codeSamples": - "lang": "go" - "label": "retrieveAnalytics" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n request := operations.RetrieveAnalyticsRequest{\n Timezone: dubgo.String(\"America/New_York\"),\n City: dubgo.String(\"New York\"),\n Device: dubgo.String(\"Desktop\"),\n Browser: dubgo.String(\"Chrome\"),\n Os: dubgo.String(\"Windows\"),\n Referer: dubgo.String(\"google.com\"),\n }\n ctx := context.Background()\n res, err := s.Analytics.Retrieve(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/workspaces/{idOrSlug}"]["patch"] + "label": "createDomain" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.Create(ctx, &operations.CreateDomainRequestBody{\n Slug: \"acme.com\",\n ExpiredURL: dubgo.String(\"https://acme.com/expired\"),\n Archived: dubgo.Bool(false),\n Placeholder: dubgo.String(\"https://dub.co/help/article/what-is-dub\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/track/sale"]["post"] update: "x-codeSamples": - "lang": "go" - "label": "updateWorkspace" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var idOrSlug string = \"\"\n ctx := context.Background()\n res, err := s.Workspaces.Update(ctx, idOrSlug, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/domains/{slug}"]["delete"] + "label": "trackSale" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Track.Sale(ctx, &operations.TrackSaleRequestBody{\n CustomerID: \"\",\n Amount: 996500,\n PaymentProcessor: operations.PaymentProcessorShopify,\n EventName: dubgo.String(\"Purchase\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/links"]["get"] update: "x-codeSamples": - "lang": "go" - "label": "deleteDomain" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var slug string = \"acme.com\"\n ctx := context.Background()\n res, err := s.Domains.Delete(ctx, slug)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/links"]["post"] + "label": "getLinks" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.List(ctx, operations.GetLinksRequest{\n Page: dubgo.Float64(1),\n PageSize: dubgo.Float64(50),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n for {\n // handle items\n \n res, err = res.Next()\n \n if err != nil {\n // handle error\n }\n \n if res == nil {\n break\n }\n }\n \n }\n}" + - target: $["paths"]["/links/info"]["get"] update: "x-codeSamples": - "lang": "go" - "label": "createLink" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var request *operations.CreateLinkRequestBody = &operations.CreateLinkRequestBody{\n URL: \"https://google.com\",\n ExternalID: dubgo.String(\"123456\"),\n TagIds: operations.CreateTagIdsStr(\n \"[\\\"clux0rgak00011...\\\"]\",\n ),\n }\n ctx := context.Background()\n res, err := s.Links.Create(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/links"]["get"] + "label": "getLinkInfo" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Get(ctx, operations.GetLinkInfoRequest{\n LinkID: dubgo.String(\"clux0rgak00011...\"),\n ExternalID: dubgo.String(\"ext_123456\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/links/{linkId}"]["patch"] update: "x-codeSamples": - "lang": "go" - "label": "getLinks" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n request := operations.GetLinksRequest{\n Page: dubgo.Float64(1),\n PageSize: dubgo.Float64(50),\n }\n ctx := context.Background()\n res, err := s.Links.List(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n for {\n // handle items\n \n res, err = res.Next()\n \n if err != nil {\n // handle error\n }\n \n if res == nil {\n break\n }\n }\n \n }\n}" + "label": "updateLink" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Links.Update(ctx, \"\", &operations.UpdateLinkRequestBody{\n URL: dubgo.String(\"https://google.com\"),\n ExternalID: dubgo.String(\"123456\"),\n TagIds: operations.CreateUpdateLinkTagIdsArrayOfStr(\n []string{\n \"clux0rgak00011...\",\n },\n ),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/analytics"]["get"] + update: + "x-codeSamples": + - "lang": "go" + "label": "retrieveAnalytics" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Analytics.Retrieve(ctx, operations.RetrieveAnalyticsRequest{\n Timezone: dubgo.String(\"America/New_York\"),\n City: dubgo.String(\"New York\"),\n Device: dubgo.String(\"Desktop\"),\n Browser: dubgo.String(\"Chrome\"),\n Os: dubgo.String(\"Windows\"),\n Referer: dubgo.String(\"google.com\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - target: $["paths"]["/events"]["get"] update: "x-codeSamples": - "lang": "go" "label": "listEvents" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n request := operations.ListEventsRequest{\n Timezone: dubgo.String(\"America/New_York\"),\n City: dubgo.String(\"New York\"),\n Device: dubgo.String(\"Desktop\"),\n Browser: dubgo.String(\"Chrome\"),\n Os: dubgo.String(\"Windows\"),\n Referer: dubgo.String(\"google.com\"),\n }\n ctx := context.Background()\n res, err := s.Events.List(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/domains/{slug}"]["patch"] + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Events.List(ctx, operations.ListEventsRequest{\n Timezone: dubgo.String(\"America/New_York\"),\n City: dubgo.String(\"New York\"),\n Device: dubgo.String(\"Desktop\"),\n Browser: dubgo.String(\"Chrome\"),\n Os: dubgo.String(\"Windows\"),\n Referer: dubgo.String(\"google.com\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/tags"]["post"] update: "x-codeSamples": - "lang": "go" - "label": "updateDomain" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var slug string = \"acme.com\"\n\n var requestBody *operations.UpdateDomainRequestBody = &operations.UpdateDomainRequestBody{\n Slug: dubgo.String(\"acme.com\"),\n ExpiredURL: dubgo.String(\"https://acme.com/expired\"),\n Archived: dubgo.Bool(false),\n Placeholder: dubgo.String(\"https://dub.co/help/article/what-is-dub\"),\n }\n ctx := context.Background()\n res, err := s.Domains.Update(ctx, slug, requestBody)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" - - target: $["paths"]["/track/lead"]["post"] + "label": "createTag" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Tags.Create(ctx, nil)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + - target: $["paths"]["/domains/{slug}"]["delete"] update: "x-codeSamples": - "lang": "go" - "label": "trackLead" - "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n var request *operations.TrackLeadRequestBody = &operations.TrackLeadRequestBody{\n ClickID: \"\",\n EventName: \"Sign up\",\n CustomerID: \"\",\n }\n ctx := context.Background()\n res, err := s.Track.Lead(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" + "label": "deleteDomain" + "source": "package main\n\nimport(\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n ctx := context.Background()\n res, err := s.Domains.Delete(ctx, \"acme.com\")\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}" diff --git a/docs/models/components/clickevent.md b/docs/models/components/clickevent.md index fb6971a..2cf4a23 100644 --- a/docs/models/components/clickevent.md +++ b/docs/models/components/clickevent.md @@ -3,21 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `Event` | [*components.Event](../../models/components/event.md) | :heavy_minus_sign: | N/A | -| `Timestamp` | *string* | :heavy_check_mark: | N/A | -| `ClickID` | *string* | :heavy_check_mark: | N/A | -| `LinkID` | *string* | :heavy_check_mark: | N/A | -| `Domain` | *string* | :heavy_check_mark: | N/A | -| `Key` | *string* | :heavy_check_mark: | N/A | -| `URL` | *string* | :heavy_check_mark: | N/A | -| `Continent` | *string* | :heavy_check_mark: | N/A | -| `Country` | *string* | :heavy_check_mark: | N/A | -| `City` | *string* | :heavy_check_mark: | N/A | -| `Device` | *string* | :heavy_check_mark: | N/A | -| `Browser` | *string* | :heavy_check_mark: | N/A | -| `Os` | *string* | :heavy_check_mark: | N/A | -| `Referer` | *string* | :heavy_check_mark: | N/A | -| `IP` | *string* | :heavy_check_mark: | N/A | -| `Qr` | *float64* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `Event` | [components.Event](../../models/components/event.md) | :heavy_check_mark: | N/A | +| `Timestamp` | *string* | :heavy_check_mark: | N/A | +| `ClickID` | *string* | :heavy_check_mark: | N/A | +| `LinkID` | *string* | :heavy_check_mark: | N/A | +| `Domain` | *string* | :heavy_check_mark: | N/A | +| `Key` | *string* | :heavy_check_mark: | N/A | +| `URL` | *string* | :heavy_check_mark: | N/A | +| `Continent` | *string* | :heavy_check_mark: | N/A | +| `Country` | *string* | :heavy_check_mark: | N/A | +| `City` | *string* | :heavy_check_mark: | N/A | +| `Device` | *string* | :heavy_check_mark: | N/A | +| `Browser` | *string* | :heavy_check_mark: | N/A | +| `Os` | *string* | :heavy_check_mark: | N/A | +| `Referer` | *string* | :heavy_check_mark: | N/A | +| `IP` | *string* | :heavy_check_mark: | N/A | +| `Qr` | *float64* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/bulkdeletelinksrequest.md b/docs/models/operations/bulkdeletelinksrequest.md new file mode 100644 index 0000000..d7c3b4c --- /dev/null +++ b/docs/models/operations/bulkdeletelinksrequest.md @@ -0,0 +1,8 @@ +# BulkDeleteLinksRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `LinkIds` | *string* | :heavy_check_mark: | Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored. | clux0rgak00011...,clux0rgak00022... | \ No newline at end of file diff --git a/docs/models/operations/bulkdeletelinksresponsebody.md b/docs/models/operations/bulkdeletelinksresponsebody.md new file mode 100644 index 0000000..f0fa5d5 --- /dev/null +++ b/docs/models/operations/bulkdeletelinksresponsebody.md @@ -0,0 +1,10 @@ +# BulkDeleteLinksResponseBody + +The deleted links count. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `DeletedCount` | *float64* | :heavy_check_mark: | The number of links deleted. | \ No newline at end of file diff --git a/docs/models/operations/click.md b/docs/models/operations/click.md index 9bd707a..4159242 100644 --- a/docs/models/operations/click.md +++ b/docs/models/operations/click.md @@ -5,16 +5,4 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `URL` | *string* | :heavy_check_mark: | N/A | -| `IP` | *string* | :heavy_check_mark: | N/A | -| `Continent` | *string* | :heavy_check_mark: | N/A | -| `Country` | *string* | :heavy_check_mark: | N/A | -| `City` | *string* | :heavy_check_mark: | N/A | -| `Device` | *string* | :heavy_check_mark: | N/A | -| `Browser` | *string* | :heavy_check_mark: | N/A | -| `Os` | *string* | :heavy_check_mark: | N/A | -| `Ua` | *string* | :heavy_check_mark: | N/A | -| `Bot` | *bool* | :heavy_check_mark: | N/A | -| `Qr` | *bool* | :heavy_check_mark: | N/A | -| `Referer` | *string* | :heavy_check_mark: | N/A | | `ID` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/geo.md b/docs/models/operations/geo.md deleted file mode 100644 index e695138..0000000 --- a/docs/models/operations/geo.md +++ /dev/null @@ -1,259 +0,0 @@ -# Geo - -Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `Af` | **string* | :heavy_minus_sign: | N/A | -| `Al` | **string* | :heavy_minus_sign: | N/A | -| `Dz` | **string* | :heavy_minus_sign: | N/A | -| `As` | **string* | :heavy_minus_sign: | N/A | -| `Ad` | **string* | :heavy_minus_sign: | N/A | -| `Ao` | **string* | :heavy_minus_sign: | N/A | -| `Ai` | **string* | :heavy_minus_sign: | N/A | -| `Aq` | **string* | :heavy_minus_sign: | N/A | -| `Ag` | **string* | :heavy_minus_sign: | N/A | -| `Ar` | **string* | :heavy_minus_sign: | N/A | -| `Am` | **string* | :heavy_minus_sign: | N/A | -| `Aw` | **string* | :heavy_minus_sign: | N/A | -| `Au` | **string* | :heavy_minus_sign: | N/A | -| `At` | **string* | :heavy_minus_sign: | N/A | -| `Az` | **string* | :heavy_minus_sign: | N/A | -| `Bs` | **string* | :heavy_minus_sign: | N/A | -| `Bh` | **string* | :heavy_minus_sign: | N/A | -| `Bd` | **string* | :heavy_minus_sign: | N/A | -| `Bb` | **string* | :heavy_minus_sign: | N/A | -| `By` | **string* | :heavy_minus_sign: | N/A | -| `Be` | **string* | :heavy_minus_sign: | N/A | -| `Bz` | **string* | :heavy_minus_sign: | N/A | -| `Bj` | **string* | :heavy_minus_sign: | N/A | -| `Bm` | **string* | :heavy_minus_sign: | N/A | -| `Bt` | **string* | :heavy_minus_sign: | N/A | -| `Bo` | **string* | :heavy_minus_sign: | N/A | -| `Ba` | **string* | :heavy_minus_sign: | N/A | -| `Bw` | **string* | :heavy_minus_sign: | N/A | -| `Bv` | **string* | :heavy_minus_sign: | N/A | -| `Br` | **string* | :heavy_minus_sign: | N/A | -| `Io` | **string* | :heavy_minus_sign: | N/A | -| `Bn` | **string* | :heavy_minus_sign: | N/A | -| `Bg` | **string* | :heavy_minus_sign: | N/A | -| `Bf` | **string* | :heavy_minus_sign: | N/A | -| `Bi` | **string* | :heavy_minus_sign: | N/A | -| `Kh` | **string* | :heavy_minus_sign: | N/A | -| `Cm` | **string* | :heavy_minus_sign: | N/A | -| `Ca` | **string* | :heavy_minus_sign: | N/A | -| `Cv` | **string* | :heavy_minus_sign: | N/A | -| `Ky` | **string* | :heavy_minus_sign: | N/A | -| `Cf` | **string* | :heavy_minus_sign: | N/A | -| `Td` | **string* | :heavy_minus_sign: | N/A | -| `Cl` | **string* | :heavy_minus_sign: | N/A | -| `Cn` | **string* | :heavy_minus_sign: | N/A | -| `Cx` | **string* | :heavy_minus_sign: | N/A | -| `Cc` | **string* | :heavy_minus_sign: | N/A | -| `Co` | **string* | :heavy_minus_sign: | N/A | -| `Km` | **string* | :heavy_minus_sign: | N/A | -| `Cg` | **string* | :heavy_minus_sign: | N/A | -| `Cd` | **string* | :heavy_minus_sign: | N/A | -| `Ck` | **string* | :heavy_minus_sign: | N/A | -| `Cr` | **string* | :heavy_minus_sign: | N/A | -| `Ci` | **string* | :heavy_minus_sign: | N/A | -| `Hr` | **string* | :heavy_minus_sign: | N/A | -| `Cu` | **string* | :heavy_minus_sign: | N/A | -| `Cy` | **string* | :heavy_minus_sign: | N/A | -| `Cz` | **string* | :heavy_minus_sign: | N/A | -| `Dk` | **string* | :heavy_minus_sign: | N/A | -| `Dj` | **string* | :heavy_minus_sign: | N/A | -| `Dm` | **string* | :heavy_minus_sign: | N/A | -| `Do` | **string* | :heavy_minus_sign: | N/A | -| `Ec` | **string* | :heavy_minus_sign: | N/A | -| `Eg` | **string* | :heavy_minus_sign: | N/A | -| `Sv` | **string* | :heavy_minus_sign: | N/A | -| `Gq` | **string* | :heavy_minus_sign: | N/A | -| `Er` | **string* | :heavy_minus_sign: | N/A | -| `Ee` | **string* | :heavy_minus_sign: | N/A | -| `Et` | **string* | :heavy_minus_sign: | N/A | -| `Fk` | **string* | :heavy_minus_sign: | N/A | -| `Fo` | **string* | :heavy_minus_sign: | N/A | -| `Fj` | **string* | :heavy_minus_sign: | N/A | -| `Fi` | **string* | :heavy_minus_sign: | N/A | -| `Fr` | **string* | :heavy_minus_sign: | N/A | -| `Gf` | **string* | :heavy_minus_sign: | N/A | -| `Pf` | **string* | :heavy_minus_sign: | N/A | -| `Tf` | **string* | :heavy_minus_sign: | N/A | -| `Ga` | **string* | :heavy_minus_sign: | N/A | -| `Gm` | **string* | :heavy_minus_sign: | N/A | -| `Ge` | **string* | :heavy_minus_sign: | N/A | -| `De` | **string* | :heavy_minus_sign: | N/A | -| `Gh` | **string* | :heavy_minus_sign: | N/A | -| `Gi` | **string* | :heavy_minus_sign: | N/A | -| `Gr` | **string* | :heavy_minus_sign: | N/A | -| `Gl` | **string* | :heavy_minus_sign: | N/A | -| `Gd` | **string* | :heavy_minus_sign: | N/A | -| `Gp` | **string* | :heavy_minus_sign: | N/A | -| `Gu` | **string* | :heavy_minus_sign: | N/A | -| `Gt` | **string* | :heavy_minus_sign: | N/A | -| `Gn` | **string* | :heavy_minus_sign: | N/A | -| `Gw` | **string* | :heavy_minus_sign: | N/A | -| `Gy` | **string* | :heavy_minus_sign: | N/A | -| `Ht` | **string* | :heavy_minus_sign: | N/A | -| `Hm` | **string* | :heavy_minus_sign: | N/A | -| `Va` | **string* | :heavy_minus_sign: | N/A | -| `Hn` | **string* | :heavy_minus_sign: | N/A | -| `Hk` | **string* | :heavy_minus_sign: | N/A | -| `Hu` | **string* | :heavy_minus_sign: | N/A | -| `Is` | **string* | :heavy_minus_sign: | N/A | -| `In` | **string* | :heavy_minus_sign: | N/A | -| `ID` | **string* | :heavy_minus_sign: | N/A | -| `Ir` | **string* | :heavy_minus_sign: | N/A | -| `Iq` | **string* | :heavy_minus_sign: | N/A | -| `Ie` | **string* | :heavy_minus_sign: | N/A | -| `Il` | **string* | :heavy_minus_sign: | N/A | -| `It` | **string* | :heavy_minus_sign: | N/A | -| `Jm` | **string* | :heavy_minus_sign: | N/A | -| `Jp` | **string* | :heavy_minus_sign: | N/A | -| `Jo` | **string* | :heavy_minus_sign: | N/A | -| `Kz` | **string* | :heavy_minus_sign: | N/A | -| `Ke` | **string* | :heavy_minus_sign: | N/A | -| `Ki` | **string* | :heavy_minus_sign: | N/A | -| `Kp` | **string* | :heavy_minus_sign: | N/A | -| `Kr` | **string* | :heavy_minus_sign: | N/A | -| `Kw` | **string* | :heavy_minus_sign: | N/A | -| `Kg` | **string* | :heavy_minus_sign: | N/A | -| `La` | **string* | :heavy_minus_sign: | N/A | -| `Lv` | **string* | :heavy_minus_sign: | N/A | -| `Lb` | **string* | :heavy_minus_sign: | N/A | -| `Ls` | **string* | :heavy_minus_sign: | N/A | -| `Lr` | **string* | :heavy_minus_sign: | N/A | -| `Ly` | **string* | :heavy_minus_sign: | N/A | -| `Li` | **string* | :heavy_minus_sign: | N/A | -| `Lt` | **string* | :heavy_minus_sign: | N/A | -| `Lu` | **string* | :heavy_minus_sign: | N/A | -| `Mo` | **string* | :heavy_minus_sign: | N/A | -| `Mg` | **string* | :heavy_minus_sign: | N/A | -| `Mw` | **string* | :heavy_minus_sign: | N/A | -| `My` | **string* | :heavy_minus_sign: | N/A | -| `Mv` | **string* | :heavy_minus_sign: | N/A | -| `Ml` | **string* | :heavy_minus_sign: | N/A | -| `Mt` | **string* | :heavy_minus_sign: | N/A | -| `Mh` | **string* | :heavy_minus_sign: | N/A | -| `Mq` | **string* | :heavy_minus_sign: | N/A | -| `Mr` | **string* | :heavy_minus_sign: | N/A | -| `Mu` | **string* | :heavy_minus_sign: | N/A | -| `Yt` | **string* | :heavy_minus_sign: | N/A | -| `Mx` | **string* | :heavy_minus_sign: | N/A | -| `Fm` | **string* | :heavy_minus_sign: | N/A | -| `Md` | **string* | :heavy_minus_sign: | N/A | -| `Mc` | **string* | :heavy_minus_sign: | N/A | -| `Mn` | **string* | :heavy_minus_sign: | N/A | -| `Ms` | **string* | :heavy_minus_sign: | N/A | -| `Ma` | **string* | :heavy_minus_sign: | N/A | -| `Mz` | **string* | :heavy_minus_sign: | N/A | -| `Mm` | **string* | :heavy_minus_sign: | N/A | -| `Na` | **string* | :heavy_minus_sign: | N/A | -| `Nr` | **string* | :heavy_minus_sign: | N/A | -| `Np` | **string* | :heavy_minus_sign: | N/A | -| `Nl` | **string* | :heavy_minus_sign: | N/A | -| `Nc` | **string* | :heavy_minus_sign: | N/A | -| `Nz` | **string* | :heavy_minus_sign: | N/A | -| `Ni` | **string* | :heavy_minus_sign: | N/A | -| `Ne` | **string* | :heavy_minus_sign: | N/A | -| `Ng` | **string* | :heavy_minus_sign: | N/A | -| `Nu` | **string* | :heavy_minus_sign: | N/A | -| `Nf` | **string* | :heavy_minus_sign: | N/A | -| `Mk` | **string* | :heavy_minus_sign: | N/A | -| `Mp` | **string* | :heavy_minus_sign: | N/A | -| `No` | **string* | :heavy_minus_sign: | N/A | -| `Om` | **string* | :heavy_minus_sign: | N/A | -| `Pk` | **string* | :heavy_minus_sign: | N/A | -| `Pw` | **string* | :heavy_minus_sign: | N/A | -| `Ps` | **string* | :heavy_minus_sign: | N/A | -| `Pa` | **string* | :heavy_minus_sign: | N/A | -| `Pg` | **string* | :heavy_minus_sign: | N/A | -| `Py` | **string* | :heavy_minus_sign: | N/A | -| `Pe` | **string* | :heavy_minus_sign: | N/A | -| `Ph` | **string* | :heavy_minus_sign: | N/A | -| `Pn` | **string* | :heavy_minus_sign: | N/A | -| `Pl` | **string* | :heavy_minus_sign: | N/A | -| `Pt` | **string* | :heavy_minus_sign: | N/A | -| `Pr` | **string* | :heavy_minus_sign: | N/A | -| `Qa` | **string* | :heavy_minus_sign: | N/A | -| `Re` | **string* | :heavy_minus_sign: | N/A | -| `Ro` | **string* | :heavy_minus_sign: | N/A | -| `Ru` | **string* | :heavy_minus_sign: | N/A | -| `Rw` | **string* | :heavy_minus_sign: | N/A | -| `Sh` | **string* | :heavy_minus_sign: | N/A | -| `Kn` | **string* | :heavy_minus_sign: | N/A | -| `Lc` | **string* | :heavy_minus_sign: | N/A | -| `Pm` | **string* | :heavy_minus_sign: | N/A | -| `Vc` | **string* | :heavy_minus_sign: | N/A | -| `Ws` | **string* | :heavy_minus_sign: | N/A | -| `Sm` | **string* | :heavy_minus_sign: | N/A | -| `St` | **string* | :heavy_minus_sign: | N/A | -| `Sa` | **string* | :heavy_minus_sign: | N/A | -| `Sn` | **string* | :heavy_minus_sign: | N/A | -| `Sc` | **string* | :heavy_minus_sign: | N/A | -| `Sl` | **string* | :heavy_minus_sign: | N/A | -| `Sg` | **string* | :heavy_minus_sign: | N/A | -| `Sk` | **string* | :heavy_minus_sign: | N/A | -| `Si` | **string* | :heavy_minus_sign: | N/A | -| `Sb` | **string* | :heavy_minus_sign: | N/A | -| `So` | **string* | :heavy_minus_sign: | N/A | -| `Za` | **string* | :heavy_minus_sign: | N/A | -| `Gs` | **string* | :heavy_minus_sign: | N/A | -| `Es` | **string* | :heavy_minus_sign: | N/A | -| `Lk` | **string* | :heavy_minus_sign: | N/A | -| `Sd` | **string* | :heavy_minus_sign: | N/A | -| `Sr` | **string* | :heavy_minus_sign: | N/A | -| `Sj` | **string* | :heavy_minus_sign: | N/A | -| `Sz` | **string* | :heavy_minus_sign: | N/A | -| `Se` | **string* | :heavy_minus_sign: | N/A | -| `Ch` | **string* | :heavy_minus_sign: | N/A | -| `Sy` | **string* | :heavy_minus_sign: | N/A | -| `Tw` | **string* | :heavy_minus_sign: | N/A | -| `Tj` | **string* | :heavy_minus_sign: | N/A | -| `Tz` | **string* | :heavy_minus_sign: | N/A | -| `Th` | **string* | :heavy_minus_sign: | N/A | -| `Tl` | **string* | :heavy_minus_sign: | N/A | -| `Tg` | **string* | :heavy_minus_sign: | N/A | -| `Tk` | **string* | :heavy_minus_sign: | N/A | -| `To` | **string* | :heavy_minus_sign: | N/A | -| `Tt` | **string* | :heavy_minus_sign: | N/A | -| `Tn` | **string* | :heavy_minus_sign: | N/A | -| `Tr` | **string* | :heavy_minus_sign: | N/A | -| `Tm` | **string* | :heavy_minus_sign: | N/A | -| `Tc` | **string* | :heavy_minus_sign: | N/A | -| `Tv` | **string* | :heavy_minus_sign: | N/A | -| `Ug` | **string* | :heavy_minus_sign: | N/A | -| `Ua` | **string* | :heavy_minus_sign: | N/A | -| `Ae` | **string* | :heavy_minus_sign: | N/A | -| `Gb` | **string* | :heavy_minus_sign: | N/A | -| `Us` | **string* | :heavy_minus_sign: | N/A | -| `Um` | **string* | :heavy_minus_sign: | N/A | -| `Uy` | **string* | :heavy_minus_sign: | N/A | -| `Uz` | **string* | :heavy_minus_sign: | N/A | -| `Vu` | **string* | :heavy_minus_sign: | N/A | -| `Ve` | **string* | :heavy_minus_sign: | N/A | -| `Vn` | **string* | :heavy_minus_sign: | N/A | -| `Vg` | **string* | :heavy_minus_sign: | N/A | -| `Vi` | **string* | :heavy_minus_sign: | N/A | -| `Wf` | **string* | :heavy_minus_sign: | N/A | -| `Eh` | **string* | :heavy_minus_sign: | N/A | -| `Ye` | **string* | :heavy_minus_sign: | N/A | -| `Zm` | **string* | :heavy_minus_sign: | N/A | -| `Zw` | **string* | :heavy_minus_sign: | N/A | -| `Ax` | **string* | :heavy_minus_sign: | N/A | -| `Bq` | **string* | :heavy_minus_sign: | N/A | -| `Cw` | **string* | :heavy_minus_sign: | N/A | -| `Gg` | **string* | :heavy_minus_sign: | N/A | -| `Im` | **string* | :heavy_minus_sign: | N/A | -| `Je` | **string* | :heavy_minus_sign: | N/A | -| `Me` | **string* | :heavy_minus_sign: | N/A | -| `Bl` | **string* | :heavy_minus_sign: | N/A | -| `Mf` | **string* | :heavy_minus_sign: | N/A | -| `Rs` | **string* | :heavy_minus_sign: | N/A | -| `Sx` | **string* | :heavy_minus_sign: | N/A | -| `Ss` | **string* | :heavy_minus_sign: | N/A | -| `Xk` | **string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/link.md b/docs/models/operations/link.md deleted file mode 100644 index 433dfc1..0000000 --- a/docs/models/operations/link.md +++ /dev/null @@ -1,45 +0,0 @@ -# Link - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ID` | *string* | :heavy_check_mark: | The unique ID of the short link. | -| `Domain` | *string* | :heavy_check_mark: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | -| `Key` | *string* | :heavy_check_mark: | The short link slug. If not provided, a random 7-character slug will be generated. | -| `ExternalID` | *string* | :heavy_check_mark: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. | -| `URL` | *string* | :heavy_check_mark: | The destination URL of the short link. | -| `TrackConversion` | **bool* | :heavy_minus_sign: | [BETA] Whether to track conversions for the short link. | -| `Archived` | **bool* | :heavy_minus_sign: | Whether the short link is archived. | -| `ExpiresAt` | *string* | :heavy_check_mark: | The date and time when the short link will expire in ISO-8601 format. | -| `ExpiredURL` | *string* | :heavy_check_mark: | The URL to redirect to when the short link has expired. | -| `Password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. | -| `Proxy` | **bool* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | -| `Title` | *string* | :heavy_check_mark: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `Description` | *string* | :heavy_check_mark: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `Image` | *string* | :heavy_check_mark: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `Video` | *string* | :heavy_check_mark: | The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og | -| `Rewrite` | **bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | -| `DoIndex` | **bool* | :heavy_minus_sign: | Whether to allow search engines to index the short link. | -| `Ios` | *string* | :heavy_check_mark: | The iOS destination URL for the short link for iOS device targeting. | -| `Android` | *string* | :heavy_check_mark: | The Android destination URL for the short link for Android device targeting. | -| `Geo` | [operations.Geo](../../models/operations/geo.md) | :heavy_check_mark: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo | -| `PublicStats` | **bool* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | -| `Comments` | *string* | :heavy_check_mark: | The comments for the short link. | -| `ShortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | -| `QrCode` | *string* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | -| `UtmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | -| `UtmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | -| `UtmCampaign` | *string* | :heavy_check_mark: | The UTM campaign of the short link. | -| `UtmTerm` | *string* | :heavy_check_mark: | The UTM term of the short link. | -| `UtmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | -| `UserID` | *string* | :heavy_check_mark: | The user ID of the creator of the short link. | -| `WorkspaceID` | *string* | :heavy_check_mark: | The workspace ID of the short link. | -| `Clicks` | **float64* | :heavy_minus_sign: | The number of clicks on the short link. | -| `LastClicked` | *string* | :heavy_check_mark: | The date and time when the short link was last clicked. | -| `Leads` | **float64* | :heavy_minus_sign: | [BETA]: The number of leads the short links has generated. | -| `Sales` | **float64* | :heavy_minus_sign: | [BETA]: The number of sales the short links has generated. | -| `SaleAmount` | **float64* | :heavy_minus_sign: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | -| `CreatedAt` | *string* | :heavy_check_mark: | The date and time when the short link was created. | -| `UpdatedAt` | *string* | :heavy_check_mark: | The date and time when the short link was last updated. | \ No newline at end of file diff --git a/docs/models/operations/sale.md b/docs/models/operations/sale.md index f0499be..14c01e7 100644 --- a/docs/models/operations/sale.md +++ b/docs/models/operations/sale.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `Amount` | *float64* | :heavy_check_mark: | N/A | +| `Currency` | *string* | :heavy_check_mark: | N/A | | `PaymentProcessor` | *string* | :heavy_check_mark: | N/A | | `InvoiceID` | *string* | :heavy_check_mark: | N/A | -| `Currency` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| `Metadata` | map[string]*any* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/trackleadresponsebody.md b/docs/models/operations/trackleadresponsebody.md index 7cb60c5..e49ec57 100644 --- a/docs/models/operations/trackleadresponsebody.md +++ b/docs/models/operations/trackleadresponsebody.md @@ -7,7 +7,5 @@ A lead was tracked. | Field | Type | Required | Description | | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `EventName` | *string* | :heavy_check_mark: | N/A | -| `Customer` | [operations.Customer](../../models/operations/customer.md) | :heavy_check_mark: | N/A | | `Click` | [operations.Click](../../models/operations/click.md) | :heavy_check_mark: | N/A | -| `Link` | [operations.Link](../../models/operations/link.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `Customer` | [operations.Customer](../../models/operations/customer.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tracksaleclick.md b/docs/models/operations/tracksaleclick.md deleted file mode 100644 index 1992097..0000000 --- a/docs/models/operations/tracksaleclick.md +++ /dev/null @@ -1,20 +0,0 @@ -# TrackSaleClick - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `URL` | *string* | :heavy_check_mark: | N/A | -| `IP` | *string* | :heavy_check_mark: | N/A | -| `Continent` | *string* | :heavy_check_mark: | N/A | -| `Country` | *string* | :heavy_check_mark: | N/A | -| `City` | *string* | :heavy_check_mark: | N/A | -| `Device` | *string* | :heavy_check_mark: | N/A | -| `Browser` | *string* | :heavy_check_mark: | N/A | -| `Os` | *string* | :heavy_check_mark: | N/A | -| `Ua` | *string* | :heavy_check_mark: | N/A | -| `Bot` | *bool* | :heavy_check_mark: | N/A | -| `Qr` | *bool* | :heavy_check_mark: | N/A | -| `Referer` | *string* | :heavy_check_mark: | N/A | -| `ID` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tracksalegeo.md b/docs/models/operations/tracksalegeo.md deleted file mode 100644 index c0522f7..0000000 --- a/docs/models/operations/tracksalegeo.md +++ /dev/null @@ -1,259 +0,0 @@ -# TrackSaleGeo - -Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `Af` | **string* | :heavy_minus_sign: | N/A | -| `Al` | **string* | :heavy_minus_sign: | N/A | -| `Dz` | **string* | :heavy_minus_sign: | N/A | -| `As` | **string* | :heavy_minus_sign: | N/A | -| `Ad` | **string* | :heavy_minus_sign: | N/A | -| `Ao` | **string* | :heavy_minus_sign: | N/A | -| `Ai` | **string* | :heavy_minus_sign: | N/A | -| `Aq` | **string* | :heavy_minus_sign: | N/A | -| `Ag` | **string* | :heavy_minus_sign: | N/A | -| `Ar` | **string* | :heavy_minus_sign: | N/A | -| `Am` | **string* | :heavy_minus_sign: | N/A | -| `Aw` | **string* | :heavy_minus_sign: | N/A | -| `Au` | **string* | :heavy_minus_sign: | N/A | -| `At` | **string* | :heavy_minus_sign: | N/A | -| `Az` | **string* | :heavy_minus_sign: | N/A | -| `Bs` | **string* | :heavy_minus_sign: | N/A | -| `Bh` | **string* | :heavy_minus_sign: | N/A | -| `Bd` | **string* | :heavy_minus_sign: | N/A | -| `Bb` | **string* | :heavy_minus_sign: | N/A | -| `By` | **string* | :heavy_minus_sign: | N/A | -| `Be` | **string* | :heavy_minus_sign: | N/A | -| `Bz` | **string* | :heavy_minus_sign: | N/A | -| `Bj` | **string* | :heavy_minus_sign: | N/A | -| `Bm` | **string* | :heavy_minus_sign: | N/A | -| `Bt` | **string* | :heavy_minus_sign: | N/A | -| `Bo` | **string* | :heavy_minus_sign: | N/A | -| `Ba` | **string* | :heavy_minus_sign: | N/A | -| `Bw` | **string* | :heavy_minus_sign: | N/A | -| `Bv` | **string* | :heavy_minus_sign: | N/A | -| `Br` | **string* | :heavy_minus_sign: | N/A | -| `Io` | **string* | :heavy_minus_sign: | N/A | -| `Bn` | **string* | :heavy_minus_sign: | N/A | -| `Bg` | **string* | :heavy_minus_sign: | N/A | -| `Bf` | **string* | :heavy_minus_sign: | N/A | -| `Bi` | **string* | :heavy_minus_sign: | N/A | -| `Kh` | **string* | :heavy_minus_sign: | N/A | -| `Cm` | **string* | :heavy_minus_sign: | N/A | -| `Ca` | **string* | :heavy_minus_sign: | N/A | -| `Cv` | **string* | :heavy_minus_sign: | N/A | -| `Ky` | **string* | :heavy_minus_sign: | N/A | -| `Cf` | **string* | :heavy_minus_sign: | N/A | -| `Td` | **string* | :heavy_minus_sign: | N/A | -| `Cl` | **string* | :heavy_minus_sign: | N/A | -| `Cn` | **string* | :heavy_minus_sign: | N/A | -| `Cx` | **string* | :heavy_minus_sign: | N/A | -| `Cc` | **string* | :heavy_minus_sign: | N/A | -| `Co` | **string* | :heavy_minus_sign: | N/A | -| `Km` | **string* | :heavy_minus_sign: | N/A | -| `Cg` | **string* | :heavy_minus_sign: | N/A | -| `Cd` | **string* | :heavy_minus_sign: | N/A | -| `Ck` | **string* | :heavy_minus_sign: | N/A | -| `Cr` | **string* | :heavy_minus_sign: | N/A | -| `Ci` | **string* | :heavy_minus_sign: | N/A | -| `Hr` | **string* | :heavy_minus_sign: | N/A | -| `Cu` | **string* | :heavy_minus_sign: | N/A | -| `Cy` | **string* | :heavy_minus_sign: | N/A | -| `Cz` | **string* | :heavy_minus_sign: | N/A | -| `Dk` | **string* | :heavy_minus_sign: | N/A | -| `Dj` | **string* | :heavy_minus_sign: | N/A | -| `Dm` | **string* | :heavy_minus_sign: | N/A | -| `Do` | **string* | :heavy_minus_sign: | N/A | -| `Ec` | **string* | :heavy_minus_sign: | N/A | -| `Eg` | **string* | :heavy_minus_sign: | N/A | -| `Sv` | **string* | :heavy_minus_sign: | N/A | -| `Gq` | **string* | :heavy_minus_sign: | N/A | -| `Er` | **string* | :heavy_minus_sign: | N/A | -| `Ee` | **string* | :heavy_minus_sign: | N/A | -| `Et` | **string* | :heavy_minus_sign: | N/A | -| `Fk` | **string* | :heavy_minus_sign: | N/A | -| `Fo` | **string* | :heavy_minus_sign: | N/A | -| `Fj` | **string* | :heavy_minus_sign: | N/A | -| `Fi` | **string* | :heavy_minus_sign: | N/A | -| `Fr` | **string* | :heavy_minus_sign: | N/A | -| `Gf` | **string* | :heavy_minus_sign: | N/A | -| `Pf` | **string* | :heavy_minus_sign: | N/A | -| `Tf` | **string* | :heavy_minus_sign: | N/A | -| `Ga` | **string* | :heavy_minus_sign: | N/A | -| `Gm` | **string* | :heavy_minus_sign: | N/A | -| `Ge` | **string* | :heavy_minus_sign: | N/A | -| `De` | **string* | :heavy_minus_sign: | N/A | -| `Gh` | **string* | :heavy_minus_sign: | N/A | -| `Gi` | **string* | :heavy_minus_sign: | N/A | -| `Gr` | **string* | :heavy_minus_sign: | N/A | -| `Gl` | **string* | :heavy_minus_sign: | N/A | -| `Gd` | **string* | :heavy_minus_sign: | N/A | -| `Gp` | **string* | :heavy_minus_sign: | N/A | -| `Gu` | **string* | :heavy_minus_sign: | N/A | -| `Gt` | **string* | :heavy_minus_sign: | N/A | -| `Gn` | **string* | :heavy_minus_sign: | N/A | -| `Gw` | **string* | :heavy_minus_sign: | N/A | -| `Gy` | **string* | :heavy_minus_sign: | N/A | -| `Ht` | **string* | :heavy_minus_sign: | N/A | -| `Hm` | **string* | :heavy_minus_sign: | N/A | -| `Va` | **string* | :heavy_minus_sign: | N/A | -| `Hn` | **string* | :heavy_minus_sign: | N/A | -| `Hk` | **string* | :heavy_minus_sign: | N/A | -| `Hu` | **string* | :heavy_minus_sign: | N/A | -| `Is` | **string* | :heavy_minus_sign: | N/A | -| `In` | **string* | :heavy_minus_sign: | N/A | -| `ID` | **string* | :heavy_minus_sign: | N/A | -| `Ir` | **string* | :heavy_minus_sign: | N/A | -| `Iq` | **string* | :heavy_minus_sign: | N/A | -| `Ie` | **string* | :heavy_minus_sign: | N/A | -| `Il` | **string* | :heavy_minus_sign: | N/A | -| `It` | **string* | :heavy_minus_sign: | N/A | -| `Jm` | **string* | :heavy_minus_sign: | N/A | -| `Jp` | **string* | :heavy_minus_sign: | N/A | -| `Jo` | **string* | :heavy_minus_sign: | N/A | -| `Kz` | **string* | :heavy_minus_sign: | N/A | -| `Ke` | **string* | :heavy_minus_sign: | N/A | -| `Ki` | **string* | :heavy_minus_sign: | N/A | -| `Kp` | **string* | :heavy_minus_sign: | N/A | -| `Kr` | **string* | :heavy_minus_sign: | N/A | -| `Kw` | **string* | :heavy_minus_sign: | N/A | -| `Kg` | **string* | :heavy_minus_sign: | N/A | -| `La` | **string* | :heavy_minus_sign: | N/A | -| `Lv` | **string* | :heavy_minus_sign: | N/A | -| `Lb` | **string* | :heavy_minus_sign: | N/A | -| `Ls` | **string* | :heavy_minus_sign: | N/A | -| `Lr` | **string* | :heavy_minus_sign: | N/A | -| `Ly` | **string* | :heavy_minus_sign: | N/A | -| `Li` | **string* | :heavy_minus_sign: | N/A | -| `Lt` | **string* | :heavy_minus_sign: | N/A | -| `Lu` | **string* | :heavy_minus_sign: | N/A | -| `Mo` | **string* | :heavy_minus_sign: | N/A | -| `Mg` | **string* | :heavy_minus_sign: | N/A | -| `Mw` | **string* | :heavy_minus_sign: | N/A | -| `My` | **string* | :heavy_minus_sign: | N/A | -| `Mv` | **string* | :heavy_minus_sign: | N/A | -| `Ml` | **string* | :heavy_minus_sign: | N/A | -| `Mt` | **string* | :heavy_minus_sign: | N/A | -| `Mh` | **string* | :heavy_minus_sign: | N/A | -| `Mq` | **string* | :heavy_minus_sign: | N/A | -| `Mr` | **string* | :heavy_minus_sign: | N/A | -| `Mu` | **string* | :heavy_minus_sign: | N/A | -| `Yt` | **string* | :heavy_minus_sign: | N/A | -| `Mx` | **string* | :heavy_minus_sign: | N/A | -| `Fm` | **string* | :heavy_minus_sign: | N/A | -| `Md` | **string* | :heavy_minus_sign: | N/A | -| `Mc` | **string* | :heavy_minus_sign: | N/A | -| `Mn` | **string* | :heavy_minus_sign: | N/A | -| `Ms` | **string* | :heavy_minus_sign: | N/A | -| `Ma` | **string* | :heavy_minus_sign: | N/A | -| `Mz` | **string* | :heavy_minus_sign: | N/A | -| `Mm` | **string* | :heavy_minus_sign: | N/A | -| `Na` | **string* | :heavy_minus_sign: | N/A | -| `Nr` | **string* | :heavy_minus_sign: | N/A | -| `Np` | **string* | :heavy_minus_sign: | N/A | -| `Nl` | **string* | :heavy_minus_sign: | N/A | -| `Nc` | **string* | :heavy_minus_sign: | N/A | -| `Nz` | **string* | :heavy_minus_sign: | N/A | -| `Ni` | **string* | :heavy_minus_sign: | N/A | -| `Ne` | **string* | :heavy_minus_sign: | N/A | -| `Ng` | **string* | :heavy_minus_sign: | N/A | -| `Nu` | **string* | :heavy_minus_sign: | N/A | -| `Nf` | **string* | :heavy_minus_sign: | N/A | -| `Mk` | **string* | :heavy_minus_sign: | N/A | -| `Mp` | **string* | :heavy_minus_sign: | N/A | -| `No` | **string* | :heavy_minus_sign: | N/A | -| `Om` | **string* | :heavy_minus_sign: | N/A | -| `Pk` | **string* | :heavy_minus_sign: | N/A | -| `Pw` | **string* | :heavy_minus_sign: | N/A | -| `Ps` | **string* | :heavy_minus_sign: | N/A | -| `Pa` | **string* | :heavy_minus_sign: | N/A | -| `Pg` | **string* | :heavy_minus_sign: | N/A | -| `Py` | **string* | :heavy_minus_sign: | N/A | -| `Pe` | **string* | :heavy_minus_sign: | N/A | -| `Ph` | **string* | :heavy_minus_sign: | N/A | -| `Pn` | **string* | :heavy_minus_sign: | N/A | -| `Pl` | **string* | :heavy_minus_sign: | N/A | -| `Pt` | **string* | :heavy_minus_sign: | N/A | -| `Pr` | **string* | :heavy_minus_sign: | N/A | -| `Qa` | **string* | :heavy_minus_sign: | N/A | -| `Re` | **string* | :heavy_minus_sign: | N/A | -| `Ro` | **string* | :heavy_minus_sign: | N/A | -| `Ru` | **string* | :heavy_minus_sign: | N/A | -| `Rw` | **string* | :heavy_minus_sign: | N/A | -| `Sh` | **string* | :heavy_minus_sign: | N/A | -| `Kn` | **string* | :heavy_minus_sign: | N/A | -| `Lc` | **string* | :heavy_minus_sign: | N/A | -| `Pm` | **string* | :heavy_minus_sign: | N/A | -| `Vc` | **string* | :heavy_minus_sign: | N/A | -| `Ws` | **string* | :heavy_minus_sign: | N/A | -| `Sm` | **string* | :heavy_minus_sign: | N/A | -| `St` | **string* | :heavy_minus_sign: | N/A | -| `Sa` | **string* | :heavy_minus_sign: | N/A | -| `Sn` | **string* | :heavy_minus_sign: | N/A | -| `Sc` | **string* | :heavy_minus_sign: | N/A | -| `Sl` | **string* | :heavy_minus_sign: | N/A | -| `Sg` | **string* | :heavy_minus_sign: | N/A | -| `Sk` | **string* | :heavy_minus_sign: | N/A | -| `Si` | **string* | :heavy_minus_sign: | N/A | -| `Sb` | **string* | :heavy_minus_sign: | N/A | -| `So` | **string* | :heavy_minus_sign: | N/A | -| `Za` | **string* | :heavy_minus_sign: | N/A | -| `Gs` | **string* | :heavy_minus_sign: | N/A | -| `Es` | **string* | :heavy_minus_sign: | N/A | -| `Lk` | **string* | :heavy_minus_sign: | N/A | -| `Sd` | **string* | :heavy_minus_sign: | N/A | -| `Sr` | **string* | :heavy_minus_sign: | N/A | -| `Sj` | **string* | :heavy_minus_sign: | N/A | -| `Sz` | **string* | :heavy_minus_sign: | N/A | -| `Se` | **string* | :heavy_minus_sign: | N/A | -| `Ch` | **string* | :heavy_minus_sign: | N/A | -| `Sy` | **string* | :heavy_minus_sign: | N/A | -| `Tw` | **string* | :heavy_minus_sign: | N/A | -| `Tj` | **string* | :heavy_minus_sign: | N/A | -| `Tz` | **string* | :heavy_minus_sign: | N/A | -| `Th` | **string* | :heavy_minus_sign: | N/A | -| `Tl` | **string* | :heavy_minus_sign: | N/A | -| `Tg` | **string* | :heavy_minus_sign: | N/A | -| `Tk` | **string* | :heavy_minus_sign: | N/A | -| `To` | **string* | :heavy_minus_sign: | N/A | -| `Tt` | **string* | :heavy_minus_sign: | N/A | -| `Tn` | **string* | :heavy_minus_sign: | N/A | -| `Tr` | **string* | :heavy_minus_sign: | N/A | -| `Tm` | **string* | :heavy_minus_sign: | N/A | -| `Tc` | **string* | :heavy_minus_sign: | N/A | -| `Tv` | **string* | :heavy_minus_sign: | N/A | -| `Ug` | **string* | :heavy_minus_sign: | N/A | -| `Ua` | **string* | :heavy_minus_sign: | N/A | -| `Ae` | **string* | :heavy_minus_sign: | N/A | -| `Gb` | **string* | :heavy_minus_sign: | N/A | -| `Us` | **string* | :heavy_minus_sign: | N/A | -| `Um` | **string* | :heavy_minus_sign: | N/A | -| `Uy` | **string* | :heavy_minus_sign: | N/A | -| `Uz` | **string* | :heavy_minus_sign: | N/A | -| `Vu` | **string* | :heavy_minus_sign: | N/A | -| `Ve` | **string* | :heavy_minus_sign: | N/A | -| `Vn` | **string* | :heavy_minus_sign: | N/A | -| `Vg` | **string* | :heavy_minus_sign: | N/A | -| `Vi` | **string* | :heavy_minus_sign: | N/A | -| `Wf` | **string* | :heavy_minus_sign: | N/A | -| `Eh` | **string* | :heavy_minus_sign: | N/A | -| `Ye` | **string* | :heavy_minus_sign: | N/A | -| `Zm` | **string* | :heavy_minus_sign: | N/A | -| `Zw` | **string* | :heavy_minus_sign: | N/A | -| `Ax` | **string* | :heavy_minus_sign: | N/A | -| `Bq` | **string* | :heavy_minus_sign: | N/A | -| `Cw` | **string* | :heavy_minus_sign: | N/A | -| `Gg` | **string* | :heavy_minus_sign: | N/A | -| `Im` | **string* | :heavy_minus_sign: | N/A | -| `Je` | **string* | :heavy_minus_sign: | N/A | -| `Me` | **string* | :heavy_minus_sign: | N/A | -| `Bl` | **string* | :heavy_minus_sign: | N/A | -| `Mf` | **string* | :heavy_minus_sign: | N/A | -| `Rs` | **string* | :heavy_minus_sign: | N/A | -| `Sx` | **string* | :heavy_minus_sign: | N/A | -| `Ss` | **string* | :heavy_minus_sign: | N/A | -| `Xk` | **string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tracksalelink.md b/docs/models/operations/tracksalelink.md deleted file mode 100644 index f55e49d..0000000 --- a/docs/models/operations/tracksalelink.md +++ /dev/null @@ -1,45 +0,0 @@ -# TrackSaleLink - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ID` | *string* | :heavy_check_mark: | The unique ID of the short link. | -| `Domain` | *string* | :heavy_check_mark: | The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). | -| `Key` | *string* | :heavy_check_mark: | The short link slug. If not provided, a random 7-character slug will be generated. | -| `ExternalID` | *string* | :heavy_check_mark: | This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. | -| `URL` | *string* | :heavy_check_mark: | The destination URL of the short link. | -| `TrackConversion` | **bool* | :heavy_minus_sign: | [BETA] Whether to track conversions for the short link. | -| `Archived` | **bool* | :heavy_minus_sign: | Whether the short link is archived. | -| `ExpiresAt` | *string* | :heavy_check_mark: | The date and time when the short link will expire in ISO-8601 format. | -| `ExpiredURL` | *string* | :heavy_check_mark: | The URL to redirect to when the short link has expired. | -| `Password` | *string* | :heavy_check_mark: | The password required to access the destination URL of the short link. | -| `Proxy` | **bool* | :heavy_minus_sign: | Whether the short link uses Custom Social Media Cards feature. | -| `Title` | *string* | :heavy_check_mark: | The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `Description` | *string* | :heavy_check_mark: | The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `Image` | *string* | :heavy_check_mark: | The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. | -| `Video` | *string* | :heavy_check_mark: | The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og | -| `Rewrite` | **bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | -| `DoIndex` | **bool* | :heavy_minus_sign: | Whether to allow search engines to index the short link. | -| `Ios` | *string* | :heavy_check_mark: | The iOS destination URL for the short link for iOS device targeting. | -| `Android` | *string* | :heavy_check_mark: | The Android destination URL for the short link for Android device targeting. | -| `Geo` | [operations.TrackSaleGeo](../../models/operations/tracksalegeo.md) | :heavy_check_mark: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo | -| `PublicStats` | **bool* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | -| `Comments` | *string* | :heavy_check_mark: | The comments for the short link. | -| `ShortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | -| `QrCode` | *string* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | -| `UtmSource` | *string* | :heavy_check_mark: | The UTM source of the short link. | -| `UtmMedium` | *string* | :heavy_check_mark: | The UTM medium of the short link. | -| `UtmCampaign` | *string* | :heavy_check_mark: | The UTM campaign of the short link. | -| `UtmTerm` | *string* | :heavy_check_mark: | The UTM term of the short link. | -| `UtmContent` | *string* | :heavy_check_mark: | The UTM content of the short link. | -| `UserID` | *string* | :heavy_check_mark: | The user ID of the creator of the short link. | -| `WorkspaceID` | *string* | :heavy_check_mark: | The workspace ID of the short link. | -| `Clicks` | **float64* | :heavy_minus_sign: | The number of clicks on the short link. | -| `LastClicked` | *string* | :heavy_check_mark: | The date and time when the short link was last clicked. | -| `Leads` | **float64* | :heavy_minus_sign: | [BETA]: The number of leads the short links has generated. | -| `Sales` | **float64* | :heavy_minus_sign: | [BETA]: The number of sales the short links has generated. | -| `SaleAmount` | **float64* | :heavy_minus_sign: | [BETA]: The total dollar amount of sales the short links has generated (in cents). | -| `CreatedAt` | *string* | :heavy_check_mark: | The date and time when the short link was created. | -| `UpdatedAt` | *string* | :heavy_check_mark: | The date and time when the short link was last updated. | \ No newline at end of file diff --git a/docs/models/operations/tracksaleresponsebody.md b/docs/models/operations/tracksaleresponsebody.md index 513524b..60947c2 100644 --- a/docs/models/operations/tracksaleresponsebody.md +++ b/docs/models/operations/tracksaleresponsebody.md @@ -9,6 +9,4 @@ A sale was tracked. | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `EventName` | *string* | :heavy_check_mark: | N/A | | `Customer` | [operations.TrackSaleCustomer](../../models/operations/tracksalecustomer.md) | :heavy_check_mark: | N/A | -| `Sale` | [operations.Sale](../../models/operations/sale.md) | :heavy_check_mark: | N/A | -| `Click` | [operations.TrackSaleClick](../../models/operations/tracksaleclick.md) | :heavy_check_mark: | N/A | -| `Link` | [operations.TrackSaleLink](../../models/operations/tracksalelink.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `Sale` | [operations.Sale](../../models/operations/sale.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index fa77009..de6956d 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -18,8 +18,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -27,16 +27,16 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.RetrieveAnalyticsRequest{ + + ctx := context.Background() + res, err := s.Analytics.Retrieve(ctx, operations.RetrieveAnalyticsRequest{ Timezone: dubgo.String("America/New_York"), City: dubgo.String("New York"), Device: dubgo.String("Desktop"), Browser: dubgo.String("Chrome"), Os: dubgo.String("Windows"), Referer: dubgo.String("google.com"), - } - ctx := context.Background() - res, err := s.Analytics.Retrieve(ctx, request) + }) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/domains/README.md b/docs/sdks/domains/README.md index f20a997..921fd49 100644 --- a/docs/sdks/domains/README.md +++ b/docs/sdks/domains/README.md @@ -21,8 +21,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -30,12 +30,12 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.ListDomainsRequest{ + + ctx := context.Background() + res, err := s.Domains.List(ctx, operations.ListDomainsRequest{ Page: dubgo.Float64(1), PageSize: dubgo.Float64(50), - } - ctx := context.Background() - res, err := s.Domains.List(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -97,8 +97,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -106,14 +106,14 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var request *operations.CreateDomainRequestBody = &operations.CreateDomainRequestBody{ + + ctx := context.Background() + res, err := s.Domains.Create(ctx, &operations.CreateDomainRequestBody{ Slug: "acme.com", ExpiredURL: dubgo.String("https://acme.com/expired"), Archived: dubgo.Bool(false), Placeholder: dubgo.String("https://dub.co/help/article/what-is-dub"), - } - ctx := context.Background() - res, err := s.Domains.Create(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -170,9 +170,9 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var slug string = "acme.com" + ctx := context.Background() - res, err := s.Domains.Delete(ctx, slug) + res, err := s.Domains.Delete(ctx, "acme.com") if err != nil { log.Fatal(err) } @@ -221,8 +221,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -230,16 +230,14 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var slug string = "acme.com" - var requestBody *operations.UpdateDomainRequestBody = &operations.UpdateDomainRequestBody{ + ctx := context.Background() + res, err := s.Domains.Update(ctx, "acme.com", &operations.UpdateDomainRequestBody{ Slug: dubgo.String("acme.com"), ExpiredURL: dubgo.String("https://acme.com/expired"), Archived: dubgo.Bool(false), Placeholder: dubgo.String("https://dub.co/help/article/what-is-dub"), - } - ctx := context.Background() - res, err := s.Domains.Update(ctx, slug, requestBody) + }) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index d375bdb..6b253a4 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -18,8 +18,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -27,16 +27,16 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.ListEventsRequest{ + + ctx := context.Background() + res, err := s.Events.List(ctx, operations.ListEventsRequest{ Timezone: dubgo.String("America/New_York"), City: dubgo.String("New York"), Device: dubgo.String("Desktop"), Browser: dubgo.String("Chrome"), Os: dubgo.String("Windows"), Referer: dubgo.String("google.com"), - } - ctx := context.Background() - res, err := s.Events.List(ctx, request) + }) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/links/README.md b/docs/sdks/links/README.md index 64bf32d..3d11e0c 100644 --- a/docs/sdks/links/README.md +++ b/docs/sdks/links/README.md @@ -12,6 +12,7 @@ * [Delete](#delete) - Delete a link * [Update](#update) - Update a link * [CreateMany](#createmany) - Bulk create links +* [DeleteMany](#deletemany) - Bulk delete links * [UpdateMany](#updatemany) - Bulk update links * [Upsert](#upsert) - Upsert a link @@ -26,8 +27,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -35,12 +36,12 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetLinksRequest{ + + ctx := context.Background() + res, err := s.Links.List(ctx, operations.GetLinksRequest{ Page: dubgo.Float64(1), PageSize: dubgo.Float64(50), - } - ctx := context.Background() - res, err := s.Links.List(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -102,8 +103,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -111,15 +112,15 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var request *operations.CreateLinkRequestBody = &operations.CreateLinkRequestBody{ + + ctx := context.Background() + res, err := s.Links.Create(ctx, &operations.CreateLinkRequestBody{ URL: "https://google.com", ExternalID: dubgo.String("123456"), TagIds: operations.CreateTagIdsStr( "[\"clux0rgak00011...\"]", ), - } - ctx := context.Background() - res, err := s.Links.Create(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -168,8 +169,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -177,9 +178,9 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetLinksCountRequest{} + ctx := context.Background() - res, err := s.Links.Count(ctx, request) + res, err := s.Links.Count(ctx, operations.GetLinksCountRequest{}) if err != nil { log.Fatal(err) } @@ -228,8 +229,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -237,12 +238,12 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetLinkInfoRequest{ + + ctx := context.Background() + res, err := s.Links.Get(ctx, operations.GetLinkInfoRequest{ LinkID: dubgo.String("clux0rgak00011..."), ExternalID: dubgo.String("ext_123456"), - } - ctx := context.Background() - res, err := s.Links.Get(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -299,9 +300,9 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var linkID string = "" + ctx := context.Background() - res, err := s.Links.Delete(ctx, linkID) + res, err := s.Links.Delete(ctx, "") if err != nil { log.Fatal(err) } @@ -350,8 +351,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -359,9 +360,9 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var linkID string = "" - var requestBody *operations.UpdateLinkRequestBody = &operations.UpdateLinkRequestBody{ + ctx := context.Background() + res, err := s.Links.Update(ctx, "", &operations.UpdateLinkRequestBody{ URL: dubgo.String("https://google.com"), ExternalID: dubgo.String("123456"), TagIds: operations.CreateUpdateLinkTagIdsArrayOfStr( @@ -369,9 +370,7 @@ func main() { "clux0rgak00011...", }, ), - } - ctx := context.Background() - res, err := s.Links.Update(ctx, linkID, requestBody) + }) if err != nil { log.Fatal(err) } @@ -421,8 +420,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -430,7 +429,9 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var request []operations.RequestBody = []operations.RequestBody{ + + ctx := context.Background() + res, err := s.Links.CreateMany(ctx, []operations.RequestBody{ operations.RequestBody{ URL: "https://google.com", ExternalID: dubgo.String("123456"), @@ -440,9 +441,7 @@ func main() { }, ), }, - } - ctx := context.Background() - res, err := s.Links.CreateMany(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -480,6 +479,68 @@ func main() { | sdkerrors.SDKError | 4xx-5xx | */* | +## DeleteMany + +Bulk delete up to 100 links for the authenticated workspace. + +### Example Usage + +```go +package main + +import( + dubgo "github.com/dubinc/dub-go" + "context" + "github.com/dubinc/dub-go/models/operations" + "log" +) + +func main() { + s := dubgo.New( + dubgo.WithSecurity("DUB_API_KEY"), + ) + + ctx := context.Background() + res, err := s.Links.DeleteMany(ctx, operations.BulkDeleteLinksRequest{ + LinkIds: "clux0rgak00011...,clux0rgak00022...", + }) + if err != nil { + log.Fatal(err) + } + if res != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.BulkDeleteLinksRequest](../../models/operations/bulkdeletelinksrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | + +### Response + +**[*operations.BulkDeleteLinksResponseBody](../../models/operations/bulkdeletelinksresponsebody.md), error** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------- | ----------------------------- | ----------------------------- | +| sdkerrors.BadRequest | 400 | application/json | +| sdkerrors.Unauthorized | 401 | application/json | +| sdkerrors.Forbidden | 403 | application/json | +| sdkerrors.NotFound | 404 | application/json | +| sdkerrors.Conflict | 409 | application/json | +| sdkerrors.InviteExpired | 410 | application/json | +| sdkerrors.UnprocessableEntity | 422 | application/json | +| sdkerrors.RateLimitExceeded | 429 | application/json | +| sdkerrors.InternalServerError | 500 | application/json | +| sdkerrors.SDKError | 4xx-5xx | */* | + + ## UpdateMany Bulk update up to 100 links with the same data for the authenticated workspace. @@ -491,8 +552,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -500,7 +561,9 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var request *operations.BulkUpdateLinksRequestBody = &operations.BulkUpdateLinksRequestBody{ + + ctx := context.Background() + res, err := s.Links.UpdateMany(ctx, &operations.BulkUpdateLinksRequestBody{ LinkIds: []string{ "", }, @@ -510,9 +573,7 @@ func main() { "[\"clux0rgak00011...\"]", ), }, - } - ctx := context.Background() - res, err := s.Links.UpdateMany(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -561,8 +622,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -570,7 +631,9 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var request *operations.UpsertLinkRequestBody = &operations.UpsertLinkRequestBody{ + + ctx := context.Background() + res, err := s.Links.Upsert(ctx, &operations.UpsertLinkRequestBody{ URL: "https://google.com", ExternalID: dubgo.String("123456"), TagIds: operations.CreateUpsertLinkTagIdsArrayOfStr( @@ -578,9 +641,7 @@ func main() { "clux0rgak00011...", }, ), - } - ctx := context.Background() - res, err := s.Links.Upsert(ctx, request) + }) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/metatags/README.md b/docs/sdks/metatags/README.md index dbb0d79..38c32d6 100644 --- a/docs/sdks/metatags/README.md +++ b/docs/sdks/metatags/README.md @@ -18,8 +18,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -27,11 +27,11 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetMetatagsRequest{ - URL: "https://dub.co", - } + ctx := context.Background() - res, err := s.Metatags.Get(ctx, request) + res, err := s.Metatags.Get(ctx, operations.GetMetatagsRequest{ + URL: "https://dub.co", + }) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/qrcodes/README.md b/docs/sdks/qrcodes/README.md index ad9d741..b720f73 100644 --- a/docs/sdks/qrcodes/README.md +++ b/docs/sdks/qrcodes/README.md @@ -18,8 +18,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -27,11 +27,11 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetQRCodeRequest{ - URL: "https://brief-micronutrient.org", - } + ctx := context.Background() - res, err := s.QRCodes.Get(ctx, request) + res, err := s.QRCodes.Get(ctx, operations.GetQRCodeRequest{ + URL: "https://brief-micronutrient.org", + }) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/tags/README.md b/docs/sdks/tags/README.md index 9790f7f..f075f1b 100644 --- a/docs/sdks/tags/README.md +++ b/docs/sdks/tags/README.md @@ -78,7 +78,6 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" "log" ) @@ -138,7 +137,6 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" "log" ) @@ -147,9 +145,9 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var id string = "" + ctx := context.Background() - res, err := s.Tags.Update(ctx, id, nil) + res, err := s.Tags.Update(ctx, "", nil) if err != nil { log.Fatal(err) } diff --git a/docs/sdks/track/README.md b/docs/sdks/track/README.md index 3029710..c95a3a5 100644 --- a/docs/sdks/track/README.md +++ b/docs/sdks/track/README.md @@ -20,8 +20,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -29,13 +29,13 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var request *operations.TrackLeadRequestBody = &operations.TrackLeadRequestBody{ + + ctx := context.Background() + res, err := s.Track.Lead(ctx, &operations.TrackLeadRequestBody{ ClickID: "", EventName: "Sign up", CustomerID: "", - } - ctx := context.Background() - res, err := s.Track.Lead(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -84,8 +84,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -93,14 +93,14 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var request *operations.TrackSaleRequestBody = &operations.TrackSaleRequestBody{ + + ctx := context.Background() + res, err := s.Track.Sale(ctx, &operations.TrackSaleRequestBody{ CustomerID: "", Amount: 996500, PaymentProcessor: operations.PaymentProcessorShopify, EventName: dubgo.String("Purchase"), - } - ctx := context.Background() - res, err := s.Track.Sale(ctx, request) + }) if err != nil { log.Fatal(err) } @@ -149,7 +149,6 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" "log" ) diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md index dc4d5f9..ff65e01 100644 --- a/docs/sdks/workspaces/README.md +++ b/docs/sdks/workspaces/README.md @@ -19,8 +19,8 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" + "github.com/dubinc/dub-go/models/operations" "log" ) @@ -28,11 +28,11 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - request := operations.GetWorkspaceRequest{ - IDOrSlug: "", - } + ctx := context.Background() - res, err := s.Workspaces.Get(ctx, request) + res, err := s.Workspaces.Get(ctx, operations.GetWorkspaceRequest{ + IDOrSlug: "", + }) if err != nil { log.Fatal(err) } @@ -81,7 +81,6 @@ package main import( dubgo "github.com/dubinc/dub-go" - "github.com/dubinc/dub-go/models/operations" "context" "log" ) @@ -90,9 +89,9 @@ func main() { s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) - var idOrSlug string = "" + ctx := context.Background() - res, err := s.Workspaces.Update(ctx, idOrSlug, nil) + res, err := s.Workspaces.Update(ctx, "", nil) if err != nil { log.Fatal(err) } diff --git a/dub.go b/dub.go index 1eb8fc8..11da5b5 100644 --- a/dub.go +++ b/dub.go @@ -154,9 +154,9 @@ func New(opts ...SDKOption) *Dub { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "0.0.1", - SDKVersion: "0.8.3", - GenVersion: "2.407.2", - UserAgent: "speakeasy-sdk/go 0.8.3 2.407.2 0.0.1 github.com/dubinc/dub-go", + SDKVersion: "0.8.4", + GenVersion: "2.409.0", + UserAgent: "speakeasy-sdk/go 0.8.4 2.409.0 0.0.1 github.com/dubinc/dub-go", Hooks: hooks.New(), }, } diff --git a/internal/utils/requestbody.go b/internal/utils/requestbody.go index cee9da2..000226e 100644 --- a/internal/utils/requestbody.go +++ b/internal/utils/requestbody.go @@ -66,15 +66,16 @@ func serializeRequestBody(request interface{}, nullable, optional bool, requestF if tag != nil { // request object (non-flattened) requestVal := requestValType.FieldByName(requestFieldName) + val := reflect.ValueOf(requestVal.Interface()) if isNil(requestField.Type, requestVal) { if !nullable && optional { return nil, "", nil } - return serializeContentType(requestFieldName, tag.MediaType, requestVal, string(requestField.Tag)) + return serializeContentType(requestFieldName, tag.MediaType, val, string(requestField.Tag)) } - return serializeContentType(requestFieldName, tag.MediaType, requestVal, string(requestField.Tag)) + return serializeContentType(requestFieldName, tag.MediaType, val, string(requestField.Tag)) } } diff --git a/links.go b/links.go index 15b5ba9..a9f3076 100644 --- a/links.go +++ b/links.go @@ -2039,6 +2039,285 @@ func (s *Links) CreateMany(ctx context.Context, request []operations.RequestBody } +// DeleteMany - Bulk delete links +// Bulk delete up to 100 links for the authenticated workspace. +func (s *Links) DeleteMany(ctx context.Context, request operations.BulkDeleteLinksRequest, opts ...operations.Option) (*operations.BulkDeleteLinksResponseBody, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "bulkDeleteLinks", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/links/bulk") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil { + copyBody, err := req.GetBody() + if err != nil { + return nil, err + } + req.Body = copyBody + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, backoff.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"400", "401", "403", "404", "409", "410", "422", "429", "4XX", "500", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out operations.BulkDeleteLinksResponseBody + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return &out, nil + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out sdkerrors.BadRequest + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 401: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out sdkerrors.Unauthorized + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 403: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out sdkerrors.Forbidden + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 404: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out sdkerrors.NotFound + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 409: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out sdkerrors.Conflict + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 410: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out sdkerrors.InviteExpired + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 422: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out sdkerrors.UnprocessableEntity + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 429: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out sdkerrors.RateLimitExceeded + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 500: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out sdkerrors.InternalServerError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + return nil, sdkerrors.NewSDKError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + return nil, sdkerrors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return nil, nil + +} + // UpdateMany - Bulk update links // Bulk update up to 100 links with the same data for the authenticated workspace. func (s *Links) UpdateMany(ctx context.Context, request *operations.BulkUpdateLinksRequestBody, opts ...operations.Option) ([]components.LinkSchema, error) { diff --git a/models/components/clickevent.go b/models/components/clickevent.go index e027187..4e11e63 100644 --- a/models/components/clickevent.go +++ b/models/components/clickevent.go @@ -5,7 +5,6 @@ package components import ( "encoding/json" "fmt" - "github.com/dubinc/dub-go/internal/utils" ) type Event string @@ -32,7 +31,7 @@ func (e *Event) UnmarshalJSON(data []byte) error { } type ClickEvent struct { - Event *Event `default:"click" json:"event"` + Event Event `json:"event"` Timestamp string `json:"timestamp"` ClickID string `json:"click_id"` LinkID string `json:"link_id"` @@ -50,20 +49,9 @@ type ClickEvent struct { Qr *float64 `json:"qr"` } -func (c ClickEvent) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(c, "", false) -} - -func (c *ClickEvent) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil { - return err - } - return nil -} - -func (o *ClickEvent) GetEvent() *Event { +func (o *ClickEvent) GetEvent() Event { if o == nil { - return nil + return Event("") } return o.Event } diff --git a/models/operations/bulkdeletelinks.go b/models/operations/bulkdeletelinks.go new file mode 100644 index 0000000..6e8dec9 --- /dev/null +++ b/models/operations/bulkdeletelinks.go @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +type BulkDeleteLinksRequest struct { + // Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored. + LinkIds string `queryParam:"style=form,explode=true,name=linkIds"` +} + +func (o *BulkDeleteLinksRequest) GetLinkIds() string { + if o == nil { + return "" + } + return o.LinkIds +} + +// BulkDeleteLinksResponseBody - The deleted links count. +type BulkDeleteLinksResponseBody struct { + // The number of links deleted. + DeletedCount float64 `json:"deletedCount"` +} + +func (o *BulkDeleteLinksResponseBody) GetDeletedCount() float64 { + if o == nil { + return 0.0 + } + return o.DeletedCount +} diff --git a/models/operations/tracklead.go b/models/operations/tracklead.go index 4bcb568..1157b0b 100644 --- a/models/operations/tracklead.go +++ b/models/operations/tracklead.go @@ -14,15 +14,26 @@ type TrackLeadRequestBody struct { // This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. CustomerID string `json:"customerId"` // Name of the customer in the client's app. - CustomerName *string `json:"customerName,omitempty"` + CustomerName *string `default:"null" json:"customerName"` // Email of the customer in the client's app. - CustomerEmail *string `json:"customerEmail,omitempty"` + CustomerEmail *string `default:"null" json:"customerEmail"` // Avatar of the customer in the client's app. - CustomerAvatar *string `json:"customerAvatar,omitempty"` + CustomerAvatar *string `default:"null" json:"customerAvatar"` // Additional metadata to be stored with the lead event Metadata map[string]any `json:"metadata,omitempty"` } +func (t TrackLeadRequestBody) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *TrackLeadRequestBody) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, false); err != nil { + return err + } + return nil +} + func (o *TrackLeadRequestBody) GetClickID() string { if o == nil { return "" @@ -72,6 +83,17 @@ func (o *TrackLeadRequestBody) GetMetadata() map[string]any { return o.Metadata } +type Click struct { + ID string `json:"id"` +} + +func (o *Click) GetID() string { + if o == nil { + return "" + } + return o.ID +} + type Customer struct { ID string `json:"id"` Name *string `json:"name"` @@ -107,2505 +129,22 @@ func (o *Customer) GetAvatar() *string { return o.Avatar } -type Click struct { - URL string `json:"url"` - IP string `json:"ip"` - Continent string `json:"continent"` - Country string `json:"country"` - City string `json:"city"` - Device string `json:"device"` - Browser string `json:"browser"` - Os string `json:"os"` - Ua string `json:"ua"` - Bot bool `json:"bot"` - Qr bool `json:"qr"` - Referer string `json:"referer"` - ID string `json:"id"` -} - -func (o *Click) GetURL() string { - if o == nil { - return "" - } - return o.URL -} - -func (o *Click) GetIP() string { - if o == nil { - return "" - } - return o.IP -} - -func (o *Click) GetContinent() string { - if o == nil { - return "" - } - return o.Continent -} - -func (o *Click) GetCountry() string { - if o == nil { - return "" - } - return o.Country -} - -func (o *Click) GetCity() string { - if o == nil { - return "" - } - return o.City -} - -func (o *Click) GetDevice() string { - if o == nil { - return "" - } - return o.Device -} - -func (o *Click) GetBrowser() string { - if o == nil { - return "" - } - return o.Browser -} - -func (o *Click) GetOs() string { - if o == nil { - return "" - } - return o.Os -} - -func (o *Click) GetUa() string { - if o == nil { - return "" - } - return o.Ua -} - -func (o *Click) GetBot() bool { - if o == nil { - return false - } - return o.Bot -} - -func (o *Click) GetQr() bool { - if o == nil { - return false - } - return o.Qr -} - -func (o *Click) GetReferer() string { - if o == nil { - return "" - } - return o.Referer -} - -func (o *Click) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo -type Geo struct { - Af *string `json:"AF,omitempty"` - Al *string `json:"AL,omitempty"` - Dz *string `json:"DZ,omitempty"` - As *string `json:"AS,omitempty"` - Ad *string `json:"AD,omitempty"` - Ao *string `json:"AO,omitempty"` - Ai *string `json:"AI,omitempty"` - Aq *string `json:"AQ,omitempty"` - Ag *string `json:"AG,omitempty"` - Ar *string `json:"AR,omitempty"` - Am *string `json:"AM,omitempty"` - Aw *string `json:"AW,omitempty"` - Au *string `json:"AU,omitempty"` - At *string `json:"AT,omitempty"` - Az *string `json:"AZ,omitempty"` - Bs *string `json:"BS,omitempty"` - Bh *string `json:"BH,omitempty"` - Bd *string `json:"BD,omitempty"` - Bb *string `json:"BB,omitempty"` - By *string `json:"BY,omitempty"` - Be *string `json:"BE,omitempty"` - Bz *string `json:"BZ,omitempty"` - Bj *string `json:"BJ,omitempty"` - Bm *string `json:"BM,omitempty"` - Bt *string `json:"BT,omitempty"` - Bo *string `json:"BO,omitempty"` - Ba *string `json:"BA,omitempty"` - Bw *string `json:"BW,omitempty"` - Bv *string `json:"BV,omitempty"` - Br *string `json:"BR,omitempty"` - Io *string `json:"IO,omitempty"` - Bn *string `json:"BN,omitempty"` - Bg *string `json:"BG,omitempty"` - Bf *string `json:"BF,omitempty"` - Bi *string `json:"BI,omitempty"` - Kh *string `json:"KH,omitempty"` - Cm *string `json:"CM,omitempty"` - Ca *string `json:"CA,omitempty"` - Cv *string `json:"CV,omitempty"` - Ky *string `json:"KY,omitempty"` - Cf *string `json:"CF,omitempty"` - Td *string `json:"TD,omitempty"` - Cl *string `json:"CL,omitempty"` - Cn *string `json:"CN,omitempty"` - Cx *string `json:"CX,omitempty"` - Cc *string `json:"CC,omitempty"` - Co *string `json:"CO,omitempty"` - Km *string `json:"KM,omitempty"` - Cg *string `json:"CG,omitempty"` - Cd *string `json:"CD,omitempty"` - Ck *string `json:"CK,omitempty"` - Cr *string `json:"CR,omitempty"` - Ci *string `json:"CI,omitempty"` - Hr *string `json:"HR,omitempty"` - Cu *string `json:"CU,omitempty"` - Cy *string `json:"CY,omitempty"` - Cz *string `json:"CZ,omitempty"` - Dk *string `json:"DK,omitempty"` - Dj *string `json:"DJ,omitempty"` - Dm *string `json:"DM,omitempty"` - Do *string `json:"DO,omitempty"` - Ec *string `json:"EC,omitempty"` - Eg *string `json:"EG,omitempty"` - Sv *string `json:"SV,omitempty"` - Gq *string `json:"GQ,omitempty"` - Er *string `json:"ER,omitempty"` - Ee *string `json:"EE,omitempty"` - Et *string `json:"ET,omitempty"` - Fk *string `json:"FK,omitempty"` - Fo *string `json:"FO,omitempty"` - Fj *string `json:"FJ,omitempty"` - Fi *string `json:"FI,omitempty"` - Fr *string `json:"FR,omitempty"` - Gf *string `json:"GF,omitempty"` - Pf *string `json:"PF,omitempty"` - Tf *string `json:"TF,omitempty"` - Ga *string `json:"GA,omitempty"` - Gm *string `json:"GM,omitempty"` - Ge *string `json:"GE,omitempty"` - De *string `json:"DE,omitempty"` - Gh *string `json:"GH,omitempty"` - Gi *string `json:"GI,omitempty"` - Gr *string `json:"GR,omitempty"` - Gl *string `json:"GL,omitempty"` - Gd *string `json:"GD,omitempty"` - Gp *string `json:"GP,omitempty"` - Gu *string `json:"GU,omitempty"` - Gt *string `json:"GT,omitempty"` - Gn *string `json:"GN,omitempty"` - Gw *string `json:"GW,omitempty"` - Gy *string `json:"GY,omitempty"` - Ht *string `json:"HT,omitempty"` - Hm *string `json:"HM,omitempty"` - Va *string `json:"VA,omitempty"` - Hn *string `json:"HN,omitempty"` - Hk *string `json:"HK,omitempty"` - Hu *string `json:"HU,omitempty"` - Is *string `json:"IS,omitempty"` - In *string `json:"IN,omitempty"` - ID *string `json:"ID,omitempty"` - Ir *string `json:"IR,omitempty"` - Iq *string `json:"IQ,omitempty"` - Ie *string `json:"IE,omitempty"` - Il *string `json:"IL,omitempty"` - It *string `json:"IT,omitempty"` - Jm *string `json:"JM,omitempty"` - Jp *string `json:"JP,omitempty"` - Jo *string `json:"JO,omitempty"` - Kz *string `json:"KZ,omitempty"` - Ke *string `json:"KE,omitempty"` - Ki *string `json:"KI,omitempty"` - Kp *string `json:"KP,omitempty"` - Kr *string `json:"KR,omitempty"` - Kw *string `json:"KW,omitempty"` - Kg *string `json:"KG,omitempty"` - La *string `json:"LA,omitempty"` - Lv *string `json:"LV,omitempty"` - Lb *string `json:"LB,omitempty"` - Ls *string `json:"LS,omitempty"` - Lr *string `json:"LR,omitempty"` - Ly *string `json:"LY,omitempty"` - Li *string `json:"LI,omitempty"` - Lt *string `json:"LT,omitempty"` - Lu *string `json:"LU,omitempty"` - Mo *string `json:"MO,omitempty"` - Mg *string `json:"MG,omitempty"` - Mw *string `json:"MW,omitempty"` - My *string `json:"MY,omitempty"` - Mv *string `json:"MV,omitempty"` - Ml *string `json:"ML,omitempty"` - Mt *string `json:"MT,omitempty"` - Mh *string `json:"MH,omitempty"` - Mq *string `json:"MQ,omitempty"` - Mr *string `json:"MR,omitempty"` - Mu *string `json:"MU,omitempty"` - Yt *string `json:"YT,omitempty"` - Mx *string `json:"MX,omitempty"` - Fm *string `json:"FM,omitempty"` - Md *string `json:"MD,omitempty"` - Mc *string `json:"MC,omitempty"` - Mn *string `json:"MN,omitempty"` - Ms *string `json:"MS,omitempty"` - Ma *string `json:"MA,omitempty"` - Mz *string `json:"MZ,omitempty"` - Mm *string `json:"MM,omitempty"` - Na *string `json:"NA,omitempty"` - Nr *string `json:"NR,omitempty"` - Np *string `json:"NP,omitempty"` - Nl *string `json:"NL,omitempty"` - Nc *string `json:"NC,omitempty"` - Nz *string `json:"NZ,omitempty"` - Ni *string `json:"NI,omitempty"` - Ne *string `json:"NE,omitempty"` - Ng *string `json:"NG,omitempty"` - Nu *string `json:"NU,omitempty"` - Nf *string `json:"NF,omitempty"` - Mk *string `json:"MK,omitempty"` - Mp *string `json:"MP,omitempty"` - No *string `json:"NO,omitempty"` - Om *string `json:"OM,omitempty"` - Pk *string `json:"PK,omitempty"` - Pw *string `json:"PW,omitempty"` - Ps *string `json:"PS,omitempty"` - Pa *string `json:"PA,omitempty"` - Pg *string `json:"PG,omitempty"` - Py *string `json:"PY,omitempty"` - Pe *string `json:"PE,omitempty"` - Ph *string `json:"PH,omitempty"` - Pn *string `json:"PN,omitempty"` - Pl *string `json:"PL,omitempty"` - Pt *string `json:"PT,omitempty"` - Pr *string `json:"PR,omitempty"` - Qa *string `json:"QA,omitempty"` - Re *string `json:"RE,omitempty"` - Ro *string `json:"RO,omitempty"` - Ru *string `json:"RU,omitempty"` - Rw *string `json:"RW,omitempty"` - Sh *string `json:"SH,omitempty"` - Kn *string `json:"KN,omitempty"` - Lc *string `json:"LC,omitempty"` - Pm *string `json:"PM,omitempty"` - Vc *string `json:"VC,omitempty"` - Ws *string `json:"WS,omitempty"` - Sm *string `json:"SM,omitempty"` - St *string `json:"ST,omitempty"` - Sa *string `json:"SA,omitempty"` - Sn *string `json:"SN,omitempty"` - Sc *string `json:"SC,omitempty"` - Sl *string `json:"SL,omitempty"` - Sg *string `json:"SG,omitempty"` - Sk *string `json:"SK,omitempty"` - Si *string `json:"SI,omitempty"` - Sb *string `json:"SB,omitempty"` - So *string `json:"SO,omitempty"` - Za *string `json:"ZA,omitempty"` - Gs *string `json:"GS,omitempty"` - Es *string `json:"ES,omitempty"` - Lk *string `json:"LK,omitempty"` - Sd *string `json:"SD,omitempty"` - Sr *string `json:"SR,omitempty"` - Sj *string `json:"SJ,omitempty"` - Sz *string `json:"SZ,omitempty"` - Se *string `json:"SE,omitempty"` - Ch *string `json:"CH,omitempty"` - Sy *string `json:"SY,omitempty"` - Tw *string `json:"TW,omitempty"` - Tj *string `json:"TJ,omitempty"` - Tz *string `json:"TZ,omitempty"` - Th *string `json:"TH,omitempty"` - Tl *string `json:"TL,omitempty"` - Tg *string `json:"TG,omitempty"` - Tk *string `json:"TK,omitempty"` - To *string `json:"TO,omitempty"` - Tt *string `json:"TT,omitempty"` - Tn *string `json:"TN,omitempty"` - Tr *string `json:"TR,omitempty"` - Tm *string `json:"TM,omitempty"` - Tc *string `json:"TC,omitempty"` - Tv *string `json:"TV,omitempty"` - Ug *string `json:"UG,omitempty"` - Ua *string `json:"UA,omitempty"` - Ae *string `json:"AE,omitempty"` - Gb *string `json:"GB,omitempty"` - Us *string `json:"US,omitempty"` - Um *string `json:"UM,omitempty"` - Uy *string `json:"UY,omitempty"` - Uz *string `json:"UZ,omitempty"` - Vu *string `json:"VU,omitempty"` - Ve *string `json:"VE,omitempty"` - Vn *string `json:"VN,omitempty"` - Vg *string `json:"VG,omitempty"` - Vi *string `json:"VI,omitempty"` - Wf *string `json:"WF,omitempty"` - Eh *string `json:"EH,omitempty"` - Ye *string `json:"YE,omitempty"` - Zm *string `json:"ZM,omitempty"` - Zw *string `json:"ZW,omitempty"` - Ax *string `json:"AX,omitempty"` - Bq *string `json:"BQ,omitempty"` - Cw *string `json:"CW,omitempty"` - Gg *string `json:"GG,omitempty"` - Im *string `json:"IM,omitempty"` - Je *string `json:"JE,omitempty"` - Me *string `json:"ME,omitempty"` - Bl *string `json:"BL,omitempty"` - Mf *string `json:"MF,omitempty"` - Rs *string `json:"RS,omitempty"` - Sx *string `json:"SX,omitempty"` - Ss *string `json:"SS,omitempty"` - Xk *string `json:"XK,omitempty"` -} - -func (o *Geo) GetAf() *string { - if o == nil { - return nil - } - return o.Af -} - -func (o *Geo) GetAl() *string { - if o == nil { - return nil - } - return o.Al -} - -func (o *Geo) GetDz() *string { - if o == nil { - return nil - } - return o.Dz -} - -func (o *Geo) GetAs() *string { - if o == nil { - return nil - } - return o.As -} - -func (o *Geo) GetAd() *string { - if o == nil { - return nil - } - return o.Ad -} - -func (o *Geo) GetAo() *string { - if o == nil { - return nil - } - return o.Ao -} - -func (o *Geo) GetAi() *string { - if o == nil { - return nil - } - return o.Ai -} - -func (o *Geo) GetAq() *string { - if o == nil { - return nil - } - return o.Aq -} - -func (o *Geo) GetAg() *string { - if o == nil { - return nil - } - return o.Ag -} - -func (o *Geo) GetAr() *string { - if o == nil { - return nil - } - return o.Ar -} - -func (o *Geo) GetAm() *string { - if o == nil { - return nil - } - return o.Am -} - -func (o *Geo) GetAw() *string { - if o == nil { - return nil - } - return o.Aw -} - -func (o *Geo) GetAu() *string { - if o == nil { - return nil - } - return o.Au -} - -func (o *Geo) GetAt() *string { - if o == nil { - return nil - } - return o.At -} - -func (o *Geo) GetAz() *string { - if o == nil { - return nil - } - return o.Az -} - -func (o *Geo) GetBs() *string { - if o == nil { - return nil - } - return o.Bs -} - -func (o *Geo) GetBh() *string { - if o == nil { - return nil - } - return o.Bh -} - -func (o *Geo) GetBd() *string { - if o == nil { - return nil - } - return o.Bd -} - -func (o *Geo) GetBb() *string { - if o == nil { - return nil - } - return o.Bb -} - -func (o *Geo) GetBy() *string { - if o == nil { - return nil - } - return o.By -} - -func (o *Geo) GetBe() *string { - if o == nil { - return nil - } - return o.Be -} - -func (o *Geo) GetBz() *string { - if o == nil { - return nil - } - return o.Bz -} - -func (o *Geo) GetBj() *string { - if o == nil { - return nil - } - return o.Bj -} - -func (o *Geo) GetBm() *string { - if o == nil { - return nil - } - return o.Bm -} - -func (o *Geo) GetBt() *string { - if o == nil { - return nil - } - return o.Bt -} - -func (o *Geo) GetBo() *string { - if o == nil { - return nil - } - return o.Bo -} - -func (o *Geo) GetBa() *string { - if o == nil { - return nil - } - return o.Ba -} - -func (o *Geo) GetBw() *string { - if o == nil { - return nil - } - return o.Bw -} - -func (o *Geo) GetBv() *string { - if o == nil { - return nil - } - return o.Bv -} - -func (o *Geo) GetBr() *string { - if o == nil { - return nil - } - return o.Br -} - -func (o *Geo) GetIo() *string { - if o == nil { - return nil - } - return o.Io -} - -func (o *Geo) GetBn() *string { - if o == nil { - return nil - } - return o.Bn +// TrackLeadResponseBody - A lead was tracked. +type TrackLeadResponseBody struct { + Click Click `json:"click"` + Customer Customer `json:"customer"` } -func (o *Geo) GetBg() *string { +func (o *TrackLeadResponseBody) GetClick() Click { if o == nil { - return nil + return Click{} } - return o.Bg + return o.Click } -func (o *Geo) GetBf() *string { +func (o *TrackLeadResponseBody) GetCustomer() Customer { if o == nil { - return nil - } - return o.Bf -} - -func (o *Geo) GetBi() *string { - if o == nil { - return nil - } - return o.Bi -} - -func (o *Geo) GetKh() *string { - if o == nil { - return nil - } - return o.Kh -} - -func (o *Geo) GetCm() *string { - if o == nil { - return nil - } - return o.Cm -} - -func (o *Geo) GetCa() *string { - if o == nil { - return nil - } - return o.Ca -} - -func (o *Geo) GetCv() *string { - if o == nil { - return nil - } - return o.Cv -} - -func (o *Geo) GetKy() *string { - if o == nil { - return nil - } - return o.Ky -} - -func (o *Geo) GetCf() *string { - if o == nil { - return nil - } - return o.Cf -} - -func (o *Geo) GetTd() *string { - if o == nil { - return nil - } - return o.Td -} - -func (o *Geo) GetCl() *string { - if o == nil { - return nil - } - return o.Cl -} - -func (o *Geo) GetCn() *string { - if o == nil { - return nil - } - return o.Cn -} - -func (o *Geo) GetCx() *string { - if o == nil { - return nil - } - return o.Cx -} - -func (o *Geo) GetCc() *string { - if o == nil { - return nil - } - return o.Cc -} - -func (o *Geo) GetCo() *string { - if o == nil { - return nil - } - return o.Co -} - -func (o *Geo) GetKm() *string { - if o == nil { - return nil - } - return o.Km -} - -func (o *Geo) GetCg() *string { - if o == nil { - return nil - } - return o.Cg -} - -func (o *Geo) GetCd() *string { - if o == nil { - return nil - } - return o.Cd -} - -func (o *Geo) GetCk() *string { - if o == nil { - return nil - } - return o.Ck -} - -func (o *Geo) GetCr() *string { - if o == nil { - return nil - } - return o.Cr -} - -func (o *Geo) GetCi() *string { - if o == nil { - return nil - } - return o.Ci -} - -func (o *Geo) GetHr() *string { - if o == nil { - return nil - } - return o.Hr -} - -func (o *Geo) GetCu() *string { - if o == nil { - return nil - } - return o.Cu -} - -func (o *Geo) GetCy() *string { - if o == nil { - return nil - } - return o.Cy -} - -func (o *Geo) GetCz() *string { - if o == nil { - return nil - } - return o.Cz -} - -func (o *Geo) GetDk() *string { - if o == nil { - return nil - } - return o.Dk -} - -func (o *Geo) GetDj() *string { - if o == nil { - return nil - } - return o.Dj -} - -func (o *Geo) GetDm() *string { - if o == nil { - return nil - } - return o.Dm -} - -func (o *Geo) GetDo() *string { - if o == nil { - return nil - } - return o.Do -} - -func (o *Geo) GetEc() *string { - if o == nil { - return nil - } - return o.Ec -} - -func (o *Geo) GetEg() *string { - if o == nil { - return nil - } - return o.Eg -} - -func (o *Geo) GetSv() *string { - if o == nil { - return nil - } - return o.Sv -} - -func (o *Geo) GetGq() *string { - if o == nil { - return nil - } - return o.Gq -} - -func (o *Geo) GetEr() *string { - if o == nil { - return nil - } - return o.Er -} - -func (o *Geo) GetEe() *string { - if o == nil { - return nil - } - return o.Ee -} - -func (o *Geo) GetEt() *string { - if o == nil { - return nil - } - return o.Et -} - -func (o *Geo) GetFk() *string { - if o == nil { - return nil - } - return o.Fk -} - -func (o *Geo) GetFo() *string { - if o == nil { - return nil - } - return o.Fo -} - -func (o *Geo) GetFj() *string { - if o == nil { - return nil - } - return o.Fj -} - -func (o *Geo) GetFi() *string { - if o == nil { - return nil - } - return o.Fi -} - -func (o *Geo) GetFr() *string { - if o == nil { - return nil - } - return o.Fr -} - -func (o *Geo) GetGf() *string { - if o == nil { - return nil - } - return o.Gf -} - -func (o *Geo) GetPf() *string { - if o == nil { - return nil - } - return o.Pf -} - -func (o *Geo) GetTf() *string { - if o == nil { - return nil - } - return o.Tf -} - -func (o *Geo) GetGa() *string { - if o == nil { - return nil - } - return o.Ga -} - -func (o *Geo) GetGm() *string { - if o == nil { - return nil - } - return o.Gm -} - -func (o *Geo) GetGe() *string { - if o == nil { - return nil - } - return o.Ge -} - -func (o *Geo) GetDe() *string { - if o == nil { - return nil - } - return o.De -} - -func (o *Geo) GetGh() *string { - if o == nil { - return nil - } - return o.Gh -} - -func (o *Geo) GetGi() *string { - if o == nil { - return nil - } - return o.Gi -} - -func (o *Geo) GetGr() *string { - if o == nil { - return nil - } - return o.Gr -} - -func (o *Geo) GetGl() *string { - if o == nil { - return nil - } - return o.Gl -} - -func (o *Geo) GetGd() *string { - if o == nil { - return nil - } - return o.Gd -} - -func (o *Geo) GetGp() *string { - if o == nil { - return nil - } - return o.Gp -} - -func (o *Geo) GetGu() *string { - if o == nil { - return nil - } - return o.Gu -} - -func (o *Geo) GetGt() *string { - if o == nil { - return nil - } - return o.Gt -} - -func (o *Geo) GetGn() *string { - if o == nil { - return nil - } - return o.Gn -} - -func (o *Geo) GetGw() *string { - if o == nil { - return nil - } - return o.Gw -} - -func (o *Geo) GetGy() *string { - if o == nil { - return nil - } - return o.Gy -} - -func (o *Geo) GetHt() *string { - if o == nil { - return nil - } - return o.Ht -} - -func (o *Geo) GetHm() *string { - if o == nil { - return nil - } - return o.Hm -} - -func (o *Geo) GetVa() *string { - if o == nil { - return nil - } - return o.Va -} - -func (o *Geo) GetHn() *string { - if o == nil { - return nil - } - return o.Hn -} - -func (o *Geo) GetHk() *string { - if o == nil { - return nil - } - return o.Hk -} - -func (o *Geo) GetHu() *string { - if o == nil { - return nil - } - return o.Hu -} - -func (o *Geo) GetIs() *string { - if o == nil { - return nil - } - return o.Is -} - -func (o *Geo) GetIn() *string { - if o == nil { - return nil - } - return o.In -} - -func (o *Geo) GetID() *string { - if o == nil { - return nil - } - return o.ID -} - -func (o *Geo) GetIr() *string { - if o == nil { - return nil - } - return o.Ir -} - -func (o *Geo) GetIq() *string { - if o == nil { - return nil - } - return o.Iq -} - -func (o *Geo) GetIe() *string { - if o == nil { - return nil - } - return o.Ie -} - -func (o *Geo) GetIl() *string { - if o == nil { - return nil - } - return o.Il -} - -func (o *Geo) GetIt() *string { - if o == nil { - return nil - } - return o.It -} - -func (o *Geo) GetJm() *string { - if o == nil { - return nil - } - return o.Jm -} - -func (o *Geo) GetJp() *string { - if o == nil { - return nil - } - return o.Jp -} - -func (o *Geo) GetJo() *string { - if o == nil { - return nil - } - return o.Jo -} - -func (o *Geo) GetKz() *string { - if o == nil { - return nil - } - return o.Kz -} - -func (o *Geo) GetKe() *string { - if o == nil { - return nil - } - return o.Ke -} - -func (o *Geo) GetKi() *string { - if o == nil { - return nil - } - return o.Ki -} - -func (o *Geo) GetKp() *string { - if o == nil { - return nil - } - return o.Kp -} - -func (o *Geo) GetKr() *string { - if o == nil { - return nil - } - return o.Kr -} - -func (o *Geo) GetKw() *string { - if o == nil { - return nil - } - return o.Kw -} - -func (o *Geo) GetKg() *string { - if o == nil { - return nil - } - return o.Kg -} - -func (o *Geo) GetLa() *string { - if o == nil { - return nil - } - return o.La -} - -func (o *Geo) GetLv() *string { - if o == nil { - return nil - } - return o.Lv -} - -func (o *Geo) GetLb() *string { - if o == nil { - return nil - } - return o.Lb -} - -func (o *Geo) GetLs() *string { - if o == nil { - return nil - } - return o.Ls -} - -func (o *Geo) GetLr() *string { - if o == nil { - return nil - } - return o.Lr -} - -func (o *Geo) GetLy() *string { - if o == nil { - return nil - } - return o.Ly -} - -func (o *Geo) GetLi() *string { - if o == nil { - return nil - } - return o.Li -} - -func (o *Geo) GetLt() *string { - if o == nil { - return nil - } - return o.Lt -} - -func (o *Geo) GetLu() *string { - if o == nil { - return nil - } - return o.Lu -} - -func (o *Geo) GetMo() *string { - if o == nil { - return nil - } - return o.Mo -} - -func (o *Geo) GetMg() *string { - if o == nil { - return nil - } - return o.Mg -} - -func (o *Geo) GetMw() *string { - if o == nil { - return nil - } - return o.Mw -} - -func (o *Geo) GetMy() *string { - if o == nil { - return nil - } - return o.My -} - -func (o *Geo) GetMv() *string { - if o == nil { - return nil - } - return o.Mv -} - -func (o *Geo) GetMl() *string { - if o == nil { - return nil - } - return o.Ml -} - -func (o *Geo) GetMt() *string { - if o == nil { - return nil - } - return o.Mt -} - -func (o *Geo) GetMh() *string { - if o == nil { - return nil - } - return o.Mh -} - -func (o *Geo) GetMq() *string { - if o == nil { - return nil - } - return o.Mq -} - -func (o *Geo) GetMr() *string { - if o == nil { - return nil - } - return o.Mr -} - -func (o *Geo) GetMu() *string { - if o == nil { - return nil - } - return o.Mu -} - -func (o *Geo) GetYt() *string { - if o == nil { - return nil - } - return o.Yt -} - -func (o *Geo) GetMx() *string { - if o == nil { - return nil - } - return o.Mx -} - -func (o *Geo) GetFm() *string { - if o == nil { - return nil - } - return o.Fm -} - -func (o *Geo) GetMd() *string { - if o == nil { - return nil - } - return o.Md -} - -func (o *Geo) GetMc() *string { - if o == nil { - return nil - } - return o.Mc -} - -func (o *Geo) GetMn() *string { - if o == nil { - return nil - } - return o.Mn -} - -func (o *Geo) GetMs() *string { - if o == nil { - return nil - } - return o.Ms -} - -func (o *Geo) GetMa() *string { - if o == nil { - return nil - } - return o.Ma -} - -func (o *Geo) GetMz() *string { - if o == nil { - return nil - } - return o.Mz -} - -func (o *Geo) GetMm() *string { - if o == nil { - return nil - } - return o.Mm -} - -func (o *Geo) GetNa() *string { - if o == nil { - return nil - } - return o.Na -} - -func (o *Geo) GetNr() *string { - if o == nil { - return nil - } - return o.Nr -} - -func (o *Geo) GetNp() *string { - if o == nil { - return nil - } - return o.Np -} - -func (o *Geo) GetNl() *string { - if o == nil { - return nil - } - return o.Nl -} - -func (o *Geo) GetNc() *string { - if o == nil { - return nil - } - return o.Nc -} - -func (o *Geo) GetNz() *string { - if o == nil { - return nil - } - return o.Nz -} - -func (o *Geo) GetNi() *string { - if o == nil { - return nil - } - return o.Ni -} - -func (o *Geo) GetNe() *string { - if o == nil { - return nil - } - return o.Ne -} - -func (o *Geo) GetNg() *string { - if o == nil { - return nil - } - return o.Ng -} - -func (o *Geo) GetNu() *string { - if o == nil { - return nil - } - return o.Nu -} - -func (o *Geo) GetNf() *string { - if o == nil { - return nil - } - return o.Nf -} - -func (o *Geo) GetMk() *string { - if o == nil { - return nil - } - return o.Mk -} - -func (o *Geo) GetMp() *string { - if o == nil { - return nil - } - return o.Mp -} - -func (o *Geo) GetNo() *string { - if o == nil { - return nil - } - return o.No -} - -func (o *Geo) GetOm() *string { - if o == nil { - return nil - } - return o.Om -} - -func (o *Geo) GetPk() *string { - if o == nil { - return nil - } - return o.Pk -} - -func (o *Geo) GetPw() *string { - if o == nil { - return nil - } - return o.Pw -} - -func (o *Geo) GetPs() *string { - if o == nil { - return nil - } - return o.Ps -} - -func (o *Geo) GetPa() *string { - if o == nil { - return nil - } - return o.Pa -} - -func (o *Geo) GetPg() *string { - if o == nil { - return nil - } - return o.Pg -} - -func (o *Geo) GetPy() *string { - if o == nil { - return nil - } - return o.Py -} - -func (o *Geo) GetPe() *string { - if o == nil { - return nil - } - return o.Pe -} - -func (o *Geo) GetPh() *string { - if o == nil { - return nil - } - return o.Ph -} - -func (o *Geo) GetPn() *string { - if o == nil { - return nil - } - return o.Pn -} - -func (o *Geo) GetPl() *string { - if o == nil { - return nil - } - return o.Pl -} - -func (o *Geo) GetPt() *string { - if o == nil { - return nil - } - return o.Pt -} - -func (o *Geo) GetPr() *string { - if o == nil { - return nil - } - return o.Pr -} - -func (o *Geo) GetQa() *string { - if o == nil { - return nil - } - return o.Qa -} - -func (o *Geo) GetRe() *string { - if o == nil { - return nil - } - return o.Re -} - -func (o *Geo) GetRo() *string { - if o == nil { - return nil - } - return o.Ro -} - -func (o *Geo) GetRu() *string { - if o == nil { - return nil - } - return o.Ru -} - -func (o *Geo) GetRw() *string { - if o == nil { - return nil - } - return o.Rw -} - -func (o *Geo) GetSh() *string { - if o == nil { - return nil - } - return o.Sh -} - -func (o *Geo) GetKn() *string { - if o == nil { - return nil - } - return o.Kn -} - -func (o *Geo) GetLc() *string { - if o == nil { - return nil - } - return o.Lc -} - -func (o *Geo) GetPm() *string { - if o == nil { - return nil - } - return o.Pm -} - -func (o *Geo) GetVc() *string { - if o == nil { - return nil - } - return o.Vc -} - -func (o *Geo) GetWs() *string { - if o == nil { - return nil - } - return o.Ws -} - -func (o *Geo) GetSm() *string { - if o == nil { - return nil - } - return o.Sm -} - -func (o *Geo) GetSt() *string { - if o == nil { - return nil - } - return o.St -} - -func (o *Geo) GetSa() *string { - if o == nil { - return nil - } - return o.Sa -} - -func (o *Geo) GetSn() *string { - if o == nil { - return nil - } - return o.Sn -} - -func (o *Geo) GetSc() *string { - if o == nil { - return nil - } - return o.Sc -} - -func (o *Geo) GetSl() *string { - if o == nil { - return nil - } - return o.Sl -} - -func (o *Geo) GetSg() *string { - if o == nil { - return nil - } - return o.Sg -} - -func (o *Geo) GetSk() *string { - if o == nil { - return nil - } - return o.Sk -} - -func (o *Geo) GetSi() *string { - if o == nil { - return nil - } - return o.Si -} - -func (o *Geo) GetSb() *string { - if o == nil { - return nil - } - return o.Sb -} - -func (o *Geo) GetSo() *string { - if o == nil { - return nil - } - return o.So -} - -func (o *Geo) GetZa() *string { - if o == nil { - return nil - } - return o.Za -} - -func (o *Geo) GetGs() *string { - if o == nil { - return nil - } - return o.Gs -} - -func (o *Geo) GetEs() *string { - if o == nil { - return nil - } - return o.Es -} - -func (o *Geo) GetLk() *string { - if o == nil { - return nil - } - return o.Lk -} - -func (o *Geo) GetSd() *string { - if o == nil { - return nil - } - return o.Sd -} - -func (o *Geo) GetSr() *string { - if o == nil { - return nil - } - return o.Sr -} - -func (o *Geo) GetSj() *string { - if o == nil { - return nil - } - return o.Sj -} - -func (o *Geo) GetSz() *string { - if o == nil { - return nil - } - return o.Sz -} - -func (o *Geo) GetSe() *string { - if o == nil { - return nil - } - return o.Se -} - -func (o *Geo) GetCh() *string { - if o == nil { - return nil - } - return o.Ch -} - -func (o *Geo) GetSy() *string { - if o == nil { - return nil - } - return o.Sy -} - -func (o *Geo) GetTw() *string { - if o == nil { - return nil - } - return o.Tw -} - -func (o *Geo) GetTj() *string { - if o == nil { - return nil - } - return o.Tj -} - -func (o *Geo) GetTz() *string { - if o == nil { - return nil - } - return o.Tz -} - -func (o *Geo) GetTh() *string { - if o == nil { - return nil - } - return o.Th -} - -func (o *Geo) GetTl() *string { - if o == nil { - return nil - } - return o.Tl -} - -func (o *Geo) GetTg() *string { - if o == nil { - return nil - } - return o.Tg -} - -func (o *Geo) GetTk() *string { - if o == nil { - return nil - } - return o.Tk -} - -func (o *Geo) GetTo() *string { - if o == nil { - return nil - } - return o.To -} - -func (o *Geo) GetTt() *string { - if o == nil { - return nil - } - return o.Tt -} - -func (o *Geo) GetTn() *string { - if o == nil { - return nil - } - return o.Tn -} - -func (o *Geo) GetTr() *string { - if o == nil { - return nil - } - return o.Tr -} - -func (o *Geo) GetTm() *string { - if o == nil { - return nil - } - return o.Tm -} - -func (o *Geo) GetTc() *string { - if o == nil { - return nil - } - return o.Tc -} - -func (o *Geo) GetTv() *string { - if o == nil { - return nil - } - return o.Tv -} - -func (o *Geo) GetUg() *string { - if o == nil { - return nil - } - return o.Ug -} - -func (o *Geo) GetUa() *string { - if o == nil { - return nil - } - return o.Ua -} - -func (o *Geo) GetAe() *string { - if o == nil { - return nil - } - return o.Ae -} - -func (o *Geo) GetGb() *string { - if o == nil { - return nil - } - return o.Gb -} - -func (o *Geo) GetUs() *string { - if o == nil { - return nil - } - return o.Us -} - -func (o *Geo) GetUm() *string { - if o == nil { - return nil - } - return o.Um -} - -func (o *Geo) GetUy() *string { - if o == nil { - return nil - } - return o.Uy -} - -func (o *Geo) GetUz() *string { - if o == nil { - return nil - } - return o.Uz -} - -func (o *Geo) GetVu() *string { - if o == nil { - return nil - } - return o.Vu -} - -func (o *Geo) GetVe() *string { - if o == nil { - return nil - } - return o.Ve -} - -func (o *Geo) GetVn() *string { - if o == nil { - return nil - } - return o.Vn -} - -func (o *Geo) GetVg() *string { - if o == nil { - return nil - } - return o.Vg -} - -func (o *Geo) GetVi() *string { - if o == nil { - return nil - } - return o.Vi -} - -func (o *Geo) GetWf() *string { - if o == nil { - return nil - } - return o.Wf -} - -func (o *Geo) GetEh() *string { - if o == nil { - return nil - } - return o.Eh -} - -func (o *Geo) GetYe() *string { - if o == nil { - return nil - } - return o.Ye -} - -func (o *Geo) GetZm() *string { - if o == nil { - return nil - } - return o.Zm -} - -func (o *Geo) GetZw() *string { - if o == nil { - return nil - } - return o.Zw -} - -func (o *Geo) GetAx() *string { - if o == nil { - return nil - } - return o.Ax -} - -func (o *Geo) GetBq() *string { - if o == nil { - return nil - } - return o.Bq -} - -func (o *Geo) GetCw() *string { - if o == nil { - return nil - } - return o.Cw -} - -func (o *Geo) GetGg() *string { - if o == nil { - return nil - } - return o.Gg -} - -func (o *Geo) GetIm() *string { - if o == nil { - return nil - } - return o.Im -} - -func (o *Geo) GetJe() *string { - if o == nil { - return nil - } - return o.Je -} - -func (o *Geo) GetMe() *string { - if o == nil { - return nil - } - return o.Me -} - -func (o *Geo) GetBl() *string { - if o == nil { - return nil - } - return o.Bl -} - -func (o *Geo) GetMf() *string { - if o == nil { - return nil - } - return o.Mf -} - -func (o *Geo) GetRs() *string { - if o == nil { - return nil - } - return o.Rs -} - -func (o *Geo) GetSx() *string { - if o == nil { - return nil - } - return o.Sx -} - -func (o *Geo) GetSs() *string { - if o == nil { - return nil - } - return o.Ss -} - -func (o *Geo) GetXk() *string { - if o == nil { - return nil - } - return o.Xk -} - -type Link struct { - // The unique ID of the short link. - ID string `json:"id"` - // The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). - Domain string `json:"domain"` - // The short link slug. If not provided, a random 7-character slug will be generated. - Key string `json:"key"` - // This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. - ExternalID *string `json:"externalId"` - // The destination URL of the short link. - URL string `json:"url"` - // [BETA] Whether to track conversions for the short link. - TrackConversion *bool `default:"false" json:"trackConversion"` - // Whether the short link is archived. - Archived *bool `default:"false" json:"archived"` - // The date and time when the short link will expire in ISO-8601 format. - ExpiresAt *string `json:"expiresAt"` - // The URL to redirect to when the short link has expired. - ExpiredURL *string `json:"expiredUrl"` - // The password required to access the destination URL of the short link. - Password *string `json:"password"` - // Whether the short link uses Custom Social Media Cards feature. - Proxy *bool `default:"false" json:"proxy"` - // The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. - Title *string `json:"title"` - // The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. - Description *string `json:"description"` - // The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. - Image *string `json:"image"` - // The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og - Video *string `json:"video"` - // Whether the short link uses link cloaking. - Rewrite *bool `default:"false" json:"rewrite"` - // Whether to allow search engines to index the short link. - DoIndex *bool `default:"false" json:"doIndex"` - // The iOS destination URL for the short link for iOS device targeting. - Ios *string `json:"ios"` - // The Android destination URL for the short link for Android device targeting. - Android *string `json:"android"` - // Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo - Geo *Geo `json:"geo"` - // Whether the short link's stats are publicly accessible. - PublicStats *bool `default:"false" json:"publicStats"` - // The comments for the short link. - Comments *string `json:"comments"` - // The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). - ShortLink string `json:"shortLink"` - // The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). - QrCode string `json:"qrCode"` - // The UTM source of the short link. - UtmSource *string `json:"utm_source"` - // The UTM medium of the short link. - UtmMedium *string `json:"utm_medium"` - // The UTM campaign of the short link. - UtmCampaign *string `json:"utm_campaign"` - // The UTM term of the short link. - UtmTerm *string `json:"utm_term"` - // The UTM content of the short link. - UtmContent *string `json:"utm_content"` - // The user ID of the creator of the short link. - UserID string `json:"userId"` - // The workspace ID of the short link. - WorkspaceID string `json:"workspaceId"` - // The number of clicks on the short link. - Clicks *float64 `default:"0" json:"clicks"` - // The date and time when the short link was last clicked. - LastClicked *string `json:"lastClicked"` - // [BETA]: The number of leads the short links has generated. - Leads *float64 `default:"0" json:"leads"` - // [BETA]: The number of sales the short links has generated. - Sales *float64 `default:"0" json:"sales"` - // [BETA]: The total dollar amount of sales the short links has generated (in cents). - SaleAmount *float64 `default:"0" json:"saleAmount"` - // The date and time when the short link was created. - CreatedAt string `json:"createdAt"` - // The date and time when the short link was last updated. - UpdatedAt string `json:"updatedAt"` -} - -func (l Link) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(l, "", false) -} - -func (l *Link) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil { - return err - } - return nil -} - -func (o *Link) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *Link) GetDomain() string { - if o == nil { - return "" - } - return o.Domain -} - -func (o *Link) GetKey() string { - if o == nil { - return "" - } - return o.Key -} - -func (o *Link) GetExternalID() *string { - if o == nil { - return nil - } - return o.ExternalID -} - -func (o *Link) GetURL() string { - if o == nil { - return "" - } - return o.URL -} - -func (o *Link) GetTrackConversion() *bool { - if o == nil { - return nil - } - return o.TrackConversion -} - -func (o *Link) GetArchived() *bool { - if o == nil { - return nil - } - return o.Archived -} - -func (o *Link) GetExpiresAt() *string { - if o == nil { - return nil - } - return o.ExpiresAt -} - -func (o *Link) GetExpiredURL() *string { - if o == nil { - return nil - } - return o.ExpiredURL -} - -func (o *Link) GetPassword() *string { - if o == nil { - return nil - } - return o.Password -} - -func (o *Link) GetProxy() *bool { - if o == nil { - return nil - } - return o.Proxy -} - -func (o *Link) GetTitle() *string { - if o == nil { - return nil - } - return o.Title -} - -func (o *Link) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -func (o *Link) GetImage() *string { - if o == nil { - return nil - } - return o.Image -} - -func (o *Link) GetVideo() *string { - if o == nil { - return nil - } - return o.Video -} - -func (o *Link) GetRewrite() *bool { - if o == nil { - return nil - } - return o.Rewrite -} - -func (o *Link) GetDoIndex() *bool { - if o == nil { - return nil - } - return o.DoIndex -} - -func (o *Link) GetIos() *string { - if o == nil { - return nil - } - return o.Ios -} - -func (o *Link) GetAndroid() *string { - if o == nil { - return nil - } - return o.Android -} - -func (o *Link) GetGeo() *Geo { - if o == nil { - return nil - } - return o.Geo -} - -func (o *Link) GetPublicStats() *bool { - if o == nil { - return nil - } - return o.PublicStats -} - -func (o *Link) GetComments() *string { - if o == nil { - return nil - } - return o.Comments -} - -func (o *Link) GetShortLink() string { - if o == nil { - return "" - } - return o.ShortLink -} - -func (o *Link) GetQrCode() string { - if o == nil { - return "" - } - return o.QrCode -} - -func (o *Link) GetUtmSource() *string { - if o == nil { - return nil - } - return o.UtmSource -} - -func (o *Link) GetUtmMedium() *string { - if o == nil { - return nil - } - return o.UtmMedium -} - -func (o *Link) GetUtmCampaign() *string { - if o == nil { - return nil - } - return o.UtmCampaign -} - -func (o *Link) GetUtmTerm() *string { - if o == nil { - return nil - } - return o.UtmTerm -} - -func (o *Link) GetUtmContent() *string { - if o == nil { - return nil - } - return o.UtmContent -} - -func (o *Link) GetUserID() string { - if o == nil { - return "" - } - return o.UserID -} - -func (o *Link) GetWorkspaceID() string { - if o == nil { - return "" - } - return o.WorkspaceID -} - -func (o *Link) GetClicks() *float64 { - if o == nil { - return nil - } - return o.Clicks -} - -func (o *Link) GetLastClicked() *string { - if o == nil { - return nil - } - return o.LastClicked -} - -func (o *Link) GetLeads() *float64 { - if o == nil { - return nil - } - return o.Leads -} - -func (o *Link) GetSales() *float64 { - if o == nil { - return nil - } - return o.Sales -} - -func (o *Link) GetSaleAmount() *float64 { - if o == nil { - return nil - } - return o.SaleAmount -} - -func (o *Link) GetCreatedAt() string { - if o == nil { - return "" - } - return o.CreatedAt -} - -func (o *Link) GetUpdatedAt() string { - if o == nil { - return "" - } - return o.UpdatedAt -} - -// TrackLeadResponseBody - A lead was tracked. -type TrackLeadResponseBody struct { - EventName string `json:"eventName"` - Customer Customer `json:"customer"` - Click Click `json:"click"` - Link Link `json:"link"` -} - -func (o *TrackLeadResponseBody) GetEventName() string { - if o == nil { - return "" - } - return o.EventName -} - -func (o *TrackLeadResponseBody) GetCustomer() Customer { - if o == nil { - return Customer{} + return Customer{} } return o.Customer } - -func (o *TrackLeadResponseBody) GetClick() Click { - if o == nil { - return Click{} - } - return o.Click -} - -func (o *TrackLeadResponseBody) GetLink() Link { - if o == nil { - return Link{} - } - return o.Link -} diff --git a/models/operations/tracksale.go b/models/operations/tracksale.go index 213c6eb..62886a3 100644 --- a/models/operations/tracksale.go +++ b/models/operations/tracksale.go @@ -151,10 +151,11 @@ func (o *TrackSaleCustomer) GetAvatar() *string { } type Sale struct { - Amount float64 `json:"amount"` - PaymentProcessor string `json:"paymentProcessor"` - InvoiceID *string `json:"invoiceId"` - Currency string `json:"currency"` + Amount float64 `json:"amount"` + Currency string `json:"currency"` + PaymentProcessor string `json:"paymentProcessor"` + InvoiceID *string `json:"invoiceId"` + Metadata map[string]any `json:"metadata"` } func (o *Sale) GetAmount() float64 { @@ -164,2492 +165,32 @@ func (o *Sale) GetAmount() float64 { return o.Amount } -func (o *Sale) GetPaymentProcessor() string { - if o == nil { - return "" - } - return o.PaymentProcessor -} - -func (o *Sale) GetInvoiceID() *string { - if o == nil { - return nil - } - return o.InvoiceID -} - -func (o *Sale) GetCurrency() string { - if o == nil { - return "" - } - return o.Currency -} - -type TrackSaleClick struct { - URL string `json:"url"` - IP string `json:"ip"` - Continent string `json:"continent"` - Country string `json:"country"` - City string `json:"city"` - Device string `json:"device"` - Browser string `json:"browser"` - Os string `json:"os"` - Ua string `json:"ua"` - Bot bool `json:"bot"` - Qr bool `json:"qr"` - Referer string `json:"referer"` - ID string `json:"id"` -} - -func (o *TrackSaleClick) GetURL() string { - if o == nil { - return "" - } - return o.URL -} - -func (o *TrackSaleClick) GetIP() string { - if o == nil { - return "" - } - return o.IP -} - -func (o *TrackSaleClick) GetContinent() string { - if o == nil { - return "" - } - return o.Continent -} - -func (o *TrackSaleClick) GetCountry() string { - if o == nil { - return "" - } - return o.Country -} - -func (o *TrackSaleClick) GetCity() string { - if o == nil { - return "" - } - return o.City -} - -func (o *TrackSaleClick) GetDevice() string { - if o == nil { - return "" - } - return o.Device -} - -func (o *TrackSaleClick) GetBrowser() string { - if o == nil { - return "" - } - return o.Browser -} - -func (o *TrackSaleClick) GetOs() string { - if o == nil { - return "" - } - return o.Os -} - -func (o *TrackSaleClick) GetUa() string { - if o == nil { - return "" - } - return o.Ua -} - -func (o *TrackSaleClick) GetBot() bool { - if o == nil { - return false - } - return o.Bot -} - -func (o *TrackSaleClick) GetQr() bool { - if o == nil { - return false - } - return o.Qr -} - -func (o *TrackSaleClick) GetReferer() string { - if o == nil { - return "" - } - return o.Referer -} - -func (o *TrackSaleClick) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -// TrackSaleGeo - Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo -type TrackSaleGeo struct { - Af *string `json:"AF,omitempty"` - Al *string `json:"AL,omitempty"` - Dz *string `json:"DZ,omitempty"` - As *string `json:"AS,omitempty"` - Ad *string `json:"AD,omitempty"` - Ao *string `json:"AO,omitempty"` - Ai *string `json:"AI,omitempty"` - Aq *string `json:"AQ,omitempty"` - Ag *string `json:"AG,omitempty"` - Ar *string `json:"AR,omitempty"` - Am *string `json:"AM,omitempty"` - Aw *string `json:"AW,omitempty"` - Au *string `json:"AU,omitempty"` - At *string `json:"AT,omitempty"` - Az *string `json:"AZ,omitempty"` - Bs *string `json:"BS,omitempty"` - Bh *string `json:"BH,omitempty"` - Bd *string `json:"BD,omitempty"` - Bb *string `json:"BB,omitempty"` - By *string `json:"BY,omitempty"` - Be *string `json:"BE,omitempty"` - Bz *string `json:"BZ,omitempty"` - Bj *string `json:"BJ,omitempty"` - Bm *string `json:"BM,omitempty"` - Bt *string `json:"BT,omitempty"` - Bo *string `json:"BO,omitempty"` - Ba *string `json:"BA,omitempty"` - Bw *string `json:"BW,omitempty"` - Bv *string `json:"BV,omitempty"` - Br *string `json:"BR,omitempty"` - Io *string `json:"IO,omitempty"` - Bn *string `json:"BN,omitempty"` - Bg *string `json:"BG,omitempty"` - Bf *string `json:"BF,omitempty"` - Bi *string `json:"BI,omitempty"` - Kh *string `json:"KH,omitempty"` - Cm *string `json:"CM,omitempty"` - Ca *string `json:"CA,omitempty"` - Cv *string `json:"CV,omitempty"` - Ky *string `json:"KY,omitempty"` - Cf *string `json:"CF,omitempty"` - Td *string `json:"TD,omitempty"` - Cl *string `json:"CL,omitempty"` - Cn *string `json:"CN,omitempty"` - Cx *string `json:"CX,omitempty"` - Cc *string `json:"CC,omitempty"` - Co *string `json:"CO,omitempty"` - Km *string `json:"KM,omitempty"` - Cg *string `json:"CG,omitempty"` - Cd *string `json:"CD,omitempty"` - Ck *string `json:"CK,omitempty"` - Cr *string `json:"CR,omitempty"` - Ci *string `json:"CI,omitempty"` - Hr *string `json:"HR,omitempty"` - Cu *string `json:"CU,omitempty"` - Cy *string `json:"CY,omitempty"` - Cz *string `json:"CZ,omitempty"` - Dk *string `json:"DK,omitempty"` - Dj *string `json:"DJ,omitempty"` - Dm *string `json:"DM,omitempty"` - Do *string `json:"DO,omitempty"` - Ec *string `json:"EC,omitempty"` - Eg *string `json:"EG,omitempty"` - Sv *string `json:"SV,omitempty"` - Gq *string `json:"GQ,omitempty"` - Er *string `json:"ER,omitempty"` - Ee *string `json:"EE,omitempty"` - Et *string `json:"ET,omitempty"` - Fk *string `json:"FK,omitempty"` - Fo *string `json:"FO,omitempty"` - Fj *string `json:"FJ,omitempty"` - Fi *string `json:"FI,omitempty"` - Fr *string `json:"FR,omitempty"` - Gf *string `json:"GF,omitempty"` - Pf *string `json:"PF,omitempty"` - Tf *string `json:"TF,omitempty"` - Ga *string `json:"GA,omitempty"` - Gm *string `json:"GM,omitempty"` - Ge *string `json:"GE,omitempty"` - De *string `json:"DE,omitempty"` - Gh *string `json:"GH,omitempty"` - Gi *string `json:"GI,omitempty"` - Gr *string `json:"GR,omitempty"` - Gl *string `json:"GL,omitempty"` - Gd *string `json:"GD,omitempty"` - Gp *string `json:"GP,omitempty"` - Gu *string `json:"GU,omitempty"` - Gt *string `json:"GT,omitempty"` - Gn *string `json:"GN,omitempty"` - Gw *string `json:"GW,omitempty"` - Gy *string `json:"GY,omitempty"` - Ht *string `json:"HT,omitempty"` - Hm *string `json:"HM,omitempty"` - Va *string `json:"VA,omitempty"` - Hn *string `json:"HN,omitempty"` - Hk *string `json:"HK,omitempty"` - Hu *string `json:"HU,omitempty"` - Is *string `json:"IS,omitempty"` - In *string `json:"IN,omitempty"` - ID *string `json:"ID,omitempty"` - Ir *string `json:"IR,omitempty"` - Iq *string `json:"IQ,omitempty"` - Ie *string `json:"IE,omitempty"` - Il *string `json:"IL,omitempty"` - It *string `json:"IT,omitempty"` - Jm *string `json:"JM,omitempty"` - Jp *string `json:"JP,omitempty"` - Jo *string `json:"JO,omitempty"` - Kz *string `json:"KZ,omitempty"` - Ke *string `json:"KE,omitempty"` - Ki *string `json:"KI,omitempty"` - Kp *string `json:"KP,omitempty"` - Kr *string `json:"KR,omitempty"` - Kw *string `json:"KW,omitempty"` - Kg *string `json:"KG,omitempty"` - La *string `json:"LA,omitempty"` - Lv *string `json:"LV,omitempty"` - Lb *string `json:"LB,omitempty"` - Ls *string `json:"LS,omitempty"` - Lr *string `json:"LR,omitempty"` - Ly *string `json:"LY,omitempty"` - Li *string `json:"LI,omitempty"` - Lt *string `json:"LT,omitempty"` - Lu *string `json:"LU,omitempty"` - Mo *string `json:"MO,omitempty"` - Mg *string `json:"MG,omitempty"` - Mw *string `json:"MW,omitempty"` - My *string `json:"MY,omitempty"` - Mv *string `json:"MV,omitempty"` - Ml *string `json:"ML,omitempty"` - Mt *string `json:"MT,omitempty"` - Mh *string `json:"MH,omitempty"` - Mq *string `json:"MQ,omitempty"` - Mr *string `json:"MR,omitempty"` - Mu *string `json:"MU,omitempty"` - Yt *string `json:"YT,omitempty"` - Mx *string `json:"MX,omitempty"` - Fm *string `json:"FM,omitempty"` - Md *string `json:"MD,omitempty"` - Mc *string `json:"MC,omitempty"` - Mn *string `json:"MN,omitempty"` - Ms *string `json:"MS,omitempty"` - Ma *string `json:"MA,omitempty"` - Mz *string `json:"MZ,omitempty"` - Mm *string `json:"MM,omitempty"` - Na *string `json:"NA,omitempty"` - Nr *string `json:"NR,omitempty"` - Np *string `json:"NP,omitempty"` - Nl *string `json:"NL,omitempty"` - Nc *string `json:"NC,omitempty"` - Nz *string `json:"NZ,omitempty"` - Ni *string `json:"NI,omitempty"` - Ne *string `json:"NE,omitempty"` - Ng *string `json:"NG,omitempty"` - Nu *string `json:"NU,omitempty"` - Nf *string `json:"NF,omitempty"` - Mk *string `json:"MK,omitempty"` - Mp *string `json:"MP,omitempty"` - No *string `json:"NO,omitempty"` - Om *string `json:"OM,omitempty"` - Pk *string `json:"PK,omitempty"` - Pw *string `json:"PW,omitempty"` - Ps *string `json:"PS,omitempty"` - Pa *string `json:"PA,omitempty"` - Pg *string `json:"PG,omitempty"` - Py *string `json:"PY,omitempty"` - Pe *string `json:"PE,omitempty"` - Ph *string `json:"PH,omitempty"` - Pn *string `json:"PN,omitempty"` - Pl *string `json:"PL,omitempty"` - Pt *string `json:"PT,omitempty"` - Pr *string `json:"PR,omitempty"` - Qa *string `json:"QA,omitempty"` - Re *string `json:"RE,omitempty"` - Ro *string `json:"RO,omitempty"` - Ru *string `json:"RU,omitempty"` - Rw *string `json:"RW,omitempty"` - Sh *string `json:"SH,omitempty"` - Kn *string `json:"KN,omitempty"` - Lc *string `json:"LC,omitempty"` - Pm *string `json:"PM,omitempty"` - Vc *string `json:"VC,omitempty"` - Ws *string `json:"WS,omitempty"` - Sm *string `json:"SM,omitempty"` - St *string `json:"ST,omitempty"` - Sa *string `json:"SA,omitempty"` - Sn *string `json:"SN,omitempty"` - Sc *string `json:"SC,omitempty"` - Sl *string `json:"SL,omitempty"` - Sg *string `json:"SG,omitempty"` - Sk *string `json:"SK,omitempty"` - Si *string `json:"SI,omitempty"` - Sb *string `json:"SB,omitempty"` - So *string `json:"SO,omitempty"` - Za *string `json:"ZA,omitempty"` - Gs *string `json:"GS,omitempty"` - Es *string `json:"ES,omitempty"` - Lk *string `json:"LK,omitempty"` - Sd *string `json:"SD,omitempty"` - Sr *string `json:"SR,omitempty"` - Sj *string `json:"SJ,omitempty"` - Sz *string `json:"SZ,omitempty"` - Se *string `json:"SE,omitempty"` - Ch *string `json:"CH,omitempty"` - Sy *string `json:"SY,omitempty"` - Tw *string `json:"TW,omitempty"` - Tj *string `json:"TJ,omitempty"` - Tz *string `json:"TZ,omitempty"` - Th *string `json:"TH,omitempty"` - Tl *string `json:"TL,omitempty"` - Tg *string `json:"TG,omitempty"` - Tk *string `json:"TK,omitempty"` - To *string `json:"TO,omitempty"` - Tt *string `json:"TT,omitempty"` - Tn *string `json:"TN,omitempty"` - Tr *string `json:"TR,omitempty"` - Tm *string `json:"TM,omitempty"` - Tc *string `json:"TC,omitempty"` - Tv *string `json:"TV,omitempty"` - Ug *string `json:"UG,omitempty"` - Ua *string `json:"UA,omitempty"` - Ae *string `json:"AE,omitempty"` - Gb *string `json:"GB,omitempty"` - Us *string `json:"US,omitempty"` - Um *string `json:"UM,omitempty"` - Uy *string `json:"UY,omitempty"` - Uz *string `json:"UZ,omitempty"` - Vu *string `json:"VU,omitempty"` - Ve *string `json:"VE,omitempty"` - Vn *string `json:"VN,omitempty"` - Vg *string `json:"VG,omitempty"` - Vi *string `json:"VI,omitempty"` - Wf *string `json:"WF,omitempty"` - Eh *string `json:"EH,omitempty"` - Ye *string `json:"YE,omitempty"` - Zm *string `json:"ZM,omitempty"` - Zw *string `json:"ZW,omitempty"` - Ax *string `json:"AX,omitempty"` - Bq *string `json:"BQ,omitempty"` - Cw *string `json:"CW,omitempty"` - Gg *string `json:"GG,omitempty"` - Im *string `json:"IM,omitempty"` - Je *string `json:"JE,omitempty"` - Me *string `json:"ME,omitempty"` - Bl *string `json:"BL,omitempty"` - Mf *string `json:"MF,omitempty"` - Rs *string `json:"RS,omitempty"` - Sx *string `json:"SX,omitempty"` - Ss *string `json:"SS,omitempty"` - Xk *string `json:"XK,omitempty"` -} - -func (o *TrackSaleGeo) GetAf() *string { - if o == nil { - return nil - } - return o.Af -} - -func (o *TrackSaleGeo) GetAl() *string { - if o == nil { - return nil - } - return o.Al -} - -func (o *TrackSaleGeo) GetDz() *string { - if o == nil { - return nil - } - return o.Dz -} - -func (o *TrackSaleGeo) GetAs() *string { - if o == nil { - return nil - } - return o.As -} - -func (o *TrackSaleGeo) GetAd() *string { - if o == nil { - return nil - } - return o.Ad -} - -func (o *TrackSaleGeo) GetAo() *string { - if o == nil { - return nil - } - return o.Ao -} - -func (o *TrackSaleGeo) GetAi() *string { - if o == nil { - return nil - } - return o.Ai -} - -func (o *TrackSaleGeo) GetAq() *string { - if o == nil { - return nil - } - return o.Aq -} - -func (o *TrackSaleGeo) GetAg() *string { - if o == nil { - return nil - } - return o.Ag -} - -func (o *TrackSaleGeo) GetAr() *string { - if o == nil { - return nil - } - return o.Ar -} - -func (o *TrackSaleGeo) GetAm() *string { - if o == nil { - return nil - } - return o.Am -} - -func (o *TrackSaleGeo) GetAw() *string { - if o == nil { - return nil - } - return o.Aw -} - -func (o *TrackSaleGeo) GetAu() *string { - if o == nil { - return nil - } - return o.Au -} - -func (o *TrackSaleGeo) GetAt() *string { - if o == nil { - return nil - } - return o.At -} - -func (o *TrackSaleGeo) GetAz() *string { - if o == nil { - return nil - } - return o.Az -} - -func (o *TrackSaleGeo) GetBs() *string { - if o == nil { - return nil - } - return o.Bs -} - -func (o *TrackSaleGeo) GetBh() *string { - if o == nil { - return nil - } - return o.Bh -} - -func (o *TrackSaleGeo) GetBd() *string { - if o == nil { - return nil - } - return o.Bd -} - -func (o *TrackSaleGeo) GetBb() *string { - if o == nil { - return nil - } - return o.Bb -} - -func (o *TrackSaleGeo) GetBy() *string { - if o == nil { - return nil - } - return o.By -} - -func (o *TrackSaleGeo) GetBe() *string { - if o == nil { - return nil - } - return o.Be -} - -func (o *TrackSaleGeo) GetBz() *string { - if o == nil { - return nil - } - return o.Bz -} - -func (o *TrackSaleGeo) GetBj() *string { - if o == nil { - return nil - } - return o.Bj -} - -func (o *TrackSaleGeo) GetBm() *string { - if o == nil { - return nil - } - return o.Bm -} - -func (o *TrackSaleGeo) GetBt() *string { - if o == nil { - return nil - } - return o.Bt -} - -func (o *TrackSaleGeo) GetBo() *string { - if o == nil { - return nil - } - return o.Bo -} - -func (o *TrackSaleGeo) GetBa() *string { - if o == nil { - return nil - } - return o.Ba -} - -func (o *TrackSaleGeo) GetBw() *string { - if o == nil { - return nil - } - return o.Bw -} - -func (o *TrackSaleGeo) GetBv() *string { - if o == nil { - return nil - } - return o.Bv -} - -func (o *TrackSaleGeo) GetBr() *string { - if o == nil { - return nil - } - return o.Br -} - -func (o *TrackSaleGeo) GetIo() *string { - if o == nil { - return nil - } - return o.Io -} - -func (o *TrackSaleGeo) GetBn() *string { - if o == nil { - return nil - } - return o.Bn -} - -func (o *TrackSaleGeo) GetBg() *string { - if o == nil { - return nil - } - return o.Bg -} - -func (o *TrackSaleGeo) GetBf() *string { - if o == nil { - return nil - } - return o.Bf -} - -func (o *TrackSaleGeo) GetBi() *string { - if o == nil { - return nil - } - return o.Bi -} - -func (o *TrackSaleGeo) GetKh() *string { - if o == nil { - return nil - } - return o.Kh -} - -func (o *TrackSaleGeo) GetCm() *string { - if o == nil { - return nil - } - return o.Cm -} - -func (o *TrackSaleGeo) GetCa() *string { - if o == nil { - return nil - } - return o.Ca -} - -func (o *TrackSaleGeo) GetCv() *string { - if o == nil { - return nil - } - return o.Cv -} - -func (o *TrackSaleGeo) GetKy() *string { - if o == nil { - return nil - } - return o.Ky -} - -func (o *TrackSaleGeo) GetCf() *string { - if o == nil { - return nil - } - return o.Cf -} - -func (o *TrackSaleGeo) GetTd() *string { - if o == nil { - return nil - } - return o.Td -} - -func (o *TrackSaleGeo) GetCl() *string { - if o == nil { - return nil - } - return o.Cl -} - -func (o *TrackSaleGeo) GetCn() *string { - if o == nil { - return nil - } - return o.Cn -} - -func (o *TrackSaleGeo) GetCx() *string { - if o == nil { - return nil - } - return o.Cx -} - -func (o *TrackSaleGeo) GetCc() *string { - if o == nil { - return nil - } - return o.Cc -} - -func (o *TrackSaleGeo) GetCo() *string { - if o == nil { - return nil - } - return o.Co -} - -func (o *TrackSaleGeo) GetKm() *string { - if o == nil { - return nil - } - return o.Km -} - -func (o *TrackSaleGeo) GetCg() *string { - if o == nil { - return nil - } - return o.Cg -} - -func (o *TrackSaleGeo) GetCd() *string { - if o == nil { - return nil - } - return o.Cd -} - -func (o *TrackSaleGeo) GetCk() *string { - if o == nil { - return nil - } - return o.Ck -} - -func (o *TrackSaleGeo) GetCr() *string { - if o == nil { - return nil - } - return o.Cr -} - -func (o *TrackSaleGeo) GetCi() *string { - if o == nil { - return nil - } - return o.Ci -} - -func (o *TrackSaleGeo) GetHr() *string { - if o == nil { - return nil - } - return o.Hr -} - -func (o *TrackSaleGeo) GetCu() *string { - if o == nil { - return nil - } - return o.Cu -} - -func (o *TrackSaleGeo) GetCy() *string { - if o == nil { - return nil - } - return o.Cy -} - -func (o *TrackSaleGeo) GetCz() *string { - if o == nil { - return nil - } - return o.Cz -} - -func (o *TrackSaleGeo) GetDk() *string { - if o == nil { - return nil - } - return o.Dk -} - -func (o *TrackSaleGeo) GetDj() *string { - if o == nil { - return nil - } - return o.Dj -} - -func (o *TrackSaleGeo) GetDm() *string { - if o == nil { - return nil - } - return o.Dm -} - -func (o *TrackSaleGeo) GetDo() *string { - if o == nil { - return nil - } - return o.Do -} - -func (o *TrackSaleGeo) GetEc() *string { - if o == nil { - return nil - } - return o.Ec -} - -func (o *TrackSaleGeo) GetEg() *string { - if o == nil { - return nil - } - return o.Eg -} - -func (o *TrackSaleGeo) GetSv() *string { - if o == nil { - return nil - } - return o.Sv -} - -func (o *TrackSaleGeo) GetGq() *string { - if o == nil { - return nil - } - return o.Gq -} - -func (o *TrackSaleGeo) GetEr() *string { - if o == nil { - return nil - } - return o.Er -} - -func (o *TrackSaleGeo) GetEe() *string { - if o == nil { - return nil - } - return o.Ee -} - -func (o *TrackSaleGeo) GetEt() *string { - if o == nil { - return nil - } - return o.Et -} - -func (o *TrackSaleGeo) GetFk() *string { - if o == nil { - return nil - } - return o.Fk -} - -func (o *TrackSaleGeo) GetFo() *string { - if o == nil { - return nil - } - return o.Fo -} - -func (o *TrackSaleGeo) GetFj() *string { - if o == nil { - return nil - } - return o.Fj -} - -func (o *TrackSaleGeo) GetFi() *string { - if o == nil { - return nil - } - return o.Fi -} - -func (o *TrackSaleGeo) GetFr() *string { - if o == nil { - return nil - } - return o.Fr -} - -func (o *TrackSaleGeo) GetGf() *string { - if o == nil { - return nil - } - return o.Gf -} - -func (o *TrackSaleGeo) GetPf() *string { - if o == nil { - return nil - } - return o.Pf -} - -func (o *TrackSaleGeo) GetTf() *string { - if o == nil { - return nil - } - return o.Tf -} - -func (o *TrackSaleGeo) GetGa() *string { - if o == nil { - return nil - } - return o.Ga -} - -func (o *TrackSaleGeo) GetGm() *string { - if o == nil { - return nil - } - return o.Gm -} - -func (o *TrackSaleGeo) GetGe() *string { - if o == nil { - return nil - } - return o.Ge -} - -func (o *TrackSaleGeo) GetDe() *string { - if o == nil { - return nil - } - return o.De -} - -func (o *TrackSaleGeo) GetGh() *string { - if o == nil { - return nil - } - return o.Gh -} - -func (o *TrackSaleGeo) GetGi() *string { - if o == nil { - return nil - } - return o.Gi -} - -func (o *TrackSaleGeo) GetGr() *string { - if o == nil { - return nil - } - return o.Gr -} - -func (o *TrackSaleGeo) GetGl() *string { - if o == nil { - return nil - } - return o.Gl -} - -func (o *TrackSaleGeo) GetGd() *string { - if o == nil { - return nil - } - return o.Gd -} - -func (o *TrackSaleGeo) GetGp() *string { - if o == nil { - return nil - } - return o.Gp -} - -func (o *TrackSaleGeo) GetGu() *string { - if o == nil { - return nil - } - return o.Gu -} - -func (o *TrackSaleGeo) GetGt() *string { - if o == nil { - return nil - } - return o.Gt -} - -func (o *TrackSaleGeo) GetGn() *string { - if o == nil { - return nil - } - return o.Gn -} - -func (o *TrackSaleGeo) GetGw() *string { - if o == nil { - return nil - } - return o.Gw -} - -func (o *TrackSaleGeo) GetGy() *string { - if o == nil { - return nil - } - return o.Gy -} - -func (o *TrackSaleGeo) GetHt() *string { - if o == nil { - return nil - } - return o.Ht -} - -func (o *TrackSaleGeo) GetHm() *string { - if o == nil { - return nil - } - return o.Hm -} - -func (o *TrackSaleGeo) GetVa() *string { - if o == nil { - return nil - } - return o.Va -} - -func (o *TrackSaleGeo) GetHn() *string { - if o == nil { - return nil - } - return o.Hn -} - -func (o *TrackSaleGeo) GetHk() *string { - if o == nil { - return nil - } - return o.Hk -} - -func (o *TrackSaleGeo) GetHu() *string { - if o == nil { - return nil - } - return o.Hu -} - -func (o *TrackSaleGeo) GetIs() *string { - if o == nil { - return nil - } - return o.Is -} - -func (o *TrackSaleGeo) GetIn() *string { - if o == nil { - return nil - } - return o.In -} - -func (o *TrackSaleGeo) GetID() *string { - if o == nil { - return nil - } - return o.ID -} - -func (o *TrackSaleGeo) GetIr() *string { - if o == nil { - return nil - } - return o.Ir -} - -func (o *TrackSaleGeo) GetIq() *string { - if o == nil { - return nil - } - return o.Iq -} - -func (o *TrackSaleGeo) GetIe() *string { - if o == nil { - return nil - } - return o.Ie -} - -func (o *TrackSaleGeo) GetIl() *string { - if o == nil { - return nil - } - return o.Il -} - -func (o *TrackSaleGeo) GetIt() *string { - if o == nil { - return nil - } - return o.It -} - -func (o *TrackSaleGeo) GetJm() *string { - if o == nil { - return nil - } - return o.Jm -} - -func (o *TrackSaleGeo) GetJp() *string { - if o == nil { - return nil - } - return o.Jp -} - -func (o *TrackSaleGeo) GetJo() *string { - if o == nil { - return nil - } - return o.Jo -} - -func (o *TrackSaleGeo) GetKz() *string { - if o == nil { - return nil - } - return o.Kz -} - -func (o *TrackSaleGeo) GetKe() *string { - if o == nil { - return nil - } - return o.Ke -} - -func (o *TrackSaleGeo) GetKi() *string { - if o == nil { - return nil - } - return o.Ki -} - -func (o *TrackSaleGeo) GetKp() *string { - if o == nil { - return nil - } - return o.Kp -} - -func (o *TrackSaleGeo) GetKr() *string { - if o == nil { - return nil - } - return o.Kr -} - -func (o *TrackSaleGeo) GetKw() *string { - if o == nil { - return nil - } - return o.Kw -} - -func (o *TrackSaleGeo) GetKg() *string { - if o == nil { - return nil - } - return o.Kg -} - -func (o *TrackSaleGeo) GetLa() *string { - if o == nil { - return nil - } - return o.La -} - -func (o *TrackSaleGeo) GetLv() *string { - if o == nil { - return nil - } - return o.Lv -} - -func (o *TrackSaleGeo) GetLb() *string { - if o == nil { - return nil - } - return o.Lb -} - -func (o *TrackSaleGeo) GetLs() *string { - if o == nil { - return nil - } - return o.Ls -} - -func (o *TrackSaleGeo) GetLr() *string { - if o == nil { - return nil - } - return o.Lr -} - -func (o *TrackSaleGeo) GetLy() *string { - if o == nil { - return nil - } - return o.Ly -} - -func (o *TrackSaleGeo) GetLi() *string { - if o == nil { - return nil - } - return o.Li -} - -func (o *TrackSaleGeo) GetLt() *string { - if o == nil { - return nil - } - return o.Lt -} - -func (o *TrackSaleGeo) GetLu() *string { - if o == nil { - return nil - } - return o.Lu -} - -func (o *TrackSaleGeo) GetMo() *string { - if o == nil { - return nil - } - return o.Mo -} - -func (o *TrackSaleGeo) GetMg() *string { - if o == nil { - return nil - } - return o.Mg -} - -func (o *TrackSaleGeo) GetMw() *string { - if o == nil { - return nil - } - return o.Mw -} - -func (o *TrackSaleGeo) GetMy() *string { - if o == nil { - return nil - } - return o.My -} - -func (o *TrackSaleGeo) GetMv() *string { - if o == nil { - return nil - } - return o.Mv -} - -func (o *TrackSaleGeo) GetMl() *string { - if o == nil { - return nil - } - return o.Ml -} - -func (o *TrackSaleGeo) GetMt() *string { - if o == nil { - return nil - } - return o.Mt -} - -func (o *TrackSaleGeo) GetMh() *string { - if o == nil { - return nil - } - return o.Mh -} - -func (o *TrackSaleGeo) GetMq() *string { - if o == nil { - return nil - } - return o.Mq -} - -func (o *TrackSaleGeo) GetMr() *string { - if o == nil { - return nil - } - return o.Mr -} - -func (o *TrackSaleGeo) GetMu() *string { - if o == nil { - return nil - } - return o.Mu -} - -func (o *TrackSaleGeo) GetYt() *string { - if o == nil { - return nil - } - return o.Yt -} - -func (o *TrackSaleGeo) GetMx() *string { - if o == nil { - return nil - } - return o.Mx -} - -func (o *TrackSaleGeo) GetFm() *string { - if o == nil { - return nil - } - return o.Fm -} - -func (o *TrackSaleGeo) GetMd() *string { - if o == nil { - return nil - } - return o.Md -} - -func (o *TrackSaleGeo) GetMc() *string { - if o == nil { - return nil - } - return o.Mc -} - -func (o *TrackSaleGeo) GetMn() *string { - if o == nil { - return nil - } - return o.Mn -} - -func (o *TrackSaleGeo) GetMs() *string { - if o == nil { - return nil - } - return o.Ms -} - -func (o *TrackSaleGeo) GetMa() *string { - if o == nil { - return nil - } - return o.Ma -} - -func (o *TrackSaleGeo) GetMz() *string { - if o == nil { - return nil - } - return o.Mz -} - -func (o *TrackSaleGeo) GetMm() *string { - if o == nil { - return nil - } - return o.Mm -} - -func (o *TrackSaleGeo) GetNa() *string { - if o == nil { - return nil - } - return o.Na -} - -func (o *TrackSaleGeo) GetNr() *string { - if o == nil { - return nil - } - return o.Nr -} - -func (o *TrackSaleGeo) GetNp() *string { - if o == nil { - return nil - } - return o.Np -} - -func (o *TrackSaleGeo) GetNl() *string { - if o == nil { - return nil - } - return o.Nl -} - -func (o *TrackSaleGeo) GetNc() *string { - if o == nil { - return nil - } - return o.Nc -} - -func (o *TrackSaleGeo) GetNz() *string { - if o == nil { - return nil - } - return o.Nz -} - -func (o *TrackSaleGeo) GetNi() *string { - if o == nil { - return nil - } - return o.Ni -} - -func (o *TrackSaleGeo) GetNe() *string { - if o == nil { - return nil - } - return o.Ne -} - -func (o *TrackSaleGeo) GetNg() *string { - if o == nil { - return nil - } - return o.Ng -} - -func (o *TrackSaleGeo) GetNu() *string { - if o == nil { - return nil - } - return o.Nu -} - -func (o *TrackSaleGeo) GetNf() *string { - if o == nil { - return nil - } - return o.Nf -} - -func (o *TrackSaleGeo) GetMk() *string { - if o == nil { - return nil - } - return o.Mk -} - -func (o *TrackSaleGeo) GetMp() *string { - if o == nil { - return nil - } - return o.Mp -} - -func (o *TrackSaleGeo) GetNo() *string { - if o == nil { - return nil - } - return o.No -} - -func (o *TrackSaleGeo) GetOm() *string { - if o == nil { - return nil - } - return o.Om -} - -func (o *TrackSaleGeo) GetPk() *string { - if o == nil { - return nil - } - return o.Pk -} - -func (o *TrackSaleGeo) GetPw() *string { - if o == nil { - return nil - } - return o.Pw -} - -func (o *TrackSaleGeo) GetPs() *string { - if o == nil { - return nil - } - return o.Ps -} - -func (o *TrackSaleGeo) GetPa() *string { - if o == nil { - return nil - } - return o.Pa -} - -func (o *TrackSaleGeo) GetPg() *string { - if o == nil { - return nil - } - return o.Pg -} - -func (o *TrackSaleGeo) GetPy() *string { - if o == nil { - return nil - } - return o.Py -} - -func (o *TrackSaleGeo) GetPe() *string { - if o == nil { - return nil - } - return o.Pe -} - -func (o *TrackSaleGeo) GetPh() *string { - if o == nil { - return nil - } - return o.Ph -} - -func (o *TrackSaleGeo) GetPn() *string { - if o == nil { - return nil - } - return o.Pn -} - -func (o *TrackSaleGeo) GetPl() *string { - if o == nil { - return nil - } - return o.Pl -} - -func (o *TrackSaleGeo) GetPt() *string { - if o == nil { - return nil - } - return o.Pt -} - -func (o *TrackSaleGeo) GetPr() *string { - if o == nil { - return nil - } - return o.Pr -} - -func (o *TrackSaleGeo) GetQa() *string { - if o == nil { - return nil - } - return o.Qa -} - -func (o *TrackSaleGeo) GetRe() *string { - if o == nil { - return nil - } - return o.Re -} - -func (o *TrackSaleGeo) GetRo() *string { - if o == nil { - return nil - } - return o.Ro -} - -func (o *TrackSaleGeo) GetRu() *string { - if o == nil { - return nil - } - return o.Ru -} - -func (o *TrackSaleGeo) GetRw() *string { - if o == nil { - return nil - } - return o.Rw -} - -func (o *TrackSaleGeo) GetSh() *string { - if o == nil { - return nil - } - return o.Sh -} - -func (o *TrackSaleGeo) GetKn() *string { - if o == nil { - return nil - } - return o.Kn -} - -func (o *TrackSaleGeo) GetLc() *string { - if o == nil { - return nil - } - return o.Lc -} - -func (o *TrackSaleGeo) GetPm() *string { - if o == nil { - return nil - } - return o.Pm -} - -func (o *TrackSaleGeo) GetVc() *string { - if o == nil { - return nil - } - return o.Vc -} - -func (o *TrackSaleGeo) GetWs() *string { - if o == nil { - return nil - } - return o.Ws -} - -func (o *TrackSaleGeo) GetSm() *string { - if o == nil { - return nil - } - return o.Sm -} - -func (o *TrackSaleGeo) GetSt() *string { - if o == nil { - return nil - } - return o.St -} - -func (o *TrackSaleGeo) GetSa() *string { - if o == nil { - return nil - } - return o.Sa -} - -func (o *TrackSaleGeo) GetSn() *string { - if o == nil { - return nil - } - return o.Sn -} - -func (o *TrackSaleGeo) GetSc() *string { - if o == nil { - return nil - } - return o.Sc -} - -func (o *TrackSaleGeo) GetSl() *string { - if o == nil { - return nil - } - return o.Sl -} - -func (o *TrackSaleGeo) GetSg() *string { - if o == nil { - return nil - } - return o.Sg -} - -func (o *TrackSaleGeo) GetSk() *string { - if o == nil { - return nil - } - return o.Sk -} - -func (o *TrackSaleGeo) GetSi() *string { - if o == nil { - return nil - } - return o.Si -} - -func (o *TrackSaleGeo) GetSb() *string { - if o == nil { - return nil - } - return o.Sb -} - -func (o *TrackSaleGeo) GetSo() *string { - if o == nil { - return nil - } - return o.So -} - -func (o *TrackSaleGeo) GetZa() *string { - if o == nil { - return nil - } - return o.Za -} - -func (o *TrackSaleGeo) GetGs() *string { - if o == nil { - return nil - } - return o.Gs -} - -func (o *TrackSaleGeo) GetEs() *string { - if o == nil { - return nil - } - return o.Es -} - -func (o *TrackSaleGeo) GetLk() *string { - if o == nil { - return nil - } - return o.Lk -} - -func (o *TrackSaleGeo) GetSd() *string { - if o == nil { - return nil - } - return o.Sd -} - -func (o *TrackSaleGeo) GetSr() *string { - if o == nil { - return nil - } - return o.Sr -} - -func (o *TrackSaleGeo) GetSj() *string { - if o == nil { - return nil - } - return o.Sj -} - -func (o *TrackSaleGeo) GetSz() *string { - if o == nil { - return nil - } - return o.Sz -} - -func (o *TrackSaleGeo) GetSe() *string { - if o == nil { - return nil - } - return o.Se -} - -func (o *TrackSaleGeo) GetCh() *string { - if o == nil { - return nil - } - return o.Ch -} - -func (o *TrackSaleGeo) GetSy() *string { - if o == nil { - return nil - } - return o.Sy -} - -func (o *TrackSaleGeo) GetTw() *string { - if o == nil { - return nil - } - return o.Tw -} - -func (o *TrackSaleGeo) GetTj() *string { - if o == nil { - return nil - } - return o.Tj -} - -func (o *TrackSaleGeo) GetTz() *string { - if o == nil { - return nil - } - return o.Tz -} - -func (o *TrackSaleGeo) GetTh() *string { - if o == nil { - return nil - } - return o.Th -} - -func (o *TrackSaleGeo) GetTl() *string { - if o == nil { - return nil - } - return o.Tl -} - -func (o *TrackSaleGeo) GetTg() *string { - if o == nil { - return nil - } - return o.Tg -} - -func (o *TrackSaleGeo) GetTk() *string { - if o == nil { - return nil - } - return o.Tk -} - -func (o *TrackSaleGeo) GetTo() *string { - if o == nil { - return nil - } - return o.To -} - -func (o *TrackSaleGeo) GetTt() *string { - if o == nil { - return nil - } - return o.Tt -} - -func (o *TrackSaleGeo) GetTn() *string { - if o == nil { - return nil - } - return o.Tn -} - -func (o *TrackSaleGeo) GetTr() *string { - if o == nil { - return nil - } - return o.Tr -} - -func (o *TrackSaleGeo) GetTm() *string { - if o == nil { - return nil - } - return o.Tm -} - -func (o *TrackSaleGeo) GetTc() *string { - if o == nil { - return nil - } - return o.Tc -} - -func (o *TrackSaleGeo) GetTv() *string { - if o == nil { - return nil - } - return o.Tv -} - -func (o *TrackSaleGeo) GetUg() *string { - if o == nil { - return nil - } - return o.Ug -} - -func (o *TrackSaleGeo) GetUa() *string { - if o == nil { - return nil - } - return o.Ua -} - -func (o *TrackSaleGeo) GetAe() *string { - if o == nil { - return nil - } - return o.Ae -} - -func (o *TrackSaleGeo) GetGb() *string { - if o == nil { - return nil - } - return o.Gb -} - -func (o *TrackSaleGeo) GetUs() *string { - if o == nil { - return nil - } - return o.Us -} - -func (o *TrackSaleGeo) GetUm() *string { - if o == nil { - return nil - } - return o.Um -} - -func (o *TrackSaleGeo) GetUy() *string { - if o == nil { - return nil - } - return o.Uy -} - -func (o *TrackSaleGeo) GetUz() *string { - if o == nil { - return nil - } - return o.Uz -} - -func (o *TrackSaleGeo) GetVu() *string { - if o == nil { - return nil - } - return o.Vu -} - -func (o *TrackSaleGeo) GetVe() *string { - if o == nil { - return nil - } - return o.Ve -} - -func (o *TrackSaleGeo) GetVn() *string { - if o == nil { - return nil - } - return o.Vn -} - -func (o *TrackSaleGeo) GetVg() *string { - if o == nil { - return nil - } - return o.Vg -} - -func (o *TrackSaleGeo) GetVi() *string { - if o == nil { - return nil - } - return o.Vi -} - -func (o *TrackSaleGeo) GetWf() *string { - if o == nil { - return nil - } - return o.Wf -} - -func (o *TrackSaleGeo) GetEh() *string { - if o == nil { - return nil - } - return o.Eh -} - -func (o *TrackSaleGeo) GetYe() *string { - if o == nil { - return nil - } - return o.Ye -} - -func (o *TrackSaleGeo) GetZm() *string { - if o == nil { - return nil - } - return o.Zm -} - -func (o *TrackSaleGeo) GetZw() *string { - if o == nil { - return nil - } - return o.Zw -} - -func (o *TrackSaleGeo) GetAx() *string { - if o == nil { - return nil - } - return o.Ax -} - -func (o *TrackSaleGeo) GetBq() *string { - if o == nil { - return nil - } - return o.Bq -} - -func (o *TrackSaleGeo) GetCw() *string { - if o == nil { - return nil - } - return o.Cw -} - -func (o *TrackSaleGeo) GetGg() *string { - if o == nil { - return nil - } - return o.Gg -} - -func (o *TrackSaleGeo) GetIm() *string { - if o == nil { - return nil - } - return o.Im -} - -func (o *TrackSaleGeo) GetJe() *string { - if o == nil { - return nil - } - return o.Je -} - -func (o *TrackSaleGeo) GetMe() *string { - if o == nil { - return nil - } - return o.Me -} - -func (o *TrackSaleGeo) GetBl() *string { - if o == nil { - return nil - } - return o.Bl -} - -func (o *TrackSaleGeo) GetMf() *string { - if o == nil { - return nil - } - return o.Mf -} - -func (o *TrackSaleGeo) GetRs() *string { - if o == nil { - return nil - } - return o.Rs -} - -func (o *TrackSaleGeo) GetSx() *string { - if o == nil { - return nil - } - return o.Sx -} - -func (o *TrackSaleGeo) GetSs() *string { - if o == nil { - return nil - } - return o.Ss -} - -func (o *TrackSaleGeo) GetXk() *string { - if o == nil { - return nil - } - return o.Xk -} - -type TrackSaleLink struct { - // The unique ID of the short link. - ID string `json:"id"` - // The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains). - Domain string `json:"domain"` - // The short link slug. If not provided, a random 7-character slug will be generated. - Key string `json:"key"` - // This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter. - ExternalID *string `json:"externalId"` - // The destination URL of the short link. - URL string `json:"url"` - // [BETA] Whether to track conversions for the short link. - TrackConversion *bool `default:"false" json:"trackConversion"` - // Whether the short link is archived. - Archived *bool `default:"false" json:"archived"` - // The date and time when the short link will expire in ISO-8601 format. - ExpiresAt *string `json:"expiresAt"` - // The URL to redirect to when the short link has expired. - ExpiredURL *string `json:"expiredUrl"` - // The password required to access the destination URL of the short link. - Password *string `json:"password"` - // Whether the short link uses Custom Social Media Cards feature. - Proxy *bool `default:"false" json:"proxy"` - // The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. - Title *string `json:"title"` - // The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. - Description *string `json:"description"` - // The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true. - Image *string `json:"image"` - // The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og - Video *string `json:"video"` - // Whether the short link uses link cloaking. - Rewrite *bool `default:"false" json:"rewrite"` - // Whether to allow search engines to index the short link. - DoIndex *bool `default:"false" json:"doIndex"` - // The iOS destination URL for the short link for iOS device targeting. - Ios *string `json:"ios"` - // The Android destination URL for the short link for Android device targeting. - Android *string `json:"android"` - // Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo - Geo *TrackSaleGeo `json:"geo"` - // Whether the short link's stats are publicly accessible. - PublicStats *bool `default:"false" json:"publicStats"` - // The comments for the short link. - Comments *string `json:"comments"` - // The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). - ShortLink string `json:"shortLink"` - // The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). - QrCode string `json:"qrCode"` - // The UTM source of the short link. - UtmSource *string `json:"utm_source"` - // The UTM medium of the short link. - UtmMedium *string `json:"utm_medium"` - // The UTM campaign of the short link. - UtmCampaign *string `json:"utm_campaign"` - // The UTM term of the short link. - UtmTerm *string `json:"utm_term"` - // The UTM content of the short link. - UtmContent *string `json:"utm_content"` - // The user ID of the creator of the short link. - UserID string `json:"userId"` - // The workspace ID of the short link. - WorkspaceID string `json:"workspaceId"` - // The number of clicks on the short link. - Clicks *float64 `default:"0" json:"clicks"` - // The date and time when the short link was last clicked. - LastClicked *string `json:"lastClicked"` - // [BETA]: The number of leads the short links has generated. - Leads *float64 `default:"0" json:"leads"` - // [BETA]: The number of sales the short links has generated. - Sales *float64 `default:"0" json:"sales"` - // [BETA]: The total dollar amount of sales the short links has generated (in cents). - SaleAmount *float64 `default:"0" json:"saleAmount"` - // The date and time when the short link was created. - CreatedAt string `json:"createdAt"` - // The date and time when the short link was last updated. - UpdatedAt string `json:"updatedAt"` -} - -func (t TrackSaleLink) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(t, "", false) -} - -func (t *TrackSaleLink) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &t, "", false, false); err != nil { - return err - } - return nil -} - -func (o *TrackSaleLink) GetID() string { - if o == nil { - return "" - } - return o.ID -} - -func (o *TrackSaleLink) GetDomain() string { - if o == nil { - return "" - } - return o.Domain -} - -func (o *TrackSaleLink) GetKey() string { - if o == nil { - return "" - } - return o.Key -} - -func (o *TrackSaleLink) GetExternalID() *string { - if o == nil { - return nil - } - return o.ExternalID -} - -func (o *TrackSaleLink) GetURL() string { - if o == nil { - return "" - } - return o.URL -} - -func (o *TrackSaleLink) GetTrackConversion() *bool { - if o == nil { - return nil - } - return o.TrackConversion -} - -func (o *TrackSaleLink) GetArchived() *bool { - if o == nil { - return nil - } - return o.Archived -} - -func (o *TrackSaleLink) GetExpiresAt() *string { - if o == nil { - return nil - } - return o.ExpiresAt -} - -func (o *TrackSaleLink) GetExpiredURL() *string { - if o == nil { - return nil - } - return o.ExpiredURL -} - -func (o *TrackSaleLink) GetPassword() *string { - if o == nil { - return nil - } - return o.Password -} - -func (o *TrackSaleLink) GetProxy() *bool { - if o == nil { - return nil - } - return o.Proxy -} - -func (o *TrackSaleLink) GetTitle() *string { - if o == nil { - return nil - } - return o.Title -} - -func (o *TrackSaleLink) GetDescription() *string { - if o == nil { - return nil - } - return o.Description -} - -func (o *TrackSaleLink) GetImage() *string { - if o == nil { - return nil - } - return o.Image -} - -func (o *TrackSaleLink) GetVideo() *string { - if o == nil { - return nil - } - return o.Video -} - -func (o *TrackSaleLink) GetRewrite() *bool { - if o == nil { - return nil - } - return o.Rewrite -} - -func (o *TrackSaleLink) GetDoIndex() *bool { - if o == nil { - return nil - } - return o.DoIndex -} - -func (o *TrackSaleLink) GetIos() *string { - if o == nil { - return nil - } - return o.Ios -} - -func (o *TrackSaleLink) GetAndroid() *string { - if o == nil { - return nil - } - return o.Android -} - -func (o *TrackSaleLink) GetGeo() *TrackSaleGeo { - if o == nil { - return nil - } - return o.Geo -} - -func (o *TrackSaleLink) GetPublicStats() *bool { - if o == nil { - return nil - } - return o.PublicStats -} - -func (o *TrackSaleLink) GetComments() *string { - if o == nil { - return nil - } - return o.Comments -} - -func (o *TrackSaleLink) GetShortLink() string { - if o == nil { - return "" - } - return o.ShortLink -} - -func (o *TrackSaleLink) GetQrCode() string { - if o == nil { - return "" - } - return o.QrCode -} - -func (o *TrackSaleLink) GetUtmSource() *string { - if o == nil { - return nil - } - return o.UtmSource -} - -func (o *TrackSaleLink) GetUtmMedium() *string { - if o == nil { - return nil - } - return o.UtmMedium -} - -func (o *TrackSaleLink) GetUtmCampaign() *string { - if o == nil { - return nil - } - return o.UtmCampaign -} - -func (o *TrackSaleLink) GetUtmTerm() *string { - if o == nil { - return nil - } - return o.UtmTerm -} - -func (o *TrackSaleLink) GetUtmContent() *string { - if o == nil { - return nil - } - return o.UtmContent -} - -func (o *TrackSaleLink) GetUserID() string { +func (o *Sale) GetCurrency() string { if o == nil { return "" } - return o.UserID + return o.Currency } -func (o *TrackSaleLink) GetWorkspaceID() string { +func (o *Sale) GetPaymentProcessor() string { if o == nil { return "" } - return o.WorkspaceID -} - -func (o *TrackSaleLink) GetClicks() *float64 { - if o == nil { - return nil - } - return o.Clicks -} - -func (o *TrackSaleLink) GetLastClicked() *string { - if o == nil { - return nil - } - return o.LastClicked -} - -func (o *TrackSaleLink) GetLeads() *float64 { - if o == nil { - return nil - } - return o.Leads + return o.PaymentProcessor } -func (o *TrackSaleLink) GetSales() *float64 { +func (o *Sale) GetInvoiceID() *string { if o == nil { return nil } - return o.Sales + return o.InvoiceID } -func (o *TrackSaleLink) GetSaleAmount() *float64 { +func (o *Sale) GetMetadata() map[string]any { if o == nil { return nil } - return o.SaleAmount -} - -func (o *TrackSaleLink) GetCreatedAt() string { - if o == nil { - return "" - } - return o.CreatedAt -} - -func (o *TrackSaleLink) GetUpdatedAt() string { - if o == nil { - return "" - } - return o.UpdatedAt + return o.Metadata } // TrackSaleResponseBody - A sale was tracked. @@ -2657,8 +198,6 @@ type TrackSaleResponseBody struct { EventName string `json:"eventName"` Customer TrackSaleCustomer `json:"customer"` Sale Sale `json:"sale"` - Click TrackSaleClick `json:"click"` - Link TrackSaleLink `json:"link"` } func (o *TrackSaleResponseBody) GetEventName() string { @@ -2681,17 +220,3 @@ func (o *TrackSaleResponseBody) GetSale() Sale { } return o.Sale } - -func (o *TrackSaleResponseBody) GetClick() TrackSaleClick { - if o == nil { - return TrackSaleClick{} - } - return o.Click -} - -func (o *TrackSaleResponseBody) GetLink() TrackSaleLink { - if o == nil { - return TrackSaleLink{} - } - return o.Link -}