Skip to content

Commit

Permalink
Update generated code (#1500)
Browse files Browse the repository at this point in the history
* Update generated code for v1399

* Update generated code for v1409

* Update generated code for v1412

* Update generated code for v1412

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: jar-stripe <[email protected]>
  • Loading branch information
stripe-openapi[bot] and jar-stripe authored Dec 18, 2024
1 parent 8aec85f commit d2c09c3
Show file tree
Hide file tree
Showing 100 changed files with 206 additions and 217 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1347
v1412
2 changes: 1 addition & 1 deletion lib/stripe/api_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

module Stripe
module ApiVersion
CURRENT = "2024-11-20.acacia"
CURRENT = "2024-12-18.acacia"
end
end
4 changes: 2 additions & 2 deletions lib/stripe/resources/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def delete(params = {}, opts = {})
end

# Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/accounts", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/accounts", params: params, opts: opts)
end

# Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
Expand Down
9 changes: 2 additions & 7 deletions lib/stripe/resources/apple_pay_domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,8 @@ def delete(params = {}, opts = {})
end

# List apple pay domains.
def self.list(filters = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/apple_pay/domains",
params: filters,
opts: opts
)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/apple_pay/domains", params: params, opts: opts)
end

def self.resource_url
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/application_fee.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def self.object_name
nested_resource_class_methods :refund, operations: %i[create retrieve update list]

# Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/application_fees", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/application_fees", params: params, opts: opts)
end
end
end
4 changes: 2 additions & 2 deletions lib/stripe/resources/apps/secret.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def self.find(params = {}, opts = {})
end

# List all secrets stored on the given scope.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/apps/secrets", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/apps/secrets", params: params, opts: opts)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/balance_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ def self.object_name
# Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
#
# Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
def self.list(filters = {}, opts = {})
def self.list(params = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/balance_transactions",
params: filters,
params: params,
opts: opts
)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/resources/bank_account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def delete(params = {}, opts = {})
)
end

def self.list(filters = {}, opts = {})
def self.list(params = {}, opts = {})
raise NotImplementedError,
"Bank accounts cannot be listed without a customer ID or an " \
"account ID. List bank accounts using " \
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/billing/alert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def self.deactivate(id, params = {}, opts = {})
end

# Lists billing active and inactive alerts
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/billing/alerts", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/billing/alerts", params: params, opts: opts)
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions lib/stripe/resources/billing/credit_balance_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ def self.object_name
"billing.credit_balance_transaction"
end

# Retrieve a list of credit balance transactions
def self.list(filters = {}, opts = {})
# Retrieve a list of credit balance transactions.
def self.list(params = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/billing/credit_balance_transactions",
params: filters,
params: params,
opts: opts
)
end
Expand Down
8 changes: 4 additions & 4 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 @@ -47,16 +47,16 @@ def self.expire(id, params = {}, opts = {})
end

# Retrieve a list of credit grants.
def self.list(filters = {}, opts = {})
def self.list(params = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/billing/credit_grants",
params: filters,
params: params,
opts: opts
)
end

# Updates a credit grant
# Updates a credit grant.
def self.update(id, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down
18 changes: 9 additions & 9 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 @@ -47,11 +47,11 @@ def self.deactivate(id, params = {}, opts = {})
end

# Retrieve a list of billing meters.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/billing/meters", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/billing/meters", params: params, 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
4 changes: 2 additions & 2 deletions lib/stripe/resources/billing_portal/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ def self.create(params = {}, opts = {})
end

# Returns a list of configurations that describe the functionality of the customer portal.
def self.list(filters = {}, opts = {})
def self.list(params = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/billing_portal/configurations",
params: filters,
params: params,
opts: opts
)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/resources/card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def delete(params = {}, opts = {})
)
end

def self.list(filters = {}, opts = {})
def self.list(params = {}, opts = {})
raise NotImplementedError,
"Cards cannot be listed without a customer ID or an account " \
"ID. List cards using `Customer.list_sources(" \
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/charge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def self.create(params = {}, opts = {})
end

# Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/charges", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/charges", params: params, opts: opts)
end

def self.search(params = {}, opts = {})
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/checkout/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ def self.expire(session, params = {}, opts = {})
end

# Returns a list of Checkout Sessions.
def self.list(filters = {}, opts = {})
def self.list(params = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/checkout/sessions",
params: filters,
params: params,
opts: opts
)
end
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/climate/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def self.create(params = {}, opts = {})

# Lists all Climate order objects. The orders are returned sorted by creation date, with the
# most recently created orders appearing first.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/climate/orders", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/climate/orders", params: params, opts: opts)
end

# Updates the specified order by setting the values of the parameters passed.
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/climate/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ def self.object_name
end

# Lists all available Climate product objects.
def self.list(filters = {}, opts = {})
def self.list(params = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/climate/products",
params: filters,
params: params,
opts: opts
)
end
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/climate/supplier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ def self.object_name
end

# Lists all available Climate supplier objects.
def self.list(filters = {}, opts = {})
def self.list(params = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/climate/suppliers",
params: filters,
params: params,
opts: opts
)
end
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/country_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def self.object_name
end

# Lists all Country Spec objects available in the API.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/country_specs", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/country_specs", params: params, opts: opts)
end
end
end
4 changes: 2 additions & 2 deletions lib/stripe/resources/coupon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def delete(params = {}, opts = {})
end

# Returns a list of your coupons.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/coupons", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/coupons", params: params, opts: opts)
end

# Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/credit_note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def self.create(params = {}, opts = {})
end

# Returns a list of credit notes.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/credit_notes", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/credit_notes", params: params, opts: opts)
end

# When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def self.delete_discount(customer, params = {}, opts = {})
end

# Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/customers", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/customers", params: params, opts: opts)
end

# Returns a list of PaymentMethods for a given Customer
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/dispute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def self.close(dispute, params = {}, opts = {})
end

# Returns a list of your disputes.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/disputes", params: filters, opts: opts)
def self.list(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/disputes", params: params, opts: opts)
end

# When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically.
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/entitlements/active_entitlement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ def self.object_name
end

# Retrieve a list of active entitlements for a customer
def self.list(filters = {}, opts = {})
def self.list(params = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/entitlements/active_entitlements",
params: filters,
params: params,
opts: opts
)
end
Expand Down
Loading

0 comments on commit d2c09c3

Please sign in to comment.