mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-07-25 00:00:39 -04:00
Compare commits
2 Commits
ffd75665a1
...
f3443fe079
Author | SHA1 | Date | |
---|---|---|---|
|
f3443fe079 | ||
|
22e10313b0 |
@ -1 +1 @@
|
|||||||
v669
|
v682
|
@ -29,6 +29,9 @@ module Stripe
|
|||||||
CashBalance::OBJECT_NAME => CashBalance,
|
CashBalance::OBJECT_NAME => CashBalance,
|
||||||
Charge::OBJECT_NAME => Charge,
|
Charge::OBJECT_NAME => Charge,
|
||||||
Checkout::Session::OBJECT_NAME => Checkout::Session,
|
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,
|
CountrySpec::OBJECT_NAME => CountrySpec,
|
||||||
Coupon::OBJECT_NAME => Coupon,
|
Coupon::OBJECT_NAME => Coupon,
|
||||||
CreditNote::OBJECT_NAME => CreditNote,
|
CreditNote::OBJECT_NAME => CreditNote,
|
||||||
|
@ -18,6 +18,9 @@ require "stripe/resources/card"
|
|||||||
require "stripe/resources/cash_balance"
|
require "stripe/resources/cash_balance"
|
||||||
require "stripe/resources/charge"
|
require "stripe/resources/charge"
|
||||||
require "stripe/resources/checkout/session"
|
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/country_spec"
|
||||||
require "stripe/resources/coupon"
|
require "stripe/resources/coupon"
|
||||||
require "stripe/resources/credit_note"
|
require "stripe/resources/credit_note"
|
||||||
|
34
lib/stripe/resources/climate/order.rb
Normal file
34
lib/stripe/resources/climate/order.rb
Normal 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
|
14
lib/stripe/resources/climate/product.rb
Normal file
14
lib/stripe/resources/climate/product.rb
Normal 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
|
13
lib/stripe/resources/climate/supplier.rb
Normal file
13
lib/stripe/resources/climate/supplier.rb
Normal 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
|
@ -23,8 +23,8 @@ module Stripe
|
|||||||
# `Event` objects directly to an endpoint on your server. You can manage
|
# `Event` objects directly to an endpoint on your server. You can manage
|
||||||
# webhooks in your
|
# webhooks in your
|
||||||
# [account settings](https://dashboard.stripe.com/account/webhooks). Learn how
|
# [account settings](https://dashboard.stripe.com/account/webhooks). Learn how
|
||||||
# to [listen for events]
|
# to [listen for events](https://stripe.com/docs/webhooks)
|
||||||
# (/docs/webhooks) so that your integration can automatically trigger reactions.
|
# so that your integration can automatically trigger reactions.
|
||||||
#
|
#
|
||||||
# When using [Connect](https://stripe.com/docs/connect), you can also receive event notifications
|
# 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
|
# that occur in connected accounts. For these events, there's an
|
||||||
|
Loading…
x
Reference in New Issue
Block a user