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,234 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Resources
|
|
5
|
+
class Customers
|
|
6
|
+
# A customer is a buyer of your products, and the other party to the billing
|
|
7
|
+
# relationship.
|
|
8
|
+
#
|
|
9
|
+
# In Orb, customers are assigned system generated identifiers automatically, but
|
|
10
|
+
# it's often desirable to have these match existing identifiers in your system. To
|
|
11
|
+
# avoid having to denormalize Orb ID information, you can pass in an
|
|
12
|
+
# `external_customer_id` with your own identifier. See
|
|
13
|
+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
|
|
14
|
+
# information about how these aliases work in Orb.
|
|
15
|
+
#
|
|
16
|
+
# In addition to having an identifier in your system, a customer may exist in a
|
|
17
|
+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
|
|
18
|
+
# `payment_provider` enum field to express this mapping.
|
|
19
|
+
#
|
|
20
|
+
# A customer also has a timezone (from the standard
|
|
21
|
+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
|
|
22
|
+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
|
23
|
+
# information on what this timezone parameter influences within Orb.
|
|
24
|
+
class PaymentGatewayConnections
|
|
25
|
+
# This endpoint maps the customer to a payment gateway connection. Orb charges the
|
|
26
|
+
# customer for a billing entity's invoices through the customer's first mapping
|
|
27
|
+
# for that billing entity; `is_default` moves that to this mapping when the
|
|
28
|
+
# customer already has one.
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
customer_id: String,
|
|
32
|
+
payment_gateway_connection_id: String,
|
|
33
|
+
is_default: T::Boolean,
|
|
34
|
+
provider_customer_id: T.nilable(String),
|
|
35
|
+
request_options: Orb::RequestOptions::OrHash
|
|
36
|
+
).returns(Orb::Customers::CustomerPaymentGatewayConnection)
|
|
37
|
+
end
|
|
38
|
+
def create(
|
|
39
|
+
customer_id,
|
|
40
|
+
# The ID of the payment gateway connection to map the customer to.
|
|
41
|
+
payment_gateway_connection_id:,
|
|
42
|
+
# Whether Orb charges the customer for the billing entity's invoices through this
|
|
43
|
+
# mapping. The customer's first mapping for a billing entity is the default
|
|
44
|
+
# regardless.
|
|
45
|
+
is_default: nil,
|
|
46
|
+
# The ID of the customer in the external payment provider.
|
|
47
|
+
provider_customer_id: nil,
|
|
48
|
+
request_options: {}
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# This endpoint updates the customer's mapping to a payment gateway connection:
|
|
53
|
+
# the customer's ID in that account, and whether Orb charges the customer for the
|
|
54
|
+
# billing entity's invoices through it. Omitted fields keep their value.
|
|
55
|
+
sig do
|
|
56
|
+
params(
|
|
57
|
+
payment_gateway_connection_id: String,
|
|
58
|
+
customer_id: String,
|
|
59
|
+
is_default:
|
|
60
|
+
T.nilable(
|
|
61
|
+
Orb::Customers::PaymentGatewayConnectionUpdateParams::IsDefault::OrBoolean
|
|
62
|
+
),
|
|
63
|
+
provider_customer_id: T.nilable(String),
|
|
64
|
+
request_options: Orb::RequestOptions::OrHash
|
|
65
|
+
).returns(Orb::Customers::CustomerPaymentGatewayConnection)
|
|
66
|
+
end
|
|
67
|
+
def update(
|
|
68
|
+
# Path param
|
|
69
|
+
payment_gateway_connection_id,
|
|
70
|
+
# Path param
|
|
71
|
+
customer_id:,
|
|
72
|
+
# Body param: Only `true` is accepted: it makes this the customer's default
|
|
73
|
+
# mapping for the connection's billing entity. Omit it to keep the current
|
|
74
|
+
# default. To move the default, set it on another mapping.
|
|
75
|
+
is_default: nil,
|
|
76
|
+
# Body param: The ID of the customer in the external payment provider. Omit it to
|
|
77
|
+
# keep the current one; `null` clears it, and Orb creates a Stripe customer at the
|
|
78
|
+
# next payment through this connection.
|
|
79
|
+
provider_customer_id: nil,
|
|
80
|
+
request_options: {}
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# This endpoint returns the customer's mappings to payment gateway connections,
|
|
85
|
+
# for example the customer's Stripe ID in each connected Stripe account. A
|
|
86
|
+
# customer has at most one mapping per connection, so the list is not paginated.
|
|
87
|
+
sig do
|
|
88
|
+
params(
|
|
89
|
+
customer_id: String,
|
|
90
|
+
billing_entity_id: T.nilable(String),
|
|
91
|
+
payment_gateway_connection_id: T.nilable(String),
|
|
92
|
+
request_options: Orb::RequestOptions::OrHash
|
|
93
|
+
).returns(
|
|
94
|
+
Orb::Models::Customers::PaymentGatewayConnectionListResponse
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
def list(
|
|
98
|
+
customer_id,
|
|
99
|
+
# Only return mappings to this billing entity's connections.
|
|
100
|
+
billing_entity_id: nil,
|
|
101
|
+
# Only return the mapping to this connection.
|
|
102
|
+
payment_gateway_connection_id: nil,
|
|
103
|
+
request_options: {}
|
|
104
|
+
)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# This endpoint removes the customer's mapping to a payment gateway connection and
|
|
108
|
+
# returns it. Active subscriptions and unpaid invoices do not block it. If the
|
|
109
|
+
# mapping was the customer's default for the billing entity, the customer's oldest
|
|
110
|
+
# remaining mapping on that entity becomes the default. With no mapping left, the
|
|
111
|
+
# next charge goes through the billing entity's default connection.
|
|
112
|
+
sig do
|
|
113
|
+
params(
|
|
114
|
+
payment_gateway_connection_id: String,
|
|
115
|
+
customer_id: String,
|
|
116
|
+
request_options: Orb::RequestOptions::OrHash
|
|
117
|
+
).returns(Orb::Customers::CustomerPaymentGatewayConnection)
|
|
118
|
+
end
|
|
119
|
+
def delete(
|
|
120
|
+
payment_gateway_connection_id,
|
|
121
|
+
customer_id:,
|
|
122
|
+
request_options: {}
|
|
123
|
+
)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# This endpoint maps the customer to a payment gateway connection. Orb charges the
|
|
127
|
+
# customer for a billing entity's invoices through the customer's first mapping
|
|
128
|
+
# for that billing entity; `is_default` moves that to this mapping when the
|
|
129
|
+
# customer already has one.
|
|
130
|
+
sig do
|
|
131
|
+
params(
|
|
132
|
+
external_customer_id: String,
|
|
133
|
+
payment_gateway_connection_id: String,
|
|
134
|
+
is_default: T::Boolean,
|
|
135
|
+
provider_customer_id: T.nilable(String),
|
|
136
|
+
request_options: Orb::RequestOptions::OrHash
|
|
137
|
+
).returns(Orb::Customers::CustomerPaymentGatewayConnection)
|
|
138
|
+
end
|
|
139
|
+
def create_by_external_id(
|
|
140
|
+
external_customer_id,
|
|
141
|
+
# The ID of the payment gateway connection to map the customer to.
|
|
142
|
+
payment_gateway_connection_id:,
|
|
143
|
+
# Whether Orb charges the customer for the billing entity's invoices through this
|
|
144
|
+
# mapping. The customer's first mapping for a billing entity is the default
|
|
145
|
+
# regardless.
|
|
146
|
+
is_default: nil,
|
|
147
|
+
# The ID of the customer in the external payment provider.
|
|
148
|
+
provider_customer_id: nil,
|
|
149
|
+
request_options: {}
|
|
150
|
+
)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# This endpoint removes the customer's mapping to a payment gateway connection and
|
|
154
|
+
# returns it. Active subscriptions and unpaid invoices do not block it. If the
|
|
155
|
+
# mapping was the customer's default for the billing entity, the customer's oldest
|
|
156
|
+
# remaining mapping on that entity becomes the default. With no mapping left, the
|
|
157
|
+
# next charge goes through the billing entity's default connection.
|
|
158
|
+
sig do
|
|
159
|
+
params(
|
|
160
|
+
payment_gateway_connection_id: String,
|
|
161
|
+
external_customer_id: String,
|
|
162
|
+
request_options: Orb::RequestOptions::OrHash
|
|
163
|
+
).returns(Orb::Customers::CustomerPaymentGatewayConnection)
|
|
164
|
+
end
|
|
165
|
+
def delete_by_external_id(
|
|
166
|
+
payment_gateway_connection_id,
|
|
167
|
+
external_customer_id:,
|
|
168
|
+
request_options: {}
|
|
169
|
+
)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# This endpoint returns the customer's mappings to payment gateway connections,
|
|
173
|
+
# for example the customer's Stripe ID in each connected Stripe account. A
|
|
174
|
+
# customer has at most one mapping per connection, so the list is not paginated.
|
|
175
|
+
sig do
|
|
176
|
+
params(
|
|
177
|
+
external_customer_id: String,
|
|
178
|
+
billing_entity_id: T.nilable(String),
|
|
179
|
+
payment_gateway_connection_id: T.nilable(String),
|
|
180
|
+
request_options: Orb::RequestOptions::OrHash
|
|
181
|
+
).returns(
|
|
182
|
+
Orb::Models::Customers::PaymentGatewayConnectionListByExternalIDResponse
|
|
183
|
+
)
|
|
184
|
+
end
|
|
185
|
+
def list_by_external_id(
|
|
186
|
+
external_customer_id,
|
|
187
|
+
# Only return mappings to this billing entity's connections.
|
|
188
|
+
billing_entity_id: nil,
|
|
189
|
+
# Only return the mapping to this connection.
|
|
190
|
+
payment_gateway_connection_id: nil,
|
|
191
|
+
request_options: {}
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# This endpoint updates the customer's mapping to a payment gateway connection:
|
|
196
|
+
# the customer's ID in that account, and whether Orb charges the customer for the
|
|
197
|
+
# billing entity's invoices through it. Omitted fields keep their value.
|
|
198
|
+
sig do
|
|
199
|
+
params(
|
|
200
|
+
payment_gateway_connection_id: String,
|
|
201
|
+
external_customer_id: String,
|
|
202
|
+
is_default:
|
|
203
|
+
T.nilable(
|
|
204
|
+
Orb::Customers::PaymentGatewayConnectionUpdateByExternalIDParams::IsDefault::OrBoolean
|
|
205
|
+
),
|
|
206
|
+
provider_customer_id: T.nilable(String),
|
|
207
|
+
request_options: Orb::RequestOptions::OrHash
|
|
208
|
+
).returns(Orb::Customers::CustomerPaymentGatewayConnection)
|
|
209
|
+
end
|
|
210
|
+
def update_by_external_id(
|
|
211
|
+
# Path param
|
|
212
|
+
payment_gateway_connection_id,
|
|
213
|
+
# Path param
|
|
214
|
+
external_customer_id:,
|
|
215
|
+
# Body param: Only `true` is accepted: it makes this the customer's default
|
|
216
|
+
# mapping for the connection's billing entity. Omit it to keep the current
|
|
217
|
+
# default. To move the default, set it on another mapping.
|
|
218
|
+
is_default: nil,
|
|
219
|
+
# Body param: The ID of the customer in the external payment provider. Omit it to
|
|
220
|
+
# keep the current one; `null` clears it, and Orb creates a Stripe customer at the
|
|
221
|
+
# next payment through this connection.
|
|
222
|
+
provider_customer_id: nil,
|
|
223
|
+
request_options: {}
|
|
224
|
+
)
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# @api private
|
|
228
|
+
sig { params(client: Orb::Client).returns(T.attached_class) }
|
|
229
|
+
def self.new(client:)
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
end
|
|
@@ -68,6 +68,27 @@ module Orb
|
|
|
68
68
|
sig { returns(Orb::Resources::Customers::BalanceTransactions) }
|
|
69
69
|
attr_reader :balance_transactions
|
|
70
70
|
|
|
71
|
+
# A customer is a buyer of your products, and the other party to the billing
|
|
72
|
+
# relationship.
|
|
73
|
+
#
|
|
74
|
+
# In Orb, customers are assigned system generated identifiers automatically, but
|
|
75
|
+
# it's often desirable to have these match existing identifiers in your system. To
|
|
76
|
+
# avoid having to denormalize Orb ID information, you can pass in an
|
|
77
|
+
# `external_customer_id` with your own identifier. See
|
|
78
|
+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
|
|
79
|
+
# information about how these aliases work in Orb.
|
|
80
|
+
#
|
|
81
|
+
# In addition to having an identifier in your system, a customer may exist in a
|
|
82
|
+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
|
|
83
|
+
# `payment_provider` enum field to express this mapping.
|
|
84
|
+
#
|
|
85
|
+
# A customer also has a timezone (from the standard
|
|
86
|
+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
|
|
87
|
+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
|
88
|
+
# information on what this timezone parameter influences within Orb.
|
|
89
|
+
sig { returns(Orb::Resources::Customers::PaymentGatewayConnections) }
|
|
90
|
+
attr_reader :payment_gateway_connections
|
|
91
|
+
|
|
71
92
|
# This operation is used to create an Orb customer, who is party to the core
|
|
72
93
|
# billing relationship. See [Customer](/core-concepts##customer) for an overview
|
|
73
94
|
# of the customer resource.
|
data/sig/orb/client.rbs
CHANGED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
module Account
|
|
4
|
+
type billing_entity =
|
|
5
|
+
{
|
|
6
|
+
id: String,
|
|
7
|
+
address: Orb::Address?,
|
|
8
|
+
created_at: Time,
|
|
9
|
+
default_payment_gateway_connection_id: String?,
|
|
10
|
+
external_billing_entity_id: String?,
|
|
11
|
+
invoice_settings: Orb::Account::BillingEntity::InvoiceSettings,
|
|
12
|
+
is_default: bool,
|
|
13
|
+
legal_name: String,
|
|
14
|
+
name: String,
|
|
15
|
+
payment_gateway_connections: ::Array[Orb::Account::BillingEntity::PaymentGatewayConnection],
|
|
16
|
+
status: Orb::Models::Account::BillingEntity::status,
|
|
17
|
+
tax_registrations: ::Array[Orb::Account::BillingEntity::TaxRegistration]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
class BillingEntity < Orb::Internal::Type::BaseModel
|
|
21
|
+
attr_accessor id: String
|
|
22
|
+
|
|
23
|
+
attr_accessor address: Orb::Address?
|
|
24
|
+
|
|
25
|
+
attr_accessor created_at: Time
|
|
26
|
+
|
|
27
|
+
attr_accessor default_payment_gateway_connection_id: String?
|
|
28
|
+
|
|
29
|
+
attr_accessor external_billing_entity_id: String?
|
|
30
|
+
|
|
31
|
+
attr_accessor invoice_settings: Orb::Account::BillingEntity::InvoiceSettings
|
|
32
|
+
|
|
33
|
+
attr_accessor is_default: bool
|
|
34
|
+
|
|
35
|
+
attr_accessor legal_name: String
|
|
36
|
+
|
|
37
|
+
attr_accessor name: String
|
|
38
|
+
|
|
39
|
+
attr_accessor payment_gateway_connections: ::Array[Orb::Account::BillingEntity::PaymentGatewayConnection]
|
|
40
|
+
|
|
41
|
+
attr_accessor status: Orb::Models::Account::BillingEntity::status
|
|
42
|
+
|
|
43
|
+
attr_accessor tax_registrations: ::Array[Orb::Account::BillingEntity::TaxRegistration]
|
|
44
|
+
|
|
45
|
+
def initialize: (
|
|
46
|
+
id: String,
|
|
47
|
+
address: Orb::Address?,
|
|
48
|
+
created_at: Time,
|
|
49
|
+
default_payment_gateway_connection_id: String?,
|
|
50
|
+
external_billing_entity_id: String?,
|
|
51
|
+
invoice_settings: Orb::Account::BillingEntity::InvoiceSettings,
|
|
52
|
+
is_default: bool,
|
|
53
|
+
legal_name: String,
|
|
54
|
+
name: String,
|
|
55
|
+
payment_gateway_connections: ::Array[Orb::Account::BillingEntity::PaymentGatewayConnection],
|
|
56
|
+
status: Orb::Models::Account::BillingEntity::status,
|
|
57
|
+
tax_registrations: ::Array[Orb::Account::BillingEntity::TaxRegistration]
|
|
58
|
+
) -> void
|
|
59
|
+
|
|
60
|
+
def to_hash: -> {
|
|
61
|
+
id: String,
|
|
62
|
+
address: Orb::Address?,
|
|
63
|
+
created_at: Time,
|
|
64
|
+
default_payment_gateway_connection_id: String?,
|
|
65
|
+
external_billing_entity_id: String?,
|
|
66
|
+
invoice_settings: Orb::Account::BillingEntity::InvoiceSettings,
|
|
67
|
+
is_default: bool,
|
|
68
|
+
legal_name: String,
|
|
69
|
+
name: String,
|
|
70
|
+
payment_gateway_connections: ::Array[Orb::Account::BillingEntity::PaymentGatewayConnection],
|
|
71
|
+
status: Orb::Models::Account::BillingEntity::status,
|
|
72
|
+
tax_registrations: ::Array[Orb::Account::BillingEntity::TaxRegistration]
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type invoice_settings = { memo: String? }
|
|
76
|
+
|
|
77
|
+
class InvoiceSettings < Orb::Internal::Type::BaseModel
|
|
78
|
+
attr_accessor memo: String?
|
|
79
|
+
|
|
80
|
+
def initialize: (memo: String?) -> void
|
|
81
|
+
|
|
82
|
+
def to_hash: -> { memo: String? }
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
type payment_gateway_connection =
|
|
86
|
+
{
|
|
87
|
+
is_default: bool,
|
|
88
|
+
payment_gateway_connection_id: String,
|
|
89
|
+
payment_provider_type: Orb::Models::Account::BillingEntity::PaymentGatewayConnection::payment_provider_type
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
class PaymentGatewayConnection < Orb::Internal::Type::BaseModel
|
|
93
|
+
attr_accessor is_default: bool
|
|
94
|
+
|
|
95
|
+
attr_accessor payment_gateway_connection_id: String
|
|
96
|
+
|
|
97
|
+
attr_accessor payment_provider_type: Orb::Models::Account::BillingEntity::PaymentGatewayConnection::payment_provider_type
|
|
98
|
+
|
|
99
|
+
def initialize: (
|
|
100
|
+
is_default: bool,
|
|
101
|
+
payment_gateway_connection_id: String,
|
|
102
|
+
payment_provider_type: Orb::Models::Account::BillingEntity::PaymentGatewayConnection::payment_provider_type
|
|
103
|
+
) -> void
|
|
104
|
+
|
|
105
|
+
def to_hash: -> {
|
|
106
|
+
is_default: bool,
|
|
107
|
+
payment_gateway_connection_id: String,
|
|
108
|
+
payment_provider_type: Orb::Models::Account::BillingEntity::PaymentGatewayConnection::payment_provider_type
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
type payment_provider_type = :stripe | :adyen
|
|
112
|
+
|
|
113
|
+
module PaymentProviderType
|
|
114
|
+
extend Orb::Internal::Type::Enum
|
|
115
|
+
|
|
116
|
+
STRIPE: :stripe
|
|
117
|
+
ADYEN: :adyen
|
|
118
|
+
|
|
119
|
+
def self?.values: -> ::Array[Orb::Models::Account::BillingEntity::PaymentGatewayConnection::payment_provider_type]
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
type status = :active | :archived
|
|
124
|
+
|
|
125
|
+
module Status
|
|
126
|
+
extend Orb::Internal::Type::Enum
|
|
127
|
+
|
|
128
|
+
ACTIVE: :active
|
|
129
|
+
ARCHIVED: :archived
|
|
130
|
+
|
|
131
|
+
def self?.values: -> ::Array[Orb::Models::Account::BillingEntity::status]
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
type tax_registration =
|
|
135
|
+
{ applies_to: String?, code: String, value: String }
|
|
136
|
+
|
|
137
|
+
class TaxRegistration < Orb::Internal::Type::BaseModel
|
|
138
|
+
attr_accessor applies_to: String?
|
|
139
|
+
|
|
140
|
+
attr_accessor code: String
|
|
141
|
+
|
|
142
|
+
attr_accessor value: String
|
|
143
|
+
|
|
144
|
+
def initialize: (
|
|
145
|
+
applies_to: String?,
|
|
146
|
+
code: String,
|
|
147
|
+
value: String
|
|
148
|
+
) -> void
|
|
149
|
+
|
|
150
|
+
def to_hash: -> { applies_to: String?, code: String, value: String }
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
module Account
|
|
4
|
+
type billing_entity_archive_by_external_id_params =
|
|
5
|
+
{ external_billing_entity_id: String }
|
|
6
|
+
& Orb::Internal::Type::request_parameters
|
|
7
|
+
|
|
8
|
+
class BillingEntityArchiveByExternalIDParams < Orb::Internal::Type::BaseModel
|
|
9
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Orb::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
attr_accessor external_billing_entity_id: String
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
external_billing_entity_id: String,
|
|
16
|
+
?request_options: Orb::request_opts
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
external_billing_entity_id: String,
|
|
21
|
+
request_options: Orb::RequestOptions
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
module Account
|
|
4
|
+
type billing_entity_archive_params =
|
|
5
|
+
{ billing_entity_id: String } & Orb::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class BillingEntityArchiveParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor billing_entity_id: String
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
billing_entity_id: String,
|
|
15
|
+
?request_options: Orb::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
billing_entity_id: String,
|
|
20
|
+
request_options: Orb::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
module Account
|
|
4
|
+
type billing_entity_create_params =
|
|
5
|
+
{
|
|
6
|
+
address: Orb::AddressInput,
|
|
7
|
+
legal_name: String,
|
|
8
|
+
name: String,
|
|
9
|
+
external_billing_entity_id: String?,
|
|
10
|
+
invoice_settings: Orb::Account::BillingEntityCreateParams::InvoiceSettings?,
|
|
11
|
+
tax_registrations: ::Array[Orb::Account::BillingEntityCreateParams::TaxRegistration]
|
|
12
|
+
}
|
|
13
|
+
& Orb::Internal::Type::request_parameters
|
|
14
|
+
|
|
15
|
+
class BillingEntityCreateParams < Orb::Internal::Type::BaseModel
|
|
16
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
17
|
+
include Orb::Internal::Type::RequestParameters
|
|
18
|
+
|
|
19
|
+
attr_accessor address: Orb::AddressInput
|
|
20
|
+
|
|
21
|
+
attr_accessor legal_name: String
|
|
22
|
+
|
|
23
|
+
attr_accessor name: String
|
|
24
|
+
|
|
25
|
+
attr_accessor external_billing_entity_id: String?
|
|
26
|
+
|
|
27
|
+
attr_accessor invoice_settings: Orb::Account::BillingEntityCreateParams::InvoiceSettings?
|
|
28
|
+
|
|
29
|
+
attr_reader tax_registrations: ::Array[Orb::Account::BillingEntityCreateParams::TaxRegistration]?
|
|
30
|
+
|
|
31
|
+
def tax_registrations=: (
|
|
32
|
+
::Array[Orb::Account::BillingEntityCreateParams::TaxRegistration]
|
|
33
|
+
) -> ::Array[Orb::Account::BillingEntityCreateParams::TaxRegistration]
|
|
34
|
+
|
|
35
|
+
def initialize: (
|
|
36
|
+
address: Orb::AddressInput,
|
|
37
|
+
legal_name: String,
|
|
38
|
+
name: String,
|
|
39
|
+
?external_billing_entity_id: String?,
|
|
40
|
+
?invoice_settings: Orb::Account::BillingEntityCreateParams::InvoiceSettings?,
|
|
41
|
+
?tax_registrations: ::Array[Orb::Account::BillingEntityCreateParams::TaxRegistration],
|
|
42
|
+
?request_options: Orb::request_opts
|
|
43
|
+
) -> void
|
|
44
|
+
|
|
45
|
+
def to_hash: -> {
|
|
46
|
+
address: Orb::AddressInput,
|
|
47
|
+
legal_name: String,
|
|
48
|
+
name: String,
|
|
49
|
+
external_billing_entity_id: String?,
|
|
50
|
+
invoice_settings: Orb::Account::BillingEntityCreateParams::InvoiceSettings?,
|
|
51
|
+
tax_registrations: ::Array[Orb::Account::BillingEntityCreateParams::TaxRegistration],
|
|
52
|
+
request_options: Orb::RequestOptions
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
type invoice_settings = { memo: String? }
|
|
56
|
+
|
|
57
|
+
class InvoiceSettings < Orb::Internal::Type::BaseModel
|
|
58
|
+
attr_accessor memo: String?
|
|
59
|
+
|
|
60
|
+
def initialize: (?memo: String?) -> void
|
|
61
|
+
|
|
62
|
+
def to_hash: -> { memo: String? }
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
type tax_registration =
|
|
66
|
+
{ code: String, value: String, applies_to: String? }
|
|
67
|
+
|
|
68
|
+
class TaxRegistration < Orb::Internal::Type::BaseModel
|
|
69
|
+
attr_accessor code: String
|
|
70
|
+
|
|
71
|
+
attr_accessor value: String
|
|
72
|
+
|
|
73
|
+
attr_accessor applies_to: String?
|
|
74
|
+
|
|
75
|
+
def initialize: (
|
|
76
|
+
code: String,
|
|
77
|
+
value: String,
|
|
78
|
+
?applies_to: String?
|
|
79
|
+
) -> void
|
|
80
|
+
|
|
81
|
+
def to_hash: -> { code: String, value: String, applies_to: String? }
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
module Account
|
|
4
|
+
type billing_entity_fetch_by_external_id_params =
|
|
5
|
+
{ external_billing_entity_id: String }
|
|
6
|
+
& Orb::Internal::Type::request_parameters
|
|
7
|
+
|
|
8
|
+
class BillingEntityFetchByExternalIDParams < Orb::Internal::Type::BaseModel
|
|
9
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Orb::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
attr_accessor external_billing_entity_id: String
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
external_billing_entity_id: String,
|
|
16
|
+
?request_options: Orb::request_opts
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
external_billing_entity_id: String,
|
|
21
|
+
request_options: Orb::RequestOptions
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
module Account
|
|
4
|
+
type billing_entity_fetch_params =
|
|
5
|
+
{ billing_entity_id: String } & Orb::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class BillingEntityFetchParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor billing_entity_id: String
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
billing_entity_id: String,
|
|
15
|
+
?request_options: Orb::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
billing_entity_id: String,
|
|
20
|
+
request_options: Orb::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
module Account
|
|
4
|
+
type billing_entity_list_params =
|
|
5
|
+
{
|
|
6
|
+
cursor: String?,
|
|
7
|
+
limit: Integer,
|
|
8
|
+
status: Orb::Models::Account::BillingEntityListParams::status?
|
|
9
|
+
}
|
|
10
|
+
& Orb::Internal::Type::request_parameters
|
|
11
|
+
|
|
12
|
+
class BillingEntityListParams < Orb::Internal::Type::BaseModel
|
|
13
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
14
|
+
include Orb::Internal::Type::RequestParameters
|
|
15
|
+
|
|
16
|
+
attr_accessor cursor: String?
|
|
17
|
+
|
|
18
|
+
attr_reader limit: Integer?
|
|
19
|
+
|
|
20
|
+
def limit=: (Integer) -> Integer
|
|
21
|
+
|
|
22
|
+
attr_accessor status: Orb::Models::Account::BillingEntityListParams::status?
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
?cursor: String?,
|
|
26
|
+
?limit: Integer,
|
|
27
|
+
?status: Orb::Models::Account::BillingEntityListParams::status?,
|
|
28
|
+
?request_options: Orb::request_opts
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
cursor: String?,
|
|
33
|
+
limit: Integer,
|
|
34
|
+
status: Orb::Models::Account::BillingEntityListParams::status?,
|
|
35
|
+
request_options: Orb::RequestOptions
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type status = :active | :archived
|
|
39
|
+
|
|
40
|
+
module Status
|
|
41
|
+
extend Orb::Internal::Type::Enum
|
|
42
|
+
|
|
43
|
+
ACTIVE: :active
|
|
44
|
+
ARCHIVED: :archived
|
|
45
|
+
|
|
46
|
+
def self?.values: -> ::Array[Orb::Models::Account::BillingEntityListParams::status]
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|