Compare commits

...

2 Commits

Author SHA1 Message Date
Stripe OpenAPI
f3443fe079 Update generated code for v682 2023-11-22 01:00:18 +00:00
stripe-openapi[bot]
22e10313b0
Update generated code for v670 (#1291)
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
2023-11-21 11:33:19 -08:00
7 changed files with 70 additions and 3 deletions

View File

@ -1 +1 @@
v669
v682

View File

@ -29,6 +29,9 @@ module Stripe
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,

View File

@ -18,6 +18,9 @@ require "stripe/resources/card"
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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -23,8 +23,8 @@ module Stripe
# `Event` objects directly to an endpoint on your server. You can manage
# webhooks in your
# [account settings](https://dashboard.stripe.com/account/webhooks). Learn how
# to [listen for events]
# (/docs/webhooks) so that your integration can automatically trigger reactions.
# to [listen for events](https://stripe.com/docs/webhooks)
# so that your integration can automatically trigger reactions.
#
# When using [Connect](https://stripe.com/docs/connect), you can also receive event notifications
# that occur in connected accounts. For these events, there's an