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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +4 -0
- data/lib/orb/models/account/billing_entity.rb +214 -0
- data/lib/orb/models/account/billing_entity_archive_by_external_id_params.rb +22 -0
- data/lib/orb/models/account/billing_entity_archive_params.rb +22 -0
- data/lib/orb/models/account/billing_entity_create_params.rb +117 -0
- data/lib/orb/models/account/billing_entity_fetch_by_external_id_params.rb +22 -0
- data/lib/orb/models/account/billing_entity_fetch_params.rb +22 -0
- data/lib/orb/models/account/billing_entity_list_params.rb +55 -0
- data/lib/orb/models/account/billing_entity_unarchive_by_external_id_params.rb +22 -0
- data/lib/orb/models/account/billing_entity_unarchive_params.rb +22 -0
- data/lib/orb/models/account/billing_entity_update_by_external_id_params.rb +177 -0
- data/lib/orb/models/account/billing_entity_update_params.rb +179 -0
- data/lib/orb/models/account/payment_gateway_connection.rb +75 -0
- data/lib/orb/models/account/payment_gateway_connection_fetch_params.rb +22 -0
- data/lib/orb/models/account/payment_gateway_connection_list_params.rb +65 -0
- data/lib/orb/models/customers/customer_payment_gateway_connection.rb +89 -0
- data/lib/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rb +53 -0
- data/lib/orb/models/customers/payment_gateway_connection_create_params.rb +52 -0
- data/lib/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rb +28 -0
- data/lib/orb/models/customers/payment_gateway_connection_delete_params.rb +28 -0
- data/lib/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rb +39 -0
- data/lib/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rb +25 -0
- data/lib/orb/models/customers/payment_gateway_connection_list_params.rb +39 -0
- data/lib/orb/models/customers/payment_gateway_connection_list_response.rb +25 -0
- data/lib/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rb +68 -0
- data/lib/orb/models/customers/payment_gateway_connection_update_params.rb +67 -0
- data/lib/orb/models.rb +2 -0
- data/lib/orb/resources/account/billing_entities.rb +321 -0
- data/lib/orb/resources/account/payment_gateway_connections.rb +71 -0
- data/lib/orb/resources/account.rb +26 -0
- data/lib/orb/resources/customers/payment_gateway_connections.rb +310 -0
- data/lib/orb/resources/customers.rb +22 -0
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +29 -0
- data/rbi/orb/client.rbi +3 -0
- data/rbi/orb/models/account/billing_entity.rbi +342 -0
- data/rbi/orb/models/account/billing_entity_archive_by_external_id_params.rbi +43 -0
- data/rbi/orb/models/account/billing_entity_archive_params.rbi +40 -0
- data/rbi/orb/models/account/billing_entity_create_params.rbi +208 -0
- data/rbi/orb/models/account/billing_entity_fetch_by_external_id_params.rbi +43 -0
- data/rbi/orb/models/account/billing_entity_fetch_params.rbi +40 -0
- data/rbi/orb/models/account/billing_entity_list_params.rbi +108 -0
- data/rbi/orb/models/account/billing_entity_unarchive_by_external_id_params.rbi +43 -0
- data/rbi/orb/models/account/billing_entity_unarchive_params.rbi +40 -0
- data/rbi/orb/models/account/billing_entity_update_by_external_id_params.rbi +335 -0
- data/rbi/orb/models/account/billing_entity_update_params.rbi +331 -0
- data/rbi/orb/models/account/payment_gateway_connection.rbi +125 -0
- data/rbi/orb/models/account/payment_gateway_connection_fetch_params.rbi +43 -0
- data/rbi/orb/models/account/payment_gateway_connection_list_params.rbi +124 -0
- data/rbi/orb/models/customers/customer_payment_gateway_connection.rbi +139 -0
- data/rbi/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rbi +77 -0
- data/rbi/orb/models/customers/payment_gateway_connection_create_params.rbi +77 -0
- data/rbi/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rbi +52 -0
- data/rbi/orb/models/customers/payment_gateway_connection_delete_params.rbi +52 -0
- data/rbi/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rbi +62 -0
- data/rbi/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rbi +47 -0
- data/rbi/orb/models/customers/payment_gateway_connection_list_params.rbi +62 -0
- data/rbi/orb/models/customers/payment_gateway_connection_list_response.rbi +47 -0
- data/rbi/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rbi +120 -0
- data/rbi/orb/models/customers/payment_gateway_connection_update_params.rbi +120 -0
- data/rbi/orb/models.rbi +2 -0
- data/rbi/orb/resources/account/billing_entities.rbi +289 -0
- data/rbi/orb/resources/account/payment_gateway_connections.rbi +54 -0
- data/rbi/orb/resources/account.rbi +22 -0
- data/rbi/orb/resources/customers/payment_gateway_connections.rbi +234 -0
- data/rbi/orb/resources/customers.rbi +21 -0
- data/sig/orb/client.rbs +2 -0
- data/sig/orb/models/account/billing_entity.rbs +155 -0
- data/sig/orb/models/account/billing_entity_archive_by_external_id_params.rbs +26 -0
- data/sig/orb/models/account/billing_entity_archive_params.rbs +25 -0
- data/sig/orb/models/account/billing_entity_create_params.rbs +86 -0
- data/sig/orb/models/account/billing_entity_fetch_by_external_id_params.rbs +26 -0
- data/sig/orb/models/account/billing_entity_fetch_params.rbs +25 -0
- data/sig/orb/models/account/billing_entity_list_params.rbs +51 -0
- data/sig/orb/models/account/billing_entity_unarchive_by_external_id_params.rbs +26 -0
- data/sig/orb/models/account/billing_entity_unarchive_params.rbs +25 -0
- data/sig/orb/models/account/billing_entity_update_by_external_id_params.rbs +125 -0
- data/sig/orb/models/account/billing_entity_update_params.rbs +125 -0
- data/sig/orb/models/account/payment_gateway_connection.rbs +58 -0
- data/sig/orb/models/account/payment_gateway_connection_fetch_params.rbs +26 -0
- data/sig/orb/models/account/payment_gateway_connection_list_params.rbs +56 -0
- data/sig/orb/models/customers/customer_payment_gateway_connection.rbs +65 -0
- data/sig/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rbs +45 -0
- data/sig/orb/models/customers/payment_gateway_connection_create_params.rbs +45 -0
- data/sig/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rbs +30 -0
- data/sig/orb/models/customers/payment_gateway_connection_delete_params.rbs +30 -0
- data/sig/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rbs +38 -0
- data/sig/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rbs +27 -0
- data/sig/orb/models/customers/payment_gateway_connection_list_params.rbs +38 -0
- data/sig/orb/models/customers/payment_gateway_connection_list_response.rbs +27 -0
- data/sig/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rbs +53 -0
- data/sig/orb/models/customers/payment_gateway_connection_update_params.rbs +53 -0
- data/sig/orb/models.rbs +2 -0
- data/sig/orb/resources/account/billing_entities.rbs +80 -0
- data/sig/orb/resources/account/payment_gateway_connections.rbs +22 -0
- data/sig/orb/resources/account.rbs +11 -0
- data/sig/orb/resources/customers/payment_gateway_connections.rbs +67 -0
- data/sig/orb/resources/customers.rbs +2 -0
- 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
|