mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-07-18 00:00:44 -04:00
Compare commits
105 Commits
1d74e42c87
...
705078e2cf
Author | SHA1 | Date | |
---|---|---|---|
|
705078e2cf | ||
|
29d8261b17 | ||
|
3958d6a9df | ||
|
e4e6bb54fd | ||
|
e2e4b77a87 | ||
|
57a2806c18 | ||
|
7db585f5a4 | ||
|
696be38196 | ||
|
ff853fda95 | ||
|
d10398a825 | ||
|
6f70bd8696 | ||
|
1d21c60802 | ||
|
b9c10b9c2f | ||
|
446ffc7a22 | ||
|
58db6d32ef | ||
|
9a4dfdcb2f | ||
|
50bbc0df17 | ||
|
8226f0ad99 | ||
|
43fa8f5af7 | ||
|
0e61789557 | ||
|
cfe69c131e | ||
|
7bf9cace9e | ||
|
d7eac6010d | ||
|
7d91cb83d9 | ||
|
ce4946f5d8 | ||
|
15415fcbf3 | ||
|
f8acdb5f6a | ||
|
fe794f4868 | ||
|
2b841bc109 | ||
|
1835883848 | ||
|
e11400adc8 | ||
|
5ea85d0867 | ||
|
600b1965f6 | ||
|
5fdd180667 | ||
|
97e24e9e57 | ||
|
9531f57236 | ||
|
094574d2fe | ||
|
cff25d0c8b | ||
|
0795c1d3d0 | ||
|
802a1a7aa6 | ||
|
13b0bca995 | ||
|
51d364c844 | ||
|
f4c6f2b304 | ||
|
b64fe42043 | ||
|
586e685e63 | ||
|
3b5c725539 | ||
|
ea91a6f0b9 | ||
|
21f31edff4 | ||
|
a11f1ffd2a | ||
|
4bd92239d5 | ||
|
c261f6bbb6 | ||
|
f45fc7d703 | ||
|
5cd522c007 | ||
|
e6bda8356d | ||
|
2354633a92 | ||
|
549a73544f | ||
|
25833c1408 | ||
|
a59b57c3d1 | ||
|
63d447df77 | ||
|
5cd6f9f9bc | ||
|
ffa3747bdf | ||
|
ddf79610d9 | ||
|
edad946244 | ||
|
e3785d5893 | ||
|
2062e988eb | ||
|
0bdc688516 | ||
|
82ac9f2720 | ||
|
7381eb02a6 | ||
|
6720fc8d3f | ||
|
35a29332c5 | ||
|
519d68ce10 | ||
|
b95ea4ba27 | ||
|
318e244a76 | ||
|
bb1c995e93 | ||
|
0f12721697 | ||
|
671163245a | ||
|
486bee15a8 | ||
|
fdf5be66f5 | ||
|
c732841fd3 | ||
|
22db70b479 | ||
|
2db4fd9d06 | ||
|
6797f906e1 | ||
|
59f2d4d0fe | ||
|
0d1b570bfa | ||
|
d7d3c1b425 | ||
|
7df619de69 | ||
|
f649ed3824 | ||
|
32a95902cc | ||
|
bdcfe6cc33 | ||
|
5e1c4a2302 | ||
|
54a073783f | ||
|
e6a07ae658 | ||
|
588ed3b5e7 | ||
|
de33cde125 | ||
|
d849ec3b14 | ||
|
8b5f78aa6a | ||
|
7f6ba1c35c | ||
|
e55a2559ae | ||
|
0b00266be1 | ||
|
d0cd4fbaa6 | ||
|
979da6f84b | ||
|
d95c518a3c | ||
|
83c773f61e | ||
|
d9f719ba01 | ||
|
73d10e8557 |
133
CHANGELOG.md
133
CHANGELOG.md
@ -1,13 +1,65 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 8.3.0 - 2023-02-16
|
||||||
|
* [#1175](https://github.com/stripe/stripe-ruby/pull/1175) API Updates
|
||||||
|
* Add support for `refund_payment` method on resource `Terminal.Reader`
|
||||||
|
|
||||||
|
## 8.3.0-beta.1 - 2023-02-02
|
||||||
|
* [#1174](https://github.com/stripe/stripe-ruby/pull/1174) API Updates for beta branch
|
||||||
|
* Updated stable APIs to the latest version
|
||||||
|
* Add support for new resource `FinancialConnections.Transaction`
|
||||||
|
* Add support for `list` method on resource `Transaction`
|
||||||
|
|
||||||
## 8.2.0 - 2023-02-02
|
## 8.2.0 - 2023-02-02
|
||||||
* [#1173](https://github.com/stripe/stripe-ruby/pull/1173) API Updates
|
* [#1173](https://github.com/stripe/stripe-ruby/pull/1173) API Updates
|
||||||
* Add support for `resume` method on resource `Subscription`
|
* Add support for `resume` method on resource `Subscription`
|
||||||
* [#1171](https://github.com/stripe/stripe-ruby/pull/1171) Remove unused `partial` param from `initialize_from`
|
* [#1171](https://github.com/stripe/stripe-ruby/pull/1171) Remove unused `partial` param from `initialize_from`
|
||||||
|
|
||||||
|
## 8.2.0-beta.3 - 2023-01-26
|
||||||
|
* [#1172](https://github.com/stripe/stripe-ruby/pull/1172) API Updates for beta branch
|
||||||
|
* Updated stable APIs to the latest version
|
||||||
|
* Add support for `list_transactions` method on resource `Tax.Transaction`
|
||||||
|
|
||||||
|
## 8.2.0-beta.2 - 2023-01-19
|
||||||
|
* [#1170](https://github.com/stripe/stripe-ruby/pull/1170) API Updates for beta branch
|
||||||
|
* Updated stable APIs to the latest version
|
||||||
|
* Add support for `Tax.Settings` resource.
|
||||||
|
|
||||||
|
## 8.2.0-beta.1 - 2023-01-12
|
||||||
|
* [#1167](https://github.com/stripe/stripe-ruby/pull/1167) API Updates for beta branch
|
||||||
|
* Updated stable APIs to the latest version
|
||||||
|
* Change `quote.draft_quote` implementation to from calling `POST /v1/quotes/{quote}/draft` to `POST /v1/quotes/{quote}/mark_draft`
|
||||||
|
* Add support for `Tax::Register` resource
|
||||||
|
|
||||||
## 8.1.0 - 2023-01-12
|
## 8.1.0 - 2023-01-12
|
||||||
* [#1162](https://github.com/stripe/stripe-ruby/pull/1162) Improve request events instrumentation
|
* [#1162](https://github.com/stripe/stripe-ruby/pull/1162) Improve request events instrumentation
|
||||||
|
|
||||||
|
## 8.1.0-beta.4 - 2023-01-05
|
||||||
|
* [#1164](https://github.com/stripe/stripe-ruby/pull/1164) API Updates for beta branch
|
||||||
|
* Updated stable APIs to the latest version
|
||||||
|
* Add support for `mark_stale_quote` method on resource `Quote`
|
||||||
|
|
||||||
|
## 8.1.0-beta.3 - 2022-12-22
|
||||||
|
* [#1158](https://github.com/stripe/stripe-ruby/pull/1158) API Updates for beta branch
|
||||||
|
* Updated stable APIs to the latest version
|
||||||
|
* Move `TaxCalculation` and `TaxTransaction` to `Tax::Calculation` and `Tax::Transaction`.
|
||||||
|
|
||||||
|
## 8.1.0-beta.2 - 2022-12-15
|
||||||
|
* [#1156](https://github.com/stripe/stripe-ruby/pull/1156) API Updates for beta branch
|
||||||
|
* Updated stable APIs to the latest version
|
||||||
|
* Add support for new resources `TaxCalculation`, and `TaxTransaction`
|
||||||
|
* Add support for `create` and `list_line_items` methods on resource `TaxCalculation`
|
||||||
|
* Add support for `create_reversal`, `create`, and `retrieve` methods on resource `TaxTransaction`
|
||||||
|
* [#1155](https://github.com/stripe/stripe-ruby/pull/1155) API Updates for beta branch
|
||||||
|
* Updated stable APIs to the latest version
|
||||||
|
* Add support for new resource `QuoteLine`.
|
||||||
|
|
||||||
|
## 8.1.0-beta.1 - 2022-12-08
|
||||||
|
* [#1153](https://github.com/stripe/stripe-ruby/pull/1153) API Updates for beta branch
|
||||||
|
* Updated stable APIs to the latest version
|
||||||
|
* [#1146](https://github.com/stripe/stripe-ruby/pull/1146) API Updates for beta branch
|
||||||
|
* Updated stable APIs to the latest version
|
||||||
|
|
||||||
## 8.0.0 - 2022-11-16
|
## 8.0.0 - 2022-11-16
|
||||||
* [#1144](https://github.com/stripe/stripe-ruby/pull/1144) Next major release changes
|
* [#1144](https://github.com/stripe/stripe-ruby/pull/1144) Next major release changes
|
||||||
|
|
||||||
@ -15,30 +67,29 @@ Breaking changes that arose during code generation of the library that we postpo
|
|||||||
|
|
||||||
"⚠️" symbol highlights breaking changes.
|
"⚠️" symbol highlights breaking changes.
|
||||||
|
|
||||||
### Deprecated
|
## 7.2.0-beta.5 - 2022-11-02
|
||||||
- The `save` method is deprecated. Prefer the static `update` method that doesn't require retrieval of the resource to update it.
|
* [#1139](https://github.com/stripe/stripe-ruby/pull/1139) API Updates for beta branch
|
||||||
``` ruby
|
* Updated beta APIs to the latest stable version
|
||||||
# before
|
* [#1135](https://github.com/stripe/stripe-ruby/pull/1135) API Updates for beta branch
|
||||||
refund = Stripe::Refund.retrieve("re_123")
|
* Updated stable APIs to the latest version
|
||||||
refund.description = "Refund description"
|
|
||||||
refund.save
|
|
||||||
|
|
||||||
# after
|
## 7.2.0-beta.4 - 2022-10-07
|
||||||
Stripe::Refund.update("re_123", description: "Refund description")
|
* [#999](https://github.com/stripe/stripe-ruby/pull/999) DESCRIBE CHANGES HERE (try to use the same style, tense, etc. as the other entries)
|
||||||
```
|
|
||||||
|
|
||||||
### ⚠️ Removed
|
## 7.2.0-beta.3 - 2022-09-26
|
||||||
- Removed deprecated `Sku` resource.
|
* [#1129](https://github.com/stripe/stripe-ruby/pull/1129) API Updates for beta branch
|
||||||
- Removed deprecated `Orders` resource.
|
* Updated stable APIs to the latest version
|
||||||
- Removed deprecated `delete` method on `Subscription` resource. Please use `cancel` method instead.
|
* Add `FinancingOffer`, `FinancingSummary` and `FinancingTransaction` resources.
|
||||||
```ruby
|
|
||||||
# before
|
|
||||||
Stripe::Subscription::delete("sub_12345")
|
|
||||||
|
|
||||||
# after
|
## 7.2.0-beta.2 - 2022-08-26
|
||||||
Stripe::Subscription::cancel("sub_12345")
|
* [#1127](https://github.com/stripe/stripe-ruby/pull/1127) API Updates for beta branch
|
||||||
```
|
* Updated stable APIs to the latest version
|
||||||
|
* Add support for the beta [Gift Card API](https://stripe.com/docs/gift-cards).
|
||||||
|
|
||||||
|
## 7.2.0-beta.1 - 2022-08-23
|
||||||
|
* [#1122](https://github.com/stripe/stripe-ruby/pull/1122) API Updates for beta branch
|
||||||
|
- Updated stable APIs to the latest version
|
||||||
|
- `Stripe-Version` beta headers are not pinned by-default and need to be manually specified, please refer to [beta SDKs README section](https://github.com/stripe/stripe-ruby/blob/master/README.md#beta-sdks)
|
||||||
|
|
||||||
## 7.1.0 - 2022-08-19
|
## 7.1.0 - 2022-08-19
|
||||||
* [#1116](https://github.com/stripe/stripe-ruby/pull/1116) API Updates
|
* [#1116](https://github.com/stripe/stripe-ruby/pull/1116) API Updates
|
||||||
@ -47,6 +98,16 @@ Breaking changes that arose during code generation of the library that we postpo
|
|||||||
* [#1117](https://github.com/stripe/stripe-ruby/pull/1117) Refresh rubocop config.
|
* [#1117](https://github.com/stripe/stripe-ruby/pull/1117) Refresh rubocop config.
|
||||||
* [#1115](https://github.com/stripe/stripe-ruby/pull/1115) Add a support section to the readme
|
* [#1115](https://github.com/stripe/stripe-ruby/pull/1115) Add a support section to the readme
|
||||||
|
|
||||||
|
## 7.1.0-beta.2 - 2022-08-11
|
||||||
|
* [#1113](https://github.com/stripe/stripe-ruby/pull/1113) API Updates for beta branch
|
||||||
|
- Updated stable APIs to the latest version
|
||||||
|
- Add `refund_payment` method to Terminal resource
|
||||||
|
|
||||||
|
## 7.1.0-beta.1 - 2022-08-03
|
||||||
|
* [#1107](https://github.com/stripe/stripe-ruby/pull/1107) API Updates for beta branch
|
||||||
|
- Updated stable APIs to the latest version
|
||||||
|
- Added the `Order` resource support
|
||||||
|
|
||||||
## 7.0.0 - 2022-08-02
|
## 7.0.0 - 2022-08-02
|
||||||
|
|
||||||
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v7. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
|
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v7. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
|
||||||
@ -58,21 +119,19 @@ Breaking changes that arose during code generation of the library that we postpo
|
|||||||
* [#1090](https://github.com/stripe/stripe-ruby/pull/1090) Use auto-generation for `Invoice` methods
|
* [#1090](https://github.com/stripe/stripe-ruby/pull/1090) Use auto-generation for `Invoice` methods
|
||||||
* [#1103](https://github.com/stripe/stripe-ruby/pull/1103) Next major release changes
|
* [#1103](https://github.com/stripe/stripe-ruby/pull/1103) Next major release changes
|
||||||
|
|
||||||
### ⚠️ Changed
|
## 6.6.0-beta.1 - 2022-07-22
|
||||||
* `retrieve_cash_balance` and `update_cash_balance` methods on `Customer` resource no longer requires the second argument to always be `nil`. The methods now now take in `customer_id`, `params`, and `opts` parameters.
|
* [#1100](https://github.com/stripe/stripe-ruby/pull/1100) API Updates for beta branch
|
||||||
* Update default bundle of CA certificates to April 26, 2022.
|
- Updated stable APIs to the latest version
|
||||||
|
- Add `QuotePhase` resource
|
||||||
### Deprecated
|
* [#1097](https://github.com/stripe/stripe-ruby/pull/1097) API Updates for beta branch
|
||||||
* Deprecate `delete` method on `Subscription` resource. Please use `cancel` method instead.
|
- Updated stable APIs to the latest version
|
||||||
|
- Add `SubscriptionSchedule.amend` method.
|
||||||
### ⚠️ Removed
|
* [#1093](https://github.com/stripe/stripe-ruby/pull/1093) API Updates for beta branch
|
||||||
* Remove `details` method from `Issuing.Card` resource. The method was not supported.
|
- Include `server_side_confirmation_beta=v1` beta
|
||||||
* Remove `Issuing.CardDetails` resource. Read more at https://stripe.com/docs/issuing/cards/virtual.
|
- Add `secretKeyConfirmation` to `PaymentIntent`
|
||||||
* Remove `create` method from `ReportType` resource. The method was not supported.
|
* [#1085](https://github.com/stripe/stripe-ruby/pull/1085) API Updates for beta branch
|
||||||
* Remove `usage_record_summaries` method from `SubscriptionItem` resource. Please use `list_usage_record_summaries` method instead.
|
- Updated stable APIs to the latest version
|
||||||
* Remove `AlipayAccount`, `BitcoinReceiver`, `BitcoinTransaction`, `Issuing::CardDetails`, `Recipient`, ` RecipientTransfer`, and `ThreeDSecure` resources. The resources were deprecated or no longer in use.
|
* [#1075](https://github.com/stripe/stripe-ruby/pull/1075) Use the generated API version
|
||||||
* Remove ability to list `Card` resource for a `Recipient`.
|
|
||||||
* Remove `cancel` method from `Transfer` resource. The method was deprecated.
|
|
||||||
|
|
||||||
## 6.5.0 - 2022-06-29
|
## 6.5.0 - 2022-06-29
|
||||||
* [#1084](https://github.com/stripe/stripe-ruby/pull/1084) API Updates
|
* [#1084](https://github.com/stripe/stripe-ruby/pull/1084) API Updates
|
||||||
@ -103,8 +162,6 @@ Breaking changes that arose during code generation of the library that we postpo
|
|||||||
* Add support for `retrieve_payment_method` method on resource `Customer`
|
* Add support for `retrieve_payment_method` method on resource `Customer`
|
||||||
* Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
|
* Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 6.0.0 - 2022-05-09
|
## 6.0.0 - 2022-05-09
|
||||||
* [#1056](https://github.com/stripe/stripe-ruby/pull/1056) API Updates
|
* [#1056](https://github.com/stripe/stripe-ruby/pull/1056) API Updates
|
||||||
Major version release. The [migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-Guide-for-v6) contains more information.
|
Major version release. The [migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-Guide-for-v6) contains more information.
|
||||||
@ -120,7 +177,6 @@ Breaking changes that arose during code generation of the library that we postpo
|
|||||||
* [#1055](https://github.com/stripe/stripe-ruby/pull/1055) API Updates
|
* [#1055](https://github.com/stripe/stripe-ruby/pull/1055) API Updates
|
||||||
* Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
|
* Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
|
||||||
|
|
||||||
|
|
||||||
## 5.54.0 - 2022-05-03
|
## 5.54.0 - 2022-05-03
|
||||||
* [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
|
* [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
|
||||||
* Add support for new resource `CashBalance`
|
* Add support for new resource `CashBalance`
|
||||||
@ -1150,3 +1206,4 @@ Identical to 1.56.0 above. I incorrectly cut a patch-level release.
|
|||||||
<!--
|
<!--
|
||||||
# vim: set tw=0:
|
# vim: set tw=0:
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
v226
|
v232
|
@ -15,6 +15,7 @@ require "uri"
|
|||||||
require "forwardable"
|
require "forwardable"
|
||||||
|
|
||||||
# Version
|
# Version
|
||||||
|
require "stripe/api_version"
|
||||||
require "stripe/version"
|
require "stripe/version"
|
||||||
|
|
||||||
# API operations
|
# API operations
|
||||||
|
@ -14,6 +14,7 @@ module Stripe
|
|||||||
# business objects
|
# business objects
|
||||||
Account::OBJECT_NAME => Account,
|
Account::OBJECT_NAME => Account,
|
||||||
AccountLink::OBJECT_NAME => AccountLink,
|
AccountLink::OBJECT_NAME => AccountLink,
|
||||||
|
AccountSession::OBJECT_NAME => AccountSession,
|
||||||
ApplePayDomain::OBJECT_NAME => ApplePayDomain,
|
ApplePayDomain::OBJECT_NAME => ApplePayDomain,
|
||||||
ApplicationFee::OBJECT_NAME => ApplicationFee,
|
ApplicationFee::OBJECT_NAME => ApplicationFee,
|
||||||
ApplicationFeeRefund::OBJECT_NAME => ApplicationFeeRefund,
|
ApplicationFeeRefund::OBJECT_NAME => ApplicationFeeRefund,
|
||||||
@ -24,6 +25,9 @@ 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,
|
||||||
Card::OBJECT_NAME => Card,
|
Card::OBJECT_NAME => Card,
|
||||||
CashBalance::OBJECT_NAME => CashBalance,
|
CashBalance::OBJECT_NAME => CashBalance,
|
||||||
Charge::OBJECT_NAME => Charge,
|
Charge::OBJECT_NAME => Charge,
|
||||||
@ -47,8 +51,12 @@ module Stripe
|
|||||||
FinancialConnections::AccountOwner::OBJECT_NAME => FinancialConnections::AccountOwner,
|
FinancialConnections::AccountOwner::OBJECT_NAME => FinancialConnections::AccountOwner,
|
||||||
FinancialConnections::AccountOwnership::OBJECT_NAME =>
|
FinancialConnections::AccountOwnership::OBJECT_NAME =>
|
||||||
FinancialConnections::AccountOwnership,
|
FinancialConnections::AccountOwnership,
|
||||||
|
FinancialConnections::InferredBalance::OBJECT_NAME => FinancialConnections::InferredBalance,
|
||||||
FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session,
|
FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session,
|
||||||
|
FinancialConnections::Transaction::OBJECT_NAME => FinancialConnections::Transaction,
|
||||||
FundingInstructions::OBJECT_NAME => FundingInstructions,
|
FundingInstructions::OBJECT_NAME => FundingInstructions,
|
||||||
|
GiftCards::Card::OBJECT_NAME => GiftCards::Card,
|
||||||
|
GiftCards::Transaction::OBJECT_NAME => GiftCards::Transaction,
|
||||||
Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport,
|
Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport,
|
||||||
Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession,
|
Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession,
|
||||||
Invoice::OBJECT_NAME => Invoice,
|
Invoice::OBJECT_NAME => Invoice,
|
||||||
@ -62,6 +70,7 @@ module Stripe
|
|||||||
LineItem::OBJECT_NAME => LineItem,
|
LineItem::OBJECT_NAME => LineItem,
|
||||||
LoginLink::OBJECT_NAME => LoginLink,
|
LoginLink::OBJECT_NAME => LoginLink,
|
||||||
Mandate::OBJECT_NAME => Mandate,
|
Mandate::OBJECT_NAME => Mandate,
|
||||||
|
Order::OBJECT_NAME => Order,
|
||||||
PaymentIntent::OBJECT_NAME => PaymentIntent,
|
PaymentIntent::OBJECT_NAME => PaymentIntent,
|
||||||
PaymentLink::OBJECT_NAME => PaymentLink,
|
PaymentLink::OBJECT_NAME => PaymentLink,
|
||||||
PaymentMethod::OBJECT_NAME => PaymentMethod,
|
PaymentMethod::OBJECT_NAME => PaymentMethod,
|
||||||
@ -72,6 +81,7 @@ module Stripe
|
|||||||
Product::OBJECT_NAME => Product,
|
Product::OBJECT_NAME => Product,
|
||||||
PromotionCode::OBJECT_NAME => PromotionCode,
|
PromotionCode::OBJECT_NAME => PromotionCode,
|
||||||
Quote::OBJECT_NAME => Quote,
|
Quote::OBJECT_NAME => Quote,
|
||||||
|
QuotePhase::OBJECT_NAME => QuotePhase,
|
||||||
Radar::EarlyFraudWarning::OBJECT_NAME => Radar::EarlyFraudWarning,
|
Radar::EarlyFraudWarning::OBJECT_NAME => Radar::EarlyFraudWarning,
|
||||||
Radar::ValueList::OBJECT_NAME => Radar::ValueList,
|
Radar::ValueList::OBJECT_NAME => Radar::ValueList,
|
||||||
Radar::ValueListItem::OBJECT_NAME => Radar::ValueListItem,
|
Radar::ValueListItem::OBJECT_NAME => Radar::ValueListItem,
|
||||||
@ -89,6 +99,10 @@ module Stripe
|
|||||||
Subscription::OBJECT_NAME => Subscription,
|
Subscription::OBJECT_NAME => Subscription,
|
||||||
SubscriptionItem::OBJECT_NAME => SubscriptionItem,
|
SubscriptionItem::OBJECT_NAME => SubscriptionItem,
|
||||||
SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
|
SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
|
||||||
|
Tax::Calculation::OBJECT_NAME => Tax::Calculation,
|
||||||
|
Tax::Registration::OBJECT_NAME => Tax::Registration,
|
||||||
|
Tax::Settings::OBJECT_NAME => Tax::Settings,
|
||||||
|
Tax::Transaction::OBJECT_NAME => Tax::Transaction,
|
||||||
TaxCode::OBJECT_NAME => TaxCode,
|
TaxCode::OBJECT_NAME => TaxCode,
|
||||||
TaxId::OBJECT_NAME => TaxId,
|
TaxId::OBJECT_NAME => TaxId,
|
||||||
TaxRate::OBJECT_NAME => TaxRate,
|
TaxRate::OBJECT_NAME => TaxRate,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
require "stripe/resources/account"
|
require "stripe/resources/account"
|
||||||
require "stripe/resources/account_link"
|
require "stripe/resources/account_link"
|
||||||
|
require "stripe/resources/account_session"
|
||||||
require "stripe/resources/apple_pay_domain"
|
require "stripe/resources/apple_pay_domain"
|
||||||
require "stripe/resources/application_fee"
|
require "stripe/resources/application_fee"
|
||||||
require "stripe/resources/application_fee_refund"
|
require "stripe/resources/application_fee_refund"
|
||||||
@ -13,6 +14,9 @@ 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/card"
|
require "stripe/resources/card"
|
||||||
require "stripe/resources/cash_balance"
|
require "stripe/resources/cash_balance"
|
||||||
require "stripe/resources/charge"
|
require "stripe/resources/charge"
|
||||||
@ -34,8 +38,12 @@ require "stripe/resources/file_link"
|
|||||||
require "stripe/resources/financial_connections/account"
|
require "stripe/resources/financial_connections/account"
|
||||||
require "stripe/resources/financial_connections/account_owner"
|
require "stripe/resources/financial_connections/account_owner"
|
||||||
require "stripe/resources/financial_connections/account_ownership"
|
require "stripe/resources/financial_connections/account_ownership"
|
||||||
|
require "stripe/resources/financial_connections/inferred_balance"
|
||||||
require "stripe/resources/financial_connections/session"
|
require "stripe/resources/financial_connections/session"
|
||||||
|
require "stripe/resources/financial_connections/transaction"
|
||||||
require "stripe/resources/funding_instructions"
|
require "stripe/resources/funding_instructions"
|
||||||
|
require "stripe/resources/gift_cards/card"
|
||||||
|
require "stripe/resources/gift_cards/transaction"
|
||||||
require "stripe/resources/identity/verification_report"
|
require "stripe/resources/identity/verification_report"
|
||||||
require "stripe/resources/identity/verification_session"
|
require "stripe/resources/identity/verification_session"
|
||||||
require "stripe/resources/invoice"
|
require "stripe/resources/invoice"
|
||||||
@ -49,6 +57,7 @@ require "stripe/resources/issuing/transaction"
|
|||||||
require "stripe/resources/line_item"
|
require "stripe/resources/line_item"
|
||||||
require "stripe/resources/login_link"
|
require "stripe/resources/login_link"
|
||||||
require "stripe/resources/mandate"
|
require "stripe/resources/mandate"
|
||||||
|
require "stripe/resources/order"
|
||||||
require "stripe/resources/payment_intent"
|
require "stripe/resources/payment_intent"
|
||||||
require "stripe/resources/payment_link"
|
require "stripe/resources/payment_link"
|
||||||
require "stripe/resources/payment_method"
|
require "stripe/resources/payment_method"
|
||||||
@ -59,6 +68,7 @@ require "stripe/resources/price"
|
|||||||
require "stripe/resources/product"
|
require "stripe/resources/product"
|
||||||
require "stripe/resources/promotion_code"
|
require "stripe/resources/promotion_code"
|
||||||
require "stripe/resources/quote"
|
require "stripe/resources/quote"
|
||||||
|
require "stripe/resources/quote_phase"
|
||||||
require "stripe/resources/radar/early_fraud_warning"
|
require "stripe/resources/radar/early_fraud_warning"
|
||||||
require "stripe/resources/radar/value_list"
|
require "stripe/resources/radar/value_list"
|
||||||
require "stripe/resources/radar/value_list_item"
|
require "stripe/resources/radar/value_list_item"
|
||||||
@ -76,6 +86,10 @@ require "stripe/resources/source_transaction"
|
|||||||
require "stripe/resources/subscription"
|
require "stripe/resources/subscription"
|
||||||
require "stripe/resources/subscription_item"
|
require "stripe/resources/subscription_item"
|
||||||
require "stripe/resources/subscription_schedule"
|
require "stripe/resources/subscription_schedule"
|
||||||
|
require "stripe/resources/tax/calculation"
|
||||||
|
require "stripe/resources/tax/registration"
|
||||||
|
require "stripe/resources/tax/settings"
|
||||||
|
require "stripe/resources/tax/transaction"
|
||||||
require "stripe/resources/tax_code"
|
require "stripe/resources/tax_code"
|
||||||
require "stripe/resources/tax_id"
|
require "stripe/resources/tax_id"
|
||||||
require "stripe/resources/tax_rate"
|
require "stripe/resources/tax_rate"
|
||||||
|
17
lib/stripe/resources/account_session.rb
Normal file
17
lib/stripe/resources/account_session.rb
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
# 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 embedded UIs](https://stripe.com/docs/connect/get-started-connect-embedded-uis).
|
||||||
|
class AccountSession < APIResource
|
||||||
|
extend Stripe::APIOperations::Create
|
||||||
|
|
||||||
|
OBJECT_NAME = "account_session"
|
||||||
|
end
|
||||||
|
end
|
32
lib/stripe/resources/capital/financing_offer.rb
Normal file
32
lib/stripe/resources/capital/financing_offer.rb
Normal 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
|
12
lib/stripe/resources/capital/financing_summary.rb
Normal file
12
lib/stripe/resources/capital/financing_summary.rb
Normal 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
|
13
lib/stripe/resources/capital/financing_transaction.rb
Normal file
13
lib/stripe/resources/capital/financing_transaction.rb
Normal file
@ -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
|
@ -6,9 +6,12 @@ module Stripe
|
|||||||
# A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
|
# A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
|
||||||
class Account < APIResource
|
class Account < APIResource
|
||||||
extend Stripe::APIOperations::List
|
extend Stripe::APIOperations::List
|
||||||
|
extend Stripe::APIOperations::NestedResource
|
||||||
|
|
||||||
OBJECT_NAME = "financial_connections.account"
|
OBJECT_NAME = "financial_connections.account"
|
||||||
|
|
||||||
|
nested_resource_class_methods :inferred_balance, operations: %i[list]
|
||||||
|
|
||||||
def disconnect(params = {}, opts = {})
|
def disconnect(params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
module FinancialConnections
|
||||||
|
# A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data.
|
||||||
|
class InferredBalance < APIResource
|
||||||
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
|
OBJECT_NAME = "financial_connections.account_inferred_balance"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
13
lib/stripe/resources/financial_connections/transaction.rb
Normal file
13
lib/stripe/resources/financial_connections/transaction.rb
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
module FinancialConnections
|
||||||
|
# A Transaction represents a real transaction that affects a Financial Connections Account balance.
|
||||||
|
class Transaction < APIResource
|
||||||
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
|
OBJECT_NAME = "financial_connections.transaction"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
25
lib/stripe/resources/gift_cards/card.rb
Normal file
25
lib/stripe/resources/gift_cards/card.rb
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
module GiftCards
|
||||||
|
# A gift card represents a single gift card owned by a customer, including the
|
||||||
|
# remaining balance, gift card code, and whether or not it is active.
|
||||||
|
class Card < APIResource
|
||||||
|
extend Stripe::APIOperations::Create
|
||||||
|
extend Stripe::APIOperations::List
|
||||||
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
|
OBJECT_NAME = "gift_cards.card"
|
||||||
|
|
||||||
|
def self.validate(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: "/v1/gift_cards/cards/validate",
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
56
lib/stripe/resources/gift_cards/transaction.rb
Normal file
56
lib/stripe/resources/gift_cards/transaction.rb
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
module GiftCards
|
||||||
|
# A gift card transaction represents a single transaction on a referenced gift card.
|
||||||
|
# A transaction is in one of three states, `confirmed`, `held` or `canceled`. A `confirmed`
|
||||||
|
# transaction is one that has added/deducted funds. A `held` transaction has created a
|
||||||
|
# temporary hold on funds, which can then be cancelled or confirmed. A `held` transaction
|
||||||
|
# can be confirmed into a `confirmed` transaction, or canceled into a `canceled` transaction.
|
||||||
|
# A `canceled` transaction has no effect on a gift card's balance.
|
||||||
|
class Transaction < APIResource
|
||||||
|
extend Stripe::APIOperations::Create
|
||||||
|
extend Stripe::APIOperations::List
|
||||||
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
|
OBJECT_NAME = "gift_cards.transaction"
|
||||||
|
|
||||||
|
def cancel(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/gift_cards/transactions/%<id>s/cancel", { id: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def confirm(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/gift_cards/transactions/%<id>s/confirm", { id: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.cancel(id, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/gift_cards/transactions/%<id>s/cancel", { id: CGI.escape(id) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.confirm(id, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/gift_cards/transactions/%<id>s/confirm", { id: CGI.escape(id) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
89
lib/stripe/resources/order.rb
Normal file
89
lib/stripe/resources/order.rb
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
# An Order describes a purchase being made by a customer, including the
|
||||||
|
# products & quantities being purchased, the order status, the payment information,
|
||||||
|
# and the billing/shipping details.
|
||||||
|
#
|
||||||
|
# Related guide: [Orders overview](https://stripe.com/docs/orders)
|
||||||
|
class Order < APIResource
|
||||||
|
extend Stripe::APIOperations::Create
|
||||||
|
extend Stripe::APIOperations::List
|
||||||
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
|
OBJECT_NAME = "order"
|
||||||
|
|
||||||
|
def cancel(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/orders/%<id>s/cancel", { id: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def list_line_items(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/orders/%<id>s/line_items", { id: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def reopen(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/orders/%<id>s/reopen", { id: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def submit(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/orders/%<id>s/submit", { id: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.cancel(id, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/orders/%<id>s/cancel", { id: CGI.escape(id) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.list_line_items(id, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/orders/%<id>s/line_items", { id: CGI.escape(id) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.reopen(id, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/orders/%<id>s/reopen", { id: CGI.escape(id) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.submit(id, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/orders/%<id>s/submit", { id: CGI.escape(id) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -29,6 +29,15 @@ module Stripe
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def draft_quote(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def finalize_quote(params = {}, opts = {})
|
def finalize_quote(params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
@ -56,6 +65,60 @@ module Stripe
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def list_lines(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def mark_stale_quote(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def preview_invoice_lines(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/quotes/%<quote>s/preview_invoice_lines", { quote: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def preview_invoices(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/quotes/%<quote>s/preview_invoices", { quote: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def preview_subscription_schedules(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/quotes/%<quote>s/preview_subscription_schedules", { quote: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def reestimate(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def self.accept(quote, params = {}, opts = {})
|
def self.accept(quote, params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
@ -74,6 +137,15 @@ module Stripe
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.draft_quote(quote, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def self.finalize_quote(quote, params = {}, opts = {})
|
def self.finalize_quote(quote, params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
@ -101,6 +173,60 @@ module Stripe
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.list_lines(quote, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.mark_stale_quote(quote, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.preview_invoice_lines(quote, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/quotes/%<quote>s/preview_invoice_lines", { quote: CGI.escape(quote) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.preview_invoices(quote, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/quotes/%<quote>s/preview_invoices", { quote: CGI.escape(quote) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.preview_subscription_schedules(quote, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/quotes/%<quote>s/preview_subscription_schedules", { quote: CGI.escape(quote) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.reestimate(quote, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def pdf(params = {}, opts = {}, &read_body_chunk_block)
|
def pdf(params = {}, opts = {}, &read_body_chunk_block)
|
||||||
unless block_given?
|
unless block_given?
|
||||||
raise ArgumentError, "A read_body_chunk_block block parameter is required when calling the pdf method."
|
raise ArgumentError, "A read_body_chunk_block block parameter is required when calling the pdf method."
|
||||||
|
29
lib/stripe/resources/quote_phase.rb
Normal file
29
lib/stripe/resources/quote_phase.rb
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
# A quote phase describes the line items, coupons, and trialing status of a subscription for a predefined time period.
|
||||||
|
class QuotePhase < APIResource
|
||||||
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
|
OBJECT_NAME = "quote_phase"
|
||||||
|
|
||||||
|
def list_line_items(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/quote_phases/%<quote_phase>s/line_items", { quote_phase: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.list_line_items(quote_phase, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/quote_phases/%<quote_phase>s/line_items", { quote_phase: CGI.escape(quote_phase) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -12,6 +12,15 @@ module Stripe
|
|||||||
|
|
||||||
OBJECT_NAME = "subscription_schedule"
|
OBJECT_NAME = "subscription_schedule"
|
||||||
|
|
||||||
|
def amend(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def cancel(params = {}, opts = {})
|
def cancel(params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
@ -30,6 +39,15 @@ module Stripe
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.amend(schedule, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def self.cancel(schedule, params = {}, opts = {})
|
def self.cancel(schedule, params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
|
31
lib/stripe/resources/tax/calculation.rb
Normal file
31
lib/stripe/resources/tax/calculation.rb
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
module Tax
|
||||||
|
# A Tax `Calculation` allows you to calculate the tax to collect from your customer.
|
||||||
|
class Calculation < APIResource
|
||||||
|
extend Stripe::APIOperations::Create
|
||||||
|
|
||||||
|
OBJECT_NAME = "tax.calculation"
|
||||||
|
|
||||||
|
def list_line_items(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/tax/calculations/%<calculation>s/line_items", { calculation: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.list_line_items(calculation, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/tax/calculations/%<calculation>s/line_items", { calculation: CGI.escape(calculation) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
17
lib/stripe/resources/tax/registration.rb
Normal file
17
lib/stripe/resources/tax/registration.rb
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
module Tax
|
||||||
|
# A Tax `Registration` lets us know that your business is registered to collect tax on payments within a region, enabling you to [automatically collect tax](https://stripe.com/docs/tax).
|
||||||
|
#
|
||||||
|
# Stripe will not register on your behalf with the relevant authorities when you create a Tax `Registration` object. For more information on how to register to collect tax, see [our guide](https://stripe.com/docs/tax/registering).
|
||||||
|
class Registration < APIResource
|
||||||
|
extend Stripe::APIOperations::Create
|
||||||
|
extend Stripe::APIOperations::List
|
||||||
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
|
OBJECT_NAME = "tax.registration"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
15
lib/stripe/resources/tax/settings.rb
Normal file
15
lib/stripe/resources/tax/settings.rb
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
module Tax
|
||||||
|
# You can use Tax `Settings` to manage configurations used by Stripe Tax calculations.
|
||||||
|
#
|
||||||
|
# Related guide: [Account settings](https://stripe.com/docs/tax/connect/settings).
|
||||||
|
class Settings < SingletonAPIResource
|
||||||
|
include Stripe::APIOperations::Save
|
||||||
|
|
||||||
|
OBJECT_NAME = "tax.settings"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
49
lib/stripe/resources/tax/transaction.rb
Normal file
49
lib/stripe/resources/tax/transaction.rb
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
module Tax
|
||||||
|
# A Tax `Transaction` records the tax collected from or refunded to your customer.
|
||||||
|
class Transaction < APIResource
|
||||||
|
extend Stripe::APIOperations::Create
|
||||||
|
|
||||||
|
OBJECT_NAME = "tax.transaction"
|
||||||
|
|
||||||
|
def list_line_items(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/tax/transactions/%<transaction>s/line_items", { transaction: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.create_reversal(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: "/v1/tax/transactions/create_reversal",
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.list_line_items(transaction, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: format("/v1/tax/transactions/%<transaction>s/line_items", { transaction: CGI.escape(transaction) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.list_transactions(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :get,
|
||||||
|
path: "/v1/tax/transactions",
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -63,6 +63,8 @@ module Stripe
|
|||||||
end
|
end
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
|
@api_version = ApiVersion::CURRENT
|
||||||
|
|
||||||
@ca_bundle_path = Stripe::DEFAULT_CA_BUNDLE_PATH
|
@ca_bundle_path = Stripe::DEFAULT_CA_BUNDLE_PATH
|
||||||
@enable_telemetry = true
|
@enable_telemetry = true
|
||||||
@verify_ssl_certs = true
|
@verify_ssl_certs = true
|
||||||
|
@ -133,7 +133,8 @@ module Stripe
|
|||||||
when Hash
|
when Hash
|
||||||
# Try converting to a known object class. If none available, fall back
|
# Try converting to a known object class. If none available, fall back
|
||||||
# to generic StripeObject
|
# to generic StripeObject
|
||||||
obj = object_classes.fetch(data[:object], StripeObject)
|
object_name = data[:object] || data["object"]
|
||||||
|
obj = object_classes.fetch(object_name, StripeObject)
|
||||||
.construct_from(data, opts)
|
.construct_from(data, opts)
|
||||||
|
|
||||||
# set filters so that we can fetch the same limit, expansions, and
|
# set filters so that we can fetch the same limit, expansions, and
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Stripe
|
module Stripe
|
||||||
VERSION = "8.2.0"
|
VERSION = "8.3.0-beta.1"
|
||||||
end
|
end
|
||||||
|
@ -826,6 +826,10 @@ module Stripe
|
|||||||
Stripe::Invoice.retrieve("in_xxxxxxxxxxxxx")
|
Stripe::Invoice.retrieve("in_xxxxxxxxxxxxx")
|
||||||
assert_requested :get, "#{Stripe.api_base}/v1/invoices/in_xxxxxxxxxxxxx?"
|
assert_requested :get, "#{Stripe.api_base}/v1/invoices/in_xxxxxxxxxxxxx?"
|
||||||
end
|
end
|
||||||
|
should "support requests with args: id, expand" do
|
||||||
|
Stripe::Invoice.retrieve({ expand: ["customer"], id: "in_xxxxxxxxxxxxx" })
|
||||||
|
assert_requested :get, "#{Stripe.api_base}/v1/invoices/in_xxxxxxxxxxxxx?expand[0]=customer"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
context "Invoice.search" do
|
context "Invoice.search" do
|
||||||
should "support requests with args: query" do
|
should "support requests with args: query" do
|
||||||
|
@ -20,7 +20,7 @@ module Stripe
|
|||||||
assert_equal "https://api.stripe.com", config.api_base
|
assert_equal "https://api.stripe.com", config.api_base
|
||||||
assert_equal "https://connect.stripe.com", config.connect_base
|
assert_equal "https://connect.stripe.com", config.connect_base
|
||||||
assert_equal "https://files.stripe.com", config.uploads_base
|
assert_equal "https://files.stripe.com", config.uploads_base
|
||||||
assert_equal nil, config.api_version
|
assert !config.api_version.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
should "allow for overrides when a block is passed" do
|
should "allow for overrides when a block is passed" do
|
||||||
|
@ -122,6 +122,11 @@ module Stripe
|
|||||||
assert obj.is_a?(ListObject)
|
assert obj.is_a?(ListObject)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "#convert_to_stripe_object should marshal hashes with string keys" do
|
||||||
|
obj = Util.convert_to_stripe_object({ "object" => "account" }, {})
|
||||||
|
assert obj.is_a?(Account)
|
||||||
|
end
|
||||||
|
|
||||||
should "#convert_to_stripe_object should marshal other classes" do
|
should "#convert_to_stripe_object should marshal other classes" do
|
||||||
obj = Util.convert_to_stripe_object({ object: "account" }, {})
|
obj = Util.convert_to_stripe_object({ object: "account" }, {})
|
||||||
assert obj.is_a?(Account)
|
assert obj.is_a?(Account)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user