orb-billing 1.17.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/alert_delete_params.rb +20 -0
  5. data/lib/orb/models/customer_create_portal_session_by_external_id_params.rb +44 -0
  6. data/lib/orb/models/customer_create_portal_session_by_external_id_response.rb +40 -0
  7. data/lib/orb/models/customer_create_portal_session_params.rb +44 -0
  8. data/lib/orb/models/customer_create_portal_session_response.rb +40 -0
  9. data/lib/orb/models/event_ingest_params.rb +1 -12
  10. data/lib/orb/models/event_ingest_response.rb +1 -28
  11. data/lib/orb/models/invoice_regenerate_invoice_pdf_params.rb +20 -0
  12. data/lib/orb/models/invoice_regenerate_receipt_pdf_params.rb +20 -0
  13. data/lib/orb/models.rb +11 -0
  14. data/lib/orb/resources/alerts.rb +26 -0
  15. data/lib/orb/resources/customers.rb +66 -0
  16. data/lib/orb/resources/events.rb +2 -4
  17. data/lib/orb/resources/invoices.rb +82 -0
  18. data/lib/orb/version.rb +1 -1
  19. data/lib/orb.rb +7 -0
  20. data/rbi/orb/models/alert_delete_params.rbi +36 -0
  21. data/rbi/orb/models/customer_create_portal_session_by_external_id_params.rbi +74 -0
  22. data/rbi/orb/models/customer_create_portal_session_by_external_id_response.rbi +56 -0
  23. data/rbi/orb/models/customer_create_portal_session_params.rbi +71 -0
  24. data/rbi/orb/models/customer_create_portal_session_response.rbi +56 -0
  25. data/rbi/orb/models/event_ingest_params.rbi +0 -13
  26. data/rbi/orb/models/event_ingest_response.rbi +3 -51
  27. data/rbi/orb/models/invoice_regenerate_invoice_pdf_params.rbi +35 -0
  28. data/rbi/orb/models/invoice_regenerate_receipt_pdf_params.rbi +35 -0
  29. data/rbi/orb/models.rbi +14 -0
  30. data/rbi/orb/resources/alerts.rbi +17 -0
  31. data/rbi/orb/resources/customers.rbi +54 -0
  32. data/rbi/orb/resources/events.rbi +0 -4
  33. data/rbi/orb/resources/invoices.rbi +64 -0
  34. data/sig/orb/models/alert_delete_params.rbs +24 -0
  35. data/sig/orb/models/customer_create_portal_session_by_external_id_params.rbs +40 -0
  36. data/sig/orb/models/customer_create_portal_session_by_external_id_response.rbs +40 -0
  37. data/sig/orb/models/customer_create_portal_session_params.rbs +40 -0
  38. data/sig/orb/models/customer_create_portal_session_response.rbs +40 -0
  39. data/sig/orb/models/event_ingest_params.rbs +1 -11
  40. data/sig/orb/models/event_ingest_response.rbs +3 -26
  41. data/sig/orb/models/invoice_regenerate_invoice_pdf_params.rbs +23 -0
  42. data/sig/orb/models/invoice_regenerate_receipt_pdf_params.rbs +23 -0
  43. data/sig/orb/models.rbs +10 -0
  44. data/sig/orb/resources/alerts.rbs +5 -0
  45. data/sig/orb/resources/customers.rbs +14 -0
  46. data/sig/orb/resources/events.rbs +0 -1
  47. data/sig/orb/resources/invoices.rbs +10 -0
  48. metadata +22 -1
@@ -0,0 +1,36 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class AlertDeleteParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias { T.any(Orb::AlertDeleteParams, Orb::Internal::AnyHash) }
11
+
12
+ sig { returns(String) }
13
+ attr_accessor :alert_configuration_id
14
+
15
+ sig do
16
+ params(
17
+ alert_configuration_id: String,
18
+ request_options: Orb::RequestOptions::OrHash
19
+ ).returns(T.attached_class)
20
+ end
21
+ def self.new(alert_configuration_id:, request_options: {})
22
+ end
23
+
24
+ sig do
25
+ override.returns(
26
+ {
27
+ alert_configuration_id: String,
28
+ request_options: Orb::RequestOptions
29
+ }
30
+ )
31
+ end
32
+ def to_hash
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,74 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class CustomerCreatePortalSessionByExternalIDParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Orb::CustomerCreatePortalSessionByExternalIDParams,
13
+ Orb::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :external_customer_id
19
+
20
+ # Duration in minutes until the portal session expires. Defaults to 60.
21
+ # Maximum 180.
22
+ sig { returns(T.nilable(Integer)) }
23
+ attr_reader :expires_in_minutes
24
+
25
+ sig { params(expires_in_minutes: Integer).void }
26
+ attr_writer :expires_in_minutes
27
+
28
+ # When true (default), creating this session soft-deletes any other active portal
29
+ # sessions for the customer. Set to false to allow concurrent sessions — useful
30
+ # when minting portal links for multiple authenticated end-users at once. The
31
+ # customer's permanent portal link (if any) is never invalidated by this.
32
+ sig { returns(T.nilable(T::Boolean)) }
33
+ attr_reader :invalidate_existing
34
+
35
+ sig { params(invalidate_existing: T::Boolean).void }
36
+ attr_writer :invalidate_existing
37
+
38
+ sig do
39
+ params(
40
+ external_customer_id: String,
41
+ expires_in_minutes: Integer,
42
+ invalidate_existing: T::Boolean,
43
+ request_options: Orb::RequestOptions::OrHash
44
+ ).returns(T.attached_class)
45
+ end
46
+ def self.new(
47
+ external_customer_id:,
48
+ # Duration in minutes until the portal session expires. Defaults to 60.
49
+ # Maximum 180.
50
+ expires_in_minutes: nil,
51
+ # When true (default), creating this session soft-deletes any other active portal
52
+ # sessions for the customer. Set to false to allow concurrent sessions — useful
53
+ # when minting portal links for multiple authenticated end-users at once. The
54
+ # customer's permanent portal link (if any) is never invalidated by this.
55
+ invalidate_existing: nil,
56
+ request_options: {}
57
+ )
58
+ end
59
+
60
+ sig do
61
+ override.returns(
62
+ {
63
+ external_customer_id: String,
64
+ expires_in_minutes: Integer,
65
+ invalidate_existing: T::Boolean,
66
+ request_options: Orb::RequestOptions
67
+ }
68
+ )
69
+ end
70
+ def to_hash
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,56 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class CustomerCreatePortalSessionByExternalIDResponse < Orb::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Orb::Models::CustomerCreatePortalSessionByExternalIDResponse,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :id
16
+
17
+ sig { returns(Time) }
18
+ attr_accessor :created_at
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :customer_id
22
+
23
+ sig { returns(T.nilable(Time)) }
24
+ attr_accessor :expires_at
25
+
26
+ sig { returns(String) }
27
+ attr_accessor :url
28
+
29
+ sig do
30
+ params(
31
+ id: String,
32
+ created_at: Time,
33
+ customer_id: String,
34
+ expires_at: T.nilable(Time),
35
+ url: String
36
+ ).returns(T.attached_class)
37
+ end
38
+ def self.new(id:, created_at:, customer_id:, expires_at:, url:)
39
+ end
40
+
41
+ sig do
42
+ override.returns(
43
+ {
44
+ id: String,
45
+ created_at: Time,
46
+ customer_id: String,
47
+ expires_at: T.nilable(Time),
48
+ url: String
49
+ }
50
+ )
51
+ end
52
+ def to_hash
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,71 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class CustomerCreatePortalSessionParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::CustomerCreatePortalSessionParams, Orb::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :customer_id
16
+
17
+ # Duration in minutes until the portal session expires. Defaults to 60.
18
+ # Maximum 180.
19
+ sig { returns(T.nilable(Integer)) }
20
+ attr_reader :expires_in_minutes
21
+
22
+ sig { params(expires_in_minutes: Integer).void }
23
+ attr_writer :expires_in_minutes
24
+
25
+ # When true (default), creating this session soft-deletes any other active portal
26
+ # sessions for the customer. Set to false to allow concurrent sessions — useful
27
+ # when minting portal links for multiple authenticated end-users at once. The
28
+ # customer's permanent portal link (if any) is never invalidated by this.
29
+ sig { returns(T.nilable(T::Boolean)) }
30
+ attr_reader :invalidate_existing
31
+
32
+ sig { params(invalidate_existing: T::Boolean).void }
33
+ attr_writer :invalidate_existing
34
+
35
+ sig do
36
+ params(
37
+ customer_id: String,
38
+ expires_in_minutes: Integer,
39
+ invalidate_existing: T::Boolean,
40
+ request_options: Orb::RequestOptions::OrHash
41
+ ).returns(T.attached_class)
42
+ end
43
+ def self.new(
44
+ customer_id:,
45
+ # Duration in minutes until the portal session expires. Defaults to 60.
46
+ # Maximum 180.
47
+ expires_in_minutes: nil,
48
+ # When true (default), creating this session soft-deletes any other active portal
49
+ # sessions for the customer. Set to false to allow concurrent sessions — useful
50
+ # when minting portal links for multiple authenticated end-users at once. The
51
+ # customer's permanent portal link (if any) is never invalidated by this.
52
+ invalidate_existing: nil,
53
+ request_options: {}
54
+ )
55
+ end
56
+
57
+ sig do
58
+ override.returns(
59
+ {
60
+ customer_id: String,
61
+ expires_in_minutes: Integer,
62
+ invalidate_existing: T::Boolean,
63
+ request_options: Orb::RequestOptions
64
+ }
65
+ )
66
+ end
67
+ def to_hash
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,56 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class CustomerCreatePortalSessionResponse < Orb::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Orb::Models::CustomerCreatePortalSessionResponse,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :id
16
+
17
+ sig { returns(Time) }
18
+ attr_accessor :created_at
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :customer_id
22
+
23
+ sig { returns(T.nilable(Time)) }
24
+ attr_accessor :expires_at
25
+
26
+ sig { returns(String) }
27
+ attr_accessor :url
28
+
29
+ sig do
30
+ params(
31
+ id: String,
32
+ created_at: Time,
33
+ customer_id: String,
34
+ expires_at: T.nilable(Time),
35
+ url: String
36
+ ).returns(T.attached_class)
37
+ end
38
+ def self.new(id:, created_at:, customer_id:, expires_at:, url:)
39
+ end
40
+
41
+ sig do
42
+ override.returns(
43
+ {
44
+ id: String,
45
+ created_at: Time,
46
+ customer_id: String,
47
+ expires_at: T.nilable(Time),
48
+ url: String
49
+ }
50
+ )
51
+ end
52
+ def to_hash
53
+ end
54
+ end
55
+ end
56
+ end
@@ -17,19 +17,10 @@ module Orb
17
17
  sig { returns(T.nilable(String)) }
18
18
  attr_accessor :backfill_id
19
19
 
20
- # Pending Deprecation: Flag to enable additional debug information in the endpoint
21
- # response
22
- sig { returns(T.nilable(T::Boolean)) }
23
- attr_reader :debug
24
-
25
- sig { params(debug: T::Boolean).void }
26
- attr_writer :debug
27
-
28
20
  sig do
29
21
  params(
30
22
  events: T::Array[Orb::EventIngestParams::Event::OrHash],
31
23
  backfill_id: T.nilable(String),
32
- debug: T::Boolean,
33
24
  request_options: Orb::RequestOptions::OrHash
34
25
  ).returns(T.attached_class)
35
26
  end
@@ -38,9 +29,6 @@ module Orb
38
29
  # If this ingestion request is part of a backfill, this parameter ties the
39
30
  # ingested events to the backfill
40
31
  backfill_id: nil,
41
- # Pending Deprecation: Flag to enable additional debug information in the endpoint
42
- # response
43
- debug: nil,
44
32
  request_options: {}
45
33
  )
46
34
  end
@@ -50,7 +38,6 @@ module Orb
50
38
  {
51
39
  events: T::Array[Orb::EventIngestParams::Event],
52
40
  backfill_id: T.nilable(String),
53
- debug: T::Boolean,
54
41
  request_options: Orb::RequestOptions
55
42
  }
56
43
  )
@@ -15,30 +15,16 @@ module Orb
15
15
  end
16
16
  attr_accessor :validation_failed
17
17
 
18
- sig { returns(T.nilable(Orb::Models::EventIngestResponse::Debug)) }
19
- attr_reader :debug
20
-
21
- sig do
22
- params(
23
- debug: T.nilable(Orb::Models::EventIngestResponse::Debug::OrHash)
24
- ).void
25
- end
26
- attr_writer :debug
27
-
28
18
  sig do
29
19
  params(
30
20
  validation_failed:
31
- T::Array[
32
- Orb::Models::EventIngestResponse::ValidationFailed::OrHash
33
- ],
34
- debug: T.nilable(Orb::Models::EventIngestResponse::Debug::OrHash)
21
+ T::Array[Orb::Models::EventIngestResponse::ValidationFailed::OrHash]
35
22
  ).returns(T.attached_class)
36
23
  end
37
24
  def self.new(
38
25
  # Contains all failing validation events. In the case of a 200, this array will
39
26
  # always be empty. This field will always be present.
40
- validation_failed:,
41
- debug: nil
27
+ validation_failed:
42
28
  )
43
29
  end
44
30
 
@@ -46,8 +32,7 @@ module Orb
46
32
  override.returns(
47
33
  {
48
34
  validation_failed:
49
- T::Array[Orb::Models::EventIngestResponse::ValidationFailed],
50
- debug: T.nilable(Orb::Models::EventIngestResponse::Debug)
35
+ T::Array[Orb::Models::EventIngestResponse::ValidationFailed]
51
36
  }
52
37
  )
53
38
  end
@@ -95,39 +80,6 @@ module Orb
95
80
  def to_hash
96
81
  end
97
82
  end
98
-
99
- class Debug < Orb::Internal::Type::BaseModel
100
- OrHash =
101
- T.type_alias do
102
- T.any(
103
- Orb::Models::EventIngestResponse::Debug,
104
- Orb::Internal::AnyHash
105
- )
106
- end
107
-
108
- sig { returns(T::Array[String]) }
109
- attr_accessor :duplicate
110
-
111
- sig { returns(T::Array[String]) }
112
- attr_accessor :ingested
113
-
114
- sig do
115
- params(
116
- duplicate: T::Array[String],
117
- ingested: T::Array[String]
118
- ).returns(T.attached_class)
119
- end
120
- def self.new(duplicate:, ingested:)
121
- end
122
-
123
- sig do
124
- override.returns(
125
- { duplicate: T::Array[String], ingested: T::Array[String] }
126
- )
127
- end
128
- def to_hash
129
- end
130
- end
131
83
  end
132
84
  end
133
85
  end
@@ -0,0 +1,35 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class InvoiceRegenerateInvoicePdfParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::InvoiceRegenerateInvoicePdfParams, Orb::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :invoice_id
16
+
17
+ sig do
18
+ params(
19
+ invoice_id: String,
20
+ request_options: Orb::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(invoice_id:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ { invoice_id: String, request_options: Orb::RequestOptions }
29
+ )
30
+ end
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,35 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class InvoiceRegenerateReceiptPdfParams < Orb::Internal::Type::BaseModel
6
+ extend Orb::Internal::Type::RequestParameters::Converter
7
+ include Orb::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::InvoiceRegenerateReceiptPdfParams, Orb::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :invoice_id
16
+
17
+ sig do
18
+ params(
19
+ invoice_id: String,
20
+ request_options: Orb::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(invoice_id:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ { invoice_id: String, request_options: Orb::RequestOptions }
29
+ )
30
+ end
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end
data/rbi/orb/models.rbi CHANGED
@@ -21,6 +21,8 @@ module Orb
21
21
  AlertCreateForSubscriptionParams =
22
22
  Orb::Models::AlertCreateForSubscriptionParams
23
23
 
24
+ AlertDeleteParams = Orb::Models::AlertDeleteParams
25
+
24
26
  AlertDisableParams = Orb::Models::AlertDisableParams
25
27
 
26
28
  AlertEnableParams = Orb::Models::AlertEnableParams
@@ -103,6 +105,12 @@ module Orb
103
105
 
104
106
  CustomerCreateParams = Orb::Models::CustomerCreateParams
105
107
 
108
+ CustomerCreatePortalSessionByExternalIDParams =
109
+ Orb::Models::CustomerCreatePortalSessionByExternalIDParams
110
+
111
+ CustomerCreatePortalSessionParams =
112
+ Orb::Models::CustomerCreatePortalSessionParams
113
+
106
114
  CustomerDeleteParams = Orb::Models::CustomerDeleteParams
107
115
 
108
116
  CustomerFetchByExternalIDParams = Orb::Models::CustomerFetchByExternalIDParams
@@ -197,6 +205,12 @@ module Orb
197
205
 
198
206
  InvoicePayParams = Orb::Models::InvoicePayParams
199
207
 
208
+ InvoiceRegenerateInvoicePdfParams =
209
+ Orb::Models::InvoiceRegenerateInvoicePdfParams
210
+
211
+ InvoiceRegenerateReceiptPdfParams =
212
+ Orb::Models::InvoiceRegenerateReceiptPdfParams
213
+
200
214
  InvoiceTiny = Orb::Models::InvoiceTiny
201
215
 
202
216
  InvoiceUpdateParams = Orb::Models::InvoiceUpdateParams
@@ -92,6 +92,23 @@ module Orb
92
92
  )
93
93
  end
94
94
 
95
+ # This endpoint trashes a subscription- or customer-scoped alert. The alert is
96
+ # soft-deleted: it stops firing immediately and no longer appears in fetch or list
97
+ # responses, while the underlying record is retained internally for audit.
98
+ #
99
+ # Plan-level alerts cannot be trashed via the API — disable them instead
100
+ # (`POST /v1/alerts/{alert_configuration_id}/disable`). Their removal would need
101
+ # to be unwound from every subscription the alert was propagated to, which isn't
102
+ # supported yet.
103
+ sig do
104
+ params(
105
+ alert_configuration_id: String,
106
+ request_options: Orb::RequestOptions::OrHash
107
+ ).void
108
+ end
109
+ def delete(alert_configuration_id, request_options: {})
110
+ end
111
+
95
112
  # This endpoint creates a new alert to monitor a customer's credit balance. There
96
113
  # are three types of alerts that can be scoped to customers:
97
114
  # `credit_balance_depleted`, `credit_balance_dropped`, and
@@ -639,6 +639,60 @@ module Orb
639
639
  def delete(customer_id, request_options: {})
640
640
  end
641
641
 
642
+ # Creates a portal session for the customer, returning a short-lived URL that
643
+ # provides authenticated access to the customer's billing portal. The session
644
+ # expires after `expires_in_minutes` (default 60, max 180). By default, creating a
645
+ # new session invalidates any other active portal sessions for the customer; pass
646
+ # `invalidate_existing=false` to allow concurrent sessions.
647
+ sig do
648
+ params(
649
+ customer_id: String,
650
+ expires_in_minutes: Integer,
651
+ invalidate_existing: T::Boolean,
652
+ request_options: Orb::RequestOptions::OrHash
653
+ ).returns(Orb::Models::CustomerCreatePortalSessionResponse)
654
+ end
655
+ def create_portal_session(
656
+ customer_id,
657
+ # Duration in minutes until the portal session expires. Defaults to 60.
658
+ # Maximum 180.
659
+ expires_in_minutes: nil,
660
+ # When true (default), creating this session soft-deletes any other active portal
661
+ # sessions for the customer. Set to false to allow concurrent sessions — useful
662
+ # when minting portal links for multiple authenticated end-users at once. The
663
+ # customer's permanent portal link (if any) is never invalidated by this.
664
+ invalidate_existing: nil,
665
+ request_options: {}
666
+ )
667
+ end
668
+
669
+ # Creates a portal session for the customer, returning a short-lived URL that
670
+ # provides authenticated access to the customer's billing portal. The session
671
+ # expires after `expires_in_minutes` (default 60, max 180). By default, creating a
672
+ # new session invalidates any other active portal sessions for the customer; pass
673
+ # `invalidate_existing=false` to allow concurrent sessions.
674
+ sig do
675
+ params(
676
+ external_customer_id: String,
677
+ expires_in_minutes: Integer,
678
+ invalidate_existing: T::Boolean,
679
+ request_options: Orb::RequestOptions::OrHash
680
+ ).returns(Orb::Models::CustomerCreatePortalSessionByExternalIDResponse)
681
+ end
682
+ def create_portal_session_by_external_id(
683
+ external_customer_id,
684
+ # Duration in minutes until the portal session expires. Defaults to 60.
685
+ # Maximum 180.
686
+ expires_in_minutes: nil,
687
+ # When true (default), creating this session soft-deletes any other active portal
688
+ # sessions for the customer. Set to false to allow concurrent sessions — useful
689
+ # when minting portal links for multiple authenticated end-users at once. The
690
+ # customer's permanent portal link (if any) is never invalidated by this.
691
+ invalidate_existing: nil,
692
+ request_options: {}
693
+ )
694
+ end
695
+
642
696
  # This endpoint is used to fetch customer details given an identifier. If the
643
697
  # `Customer` is in the process of being deleted, only the properties `id` and
644
698
  # `deleted: true` will be returned.
@@ -324,7 +324,6 @@ module Orb
324
324
  params(
325
325
  events: T::Array[Orb::EventIngestParams::Event::OrHash],
326
326
  backfill_id: T.nilable(String),
327
- debug: T::Boolean,
328
327
  request_options: Orb::RequestOptions::OrHash
329
328
  ).returns(Orb::Models::EventIngestResponse)
330
329
  end
@@ -334,9 +333,6 @@ module Orb
334
333
  # Query param: If this ingestion request is part of a backfill, this parameter
335
334
  # ties the ingested events to the backfill
336
335
  backfill_id: nil,
337
- # Query param: Pending Deprecation: Flag to enable additional debug information in
338
- # the endpoint response
339
- debug: nil,
340
336
  request_options: {}
341
337
  )
342
338
  end
@@ -402,6 +402,70 @@ module Orb
402
402
  )
403
403
  end
404
404
 
405
+ # This endpoint triggers a regeneration of the PDF for a finalized invoice.
406
+ #
407
+ # The invoice must be finalized (`issued`, `paid`, `synced`, or `void`) and must
408
+ # already have an existing PDF. The original PDF is archived (not permanently
409
+ # deleted) to maintain an audit trail.
410
+ #
411
+ # **Important Legal Considerations:**
412
+ #
413
+ # Regenerating invoice PDFs may not be permitted in all jurisdictions. Many tax
414
+ # authorities require that issued invoices remain unmodified. Before using this
415
+ # endpoint, ensure that:
416
+ #
417
+ # - Your local tax regulations permit modification of issued billing documents
418
+ # - You have a legitimate business reason (e.g., fixing template errors, updating
419
+ # branding)
420
+ # - You maintain proper records of the original PDF (archived automatically by
421
+ # Orb)
422
+ #
423
+ # Recommended use cases:
424
+ #
425
+ # - Correcting template rendering issues
426
+ # - Applying updated company branding
427
+ # - Updating customer data that was incorrect at issuance
428
+ sig do
429
+ params(
430
+ invoice_id: String,
431
+ request_options: Orb::RequestOptions::OrHash
432
+ ).returns(Orb::Invoice)
433
+ end
434
+ def regenerate_invoice_pdf(invoice_id, request_options: {})
435
+ end
436
+
437
+ # This endpoint triggers a regeneration of the receipt PDF for a paid invoice.
438
+ #
439
+ # The invoice must be in `paid` status and must already have an existing receipt
440
+ # PDF. The original PDF is archived (not permanently deleted) to maintain an audit
441
+ # trail.
442
+ #
443
+ # **Important Legal Considerations:**
444
+ #
445
+ # Regenerating receipt PDFs may not be permitted in all jurisdictions. Many tax
446
+ # authorities require that issued receipts remain unmodified. Before using this
447
+ # endpoint, ensure that:
448
+ #
449
+ # - Your local tax regulations permit modification of issued billing documents
450
+ # - You have a legitimate business reason (e.g., fixing template errors, updating
451
+ # branding)
452
+ # - You maintain proper records of the original PDF (archived automatically by
453
+ # Orb)
454
+ #
455
+ # Recommended use cases:
456
+ #
457
+ # - Correcting template rendering issues
458
+ # - Applying updated company branding
459
+ # - Updating customer data that was incorrect at issuance
460
+ sig do
461
+ params(
462
+ invoice_id: String,
463
+ request_options: Orb::RequestOptions::OrHash
464
+ ).returns(Orb::Invoice)
465
+ end
466
+ def regenerate_receipt_pdf(invoice_id, request_options: {})
467
+ end
468
+
405
469
  # This endpoint allows an invoice's status to be set to the `void` status. This
406
470
  # can only be done to invoices that are in the `issued` status.
407
471
  #