orb-billing 1.60.0 → 1.61.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.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +4 -0
  5. data/lib/orb/models/account/billing_entity.rb +214 -0
  6. data/lib/orb/models/account/billing_entity_archive_by_external_id_params.rb +22 -0
  7. data/lib/orb/models/account/billing_entity_archive_params.rb +22 -0
  8. data/lib/orb/models/account/billing_entity_create_params.rb +117 -0
  9. data/lib/orb/models/account/billing_entity_fetch_by_external_id_params.rb +22 -0
  10. data/lib/orb/models/account/billing_entity_fetch_params.rb +22 -0
  11. data/lib/orb/models/account/billing_entity_list_params.rb +55 -0
  12. data/lib/orb/models/account/billing_entity_unarchive_by_external_id_params.rb +22 -0
  13. data/lib/orb/models/account/billing_entity_unarchive_params.rb +22 -0
  14. data/lib/orb/models/account/billing_entity_update_by_external_id_params.rb +177 -0
  15. data/lib/orb/models/account/billing_entity_update_params.rb +179 -0
  16. data/lib/orb/models/account/payment_gateway_connection.rb +75 -0
  17. data/lib/orb/models/account/payment_gateway_connection_fetch_params.rb +22 -0
  18. data/lib/orb/models/account/payment_gateway_connection_list_params.rb +65 -0
  19. data/lib/orb/models/customers/customer_payment_gateway_connection.rb +89 -0
  20. data/lib/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rb +53 -0
  21. data/lib/orb/models/customers/payment_gateway_connection_create_params.rb +52 -0
  22. data/lib/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rb +28 -0
  23. data/lib/orb/models/customers/payment_gateway_connection_delete_params.rb +28 -0
  24. data/lib/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rb +39 -0
  25. data/lib/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rb +25 -0
  26. data/lib/orb/models/customers/payment_gateway_connection_list_params.rb +39 -0
  27. data/lib/orb/models/customers/payment_gateway_connection_list_response.rb +25 -0
  28. data/lib/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rb +68 -0
  29. data/lib/orb/models/customers/payment_gateway_connection_update_params.rb +67 -0
  30. data/lib/orb/models.rb +2 -0
  31. data/lib/orb/resources/account/billing_entities.rb +321 -0
  32. data/lib/orb/resources/account/payment_gateway_connections.rb +71 -0
  33. data/lib/orb/resources/account.rb +26 -0
  34. data/lib/orb/resources/customers/payment_gateway_connections.rb +310 -0
  35. data/lib/orb/resources/customers.rb +22 -0
  36. data/lib/orb/version.rb +1 -1
  37. data/lib/orb.rb +29 -0
  38. data/rbi/orb/client.rbi +3 -0
  39. data/rbi/orb/models/account/billing_entity.rbi +342 -0
  40. data/rbi/orb/models/account/billing_entity_archive_by_external_id_params.rbi +43 -0
  41. data/rbi/orb/models/account/billing_entity_archive_params.rbi +40 -0
  42. data/rbi/orb/models/account/billing_entity_create_params.rbi +208 -0
  43. data/rbi/orb/models/account/billing_entity_fetch_by_external_id_params.rbi +43 -0
  44. data/rbi/orb/models/account/billing_entity_fetch_params.rbi +40 -0
  45. data/rbi/orb/models/account/billing_entity_list_params.rbi +108 -0
  46. data/rbi/orb/models/account/billing_entity_unarchive_by_external_id_params.rbi +43 -0
  47. data/rbi/orb/models/account/billing_entity_unarchive_params.rbi +40 -0
  48. data/rbi/orb/models/account/billing_entity_update_by_external_id_params.rbi +335 -0
  49. data/rbi/orb/models/account/billing_entity_update_params.rbi +331 -0
  50. data/rbi/orb/models/account/payment_gateway_connection.rbi +125 -0
  51. data/rbi/orb/models/account/payment_gateway_connection_fetch_params.rbi +43 -0
  52. data/rbi/orb/models/account/payment_gateway_connection_list_params.rbi +124 -0
  53. data/rbi/orb/models/customers/customer_payment_gateway_connection.rbi +139 -0
  54. data/rbi/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rbi +77 -0
  55. data/rbi/orb/models/customers/payment_gateway_connection_create_params.rbi +77 -0
  56. data/rbi/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rbi +52 -0
  57. data/rbi/orb/models/customers/payment_gateway_connection_delete_params.rbi +52 -0
  58. data/rbi/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rbi +62 -0
  59. data/rbi/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rbi +47 -0
  60. data/rbi/orb/models/customers/payment_gateway_connection_list_params.rbi +62 -0
  61. data/rbi/orb/models/customers/payment_gateway_connection_list_response.rbi +47 -0
  62. data/rbi/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rbi +120 -0
  63. data/rbi/orb/models/customers/payment_gateway_connection_update_params.rbi +120 -0
  64. data/rbi/orb/models.rbi +2 -0
  65. data/rbi/orb/resources/account/billing_entities.rbi +289 -0
  66. data/rbi/orb/resources/account/payment_gateway_connections.rbi +54 -0
  67. data/rbi/orb/resources/account.rbi +22 -0
  68. data/rbi/orb/resources/customers/payment_gateway_connections.rbi +234 -0
  69. data/rbi/orb/resources/customers.rbi +21 -0
  70. data/sig/orb/client.rbs +2 -0
  71. data/sig/orb/models/account/billing_entity.rbs +155 -0
  72. data/sig/orb/models/account/billing_entity_archive_by_external_id_params.rbs +26 -0
  73. data/sig/orb/models/account/billing_entity_archive_params.rbs +25 -0
  74. data/sig/orb/models/account/billing_entity_create_params.rbs +86 -0
  75. data/sig/orb/models/account/billing_entity_fetch_by_external_id_params.rbs +26 -0
  76. data/sig/orb/models/account/billing_entity_fetch_params.rbs +25 -0
  77. data/sig/orb/models/account/billing_entity_list_params.rbs +51 -0
  78. data/sig/orb/models/account/billing_entity_unarchive_by_external_id_params.rbs +26 -0
  79. data/sig/orb/models/account/billing_entity_unarchive_params.rbs +25 -0
  80. data/sig/orb/models/account/billing_entity_update_by_external_id_params.rbs +125 -0
  81. data/sig/orb/models/account/billing_entity_update_params.rbs +125 -0
  82. data/sig/orb/models/account/payment_gateway_connection.rbs +58 -0
  83. data/sig/orb/models/account/payment_gateway_connection_fetch_params.rbs +26 -0
  84. data/sig/orb/models/account/payment_gateway_connection_list_params.rbs +56 -0
  85. data/sig/orb/models/customers/customer_payment_gateway_connection.rbs +65 -0
  86. data/sig/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rbs +45 -0
  87. data/sig/orb/models/customers/payment_gateway_connection_create_params.rbs +45 -0
  88. data/sig/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rbs +30 -0
  89. data/sig/orb/models/customers/payment_gateway_connection_delete_params.rbs +30 -0
  90. data/sig/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rbs +38 -0
  91. data/sig/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rbs +27 -0
  92. data/sig/orb/models/customers/payment_gateway_connection_list_params.rbs +38 -0
  93. data/sig/orb/models/customers/payment_gateway_connection_list_response.rbs +27 -0
  94. data/sig/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rbs +53 -0
  95. data/sig/orb/models/customers/payment_gateway_connection_update_params.rbs +53 -0
  96. data/sig/orb/models.rbs +2 -0
  97. data/sig/orb/resources/account/billing_entities.rbs +80 -0
  98. data/sig/orb/resources/account/payment_gateway_connections.rbs +22 -0
  99. data/sig/orb/resources/account.rbs +11 -0
  100. data/sig/orb/resources/customers/payment_gateway_connections.rbs +67 -0
  101. data/sig/orb/resources/customers.rbs +2 -0
  102. metadata +88 -1
@@ -0,0 +1,331 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ module Account
6
+ class BillingEntityUpdateParams < Orb::Internal::Type::BaseModel
7
+ extend Orb::Internal::Type::RequestParameters::Converter
8
+ include Orb::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Orb::Account::BillingEntityUpdateParams,
14
+ Orb::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :billing_entity_id
20
+
21
+ # Replaces the whole address. Omit it to keep the current one.
22
+ sig { returns(T.nilable(Orb::AddressInput)) }
23
+ attr_reader :address
24
+
25
+ sig { params(address: T.nilable(Orb::AddressInput::OrHash)).void }
26
+ attr_writer :address
27
+
28
+ # The ID of the connection Orb charges when the customer is not mapped to any of
29
+ # the billing entity's connections. Required when `payment_gateway_connections`
30
+ # has more than one entry.
31
+ sig { returns(T.nilable(String)) }
32
+ attr_accessor :default_payment_gateway_connection_id
33
+
34
+ # The invoice settings to change. Omitted fields keep their value; null clears a
35
+ # field so it inherits the account's setting.
36
+ sig do
37
+ returns(
38
+ T.nilable(Orb::Account::BillingEntityUpdateParams::InvoiceSettings)
39
+ )
40
+ end
41
+ attr_reader :invoice_settings
42
+
43
+ sig do
44
+ params(
45
+ invoice_settings:
46
+ T.nilable(
47
+ Orb::Account::BillingEntityUpdateParams::InvoiceSettings::OrHash
48
+ )
49
+ ).void
50
+ end
51
+ attr_writer :invoice_settings
52
+
53
+ # The legal name printed on invoices.
54
+ sig { returns(T.nilable(String)) }
55
+ attr_accessor :legal_name
56
+
57
+ # An internal name for the billing entity.
58
+ sig { returns(T.nilable(String)) }
59
+ attr_accessor :name
60
+
61
+ # The full set of payment gateway connections the billing entity collects payments
62
+ # through. Omit it to keep the current ones. Naming another billing entity's
63
+ # connection gives this billing entity a connection of its own through the same
64
+ # Stripe account or Adyen merchant account.
65
+ sig do
66
+ returns(
67
+ T.nilable(
68
+ T::Array[
69
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection
70
+ ]
71
+ )
72
+ )
73
+ end
74
+ attr_accessor :payment_gateway_connections
75
+
76
+ # The full list of registrations. Omit it to keep the current ones.
77
+ sig do
78
+ returns(
79
+ T.nilable(
80
+ T::Array[Orb::Account::BillingEntityUpdateParams::TaxRegistration]
81
+ )
82
+ )
83
+ end
84
+ attr_accessor :tax_registrations
85
+
86
+ sig do
87
+ params(
88
+ billing_entity_id: String,
89
+ address: T.nilable(Orb::AddressInput::OrHash),
90
+ default_payment_gateway_connection_id: T.nilable(String),
91
+ invoice_settings:
92
+ T.nilable(
93
+ Orb::Account::BillingEntityUpdateParams::InvoiceSettings::OrHash
94
+ ),
95
+ legal_name: T.nilable(String),
96
+ name: T.nilable(String),
97
+ payment_gateway_connections:
98
+ T.nilable(
99
+ T::Array[
100
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection::OrHash
101
+ ]
102
+ ),
103
+ tax_registrations:
104
+ T.nilable(
105
+ T::Array[
106
+ Orb::Account::BillingEntityUpdateParams::TaxRegistration::OrHash
107
+ ]
108
+ ),
109
+ request_options: Orb::RequestOptions::OrHash
110
+ ).returns(T.attached_class)
111
+ end
112
+ def self.new(
113
+ billing_entity_id:,
114
+ # Replaces the whole address. Omit it to keep the current one.
115
+ address: nil,
116
+ # The ID of the connection Orb charges when the customer is not mapped to any of
117
+ # the billing entity's connections. Required when `payment_gateway_connections`
118
+ # has more than one entry.
119
+ default_payment_gateway_connection_id: nil,
120
+ # The invoice settings to change. Omitted fields keep their value; null clears a
121
+ # field so it inherits the account's setting.
122
+ invoice_settings: nil,
123
+ # The legal name printed on invoices.
124
+ legal_name: nil,
125
+ # An internal name for the billing entity.
126
+ name: nil,
127
+ # The full set of payment gateway connections the billing entity collects payments
128
+ # through. Omit it to keep the current ones. Naming another billing entity's
129
+ # connection gives this billing entity a connection of its own through the same
130
+ # Stripe account or Adyen merchant account.
131
+ payment_gateway_connections: nil,
132
+ # The full list of registrations. Omit it to keep the current ones.
133
+ tax_registrations: nil,
134
+ request_options: {}
135
+ )
136
+ end
137
+
138
+ sig do
139
+ override.returns(
140
+ {
141
+ billing_entity_id: String,
142
+ address: T.nilable(Orb::AddressInput),
143
+ default_payment_gateway_connection_id: T.nilable(String),
144
+ invoice_settings:
145
+ T.nilable(
146
+ Orb::Account::BillingEntityUpdateParams::InvoiceSettings
147
+ ),
148
+ legal_name: T.nilable(String),
149
+ name: T.nilable(String),
150
+ payment_gateway_connections:
151
+ T.nilable(
152
+ T::Array[
153
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection
154
+ ]
155
+ ),
156
+ tax_registrations:
157
+ T.nilable(
158
+ T::Array[
159
+ Orb::Account::BillingEntityUpdateParams::TaxRegistration
160
+ ]
161
+ ),
162
+ request_options: Orb::RequestOptions
163
+ }
164
+ )
165
+ end
166
+ def to_hash
167
+ end
168
+
169
+ class InvoiceSettings < Orb::Internal::Type::BaseModel
170
+ OrHash =
171
+ T.type_alias do
172
+ T.any(
173
+ Orb::Account::BillingEntityUpdateParams::InvoiceSettings,
174
+ Orb::Internal::AnyHash
175
+ )
176
+ end
177
+
178
+ # The memo printed on the entity's invoices.
179
+ sig { returns(T.nilable(String)) }
180
+ attr_accessor :memo
181
+
182
+ # The invoice settings to change. Omitted fields keep their value; null clears a
183
+ # field so it inherits the account's setting.
184
+ sig { params(memo: T.nilable(String)).returns(T.attached_class) }
185
+ def self.new(
186
+ # The memo printed on the entity's invoices.
187
+ memo: nil
188
+ )
189
+ end
190
+
191
+ sig { override.returns({ memo: T.nilable(String) }) }
192
+ def to_hash
193
+ end
194
+ end
195
+
196
+ class PaymentGatewayConnection < Orb::Internal::Type::BaseModel
197
+ OrHash =
198
+ T.type_alias do
199
+ T.any(
200
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection,
201
+ Orb::Internal::AnyHash
202
+ )
203
+ end
204
+
205
+ # The ID of a payment gateway connection of the account.
206
+ sig { returns(String) }
207
+ attr_accessor :payment_gateway_connection_id
208
+
209
+ # The connection's payment provider.
210
+ sig do
211
+ returns(
212
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection::PaymentProviderType::OrSymbol
213
+ )
214
+ end
215
+ attr_accessor :payment_provider_type
216
+
217
+ sig do
218
+ params(
219
+ payment_gateway_connection_id: String,
220
+ payment_provider_type:
221
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection::PaymentProviderType::OrSymbol
222
+ ).returns(T.attached_class)
223
+ end
224
+ def self.new(
225
+ # The ID of a payment gateway connection of the account.
226
+ payment_gateway_connection_id:,
227
+ # The connection's payment provider.
228
+ payment_provider_type:
229
+ )
230
+ end
231
+
232
+ sig do
233
+ override.returns(
234
+ {
235
+ payment_gateway_connection_id: String,
236
+ payment_provider_type:
237
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection::PaymentProviderType::OrSymbol
238
+ }
239
+ )
240
+ end
241
+ def to_hash
242
+ end
243
+
244
+ # The connection's payment provider.
245
+ module PaymentProviderType
246
+ extend Orb::Internal::Type::Enum
247
+
248
+ TaggedSymbol =
249
+ T.type_alias do
250
+ T.all(
251
+ Symbol,
252
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection::PaymentProviderType
253
+ )
254
+ end
255
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
256
+
257
+ STRIPE =
258
+ T.let(
259
+ :stripe,
260
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection::PaymentProviderType::TaggedSymbol
261
+ )
262
+ ADYEN =
263
+ T.let(
264
+ :adyen,
265
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection::PaymentProviderType::TaggedSymbol
266
+ )
267
+
268
+ sig do
269
+ override.returns(
270
+ T::Array[
271
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection::PaymentProviderType::TaggedSymbol
272
+ ]
273
+ )
274
+ end
275
+ def self.values
276
+ end
277
+ end
278
+ end
279
+
280
+ class TaxRegistration < Orb::Internal::Type::BaseModel
281
+ OrHash =
282
+ T.type_alias do
283
+ T.any(
284
+ Orb::Account::BillingEntityUpdateParams::TaxRegistration,
285
+ Orb::Internal::AnyHash
286
+ )
287
+ end
288
+
289
+ # The tax registration type, for example `DE VAT`.
290
+ sig { returns(String) }
291
+ attr_accessor :code
292
+
293
+ # The registration number.
294
+ sig { returns(String) }
295
+ attr_accessor :value
296
+
297
+ # The jurisdiction the registration applies to. If null, it applies to every
298
+ # customer.
299
+ sig { returns(T.nilable(String)) }
300
+ attr_accessor :applies_to
301
+
302
+ sig do
303
+ params(
304
+ code: String,
305
+ value: String,
306
+ applies_to: T.nilable(String)
307
+ ).returns(T.attached_class)
308
+ end
309
+ def self.new(
310
+ # The tax registration type, for example `DE VAT`.
311
+ code:,
312
+ # The registration number.
313
+ value:,
314
+ # The jurisdiction the registration applies to. If null, it applies to every
315
+ # customer.
316
+ applies_to: nil
317
+ )
318
+ end
319
+
320
+ sig do
321
+ override.returns(
322
+ { code: String, value: String, applies_to: T.nilable(String) }
323
+ )
324
+ end
325
+ def to_hash
326
+ end
327
+ end
328
+ end
329
+ end
330
+ end
331
+ end
@@ -0,0 +1,125 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ module Account
6
+ class PaymentGatewayConnection < Orb::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Orb::Account::PaymentGatewayConnection,
11
+ Orb::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # The Orb-assigned unique identifier for the payment gateway connection.
16
+ sig { returns(String) }
17
+ attr_accessor :id
18
+
19
+ # The ID of the billing entity that collects payments through this connection.
20
+ sig { returns(String) }
21
+ attr_accessor :billing_entity_id
22
+
23
+ # The time the connection was created.
24
+ sig { returns(Time) }
25
+ attr_accessor :created_at
26
+
27
+ # The ID of the account in the external payment provider.
28
+ sig { returns(T.nilable(String)) }
29
+ attr_accessor :external_account_id
30
+
31
+ # Whether this is the billing entity's default payment gateway connection.
32
+ sig { returns(T::Boolean) }
33
+ attr_accessor :is_default
34
+
35
+ # The external payment provider of this connection.
36
+ sig do
37
+ returns(
38
+ Orb::Account::PaymentGatewayConnection::ProviderType::TaggedSymbol
39
+ )
40
+ end
41
+ attr_accessor :provider_type
42
+
43
+ # A payment gateway connection is one Stripe account or one Adyen merchant account
44
+ # that a billing entity collects payments through.
45
+ sig do
46
+ params(
47
+ id: String,
48
+ billing_entity_id: String,
49
+ created_at: Time,
50
+ external_account_id: T.nilable(String),
51
+ is_default: T::Boolean,
52
+ provider_type:
53
+ Orb::Account::PaymentGatewayConnection::ProviderType::OrSymbol
54
+ ).returns(T.attached_class)
55
+ end
56
+ def self.new(
57
+ # The Orb-assigned unique identifier for the payment gateway connection.
58
+ id:,
59
+ # The ID of the billing entity that collects payments through this connection.
60
+ billing_entity_id:,
61
+ # The time the connection was created.
62
+ created_at:,
63
+ # The ID of the account in the external payment provider.
64
+ external_account_id:,
65
+ # Whether this is the billing entity's default payment gateway connection.
66
+ is_default:,
67
+ # The external payment provider of this connection.
68
+ provider_type:
69
+ )
70
+ end
71
+
72
+ sig do
73
+ override.returns(
74
+ {
75
+ id: String,
76
+ billing_entity_id: String,
77
+ created_at: Time,
78
+ external_account_id: T.nilable(String),
79
+ is_default: T::Boolean,
80
+ provider_type:
81
+ Orb::Account::PaymentGatewayConnection::ProviderType::TaggedSymbol
82
+ }
83
+ )
84
+ end
85
+ def to_hash
86
+ end
87
+
88
+ # The external payment provider of this connection.
89
+ module ProviderType
90
+ extend Orb::Internal::Type::Enum
91
+
92
+ TaggedSymbol =
93
+ T.type_alias do
94
+ T.all(
95
+ Symbol,
96
+ Orb::Account::PaymentGatewayConnection::ProviderType
97
+ )
98
+ end
99
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
100
+
101
+ STRIPE =
102
+ T.let(
103
+ :stripe,
104
+ Orb::Account::PaymentGatewayConnection::ProviderType::TaggedSymbol
105
+ )
106
+ ADYEN =
107
+ T.let(
108
+ :adyen,
109
+ Orb::Account::PaymentGatewayConnection::ProviderType::TaggedSymbol
110
+ )
111
+
112
+ sig do
113
+ override.returns(
114
+ T::Array[
115
+ Orb::Account::PaymentGatewayConnection::ProviderType::TaggedSymbol
116
+ ]
117
+ )
118
+ end
119
+ def self.values
120
+ end
121
+ end
122
+ end
123
+ end
124
+ end
125
+ end
@@ -0,0 +1,43 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ module Account
6
+ class PaymentGatewayConnectionFetchParams < Orb::Internal::Type::BaseModel
7
+ extend Orb::Internal::Type::RequestParameters::Converter
8
+ include Orb::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Orb::Account::PaymentGatewayConnectionFetchParams,
14
+ Orb::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :payment_gateway_connection_id
20
+
21
+ sig do
22
+ params(
23
+ payment_gateway_connection_id: String,
24
+ request_options: Orb::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(payment_gateway_connection_id:, request_options: {})
28
+ end
29
+
30
+ sig do
31
+ override.returns(
32
+ {
33
+ payment_gateway_connection_id: String,
34
+ request_options: Orb::RequestOptions
35
+ }
36
+ )
37
+ end
38
+ def to_hash
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,124 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ module Account
6
+ class PaymentGatewayConnectionListParams < Orb::Internal::Type::BaseModel
7
+ extend Orb::Internal::Type::RequestParameters::Converter
8
+ include Orb::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Orb::Account::PaymentGatewayConnectionListParams,
14
+ Orb::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Only return connections of this billing entity.
19
+ sig { returns(T.nilable(String)) }
20
+ attr_accessor :billing_entity_id
21
+
22
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
23
+ # from the initial request.
24
+ sig { returns(T.nilable(String)) }
25
+ attr_accessor :cursor
26
+
27
+ # The number of items to fetch. Defaults to 20.
28
+ sig { returns(T.nilable(Integer)) }
29
+ attr_reader :limit
30
+
31
+ sig { params(limit: Integer).void }
32
+ attr_writer :limit
33
+
34
+ # Only return connections of this payment provider.
35
+ sig do
36
+ returns(
37
+ T.nilable(
38
+ Orb::Account::PaymentGatewayConnectionListParams::ProviderType::OrSymbol
39
+ )
40
+ )
41
+ end
42
+ attr_accessor :provider_type
43
+
44
+ sig do
45
+ params(
46
+ billing_entity_id: T.nilable(String),
47
+ cursor: T.nilable(String),
48
+ limit: Integer,
49
+ provider_type:
50
+ T.nilable(
51
+ Orb::Account::PaymentGatewayConnectionListParams::ProviderType::OrSymbol
52
+ ),
53
+ request_options: Orb::RequestOptions::OrHash
54
+ ).returns(T.attached_class)
55
+ end
56
+ def self.new(
57
+ # Only return connections of this billing entity.
58
+ billing_entity_id: nil,
59
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
60
+ # from the initial request.
61
+ cursor: nil,
62
+ # The number of items to fetch. Defaults to 20.
63
+ limit: nil,
64
+ # Only return connections of this payment provider.
65
+ provider_type: nil,
66
+ request_options: {}
67
+ )
68
+ end
69
+
70
+ sig do
71
+ override.returns(
72
+ {
73
+ billing_entity_id: T.nilable(String),
74
+ cursor: T.nilable(String),
75
+ limit: Integer,
76
+ provider_type:
77
+ T.nilable(
78
+ Orb::Account::PaymentGatewayConnectionListParams::ProviderType::OrSymbol
79
+ ),
80
+ request_options: Orb::RequestOptions
81
+ }
82
+ )
83
+ end
84
+ def to_hash
85
+ end
86
+
87
+ # Only return connections of this payment provider.
88
+ module ProviderType
89
+ extend Orb::Internal::Type::Enum
90
+
91
+ TaggedSymbol =
92
+ T.type_alias do
93
+ T.all(
94
+ Symbol,
95
+ Orb::Account::PaymentGatewayConnectionListParams::ProviderType
96
+ )
97
+ end
98
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
99
+
100
+ STRIPE =
101
+ T.let(
102
+ :stripe,
103
+ Orb::Account::PaymentGatewayConnectionListParams::ProviderType::TaggedSymbol
104
+ )
105
+ ADYEN =
106
+ T.let(
107
+ :adyen,
108
+ Orb::Account::PaymentGatewayConnectionListParams::ProviderType::TaggedSymbol
109
+ )
110
+
111
+ sig do
112
+ override.returns(
113
+ T::Array[
114
+ Orb::Account::PaymentGatewayConnectionListParams::ProviderType::TaggedSymbol
115
+ ]
116
+ )
117
+ end
118
+ def self.values
119
+ end
120
+ end
121
+ end
122
+ end
123
+ end
124
+ end