From db9798c7ca1d3af7395d0d97ac56040463a69fc3 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Fri, 18 Oct 2024 23:56:52 +0000
Subject: [PATCH 1/3] Update generated code for v1317

---
 OPENAPI_VERSION                               |  2 +-
 .../billing/credit_balance_summary.rb         |  2 +-
 lib/stripe/resources/billing/credit_grant.rb  |  5 ++++-
 lib/stripe/resources/billing/meter.rb         |  2 ++
 lib/stripe/resources/issuing/card.rb          | 20 +++++++++++++++++++
 lib/stripe/resources/token.rb                 |  2 +-
 lib/stripe/resources/usage_record_summary.rb  |  1 +
 .../test_helpers/issuing/card_service.rb      | 11 ++++++++++
 lib/stripe/services/token_service.rb          |  2 +-
 9 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 8f166ae2e..d18dc2e69 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v1268
\ No newline at end of file
+v1317
\ No newline at end of file
diff --git a/lib/stripe/resources/billing/credit_balance_summary.rb b/lib/stripe/resources/billing/credit_balance_summary.rb
index 1a78cfa08..928967a07 100644
--- a/lib/stripe/resources/billing/credit_balance_summary.rb
+++ b/lib/stripe/resources/billing/credit_balance_summary.rb
@@ -3,7 +3,7 @@
 
 module Stripe
   module Billing
-    # Indicates the credit balance for credits granted to a customer.
+    # Indicates the billing credit balance for billing credits granted to a customer.
     class CreditBalanceSummary < SingletonAPIResource
       OBJECT_NAME = "billing.credit_balance_summary"
       def self.object_name
diff --git a/lib/stripe/resources/billing/credit_grant.rb b/lib/stripe/resources/billing/credit_grant.rb
index cac6d0969..b12198e5e 100644
--- a/lib/stripe/resources/billing/credit_grant.rb
+++ b/lib/stripe/resources/billing/credit_grant.rb
@@ -3,7 +3,10 @@
 
 module Stripe
   module Billing
-    # A credit grant is a resource that records a grant of some credit to a customer.
+    # A credit grant is an API resource that documents the allocation of some billing credits to a customer.
+    #
+    # Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)
+    # end
     class CreditGrant < APIResource
       extend Stripe::APIOperations::Create
       extend Stripe::APIOperations::List
diff --git a/lib/stripe/resources/billing/meter.rb b/lib/stripe/resources/billing/meter.rb
index e8a0c9a0d..6ef7ad9ec 100644
--- a/lib/stripe/resources/billing/meter.rb
+++ b/lib/stripe/resources/billing/meter.rb
@@ -4,6 +4,8 @@
 module Stripe
   module Billing
     # A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make.
+    #
+    # Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based)
     class Meter < APIResource
       extend Stripe::APIOperations::Create
       extend Stripe::APIOperations::List
diff --git a/lib/stripe/resources/issuing/card.rb b/lib/stripe/resources/issuing/card.rb
index 36cdf0ecc..0166ab678 100644
--- a/lib/stripe/resources/issuing/card.rb
+++ b/lib/stripe/resources/issuing/card.rb
@@ -123,6 +123,26 @@ def ship_card(params = {}, opts = {})
             opts: opts
           )
         end
+
+        # Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
+        def self.submit_card(card, params = {}, opts = {})
+          request_stripe_object(
+            method: :post,
+            path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/submit", { card: CGI.escape(card) }),
+            params: params,
+            opts: opts
+          )
+        end
+
+        # Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
+        def submit_card(params = {}, opts = {})
+          @resource.request_stripe_object(
+            method: :post,
+            path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/submit", { card: CGI.escape(@resource["id"]) }),
+            params: params,
+            opts: opts
+          )
+        end
       end
     end
   end
diff --git a/lib/stripe/resources/token.rb b/lib/stripe/resources/token.rb
index 9ae3b7f63..ffef36deb 100644
--- a/lib/stripe/resources/token.rb
+++ b/lib/stripe/resources/token.rb
@@ -31,7 +31,7 @@ def self.object_name
     end
 
     # Creates a single-use token that represents a bank account's details.
-    # You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
+    # You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
     def self.create(params = {}, opts = {})
       request_stripe_object(method: :post, path: "/v1/tokens", params: params, opts: opts)
     end
diff --git a/lib/stripe/resources/usage_record_summary.rb b/lib/stripe/resources/usage_record_summary.rb
index 0af534dd8..1186754d6 100644
--- a/lib/stripe/resources/usage_record_summary.rb
+++ b/lib/stripe/resources/usage_record_summary.rb
@@ -2,6 +2,7 @@
 # frozen_string_literal: true
 
 module Stripe
+  # A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period.
   class UsageRecordSummary < StripeObject
     OBJECT_NAME = "usage_record_summary"
     def self.object_name
diff --git a/lib/stripe/services/test_helpers/issuing/card_service.rb b/lib/stripe/services/test_helpers/issuing/card_service.rb
index 528896343..00f655124 100644
--- a/lib/stripe/services/test_helpers/issuing/card_service.rb
+++ b/lib/stripe/services/test_helpers/issuing/card_service.rb
@@ -48,6 +48,17 @@ def ship_card(card, params = {}, opts = {})
             base_address: :api
           )
         end
+
+        # Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later.
+        def submit_card(card, params = {}, opts = {})
+          request(
+            method: :post,
+            path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/submit", { card: CGI.escape(card) }),
+            params: params,
+            opts: opts,
+            base_address: :api
+          )
+        end
       end
     end
   end
diff --git a/lib/stripe/services/token_service.rb b/lib/stripe/services/token_service.rb
index cf5deabf3..49994a745 100644
--- a/lib/stripe/services/token_service.rb
+++ b/lib/stripe/services/token_service.rb
@@ -4,7 +4,7 @@
 module Stripe
   class TokenService < StripeService
     # Creates a single-use token that represents a bank account's details.
-    # You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
+    # You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
     def create(params = {}, opts = {})
       request(method: :post, path: "/v1/tokens", params: params, opts: opts, base_address: :api)
     end

From 0a1c4b95bd59fed840fe24d8102bf1a222d92b49 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Wed, 23 Oct 2024 23:02:30 +0000
Subject: [PATCH 2/3] Update generated code for v1318

---
 OPENAPI_VERSION                                   | 2 +-
 lib/stripe/api_version.rb                         | 2 +-
 lib/stripe/services/account_login_link_service.rb | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index d18dc2e69..579e73fad 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v1317
\ No newline at end of file
+v1318
\ No newline at end of file
diff --git a/lib/stripe/api_version.rb b/lib/stripe/api_version.rb
index 4d202e4cd..f0b789d86 100644
--- a/lib/stripe/api_version.rb
+++ b/lib/stripe/api_version.rb
@@ -3,6 +3,6 @@
 
 module Stripe
   module ApiVersion
-    CURRENT = "2024-09-30.acacia"
+    CURRENT = "2024-10-28.acacia"
   end
 end
diff --git a/lib/stripe/services/account_login_link_service.rb b/lib/stripe/services/account_login_link_service.rb
index a4370ac5a..c02e7c24e 100644
--- a/lib/stripe/services/account_login_link_service.rb
+++ b/lib/stripe/services/account_login_link_service.rb
@@ -3,7 +3,7 @@
 
 module Stripe
   class AccountLoginLinkService < StripeService
-    # Creates a single-use login link for a connected account to access the Express Dashboard.
+    # Creates a login link for a connected account to access the Express Dashboard.
     #
     # You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform.
     def create(account, params = {}, opts = {})

From 427656c3f0aa8ef6d1bb80dc992e326990b59f73 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Wed, 23 Oct 2024 23:17:26 +0000
Subject: [PATCH 3/3] Update generated code for v1318

---
 lib/stripe/object_types.rb                    |  1 +
 lib/stripe/resources.rb                       |  1 +
 lib/stripe/resources/v2/event_destination.rb  | 13 +++
 lib/stripe/services.rb                        |  1 +
 .../v2/core/event_destination_service.rb      | 98 +++++++++++++++++++
 lib/stripe/services/v2/core_service.rb        |  3 +-
 6 files changed, 116 insertions(+), 1 deletion(-)
 create mode 100644 lib/stripe/resources/v2/event_destination.rb
 create mode 100644 lib/stripe/services/v2/core/event_destination_service.rb

diff --git a/lib/stripe/object_types.rb b/lib/stripe/object_types.rb
index d51e52e0a..c6f828d9c 100644
--- a/lib/stripe/object_types.rb
+++ b/lib/stripe/object_types.rb
@@ -156,6 +156,7 @@ def self.v2_object_names_to_classes
         V2::Billing::MeterEventAdjustment.object_name => V2::Billing::MeterEventAdjustment,
         V2::Billing::MeterEventSession.object_name => V2::Billing::MeterEventSession,
         V2::Event.object_name => V2::Event,
+        V2::EventDestination.object_name => V2::EventDestination,
         # v2 object classes: The end of the section generated from our OpenAPI spec
       }
     end
diff --git a/lib/stripe/resources.rb b/lib/stripe/resources.rb
index 7f7a0b025..9823c8101 100644
--- a/lib/stripe/resources.rb
+++ b/lib/stripe/resources.rb
@@ -135,6 +135,7 @@
 require "stripe/resources/v2/billing/meter_event_adjustment"
 require "stripe/resources/v2/billing/meter_event_session"
 require "stripe/resources/v2/event"
+require "stripe/resources/v2/event_destination"
 require "stripe/resources/webhook_endpoint"
 require "stripe/events/v1_billing_meter_error_report_triggered_event"
 require "stripe/events/v1_billing_meter_no_meter_found_event"
diff --git a/lib/stripe/resources/v2/event_destination.rb b/lib/stripe/resources/v2/event_destination.rb
new file mode 100644
index 000000000..ea0880238
--- /dev/null
+++ b/lib/stripe/resources/v2/event_destination.rb
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+module Stripe
+  module V2
+    class EventDestination < APIResource
+      OBJECT_NAME = "v2.core.event_destination"
+      def self.object_name
+        "v2.core.event_destination"
+      end
+    end
+  end
+end
diff --git a/lib/stripe/services.rb b/lib/stripe/services.rb
index 4784d88d5..8c9b7be10 100644
--- a/lib/stripe/services.rb
+++ b/lib/stripe/services.rb
@@ -175,6 +175,7 @@
 require "stripe/services/v2/billing/meter_event_session_service"
 require "stripe/services/v2/billing/meter_event_stream_service"
 require "stripe/services/v2/billing_service"
+require "stripe/services/v2/core/event_destination_service"
 require "stripe/services/v2/core/event_service"
 require "stripe/services/v2/core_service"
 require "stripe/services/v2_services"
diff --git a/lib/stripe/services/v2/core/event_destination_service.rb b/lib/stripe/services/v2/core/event_destination_service.rb
new file mode 100644
index 000000000..11dd45c9a
--- /dev/null
+++ b/lib/stripe/services/v2/core/event_destination_service.rb
@@ -0,0 +1,98 @@
+# File generated from our OpenAPI spec
+# frozen_string_literal: true
+
+module Stripe
+  module V2
+    module Core
+      class EventDestinationService < StripeService
+        # Create a new event destination.
+        def create(params = {}, opts = {})
+          request(
+            method: :post,
+            path: "/v2/core/event_destinations",
+            params: params,
+            opts: opts,
+            base_address: :api
+          )
+        end
+
+        # Delete an event destination.
+        def delete(id, params = {}, opts = {})
+          request(
+            method: :delete,
+            path: format("/v2/core/event_destinations/%<id>s", { id: CGI.escape(id) }),
+            params: params,
+            opts: opts,
+            base_address: :api
+          )
+        end
+
+        # Disable an event destination.
+        def disable(id, params = {}, opts = {})
+          request(
+            method: :post,
+            path: format("/v2/core/event_destinations/%<id>s/disable", { id: CGI.escape(id) }),
+            params: params,
+            opts: opts,
+            base_address: :api
+          )
+        end
+
+        # Enable an event destination.
+        def enable(id, params = {}, opts = {})
+          request(
+            method: :post,
+            path: format("/v2/core/event_destinations/%<id>s/enable", { id: CGI.escape(id) }),
+            params: params,
+            opts: opts,
+            base_address: :api
+          )
+        end
+
+        # Lists all event destinations.
+        def list(params = {}, opts = {})
+          request(
+            method: :get,
+            path: "/v2/core/event_destinations",
+            params: params,
+            opts: opts,
+            base_address: :api
+          )
+        end
+
+        # Send a `ping` event to an event destination.
+        def ping(id, params = {}, opts = {})
+          request(
+            method: :post,
+            path: format("/v2/core/event_destinations/%<id>s/ping", { id: CGI.escape(id) }),
+            params: params,
+            opts: opts,
+            base_address: :api
+          )
+        end
+
+        # Retrieves the details of an event destination.
+        def retrieve(id, params = {}, opts = {})
+          request(
+            method: :get,
+            path: format("/v2/core/event_destinations/%<id>s", { id: CGI.escape(id) }),
+            params: params,
+            opts: opts,
+            base_address: :api
+          )
+        end
+
+        # Update the details of an event destination.
+        def update(id, params = {}, opts = {})
+          request(
+            method: :post,
+            path: format("/v2/core/event_destinations/%<id>s", { id: CGI.escape(id) }),
+            params: params,
+            opts: opts,
+            base_address: :api
+          )
+        end
+      end
+    end
+  end
+end
diff --git a/lib/stripe/services/v2/core_service.rb b/lib/stripe/services/v2/core_service.rb
index 56bf58301..fbf4e9340 100644
--- a/lib/stripe/services/v2/core_service.rb
+++ b/lib/stripe/services/v2/core_service.rb
@@ -4,10 +4,11 @@
 module Stripe
   module V2
     class CoreService < StripeService
-      attr_reader :events
+      attr_reader :event_destinations, :events
 
       def initialize(requestor)
         super(requestor)
+        @event_destinations = Stripe::V2::Core::EventDestinationService.new(@requestor)
         @events = Stripe::V2::Core::EventService.new(@requestor)
       end
     end