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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 90314818ba28a2731274f402107403a2983fa80eac613e1668eec48b19603f01
|
|
4
|
+
data.tar.gz: 8280aec55ce6836cc96fd02078816f9d054c2428bc3a681bbb71eabd10eea0e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 14627abddf7b29027f5515c244804dca3687b3896ba65853cf734e1955f47521af342854ac5785e1a281eda00df60a5fa82c134af5a92064eb6d425596694489
|
|
7
|
+
data.tar.gz: 6ef3d9683c965c085329dd9e1546f13d602c38f771b673deddebe333eb28501c23cae9cb959524fd8146fd97222760cfc083bff80eb41c9ca8ebbc54d174f6f9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.61.0](https://github.com/orbcorp/orb-ruby/compare/v1.60.0...v1.61.0) (2026-11-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** api update ([3e23d68](https://github.com/orbcorp/orb-ruby/commit/3e23d68fab021adbfc248ffa4d032ea0516abf7c))
|
|
9
|
+
|
|
3
10
|
## [1.60.0](https://github.com/orbcorp/orb-ruby/compare/v1.59.0...v1.60.0) (2026-11-21)
|
|
4
11
|
|
|
5
12
|
|
data/README.md
CHANGED
data/lib/orb/client.rb
CHANGED
|
@@ -40,6 +40,9 @@ module Orb
|
|
|
40
40
|
# @return [Orb::Resources::CreditNotes]
|
|
41
41
|
attr_reader :credit_notes
|
|
42
42
|
|
|
43
|
+
# @return [Orb::Resources::Account]
|
|
44
|
+
attr_reader :account
|
|
45
|
+
|
|
43
46
|
# A customer is a buyer of your products, and the other party to the billing
|
|
44
47
|
# relationship.
|
|
45
48
|
#
|
|
@@ -230,6 +233,7 @@ module Orb
|
|
|
230
233
|
@top_level = Orb::Resources::TopLevel.new(client: self)
|
|
231
234
|
@coupons = Orb::Resources::Coupons.new(client: self)
|
|
232
235
|
@credit_notes = Orb::Resources::CreditNotes.new(client: self)
|
|
236
|
+
@account = Orb::Resources::Account.new(client: self)
|
|
233
237
|
@customers = Orb::Resources::Customers.new(client: self)
|
|
234
238
|
@events = Orb::Resources::Events.new(client: self)
|
|
235
239
|
@invoice_line_items = Orb::Resources::InvoiceLineItems.new(client: self)
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Account
|
|
6
|
+
# @see Orb::Resources::Account::BillingEntities#create
|
|
7
|
+
class BillingEntity < Orb::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute id
|
|
9
|
+
# The Orb-assigned unique identifier for the billing entity.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :id, String
|
|
13
|
+
|
|
14
|
+
# @!attribute address
|
|
15
|
+
# The address printed on invoices.
|
|
16
|
+
#
|
|
17
|
+
# @return [Orb::Models::Address, nil]
|
|
18
|
+
required :address, -> { Orb::Address }, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!attribute created_at
|
|
21
|
+
# The time the billing entity was created.
|
|
22
|
+
#
|
|
23
|
+
# @return [Time]
|
|
24
|
+
required :created_at, Time
|
|
25
|
+
|
|
26
|
+
# @!attribute default_payment_gateway_connection_id
|
|
27
|
+
# The ID of the connection Orb charges when the customer is not mapped to any of
|
|
28
|
+
# the billing entity's connections.
|
|
29
|
+
#
|
|
30
|
+
# @return [String, nil]
|
|
31
|
+
required :default_payment_gateway_connection_id, String, nil?: true
|
|
32
|
+
|
|
33
|
+
# @!attribute external_billing_entity_id
|
|
34
|
+
# An optional user-defined ID for this billing entity, unique within the account.
|
|
35
|
+
# This cannot be changed after creation.
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
required :external_billing_entity_id, String, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute invoice_settings
|
|
41
|
+
# The billing entity's own invoice settings. Each null field inherits the
|
|
42
|
+
# account's setting.
|
|
43
|
+
#
|
|
44
|
+
# @return [Orb::Models::Account::BillingEntity::InvoiceSettings]
|
|
45
|
+
required :invoice_settings, -> { Orb::Account::BillingEntity::InvoiceSettings }
|
|
46
|
+
|
|
47
|
+
# @!attribute is_default
|
|
48
|
+
# Whether this is the account's default billing entity.
|
|
49
|
+
#
|
|
50
|
+
# @return [Boolean]
|
|
51
|
+
required :is_default, Orb::Internal::Type::Boolean
|
|
52
|
+
|
|
53
|
+
# @!attribute legal_name
|
|
54
|
+
# The legal name printed on invoices.
|
|
55
|
+
#
|
|
56
|
+
# @return [String]
|
|
57
|
+
required :legal_name, String
|
|
58
|
+
|
|
59
|
+
# @!attribute name
|
|
60
|
+
# An internal name for the billing entity.
|
|
61
|
+
#
|
|
62
|
+
# @return [String]
|
|
63
|
+
required :name, String
|
|
64
|
+
|
|
65
|
+
# @!attribute payment_gateway_connections
|
|
66
|
+
# The payment gateway connections the billing entity collects payments through.
|
|
67
|
+
#
|
|
68
|
+
# @return [Array<Orb::Models::Account::BillingEntity::PaymentGatewayConnection>]
|
|
69
|
+
required :payment_gateway_connections,
|
|
70
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Account::BillingEntity::PaymentGatewayConnection] }
|
|
71
|
+
|
|
72
|
+
# @!attribute status
|
|
73
|
+
#
|
|
74
|
+
# @return [Symbol, Orb::Models::Account::BillingEntity::Status]
|
|
75
|
+
required :status, enum: -> { Orb::Account::BillingEntity::Status }
|
|
76
|
+
|
|
77
|
+
# @!attribute tax_registrations
|
|
78
|
+
#
|
|
79
|
+
# @return [Array<Orb::Models::Account::BillingEntity::TaxRegistration>]
|
|
80
|
+
required :tax_registrations,
|
|
81
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Account::BillingEntity::TaxRegistration] }
|
|
82
|
+
|
|
83
|
+
# @!method initialize(id:, address:, created_at:, default_payment_gateway_connection_id:, external_billing_entity_id:, invoice_settings:, is_default:, legal_name:, name:, payment_gateway_connections:, status:, tax_registrations:)
|
|
84
|
+
# Some parameter documentations has been truncated, see
|
|
85
|
+
# {Orb::Models::Account::BillingEntity} for more details.
|
|
86
|
+
#
|
|
87
|
+
# A billing entity is a legal entity an account invoices from, with its own legal
|
|
88
|
+
# name, address and tax registrations.
|
|
89
|
+
#
|
|
90
|
+
# @param id [String] The Orb-assigned unique identifier for the billing entity.
|
|
91
|
+
#
|
|
92
|
+
# @param address [Orb::Models::Address, nil] The address printed on invoices.
|
|
93
|
+
#
|
|
94
|
+
# @param created_at [Time] The time the billing entity was created.
|
|
95
|
+
#
|
|
96
|
+
# @param default_payment_gateway_connection_id [String, nil] The ID of the connection Orb charges when the customer is not mapped to any of t
|
|
97
|
+
#
|
|
98
|
+
# @param external_billing_entity_id [String, nil] An optional user-defined ID for this billing entity, unique within the account.
|
|
99
|
+
#
|
|
100
|
+
# @param invoice_settings [Orb::Models::Account::BillingEntity::InvoiceSettings] The billing entity's own invoice settings. Each null field inherits the account'
|
|
101
|
+
#
|
|
102
|
+
# @param is_default [Boolean] Whether this is the account's default billing entity.
|
|
103
|
+
#
|
|
104
|
+
# @param legal_name [String] The legal name printed on invoices.
|
|
105
|
+
#
|
|
106
|
+
# @param name [String] An internal name for the billing entity.
|
|
107
|
+
#
|
|
108
|
+
# @param payment_gateway_connections [Array<Orb::Models::Account::BillingEntity::PaymentGatewayConnection>] The payment gateway connections the billing entity collects payments through.
|
|
109
|
+
#
|
|
110
|
+
# @param status [Symbol, Orb::Models::Account::BillingEntity::Status]
|
|
111
|
+
#
|
|
112
|
+
# @param tax_registrations [Array<Orb::Models::Account::BillingEntity::TaxRegistration>]
|
|
113
|
+
|
|
114
|
+
# @see Orb::Models::Account::BillingEntity#invoice_settings
|
|
115
|
+
class InvoiceSettings < Orb::Internal::Type::BaseModel
|
|
116
|
+
# @!attribute memo
|
|
117
|
+
# The memo printed on the entity's invoices.
|
|
118
|
+
#
|
|
119
|
+
# @return [String, nil]
|
|
120
|
+
required :memo, String, nil?: true
|
|
121
|
+
|
|
122
|
+
# @!method initialize(memo:)
|
|
123
|
+
# The billing entity's own invoice settings. Each null field inherits the
|
|
124
|
+
# account's setting.
|
|
125
|
+
#
|
|
126
|
+
# @param memo [String, nil] The memo printed on the entity's invoices.
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
class PaymentGatewayConnection < Orb::Internal::Type::BaseModel
|
|
130
|
+
# @!attribute is_default
|
|
131
|
+
# Whether this is the billing entity's default payment gateway connection.
|
|
132
|
+
#
|
|
133
|
+
# @return [Boolean]
|
|
134
|
+
required :is_default, Orb::Internal::Type::Boolean
|
|
135
|
+
|
|
136
|
+
# @!attribute payment_gateway_connection_id
|
|
137
|
+
# The ID of the billing entity's payment gateway connection.
|
|
138
|
+
#
|
|
139
|
+
# @return [String]
|
|
140
|
+
required :payment_gateway_connection_id, String
|
|
141
|
+
|
|
142
|
+
# @!attribute payment_provider_type
|
|
143
|
+
# The connection's payment provider.
|
|
144
|
+
#
|
|
145
|
+
# @return [Symbol, Orb::Models::Account::BillingEntity::PaymentGatewayConnection::PaymentProviderType]
|
|
146
|
+
required :payment_provider_type,
|
|
147
|
+
enum: -> { Orb::Account::BillingEntity::PaymentGatewayConnection::PaymentProviderType }
|
|
148
|
+
|
|
149
|
+
# @!method initialize(is_default:, payment_gateway_connection_id:, payment_provider_type:)
|
|
150
|
+
# @param is_default [Boolean] Whether this is the billing entity's default payment gateway connection.
|
|
151
|
+
#
|
|
152
|
+
# @param payment_gateway_connection_id [String] The ID of the billing entity's payment gateway connection.
|
|
153
|
+
#
|
|
154
|
+
# @param payment_provider_type [Symbol, Orb::Models::Account::BillingEntity::PaymentGatewayConnection::PaymentProviderType] The connection's payment provider.
|
|
155
|
+
|
|
156
|
+
# The connection's payment provider.
|
|
157
|
+
#
|
|
158
|
+
# @see Orb::Models::Account::BillingEntity::PaymentGatewayConnection#payment_provider_type
|
|
159
|
+
module PaymentProviderType
|
|
160
|
+
extend Orb::Internal::Type::Enum
|
|
161
|
+
|
|
162
|
+
STRIPE = :stripe
|
|
163
|
+
ADYEN = :adyen
|
|
164
|
+
|
|
165
|
+
# @!method self.values
|
|
166
|
+
# @return [Array<Symbol>]
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# @see Orb::Models::Account::BillingEntity#status
|
|
171
|
+
module Status
|
|
172
|
+
extend Orb::Internal::Type::Enum
|
|
173
|
+
|
|
174
|
+
ACTIVE = :active
|
|
175
|
+
ARCHIVED = :archived
|
|
176
|
+
|
|
177
|
+
# @!method self.values
|
|
178
|
+
# @return [Array<Symbol>]
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
class TaxRegistration < Orb::Internal::Type::BaseModel
|
|
182
|
+
# @!attribute applies_to
|
|
183
|
+
# The jurisdiction the registration applies to. If null, it applies to every
|
|
184
|
+
# customer.
|
|
185
|
+
#
|
|
186
|
+
# @return [String, nil]
|
|
187
|
+
required :applies_to, String, nil?: true
|
|
188
|
+
|
|
189
|
+
# @!attribute code
|
|
190
|
+
# The tax registration type, for example `DE VAT`.
|
|
191
|
+
#
|
|
192
|
+
# @return [String]
|
|
193
|
+
required :code, String
|
|
194
|
+
|
|
195
|
+
# @!attribute value
|
|
196
|
+
# The registration number.
|
|
197
|
+
#
|
|
198
|
+
# @return [String]
|
|
199
|
+
required :value, String
|
|
200
|
+
|
|
201
|
+
# @!method initialize(applies_to:, code:, value:)
|
|
202
|
+
# Some parameter documentations has been truncated, see
|
|
203
|
+
# {Orb::Models::Account::BillingEntity::TaxRegistration} for more details.
|
|
204
|
+
#
|
|
205
|
+
# @param applies_to [String, nil] The jurisdiction the registration applies to. If null, it applies to every custo
|
|
206
|
+
#
|
|
207
|
+
# @param code [String] The tax registration type, for example `DE VAT`.
|
|
208
|
+
#
|
|
209
|
+
# @param value [String] The registration number.
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Account
|
|
6
|
+
# @see Orb::Resources::Account::BillingEntities#archive_by_external_id
|
|
7
|
+
class BillingEntityArchiveByExternalIDParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute external_billing_entity_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :external_billing_entity_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(external_billing_entity_id:, request_options: {})
|
|
17
|
+
# @param external_billing_entity_id [String]
|
|
18
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Account
|
|
6
|
+
# @see Orb::Resources::Account::BillingEntities#archive
|
|
7
|
+
class BillingEntityArchiveParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute billing_entity_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :billing_entity_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(billing_entity_id:, request_options: {})
|
|
17
|
+
# @param billing_entity_id [String]
|
|
18
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Account
|
|
6
|
+
# @see Orb::Resources::Account::BillingEntities#create
|
|
7
|
+
class BillingEntityCreateParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute address
|
|
12
|
+
# The address printed on invoices.
|
|
13
|
+
#
|
|
14
|
+
# @return [Orb::Models::AddressInput]
|
|
15
|
+
required :address, -> { Orb::AddressInput }
|
|
16
|
+
|
|
17
|
+
# @!attribute legal_name
|
|
18
|
+
# The legal name printed on invoices.
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
required :legal_name, String
|
|
22
|
+
|
|
23
|
+
# @!attribute name
|
|
24
|
+
# An internal name for the billing entity.
|
|
25
|
+
#
|
|
26
|
+
# @return [String]
|
|
27
|
+
required :name, String
|
|
28
|
+
|
|
29
|
+
# @!attribute external_billing_entity_id
|
|
30
|
+
# An optional user-defined ID for this billing entity, unique within the account.
|
|
31
|
+
# This cannot be changed after creation.
|
|
32
|
+
#
|
|
33
|
+
# @return [String, nil]
|
|
34
|
+
optional :external_billing_entity_id, String, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!attribute invoice_settings
|
|
37
|
+
# Settings that override the account's for this billing entity.
|
|
38
|
+
#
|
|
39
|
+
# @return [Orb::Models::Account::BillingEntityCreateParams::InvoiceSettings, nil]
|
|
40
|
+
optional :invoice_settings,
|
|
41
|
+
-> {
|
|
42
|
+
Orb::Account::BillingEntityCreateParams::InvoiceSettings
|
|
43
|
+
},
|
|
44
|
+
nil?: true
|
|
45
|
+
|
|
46
|
+
# @!attribute tax_registrations
|
|
47
|
+
#
|
|
48
|
+
# @return [Array<Orb::Models::Account::BillingEntityCreateParams::TaxRegistration>, nil]
|
|
49
|
+
optional :tax_registrations,
|
|
50
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Account::BillingEntityCreateParams::TaxRegistration] }
|
|
51
|
+
|
|
52
|
+
# @!method initialize(address:, legal_name:, name:, external_billing_entity_id: nil, invoice_settings: nil, tax_registrations: nil, request_options: {})
|
|
53
|
+
# Some parameter documentations has been truncated, see
|
|
54
|
+
# {Orb::Models::Account::BillingEntityCreateParams} for more details.
|
|
55
|
+
#
|
|
56
|
+
# @param address [Orb::Models::AddressInput] The address printed on invoices.
|
|
57
|
+
#
|
|
58
|
+
# @param legal_name [String] The legal name printed on invoices.
|
|
59
|
+
#
|
|
60
|
+
# @param name [String] An internal name for the billing entity.
|
|
61
|
+
#
|
|
62
|
+
# @param external_billing_entity_id [String, nil] An optional user-defined ID for this billing entity, unique within the account.
|
|
63
|
+
#
|
|
64
|
+
# @param invoice_settings [Orb::Models::Account::BillingEntityCreateParams::InvoiceSettings, nil] Settings that override the account's for this billing entity.
|
|
65
|
+
#
|
|
66
|
+
# @param tax_registrations [Array<Orb::Models::Account::BillingEntityCreateParams::TaxRegistration>]
|
|
67
|
+
#
|
|
68
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
69
|
+
|
|
70
|
+
class InvoiceSettings < Orb::Internal::Type::BaseModel
|
|
71
|
+
# @!attribute memo
|
|
72
|
+
# The memo printed on the entity's invoices.
|
|
73
|
+
#
|
|
74
|
+
# @return [String, nil]
|
|
75
|
+
optional :memo, String, nil?: true
|
|
76
|
+
|
|
77
|
+
# @!method initialize(memo: nil)
|
|
78
|
+
# Settings that override the account's for this billing entity.
|
|
79
|
+
#
|
|
80
|
+
# @param memo [String, nil] The memo printed on the entity's invoices.
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
class TaxRegistration < Orb::Internal::Type::BaseModel
|
|
84
|
+
# @!attribute code
|
|
85
|
+
# The tax registration type, for example `DE VAT`.
|
|
86
|
+
#
|
|
87
|
+
# @return [String]
|
|
88
|
+
required :code, String
|
|
89
|
+
|
|
90
|
+
# @!attribute value
|
|
91
|
+
# The registration number.
|
|
92
|
+
#
|
|
93
|
+
# @return [String]
|
|
94
|
+
required :value, String
|
|
95
|
+
|
|
96
|
+
# @!attribute applies_to
|
|
97
|
+
# The jurisdiction the registration applies to. If null, it applies to every
|
|
98
|
+
# customer.
|
|
99
|
+
#
|
|
100
|
+
# @return [String, nil]
|
|
101
|
+
optional :applies_to, String, nil?: true
|
|
102
|
+
|
|
103
|
+
# @!method initialize(code:, value:, applies_to: nil)
|
|
104
|
+
# Some parameter documentations has been truncated, see
|
|
105
|
+
# {Orb::Models::Account::BillingEntityCreateParams::TaxRegistration} for more
|
|
106
|
+
# details.
|
|
107
|
+
#
|
|
108
|
+
# @param code [String] The tax registration type, for example `DE VAT`.
|
|
109
|
+
#
|
|
110
|
+
# @param value [String] The registration number.
|
|
111
|
+
#
|
|
112
|
+
# @param applies_to [String, nil] The jurisdiction the registration applies to. If null, it applies to every custo
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Account
|
|
6
|
+
# @see Orb::Resources::Account::BillingEntities#fetch_by_external_id
|
|
7
|
+
class BillingEntityFetchByExternalIDParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute external_billing_entity_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :external_billing_entity_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(external_billing_entity_id:, request_options: {})
|
|
17
|
+
# @param external_billing_entity_id [String]
|
|
18
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Account
|
|
6
|
+
# @see Orb::Resources::Account::BillingEntities#fetch
|
|
7
|
+
class BillingEntityFetchParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute billing_entity_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :billing_entity_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(billing_entity_id:, request_options: {})
|
|
17
|
+
# @param billing_entity_id [String]
|
|
18
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Account
|
|
6
|
+
# @see Orb::Resources::Account::BillingEntities#list
|
|
7
|
+
class BillingEntityListParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute cursor
|
|
12
|
+
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
13
|
+
# from the initial request.
|
|
14
|
+
#
|
|
15
|
+
# @return [String, nil]
|
|
16
|
+
optional :cursor, String, nil?: true
|
|
17
|
+
|
|
18
|
+
# @!attribute limit
|
|
19
|
+
# The number of items to fetch. Defaults to 20.
|
|
20
|
+
#
|
|
21
|
+
# @return [Integer, nil]
|
|
22
|
+
optional :limit, Integer
|
|
23
|
+
|
|
24
|
+
# @!attribute status
|
|
25
|
+
# Only return billing entities with this status. Omit to return both.
|
|
26
|
+
#
|
|
27
|
+
# @return [Symbol, Orb::Models::Account::BillingEntityListParams::Status, nil]
|
|
28
|
+
optional :status, enum: -> { Orb::Account::BillingEntityListParams::Status }, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!method initialize(cursor: nil, limit: nil, status: nil, request_options: {})
|
|
31
|
+
# Some parameter documentations has been truncated, see
|
|
32
|
+
# {Orb::Models::Account::BillingEntityListParams} for more details.
|
|
33
|
+
#
|
|
34
|
+
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
35
|
+
#
|
|
36
|
+
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
|
37
|
+
#
|
|
38
|
+
# @param status [Symbol, Orb::Models::Account::BillingEntityListParams::Status, nil] Only return billing entities with this status. Omit to return both.
|
|
39
|
+
#
|
|
40
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
41
|
+
|
|
42
|
+
# Only return billing entities with this status. Omit to return both.
|
|
43
|
+
module Status
|
|
44
|
+
extend Orb::Internal::Type::Enum
|
|
45
|
+
|
|
46
|
+
ACTIVE = :active
|
|
47
|
+
ARCHIVED = :archived
|
|
48
|
+
|
|
49
|
+
# @!method self.values
|
|
50
|
+
# @return [Array<Symbol>]
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Account
|
|
6
|
+
# @see Orb::Resources::Account::BillingEntities#unarchive_by_external_id
|
|
7
|
+
class BillingEntityUnarchiveByExternalIDParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute external_billing_entity_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :external_billing_entity_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(external_billing_entity_id:, request_options: {})
|
|
17
|
+
# @param external_billing_entity_id [String]
|
|
18
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Account
|
|
6
|
+
# @see Orb::Resources::Account::BillingEntities#unarchive
|
|
7
|
+
class BillingEntityUnarchiveParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute billing_entity_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :billing_entity_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(billing_entity_id:, request_options: {})
|
|
17
|
+
# @param billing_entity_id [String]
|
|
18
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|