Skip to content

Commit

Permalink
Update generated code for v1380
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Nov 26, 2024
1 parent f5930cb commit 94fe22b
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1370
v1380
2 changes: 1 addition & 1 deletion lib/stripe/resources/billing/credit_balance_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def self.object_name
"billing.credit_balance_transaction"
end

# Retrieve a list of credit balance transactions
# Retrieve a list of credit balance transactions.
def self.list(filters = {}, opts = {})
request_stripe_object(
method: :get,
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/billing/credit_grant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def self.object_name
"billing.credit_grant"
end

# Creates a credit grant
# Creates a credit grant.
def self.create(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down Expand Up @@ -56,7 +56,7 @@ def self.list(filters = {}, opts = {})
)
end

# Updates a credit grant
# Updates a credit grant.
def self.update(id, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down
14 changes: 7 additions & 7 deletions lib/stripe/resources/billing/meter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

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.
# Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill.
#
# Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based)
class Meter < APIResource
Expand All @@ -21,12 +21,12 @@ def self.object_name
operations: %i[list],
resource_plural: "event_summaries"

# Creates a billing meter
# Creates a billing meter.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/billing/meters", params: params, opts: opts)
end

# Deactivates a billing meter
# When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.
def deactivate(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand All @@ -36,7 +36,7 @@ def deactivate(params = {}, opts = {})
)
end

# Deactivates a billing meter
# When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.
def self.deactivate(id, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand All @@ -51,7 +51,7 @@ def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/billing/meters", params: filters, opts: opts)
end

# Reactivates a billing meter
# When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.
def reactivate(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand All @@ -61,7 +61,7 @@ def reactivate(params = {}, opts = {})
)
end

# Reactivates a billing meter
# When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.
def self.reactivate(id, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand All @@ -71,7 +71,7 @@ def self.reactivate(id, params = {}, opts = {})
)
end

# Updates a billing meter
# Updates a billing meter.
def self.update(id, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down
5 changes: 2 additions & 3 deletions lib/stripe/resources/billing/meter_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

module Stripe
module Billing
# A billing meter event represents a customer's usage of a product. Meter events are used to bill a customer based on their usage.
# Meter events are associated with billing meters, which define the shape of the event's payload and how those events are aggregated for billing.
# Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event's payload and how to aggregate those events.
class MeterEvent < APIResource
extend Stripe::APIOperations::Create

Expand All @@ -13,7 +12,7 @@ def self.object_name
"billing.meter_event"
end

# Creates a billing meter event
# Creates a billing meter event.
def self.create(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/resources/billing/meter_event_adjustment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def self.object_name
"billing.meter_event_adjustment"
end

# Creates a billing meter event adjustment
# Creates a billing meter event adjustment.
def self.create(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Stripe
module Billing
class CreditBalanceSummaryService < StripeService
# Retrieves the credit balance summary for a customer
# Retrieves the credit balance summary for a customer.
def retrieve(params = {}, opts = {})
request(
method: :get,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Stripe
module Billing
class CreditBalanceTransactionService < StripeService
# Retrieve a list of credit balance transactions
# Retrieve a list of credit balance transactions.
def list(params = {}, opts = {})
request(
method: :get,
Expand All @@ -15,7 +15,7 @@ def list(params = {}, opts = {})
)
end

# Retrieves a credit balance transaction
# Retrieves a credit balance transaction.
def retrieve(id, params = {}, opts = {})
request(
method: :get,
Expand Down
6 changes: 3 additions & 3 deletions lib/stripe/services/billing/credit_grant_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Stripe
module Billing
class CreditGrantService < StripeService
# Creates a credit grant
# Creates a credit grant.
def create(params = {}, opts = {})
request(
method: :post,
Expand Down Expand Up @@ -37,7 +37,7 @@ def list(params = {}, opts = {})
)
end

# Retrieves a credit grant
# Retrieves a credit grant.
def retrieve(id, params = {}, opts = {})
request(
method: :get,
Expand All @@ -48,7 +48,7 @@ def retrieve(id, params = {}, opts = {})
)
end

# Updates a credit grant
# Updates a credit grant.
def update(id, params = {}, opts = {})
request(
method: :post,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Stripe
module Billing
class MeterEventAdjustmentService < StripeService
# Creates a billing meter event adjustment
# Creates a billing meter event adjustment.
def create(params = {}, opts = {})
request(
method: :post,
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/services/billing/meter_event_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Stripe
module Billing
class MeterEventService < StripeService
# Creates a billing meter event
# Creates a billing meter event.
def create(params = {}, opts = {})
request(
method: :post,
Expand Down
10 changes: 5 additions & 5 deletions lib/stripe/services/billing/meter_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(requestor)
@event_summaries = Stripe::Billing::MeterEventSummaryService.new(@requestor)
end

# Creates a billing meter
# Creates a billing meter.
def create(params = {}, opts = {})
request(
method: :post,
Expand All @@ -22,7 +22,7 @@ def create(params = {}, opts = {})
)
end

# Deactivates a billing meter
# When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.
def deactivate(id, params = {}, opts = {})
request(
method: :post,
Expand All @@ -44,7 +44,7 @@ def list(params = {}, opts = {})
)
end

# Reactivates a billing meter
# When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.
def reactivate(id, params = {}, opts = {})
request(
method: :post,
Expand All @@ -55,7 +55,7 @@ def reactivate(id, params = {}, opts = {})
)
end

# Retrieves a billing meter given an ID
# Retrieves a billing meter given an ID.
def retrieve(id, params = {}, opts = {})
request(
method: :get,
Expand All @@ -66,7 +66,7 @@ def retrieve(id, params = {}, opts = {})
)
end

# Updates a billing meter
# Updates a billing meter.
def update(id, params = {}, opts = {})
request(
method: :post,
Expand Down

0 comments on commit 94fe22b

Please sign in to comment.