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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +1 -1
- data/lib/orb/models/alert_delete_params.rb +20 -0
- data/lib/orb/models/customer_create_portal_session_by_external_id_params.rb +44 -0
- data/lib/orb/models/customer_create_portal_session_by_external_id_response.rb +40 -0
- data/lib/orb/models/customer_create_portal_session_params.rb +44 -0
- data/lib/orb/models/customer_create_portal_session_response.rb +40 -0
- data/lib/orb/models/event_ingest_params.rb +1 -12
- data/lib/orb/models/event_ingest_response.rb +1 -28
- data/lib/orb/models/invoice_regenerate_invoice_pdf_params.rb +20 -0
- data/lib/orb/models/invoice_regenerate_receipt_pdf_params.rb +20 -0
- data/lib/orb/models.rb +11 -0
- data/lib/orb/resources/alerts.rb +26 -0
- data/lib/orb/resources/customers.rb +66 -0
- data/lib/orb/resources/events.rb +2 -4
- data/lib/orb/resources/invoices.rb +82 -0
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +7 -0
- data/rbi/orb/models/alert_delete_params.rbi +36 -0
- data/rbi/orb/models/customer_create_portal_session_by_external_id_params.rbi +74 -0
- data/rbi/orb/models/customer_create_portal_session_by_external_id_response.rbi +56 -0
- data/rbi/orb/models/customer_create_portal_session_params.rbi +71 -0
- data/rbi/orb/models/customer_create_portal_session_response.rbi +56 -0
- data/rbi/orb/models/event_ingest_params.rbi +0 -13
- data/rbi/orb/models/event_ingest_response.rbi +3 -51
- data/rbi/orb/models/invoice_regenerate_invoice_pdf_params.rbi +35 -0
- data/rbi/orb/models/invoice_regenerate_receipt_pdf_params.rbi +35 -0
- data/rbi/orb/models.rbi +14 -0
- data/rbi/orb/resources/alerts.rbi +17 -0
- data/rbi/orb/resources/customers.rbi +54 -0
- data/rbi/orb/resources/events.rbi +0 -4
- data/rbi/orb/resources/invoices.rbi +64 -0
- data/sig/orb/models/alert_delete_params.rbs +24 -0
- data/sig/orb/models/customer_create_portal_session_by_external_id_params.rbs +40 -0
- data/sig/orb/models/customer_create_portal_session_by_external_id_response.rbs +40 -0
- data/sig/orb/models/customer_create_portal_session_params.rbs +40 -0
- data/sig/orb/models/customer_create_portal_session_response.rbs +40 -0
- data/sig/orb/models/event_ingest_params.rbs +1 -11
- data/sig/orb/models/event_ingest_response.rbs +3 -26
- data/sig/orb/models/invoice_regenerate_invoice_pdf_params.rbs +23 -0
- data/sig/orb/models/invoice_regenerate_receipt_pdf_params.rbs +23 -0
- data/sig/orb/models.rbs +10 -0
- data/sig/orb/resources/alerts.rbs +5 -0
- data/sig/orb/resources/customers.rbs +14 -0
- data/sig/orb/resources/events.rbs +0 -1
- data/sig/orb/resources/invoices.rbs +10 -0
- metadata +22 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 05521f244d4ad5c3d81ed23bd52949c7abf7bf9e1f164f0ea4e08d2f094c434e
|
|
4
|
+
data.tar.gz: b7a6b5f06ca7e4cdd4514fc0a26e1b383fe2859e0d52e8ccdb4504c6c88222c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05b122e60fc61033ae58c27171bae993f7bb240025902d185de5a1295d85284a68ce8a756e5b63eb6a007def9fabc6282046332aaf559818cc7e76107974411e
|
|
7
|
+
data.tar.gz: 315d2ad90e2ca926729949555dc921c2ad5a50fa33ad27865178ca5c54822f14779b6585f2963f989641d978ff4c0973b8d68409f6bd778c5ade82ce764b56a5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.18.0](https://github.com/orbcorp/orb-ruby/compare/v1.17.0...v1.18.0) (2026-07-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** add alert deletion, customer portal session, and invoice PDF regeneration endpoints ([3b6dcd3](https://github.com/orbcorp/orb-ruby/commit/3b6dcd352f56728d8336deebd0382fb4a3c56079))
|
|
9
|
+
* **api:** remove deprecated debug field from events backfill endpoints ([92d37ff](https://github.com/orbcorp/orb-ruby/commit/92d37ff1353df00a1e6e648acc67776443bbb2d1))
|
|
10
|
+
* **api:** remove deprecated debug parameter and field from backfill endpoints ([92d37ff](https://github.com/orbcorp/orb-ruby/commit/92d37ff1353df00a1e6e648acc67776443bbb2d1))
|
|
11
|
+
* **api:** remove deprecated debug query parameter and field from events API ([92d37ff](https://github.com/orbcorp/orb-ruby/commit/92d37ff1353df00a1e6e648acc67776443bbb2d1))
|
|
12
|
+
|
|
3
13
|
## [1.17.0](https://github.com/orbcorp/orb-ruby/compare/v1.16.0...v1.17.0) (2026-07-15)
|
|
4
14
|
|
|
5
15
|
|
data/README.md
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::Alerts#delete
|
|
6
|
+
class AlertDeleteParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute alert_configuration_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :alert_configuration_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(alert_configuration_id:, request_options: {})
|
|
16
|
+
# @param alert_configuration_id [String]
|
|
17
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::Customers#create_portal_session_by_external_id
|
|
6
|
+
class CustomerCreatePortalSessionByExternalIDParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute external_customer_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :external_customer_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute expires_in_minutes
|
|
16
|
+
# Duration in minutes until the portal session expires. Defaults to 60.
|
|
17
|
+
# Maximum 180.
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :expires_in_minutes, Integer
|
|
21
|
+
|
|
22
|
+
# @!attribute invalidate_existing
|
|
23
|
+
# When true (default), creating this session soft-deletes any other active portal
|
|
24
|
+
# sessions for the customer. Set to false to allow concurrent sessions — useful
|
|
25
|
+
# when minting portal links for multiple authenticated end-users at once. The
|
|
26
|
+
# customer's permanent portal link (if any) is never invalidated by this.
|
|
27
|
+
#
|
|
28
|
+
# @return [Boolean, nil]
|
|
29
|
+
optional :invalidate_existing, Orb::Internal::Type::Boolean
|
|
30
|
+
|
|
31
|
+
# @!method initialize(external_customer_id:, expires_in_minutes: nil, invalidate_existing: nil, request_options: {})
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Orb::Models::CustomerCreatePortalSessionByExternalIDParams} for more details.
|
|
34
|
+
#
|
|
35
|
+
# @param external_customer_id [String]
|
|
36
|
+
#
|
|
37
|
+
# @param expires_in_minutes [Integer] Duration in minutes until the portal session expires. Defaults to 60. Maximum 18
|
|
38
|
+
#
|
|
39
|
+
# @param invalidate_existing [Boolean] When true (default), creating this session soft-deletes any other active portal
|
|
40
|
+
#
|
|
41
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::Customers#create_portal_session_by_external_id
|
|
6
|
+
class CustomerCreatePortalSessionByExternalIDResponse < Orb::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
#
|
|
14
|
+
# @return [Time]
|
|
15
|
+
required :created_at, Time
|
|
16
|
+
|
|
17
|
+
# @!attribute customer_id
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :customer_id, String
|
|
21
|
+
|
|
22
|
+
# @!attribute expires_at
|
|
23
|
+
#
|
|
24
|
+
# @return [Time, nil]
|
|
25
|
+
required :expires_at, Time, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!attribute url
|
|
28
|
+
#
|
|
29
|
+
# @return [String]
|
|
30
|
+
required :url, String
|
|
31
|
+
|
|
32
|
+
# @!method initialize(id:, created_at:, customer_id:, expires_at:, url:)
|
|
33
|
+
# @param id [String]
|
|
34
|
+
# @param created_at [Time]
|
|
35
|
+
# @param customer_id [String]
|
|
36
|
+
# @param expires_at [Time, nil]
|
|
37
|
+
# @param url [String]
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::Customers#create_portal_session
|
|
6
|
+
class CustomerCreatePortalSessionParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute customer_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :customer_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute expires_in_minutes
|
|
16
|
+
# Duration in minutes until the portal session expires. Defaults to 60.
|
|
17
|
+
# Maximum 180.
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :expires_in_minutes, Integer
|
|
21
|
+
|
|
22
|
+
# @!attribute invalidate_existing
|
|
23
|
+
# When true (default), creating this session soft-deletes any other active portal
|
|
24
|
+
# sessions for the customer. Set to false to allow concurrent sessions — useful
|
|
25
|
+
# when minting portal links for multiple authenticated end-users at once. The
|
|
26
|
+
# customer's permanent portal link (if any) is never invalidated by this.
|
|
27
|
+
#
|
|
28
|
+
# @return [Boolean, nil]
|
|
29
|
+
optional :invalidate_existing, Orb::Internal::Type::Boolean
|
|
30
|
+
|
|
31
|
+
# @!method initialize(customer_id:, expires_in_minutes: nil, invalidate_existing: nil, request_options: {})
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Orb::Models::CustomerCreatePortalSessionParams} for more details.
|
|
34
|
+
#
|
|
35
|
+
# @param customer_id [String]
|
|
36
|
+
#
|
|
37
|
+
# @param expires_in_minutes [Integer] Duration in minutes until the portal session expires. Defaults to 60. Maximum 18
|
|
38
|
+
#
|
|
39
|
+
# @param invalidate_existing [Boolean] When true (default), creating this session soft-deletes any other active portal
|
|
40
|
+
#
|
|
41
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::Customers#create_portal_session
|
|
6
|
+
class CustomerCreatePortalSessionResponse < Orb::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
#
|
|
14
|
+
# @return [Time]
|
|
15
|
+
required :created_at, Time
|
|
16
|
+
|
|
17
|
+
# @!attribute customer_id
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :customer_id, String
|
|
21
|
+
|
|
22
|
+
# @!attribute expires_at
|
|
23
|
+
#
|
|
24
|
+
# @return [Time, nil]
|
|
25
|
+
required :expires_at, Time, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!attribute url
|
|
28
|
+
#
|
|
29
|
+
# @return [String]
|
|
30
|
+
required :url, String
|
|
31
|
+
|
|
32
|
+
# @!method initialize(id:, created_at:, customer_id:, expires_at:, url:)
|
|
33
|
+
# @param id [String]
|
|
34
|
+
# @param created_at [Time]
|
|
35
|
+
# @param customer_id [String]
|
|
36
|
+
# @param expires_at [Time, nil]
|
|
37
|
+
# @param url [String]
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -19,16 +19,7 @@ module Orb
|
|
|
19
19
|
# @return [String, nil]
|
|
20
20
|
optional :backfill_id, String, nil?: true
|
|
21
21
|
|
|
22
|
-
# @!
|
|
23
|
-
# @deprecated
|
|
24
|
-
#
|
|
25
|
-
# Pending Deprecation: Flag to enable additional debug information in the endpoint
|
|
26
|
-
# response
|
|
27
|
-
#
|
|
28
|
-
# @return [Boolean, nil]
|
|
29
|
-
optional :debug, Orb::Internal::Type::Boolean
|
|
30
|
-
|
|
31
|
-
# @!method initialize(events:, backfill_id: nil, debug: nil, request_options: {})
|
|
22
|
+
# @!method initialize(events:, backfill_id: nil, request_options: {})
|
|
32
23
|
# Some parameter documentations has been truncated, see
|
|
33
24
|
# {Orb::Models::EventIngestParams} for more details.
|
|
34
25
|
#
|
|
@@ -36,8 +27,6 @@ module Orb
|
|
|
36
27
|
#
|
|
37
28
|
# @param backfill_id [String, nil] If this ingestion request is part of a backfill, this parameter ties the ingeste
|
|
38
29
|
#
|
|
39
|
-
# @param debug [Boolean] Pending Deprecation: Flag to enable additional debug information in the endpoint
|
|
40
|
-
#
|
|
41
30
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
42
31
|
|
|
43
32
|
class Event < Orb::Internal::Type::BaseModel
|
|
@@ -12,19 +12,11 @@ module Orb
|
|
|
12
12
|
required :validation_failed,
|
|
13
13
|
-> { Orb::Internal::Type::ArrayOf[Orb::Models::EventIngestResponse::ValidationFailed] }
|
|
14
14
|
|
|
15
|
-
# @!
|
|
16
|
-
# @deprecated
|
|
17
|
-
#
|
|
18
|
-
# @return [Orb::Models::EventIngestResponse::Debug, nil]
|
|
19
|
-
optional :debug, -> { Orb::Models::EventIngestResponse::Debug }, nil?: true
|
|
20
|
-
|
|
21
|
-
# @!method initialize(validation_failed:, debug: nil)
|
|
15
|
+
# @!method initialize(validation_failed:)
|
|
22
16
|
# Some parameter documentations has been truncated, see
|
|
23
17
|
# {Orb::Models::EventIngestResponse} for more details.
|
|
24
18
|
#
|
|
25
19
|
# @param validation_failed [Array<Orb::Models::EventIngestResponse::ValidationFailed>] Contains all failing validation events. In the case of a 200, this array will al
|
|
26
|
-
#
|
|
27
|
-
# @param debug [Orb::Models::EventIngestResponse::Debug, nil]
|
|
28
20
|
|
|
29
21
|
class ValidationFailed < Orb::Internal::Type::BaseModel
|
|
30
22
|
# @!attribute idempotency_key
|
|
@@ -48,25 +40,6 @@ module Orb
|
|
|
48
40
|
#
|
|
49
41
|
# @param validation_errors [Array<String>] An array of strings corresponding to validation failures for this idempotency_ke
|
|
50
42
|
end
|
|
51
|
-
|
|
52
|
-
# @deprecated
|
|
53
|
-
#
|
|
54
|
-
# @see Orb::Models::EventIngestResponse#debug
|
|
55
|
-
class Debug < Orb::Internal::Type::BaseModel
|
|
56
|
-
# @!attribute duplicate
|
|
57
|
-
#
|
|
58
|
-
# @return [Array<String>]
|
|
59
|
-
required :duplicate, Orb::Internal::Type::ArrayOf[String]
|
|
60
|
-
|
|
61
|
-
# @!attribute ingested
|
|
62
|
-
#
|
|
63
|
-
# @return [Array<String>]
|
|
64
|
-
required :ingested, Orb::Internal::Type::ArrayOf[String]
|
|
65
|
-
|
|
66
|
-
# @!method initialize(duplicate:, ingested:)
|
|
67
|
-
# @param duplicate [Array<String>]
|
|
68
|
-
# @param ingested [Array<String>]
|
|
69
|
-
end
|
|
70
43
|
end
|
|
71
44
|
end
|
|
72
45
|
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::Invoices#regenerate_invoice_pdf
|
|
6
|
+
class InvoiceRegenerateInvoicePdfParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute invoice_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :invoice_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(invoice_id:, request_options: {})
|
|
16
|
+
# @param invoice_id [String]
|
|
17
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::Invoices#regenerate_receipt_pdf
|
|
6
|
+
class InvoiceRegenerateReceiptPdfParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute invoice_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :invoice_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(invoice_id:, request_options: {})
|
|
16
|
+
# @param invoice_id [String]
|
|
17
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
data/lib/orb/models.rb
CHANGED
|
@@ -57,6 +57,8 @@ module Orb
|
|
|
57
57
|
|
|
58
58
|
AlertCreateForSubscriptionParams = Orb::Models::AlertCreateForSubscriptionParams
|
|
59
59
|
|
|
60
|
+
AlertDeleteParams = Orb::Models::AlertDeleteParams
|
|
61
|
+
|
|
60
62
|
AlertDisableParams = Orb::Models::AlertDisableParams
|
|
61
63
|
|
|
62
64
|
AlertEnableParams = Orb::Models::AlertEnableParams
|
|
@@ -139,6 +141,11 @@ module Orb
|
|
|
139
141
|
|
|
140
142
|
CustomerCreateParams = Orb::Models::CustomerCreateParams
|
|
141
143
|
|
|
144
|
+
CustomerCreatePortalSessionByExternalIDParams =
|
|
145
|
+
Orb::Models::CustomerCreatePortalSessionByExternalIDParams
|
|
146
|
+
|
|
147
|
+
CustomerCreatePortalSessionParams = Orb::Models::CustomerCreatePortalSessionParams
|
|
148
|
+
|
|
142
149
|
CustomerDeleteParams = Orb::Models::CustomerDeleteParams
|
|
143
150
|
|
|
144
151
|
CustomerFetchByExternalIDParams = Orb::Models::CustomerFetchByExternalIDParams
|
|
@@ -228,6 +235,10 @@ module Orb
|
|
|
228
235
|
|
|
229
236
|
InvoicePayParams = Orb::Models::InvoicePayParams
|
|
230
237
|
|
|
238
|
+
InvoiceRegenerateInvoicePdfParams = Orb::Models::InvoiceRegenerateInvoicePdfParams
|
|
239
|
+
|
|
240
|
+
InvoiceRegenerateReceiptPdfParams = Orb::Models::InvoiceRegenerateReceiptPdfParams
|
|
241
|
+
|
|
231
242
|
InvoiceTiny = Orb::Models::InvoiceTiny
|
|
232
243
|
|
|
233
244
|
InvoiceUpdateParams = Orb::Models::InvoiceUpdateParams
|
data/lib/orb/resources/alerts.rb
CHANGED
|
@@ -116,6 +116,32 @@ module Orb
|
|
|
116
116
|
)
|
|
117
117
|
end
|
|
118
118
|
|
|
119
|
+
# This endpoint trashes a subscription- or customer-scoped alert. The alert is
|
|
120
|
+
# soft-deleted: it stops firing immediately and no longer appears in fetch or list
|
|
121
|
+
# responses, while the underlying record is retained internally for audit.
|
|
122
|
+
#
|
|
123
|
+
# Plan-level alerts cannot be trashed via the API — disable them instead
|
|
124
|
+
# (`POST /v1/alerts/{alert_configuration_id}/disable`). Their removal would need
|
|
125
|
+
# to be unwound from every subscription the alert was propagated to, which isn't
|
|
126
|
+
# supported yet.
|
|
127
|
+
#
|
|
128
|
+
# @overload delete(alert_configuration_id, request_options: {})
|
|
129
|
+
#
|
|
130
|
+
# @param alert_configuration_id [String]
|
|
131
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
132
|
+
#
|
|
133
|
+
# @return [nil]
|
|
134
|
+
#
|
|
135
|
+
# @see Orb::Models::AlertDeleteParams
|
|
136
|
+
def delete(alert_configuration_id, params = {})
|
|
137
|
+
@client.request(
|
|
138
|
+
method: :delete,
|
|
139
|
+
path: ["alerts/%1$s", alert_configuration_id],
|
|
140
|
+
model: NilClass,
|
|
141
|
+
options: params[:request_options]
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
|
|
119
145
|
# This endpoint creates a new alert to monitor a customer's credit balance. There
|
|
120
146
|
# are three types of alerts that can be scoped to customers:
|
|
121
147
|
# `credit_balance_depleted`, `credit_balance_dropped`, and
|
|
@@ -289,6 +289,72 @@ module Orb
|
|
|
289
289
|
)
|
|
290
290
|
end
|
|
291
291
|
|
|
292
|
+
# Some parameter documentations has been truncated, see
|
|
293
|
+
# {Orb::Models::CustomerCreatePortalSessionParams} for more details.
|
|
294
|
+
#
|
|
295
|
+
# Creates a portal session for the customer, returning a short-lived URL that
|
|
296
|
+
# provides authenticated access to the customer's billing portal. The session
|
|
297
|
+
# expires after `expires_in_minutes` (default 60, max 180). By default, creating a
|
|
298
|
+
# new session invalidates any other active portal sessions for the customer; pass
|
|
299
|
+
# `invalidate_existing=false` to allow concurrent sessions.
|
|
300
|
+
#
|
|
301
|
+
# @overload create_portal_session(customer_id, expires_in_minutes: nil, invalidate_existing: nil, request_options: {})
|
|
302
|
+
#
|
|
303
|
+
# @param customer_id [String]
|
|
304
|
+
#
|
|
305
|
+
# @param expires_in_minutes [Integer] Duration in minutes until the portal session expires. Defaults to 60. Maximum 18
|
|
306
|
+
#
|
|
307
|
+
# @param invalidate_existing [Boolean] When true (default), creating this session soft-deletes any other active portal
|
|
308
|
+
#
|
|
309
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
310
|
+
#
|
|
311
|
+
# @return [Orb::Models::CustomerCreatePortalSessionResponse]
|
|
312
|
+
#
|
|
313
|
+
# @see Orb::Models::CustomerCreatePortalSessionParams
|
|
314
|
+
def create_portal_session(customer_id, params = {})
|
|
315
|
+
parsed, options = Orb::CustomerCreatePortalSessionParams.dump_request(params)
|
|
316
|
+
@client.request(
|
|
317
|
+
method: :post,
|
|
318
|
+
path: ["customers/%1$s/portal_sessions", customer_id],
|
|
319
|
+
body: parsed,
|
|
320
|
+
model: Orb::Models::CustomerCreatePortalSessionResponse,
|
|
321
|
+
options: options
|
|
322
|
+
)
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# Some parameter documentations has been truncated, see
|
|
326
|
+
# {Orb::Models::CustomerCreatePortalSessionByExternalIDParams} for more details.
|
|
327
|
+
#
|
|
328
|
+
# Creates a portal session for the customer, returning a short-lived URL that
|
|
329
|
+
# provides authenticated access to the customer's billing portal. The session
|
|
330
|
+
# expires after `expires_in_minutes` (default 60, max 180). By default, creating a
|
|
331
|
+
# new session invalidates any other active portal sessions for the customer; pass
|
|
332
|
+
# `invalidate_existing=false` to allow concurrent sessions.
|
|
333
|
+
#
|
|
334
|
+
# @overload create_portal_session_by_external_id(external_customer_id, expires_in_minutes: nil, invalidate_existing: nil, request_options: {})
|
|
335
|
+
#
|
|
336
|
+
# @param external_customer_id [String]
|
|
337
|
+
#
|
|
338
|
+
# @param expires_in_minutes [Integer] Duration in minutes until the portal session expires. Defaults to 60. Maximum 18
|
|
339
|
+
#
|
|
340
|
+
# @param invalidate_existing [Boolean] When true (default), creating this session soft-deletes any other active portal
|
|
341
|
+
#
|
|
342
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
343
|
+
#
|
|
344
|
+
# @return [Orb::Models::CustomerCreatePortalSessionByExternalIDResponse]
|
|
345
|
+
#
|
|
346
|
+
# @see Orb::Models::CustomerCreatePortalSessionByExternalIDParams
|
|
347
|
+
def create_portal_session_by_external_id(external_customer_id, params = {})
|
|
348
|
+
parsed, options = Orb::CustomerCreatePortalSessionByExternalIDParams.dump_request(params)
|
|
349
|
+
@client.request(
|
|
350
|
+
method: :post,
|
|
351
|
+
path: ["customers/external_customer_id/%1$s/portal_sessions", external_customer_id],
|
|
352
|
+
body: parsed,
|
|
353
|
+
model: Orb::Models::CustomerCreatePortalSessionByExternalIDResponse,
|
|
354
|
+
options: options
|
|
355
|
+
)
|
|
356
|
+
end
|
|
357
|
+
|
|
292
358
|
# This endpoint is used to fetch customer details given an identifier. If the
|
|
293
359
|
# `Customer` is in the process of being deleted, only the properties `id` and
|
|
294
360
|
# `deleted: true` will be returned.
|
data/lib/orb/resources/events.rb
CHANGED
|
@@ -336,21 +336,19 @@ module Orb
|
|
|
336
336
|
# }
|
|
337
337
|
# ```
|
|
338
338
|
#
|
|
339
|
-
# @overload ingest(events:, backfill_id: nil,
|
|
339
|
+
# @overload ingest(events:, backfill_id: nil, request_options: {})
|
|
340
340
|
#
|
|
341
341
|
# @param events [Array<Orb::Models::EventIngestParams::Event>] Body param
|
|
342
342
|
#
|
|
343
343
|
# @param backfill_id [String, nil] Query param: If this ingestion request is part of a backfill, this parameter tie
|
|
344
344
|
#
|
|
345
|
-
# @param debug [Boolean] Query param: Pending Deprecation: Flag to enable additional debug information in
|
|
346
|
-
#
|
|
347
345
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
348
346
|
#
|
|
349
347
|
# @return [Orb::Models::EventIngestResponse]
|
|
350
348
|
#
|
|
351
349
|
# @see Orb::Models::EventIngestParams
|
|
352
350
|
def ingest(params)
|
|
353
|
-
query_params = [:backfill_id
|
|
351
|
+
query_params = [:backfill_id]
|
|
354
352
|
parsed, options = Orb::EventIngestParams.dump_request(params)
|
|
355
353
|
query = Orb::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
356
354
|
@client.request(
|
|
@@ -462,6 +462,88 @@ module Orb
|
|
|
462
462
|
)
|
|
463
463
|
end
|
|
464
464
|
|
|
465
|
+
# This endpoint triggers a regeneration of the PDF for a finalized invoice.
|
|
466
|
+
#
|
|
467
|
+
# The invoice must be finalized (`issued`, `paid`, `synced`, or `void`) and must
|
|
468
|
+
# already have an existing PDF. The original PDF is archived (not permanently
|
|
469
|
+
# deleted) to maintain an audit trail.
|
|
470
|
+
#
|
|
471
|
+
# **Important Legal Considerations:**
|
|
472
|
+
#
|
|
473
|
+
# Regenerating invoice PDFs may not be permitted in all jurisdictions. Many tax
|
|
474
|
+
# authorities require that issued invoices remain unmodified. Before using this
|
|
475
|
+
# endpoint, ensure that:
|
|
476
|
+
#
|
|
477
|
+
# - Your local tax regulations permit modification of issued billing documents
|
|
478
|
+
# - You have a legitimate business reason (e.g., fixing template errors, updating
|
|
479
|
+
# branding)
|
|
480
|
+
# - You maintain proper records of the original PDF (archived automatically by
|
|
481
|
+
# Orb)
|
|
482
|
+
#
|
|
483
|
+
# Recommended use cases:
|
|
484
|
+
#
|
|
485
|
+
# - Correcting template rendering issues
|
|
486
|
+
# - Applying updated company branding
|
|
487
|
+
# - Updating customer data that was incorrect at issuance
|
|
488
|
+
#
|
|
489
|
+
# @overload regenerate_invoice_pdf(invoice_id, request_options: {})
|
|
490
|
+
#
|
|
491
|
+
# @param invoice_id [String]
|
|
492
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
493
|
+
#
|
|
494
|
+
# @return [Orb::Models::Invoice]
|
|
495
|
+
#
|
|
496
|
+
# @see Orb::Models::InvoiceRegenerateInvoicePdfParams
|
|
497
|
+
def regenerate_invoice_pdf(invoice_id, params = {})
|
|
498
|
+
@client.request(
|
|
499
|
+
method: :post,
|
|
500
|
+
path: ["invoices/%1$s/regenerate_invoice_pdf", invoice_id],
|
|
501
|
+
model: Orb::Invoice,
|
|
502
|
+
options: params[:request_options]
|
|
503
|
+
)
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
# This endpoint triggers a regeneration of the receipt PDF for a paid invoice.
|
|
507
|
+
#
|
|
508
|
+
# The invoice must be in `paid` status and must already have an existing receipt
|
|
509
|
+
# PDF. The original PDF is archived (not permanently deleted) to maintain an audit
|
|
510
|
+
# trail.
|
|
511
|
+
#
|
|
512
|
+
# **Important Legal Considerations:**
|
|
513
|
+
#
|
|
514
|
+
# Regenerating receipt PDFs may not be permitted in all jurisdictions. Many tax
|
|
515
|
+
# authorities require that issued receipts remain unmodified. Before using this
|
|
516
|
+
# endpoint, ensure that:
|
|
517
|
+
#
|
|
518
|
+
# - Your local tax regulations permit modification of issued billing documents
|
|
519
|
+
# - You have a legitimate business reason (e.g., fixing template errors, updating
|
|
520
|
+
# branding)
|
|
521
|
+
# - You maintain proper records of the original PDF (archived automatically by
|
|
522
|
+
# Orb)
|
|
523
|
+
#
|
|
524
|
+
# Recommended use cases:
|
|
525
|
+
#
|
|
526
|
+
# - Correcting template rendering issues
|
|
527
|
+
# - Applying updated company branding
|
|
528
|
+
# - Updating customer data that was incorrect at issuance
|
|
529
|
+
#
|
|
530
|
+
# @overload regenerate_receipt_pdf(invoice_id, request_options: {})
|
|
531
|
+
#
|
|
532
|
+
# @param invoice_id [String]
|
|
533
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
534
|
+
#
|
|
535
|
+
# @return [Orb::Models::Invoice]
|
|
536
|
+
#
|
|
537
|
+
# @see Orb::Models::InvoiceRegenerateReceiptPdfParams
|
|
538
|
+
def regenerate_receipt_pdf(invoice_id, params = {})
|
|
539
|
+
@client.request(
|
|
540
|
+
method: :post,
|
|
541
|
+
path: ["invoices/%1$s/regenerate_receipt_pdf", invoice_id],
|
|
542
|
+
model: Orb::Invoice,
|
|
543
|
+
options: params[:request_options]
|
|
544
|
+
)
|
|
545
|
+
end
|
|
546
|
+
|
|
465
547
|
# This endpoint allows an invoice's status to be set to the `void` status. This
|
|
466
548
|
# can only be done to invoices that are in the `issued` status.
|
|
467
549
|
#
|
data/lib/orb/version.rb
CHANGED
data/lib/orb.rb
CHANGED
|
@@ -62,6 +62,7 @@ require_relative "orb/models/alert"
|
|
|
62
62
|
require_relative "orb/models/alert_create_for_customer_params"
|
|
63
63
|
require_relative "orb/models/alert_create_for_external_customer_params"
|
|
64
64
|
require_relative "orb/models/alert_create_for_subscription_params"
|
|
65
|
+
require_relative "orb/models/alert_delete_params"
|
|
65
66
|
require_relative "orb/models/alert_disable_params"
|
|
66
67
|
require_relative "orb/models/alert_enable_params"
|
|
67
68
|
require_relative "orb/models/alert_list_params"
|
|
@@ -107,6 +108,10 @@ require_relative "orb/models/credit_note_list_params"
|
|
|
107
108
|
require_relative "orb/models/credit_note_tiny"
|
|
108
109
|
require_relative "orb/models/customer"
|
|
109
110
|
require_relative "orb/models/customer_create_params"
|
|
111
|
+
require_relative "orb/models/customer_create_portal_session_by_external_id_params"
|
|
112
|
+
require_relative "orb/models/customer_create_portal_session_by_external_id_response"
|
|
113
|
+
require_relative "orb/models/customer_create_portal_session_params"
|
|
114
|
+
require_relative "orb/models/customer_create_portal_session_response"
|
|
110
115
|
require_relative "orb/models/customer_delete_params"
|
|
111
116
|
require_relative "orb/models/customer_fetch_by_external_id_params"
|
|
112
117
|
require_relative "orb/models/customer_fetch_params"
|
|
@@ -209,6 +214,8 @@ require_relative "orb/models/invoice_list_summary_params"
|
|
|
209
214
|
require_relative "orb/models/invoice_list_summary_response"
|
|
210
215
|
require_relative "orb/models/invoice_mark_paid_params"
|
|
211
216
|
require_relative "orb/models/invoice_pay_params"
|
|
217
|
+
require_relative "orb/models/invoice_regenerate_invoice_pdf_params"
|
|
218
|
+
require_relative "orb/models/invoice_regenerate_receipt_pdf_params"
|
|
212
219
|
require_relative "orb/models/invoice_tiny"
|
|
213
220
|
require_relative "orb/models/invoice_update_params"
|
|
214
221
|
require_relative "orb/models/invoice_void_params"
|