Skip to content

Commit

Permalink
Merge branch 'master' into richardm-usage
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe authored Dec 1, 2023
2 parents 1af9e1a + 1ea064a commit ca41fd3
Show file tree
Hide file tree
Showing 11 changed files with 85 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Gemspec/DeprecatedAttributeAssignment: # new in 1.30
Gemspec/DevelopmentDependencies: # new in 1.44
Enabled: true
Gemspec/RequireMFA: # new in 1.23
Enabled: true
Enabled: false
Layout/LineContinuationLeadingSpace: # new in 1.31
Enabled: true
Layout/LineContinuationSpacing: # new in 1.31
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Changelog
## 10.2.0 - 2023-11-30
* [#1292](https://github.com/stripe/stripe-ruby/pull/1292) Update generated code
* Add support for new resources `Climate.Order`, `Climate.Product`, and `Climate.Supplier`
* Add support for `cancel`, `create`, `list`, `retrieve`, and `update` methods on resource `Order`
* Add support for `list` and `retrieve` methods on resources `Product` and `Supplier`
* [#1295](https://github.com/stripe/stripe-ruby/pull/1295) Upgrade rubocop
* [#1291](https://github.com/stripe/stripe-ruby/pull/1291) Update generated code

* [#1290](https://github.com/stripe/stripe-ruby/pull/1290) Update generated code

* [#1288](https://github.com/stripe/stripe-ruby/pull/1288) Update generated code


## 10.1.0 - 2023-11-02
* [#1286](https://github.com/stripe/stripe-ruby/pull/1286) Update generated code
* Add support for new resource `Tax.Registration`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v670
v682
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.1.0
10.2.0
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
2 changes: 1 addition & 1 deletion lib/stripe/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Stripe
VERSION = "10.1.0"
VERSION = "10.2.0"
end
2 changes: 1 addition & 1 deletion stripe.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gem::Specification.new do |s|
"github_repo" => "ssh://github.com/stripe/stripe-ruby",
"homepage_uri" => "https://stripe.com/docs/api?lang=ruby",
"source_code_uri" => "https://github.com/stripe/stripe-ruby",
"rubygems_mfa_required" => "true",
"rubygems_mfa_required" => "false",
}

ignored = Regexp.union(
Expand Down

0 comments on commit ca41fd3

Please sign in to comment.