stripe 15.4.0.pre.beta.1 → 15.4.0.pre.beta.2

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.
@@ -986,17 +986,175 @@ module Stripe
986
986
  @capabilities = capabilities
987
987
  end
988
988
  end
989
+
990
+ class Storer < Stripe::RequestParams
991
+ class Capabilities < Stripe::RequestParams
992
+ class FinancialAddresses < Stripe::RequestParams
993
+ class BankAccounts < Stripe::RequestParams
994
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
995
+ attr_accessor :requested
996
+
997
+ def initialize(requested: nil)
998
+ @requested = requested
999
+ end
1000
+ end
1001
+ # Can provision a bank-account-like financial address (VBAN) to credit/debit a FinancialAccount.
1002
+ attr_accessor :bank_accounts
1003
+
1004
+ def initialize(bank_accounts: nil)
1005
+ @bank_accounts = bank_accounts
1006
+ end
1007
+ end
1008
+
1009
+ class HoldsCurrencies < Stripe::RequestParams
1010
+ class Gbp < Stripe::RequestParams
1011
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
1012
+ attr_accessor :requested
1013
+
1014
+ def initialize(requested: nil)
1015
+ @requested = requested
1016
+ end
1017
+ end
1018
+ # Can hold storage-type funds on Stripe in GBP.
1019
+ attr_accessor :gbp
1020
+
1021
+ def initialize(gbp: nil)
1022
+ @gbp = gbp
1023
+ end
1024
+ end
1025
+
1026
+ class InboundTransfers < Stripe::RequestParams
1027
+ class BankAccounts < Stripe::RequestParams
1028
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
1029
+ attr_accessor :requested
1030
+
1031
+ def initialize(requested: nil)
1032
+ @requested = requested
1033
+ end
1034
+ end
1035
+ # Can pull funds from an external bank account owned by yourself to a FinancialAccount.
1036
+ attr_accessor :bank_accounts
1037
+
1038
+ def initialize(bank_accounts: nil)
1039
+ @bank_accounts = bank_accounts
1040
+ end
1041
+ end
1042
+
1043
+ class OutboundPayments < Stripe::RequestParams
1044
+ class BankAccounts < Stripe::RequestParams
1045
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
1046
+ attr_accessor :requested
1047
+
1048
+ def initialize(requested: nil)
1049
+ @requested = requested
1050
+ end
1051
+ end
1052
+
1053
+ class Cards < Stripe::RequestParams
1054
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
1055
+ attr_accessor :requested
1056
+
1057
+ def initialize(requested: nil)
1058
+ @requested = requested
1059
+ end
1060
+ end
1061
+
1062
+ class FinancialAccounts < Stripe::RequestParams
1063
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
1064
+ attr_accessor :requested
1065
+
1066
+ def initialize(requested: nil)
1067
+ @requested = requested
1068
+ end
1069
+ end
1070
+ # Can send funds from a FinancialAccount to a bank account owned by someone else.
1071
+ attr_accessor :bank_accounts
1072
+ # Can send funds from a FinancialAccount to a debit card owned by someone else.
1073
+ attr_accessor :cards
1074
+ # Can send funds from a FinancialAccount to another FinancialAccount owned by someone else.
1075
+ attr_accessor :financial_accounts
1076
+
1077
+ def initialize(bank_accounts: nil, cards: nil, financial_accounts: nil)
1078
+ @bank_accounts = bank_accounts
1079
+ @cards = cards
1080
+ @financial_accounts = financial_accounts
1081
+ end
1082
+ end
1083
+
1084
+ class OutboundTransfers < Stripe::RequestParams
1085
+ class BankAccounts < Stripe::RequestParams
1086
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
1087
+ attr_accessor :requested
1088
+
1089
+ def initialize(requested: nil)
1090
+ @requested = requested
1091
+ end
1092
+ end
1093
+
1094
+ class FinancialAccounts < Stripe::RequestParams
1095
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
1096
+ attr_accessor :requested
1097
+
1098
+ def initialize(requested: nil)
1099
+ @requested = requested
1100
+ end
1101
+ end
1102
+ # Can send funds from a FinancialAccount to a bank account owned by yourself.
1103
+ attr_accessor :bank_accounts
1104
+ # Can send funds from a FinancialAccount to another FinancialAccount owned by yourself.
1105
+ attr_accessor :financial_accounts
1106
+
1107
+ def initialize(bank_accounts: nil, financial_accounts: nil)
1108
+ @bank_accounts = bank_accounts
1109
+ @financial_accounts = financial_accounts
1110
+ end
1111
+ end
1112
+ # Can provision a financial address to credit/debit a FinancialAccount.
1113
+ attr_accessor :financial_addresses
1114
+ # Can hold storage-type funds on Stripe.
1115
+ attr_accessor :holds_currencies
1116
+ # Can pull funds from an external source, owned by yourself, to a FinancialAccount.
1117
+ attr_accessor :inbound_transfers
1118
+ # Can send funds from a FinancialAccount to a destination owned by someone else.
1119
+ attr_accessor :outbound_payments
1120
+ # Can send funds from a FinancialAccount to a destination owned by yourself.
1121
+ attr_accessor :outbound_transfers
1122
+
1123
+ def initialize(
1124
+ financial_addresses: nil,
1125
+ holds_currencies: nil,
1126
+ inbound_transfers: nil,
1127
+ outbound_payments: nil,
1128
+ outbound_transfers: nil
1129
+ )
1130
+ @financial_addresses = financial_addresses
1131
+ @holds_currencies = holds_currencies
1132
+ @inbound_transfers = inbound_transfers
1133
+ @outbound_payments = outbound_payments
1134
+ @outbound_transfers = outbound_transfers
1135
+ end
1136
+ end
1137
+ # Capabilities to request on the Storer Configuration.
1138
+ attr_accessor :capabilities
1139
+
1140
+ def initialize(capabilities: nil)
1141
+ @capabilities = capabilities
1142
+ end
1143
+ end
989
1144
  # The Customer Configuration allows the Account to be used in inbound payment flows.
990
1145
  attr_accessor :customer
991
1146
  # The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you’ve completed onboarding as a Connect platform.
992
1147
  attr_accessor :merchant
993
1148
  # The Recipient Configuration allows the Account to receive funds.
994
1149
  attr_accessor :recipient
1150
+ # The Storer Configuration allows the Account to store and move funds using stored-value FinancialAccounts.
1151
+ attr_accessor :storer
995
1152
 
996
- def initialize(customer: nil, merchant: nil, recipient: nil)
1153
+ def initialize(customer: nil, merchant: nil, recipient: nil, storer: nil)
997
1154
  @customer = customer
998
1155
  @merchant = merchant
999
1156
  @recipient = recipient
1157
+ @storer = storer
1000
1158
  end
1001
1159
  end
1002
1160
 
@@ -3036,17 +3194,175 @@ module Stripe
3036
3194
  @default_outbound_destination = default_outbound_destination
3037
3195
  end
3038
3196
  end
3197
+
3198
+ class Storer < Stripe::RequestParams
3199
+ class Capabilities < Stripe::RequestParams
3200
+ class FinancialAddresses < Stripe::RequestParams
3201
+ class BankAccounts < Stripe::RequestParams
3202
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
3203
+ attr_accessor :requested
3204
+
3205
+ def initialize(requested: nil)
3206
+ @requested = requested
3207
+ end
3208
+ end
3209
+ # Can provision a bank-account-like financial address (VBAN) to credit/debit a FinancialAccount.
3210
+ attr_accessor :bank_accounts
3211
+
3212
+ def initialize(bank_accounts: nil)
3213
+ @bank_accounts = bank_accounts
3214
+ end
3215
+ end
3216
+
3217
+ class HoldsCurrencies < Stripe::RequestParams
3218
+ class Gbp < Stripe::RequestParams
3219
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
3220
+ attr_accessor :requested
3221
+
3222
+ def initialize(requested: nil)
3223
+ @requested = requested
3224
+ end
3225
+ end
3226
+ # Can hold storage-type funds on Stripe in GBP.
3227
+ attr_accessor :gbp
3228
+
3229
+ def initialize(gbp: nil)
3230
+ @gbp = gbp
3231
+ end
3232
+ end
3233
+
3234
+ class InboundTransfers < Stripe::RequestParams
3235
+ class BankAccounts < Stripe::RequestParams
3236
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
3237
+ attr_accessor :requested
3238
+
3239
+ def initialize(requested: nil)
3240
+ @requested = requested
3241
+ end
3242
+ end
3243
+ # Can pull funds from an external bank account owned by yourself to a FinancialAccount.
3244
+ attr_accessor :bank_accounts
3245
+
3246
+ def initialize(bank_accounts: nil)
3247
+ @bank_accounts = bank_accounts
3248
+ end
3249
+ end
3250
+
3251
+ class OutboundPayments < Stripe::RequestParams
3252
+ class BankAccounts < Stripe::RequestParams
3253
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
3254
+ attr_accessor :requested
3255
+
3256
+ def initialize(requested: nil)
3257
+ @requested = requested
3258
+ end
3259
+ end
3260
+
3261
+ class Cards < Stripe::RequestParams
3262
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
3263
+ attr_accessor :requested
3264
+
3265
+ def initialize(requested: nil)
3266
+ @requested = requested
3267
+ end
3268
+ end
3269
+
3270
+ class FinancialAccounts < Stripe::RequestParams
3271
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
3272
+ attr_accessor :requested
3273
+
3274
+ def initialize(requested: nil)
3275
+ @requested = requested
3276
+ end
3277
+ end
3278
+ # Can send funds from a FinancialAccount to a bank account owned by someone else.
3279
+ attr_accessor :bank_accounts
3280
+ # Can send funds from a FinancialAccount to a debit card owned by someone else.
3281
+ attr_accessor :cards
3282
+ # Can send funds from a FinancialAccount to another FinancialAccount owned by someone else.
3283
+ attr_accessor :financial_accounts
3284
+
3285
+ def initialize(bank_accounts: nil, cards: nil, financial_accounts: nil)
3286
+ @bank_accounts = bank_accounts
3287
+ @cards = cards
3288
+ @financial_accounts = financial_accounts
3289
+ end
3290
+ end
3291
+
3292
+ class OutboundTransfers < Stripe::RequestParams
3293
+ class BankAccounts < Stripe::RequestParams
3294
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
3295
+ attr_accessor :requested
3296
+
3297
+ def initialize(requested: nil)
3298
+ @requested = requested
3299
+ end
3300
+ end
3301
+
3302
+ class FinancialAccounts < Stripe::RequestParams
3303
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
3304
+ attr_accessor :requested
3305
+
3306
+ def initialize(requested: nil)
3307
+ @requested = requested
3308
+ end
3309
+ end
3310
+ # Can send funds from a FinancialAccount to a bank account owned by yourself.
3311
+ attr_accessor :bank_accounts
3312
+ # Can send funds from a FinancialAccount to another FinancialAccount owned by yourself.
3313
+ attr_accessor :financial_accounts
3314
+
3315
+ def initialize(bank_accounts: nil, financial_accounts: nil)
3316
+ @bank_accounts = bank_accounts
3317
+ @financial_accounts = financial_accounts
3318
+ end
3319
+ end
3320
+ # Can provision a financial address to credit/debit a FinancialAccount.
3321
+ attr_accessor :financial_addresses
3322
+ # Can hold storage-type funds on Stripe.
3323
+ attr_accessor :holds_currencies
3324
+ # Can pull funds from an external source, owned by yourself, to a FinancialAccount.
3325
+ attr_accessor :inbound_transfers
3326
+ # Can send funds from a FinancialAccount to a destination owned by someone else.
3327
+ attr_accessor :outbound_payments
3328
+ # Can send funds from a FinancialAccount to a destination owned by yourself.
3329
+ attr_accessor :outbound_transfers
3330
+
3331
+ def initialize(
3332
+ financial_addresses: nil,
3333
+ holds_currencies: nil,
3334
+ inbound_transfers: nil,
3335
+ outbound_payments: nil,
3336
+ outbound_transfers: nil
3337
+ )
3338
+ @financial_addresses = financial_addresses
3339
+ @holds_currencies = holds_currencies
3340
+ @inbound_transfers = inbound_transfers
3341
+ @outbound_payments = outbound_payments
3342
+ @outbound_transfers = outbound_transfers
3343
+ end
3344
+ end
3345
+ # Capabilities to request on the Storer Configuration.
3346
+ attr_accessor :capabilities
3347
+
3348
+ def initialize(capabilities: nil)
3349
+ @capabilities = capabilities
3350
+ end
3351
+ end
3039
3352
  # The Customer Configuration allows the Account to be charged.
3040
3353
  attr_accessor :customer
3041
3354
  # The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you’ve completed onboarding as a Connect platform.
3042
3355
  attr_accessor :merchant
3043
3356
  # The Recipient Configuration allows the Account to receive funds.
3044
3357
  attr_accessor :recipient
3358
+ # The Storer Configuration allows the Account to store and move funds using stored-value FinancialAccounts.
3359
+ attr_accessor :storer
3045
3360
 
3046
- def initialize(customer: nil, merchant: nil, recipient: nil)
3361
+ def initialize(customer: nil, merchant: nil, recipient: nil, storer: nil)
3047
3362
  @customer = customer
3048
3363
  @merchant = merchant
3049
3364
  @recipient = recipient
3365
+ @storer = storer
3050
3366
  end
3051
3367
  end
3052
3368
 
@@ -8,14 +8,87 @@ module Stripe
8
8
  class ListParams < Stripe::RequestParams
9
9
  # The page limit.
10
10
  attr_accessor :limit
11
+ # The status of the FinancialAccount to filter by. By default, closed FinancialAccounts are not returned.
12
+ attr_accessor :status
11
13
 
12
- def initialize(limit: nil)
14
+ def initialize(limit: nil, status: nil)
13
15
  @limit = limit
16
+ @status = status
17
+ end
18
+ end
19
+
20
+ class CreateParams < Stripe::RequestParams
21
+ class Storage < Stripe::RequestParams
22
+ # The currencies that this FinancialAccount can hold.
23
+ attr_accessor :holds_currencies
24
+
25
+ def initialize(holds_currencies: nil)
26
+ @holds_currencies = holds_currencies
27
+ end
28
+ end
29
+ # Metadata associated with the FinancialAccount.
30
+ attr_accessor :metadata
31
+ # Parameters specific to creating `storage` type FinancialAccounts.
32
+ attr_accessor :storage
33
+ # The type of FinancialAccount to create.
34
+ attr_accessor :type
35
+
36
+ def initialize(metadata: nil, storage: nil, type: nil)
37
+ @metadata = metadata
38
+ @storage = storage
39
+ @type = type
14
40
  end
15
41
  end
16
42
 
17
43
  class RetrieveParams < Stripe::RequestParams; end
18
44
 
45
+ class CloseParams < Stripe::RequestParams
46
+ class ForwardingSettings < Stripe::RequestParams
47
+ # The address to send forwarded payments to.
48
+ attr_accessor :payment_method
49
+ # The address to send forwarded payouts to.
50
+ attr_accessor :payout_method
51
+
52
+ def initialize(payment_method: nil, payout_method: nil)
53
+ @payment_method = payment_method
54
+ @payout_method = payout_method
55
+ end
56
+ end
57
+ # The addresses to forward any incoming transactions to.
58
+ attr_accessor :forwarding_settings
59
+
60
+ def initialize(forwarding_settings: nil)
61
+ @forwarding_settings = forwarding_settings
62
+ end
63
+ end
64
+
65
+ # Closes a FinancialAccount with or without forwarding settings.
66
+ #
67
+ # ** raises NonZeroBalanceError
68
+ def close(id, params = {}, opts = {})
69
+ request(
70
+ method: :post,
71
+ path: format("/v2/money_management/financial_accounts/%<id>s/close", { id: CGI.escape(id) }),
72
+ params: params,
73
+ opts: opts,
74
+ base_address: :api
75
+ )
76
+ end
77
+
78
+ # Creates a new FinancialAccount.
79
+ #
80
+ # ** raises AlreadyExistsError
81
+ # ** raises FeatureNotEnabledError
82
+ def create(params = {}, opts = {})
83
+ request(
84
+ method: :post,
85
+ path: "/v2/money_management/financial_accounts",
86
+ params: params,
87
+ opts: opts,
88
+ base_address: :api
89
+ )
90
+ end
91
+
19
92
  # Lists FinancialAccounts in this compartment.
20
93
  def list(params = {}, opts = {})
21
94
  request(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "15.4.0-beta.1"
4
+ VERSION = "15.4.0-beta.2"
5
5
  end