Compare commits

..

No commits in common. "8f210e251a234ee88285851cd84bd6ff2292591b" and "f471a2c6a4c4a8fe4bd5590488fe3b7cca53d862" have entirely different histories.

8 changed files with 54 additions and 12 deletions

View File

@ -4,5 +4,4 @@ update-version:
@perl -pi -e 's|VERSION = "[.\-\w\d]+"|VERSION = "$(VERSION)"|' lib/stripe/version.rb @perl -pi -e 's|VERSION = "[.\-\w\d]+"|VERSION = "$(VERSION)"|' lib/stripe/version.rb
codegen-format: codegen-format:
bundle install --quiet
bundle exec rubocop -o /dev/null --auto-correct bundle exec rubocop -o /dev/null --auto-correct

View File

@ -25,6 +25,8 @@ module Stripe
BillingPortal::Configuration::OBJECT_NAME => BillingPortal::Configuration, BillingPortal::Configuration::OBJECT_NAME => BillingPortal::Configuration,
BillingPortal::Session::OBJECT_NAME => BillingPortal::Session, BillingPortal::Session::OBJECT_NAME => BillingPortal::Session,
Capability::OBJECT_NAME => Capability, Capability::OBJECT_NAME => Capability,
Capital::FinancingOffer::OBJECT_NAME => Capital::FinancingOffer,
Capital::FinancingSummary::OBJECT_NAME => Capital::FinancingSummary,
Capital::FinancingTransaction::OBJECT_NAME => Capital::FinancingTransaction, Capital::FinancingTransaction::OBJECT_NAME => Capital::FinancingTransaction,
Card::OBJECT_NAME => Card, Card::OBJECT_NAME => Card,
CashBalance::OBJECT_NAME => CashBalance, CashBalance::OBJECT_NAME => CashBalance,

View File

@ -14,6 +14,8 @@ require "stripe/resources/bank_account"
require "stripe/resources/billing_portal/configuration" require "stripe/resources/billing_portal/configuration"
require "stripe/resources/billing_portal/session" require "stripe/resources/billing_portal/session"
require "stripe/resources/capability" 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/capital/financing_transaction"
require "stripe/resources/card" require "stripe/resources/card"
require "stripe/resources/cash_balance" require "stripe/resources/cash_balance"

View File

@ -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

View File

@ -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

View File

@ -6,7 +6,7 @@ module Stripe
# #
# When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. # When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.
# #
# Related guide: [Payment Links API](https://stripe.com/docs/payment-links) # Related guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api)
class PaymentLink < APIResource class PaymentLink < APIResource
extend Stripe::APIOperations::Create extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List extend Stripe::APIOperations::List

View File

@ -7,7 +7,7 @@ module Stripe
# They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. # They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.
# #
# Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),
# [share a Payment Link](https://stripe.com/docs/payment-links), # [share a Payment Link](https://stripe.com/docs/payments/payment-links/overview),
# [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), # [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),
# and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) # and more about [Products and Prices](https://stripe.com/docs/products-prices/overview)
class Product < APIResource class Product < APIResource

View File

@ -83,10 +83,10 @@ module Stripe
) )
end end
def preview_invoice_lines(preview_invoice, params = {}, opts = {}) def preview_invoice_lines(params = {}, opts = {})
request_stripe_object( request_stripe_object(
method: :get, method: :get,
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(self["id"]), preview_invoice: CGI.escape(preview_invoice) }), path: format("/v1/quotes/%<quote>s/preview_invoice_lines", { quote: CGI.escape(self["id"]) }),
params: params, params: params,
opts: opts opts: opts
) )
@ -191,15 +191,10 @@ module Stripe
) )
end end
def self.preview_invoice_lines( def self.preview_invoice_lines(quote, params = {}, opts = {})
quote,
preview_invoice,
params = {},
opts = {}
)
request_stripe_object( request_stripe_object(
method: :get, method: :get,
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }), path: format("/v1/quotes/%<quote>s/preview_invoice_lines", { quote: CGI.escape(quote) }),
params: params, params: params,
opts: opts opts: opts
) )