mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-07-22 00:00:40 -04:00
Compare commits
8 Commits
b036d14d27
...
5ece384518
Author | SHA1 | Date | |
---|---|---|---|
|
5ece384518 | ||
|
d936ddcff1 | ||
|
77d8304c54 | ||
|
625a58661e | ||
|
33eff4d1d3 | ||
|
6ba63d9a87 | ||
|
0d538ab0f1 | ||
|
6a5b89c99d |
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,5 +1,15 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 10.2.0-beta.1 - 2023-11-02
|
||||||
|
* [#1287](https://github.com/stripe/stripe-ruby/pull/1287) Update generated code for beta
|
||||||
|
* Add support for `attach_payment_intent` method on resource `Invoice`
|
||||||
|
* [#1285](https://github.com/stripe/stripe-ruby/pull/1285) Update generated code for beta
|
||||||
|
|
||||||
|
## 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`
|
||||||
|
* Add support for `create`, `list`, and `update` methods on resource `Registration`
|
||||||
|
|
||||||
## 10.1.0-beta.2 - 2023-10-26
|
## 10.1.0-beta.2 - 2023-10-26
|
||||||
* [#1285](https://github.com/stripe/stripe-ruby/pull/1285) Update generated code for beta
|
* [#1285](https://github.com/stripe/stripe-ruby/pull/1285) Update generated code for beta
|
||||||
* Add support for new resource `Margin`
|
* Add support for new resource `Margin`
|
||||||
|
@ -1 +1 @@
|
|||||||
v627
|
v645
|
@ -66,6 +66,7 @@ module Stripe
|
|||||||
Invoice::OBJECT_NAME => Invoice,
|
Invoice::OBJECT_NAME => Invoice,
|
||||||
InvoiceItem::OBJECT_NAME => InvoiceItem,
|
InvoiceItem::OBJECT_NAME => InvoiceItem,
|
||||||
InvoiceLineItem::OBJECT_NAME => InvoiceLineItem,
|
InvoiceLineItem::OBJECT_NAME => InvoiceLineItem,
|
||||||
|
InvoicePayment::OBJECT_NAME => InvoicePayment,
|
||||||
Issuing::Authorization::OBJECT_NAME => Issuing::Authorization,
|
Issuing::Authorization::OBJECT_NAME => Issuing::Authorization,
|
||||||
Issuing::Card::OBJECT_NAME => Issuing::Card,
|
Issuing::Card::OBJECT_NAME => Issuing::Card,
|
||||||
Issuing::Cardholder::OBJECT_NAME => Issuing::Cardholder,
|
Issuing::Cardholder::OBJECT_NAME => Issuing::Cardholder,
|
||||||
|
@ -52,6 +52,7 @@ require "stripe/resources/identity/verification_session"
|
|||||||
require "stripe/resources/invoice"
|
require "stripe/resources/invoice"
|
||||||
require "stripe/resources/invoice_item"
|
require "stripe/resources/invoice_item"
|
||||||
require "stripe/resources/invoice_line_item"
|
require "stripe/resources/invoice_line_item"
|
||||||
|
require "stripe/resources/invoice_payment"
|
||||||
require "stripe/resources/issuing/authorization"
|
require "stripe/resources/issuing/authorization"
|
||||||
require "stripe/resources/issuing/card"
|
require "stripe/resources/issuing/card"
|
||||||
require "stripe/resources/issuing/cardholder"
|
require "stripe/resources/issuing/cardholder"
|
||||||
|
@ -2,17 +2,32 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Stripe
|
module Stripe
|
||||||
# `Exchange Rate` objects allow you to determine the rates that Stripe is
|
# `ExchangeRate` objects allow you to determine the rates that Stripe is currently
|
||||||
# currently using to convert from one currency to another. Since this number is
|
# using to convert from one currency to another. Since this number is variable
|
||||||
# variable throughout the day, there are various reasons why you might want to
|
# throughout the day, there are various reasons why you might want to know the current
|
||||||
# know the current rate (for example, to dynamically price an item for a user
|
# rate (for example, to dynamically price an item for a user with a default
|
||||||
# with a default payment in a foreign currency).
|
# payment in a foreign currency).
|
||||||
#
|
#
|
||||||
# If you want a guarantee that the charge is made with a certain exchange rate
|
# Please refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details.
|
||||||
# you expect is current, you can pass in `exchange_rate` to charges endpoints.
|
#
|
||||||
# If the value is no longer up to date, the charge won't go through. Please
|
# *[Note: this integration path is supported but no longer recommended]* Additionally,
|
||||||
# refer to our [Exchange Rates API](https://stripe.com/docs/exchange-rates) guide for more
|
# you can guarantee that a charge is made with an exchange rate that you expect is
|
||||||
# details.
|
# current. To do so, you must pass in the exchange_rate to charges endpoints. If the
|
||||||
|
# value is no longer up to date, the charge won't go through. Please refer to our
|
||||||
|
# [Using with charges](https://stripe.com/docs/exchange-rates) guide for more details.
|
||||||
|
#
|
||||||
|
# -----
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# *This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:*
|
||||||
|
#
|
||||||
|
# - *localize prices for processing payments on Stripe*
|
||||||
|
# - *reconcile Stripe transactions*
|
||||||
|
# - *determine how much money to send to a connected account*
|
||||||
|
# - *determine app fees to charge a connected account*
|
||||||
|
#
|
||||||
|
# *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.*
|
||||||
class ExchangeRate < APIResource
|
class ExchangeRate < APIResource
|
||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
|
@ -40,9 +40,21 @@ module Stripe
|
|||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
extend Stripe::APIOperations::Search
|
extend Stripe::APIOperations::Search
|
||||||
include Stripe::APIOperations::Save
|
include Stripe::APIOperations::Save
|
||||||
|
extend Stripe::APIOperations::NestedResource
|
||||||
|
|
||||||
OBJECT_NAME = "invoice"
|
OBJECT_NAME = "invoice"
|
||||||
|
|
||||||
|
nested_resource_class_methods :payment, operations: %i[retrieve list]
|
||||||
|
|
||||||
|
def attach_payment_intent(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def finalize_invoice(params = {}, opts = {})
|
def finalize_invoice(params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
@ -88,6 +100,15 @@ module Stripe
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.attach_payment_intent(invoice, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(invoice) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def self.finalize_invoice(invoice, params = {}, opts = {})
|
def self.finalize_invoice(invoice, params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
|
11
lib/stripe/resources/invoice_payment.rb
Normal file
11
lib/stripe/resources/invoice_payment.rb
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
# The invoice payment object
|
||||||
|
class InvoicePayment < APIResource
|
||||||
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
|
OBJECT_NAME = "invoice_payment"
|
||||||
|
end
|
||||||
|
end
|
@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Stripe
|
module Stripe
|
||||||
VERSION = "10.1.0-beta.2"
|
VERSION = "10.2.0-beta.1"
|
||||||
end
|
end
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user