Skip to content

Commit fdc0de8

Browse files
authored
Merge pull request #182 from dubinc/speakeasy-sdk-regen-1738282896
chore: 🐝 Update Specs - Merge Code Samples Into OpenAPI Spec
2 parents 8e85a99 + f89dbb1 commit fdc0de8

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

.speakeasy/workflow.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
speakeasyVersion: 1.477.2
1+
speakeasyVersion: 1.480.0
22
sources:
33
merge-code-samples-into-spec:
44
sourceNamespace: merge-code-samples-into-spec
5-
sourceRevisionDigest: sha256:febfc4e75bda54c43d28d51d6391b460e1398cf16379c4757ce876d1cb91aab2
6-
sourceBlobDigest: sha256:f306409792baf1e734ea791042332ba1dd480d047dc42dac05a4eb1d4dd1ff85
5+
sourceRevisionDigest: sha256:ba293416cb9b66a5eacff45be03b790391839ca7e4e9415783f2f2a4e338233f
6+
sourceBlobDigest: sha256:b974174a047a9b1dbb9946fc2708ac2b3da04d4115f154012abce2520eb10a6f
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1738196466
9+
- speakeasy-sdk-regen-1738282896
1010
- 0.0.1
1111
targets: {}
1212
workflow:

openapi-with-code-samples.yaml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2955,21 +2955,18 @@ paths:
29552955
x-speakeasy-name-override: "get"
29562956
summary: "Retrieve a customer"
29572957
x-codeSamples: [{"lang": "typescript", "label": "getCustomer", "source": "import { Dub } from \"dub\";\n\nconst dub = new Dub({\n token: \"DUB_API_KEY\",\n});\n\nasync function run() {\n const result = await dub.customers.get({\n id: \"<id>\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();"}, {"lang": "go", "label": "getCustomer", "source": "package main\n\nimport(\n\t\"context\"\n\tdubgo \"github.com/dubinc/dub-go\"\n\t\"github.com/dubinc/dub-go/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n \n s := dubgo.New(\n dubgo.WithSecurity(\"DUB_API_KEY\"),\n )\n\n res, err := s.Customers.Get(ctx, operations.GetCustomerRequest{\n ID: \"<id>\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res != nil {\n // handle response\n }\n}"}, {"lang": "ruby", "label": "getCustomer", "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::GetCustomerRequest.new(\n id: \"<id>\",\n)\n \nres = s.customers.get(req)\n\nif ! res.object.nil?\n # handle response\nend"}, {"lang": "php", "label": "getCustomer", "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\n\n$sdk = Dub\\Dub::builder()\n ->setSecurity(\n 'DUB_API_KEY'\n )\n ->build();\n\n\n\n$response = $sdk->customers->get(\n id: '<id>',\n includeExpandedFields: false\n\n);\n\nif ($response->object !== null) {\n // handle response\n}"}, {lang: python, label: getCustomer, source: "from dub import Dub\n\nwith Dub(\n token=\"DUB_API_KEY\",\n) as d_client:\n\n res = d_client.customers.get(request={\n \"id\": \"<id>\",\n })\n\n assert res is not None\n\n # Handle response\n print(res)"}, {"lang": "java", "source": "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.dub.co/customers/id\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"authorization\", \"Bearer MY_TOKEN\")\n .build();\n\nResponse response = client.newCall(request).execute();"}]
2958-
description: "Retrieve a customer by ID or external ID for the authenticated workspace."
2958+
description: "Retrieve a customer by ID for the authenticated workspace."
29592959
tags:
29602960
- "Customers"
29612961
security:
29622962
- token: []
29632963
parameters:
29642964
- in: "path"
29652965
name: "id"
2966-
description: "ID or external ID of the customer to retrieve. External ID should be prefixed with `ext_`."
2966+
description: "The unique identifier of the customer in Dub."
29672967
schema:
29682968
type: "string"
2969-
description: "ID or external ID of the customer to retrieve. External ID should be prefixed with `ext_`."
2970-
examples:
2971-
- "cus_3TagGjzRzmsFJdH8od2BNCsc"
2972-
- "ext_1234567890"
2969+
description: "The unique identifier of the customer in Dub."
29732970
required: true
29742971
- in: "query"
29752972
name: "includeExpandedFields"
@@ -3118,18 +3115,17 @@ paths:
31183115
parameters:
31193116
- in: "path"
31203117
name: "id"
3121-
description: "ID or external ID of the customer to retrieve. External ID should be prefixed with `ext_`."
3118+
description: "The unique identifier of the customer in Dub."
31223119
schema:
31233120
type: "string"
3124-
description: "ID or external ID of the customer to retrieve. External ID should be prefixed with `ext_`."
3125-
examples:
3126-
- "cus_3TagGjzRzmsFJdH8od2BNCsc"
3127-
- "ext_1234567890"
3121+
description: "The unique identifier of the customer in Dub."
31283122
required: true
31293123
- in: "query"
31303124
name: "includeExpandedFields"
3125+
description: "Whether to include expanded fields on the customer (`link`, `partner`, `discount`)."
31313126
schema:
31323127
type: "boolean"
3128+
description: "Whether to include expanded fields on the customer (`link`, `partner`, `discount`)."
31333129
requestBody:
31343130
content:
31353131
"application/json":

0 commit comments

Comments
 (0)