Skip to content

Commit

Permalink
Merge pull request #1189 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta (new)
  • Loading branch information
richardm-stripe authored Mar 17, 2023
2 parents 8f210e2 + a6614ee commit 75b29c3
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v249
v262
2 changes: 2 additions & 0 deletions lib/stripe/object_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def self.object_names_to_classes
BillingPortal::Configuration::OBJECT_NAME => BillingPortal::Configuration,
BillingPortal::Session::OBJECT_NAME => BillingPortal::Session,
Capability::OBJECT_NAME => Capability,
Capital::FinancingOffer::OBJECT_NAME => Capital::FinancingOffer,
Capital::FinancingSummary::OBJECT_NAME => Capital::FinancingSummary,
Capital::FinancingTransaction::OBJECT_NAME => Capital::FinancingTransaction,
Card::OBJECT_NAME => Card,
CashBalance::OBJECT_NAME => CashBalance,
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
require "stripe/resources/billing_portal/configuration"
require "stripe/resources/billing_portal/session"
require "stripe/resources/capability"
require "stripe/resources/capital/financing_offer"
require "stripe/resources/capital/financing_summary"
require "stripe/resources/capital/financing_transaction"
require "stripe/resources/card"
require "stripe/resources/cash_balance"
Expand Down
32 changes: 32 additions & 0 deletions lib/stripe/resources/capital/financing_offer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
module Capital
# This is an object representing an offer of financing from
# Stripe Capital to a Connect subaccount.
class FinancingOffer < APIResource
extend Stripe::APIOperations::List

OBJECT_NAME = "capital.financing_offer"

def mark_delivered(params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/capital/financing_offers/%<financing_offer>s/mark_delivered", { financing_offer: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end

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

module Stripe
module Capital
# A financing object describes an account's current financing state. Used by Connect
# platforms to read the state of Capital offered to their connected accounts.
class FinancingSummary < SingletonAPIResource
OBJECT_NAME = "capital.financing_summary"
end
end
end
9 changes: 9 additions & 0 deletions lib/stripe/resources/tax/transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ def list_line_items(params = {}, opts = {})
)
end

def self.create_from_calculation(params = {}, opts = {})
request_stripe_object(
method: :post,
path: "/v1/tax/transactions/create_from_calculation",
params: params,
opts: opts
)
end

def self.create_reversal(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down

0 comments on commit 75b29c3

Please sign in to comment.