From 552afc1a4a603eec7829a1567c4c8789a7adbaaa Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 27 Feb 2025 00:28:29 +0000 Subject: [PATCH 1/2] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.505.1 --- .speakeasy/gen.lock | 12 +++++++----- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 14 +++++++------- Gemfile.lock | 4 ++-- RELEASES.md | 12 +++++++++++- codeSamples.yaml | 2 +- docs/models/operations/mode.md | 11 +++++++++++ docs/models/operations/paymentprocessor.md | 4 +++- docs/models/operations/trackleadrequestbody.md | 3 ++- docs/models/operations/tracksalerequestbody.md | 2 +- docs/sdks/track/README.md | 2 +- dub.gemspec | 2 +- lib/open_api_sdk/models/operations.rb | 1 + lib/open_api_sdk/models/operations/mode.rb | 18 ++++++++++++++++++ .../models/operations/paymentprocessor.rb | 2 ++ .../models/operations/tracklead_requestbody.rb | 7 +++++-- .../models/operations/tracksale_requestbody.rb | 2 +- lib/open_api_sdk/sdkconfiguration.rb | 6 +++--- 18 files changed, 78 insertions(+), 28 deletions(-) create mode 100644 docs/models/operations/mode.md create mode 100644 lib/open_api_sdk/models/operations/mode.rb diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 3050889..a9262c6 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: 4ed7bf1fc90b54224f530facc9c37231 + docChecksum: db8c112e1f254ff516b8ce26ffe28dd4 docVersion: 0.0.1 - speakeasyVersion: 1.504.1 - generationVersion: 2.529.2 - releaseVersion: 0.2.2-alpha.70 - configChecksum: 6b800f61b5176ced188e6dd37c881fa5 + speakeasyVersion: 1.505.1 + generationVersion: 2.531.0 + releaseVersion: 0.2.2-alpha.71 + configChecksum: caaf8aa4367afb51da3efe908e408d56 repoURL: https://github.com/dubinc/dub-ruby.git installationURL: https://github.com/dubinc/dub-ruby published: true @@ -121,6 +121,7 @@ generatedFiles: - docs/models/operations/listeventsresponse.md - docs/models/operations/listfoldersrequest.md - docs/models/operations/listfoldersresponse.md + - docs/models/operations/mode.md - docs/models/operations/order.md - docs/models/operations/partner.md - docs/models/operations/paymentprocessor.md @@ -355,6 +356,7 @@ generatedFiles: - lib/open_api_sdk/models/operations/listevents_response.rb - lib/open_api_sdk/models/operations/listfolders_request.rb - lib/open_api_sdk/models/operations/listfolders_response.rb + - lib/open_api_sdk/models/operations/mode.rb - lib/open_api_sdk/models/operations/order.rb - lib/open_api_sdk/models/operations/partner.rb - lib/open_api_sdk/models/operations/paymentprocessor.rb diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 0866686..a0be810 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -15,7 +15,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false ruby: - version: 0.2.2-alpha.70 + version: 0.2.2-alpha.71 author: Dub description: Ruby Client SDK Generated by Speakeasy imports: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 74fc4f4..bc0e793 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.504.1 +speakeasyVersion: 1.505.1 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:1d8c8d48f43af8908165789c021879e0eee8f1aabf37d4d5c9db0f7fd646c6dc - sourceBlobDigest: sha256:54ac15b838758d799f7d08a7cbae8394185a7c7fdfe697ff9bc4e15488b59782 + sourceRevisionDigest: sha256:4048f9d0377dfdd025eb1546e58ab9a52ac34a91bb7cc919675be58b334c3482 + sourceBlobDigest: sha256:85580cf3773dfd87c3d9151ace8544c7687d1298a05dfbd2c310d6e816fa61a0 tags: - latest - - speakeasy-sdk-regen-1740270566 + - speakeasy-sdk-regen-1740616053 - 0.0.1 targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:1d8c8d48f43af8908165789c021879e0eee8f1aabf37d4d5c9db0f7fd646c6dc - sourceBlobDigest: sha256:54ac15b838758d799f7d08a7cbae8394185a7c7fdfe697ff9bc4e15488b59782 + sourceRevisionDigest: sha256:4048f9d0377dfdd025eb1546e58ab9a52ac34a91bb7cc919675be58b334c3482 + sourceBlobDigest: sha256:85580cf3773dfd87c3d9151ace8544c7687d1298a05dfbd2c310d6e816fa61a0 codeSamplesNamespace: code-samples-ruby-my-first-target - codeSamplesRevisionDigest: sha256:b9f46496635b31955b663bdd301648dcc5886b726ff5c49c9277c8279a414f24 + codeSamplesRevisionDigest: sha256:825d5cbe91b96a123b4ab64fb6f2fb71773c47144cf8fa9a5c7078c4406f0066 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/Gemfile.lock b/Gemfile.lock index fd2077c..0288911 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dub (0.2.2.pre.alpha.70) + dub (0.2.2.pre.alpha.71) faraday faraday-multipart rack @@ -84,7 +84,7 @@ GEM yard-sorbet thor (1.3.2) unicode-display_width (2.6.0) - uri (1.0.2) + uri (1.0.3) yard (0.9.37) yard-sorbet (0.8.1) sorbet-runtime (>= 0.5) diff --git a/RELEASES.md b/RELEASES.md index d697fad..8a322f0 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -848,4 +848,14 @@ Based on: ### Generated - [ruby v0.2.2-alpha.70] . ### Releases -- [Ruby Gems v0.2.2-alpha.70] https://rubygems.org/gems/dub/versions/0.2.2-alpha.70 - . \ No newline at end of file +- [Ruby Gems v0.2.2-alpha.70] https://rubygems.org/gems/dub/versions/0.2.2-alpha.70 - . + +## 2025-02-27 00:27:17 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.505.1 (2.531.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [ruby v0.2.2-alpha.71] . +### Releases +- [Ruby Gems v0.2.2-alpha.71] https://rubygems.org/gems/dub/versions/0.2.2-alpha.71 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 1749b5d..2930939 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -224,7 +224,7 @@ actions: "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 amount: 996500,\n payment_processor: ::OpenApiSDK::Operations::PaymentProcessor::PADDLE,\n event_name: \"Purchase\",\n lead_event_name: \"Cloned template 1481267\",\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::CUSTOM,\n event_name: \"Purchase\",\n lead_event_name: \"Cloned template 1481267\",\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/mode.md b/docs/models/operations/mode.md new file mode 100644 index 0000000..0cb9438 --- /dev/null +++ b/docs/models/operations/mode.md @@ -0,0 +1,11 @@ +# Mode + +The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub. + + +## Values + +| Name | Value | +| ------- | ------- | +| `ASYNC` | async | +| `WAIT` | wait | \ No newline at end of file diff --git a/docs/models/operations/paymentprocessor.md b/docs/models/operations/paymentprocessor.md index 301ca7c..0184563 100644 --- a/docs/models/operations/paymentprocessor.md +++ b/docs/models/operations/paymentprocessor.md @@ -9,4 +9,6 @@ The payment processor via which the sale was made. | --------- | --------- | | `STRIPE` | stripe | | `SHOPIFY` | shopify | -| `PADDLE` | paddle | \ No newline at end of file +| `POLAR` | polar | +| `PADDLE` | paddle | +| `CUSTOM` | custom | \ No newline at end of file diff --git a/docs/models/operations/trackleadrequestbody.md b/docs/models/operations/trackleadrequestbody.md index 752766e..14787e9 100644 --- a/docs/models/operations/trackleadrequestbody.md +++ b/docs/models/operations/trackleadrequestbody.md @@ -13,4 +13,5 @@ | `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 +| `metadata` | T::Hash[Symbol, *::Object*] | :heavy_minus_sign: | Additional metadata to be stored with the lead event | | +| `mode` | [T.nilable(::OpenApiSDK::Operations::Mode)](../../models/operations/mode.md) | :heavy_minus_sign: | The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub. | | \ No newline at end of file diff --git a/docs/models/operations/tracksalerequestbody.md b/docs/models/operations/tracksalerequestbody.md index 2f6de19..be9bae7 100644 --- a/docs/models/operations/tracksalerequestbody.md +++ b/docs/models/operations/tracksalerequestbody.md @@ -10,7 +10,7 @@ | `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. | | +| `invoice_id` | *T.nilable(::String)* | :heavy_minus_sign: | The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID. | | | `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. | | | `lead_event_name` | *T.nilable(::String)* | :heavy_minus_sign: | The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event, which is the default behavior). | Cloned template 1481267 | \ No newline at end of file diff --git a/docs/sdks/track/README.md b/docs/sdks/track/README.md index d779a30..5cccc1f 100644 --- a/docs/sdks/track/README.md +++ b/docs/sdks/track/README.md @@ -71,7 +71,7 @@ s.config_security( req = ::OpenApiSDK::Operations::TrackSaleRequestBody.new( amount: 996500, - payment_processor: ::OpenApiSDK::Operations::PaymentProcessor::PADDLE, + payment_processor: ::OpenApiSDK::Operations::PaymentProcessor::CUSTOM, event_name: "Purchase", lead_event_name: "Cloned template 1481267", ) diff --git a/dub.gemspec b/dub.gemspec index 1c739cb..8aa6974 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.70' + s.version = '0.2.2-alpha.71' s.platform = Gem::Platform::RUBY s.licenses = ['Apache-2.0'] s.summary = '' diff --git a/lib/open_api_sdk/models/operations.rb b/lib/open_api_sdk/models/operations.rb index c02dbba..371e31d 100644 --- a/lib/open_api_sdk/models/operations.rb +++ b/lib/open_api_sdk/models/operations.rb @@ -82,6 +82,7 @@ module Operations autoload :DeleteDomainRequest, 'open_api_sdk/models/operations/deletedomain_request.rb' autoload :DeleteDomainResponseBody, 'open_api_sdk/models/operations/deletedomain_responsebody.rb' autoload :DeleteDomainResponse, 'open_api_sdk/models/operations/deletedomain_response.rb' + autoload :Mode, 'open_api_sdk/models/operations/mode.rb' autoload :TrackLeadRequestBody, 'open_api_sdk/models/operations/tracklead_requestbody.rb' autoload :Click, 'open_api_sdk/models/operations/click.rb' autoload :Customer, 'open_api_sdk/models/operations/customer.rb' diff --git a/lib/open_api_sdk/models/operations/mode.rb b/lib/open_api_sdk/models/operations/mode.rb new file mode 100644 index 0000000..93952bb --- /dev/null +++ b/lib/open_api_sdk/models/operations/mode.rb @@ -0,0 +1,18 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # Mode - The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub. + class Mode < T::Enum + enums do + ASYNC = new('async') + WAIT = new('wait') + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/paymentprocessor.rb b/lib/open_api_sdk/models/operations/paymentprocessor.rb index fa8486f..e664ea7 100644 --- a/lib/open_api_sdk/models/operations/paymentprocessor.rb +++ b/lib/open_api_sdk/models/operations/paymentprocessor.rb @@ -12,7 +12,9 @@ class PaymentProcessor < T::Enum enums do STRIPE = new('stripe') SHOPIFY = new('shopify') + POLAR = new('polar') PADDLE = new('paddle') + CUSTOM = new('custom') 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 3ce385a..0520622 100644 --- a/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +++ b/lib/open_api_sdk/models/operations/tracklead_requestbody.rb @@ -31,10 +31,12 @@ class TrackLeadRequestBody < ::Crystalline::FieldAugmented 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') } } + # The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub. + field :mode, T.nilable(::OpenApiSDK::Operations::Mode), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mode'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::Mode, true) } } - 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), event_quantity: T.nilable(::Float), 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, event_quantity: nil, external_id: 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), event_quantity: T.nilable(::Float), external_id: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::Object]), mode: T.nilable(::OpenApiSDK::Operations::Mode)).void } + def initialize(click_id: nil, event_name: nil, customer_avatar: nil, customer_email: nil, customer_id: nil, customer_name: nil, event_quantity: nil, external_id: nil, metadata: nil, mode: nil) @click_id = click_id @event_name = event_name @customer_avatar = customer_avatar @@ -44,6 +46,7 @@ def initialize(click_id: nil, event_name: nil, customer_avatar: nil, customer_em @event_quantity = event_quantity @external_id = external_id @metadata = metadata + @mode = mode end end end diff --git a/lib/open_api_sdk/models/operations/tracksale_requestbody.rb b/lib/open_api_sdk/models/operations/tracksale_requestbody.rb index 8cfc7e2..bb6c749 100644 --- a/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +++ b/lib/open_api_sdk/models/operations/tracksale_requestbody.rb @@ -25,7 +25,7 @@ class TrackSaleRequestBody < ::Crystalline::FieldAugmented 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. + # The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID. field :invoice_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('invoiceId') } } # The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event, which is the default behavior). field :lead_event_name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('leadEventName') } } diff --git a/lib/open_api_sdk/sdkconfiguration.rb b/lib/open_api_sdk/sdkconfiguration.rb index 3a896cd..fdae077 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.70' - @gen_version = '2.529.2' - @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.70 2.529.2 0.0.1 dub' + @sdk_version = '0.2.2-alpha.71' + @gen_version = '2.531.0' + @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.71 2.531.0 0.0.1 dub' end sig { returns([String, T::Hash[Symbol, String]]) } From e9e363957bccd7489da3cbe50e31eda60cc8e4bc Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 00:28:32 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow