Skip to content

Commit

Permalink
Merge pull request #1468 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Oct 8, 2024
2 parents 6043574 + abb7f96 commit c751d28
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1268
v1273
2 changes: 2 additions & 0 deletions lib/stripe/resources/billing/meter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions lib/stripe/resources/issuing/card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 is only available with Stripe Version ‘2024-09-30.acacia' or above.
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 is only available with Stripe Version ‘2024-09-30.acacia' or above.
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
Expand Down
1 change: 1 addition & 0 deletions lib/stripe/resources/usage_record_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions lib/stripe/services/test_helpers/issuing/card_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 is only available with Stripe Version ‘2024-09-30.acacia' or above.
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
Expand Down

0 comments on commit c751d28

Please sign in to comment.