Skip to content

Commit

Permalink
Update generated code for v682 (#1292)
Browse files Browse the repository at this point in the history
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: anniel-stripe <[email protected]>
  • Loading branch information
stripe-openapi[bot] and anniel-stripe authored Nov 30, 2023
1 parent ddb922b commit 9b84f25
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v670
v682
3 changes: 3 additions & 0 deletions lib/stripe/object_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def self.object_names_to_classes
CashBalance::OBJECT_NAME => CashBalance,
Charge::OBJECT_NAME => Charge,
Checkout::Session::OBJECT_NAME => Checkout::Session,
Climate::Order::OBJECT_NAME => Climate::Order,
Climate::Product::OBJECT_NAME => Climate::Product,
Climate::Supplier::OBJECT_NAME => Climate::Supplier,
CountrySpec::OBJECT_NAME => CountrySpec,
Coupon::OBJECT_NAME => Coupon,
CreditNote::OBJECT_NAME => CreditNote,
Expand Down
3 changes: 3 additions & 0 deletions lib/stripe/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
require "stripe/resources/cash_balance"
require "stripe/resources/charge"
require "stripe/resources/checkout/session"
require "stripe/resources/climate/order"
require "stripe/resources/climate/product"
require "stripe/resources/climate/supplier"
require "stripe/resources/country_spec"
require "stripe/resources/coupon"
require "stripe/resources/credit_note"
Expand Down
34 changes: 34 additions & 0 deletions lib/stripe/resources/climate/order.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
module Climate
# Orders represent your intent to purchase a particular Climate product. When you create an order, the
# payment is deducted from your merchant balance.
class Order < APIResource
extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List
include Stripe::APIOperations::Save

OBJECT_NAME = "climate.order"

def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/climate/orders/%<order>s/cancel", { order: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end

def self.cancel(order, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/climate/orders/%<order>s/cancel", { order: CGI.escape(order) }),
params: params,
opts: opts
)
end
end
end
end
14 changes: 14 additions & 0 deletions lib/stripe/resources/climate/product.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
module Climate
# A Climate product represents a type of carbon removal unit available for reservation.
# You can retrieve it to see the current price and availability.
class Product < APIResource
extend Stripe::APIOperations::List

OBJECT_NAME = "climate.product"
end
end
end
13 changes: 13 additions & 0 deletions lib/stripe/resources/climate/supplier.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
module Climate
# A supplier of carbon removal.
class Supplier < APIResource
extend Stripe::APIOperations::List

OBJECT_NAME = "climate.supplier"
end
end
end

0 comments on commit 9b84f25

Please sign in to comment.