mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-07-25 00:00:39 -04:00
Compare commits
2 Commits
946566fefe
...
31c5c93feb
Author | SHA1 | Date | |
---|---|---|---|
|
31c5c93feb | ||
|
22e10313b0 |
@ -1 +1 @@
|
|||||||
v670
|
v682
|
@ -33,6 +33,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,
|
||||||
ConfirmationToken::OBJECT_NAME => ConfirmationToken,
|
ConfirmationToken::OBJECT_NAME => ConfirmationToken,
|
||||||
CountrySpec::OBJECT_NAME => CountrySpec,
|
CountrySpec::OBJECT_NAME => CountrySpec,
|
||||||
Coupon::OBJECT_NAME => Coupon,
|
Coupon::OBJECT_NAME => Coupon,
|
||||||
|
@ -22,6 +22,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/confirmation_token"
|
require "stripe/resources/confirmation_token"
|
||||||
require "stripe/resources/country_spec"
|
require "stripe/resources/country_spec"
|
||||||
require "stripe/resources/coupon"
|
require "stripe/resources/coupon"
|
||||||
|
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
|
Loading…
x
Reference in New Issue
Block a user