Skip to content

Commit

Permalink
Codegen for openapi v196
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Sep 26, 2022
1 parent 35a2933 commit 6720fc8
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v185
v196
3 changes: 3 additions & 0 deletions lib/stripe/object_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ 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,
Charge::OBJECT_NAME => Charge,
Expand Down
3 changes: 3 additions & 0 deletions lib/stripe/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
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"
require "stripe/resources/charge"
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/account_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# frozen_string_literal: true

module Stripe
# An AccountSession allows a Connect platform to grant access to a connected account in Connect Elements.
# An AccountSession allows a Connect platform to grant access to a connected account in Connect Embedded UIs.
#
# We recommend that you create an AccountSession each time you need to display an embedded UI
# to your user. Do not save AccountSessions to your database as they expire relatively
# quickly, and cannot be used more than once.
#
# Related guide: [Connect Elements](https://stripe.com/docs/connect/get-started-connect-elements).
# Related guide: [Connect Embedded UIs](https://stripe.com/docs/connect/get-started-connect-elements).
class AccountSession < APIResource
extend Stripe::APIOperations::Create

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
13 changes: 13 additions & 0 deletions lib/stripe/resources/capital/financing_transaction.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 Capital
# This is an object representing the details of a transaction on a Capital financing object.
class FinancingTransaction < APIResource
extend Stripe::APIOperations::List

OBJECT_NAME = "capital.financing_transaction"
end
end
end

0 comments on commit 6720fc8

Please sign in to comment.