stripe 5.54.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/VERSION +1 -1
- data/lib/stripe/api_resource_test_helpers.rb +2 -0
- data/lib/stripe/object_types.rb +15 -1
- data/lib/stripe/resources/customer.rb +24 -0
- data/lib/stripe/resources/financial_connections/account.rb +43 -0
- data/lib/stripe/resources/financial_connections/account_owner.rb +10 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +10 -0
- data/lib/stripe/resources/financial_connections/session.rb +12 -0
- data/lib/stripe/resources/order.rb +26 -6
- data/lib/stripe/resources/treasury/credit_reversal.rb +13 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +13 -0
- data/lib/stripe/resources/treasury/financial_account.rb +35 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +63 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +63 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +63 -0
- data/lib/stripe/resources/treasury/received_credit.rb +30 -0
- data/lib/stripe/resources/treasury/received_debit.rb +30 -0
- data/lib/stripe/resources/treasury/transaction.rb +12 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +16 -0
- data/lib/stripe/resources.rb +14 -1
- data/lib/stripe/version.rb +1 -1
- metadata +16 -3
- data/lib/stripe/resources/order_return.rb +0 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 01a1d2aa23c160486a8b0fa5c08dfad964af0d9340a52c6283b5cf2ce1f25200
|
|
4
|
+
data.tar.gz: ce2b83885e40945f062d5e5ebb4bf37c780726eaeb850570f32a9288b75b11b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc5fbfa15c3feed8c3ecdc56ce4deef4d0afd732ccf28f08504327ed347293817fe5dde146cf8e59561c247abdaa17355d585c62c3d4c010225088e0c1251097
|
|
7
|
+
data.tar.gz: cc407b09a64595638a226f18ac0905b583950af18e6ba99a9e6dc029bd7d49962e110dfaff64085148749072e4dd052fa51e90a18e743334cded2c518df6727b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.1.0 - 2022-05-19
|
|
4
|
+
* [#1057](https://github.com/stripe/stripe-ruby/pull/1057) API Updates
|
|
5
|
+
* Add support for new resources `Treasury.CreditReversal`, `Treasury.DebitReversal`, `Treasury.FinancialAccountFeatures`, `Treasury.FinancialAccount`, `Treasury.FlowDetails`, `Treasury.InboundTransfer`, `Treasury.OutboundPayment`, `Treasury.OutboundTransfer`, `Treasury.ReceivedCredit`, `Treasury.ReceivedDebit`, `Treasury.TransactionEntry`, and `Treasury.Transaction`
|
|
6
|
+
* Add support for `retrieve_payment_method` method on resource `Customer`
|
|
7
|
+
* Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## 6.0.0 - 2022-05-09
|
|
12
|
+
* [#1056](https://github.com/stripe/stripe-ruby/pull/1056) API Updates
|
|
13
|
+
Major version release. The [migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-Guide-for-v6) contains more information.
|
|
14
|
+
|
|
15
|
+
(⚠️ = breaking changes):
|
|
16
|
+
* ⚠️ Replace the legacy `Order` API with the new `Order` API.
|
|
17
|
+
* New methods: `cancel`, `list_line_items`, `reopen`, and `submit`
|
|
18
|
+
* Removed methods: `pay` and `return_order`
|
|
19
|
+
* Removed resources: `OrderItem` and `OrderReturn`
|
|
20
|
+
* ⚠️ Rename `FinancialConnections::Account.refresh` to `FinancialConnections::Account.refresh_account
|
|
21
|
+
|
|
22
|
+
## 5.55.0 - 2022-05-05
|
|
23
|
+
* [#1055](https://github.com/stripe/stripe-ruby/pull/1055) API Updates
|
|
24
|
+
* Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
|
|
25
|
+
|
|
26
|
+
|
|
3
27
|
## 5.54.0 - 2022-05-03
|
|
4
28
|
* [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
|
|
5
29
|
* Add support for new resource `CashBalance`
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6.1.0
|
data/lib/stripe/object_types.rb
CHANGED
|
@@ -44,6 +44,11 @@ module Stripe
|
|
|
44
44
|
File::OBJECT_NAME => File,
|
|
45
45
|
File::OBJECT_NAME_ALT => File,
|
|
46
46
|
FileLink::OBJECT_NAME => FileLink,
|
|
47
|
+
FinancialConnections::Account::OBJECT_NAME => FinancialConnections::Account,
|
|
48
|
+
FinancialConnections::AccountOwner::OBJECT_NAME => FinancialConnections::AccountOwner,
|
|
49
|
+
FinancialConnections::AccountOwnership::OBJECT_NAME =>
|
|
50
|
+
FinancialConnections::AccountOwnership,
|
|
51
|
+
FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session,
|
|
47
52
|
FundingInstructions::OBJECT_NAME => FundingInstructions,
|
|
48
53
|
Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport,
|
|
49
54
|
Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession,
|
|
@@ -60,7 +65,6 @@ module Stripe
|
|
|
60
65
|
LoginLink::OBJECT_NAME => LoginLink,
|
|
61
66
|
Mandate::OBJECT_NAME => Mandate,
|
|
62
67
|
Order::OBJECT_NAME => Order,
|
|
63
|
-
OrderReturn::OBJECT_NAME => OrderReturn,
|
|
64
68
|
PaymentIntent::OBJECT_NAME => PaymentIntent,
|
|
65
69
|
PaymentLink::OBJECT_NAME => PaymentLink,
|
|
66
70
|
PaymentMethod::OBJECT_NAME => PaymentMethod,
|
|
@@ -103,6 +107,16 @@ module Stripe
|
|
|
103
107
|
Token::OBJECT_NAME => Token,
|
|
104
108
|
Topup::OBJECT_NAME => Topup,
|
|
105
109
|
Transfer::OBJECT_NAME => Transfer,
|
|
110
|
+
Treasury::CreditReversal::OBJECT_NAME => Treasury::CreditReversal,
|
|
111
|
+
Treasury::DebitReversal::OBJECT_NAME => Treasury::DebitReversal,
|
|
112
|
+
Treasury::FinancialAccount::OBJECT_NAME => Treasury::FinancialAccount,
|
|
113
|
+
Treasury::InboundTransfer::OBJECT_NAME => Treasury::InboundTransfer,
|
|
114
|
+
Treasury::OutboundPayment::OBJECT_NAME => Treasury::OutboundPayment,
|
|
115
|
+
Treasury::OutboundTransfer::OBJECT_NAME => Treasury::OutboundTransfer,
|
|
116
|
+
Treasury::ReceivedCredit::OBJECT_NAME => Treasury::ReceivedCredit,
|
|
117
|
+
Treasury::ReceivedDebit::OBJECT_NAME => Treasury::ReceivedDebit,
|
|
118
|
+
Treasury::Transaction::OBJECT_NAME => Treasury::Transaction,
|
|
119
|
+
Treasury::TransactionEntry::OBJECT_NAME => Treasury::TransactionEntry,
|
|
106
120
|
UsageRecord::OBJECT_NAME => UsageRecord,
|
|
107
121
|
UsageRecordSummary::OBJECT_NAME => UsageRecordSummary,
|
|
108
122
|
WebhookEndpoint::OBJECT_NAME => WebhookEndpoint,
|
|
@@ -41,6 +41,30 @@ module Stripe
|
|
|
41
41
|
)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
def retrieve_payment_method(payment_method, params = {}, opts = {})
|
|
45
|
+
request_stripe_object(
|
|
46
|
+
method: :get,
|
|
47
|
+
path: format("/v1/customers/%<customer>s/payment_methods/%<payment_method>s", { customer: CGI.escape(self["id"]), payment_method: CGI.escape(payment_method) }),
|
|
48
|
+
params: params,
|
|
49
|
+
opts: opts
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def self.retrieve_payment_method(
|
|
54
|
+
customer,
|
|
55
|
+
payment_method,
|
|
56
|
+
params = {},
|
|
57
|
+
opts = {}
|
|
58
|
+
)
|
|
59
|
+
resp, opts = execute_resource_request(
|
|
60
|
+
:get,
|
|
61
|
+
format("/v1/customers/%<customer>s/payment_methods/%<payment_method>s", { customer: CGI.escape(customer), payment_method: CGI.escape(payment_method) }),
|
|
62
|
+
params,
|
|
63
|
+
opts
|
|
64
|
+
)
|
|
65
|
+
Util.convert_to_stripe_object(resp.data, opts)
|
|
66
|
+
end
|
|
67
|
+
|
|
44
68
|
custom_method :delete_discount, http_verb: :delete, http_path: "discount"
|
|
45
69
|
|
|
46
70
|
save_nested_resource :source
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module FinancialConnections
|
|
6
|
+
class Account < APIResource
|
|
7
|
+
extend Stripe::APIOperations::List
|
|
8
|
+
|
|
9
|
+
OBJECT_NAME = "financial_connections.account"
|
|
10
|
+
|
|
11
|
+
custom_method :disconnect, http_verb: :post
|
|
12
|
+
custom_method :list_owners, http_verb: :get, http_path: "owners"
|
|
13
|
+
custom_method :refresh_account, http_verb: :post, http_path: "refresh"
|
|
14
|
+
|
|
15
|
+
def disconnect(params = {}, opts = {})
|
|
16
|
+
request_stripe_object(
|
|
17
|
+
method: :post,
|
|
18
|
+
path: resource_url + "/disconnect",
|
|
19
|
+
params: params,
|
|
20
|
+
opts: opts
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def list_owners(params = {}, opts = {})
|
|
25
|
+
request_stripe_object(
|
|
26
|
+
method: :get,
|
|
27
|
+
path: resource_url + "/owners",
|
|
28
|
+
params: params,
|
|
29
|
+
opts: opts
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def refresh_account(params = {}, opts = {})
|
|
34
|
+
request_stripe_object(
|
|
35
|
+
method: :post,
|
|
36
|
+
path: resource_url + "/refresh",
|
|
37
|
+
params: params,
|
|
38
|
+
opts: opts
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module FinancialConnections
|
|
6
|
+
class Session < APIResource
|
|
7
|
+
extend Stripe::APIOperations::Create
|
|
8
|
+
|
|
9
|
+
OBJECT_NAME = "financial_connections.session"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -9,22 +9,42 @@ module Stripe
|
|
|
9
9
|
|
|
10
10
|
OBJECT_NAME = "order"
|
|
11
11
|
|
|
12
|
-
custom_method :
|
|
13
|
-
custom_method :
|
|
12
|
+
custom_method :cancel, http_verb: :post
|
|
13
|
+
custom_method :list_line_items, http_verb: :get, http_path: "line_items"
|
|
14
|
+
custom_method :reopen, http_verb: :post
|
|
15
|
+
custom_method :submit, http_verb: :post
|
|
14
16
|
|
|
15
|
-
def
|
|
17
|
+
def cancel(params = {}, opts = {})
|
|
16
18
|
request_stripe_object(
|
|
17
19
|
method: :post,
|
|
18
|
-
path: resource_url + "/
|
|
20
|
+
path: resource_url + "/cancel",
|
|
19
21
|
params: params,
|
|
20
22
|
opts: opts
|
|
21
23
|
)
|
|
22
24
|
end
|
|
23
25
|
|
|
24
|
-
def
|
|
26
|
+
def list_line_items(params = {}, opts = {})
|
|
27
|
+
request_stripe_object(
|
|
28
|
+
method: :get,
|
|
29
|
+
path: resource_url + "/line_items",
|
|
30
|
+
params: params,
|
|
31
|
+
opts: opts
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def reopen(params = {}, opts = {})
|
|
36
|
+
request_stripe_object(
|
|
37
|
+
method: :post,
|
|
38
|
+
path: resource_url + "/reopen",
|
|
39
|
+
params: params,
|
|
40
|
+
opts: opts
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def submit(params = {}, opts = {})
|
|
25
45
|
request_stripe_object(
|
|
26
46
|
method: :post,
|
|
27
|
-
path: resource_url + "/
|
|
47
|
+
path: resource_url + "/submit",
|
|
28
48
|
params: params,
|
|
29
49
|
opts: opts
|
|
30
50
|
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Treasury
|
|
6
|
+
class CreditReversal < APIResource
|
|
7
|
+
extend Stripe::APIOperations::Create
|
|
8
|
+
extend Stripe::APIOperations::List
|
|
9
|
+
|
|
10
|
+
OBJECT_NAME = "treasury.credit_reversal"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Treasury
|
|
6
|
+
class DebitReversal < APIResource
|
|
7
|
+
extend Stripe::APIOperations::Create
|
|
8
|
+
extend Stripe::APIOperations::List
|
|
9
|
+
|
|
10
|
+
OBJECT_NAME = "treasury.debit_reversal"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Treasury
|
|
6
|
+
class FinancialAccount < APIResource
|
|
7
|
+
extend Stripe::APIOperations::Create
|
|
8
|
+
extend Stripe::APIOperations::List
|
|
9
|
+
include Stripe::APIOperations::Save
|
|
10
|
+
|
|
11
|
+
OBJECT_NAME = "treasury.financial_account"
|
|
12
|
+
|
|
13
|
+
custom_method :retrieve_features, http_verb: :get, http_path: "features"
|
|
14
|
+
custom_method :update_features, http_verb: :post, http_path: "features"
|
|
15
|
+
|
|
16
|
+
def retrieve_features(params = {}, opts = {})
|
|
17
|
+
request_stripe_object(
|
|
18
|
+
method: :get,
|
|
19
|
+
path: resource_url + "/features",
|
|
20
|
+
params: params,
|
|
21
|
+
opts: opts
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def update_features(params = {}, opts = {})
|
|
26
|
+
request_stripe_object(
|
|
27
|
+
method: :post,
|
|
28
|
+
path: resource_url + "/features",
|
|
29
|
+
params: params,
|
|
30
|
+
opts: opts
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Treasury
|
|
6
|
+
class InboundTransfer < APIResource
|
|
7
|
+
extend Stripe::APIOperations::Create
|
|
8
|
+
extend Stripe::APIOperations::List
|
|
9
|
+
|
|
10
|
+
OBJECT_NAME = "treasury.inbound_transfer"
|
|
11
|
+
|
|
12
|
+
custom_method :cancel, http_verb: :post
|
|
13
|
+
|
|
14
|
+
def cancel(params = {}, opts = {})
|
|
15
|
+
request_stripe_object(
|
|
16
|
+
method: :post,
|
|
17
|
+
path: resource_url + "/cancel",
|
|
18
|
+
params: params,
|
|
19
|
+
opts: opts
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def test_helpers
|
|
24
|
+
TestHelpers.new(self)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
class TestHelpers < APIResourceTestHelpers
|
|
28
|
+
RESOURCE_CLASS = InboundTransfer
|
|
29
|
+
|
|
30
|
+
custom_method :fail, http_verb: :post
|
|
31
|
+
custom_method :return_inbound_transfer, http_verb: :post, http_path: "return"
|
|
32
|
+
custom_method :succeed, http_verb: :post
|
|
33
|
+
|
|
34
|
+
def fail(params = {}, opts = {})
|
|
35
|
+
@resource.request_stripe_object(
|
|
36
|
+
method: :post,
|
|
37
|
+
path: resource_url + "/fail",
|
|
38
|
+
params: params,
|
|
39
|
+
opts: opts
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def return_inbound_transfer(params = {}, opts = {})
|
|
44
|
+
@resource.request_stripe_object(
|
|
45
|
+
method: :post,
|
|
46
|
+
path: resource_url + "/return",
|
|
47
|
+
params: params,
|
|
48
|
+
opts: opts
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def succeed(params = {}, opts = {})
|
|
53
|
+
@resource.request_stripe_object(
|
|
54
|
+
method: :post,
|
|
55
|
+
path: resource_url + "/succeed",
|
|
56
|
+
params: params,
|
|
57
|
+
opts: opts
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Treasury
|
|
6
|
+
class OutboundPayment < APIResource
|
|
7
|
+
extend Stripe::APIOperations::Create
|
|
8
|
+
extend Stripe::APIOperations::List
|
|
9
|
+
|
|
10
|
+
OBJECT_NAME = "treasury.outbound_payment"
|
|
11
|
+
|
|
12
|
+
custom_method :cancel, http_verb: :post
|
|
13
|
+
|
|
14
|
+
def cancel(params = {}, opts = {})
|
|
15
|
+
request_stripe_object(
|
|
16
|
+
method: :post,
|
|
17
|
+
path: resource_url + "/cancel",
|
|
18
|
+
params: params,
|
|
19
|
+
opts: opts
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def test_helpers
|
|
24
|
+
TestHelpers.new(self)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
class TestHelpers < APIResourceTestHelpers
|
|
28
|
+
RESOURCE_CLASS = OutboundPayment
|
|
29
|
+
|
|
30
|
+
custom_method :fail, http_verb: :post
|
|
31
|
+
custom_method :post, http_verb: :post
|
|
32
|
+
custom_method :return_outbound_payment, http_verb: :post, http_path: "return"
|
|
33
|
+
|
|
34
|
+
def fail(params = {}, opts = {})
|
|
35
|
+
@resource.request_stripe_object(
|
|
36
|
+
method: :post,
|
|
37
|
+
path: resource_url + "/fail",
|
|
38
|
+
params: params,
|
|
39
|
+
opts: opts
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def post(params = {}, opts = {})
|
|
44
|
+
@resource.request_stripe_object(
|
|
45
|
+
method: :post,
|
|
46
|
+
path: resource_url + "/post",
|
|
47
|
+
params: params,
|
|
48
|
+
opts: opts
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def return_outbound_payment(params = {}, opts = {})
|
|
53
|
+
@resource.request_stripe_object(
|
|
54
|
+
method: :post,
|
|
55
|
+
path: resource_url + "/return",
|
|
56
|
+
params: params,
|
|
57
|
+
opts: opts
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Treasury
|
|
6
|
+
class OutboundTransfer < APIResource
|
|
7
|
+
extend Stripe::APIOperations::Create
|
|
8
|
+
extend Stripe::APIOperations::List
|
|
9
|
+
|
|
10
|
+
OBJECT_NAME = "treasury.outbound_transfer"
|
|
11
|
+
|
|
12
|
+
custom_method :cancel, http_verb: :post
|
|
13
|
+
|
|
14
|
+
def cancel(params = {}, opts = {})
|
|
15
|
+
request_stripe_object(
|
|
16
|
+
method: :post,
|
|
17
|
+
path: resource_url + "/cancel",
|
|
18
|
+
params: params,
|
|
19
|
+
opts: opts
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def test_helpers
|
|
24
|
+
TestHelpers.new(self)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
class TestHelpers < APIResourceTestHelpers
|
|
28
|
+
RESOURCE_CLASS = OutboundTransfer
|
|
29
|
+
|
|
30
|
+
custom_method :fail, http_verb: :post
|
|
31
|
+
custom_method :post, http_verb: :post
|
|
32
|
+
custom_method :return_outbound_transfer, http_verb: :post, http_path: "return"
|
|
33
|
+
|
|
34
|
+
def fail(params = {}, opts = {})
|
|
35
|
+
@resource.request_stripe_object(
|
|
36
|
+
method: :post,
|
|
37
|
+
path: resource_url + "/fail",
|
|
38
|
+
params: params,
|
|
39
|
+
opts: opts
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def post(params = {}, opts = {})
|
|
44
|
+
@resource.request_stripe_object(
|
|
45
|
+
method: :post,
|
|
46
|
+
path: resource_url + "/post",
|
|
47
|
+
params: params,
|
|
48
|
+
opts: opts
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def return_outbound_transfer(params = {}, opts = {})
|
|
53
|
+
@resource.request_stripe_object(
|
|
54
|
+
method: :post,
|
|
55
|
+
path: resource_url + "/return",
|
|
56
|
+
params: params,
|
|
57
|
+
opts: opts
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Treasury
|
|
6
|
+
class ReceivedCredit < APIResource
|
|
7
|
+
extend Stripe::APIOperations::List
|
|
8
|
+
|
|
9
|
+
OBJECT_NAME = "treasury.received_credit"
|
|
10
|
+
|
|
11
|
+
def test_helpers
|
|
12
|
+
TestHelpers.new(self)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
class TestHelpers < APIResourceTestHelpers
|
|
16
|
+
RESOURCE_CLASS = ReceivedCredit
|
|
17
|
+
|
|
18
|
+
def self.create(params = {}, opts = {})
|
|
19
|
+
resp, opts = execute_resource_request(
|
|
20
|
+
:post,
|
|
21
|
+
"/v1/test_helpers/treasury/received_credits",
|
|
22
|
+
params,
|
|
23
|
+
opts
|
|
24
|
+
)
|
|
25
|
+
Util.convert_to_stripe_object(resp.data, opts)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Treasury
|
|
6
|
+
class ReceivedDebit < APIResource
|
|
7
|
+
extend Stripe::APIOperations::List
|
|
8
|
+
|
|
9
|
+
OBJECT_NAME = "treasury.received_debit"
|
|
10
|
+
|
|
11
|
+
def test_helpers
|
|
12
|
+
TestHelpers.new(self)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
class TestHelpers < APIResourceTestHelpers
|
|
16
|
+
RESOURCE_CLASS = ReceivedDebit
|
|
17
|
+
|
|
18
|
+
def self.create(params = {}, opts = {})
|
|
19
|
+
resp, opts = execute_resource_request(
|
|
20
|
+
:post,
|
|
21
|
+
"/v1/test_helpers/treasury/received_debits",
|
|
22
|
+
params,
|
|
23
|
+
opts
|
|
24
|
+
)
|
|
25
|
+
Util.convert_to_stripe_object(resp.data, opts)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Treasury
|
|
6
|
+
class TransactionEntry < APIResource
|
|
7
|
+
extend Stripe::APIOperations::List
|
|
8
|
+
|
|
9
|
+
OBJECT_NAME = "treasury.transaction_entry"
|
|
10
|
+
|
|
11
|
+
def self.resource_url
|
|
12
|
+
"/v1/treasury/transaction_entries"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
data/lib/stripe/resources.rb
CHANGED
|
@@ -32,6 +32,10 @@ require "stripe/resources/event"
|
|
|
32
32
|
require "stripe/resources/exchange_rate"
|
|
33
33
|
require "stripe/resources/file"
|
|
34
34
|
require "stripe/resources/file_link"
|
|
35
|
+
require "stripe/resources/financial_connections/account"
|
|
36
|
+
require "stripe/resources/financial_connections/account_owner"
|
|
37
|
+
require "stripe/resources/financial_connections/account_ownership"
|
|
38
|
+
require "stripe/resources/financial_connections/session"
|
|
35
39
|
require "stripe/resources/funding_instructions"
|
|
36
40
|
require "stripe/resources/identity/verification_report"
|
|
37
41
|
require "stripe/resources/identity/verification_session"
|
|
@@ -48,7 +52,6 @@ require "stripe/resources/line_item"
|
|
|
48
52
|
require "stripe/resources/login_link"
|
|
49
53
|
require "stripe/resources/mandate"
|
|
50
54
|
require "stripe/resources/order"
|
|
51
|
-
require "stripe/resources/order_return"
|
|
52
55
|
require "stripe/resources/payment_intent"
|
|
53
56
|
require "stripe/resources/payment_link"
|
|
54
57
|
require "stripe/resources/payment_method"
|
|
@@ -91,6 +94,16 @@ require "stripe/resources/three_d_secure"
|
|
|
91
94
|
require "stripe/resources/token"
|
|
92
95
|
require "stripe/resources/topup"
|
|
93
96
|
require "stripe/resources/transfer"
|
|
97
|
+
require "stripe/resources/treasury/credit_reversal"
|
|
98
|
+
require "stripe/resources/treasury/debit_reversal"
|
|
99
|
+
require "stripe/resources/treasury/financial_account"
|
|
100
|
+
require "stripe/resources/treasury/inbound_transfer"
|
|
101
|
+
require "stripe/resources/treasury/outbound_payment"
|
|
102
|
+
require "stripe/resources/treasury/outbound_transfer"
|
|
103
|
+
require "stripe/resources/treasury/received_credit"
|
|
104
|
+
require "stripe/resources/treasury/received_debit"
|
|
105
|
+
require "stripe/resources/treasury/transaction"
|
|
106
|
+
require "stripe/resources/treasury/transaction_entry"
|
|
94
107
|
require "stripe/resources/usage_record"
|
|
95
108
|
require "stripe/resources/usage_record_summary"
|
|
96
109
|
require "stripe/resources/webhook_endpoint"
|
data/lib/stripe/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stripe
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 6.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stripe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-05-
|
|
11
|
+
date: 2022-05-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Stripe is the easiest way to accept payments online. See https://stripe.com
|
|
14
14
|
for details.
|
|
@@ -80,6 +80,10 @@ files:
|
|
|
80
80
|
- lib/stripe/resources/exchange_rate.rb
|
|
81
81
|
- lib/stripe/resources/file.rb
|
|
82
82
|
- lib/stripe/resources/file_link.rb
|
|
83
|
+
- lib/stripe/resources/financial_connections/account.rb
|
|
84
|
+
- lib/stripe/resources/financial_connections/account_owner.rb
|
|
85
|
+
- lib/stripe/resources/financial_connections/account_ownership.rb
|
|
86
|
+
- lib/stripe/resources/financial_connections/session.rb
|
|
83
87
|
- lib/stripe/resources/funding_instructions.rb
|
|
84
88
|
- lib/stripe/resources/identity/verification_report.rb
|
|
85
89
|
- lib/stripe/resources/identity/verification_session.rb
|
|
@@ -96,7 +100,6 @@ files:
|
|
|
96
100
|
- lib/stripe/resources/login_link.rb
|
|
97
101
|
- lib/stripe/resources/mandate.rb
|
|
98
102
|
- lib/stripe/resources/order.rb
|
|
99
|
-
- lib/stripe/resources/order_return.rb
|
|
100
103
|
- lib/stripe/resources/payment_intent.rb
|
|
101
104
|
- lib/stripe/resources/payment_link.rb
|
|
102
105
|
- lib/stripe/resources/payment_method.rb
|
|
@@ -139,6 +142,16 @@ files:
|
|
|
139
142
|
- lib/stripe/resources/token.rb
|
|
140
143
|
- lib/stripe/resources/topup.rb
|
|
141
144
|
- lib/stripe/resources/transfer.rb
|
|
145
|
+
- lib/stripe/resources/treasury/credit_reversal.rb
|
|
146
|
+
- lib/stripe/resources/treasury/debit_reversal.rb
|
|
147
|
+
- lib/stripe/resources/treasury/financial_account.rb
|
|
148
|
+
- lib/stripe/resources/treasury/inbound_transfer.rb
|
|
149
|
+
- lib/stripe/resources/treasury/outbound_payment.rb
|
|
150
|
+
- lib/stripe/resources/treasury/outbound_transfer.rb
|
|
151
|
+
- lib/stripe/resources/treasury/received_credit.rb
|
|
152
|
+
- lib/stripe/resources/treasury/received_debit.rb
|
|
153
|
+
- lib/stripe/resources/treasury/transaction.rb
|
|
154
|
+
- lib/stripe/resources/treasury/transaction_entry.rb
|
|
142
155
|
- lib/stripe/resources/usage_record.rb
|
|
143
156
|
- lib/stripe/resources/usage_record_summary.rb
|
|
144
157
|
- lib/stripe/resources/webhook_endpoint.rb
|