diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index bfa0e1a..025b62d 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 5a2dd83e-da98-455b-8ef9-0100a914efdf management: - docChecksum: 34bf2c8628db0d6fa3a73fc90d888f0c + docChecksum: 373f4c3f0a911b7ea9a64ea083111854 docVersion: 0.0.1 speakeasyVersion: 1.438.1 generationVersion: 2.457.2 - releaseVersion: 0.2.2-alpha.31 - configChecksum: 1500c211f74e539a241d9486db2cebbf + releaseVersion: 0.2.2-alpha.32 + configChecksum: 3ab49a46d6589a3fea2d260ff2c7afe6 repoURL: https://github.com/dubinc/dub-ruby.git installationURL: https://github.com/dubinc/dub-ruby published: true @@ -36,6 +36,9 @@ generatedFiles: - docs/models/operations/bulkupdatelinksresponse.md - docs/models/operations/click.md - docs/models/operations/color.md + - docs/models/operations/createcustomerrequestbody.md + - docs/models/operations/createcustomerresponse.md + - docs/models/operations/createcustomerresponsebody.md - docs/models/operations/createdomainrequestbody.md - docs/models/operations/createdomainresponse.md - docs/models/operations/createlinkrequestbody.md @@ -44,6 +47,9 @@ generatedFiles: - docs/models/operations/createtagresponse.md - docs/models/operations/customer.md - docs/models/operations/data.md + - docs/models/operations/deletecustomerrequest.md + - docs/models/operations/deletecustomerresponse.md + - docs/models/operations/deletecustomerresponsebody.md - docs/models/operations/deletedomainrequest.md - docs/models/operations/deletedomainresponse.md - docs/models/operations/deletedomainresponsebody.md @@ -54,6 +60,10 @@ generatedFiles: - docs/models/operations/deletetagresponse.md - docs/models/operations/deletetagresponsebody.md - docs/models/operations/event.md + - docs/models/operations/getcustomerrequest.md + - docs/models/operations/getcustomerresponse.md + - docs/models/operations/getcustomerresponsebody.md + - docs/models/operations/getcustomersresponse.md - docs/models/operations/getlinkinforequest.md - docs/models/operations/getlinkinforesponse.md - docs/models/operations/getlinkscountrequest.md @@ -81,6 +91,7 @@ generatedFiles: - docs/models/operations/queryparaminterval.md - docs/models/operations/queryparamtrigger.md - docs/models/operations/requestbody.md + - docs/models/operations/responsebody.md - docs/models/operations/retrieveanalyticsrequest.md - docs/models/operations/retrieveanalyticsresponse.md - docs/models/operations/sale.md @@ -97,6 +108,10 @@ generatedFiles: - docs/models/operations/tracksaleresponse.md - docs/models/operations/tracksaleresponsebody.md - docs/models/operations/trigger.md + - docs/models/operations/updatecustomerrequest.md + - docs/models/operations/updatecustomerrequestbody.md + - docs/models/operations/updatecustomerresponse.md + - docs/models/operations/updatecustomerresponsebody.md - docs/models/operations/updatedomainrequest.md - docs/models/operations/updatedomainrequestbody.md - docs/models/operations/updatedomainresponse.md @@ -160,6 +175,7 @@ generatedFiles: - docs/models/shared/users.md - docs/models/shared/workspaceschema.md - docs/sdks/analytics/README.md + - docs/sdks/customers/README.md - docs/sdks/domains/README.md - docs/sdks/dub/README.md - docs/sdks/events/README.md @@ -172,6 +188,7 @@ generatedFiles: - dub.gemspec - lib/dub.rb - lib/open_api_sdk/analytics.rb + - lib/open_api_sdk/customers.rb - lib/open_api_sdk/domains.rb - lib/open_api_sdk/dub.rb - lib/open_api_sdk/events.rb @@ -186,6 +203,9 @@ generatedFiles: - lib/open_api_sdk/models/operations/bulkupdatelinks_response.rb - lib/open_api_sdk/models/operations/click.rb - lib/open_api_sdk/models/operations/color.rb + - lib/open_api_sdk/models/operations/createcustomer_requestbody.rb + - lib/open_api_sdk/models/operations/createcustomer_response.rb + - lib/open_api_sdk/models/operations/createcustomer_responsebody.rb - lib/open_api_sdk/models/operations/createdomain_requestbody.rb - lib/open_api_sdk/models/operations/createdomain_response.rb - lib/open_api_sdk/models/operations/createlink_requestbody.rb @@ -194,6 +214,9 @@ generatedFiles: - lib/open_api_sdk/models/operations/createtag_response.rb - lib/open_api_sdk/models/operations/customer.rb - lib/open_api_sdk/models/operations/data.rb + - lib/open_api_sdk/models/operations/deletecustomer_request.rb + - lib/open_api_sdk/models/operations/deletecustomer_response.rb + - lib/open_api_sdk/models/operations/deletecustomer_responsebody.rb - lib/open_api_sdk/models/operations/deletedomain_request.rb - lib/open_api_sdk/models/operations/deletedomain_response.rb - lib/open_api_sdk/models/operations/deletedomain_responsebody.rb @@ -204,6 +227,10 @@ generatedFiles: - lib/open_api_sdk/models/operations/deletetag_response.rb - lib/open_api_sdk/models/operations/deletetag_responsebody.rb - lib/open_api_sdk/models/operations/event.rb + - lib/open_api_sdk/models/operations/getcustomer_request.rb + - lib/open_api_sdk/models/operations/getcustomer_response.rb + - lib/open_api_sdk/models/operations/getcustomer_responsebody.rb + - lib/open_api_sdk/models/operations/getcustomers_response.rb - lib/open_api_sdk/models/operations/getlinkinfo_request.rb - lib/open_api_sdk/models/operations/getlinkinfo_response.rb - lib/open_api_sdk/models/operations/getlinks_request.rb @@ -231,6 +258,7 @@ generatedFiles: - lib/open_api_sdk/models/operations/queryparam_interval.rb - lib/open_api_sdk/models/operations/queryparam_trigger.rb - lib/open_api_sdk/models/operations/requestbody.rb + - lib/open_api_sdk/models/operations/responsebody.rb - lib/open_api_sdk/models/operations/retrieveanalytics_request.rb - lib/open_api_sdk/models/operations/retrieveanalytics_response.rb - lib/open_api_sdk/models/operations/sale.rb @@ -247,6 +275,10 @@ generatedFiles: - lib/open_api_sdk/models/operations/tracksale_response.rb - lib/open_api_sdk/models/operations/tracksale_responsebody.rb - lib/open_api_sdk/models/operations/trigger.rb + - lib/open_api_sdk/models/operations/updatecustomer_request.rb + - lib/open_api_sdk/models/operations/updatecustomer_requestbody.rb + - lib/open_api_sdk/models/operations/updatecustomer_response.rb + - lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb - lib/open_api_sdk/models/operations/updatedomain_request.rb - lib/open_api_sdk/models/operations/updatedomain_requestbody.rb - lib/open_api_sdk/models/operations/updatedomain_response.rb @@ -713,7 +745,7 @@ examples: idOrSlug: "" responses: "200": - application/json: {"id": "", "name": "", "slug": "", "logo": "", "inviteCode": "", "plan": "business extra", "stripeId": "", "billingCycleStart": "900.65", "paymentFailedAt": "", "stripeConnectId": "", "usage": "5588.34", "usageLimit": "8441.99", "linksUsage": "5442.21", "linksLimit": "8306.36", "salesUsage": "5212.35", "salesLimit": "785.92", "domainsLimit": "9699.61", "tagsLimit": "8661.61", "usersLimit": "4580.49", "aiUsage": "7352.87", "aiLimit": "4508.24", "referralLinkId": "", "conversionEnabled": true, "dotLinkClaimed": true, "createdAt": "", "users": [], "domains": [], "publishableKey": ""} + application/json: {"id": "", "name": "", "slug": "", "logo": "", "inviteCode": "", "plan": "business extra", "stripeId": "", "billingCycleStart": "900.65", "paymentFailedAt": "", "stripeConnectId": "", "usage": "5588.34", "usageLimit": "8441.99", "linksUsage": "5442.21", "linksLimit": "8306.36", "salesUsage": "5212.35", "salesLimit": "785.92", "domainsLimit": "9699.61", "tagsLimit": "8661.61", "usersLimit": "4580.49", "aiUsage": "7352.87", "aiLimit": "4508.24", "referralLinkId": "", "conversionEnabled": true, "dotLinkClaimed": true, "createdAt": "", "users": [], "domains": [], "publishableKey": "", "bankAccountName": "", "partialAccountNumber": "", "routingNumber": "", "bankAccountVerified": false} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -739,7 +771,7 @@ examples: idOrSlug: "" responses: "200": - application/json: {"id": "", "name": "", "slug": "", "logo": "", "inviteCode": "", "plan": "enterprise", "stripeId": "", "billingCycleStart": "245.55", "paymentFailedAt": "", "stripeConnectId": "", "usage": "5971.29", "usageLimit": "156.52", "linksUsage": "3446.2", "linksLimit": "7084.55", "salesUsage": "9914.64", "salesLimit": "2703.24", "domainsLimit": "6276.9", "tagsLimit": "6841.99", "usersLimit": "4888.52", "aiUsage": "4430.76", "aiLimit": "9840.08", "referralLinkId": "", "conversionEnabled": true, "dotLinkClaimed": false, "createdAt": "", "users": [], "domains": [], "publishableKey": ""} + application/json: {"id": "", "name": "", "slug": "", "logo": "", "inviteCode": "", "plan": "enterprise", "stripeId": "", "billingCycleStart": "245.55", "paymentFailedAt": "", "stripeConnectId": "", "usage": "5971.29", "usageLimit": "156.52", "linksUsage": "3446.2", "linksLimit": "7084.55", "salesUsage": "9914.64", "salesLimit": "2703.24", "domainsLimit": "6276.9", "tagsLimit": "6841.99", "usersLimit": "4888.52", "aiUsage": "4430.76", "aiLimit": "9840.08", "referralLinkId": "", "conversionEnabled": true, "dotLinkClaimed": false, "createdAt": "", "users": [], "domains": [], "publishableKey": "", "bankAccountName": "", "partialAccountNumber": "", "routingNumber": "", "bankAccountVerified": false} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -968,7 +1000,7 @@ examples: application/json: {"clickId": "", "eventName": "Sign up", "customerId": ""} responses: "200": - application/json: {"click": {"id": ""}, "customer": {"id": "", "name": "", "email": "Katelin24@hotmail.com", "avatar": "https://loremflickr.com/640/480"}} + application/json: {"click": {"id": ""}, "customer": {"name": "", "email": "Katelin24@hotmail.com", "avatar": "https://loremflickr.com/640/480", "externalId": ""}} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -993,7 +1025,7 @@ examples: application/json: {"customerId": "", "amount": 996500, "paymentProcessor": "shopify", "eventName": "Purchase"} responses: "200": - application/json: {"eventName": "", "customer": {"id": "", "name": "", "email": "Larry73@hotmail.com", "avatar": "https://loremflickr.com/640/480"}, "sale": {"amount": "8624.01", "currency": "Nakfa", "paymentProcessor": "", "invoiceId": "", "metadata": {"key": "", "key1": "", "key2": ""}}} + application/json: {"eventName": "", "customer": {"id": "", "name": "", "email": "Larry73@hotmail.com", "avatar": "https://loremflickr.com/640/480", "externalId": ""}, "sale": {"amount": "8624.01", "currency": "Nakfa", "paymentProcessor": "", "invoiceId": "", "metadata": {"key": "", "key1": "", "key2": ""}}} "400": application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} "401": @@ -1043,3 +1075,127 @@ examples: responses: "200": application/json: {"title": "Dub.co - Link Management for Modern Marketing Teams", "description": "Dub.co is the open-source link management infrastructure ...", "image": "https://assets.dub.co/thumbnail.jpg"} + getCustomers: + speakeasy-default-get-customers: + responses: + "200": + application/json: [{"id": "", "externalId": "", "name": "", "createdAt": ""}, {"id": "", "externalId": "", "name": "", "createdAt": ""}, {"id": "", "externalId": "", "name": "", "createdAt": ""}] + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} + createCustomer: + speakeasy-default-create-customer: + responses: + "201": + application/json: {"id": "", "externalId": "", "name": "", "createdAt": ""} + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} + getCustomer: + speakeasy-default-get-customer: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "", "externalId": "", "name": "", "createdAt": ""} + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} + updateCustomer: + speakeasy-default-update-customer: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": "", "externalId": "", "name": "", "createdAt": ""} + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} + deleteCustomer: + speakeasy-default-delete-customer: + parameters: + path: + id: "" + responses: + "200": + application/json: {"id": ""} + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 40e2f0c..26c0d95 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false ruby: - version: 0.2.2-alpha.31 + version: 0.2.2-alpha.32 author: Dub description: Ruby Client SDK Generated by Speakeasy imports: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 51cbce3..f148fba 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.438.1 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:38a4ba7ddf108888129468f0d82285e3f1157dcbeda6384fbe6b7819a8d171f2 - sourceBlobDigest: sha256:a11010fb626e9e32fb495d600b5fffeecc8b8cc7493bf6202802461d25be157f + sourceRevisionDigest: sha256:ade642623da232e60621ed2ac3a05f573e788bb827e8af67730c074655278908 + sourceBlobDigest: sha256:15a4bc5ddf9675dc60f3829516e1561f691ca4c6c521a3fc79f59d50c77b561d tags: - latest - main @@ -11,10 +11,10 @@ targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:38a4ba7ddf108888129468f0d82285e3f1157dcbeda6384fbe6b7819a8d171f2 - sourceBlobDigest: sha256:a11010fb626e9e32fb495d600b5fffeecc8b8cc7493bf6202802461d25be157f + sourceRevisionDigest: sha256:ade642623da232e60621ed2ac3a05f573e788bb827e8af67730c074655278908 + sourceBlobDigest: sha256:15a4bc5ddf9675dc60f3829516e1561f691ca4c6c521a3fc79f59d50c77b561d codeSamplesNamespace: code-samples-ruby-my-first-target - codeSamplesRevisionDigest: sha256:3e27e1b2cfb98bb01f4ccbf4ee39763345befe851c776b3abc631fbfde4689cf + codeSamplesRevisionDigest: sha256:adb027338993fe7c821997dff2a4e19a3eeaede8ee1d80f4858c21184016947e workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/Gemfile.lock b/Gemfile.lock index a5d4440..2dac94e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dub (0.2.2.pre.alpha.31) + dub (0.2.2.pre.alpha.32) faraday faraday-multipart rack diff --git a/README.md b/README.md index 54ff08d..0dda070 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,14 @@ end * [retrieve](docs/sdks/analytics/README.md#retrieve) - Retrieve analytics for a link, a domain, or the authenticated workspace. +### [customers](docs/sdks/customers/README.md) + +* [list](docs/sdks/customers/README.md#list) - Get a list of customers +* [create](docs/sdks/customers/README.md#create) - Create a customer +* [get](docs/sdks/customers/README.md#get) - Get a customer +* [update](docs/sdks/customers/README.md#update) - Update a customer +* [delete](docs/sdks/customers/README.md#delete) - Delete a customer + ### [domains](docs/sdks/domains/README.md) * [create](docs/sdks/domains/README.md#create) - Create a domain @@ -154,7 +162,7 @@ end * [lead](docs/sdks/track/README.md#lead) - Track a lead * [sale](docs/sdks/track/README.md#sale) - Track a sale -* [customer](docs/sdks/track/README.md#customer) - Track a customer +* [~~customer~~](docs/sdks/track/README.md#customer) - Track a customer :warning: **Deprecated** ### [workspaces](docs/sdks/workspaces/README.md) diff --git a/RELEASES.md b/RELEASES.md index e9f4061..79efc67 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -458,4 +458,14 @@ Based on: ### Generated - [ruby v0.2.2-alpha.31] . ### Releases -- [Ruby Gems v0.2.2-alpha.31] https://rubygems.org/gems/dub/versions/0.2.2-alpha.31 - . \ No newline at end of file +- [Ruby Gems v0.2.2-alpha.31] https://rubygems.org/gems/dub/versions/0.2.2-alpha.31 - . + +## 2024-11-13 00:26:07 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.438.1 (2.457.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [ruby v0.2.2-alpha.32] . +### Releases +- [Ruby Gems v0.2.2-alpha.32] https://rubygems.org/gems/dub/versions/0.2.2-alpha.32 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index c20808b..0cb9b63 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -9,6 +9,36 @@ actions: - "lang": "ruby" "label": "retrieveAnalytics" "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::RetrieveAnalyticsRequest.new(\n timezone: \"America/New_York\",\n city: \"New York\",\n device: \"Desktop\",\n browser: \"Chrome\",\n os: \"Windows\",\n referer: \"google.com\",\n referer_url: \"https://dub.co/blog\",\n)\n \nres = s.analytics.retrieve(req)\n\nif ! res.one_of.nil?\n # handle response\nend" + - target: $["paths"]["/customers"]["get"] + update: + "x-codeSamples": + - "lang": "ruby" + "label": "getCustomers" + "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 \nres = s.customers.list()\n\nif ! res.response_bodies.nil?\n # handle response\nend" + - target: $["paths"]["/customers"]["post"] + update: + "x-codeSamples": + - "lang": "ruby" + "label": "createCustomer" + "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::CreateCustomerRequestBody.new(\n external_id: \"\",\n)\n \nres = s.customers.create(req)\n\nif ! res.object.nil?\n # handle response\nend" + - target: $["paths"]["/customers/{id}"]["delete"] + update: + "x-codeSamples": + - "lang": "ruby" + "label": "deleteCustomer" + "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 \nres = s.customers.delete(id=\"\")\n\nif ! res.object.nil?\n # handle response\nend" + - target: $["paths"]["/customers/{id}"]["get"] + update: + "x-codeSamples": + - "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: \"\",\n)\n \nres = s.customers.get(req)\n\nif ! res.object.nil?\n # handle response\nend" + - target: $["paths"]["/customers/{id}"]["patch"] + update: + "x-codeSamples": + - "lang": "ruby" + "label": "updateCustomer" + "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 \nres = s.customers.update(id=\"\", request_body=::OpenApiSDK::Operations::UpdateCustomerRequestBody.new())\n\nif ! res.object.nil?\n # handle response\nend" - target: $["paths"]["/domains"]["get"] update: "x-codeSamples": @@ -135,24 +165,18 @@ actions: - "lang": "ruby" "label": "updateTag" "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 \nres = s.tags.update(id=\"\", request_body=::OpenApiSDK::Operations::UpdateTagRequestBody.new())\n\nif ! res.tag_schema.nil?\n # handle response\nend" - - target: $["paths"]["/track/customer"]["post"] - update: - "x-codeSamples": - - "lang": "ruby" - "label": "trackCustomer" - "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::TrackCustomerRequestBody.new(\n customer_id: \"\",\n)\n \nres = s.track.customer(req)\n\nif ! res.object.nil?\n # handle response\nend" - target: $["paths"]["/track/lead"]["post"] update: "x-codeSamples": - "lang": "ruby" "label": "trackLead" - "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::TrackLeadRequestBody.new(\n click_id: \"\",\n event_name: \"Sign up\",\n customer_id: \"\",\n)\n \nres = s.track.lead(req)\n\nif ! res.object.nil?\n # handle response\nend" + "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::TrackLeadRequestBody.new(\n click_id: \"\",\n event_name: \"Sign up\",\n)\n \nres = s.track.lead(req)\n\nif ! res.object.nil?\n # handle response\nend" - target: $["paths"]["/track/sale"]["post"] update: "x-codeSamples": - "lang": "ruby" "label": "trackSale" - "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::TrackSaleRequestBody.new(\n customer_id: \"\",\n amount: 996500,\n payment_processor: ::OpenApiSDK::Operations::PaymentProcessor::PADDLE,\n event_name: \"Purchase\",\n)\n \nres = s.track.sale(req)\n\nif ! res.object.nil?\n # handle response\nend" + "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::TrackSaleRequestBody.new(\n amount: 996500,\n payment_processor: ::OpenApiSDK::Operations::PaymentProcessor::PADDLE,\n event_name: \"Purchase\",\n)\n \nres = s.track.sale(req)\n\nif ! res.object.nil?\n # handle response\nend" - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] update: "x-codeSamples": diff --git a/docs/models/operations/createcustomerrequestbody.md b/docs/models/operations/createcustomerrequestbody.md new file mode 100644 index 0000000..da7ff0b --- /dev/null +++ b/docs/models/operations/createcustomerrequestbody.md @@ -0,0 +1,11 @@ +# CreateCustomerRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | Email of the customer in the client's app. | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | Name of the customer in the client's app. If not provided, a random name will be generated. | +| `avatar` | *T.nilable(::String)* | :heavy_minus_sign: | Avatar URL of the customer in the client's app. | +| `external_id` | *::String* | :heavy_check_mark: | Unique identifier for the customer in the client's app. | \ No newline at end of file diff --git a/docs/models/operations/createcustomerresponse.md b/docs/models/operations/createcustomerresponse.md new file mode 100644 index 0000000..25d86a9 --- /dev/null +++ b/docs/models/operations/createcustomerresponse.md @@ -0,0 +1,20 @@ +# CreateCustomerResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(::OpenApiSDK::Operations::CreateCustomerResponseBody)](../../models/operations/createcustomerresponsebody.md) | :heavy_minus_sign: | The customer was created. | +| `bad_request` | [T.nilable(::OpenApiSDK::Shared::BadRequest)](../../models/shared/badrequest.md) | :heavy_minus_sign: | The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). | +| `unauthorized` | [T.nilable(::OpenApiSDK::Shared::Unauthorized)](../../models/shared/unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | +| `forbidden` | [T.nilable(::OpenApiSDK::Shared::Forbidden)](../../models/shared/forbidden.md) | :heavy_minus_sign: | The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. | +| `not_found` | [T.nilable(::OpenApiSDK::Shared::NotFound)](../../models/shared/notfound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | +| `conflict` | [T.nilable(::OpenApiSDK::Shared::Conflict)](../../models/shared/conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | +| `invite_expired` | [T.nilable(::OpenApiSDK::Shared::InviteExpired)](../../models/shared/inviteexpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | +| `unprocessable_entity` | [T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)](../../models/shared/unprocessableentity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | +| `rate_limit_exceeded` | [T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)](../../models/shared/ratelimitexceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | +| `internal_server_error` | [T.nilable(::OpenApiSDK::Shared::InternalServerError)](../../models/shared/internalservererror.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ No newline at end of file diff --git a/docs/models/operations/createcustomerresponsebody.md b/docs/models/operations/createcustomerresponsebody.md new file mode 100644 index 0000000..cd0b8f8 --- /dev/null +++ b/docs/models/operations/createcustomerresponsebody.md @@ -0,0 +1,15 @@ +# CreateCustomerResponseBody + +The customer was created. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The unique identifier of the customer in Dub. | +| `external_id` | *::String* | :heavy_check_mark: | Unique identifier for the customer in the client's app. | +| `name` | *::String* | :heavy_check_mark: | Name of the customer. | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | Email of the customer. | +| `avatar` | *T.nilable(::String)* | :heavy_minus_sign: | Avatar URL of the customer. | +| `created_at` | *::String* | :heavy_check_mark: | The date the customer was created. | \ No newline at end of file diff --git a/docs/models/operations/customer.md b/docs/models/operations/customer.md index 1e6292d..9a5e0da 100644 --- a/docs/models/operations/customer.md +++ b/docs/models/operations/customer.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *::String* | :heavy_check_mark: | N/A | | `name` | *::String* | :heavy_check_mark: | N/A | | `email` | *::String* | :heavy_check_mark: | N/A | -| `avatar` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file +| `avatar` | *::String* | :heavy_check_mark: | N/A | +| `external_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletecustomerrequest.md b/docs/models/operations/deletecustomerrequest.md new file mode 100644 index 0000000..6da00c0 --- /dev/null +++ b/docs/models/operations/deletecustomerrequest.md @@ -0,0 +1,8 @@ +# DeleteCustomerRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The unique identifier of the customer in Dub. | \ No newline at end of file diff --git a/docs/models/operations/deletecustomerresponse.md b/docs/models/operations/deletecustomerresponse.md new file mode 100644 index 0000000..10e0607 --- /dev/null +++ b/docs/models/operations/deletecustomerresponse.md @@ -0,0 +1,20 @@ +# DeleteCustomerResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(::OpenApiSDK::Operations::DeleteCustomerResponseBody)](../../models/operations/deletecustomerresponsebody.md) | :heavy_minus_sign: | The customer was deleted. | +| `bad_request` | [T.nilable(::OpenApiSDK::Shared::BadRequest)](../../models/shared/badrequest.md) | :heavy_minus_sign: | The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). | +| `unauthorized` | [T.nilable(::OpenApiSDK::Shared::Unauthorized)](../../models/shared/unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | +| `forbidden` | [T.nilable(::OpenApiSDK::Shared::Forbidden)](../../models/shared/forbidden.md) | :heavy_minus_sign: | The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. | +| `not_found` | [T.nilable(::OpenApiSDK::Shared::NotFound)](../../models/shared/notfound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | +| `conflict` | [T.nilable(::OpenApiSDK::Shared::Conflict)](../../models/shared/conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | +| `invite_expired` | [T.nilable(::OpenApiSDK::Shared::InviteExpired)](../../models/shared/inviteexpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | +| `unprocessable_entity` | [T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)](../../models/shared/unprocessableentity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | +| `rate_limit_exceeded` | [T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)](../../models/shared/ratelimitexceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | +| `internal_server_error` | [T.nilable(::OpenApiSDK::Shared::InternalServerError)](../../models/shared/internalservererror.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ No newline at end of file diff --git a/docs/models/operations/deletecustomerresponsebody.md b/docs/models/operations/deletecustomerresponsebody.md new file mode 100644 index 0000000..adeb855 --- /dev/null +++ b/docs/models/operations/deletecustomerresponsebody.md @@ -0,0 +1,10 @@ +# DeleteCustomerResponseBody + +The customer was deleted. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The unique identifier of the customer in Dub. | \ No newline at end of file diff --git a/docs/models/operations/getcustomerrequest.md b/docs/models/operations/getcustomerrequest.md new file mode 100644 index 0000000..3d65acd --- /dev/null +++ b/docs/models/operations/getcustomerrequest.md @@ -0,0 +1,8 @@ +# GetCustomerRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The unique identifier of the customer in Dub. | \ No newline at end of file diff --git a/docs/models/operations/getcustomerresponse.md b/docs/models/operations/getcustomerresponse.md new file mode 100644 index 0000000..4501709 --- /dev/null +++ b/docs/models/operations/getcustomerresponse.md @@ -0,0 +1,20 @@ +# GetCustomerResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(::OpenApiSDK::Operations::GetCustomerResponseBody)](../../models/operations/getcustomerresponsebody.md) | :heavy_minus_sign: | The customer object. | +| `bad_request` | [T.nilable(::OpenApiSDK::Shared::BadRequest)](../../models/shared/badrequest.md) | :heavy_minus_sign: | The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). | +| `unauthorized` | [T.nilable(::OpenApiSDK::Shared::Unauthorized)](../../models/shared/unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | +| `forbidden` | [T.nilable(::OpenApiSDK::Shared::Forbidden)](../../models/shared/forbidden.md) | :heavy_minus_sign: | The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. | +| `not_found` | [T.nilable(::OpenApiSDK::Shared::NotFound)](../../models/shared/notfound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | +| `conflict` | [T.nilable(::OpenApiSDK::Shared::Conflict)](../../models/shared/conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | +| `invite_expired` | [T.nilable(::OpenApiSDK::Shared::InviteExpired)](../../models/shared/inviteexpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | +| `unprocessable_entity` | [T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)](../../models/shared/unprocessableentity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | +| `rate_limit_exceeded` | [T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)](../../models/shared/ratelimitexceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | +| `internal_server_error` | [T.nilable(::OpenApiSDK::Shared::InternalServerError)](../../models/shared/internalservererror.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ No newline at end of file diff --git a/docs/models/operations/getcustomerresponsebody.md b/docs/models/operations/getcustomerresponsebody.md new file mode 100644 index 0000000..21dbe2a --- /dev/null +++ b/docs/models/operations/getcustomerresponsebody.md @@ -0,0 +1,15 @@ +# GetCustomerResponseBody + +The customer object. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The unique identifier of the customer in Dub. | +| `external_id` | *::String* | :heavy_check_mark: | Unique identifier for the customer in the client's app. | +| `name` | *::String* | :heavy_check_mark: | Name of the customer. | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | Email of the customer. | +| `avatar` | *T.nilable(::String)* | :heavy_minus_sign: | Avatar URL of the customer. | +| `created_at` | *::String* | :heavy_check_mark: | The date the customer was created. | \ No newline at end of file diff --git a/docs/models/operations/getcustomersresponse.md b/docs/models/operations/getcustomersresponse.md new file mode 100644 index 0000000..290291c --- /dev/null +++ b/docs/models/operations/getcustomersresponse.md @@ -0,0 +1,20 @@ +# GetCustomersResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `response_bodies` | T::Array<[::OpenApiSDK::Operations::ResponseBody](../../models/operations/responsebody.md)> | :heavy_minus_sign: | The list of customers. | +| `bad_request` | [T.nilable(::OpenApiSDK::Shared::BadRequest)](../../models/shared/badrequest.md) | :heavy_minus_sign: | The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). | +| `unauthorized` | [T.nilable(::OpenApiSDK::Shared::Unauthorized)](../../models/shared/unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | +| `forbidden` | [T.nilable(::OpenApiSDK::Shared::Forbidden)](../../models/shared/forbidden.md) | :heavy_minus_sign: | The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. | +| `not_found` | [T.nilable(::OpenApiSDK::Shared::NotFound)](../../models/shared/notfound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | +| `conflict` | [T.nilable(::OpenApiSDK::Shared::Conflict)](../../models/shared/conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | +| `invite_expired` | [T.nilable(::OpenApiSDK::Shared::InviteExpired)](../../models/shared/inviteexpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | +| `unprocessable_entity` | [T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)](../../models/shared/unprocessableentity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | +| `rate_limit_exceeded` | [T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)](../../models/shared/ratelimitexceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | +| `internal_server_error` | [T.nilable(::OpenApiSDK::Shared::InternalServerError)](../../models/shared/internalservererror.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ No newline at end of file diff --git a/docs/models/operations/responsebody.md b/docs/models/operations/responsebody.md new file mode 100644 index 0000000..2395172 --- /dev/null +++ b/docs/models/operations/responsebody.md @@ -0,0 +1,13 @@ +# ResponseBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The unique identifier of the customer in Dub. | +| `external_id` | *::String* | :heavy_check_mark: | Unique identifier for the customer in the client's app. | +| `name` | *::String* | :heavy_check_mark: | Name of the customer. | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | Email of the customer. | +| `avatar` | *T.nilable(::String)* | :heavy_minus_sign: | Avatar URL of the customer. | +| `created_at` | *::String* | :heavy_check_mark: | The date the customer was created. | \ No newline at end of file diff --git a/docs/models/operations/trackleadrequestbody.md b/docs/models/operations/trackleadrequestbody.md index 527d938..2f803f6 100644 --- a/docs/models/operations/trackleadrequestbody.md +++ b/docs/models/operations/trackleadrequestbody.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `click_id` | *::String* | :heavy_check_mark: | The ID of the click in th Dub. You can read this value from `dub_id` cookie. | | -| `event_name` | *::String* | :heavy_check_mark: | The name of the event to track. | Sign up | -| `customer_id` | *::String* | :heavy_check_mark: | This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. | | -| `customer_name` | *T.nilable(::String)* | :heavy_minus_sign: | Name of the customer in the client's app. | | -| `customer_email` | *T.nilable(::String)* | :heavy_minus_sign: | Email of the customer in the client's app. | | -| `customer_avatar` | *T.nilable(::String)* | :heavy_minus_sign: | Avatar of the customer in the client's app. | | -| `metadata` | T::Hash[Symbol, *::Object*] | :heavy_minus_sign: | Additional metadata to be stored with the lead event | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `click_id` | *::String* | :heavy_check_mark: | The ID of the click in th Dub. You can read this value from `dub_id` cookie. | | +| `event_name` | *::String* | :heavy_check_mark: | The name of the event to track. | Sign up | +| `external_id` | *T.nilable(::String)* | :heavy_minus_sign: | This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. | | +| ~~`customer_id`~~ | *T.nilable(::String)* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. | | +| `customer_name` | *T.nilable(::String)* | :heavy_minus_sign: | Name of the customer in the client's app. | | +| `customer_email` | *T.nilable(::String)* | :heavy_minus_sign: | Email of the customer in the client's app. | | +| `customer_avatar` | *T.nilable(::String)* | :heavy_minus_sign: | Avatar of the customer in the client's app. | | +| `metadata` | T::Hash[Symbol, *::Object*] | :heavy_minus_sign: | Additional metadata to be stored with the lead event | | \ No newline at end of file diff --git a/docs/models/operations/tracksalecustomer.md b/docs/models/operations/tracksalecustomer.md index 72d1ca2..51bb92a 100644 --- a/docs/models/operations/tracksalecustomer.md +++ b/docs/models/operations/tracksalecustomer.md @@ -8,4 +8,5 @@ | `id` | *::String* | :heavy_check_mark: | N/A | | `name` | *::String* | :heavy_check_mark: | N/A | | `email` | *::String* | :heavy_check_mark: | N/A | -| `avatar` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file +| `avatar` | *::String* | :heavy_check_mark: | N/A | +| `external_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/tracksalerequestbody.md b/docs/models/operations/tracksalerequestbody.md index ba4afce..7a081f8 100644 --- a/docs/models/operations/tracksalerequestbody.md +++ b/docs/models/operations/tracksalerequestbody.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `customer_id` | *::String* | :heavy_check_mark: | This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. | | -| `amount` | *::Integer* | :heavy_check_mark: | The amount of the sale. Should be passed in cents. | | -| `payment_processor` | [::OpenApiSDK::Operations::PaymentProcessor](../../models/operations/paymentprocessor.md) | :heavy_check_mark: | The payment processor via which the sale was made. | | -| `event_name` | *T.nilable(::String)* | :heavy_minus_sign: | The name of the sale event. It can be used to track different types of event for example 'Purchase', 'Upgrade', 'Payment', etc. | Purchase | -| `invoice_id` | *T.nilable(::String)* | :heavy_minus_sign: | The invoice ID of the sale. | | -| `currency` | *T.nilable(::String)* | :heavy_minus_sign: | The currency of the sale. Accepts ISO 4217 currency codes. | | -| `metadata` | T::Hash[Symbol, *::Object*] | :heavy_minus_sign: | Additional metadata to be stored with the sale event. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `external_id` | *T.nilable(::String)* | :heavy_minus_sign: | This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. | | +| ~~`customer_id`~~ | *T.nilable(::String)* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. | | +| `amount` | *::Integer* | :heavy_check_mark: | The amount of the sale. Should be passed in cents. | | +| `payment_processor` | [::OpenApiSDK::Operations::PaymentProcessor](../../models/operations/paymentprocessor.md) | :heavy_check_mark: | The payment processor via which the sale was made. | | +| `event_name` | *T.nilable(::String)* | :heavy_minus_sign: | The name of the sale event. It can be used to track different types of event for example 'Purchase', 'Upgrade', 'Payment', etc. | Purchase | +| `invoice_id` | *T.nilable(::String)* | :heavy_minus_sign: | The invoice ID of the sale. | | +| `currency` | *T.nilable(::String)* | :heavy_minus_sign: | The currency of the sale. Accepts ISO 4217 currency codes. | | +| `metadata` | T::Hash[Symbol, *::Object*] | :heavy_minus_sign: | Additional metadata to be stored with the sale event. | | \ No newline at end of file diff --git a/docs/models/operations/updatecustomerrequest.md b/docs/models/operations/updatecustomerrequest.md new file mode 100644 index 0000000..a3264de --- /dev/null +++ b/docs/models/operations/updatecustomerrequest.md @@ -0,0 +1,9 @@ +# UpdateCustomerRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The unique identifier of the customer in Dub. | +| `request_body` | [T.nilable(::OpenApiSDK::Operations::UpdateCustomerRequestBody)](../../models/operations/updatecustomerrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatecustomerrequestbody.md b/docs/models/operations/updatecustomerrequestbody.md new file mode 100644 index 0000000..ddcee51 --- /dev/null +++ b/docs/models/operations/updatecustomerrequestbody.md @@ -0,0 +1,11 @@ +# UpdateCustomerRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | Email of the customer in the client's app. | +| `name` | *T.nilable(::String)* | :heavy_minus_sign: | Name of the customer in the client's app. If not provided, a random name will be generated. | +| `avatar` | *T.nilable(::String)* | :heavy_minus_sign: | Avatar URL of the customer in the client's app. | +| `external_id` | *T.nilable(::String)* | :heavy_minus_sign: | Unique identifier for the customer in the client's app. | \ No newline at end of file diff --git a/docs/models/operations/updatecustomerresponse.md b/docs/models/operations/updatecustomerresponse.md new file mode 100644 index 0000000..b783a20 --- /dev/null +++ b/docs/models/operations/updatecustomerresponse.md @@ -0,0 +1,20 @@ +# UpdateCustomerResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(::OpenApiSDK::Operations::UpdateCustomerResponseBody)](../../models/operations/updatecustomerresponsebody.md) | :heavy_minus_sign: | The customer was updated. | +| `bad_request` | [T.nilable(::OpenApiSDK::Shared::BadRequest)](../../models/shared/badrequest.md) | :heavy_minus_sign: | The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). | +| `unauthorized` | [T.nilable(::OpenApiSDK::Shared::Unauthorized)](../../models/shared/unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | +| `forbidden` | [T.nilable(::OpenApiSDK::Shared::Forbidden)](../../models/shared/forbidden.md) | :heavy_minus_sign: | The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. | +| `not_found` | [T.nilable(::OpenApiSDK::Shared::NotFound)](../../models/shared/notfound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | +| `conflict` | [T.nilable(::OpenApiSDK::Shared::Conflict)](../../models/shared/conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | +| `invite_expired` | [T.nilable(::OpenApiSDK::Shared::InviteExpired)](../../models/shared/inviteexpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | +| `unprocessable_entity` | [T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)](../../models/shared/unprocessableentity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | +| `rate_limit_exceeded` | [T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)](../../models/shared/ratelimitexceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | +| `internal_server_error` | [T.nilable(::OpenApiSDK::Shared::InternalServerError)](../../models/shared/internalservererror.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ No newline at end of file diff --git a/docs/models/operations/updatecustomerresponsebody.md b/docs/models/operations/updatecustomerresponsebody.md new file mode 100644 index 0000000..408363c --- /dev/null +++ b/docs/models/operations/updatecustomerresponsebody.md @@ -0,0 +1,15 @@ +# UpdateCustomerResponseBody + +The customer was updated. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The unique identifier of the customer in Dub. | +| `external_id` | *::String* | :heavy_check_mark: | Unique identifier for the customer in the client's app. | +| `name` | *::String* | :heavy_check_mark: | Name of the customer. | +| `email` | *T.nilable(::String)* | :heavy_minus_sign: | Email of the customer. | +| `avatar` | *T.nilable(::String)* | :heavy_minus_sign: | Avatar URL of the customer. | +| `created_at` | *::String* | :heavy_check_mark: | The date the customer was created. | \ No newline at end of file diff --git a/docs/models/shared/workspaceschema.md b/docs/models/shared/workspaceschema.md index 5297ff2..140c002 100644 --- a/docs/models/shared/workspaceschema.md +++ b/docs/models/shared/workspaceschema.md @@ -14,7 +14,7 @@ | `stripe_id` | *::String* | :heavy_check_mark: | The Stripe ID of the workspace. | | `billing_cycle_start` | *::Float* | :heavy_check_mark: | The date and time when the billing cycle starts for the workspace. | | `payment_failed_at` | *::String* | :heavy_check_mark: | The date and time when the payment failed for the workspace. | -| `stripe_connect_id` | *::String* | :heavy_check_mark: | [BETA]: The Stripe Connect ID of the workspace. | +| `stripe_connect_id` | *::String* | :heavy_check_mark: | [BETA – Dub Conversions]: The Stripe Connect ID of the workspace. | | `usage` | *::Float* | :heavy_check_mark: | The usage of the workspace. | | `usage_limit` | *::Float* | :heavy_check_mark: | The usage limit of the workspace. | | `links_usage` | *::Float* | :heavy_check_mark: | The links usage of the workspace. | @@ -33,4 +33,8 @@ | `users` | T::Array<[::OpenApiSDK::Shared::Users](../../models/shared/users.md)> | :heavy_check_mark: | The role of the authenticated user in the workspace. | | `domains` | T::Array<[::OpenApiSDK::Shared::Domains](../../models/shared/domains.md)> | :heavy_check_mark: | The domains of the workspace. | | `flags` | T::Hash[Symbol, *T::Boolean*] | :heavy_minus_sign: | The feature flags of the workspace, indicating which features are enabled. | -| `publishable_key` | *::String* | :heavy_check_mark: | The publishable key of the workspace. | \ No newline at end of file +| `publishable_key` | *::String* | :heavy_check_mark: | The publishable key of the workspace. | +| `bank_account_name` | *::String* | :heavy_check_mark: | [BETA – Dub Partners]: The name of the connected bank account. | +| `partial_account_number` | *::String* | :heavy_check_mark: | [BETA – Dub Partners]: The partial account number of the bank account. | +| `routing_number` | *::String* | :heavy_check_mark: | [BETA – Dub Partners]: The routing number of the bank account. | +| `bank_account_verified` | *T::Boolean* | :heavy_check_mark: | [BETA – Dub Partners]: Whether the bank account is verified. | \ No newline at end of file diff --git a/docs/sdks/customers/README.md b/docs/sdks/customers/README.md new file mode 100644 index 0000000..543a058 --- /dev/null +++ b/docs/sdks/customers/README.md @@ -0,0 +1,204 @@ +# Customers +(*customers*) + +## Overview + +### Available Operations + +* [list](#list) - Get a list of customers +* [create](#create) - Create a customer +* [get](#get) - Get a customer +* [update](#update) - Update a customer +* [delete](#delete) - Delete a customer + +## list + +Get a list of customers for the authenticated workspace. + +### Example Usage + +```ruby +require 'dub' + + +s = ::OpenApiSDK::Dub.new +s.config_security( + ::OpenApiSDK::Shared::Security.new( + token: "DUB_API_KEY", + ) +) + + +res = s.customers.list() + +if ! res.response_bodies.nil? + # handle response +end + +``` + +### Response + +**[T.nilable(::OpenApiSDK::Operations::GetCustomersResponse)](../../models/operations/getcustomersresponse.md)** + + + +## create + +Create a customer for the authenticated workspace. + +### Example Usage + +```ruby +require 'dub' + + +s = ::OpenApiSDK::Dub.new +s.config_security( + ::OpenApiSDK::Shared::Security.new( + token: "DUB_API_KEY", + ) +) + + +req = ::OpenApiSDK::Operations::CreateCustomerRequestBody.new( + external_id: "", +) + +res = s.customers.create(req) + +if ! res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `request` | [::OpenApiSDK::Operations::CreateCustomerRequestBody](../../models/operations/createcustomerrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(::OpenApiSDK::Operations::CreateCustomerResponse)](../../models/operations/createcustomerresponse.md)** + + + +## get + +Get a customer by ID for the authenticated workspace. + +### Example Usage + +```ruby +require 'dub' + + +s = ::OpenApiSDK::Dub.new +s.config_security( + ::OpenApiSDK::Shared::Security.new( + token: "DUB_API_KEY", + ) +) + + +req = ::OpenApiSDK::Operations::GetCustomerRequest.new( + id: "", +) + +res = s.customers.get(req) + +if ! res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `request` | [::OpenApiSDK::Operations::GetCustomerRequest](../../models/operations/getcustomerrequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(::OpenApiSDK::Operations::GetCustomerResponse)](../../models/operations/getcustomerresponse.md)** + + + +## update + +Update a customer for the authenticated workspace. + +### Example Usage + +```ruby +require 'dub' + + +s = ::OpenApiSDK::Dub.new +s.config_security( + ::OpenApiSDK::Shared::Security.new( + token: "DUB_API_KEY", + ) +) + + +res = s.customers.update(id="", request_body=::OpenApiSDK::Operations::UpdateCustomerRequestBody.new()) + +if ! res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The unique identifier of the customer in Dub. | +| `request_body` | [T.nilable(::OpenApiSDK::Operations::UpdateCustomerRequestBody)](../../models/operations/updatecustomerrequestbody.md) | :heavy_minus_sign: | N/A | + +### Response + +**[T.nilable(::OpenApiSDK::Operations::UpdateCustomerResponse)](../../models/operations/updatecustomerresponse.md)** + + + +## delete + +Delete a customer from a workspace. + +### Example Usage + +```ruby +require 'dub' + + +s = ::OpenApiSDK::Dub.new +s.config_security( + ::OpenApiSDK::Shared::Security.new( + token: "DUB_API_KEY", + ) +) + + +res = s.customers.delete(id="") + +if ! res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `id` | *::String* | :heavy_check_mark: | The unique identifier of the customer in Dub. | + +### Response + +**[T.nilable(::OpenApiSDK::Operations::DeleteCustomerResponse)](../../models/operations/deletecustomerresponse.md)** + diff --git a/docs/sdks/track/README.md b/docs/sdks/track/README.md index 2e2a162..06566ea 100644 --- a/docs/sdks/track/README.md +++ b/docs/sdks/track/README.md @@ -7,7 +7,7 @@ * [lead](#lead) - Track a lead * [sale](#sale) - Track a sale -* [customer](#customer) - Track a customer +* [~~customer~~](#customer) - Track a customer :warning: **Deprecated** ## lead @@ -30,7 +30,6 @@ s.config_security( req = ::OpenApiSDK::Operations::TrackLeadRequestBody.new( click_id: "", event_name: "Sign up", - customer_id: "", ) res = s.track.lead(req) @@ -72,7 +71,6 @@ s.config_security( req = ::OpenApiSDK::Operations::TrackSaleRequestBody.new( - customer_id: "", amount: 996500, payment_processor: ::OpenApiSDK::Operations::PaymentProcessor::PADDLE, event_name: "Purchase", @@ -98,10 +96,12 @@ end -## customer +## ~~customer~~ Track a customer for an authenticated workspace. +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + ### Example Usage ```ruby diff --git a/dub.gemspec b/dub.gemspec index 6bc3f53..9e94be9 100644 --- a/dub.gemspec +++ b/dub.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__) Gem::Specification.new do |s| s.name = 'dub' - s.version = '0.2.2-alpha.31' + s.version = '0.2.2-alpha.32' s.platform = Gem::Platform::RUBY s.licenses = ['Apache-2.0'] s.summary = '' diff --git a/lib/dub.rb b/lib/dub.rb index 2baa51f..53cc344 100644 --- a/lib/dub.rb +++ b/lib/dub.rb @@ -8,13 +8,14 @@ module OpenApiSDK autoload :Shared, 'open_api_sdk/models/shared' autoload :Operations, 'open_api_sdk/models/operations' autoload :Links, 'open_api_sdk/links' - autoload :QRCodes, 'open_api_sdk/qr_codes' autoload :Analytics, 'open_api_sdk/analytics' autoload :Events, 'open_api_sdk/events' - autoload :Workspaces, 'open_api_sdk/workspaces' autoload :Tags, 'open_api_sdk/tags' autoload :Domains, 'open_api_sdk/domains' autoload :Track, 'open_api_sdk/track' + autoload :Customers, 'open_api_sdk/customers' + autoload :Workspaces, 'open_api_sdk/workspaces' + autoload :QRCodes, 'open_api_sdk/qr_codes' autoload :Metatags, 'open_api_sdk/metatags' end diff --git a/lib/open_api_sdk/customers.rb b/lib/open_api_sdk/customers.rb new file mode 100644 index 0000000..8db9340 --- /dev/null +++ b/lib/open_api_sdk/customers.rb @@ -0,0 +1,434 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'sorbet-runtime' + +module OpenApiSDK + extend T::Sig + class Customers + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { returns(::OpenApiSDK::Operations::GetCustomersResponse) } + def list + # list - Get a list of customers + # Get a list of customers for the authenticated workspace. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/customers" + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + r = @sdk_configuration.client.get(url) do |req| + req.headers = headers + Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + end + + content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + + res = ::OpenApiSDK::Operations::GetCustomersResponse.new( + status_code: r.status, content_type: content_type, raw_response: r + ) + if r.status == 200 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Operations::ResponseBody]) + res.response_bodies = out + end + elsif r.status == 400 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest) + res.bad_request = out + end + elsif r.status == 401 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized) + res.unauthorized = out + end + elsif r.status == 403 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden) + res.forbidden = out + end + elsif r.status == 404 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound) + res.not_found = out + end + elsif r.status == 409 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict) + res.conflict = out + end + elsif r.status == 410 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired) + res.invite_expired = out + end + elsif r.status == 422 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity) + res.unprocessable_entity = out + end + elsif r.status == 429 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded) + res.rate_limit_exceeded = out + end + elsif r.status == 500 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError) + res.internal_server_error = out + end + end + res + end + + + sig { params(request: T.nilable(::OpenApiSDK::Operations::CreateCustomerRequestBody)).returns(::OpenApiSDK::Operations::CreateCustomerResponse) } + def create(request) + # create - Create a customer + # Create a customer for the authenticated workspace. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/customers" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + r = @sdk_configuration.client.post(url) do |req| + req.headers = headers + Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + if form + req.body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + req.body = URI.encode_www_form(data) + else + req.body = data + end + end + + content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + + res = ::OpenApiSDK::Operations::CreateCustomerResponse.new( + status_code: r.status, content_type: content_type, raw_response: r + ) + if r.status == 201 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::CreateCustomerResponseBody) + res.object = out + end + elsif r.status == 400 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest) + res.bad_request = out + end + elsif r.status == 401 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized) + res.unauthorized = out + end + elsif r.status == 403 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden) + res.forbidden = out + end + elsif r.status == 404 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound) + res.not_found = out + end + elsif r.status == 409 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict) + res.conflict = out + end + elsif r.status == 410 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired) + res.invite_expired = out + end + elsif r.status == 422 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity) + res.unprocessable_entity = out + end + elsif r.status == 429 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded) + res.rate_limit_exceeded = out + end + elsif r.status == 500 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError) + res.internal_server_error = out + end + end + res + end + + + sig { params(request: T.nilable(::OpenApiSDK::Operations::GetCustomerRequest)).returns(::OpenApiSDK::Operations::GetCustomerResponse) } + def get(request) + # get - Get a customer + # Get a customer by ID for the authenticated workspace. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + ::OpenApiSDK::Operations::GetCustomerRequest, + base_url, + '/customers/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + r = @sdk_configuration.client.get(url) do |req| + req.headers = headers + Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + end + + content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + + res = ::OpenApiSDK::Operations::GetCustomerResponse.new( + status_code: r.status, content_type: content_type, raw_response: r + ) + if r.status == 200 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::GetCustomerResponseBody) + res.object = out + end + elsif r.status == 400 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest) + res.bad_request = out + end + elsif r.status == 401 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized) + res.unauthorized = out + end + elsif r.status == 403 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden) + res.forbidden = out + end + elsif r.status == 404 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound) + res.not_found = out + end + elsif r.status == 409 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict) + res.conflict = out + end + elsif r.status == 410 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired) + res.invite_expired = out + end + elsif r.status == 422 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity) + res.unprocessable_entity = out + end + elsif r.status == 429 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded) + res.rate_limit_exceeded = out + end + elsif r.status == 500 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError) + res.internal_server_error = out + end + end + res + end + + + sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdateCustomerRequest)).returns(::OpenApiSDK::Operations::UpdateCustomerResponse) } + def update(request) + # update - Update a customer + # Update a customer for the authenticated workspace. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + ::OpenApiSDK::Operations::UpdateCustomerRequest, + base_url, + '/customers/{id}', + request + ) + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json) + headers['content-type'] = req_content_type + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + r = @sdk_configuration.client.patch(url) do |req| + req.headers = headers + Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + if form + req.body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + req.body = URI.encode_www_form(data) + else + req.body = data + end + end + + content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + + res = ::OpenApiSDK::Operations::UpdateCustomerResponse.new( + status_code: r.status, content_type: content_type, raw_response: r + ) + if r.status == 200 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::UpdateCustomerResponseBody) + res.object = out + end + elsif r.status == 400 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest) + res.bad_request = out + end + elsif r.status == 401 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized) + res.unauthorized = out + end + elsif r.status == 403 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden) + res.forbidden = out + end + elsif r.status == 404 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound) + res.not_found = out + end + elsif r.status == 409 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict) + res.conflict = out + end + elsif r.status == 410 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired) + res.invite_expired = out + end + elsif r.status == 422 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity) + res.unprocessable_entity = out + end + elsif r.status == 429 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded) + res.rate_limit_exceeded = out + end + elsif r.status == 500 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError) + res.internal_server_error = out + end + end + res + end + + + sig { params(request: T.nilable(::OpenApiSDK::Operations::DeleteCustomerRequest)).returns(::OpenApiSDK::Operations::DeleteCustomerResponse) } + def delete(request) + # delete - Delete a customer + # Delete a customer from a workspace. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = Utils.generate_url( + ::OpenApiSDK::Operations::DeleteCustomerRequest, + base_url, + '/customers/{id}', + request + ) + headers = {} + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + r = @sdk_configuration.client.delete(url) do |req| + req.headers = headers + Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + end + + content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + + res = ::OpenApiSDK::Operations::DeleteCustomerResponse.new( + status_code: r.status, content_type: content_type, raw_response: r + ) + if r.status == 200 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::DeleteCustomerResponseBody) + res.object = out + end + elsif r.status == 400 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest) + res.bad_request = out + end + elsif r.status == 401 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized) + res.unauthorized = out + end + elsif r.status == 403 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden) + res.forbidden = out + end + elsif r.status == 404 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound) + res.not_found = out + end + elsif r.status == 409 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict) + res.conflict = out + end + elsif r.status == 410 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired) + res.invite_expired = out + end + elsif r.status == 422 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity) + res.unprocessable_entity = out + end + elsif r.status == 429 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded) + res.rate_limit_exceeded = out + end + elsif r.status == 500 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError) + res.internal_server_error = out + end + end + res + end + end +end diff --git a/lib/open_api_sdk/dub.rb b/lib/open_api_sdk/dub.rb index cd547e9..4c7db8f 100644 --- a/lib/open_api_sdk/dub.rb +++ b/lib/open_api_sdk/dub.rb @@ -13,7 +13,7 @@ module OpenApiSDK class Dub extend T::Sig - attr_accessor :links, :qr_codes, :analytics, :events, :workspaces, :tags, :domains, :track, :metatags + attr_accessor :links, :analytics, :events, :tags, :domains, :track, :customers, :workspaces, :qr_codes, :metatags sig do params(client: Faraday::Request, @@ -76,13 +76,14 @@ def config_security(security) sig { void } def init_sdks @links = Links.new(@sdk_configuration) - @qr_codes = QRCodes.new(@sdk_configuration) @analytics = Analytics.new(@sdk_configuration) @events = Events.new(@sdk_configuration) - @workspaces = Workspaces.new(@sdk_configuration) @tags = Tags.new(@sdk_configuration) @domains = Domains.new(@sdk_configuration) @track = Track.new(@sdk_configuration) + @customers = Customers.new(@sdk_configuration) + @workspaces = Workspaces.new(@sdk_configuration) + @qr_codes = QRCodes.new(@sdk_configuration) @metatags = Metatags.new(@sdk_configuration) end end diff --git a/lib/open_api_sdk/models/operations.rb b/lib/open_api_sdk/models/operations.rb index 9b63d16..ad83d72 100644 --- a/lib/open_api_sdk/models/operations.rb +++ b/lib/open_api_sdk/models/operations.rb @@ -30,9 +30,6 @@ module Operations autoload :BulkDeleteLinksResponse, 'open_api_sdk/models/operations/bulkdeletelinks_response.rb' autoload :UpsertLinkRequestBody, 'open_api_sdk/models/operations/upsertlink_requestbody.rb' autoload :UpsertLinkResponse, 'open_api_sdk/models/operations/upsertlink_response.rb' - autoload :Level, 'open_api_sdk/models/operations/level.rb' - autoload :GetQRCodeRequest, 'open_api_sdk/models/operations/getqrcode_request.rb' - autoload :GetQRCodeResponse, 'open_api_sdk/models/operations/getqrcode_response.rb' autoload :Event, 'open_api_sdk/models/operations/event.rb' autoload :GroupBy, 'open_api_sdk/models/operations/groupby.rb' autoload :Interval, 'open_api_sdk/models/operations/interval.rb' @@ -46,11 +43,6 @@ module Operations autoload :SortBy, 'open_api_sdk/models/operations/sortby.rb' autoload :ListEventsRequest, 'open_api_sdk/models/operations/listevents_request.rb' autoload :ListEventsResponse, 'open_api_sdk/models/operations/listevents_response.rb' - autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb' - autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb' - autoload :UpdateWorkspaceRequestBody, 'open_api_sdk/models/operations/updateworkspace_requestbody.rb' - autoload :UpdateWorkspaceRequest, 'open_api_sdk/models/operations/updateworkspace_request.rb' - autoload :UpdateWorkspaceResponse, 'open_api_sdk/models/operations/updateworkspace_response.rb' autoload :Color, 'open_api_sdk/models/operations/color.rb' autoload :CreateTagRequestBody, 'open_api_sdk/models/operations/createtag_requestbody.rb' autoload :CreateTagResponse, 'open_api_sdk/models/operations/createtag_response.rb' @@ -86,6 +78,29 @@ module Operations autoload :TrackCustomerRequestBody, 'open_api_sdk/models/operations/trackcustomer_requestbody.rb' autoload :TrackCustomerResponseBody, 'open_api_sdk/models/operations/trackcustomer_responsebody.rb' autoload :TrackCustomerResponse, 'open_api_sdk/models/operations/trackcustomer_response.rb' + autoload :ResponseBody, 'open_api_sdk/models/operations/responsebody.rb' + autoload :GetCustomersResponse, 'open_api_sdk/models/operations/getcustomers_response.rb' + autoload :CreateCustomerRequestBody, 'open_api_sdk/models/operations/createcustomer_requestbody.rb' + autoload :CreateCustomerResponseBody, 'open_api_sdk/models/operations/createcustomer_responsebody.rb' + autoload :CreateCustomerResponse, 'open_api_sdk/models/operations/createcustomer_response.rb' + autoload :GetCustomerRequest, 'open_api_sdk/models/operations/getcustomer_request.rb' + autoload :GetCustomerResponseBody, 'open_api_sdk/models/operations/getcustomer_responsebody.rb' + autoload :GetCustomerResponse, 'open_api_sdk/models/operations/getcustomer_response.rb' + autoload :UpdateCustomerRequestBody, 'open_api_sdk/models/operations/updatecustomer_requestbody.rb' + autoload :UpdateCustomerRequest, 'open_api_sdk/models/operations/updatecustomer_request.rb' + autoload :UpdateCustomerResponseBody, 'open_api_sdk/models/operations/updatecustomer_responsebody.rb' + autoload :UpdateCustomerResponse, 'open_api_sdk/models/operations/updatecustomer_response.rb' + autoload :DeleteCustomerRequest, 'open_api_sdk/models/operations/deletecustomer_request.rb' + autoload :DeleteCustomerResponseBody, 'open_api_sdk/models/operations/deletecustomer_responsebody.rb' + autoload :DeleteCustomerResponse, 'open_api_sdk/models/operations/deletecustomer_response.rb' + autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb' + autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb' + autoload :UpdateWorkspaceRequestBody, 'open_api_sdk/models/operations/updateworkspace_requestbody.rb' + autoload :UpdateWorkspaceRequest, 'open_api_sdk/models/operations/updateworkspace_request.rb' + autoload :UpdateWorkspaceResponse, 'open_api_sdk/models/operations/updateworkspace_response.rb' + autoload :Level, 'open_api_sdk/models/operations/level.rb' + autoload :GetQRCodeRequest, 'open_api_sdk/models/operations/getqrcode_request.rb' + autoload :GetQRCodeResponse, 'open_api_sdk/models/operations/getqrcode_response.rb' autoload :GetMetatagsRequest, 'open_api_sdk/models/operations/getmetatags_request.rb' autoload :GetMetatagsResponseBody, 'open_api_sdk/models/operations/getmetatags_responsebody.rb' autoload :GetMetatagsResponse, 'open_api_sdk/models/operations/getmetatags_response.rb' diff --git a/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb b/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb new file mode 100644 index 0000000..dba51a0 --- /dev/null +++ b/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class CreateCustomerRequestBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # Unique identifier for the customer in the client's app. + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } } + # Avatar URL of the customer in the client's app. + field :avatar, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar') } } + # Email of the customer in the client's app. + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + # Name of the customer in the client's app. If not provided, a random name will be generated. + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + + sig { params(external_id: ::String, avatar: T.nilable(::String), email: T.nilable(::String), name: T.nilable(::String)).void } + def initialize(external_id: nil, avatar: nil, email: nil, name: nil) + @external_id = external_id + @avatar = avatar + @email = email + @name = name + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/createcustomer_response.rb b/lib/open_api_sdk/models/operations/createcustomer_response.rb new file mode 100644 index 0000000..b2bc8ef --- /dev/null +++ b/lib/open_api_sdk/models/operations/createcustomer_response.rb @@ -0,0 +1,60 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class CreateCustomerResponse < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). + field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest) + # This response is sent when a request conflicts with the current state of the server. + field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict) + # The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. + field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden) + # The server has encountered a situation it does not know how to handle. + field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError) + # This response is sent when the requested content has been permanently deleted from server, with no forwarding address. + field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired) + # The server cannot find the requested resource. + field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound) + # The customer was created. + field :object, T.nilable(::OpenApiSDK::Operations::CreateCustomerResponseBody) + # The user has sent too many requests in a given amount of time ("rate limiting") + field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded) + # Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized) + # The request was well-formed but was unable to be followed due to semantic errors. + field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::OpenApiSDK::Shared::BadRequest), conflict: T.nilable(::OpenApiSDK::Shared::Conflict), forbidden: T.nilable(::OpenApiSDK::Shared::Forbidden), internal_server_error: T.nilable(::OpenApiSDK::Shared::InternalServerError), invite_expired: T.nilable(::OpenApiSDK::Shared::InviteExpired), not_found: T.nilable(::OpenApiSDK::Shared::NotFound), object: T.nilable(::OpenApiSDK::Operations::CreateCustomerResponseBody), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil, forbidden: nil, internal_server_error: nil, invite_expired: nil, not_found: nil, object: nil, rate_limit_exceeded: nil, unauthorized: nil, unprocessable_entity: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @bad_request = bad_request + @conflict = conflict + @forbidden = forbidden + @internal_server_error = internal_server_error + @invite_expired = invite_expired + @not_found = not_found + @object = object + @rate_limit_exceeded = rate_limit_exceeded + @unauthorized = unauthorized + @unprocessable_entity = unprocessable_entity + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb b/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb new file mode 100644 index 0000000..bafac9c --- /dev/null +++ b/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # The customer was created. + class CreateCustomerResponseBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # The date the customer was created. + field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } } + # Unique identifier for the customer in the client's app. + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } } + # The unique identifier of the customer in Dub. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Name of the customer. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # Avatar URL of the customer. + field :avatar, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar') } } + # Email of the customer. + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + + + sig { params(created_at: ::String, external_id: ::String, id: ::String, name: ::String, avatar: T.nilable(::String), email: T.nilable(::String)).void } + def initialize(created_at: nil, external_id: nil, id: nil, name: nil, avatar: nil, email: nil) + @created_at = created_at + @external_id = external_id + @id = id + @name = name + @avatar = avatar + @email = email + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/customer.rb b/lib/open_api_sdk/models/operations/customer.rb index 3be6fb8..f3f1ad0 100644 --- a/lib/open_api_sdk/models/operations/customer.rb +++ b/lib/open_api_sdk/models/operations/customer.rb @@ -16,16 +16,16 @@ class Customer < ::OpenApiSDK::Utils::FieldAugmented field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } - field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } } field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } - sig { params(avatar: ::String, email: ::String, id: ::String, name: ::String).void } - def initialize(avatar: nil, email: nil, id: nil, name: nil) + sig { params(avatar: ::String, email: ::String, external_id: ::String, name: ::String).void } + def initialize(avatar: nil, email: nil, external_id: nil, name: nil) @avatar = avatar @email = email - @id = id + @external_id = external_id @name = name end end diff --git a/lib/open_api_sdk/models/operations/deletecustomer_request.rb b/lib/open_api_sdk/models/operations/deletecustomer_request.rb new file mode 100644 index 0000000..7a875ce --- /dev/null +++ b/lib/open_api_sdk/models/operations/deletecustomer_request.rb @@ -0,0 +1,24 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class DeleteCustomerRequest < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # The unique identifier of the customer in Dub. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/deletecustomer_response.rb b/lib/open_api_sdk/models/operations/deletecustomer_response.rb new file mode 100644 index 0000000..dd226eb --- /dev/null +++ b/lib/open_api_sdk/models/operations/deletecustomer_response.rb @@ -0,0 +1,60 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class DeleteCustomerResponse < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). + field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest) + # This response is sent when a request conflicts with the current state of the server. + field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict) + # The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. + field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden) + # The server has encountered a situation it does not know how to handle. + field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError) + # This response is sent when the requested content has been permanently deleted from server, with no forwarding address. + field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired) + # The server cannot find the requested resource. + field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound) + # The customer was deleted. + field :object, T.nilable(::OpenApiSDK::Operations::DeleteCustomerResponseBody) + # The user has sent too many requests in a given amount of time ("rate limiting") + field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded) + # Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized) + # The request was well-formed but was unable to be followed due to semantic errors. + field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::OpenApiSDK::Shared::BadRequest), conflict: T.nilable(::OpenApiSDK::Shared::Conflict), forbidden: T.nilable(::OpenApiSDK::Shared::Forbidden), internal_server_error: T.nilable(::OpenApiSDK::Shared::InternalServerError), invite_expired: T.nilable(::OpenApiSDK::Shared::InviteExpired), not_found: T.nilable(::OpenApiSDK::Shared::NotFound), object: T.nilable(::OpenApiSDK::Operations::DeleteCustomerResponseBody), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil, forbidden: nil, internal_server_error: nil, invite_expired: nil, not_found: nil, object: nil, rate_limit_exceeded: nil, unauthorized: nil, unprocessable_entity: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @bad_request = bad_request + @conflict = conflict + @forbidden = forbidden + @internal_server_error = internal_server_error + @invite_expired = invite_expired + @not_found = not_found + @object = object + @rate_limit_exceeded = rate_limit_exceeded + @unauthorized = unauthorized + @unprocessable_entity = unprocessable_entity + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/deletecustomer_responsebody.rb b/lib/open_api_sdk/models/operations/deletecustomer_responsebody.rb new file mode 100644 index 0000000..5bcb28a --- /dev/null +++ b/lib/open_api_sdk/models/operations/deletecustomer_responsebody.rb @@ -0,0 +1,24 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # The customer was deleted. + class DeleteCustomerResponseBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # The unique identifier of the customer in Dub. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getcustomer_request.rb b/lib/open_api_sdk/models/operations/getcustomer_request.rb new file mode 100644 index 0000000..f3d8648 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getcustomer_request.rb @@ -0,0 +1,24 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class GetCustomerRequest < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # The unique identifier of the customer in Dub. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + + sig { params(id: ::String).void } + def initialize(id: nil) + @id = id + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getcustomer_response.rb b/lib/open_api_sdk/models/operations/getcustomer_response.rb new file mode 100644 index 0000000..bb97cb8 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getcustomer_response.rb @@ -0,0 +1,60 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class GetCustomerResponse < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). + field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest) + # This response is sent when a request conflicts with the current state of the server. + field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict) + # The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. + field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden) + # The server has encountered a situation it does not know how to handle. + field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError) + # This response is sent when the requested content has been permanently deleted from server, with no forwarding address. + field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired) + # The server cannot find the requested resource. + field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound) + # The customer object. + field :object, T.nilable(::OpenApiSDK::Operations::GetCustomerResponseBody) + # The user has sent too many requests in a given amount of time ("rate limiting") + field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded) + # Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized) + # The request was well-formed but was unable to be followed due to semantic errors. + field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::OpenApiSDK::Shared::BadRequest), conflict: T.nilable(::OpenApiSDK::Shared::Conflict), forbidden: T.nilable(::OpenApiSDK::Shared::Forbidden), internal_server_error: T.nilable(::OpenApiSDK::Shared::InternalServerError), invite_expired: T.nilable(::OpenApiSDK::Shared::InviteExpired), not_found: T.nilable(::OpenApiSDK::Shared::NotFound), object: T.nilable(::OpenApiSDK::Operations::GetCustomerResponseBody), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil, forbidden: nil, internal_server_error: nil, invite_expired: nil, not_found: nil, object: nil, rate_limit_exceeded: nil, unauthorized: nil, unprocessable_entity: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @bad_request = bad_request + @conflict = conflict + @forbidden = forbidden + @internal_server_error = internal_server_error + @invite_expired = invite_expired + @not_found = not_found + @object = object + @rate_limit_exceeded = rate_limit_exceeded + @unauthorized = unauthorized + @unprocessable_entity = unprocessable_entity + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getcustomer_responsebody.rb b/lib/open_api_sdk/models/operations/getcustomer_responsebody.rb new file mode 100644 index 0000000..dbe080f --- /dev/null +++ b/lib/open_api_sdk/models/operations/getcustomer_responsebody.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # The customer object. + class GetCustomerResponseBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # The date the customer was created. + field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } } + # Unique identifier for the customer in the client's app. + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } } + # The unique identifier of the customer in Dub. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Name of the customer. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # Avatar URL of the customer. + field :avatar, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar') } } + # Email of the customer. + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + + + sig { params(created_at: ::String, external_id: ::String, id: ::String, name: ::String, avatar: T.nilable(::String), email: T.nilable(::String)).void } + def initialize(created_at: nil, external_id: nil, id: nil, name: nil, avatar: nil, email: nil) + @created_at = created_at + @external_id = external_id + @id = id + @name = name + @avatar = avatar + @email = email + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/getcustomers_response.rb b/lib/open_api_sdk/models/operations/getcustomers_response.rb new file mode 100644 index 0000000..d52f981 --- /dev/null +++ b/lib/open_api_sdk/models/operations/getcustomers_response.rb @@ -0,0 +1,60 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class GetCustomersResponse < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). + field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest) + # This response is sent when a request conflicts with the current state of the server. + field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict) + # The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. + field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden) + # The server has encountered a situation it does not know how to handle. + field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError) + # This response is sent when the requested content has been permanently deleted from server, with no forwarding address. + field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired) + # The server cannot find the requested resource. + field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound) + # The user has sent too many requests in a given amount of time ("rate limiting") + field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded) + # The list of customers. + field :response_bodies, T.nilable(T::Array[::OpenApiSDK::Operations::ResponseBody]) + # Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized) + # The request was well-formed but was unable to be followed due to semantic errors. + field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::OpenApiSDK::Shared::BadRequest), conflict: T.nilable(::OpenApiSDK::Shared::Conflict), forbidden: T.nilable(::OpenApiSDK::Shared::Forbidden), internal_server_error: T.nilable(::OpenApiSDK::Shared::InternalServerError), invite_expired: T.nilable(::OpenApiSDK::Shared::InviteExpired), not_found: T.nilable(::OpenApiSDK::Shared::NotFound), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), response_bodies: T.nilable(T::Array[::OpenApiSDK::Operations::ResponseBody]), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil, forbidden: nil, internal_server_error: nil, invite_expired: nil, not_found: nil, rate_limit_exceeded: nil, response_bodies: nil, unauthorized: nil, unprocessable_entity: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @bad_request = bad_request + @conflict = conflict + @forbidden = forbidden + @internal_server_error = internal_server_error + @invite_expired = invite_expired + @not_found = not_found + @rate_limit_exceeded = rate_limit_exceeded + @response_bodies = response_bodies + @unauthorized = unauthorized + @unprocessable_entity = unprocessable_entity + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/responsebody.rb b/lib/open_api_sdk/models/operations/responsebody.rb new file mode 100644 index 0000000..f70656a --- /dev/null +++ b/lib/open_api_sdk/models/operations/responsebody.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class ResponseBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # The date the customer was created. + field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } } + # Unique identifier for the customer in the client's app. + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } } + # The unique identifier of the customer in Dub. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Name of the customer. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # Avatar URL of the customer. + field :avatar, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar') } } + # Email of the customer. + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + + + sig { params(created_at: ::String, external_id: ::String, id: ::String, name: ::String, avatar: T.nilable(::String), email: T.nilable(::String)).void } + def initialize(created_at: nil, external_id: nil, id: nil, name: nil, avatar: nil, email: nil) + @created_at = created_at + @external_id = external_id + @id = id + @name = name + @avatar = avatar + @email = email + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/tracklead_requestbody.rb b/lib/open_api_sdk/models/operations/tracklead_requestbody.rb index bd12960..0d9d0a2 100644 --- a/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +++ b/lib/open_api_sdk/models/operations/tracklead_requestbody.rb @@ -13,28 +13,33 @@ class TrackLeadRequestBody < ::OpenApiSDK::Utils::FieldAugmented # The ID of the click in th Dub. You can read this value from `dub_id` cookie. field :click_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('clickId') } } - # This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. - field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerId') } } # The name of the event to track. field :event_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('eventName') } } # Avatar of the customer in the client's app. field :customer_avatar, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerAvatar') } } # Email of the customer in the client's app. field :customer_email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerEmail') } } + # This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. + # + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :customer_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerId') } } # Name of the customer in the client's app. field :customer_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerName') } } + # This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. + field :external_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } } # Additional metadata to be stored with the lead event field :metadata, T.nilable(T::Hash[Symbol, ::Object]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } - sig { params(click_id: ::String, customer_id: ::String, event_name: ::String, customer_avatar: T.nilable(::String), customer_email: T.nilable(::String), customer_name: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::Object])).void } - def initialize(click_id: nil, customer_id: nil, event_name: nil, customer_avatar: nil, customer_email: nil, customer_name: nil, metadata: nil) + sig { params(click_id: ::String, event_name: ::String, customer_avatar: T.nilable(::String), customer_email: T.nilable(::String), customer_id: T.nilable(::String), customer_name: T.nilable(::String), external_id: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::Object])).void } + def initialize(click_id: nil, event_name: nil, customer_avatar: nil, customer_email: nil, customer_id: nil, customer_name: nil, external_id: nil, metadata: nil) @click_id = click_id - @customer_id = customer_id @event_name = event_name @customer_avatar = customer_avatar @customer_email = customer_email + @customer_id = customer_id @customer_name = customer_name + @external_id = external_id @metadata = metadata end end diff --git a/lib/open_api_sdk/models/operations/tracksale_customer.rb b/lib/open_api_sdk/models/operations/tracksale_customer.rb index 460245a..15bc3ab 100644 --- a/lib/open_api_sdk/models/operations/tracksale_customer.rb +++ b/lib/open_api_sdk/models/operations/tracksale_customer.rb @@ -16,15 +16,18 @@ class TrackSaleCustomer < ::OpenApiSDK::Utils::FieldAugmented field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } } + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } - sig { params(avatar: ::String, email: ::String, id: ::String, name: ::String).void } - def initialize(avatar: nil, email: nil, id: nil, name: nil) + sig { params(avatar: ::String, email: ::String, external_id: ::String, id: ::String, name: ::String).void } + def initialize(avatar: nil, email: nil, external_id: nil, id: nil, name: nil) @avatar = avatar @email = email + @external_id = external_id @id = id @name = name end diff --git a/lib/open_api_sdk/models/operations/tracksale_requestbody.rb b/lib/open_api_sdk/models/operations/tracksale_requestbody.rb index 97c0698..f93a08e 100644 --- a/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +++ b/lib/open_api_sdk/models/operations/tracksale_requestbody.rb @@ -13,27 +13,32 @@ class TrackSaleRequestBody < ::OpenApiSDK::Utils::FieldAugmented # The amount of the sale. Should be passed in cents. field :amount, ::Integer, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } } - # This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. - field :customer_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerId') } } # The payment processor via which the sale was made. field :payment_processor, ::OpenApiSDK::Operations::PaymentProcessor, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('paymentProcessor'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::PaymentProcessor, false) } } # The currency of the sale. Accepts ISO 4217 currency codes. field :currency, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } } + # This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. + # + # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible. + field :customer_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerId') } } # The name of the sale event. It can be used to track different types of event for example 'Purchase', 'Upgrade', 'Payment', etc. field :event_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('eventName') } } + # This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. + field :external_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } } # The invoice ID of the sale. field :invoice_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('invoiceId') } } # Additional metadata to be stored with the sale event. field :metadata, T.nilable(T::Hash[Symbol, ::Object]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } } - sig { params(amount: ::Integer, customer_id: ::String, payment_processor: ::OpenApiSDK::Operations::PaymentProcessor, currency: T.nilable(::String), event_name: T.nilable(::String), invoice_id: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::Object])).void } - def initialize(amount: nil, customer_id: nil, payment_processor: nil, currency: nil, event_name: nil, invoice_id: nil, metadata: nil) + sig { params(amount: ::Integer, payment_processor: ::OpenApiSDK::Operations::PaymentProcessor, currency: T.nilable(::String), customer_id: T.nilable(::String), event_name: T.nilable(::String), external_id: T.nilable(::String), invoice_id: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::Object])).void } + def initialize(amount: nil, payment_processor: nil, currency: nil, customer_id: nil, event_name: nil, external_id: nil, invoice_id: nil, metadata: nil) @amount = amount - @customer_id = customer_id @payment_processor = payment_processor @currency = currency + @customer_id = customer_id @event_name = event_name + @external_id = external_id @invoice_id = invoice_id @metadata = metadata end diff --git a/lib/open_api_sdk/models/operations/updatecustomer_request.rb b/lib/open_api_sdk/models/operations/updatecustomer_request.rb new file mode 100644 index 0000000..f4c0c65 --- /dev/null +++ b/lib/open_api_sdk/models/operations/updatecustomer_request.rb @@ -0,0 +1,27 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class UpdateCustomerRequest < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # The unique identifier of the customer in Dub. + field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } } + + field :request_body, T.nilable(::OpenApiSDK::Operations::UpdateCustomerRequestBody), { 'request': { 'media_type': 'application/json' } } + + + sig { params(id: ::String, request_body: T.nilable(::OpenApiSDK::Operations::UpdateCustomerRequestBody)).void } + def initialize(id: nil, request_body: nil) + @id = id + @request_body = request_body + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/updatecustomer_requestbody.rb b/lib/open_api_sdk/models/operations/updatecustomer_requestbody.rb new file mode 100644 index 0000000..976a917 --- /dev/null +++ b/lib/open_api_sdk/models/operations/updatecustomer_requestbody.rb @@ -0,0 +1,33 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class UpdateCustomerRequestBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # Avatar URL of the customer in the client's app. + field :avatar, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar') } } + # Email of the customer in the client's app. + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + # Unique identifier for the customer in the client's app. + field :external_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } } + # Name of the customer in the client's app. If not provided, a random name will be generated. + field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + + + sig { params(avatar: T.nilable(::String), email: T.nilable(::String), external_id: T.nilable(::String), name: T.nilable(::String)).void } + def initialize(avatar: nil, email: nil, external_id: nil, name: nil) + @avatar = avatar + @email = email + @external_id = external_id + @name = name + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/updatecustomer_response.rb b/lib/open_api_sdk/models/operations/updatecustomer_response.rb new file mode 100644 index 0000000..97e0d77 --- /dev/null +++ b/lib/open_api_sdk/models/operations/updatecustomer_response.rb @@ -0,0 +1,60 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class UpdateCustomerResponse < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). + field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest) + # This response is sent when a request conflicts with the current state of the server. + field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict) + # The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. + field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden) + # The server has encountered a situation it does not know how to handle. + field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError) + # This response is sent when the requested content has been permanently deleted from server, with no forwarding address. + field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired) + # The server cannot find the requested resource. + field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound) + # The customer was updated. + field :object, T.nilable(::OpenApiSDK::Operations::UpdateCustomerResponseBody) + # The user has sent too many requests in a given amount of time ("rate limiting") + field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded) + # Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized) + # The request was well-formed but was unable to be followed due to semantic errors. + field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::OpenApiSDK::Shared::BadRequest), conflict: T.nilable(::OpenApiSDK::Shared::Conflict), forbidden: T.nilable(::OpenApiSDK::Shared::Forbidden), internal_server_error: T.nilable(::OpenApiSDK::Shared::InternalServerError), invite_expired: T.nilable(::OpenApiSDK::Shared::InviteExpired), not_found: T.nilable(::OpenApiSDK::Shared::NotFound), object: T.nilable(::OpenApiSDK::Operations::UpdateCustomerResponseBody), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil, forbidden: nil, internal_server_error: nil, invite_expired: nil, not_found: nil, object: nil, rate_limit_exceeded: nil, unauthorized: nil, unprocessable_entity: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @bad_request = bad_request + @conflict = conflict + @forbidden = forbidden + @internal_server_error = internal_server_error + @invite_expired = invite_expired + @not_found = not_found + @object = object + @rate_limit_exceeded = rate_limit_exceeded + @unauthorized = unauthorized + @unprocessable_entity = unprocessable_entity + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb b/lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb new file mode 100644 index 0000000..0e8061b --- /dev/null +++ b/lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb @@ -0,0 +1,39 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # The customer was updated. + class UpdateCustomerResponseBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # The date the customer was created. + field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } } + # Unique identifier for the customer in the client's app. + field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } } + # The unique identifier of the customer in Dub. + field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } } + # Name of the customer. + field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # Avatar URL of the customer. + field :avatar, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar') } } + # Email of the customer. + field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } } + + + sig { params(created_at: ::String, external_id: ::String, id: ::String, name: ::String, avatar: T.nilable(::String), email: T.nilable(::String)).void } + def initialize(created_at: nil, external_id: nil, id: nil, name: nil, avatar: nil, email: nil) + @created_at = created_at + @external_id = external_id + @id = id + @name = name + @avatar = avatar + @email = email + end + end + end +end diff --git a/lib/open_api_sdk/models/shared.rb b/lib/open_api_sdk/models/shared.rb index a1bd60f..86f516b 100644 --- a/lib/open_api_sdk/models/shared.rb +++ b/lib/open_api_sdk/models/shared.rb @@ -44,13 +44,13 @@ module Shared autoload :ClickEventGeo, 'open_api_sdk/models/shared/clickevent_geo.rb' autoload :Link, 'open_api_sdk/models/shared/link.rb' autoload :ClickEvent, 'open_api_sdk/models/shared/clickevent.rb' + autoload :RegisteredDomain, 'open_api_sdk/models/shared/registereddomain.rb' + autoload :DomainSchema, 'open_api_sdk/models/shared/domainschema.rb' autoload :Plan, 'open_api_sdk/models/shared/plan.rb' autoload :Role, 'open_api_sdk/models/shared/role.rb' autoload :Users, 'open_api_sdk/models/shared/users.rb' autoload :Domains, 'open_api_sdk/models/shared/domains.rb' autoload :WorkspaceSchema, 'open_api_sdk/models/shared/workspaceschema.rb' - autoload :RegisteredDomain, 'open_api_sdk/models/shared/registereddomain.rb' - autoload :DomainSchema, 'open_api_sdk/models/shared/domainschema.rb' autoload :Security, 'open_api_sdk/models/shared/security.rb' end end diff --git a/lib/open_api_sdk/models/shared/workspaceschema.rb b/lib/open_api_sdk/models/shared/workspaceschema.rb index 78a611e..ee5863d 100644 --- a/lib/open_api_sdk/models/shared/workspaceschema.rb +++ b/lib/open_api_sdk/models/shared/workspaceschema.rb @@ -15,6 +15,10 @@ class WorkspaceSchema < ::OpenApiSDK::Utils::FieldAugmented field :ai_limit, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('aiLimit') } } # The AI usage of the workspace. field :ai_usage, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('aiUsage') } } + # [BETA – Dub Partners]: The name of the connected bank account. + field :bank_account_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('bankAccountName') } } + # [BETA – Dub Partners]: Whether the bank account is verified. + field :bank_account_verified, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('bankAccountVerified') } } # The date and time when the billing cycle starts for the workspace. field :billing_cycle_start, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billingCycleStart') } } # Whether the workspace has conversion tracking enabled (d.to/conversions). @@ -39,6 +43,8 @@ class WorkspaceSchema < ::OpenApiSDK::Utils::FieldAugmented field :logo, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('logo') } } # The name of the workspace. field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } } + # [BETA – Dub Partners]: The partial account number of the bank account. + field :partial_account_number, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partialAccountNumber') } } # The date and time when the payment failed for the workspace. field :payment_failed_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('paymentFailedAt') } } # The plan of the workspace. @@ -47,13 +53,15 @@ class WorkspaceSchema < ::OpenApiSDK::Utils::FieldAugmented field :publishable_key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publishableKey') } } # The ID of the referral link of the workspace. field :referral_link_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('referralLinkId') } } + # [BETA – Dub Partners]: The routing number of the bank account. + field :routing_number, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('routingNumber') } } # The limit of tracked revenue in the current billing cycle (in cents). field :sales_limit, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('salesLimit') } } # The dollar amount of tracked revenue in the current billing cycle (in cents). field :sales_usage, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('salesUsage') } } # The slug of the workspace. field :slug, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } } - # [BETA]: The Stripe Connect ID of the workspace. + # [BETA – Dub Conversions]: The Stripe Connect ID of the workspace. field :stripe_connect_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('stripeConnectId') } } # The Stripe ID of the workspace. field :stripe_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('stripeId') } } @@ -71,10 +79,12 @@ class WorkspaceSchema < ::OpenApiSDK::Utils::FieldAugmented field :flags, T.nilable(T::Hash[Symbol, T::Boolean]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('flags') } } - sig { params(ai_limit: ::Float, ai_usage: ::Float, billing_cycle_start: ::Float, conversion_enabled: T::Boolean, created_at: ::String, domains: T::Array[::OpenApiSDK::Shared::Domains], domains_limit: ::Float, dot_link_claimed: T::Boolean, id: ::String, invite_code: ::String, links_limit: ::Float, links_usage: ::Float, logo: ::String, name: ::String, payment_failed_at: ::String, plan: ::OpenApiSDK::Shared::Plan, publishable_key: ::String, referral_link_id: ::String, sales_limit: ::Float, sales_usage: ::Float, slug: ::String, stripe_connect_id: ::String, stripe_id: ::String, tags_limit: ::Float, usage: ::Float, usage_limit: ::Float, users: T::Array[::OpenApiSDK::Shared::Users], users_limit: ::Float, flags: T.nilable(T::Hash[Symbol, T::Boolean])).void } - def initialize(ai_limit: nil, ai_usage: nil, billing_cycle_start: nil, conversion_enabled: nil, created_at: nil, domains: nil, domains_limit: nil, dot_link_claimed: nil, id: nil, invite_code: nil, links_limit: nil, links_usage: nil, logo: nil, name: nil, payment_failed_at: nil, plan: nil, publishable_key: nil, referral_link_id: nil, sales_limit: nil, sales_usage: nil, slug: nil, stripe_connect_id: nil, stripe_id: nil, tags_limit: nil, usage: nil, usage_limit: nil, users: nil, users_limit: nil, flags: nil) + sig { params(ai_limit: ::Float, ai_usage: ::Float, bank_account_name: ::String, bank_account_verified: T::Boolean, billing_cycle_start: ::Float, conversion_enabled: T::Boolean, created_at: ::String, domains: T::Array[::OpenApiSDK::Shared::Domains], domains_limit: ::Float, dot_link_claimed: T::Boolean, id: ::String, invite_code: ::String, links_limit: ::Float, links_usage: ::Float, logo: ::String, name: ::String, partial_account_number: ::String, payment_failed_at: ::String, plan: ::OpenApiSDK::Shared::Plan, publishable_key: ::String, referral_link_id: ::String, routing_number: ::String, sales_limit: ::Float, sales_usage: ::Float, slug: ::String, stripe_connect_id: ::String, stripe_id: ::String, tags_limit: ::Float, usage: ::Float, usage_limit: ::Float, users: T::Array[::OpenApiSDK::Shared::Users], users_limit: ::Float, flags: T.nilable(T::Hash[Symbol, T::Boolean])).void } + def initialize(ai_limit: nil, ai_usage: nil, bank_account_name: nil, bank_account_verified: nil, billing_cycle_start: nil, conversion_enabled: nil, created_at: nil, domains: nil, domains_limit: nil, dot_link_claimed: nil, id: nil, invite_code: nil, links_limit: nil, links_usage: nil, logo: nil, name: nil, partial_account_number: nil, payment_failed_at: nil, plan: nil, publishable_key: nil, referral_link_id: nil, routing_number: nil, sales_limit: nil, sales_usage: nil, slug: nil, stripe_connect_id: nil, stripe_id: nil, tags_limit: nil, usage: nil, usage_limit: nil, users: nil, users_limit: nil, flags: nil) @ai_limit = ai_limit @ai_usage = ai_usage + @bank_account_name = bank_account_name + @bank_account_verified = bank_account_verified @billing_cycle_start = billing_cycle_start @conversion_enabled = conversion_enabled @created_at = created_at @@ -87,10 +97,12 @@ def initialize(ai_limit: nil, ai_usage: nil, billing_cycle_start: nil, conversio @links_usage = links_usage @logo = logo @name = name + @partial_account_number = partial_account_number @payment_failed_at = payment_failed_at @plan = plan @publishable_key = publishable_key @referral_link_id = referral_link_id + @routing_number = routing_number @sales_limit = sales_limit @sales_usage = sales_usage @slug = slug diff --git a/lib/open_api_sdk/sdkconfiguration.rb b/lib/open_api_sdk/sdkconfiguration.rb index 7117d95..bb54b89 100644 --- a/lib/open_api_sdk/sdkconfiguration.rb +++ b/lib/open_api_sdk/sdkconfiguration.rb @@ -38,9 +38,9 @@ def initialize(client, security, server_url, server_idx) @security = security @language = 'ruby' @openapi_doc_version = '0.0.1' - @sdk_version = '0.2.2-alpha.31' + @sdk_version = '0.2.2-alpha.32' @gen_version = '2.457.2' - @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.31 2.457.2 0.0.1 dub' + @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.32 2.457.2 0.0.1 dub' end sig { returns([String, T::Hash[Symbol, String]]) } diff --git a/lib/open_api_sdk/track.rb b/lib/open_api_sdk/track.rb index fa4bc64..2169c96 100644 --- a/lib/open_api_sdk/track.rb +++ b/lib/open_api_sdk/track.rb @@ -193,6 +193,8 @@ def sale(request) def customer(request) # customer - Track a customer # Track a customer for an authenticated workspace. + # + # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/track/customer"