orb-billing 1.48.0 → 1.50.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 +14 -0
- data/README.md +1 -1
- data/lib/orb/models/changed_subscription_resources.rb +21 -1
- data/lib/orb/models/customers/credit_fetch_balance_by_external_id_params.rb +31 -0
- data/lib/orb/models/customers/credit_fetch_balance_by_external_id_response.rb +61 -0
- data/lib/orb/models/customers/credit_fetch_balance_params.rb +31 -0
- data/lib/orb/models/customers/credit_fetch_balance_response.rb +60 -0
- data/lib/orb/models/invoice.rb +21 -1
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +21 -1
- data/lib/orb/models/invoice_issue_summary_response.rb +21 -1
- data/lib/orb/models/invoice_issued_summary_webhook_event.rb +21 -1
- data/lib/orb/models/invoice_list_summary_response.rb +21 -1
- data/lib/orb/models/subscription_list_summary_params.rb +108 -0
- data/lib/orb/models/subscription_list_summary_response.rb +130 -0
- data/lib/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_issued_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rb +21 -1
- data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb +21 -1
- data/lib/orb/models.rb +2 -0
- data/lib/orb/resources/alerts.rb +7 -4
- data/lib/orb/resources/customers/credits.rb +76 -0
- data/lib/orb/resources/subscriptions.rb +60 -0
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +6 -0
- data/rbi/orb/models/changed_subscription_resources.rbi +24 -0
- data/rbi/orb/models/customers/credit_fetch_balance_by_external_id_params.rbi +54 -0
- data/rbi/orb/models/customers/credit_fetch_balance_by_external_id_response.rbi +86 -0
- data/rbi/orb/models/customers/credit_fetch_balance_params.rbi +54 -0
- data/rbi/orb/models/customers/credit_fetch_balance_response.rbi +86 -0
- data/rbi/orb/models/invoice.rbi +24 -0
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +24 -0
- data/rbi/orb/models/invoice_issue_summary_response.rbi +24 -0
- data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +24 -0
- data/rbi/orb/models/invoice_list_summary_response.rbi +24 -0
- data/rbi/orb/models/subscription_list_summary_params.rbi +148 -0
- data/rbi/orb/models/subscription_list_summary_response.rbi +214 -0
- data/rbi/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_issued_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbi +24 -0
- data/rbi/orb/models.rbi +2 -0
- data/rbi/orb/resources/alerts.rbi +7 -4
- data/rbi/orb/resources/customers/credits.rbi +60 -0
- data/rbi/orb/resources/subscriptions.rbi +47 -0
- data/sig/orb/models/changed_subscription_resources.rbs +10 -0
- data/sig/orb/models/customers/credit_fetch_balance_by_external_id_params.rbs +30 -0
- data/sig/orb/models/customers/credit_fetch_balance_by_external_id_response.rbs +42 -0
- data/sig/orb/models/customers/credit_fetch_balance_params.rbs +30 -0
- data/sig/orb/models/customers/credit_fetch_balance_response.rbs +42 -0
- data/sig/orb/models/invoice.rbs +10 -0
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +10 -0
- data/sig/orb/models/invoice_issue_summary_response.rbs +10 -0
- data/sig/orb/models/invoice_issued_summary_webhook_event.rbs +10 -0
- data/sig/orb/models/invoice_list_summary_response.rbs +10 -0
- data/sig/orb/models/subscription_list_summary_params.rbs +90 -0
- data/sig/orb/models/subscription_list_summary_response.rbs +94 -0
- data/sig/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_edited_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_issued_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbs +10 -0
- data/sig/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbs +10 -0
- data/sig/orb/models.rbs +2 -0
- data/sig/orb/resources/customers/credits.rbs +12 -0
- data/sig/orb/resources/subscriptions.rbs +15 -0
- metadata +19 -1
|
@@ -436,6 +436,18 @@ module Orb
|
|
|
436
436
|
sig { returns(T.nilable(Time)) }
|
|
437
437
|
attr_accessor :scheduled_issue_at
|
|
438
438
|
|
|
439
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
440
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
441
|
+
# line items.
|
|
442
|
+
sig { returns(T.nilable(Time)) }
|
|
443
|
+
attr_accessor :service_period_end
|
|
444
|
+
|
|
445
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
446
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
447
|
+
# line items.
|
|
448
|
+
sig { returns(T.nilable(Time)) }
|
|
449
|
+
attr_accessor :service_period_start
|
|
450
|
+
|
|
439
451
|
sig { returns(T.nilable(Orb::Address)) }
|
|
440
452
|
attr_reader :shipping_address
|
|
441
453
|
|
|
@@ -543,6 +555,8 @@ module Orb
|
|
|
543
555
|
payment_received_at: T.nilable(Time),
|
|
544
556
|
payment_started_at: T.nilable(Time),
|
|
545
557
|
scheduled_issue_at: T.nilable(Time),
|
|
558
|
+
service_period_end: T.nilable(Time),
|
|
559
|
+
service_period_start: T.nilable(Time),
|
|
546
560
|
shipping_address: T.nilable(Orb::Address::OrHash),
|
|
547
561
|
status:
|
|
548
562
|
Orb::ChangedSubscriptionResources::CreatedInvoice::Status::OrSymbol,
|
|
@@ -792,6 +806,14 @@ module Orb
|
|
|
792
806
|
# If the invoice is in draft, this timestamp will reflect when the invoice is
|
|
793
807
|
# scheduled to be issued.
|
|
794
808
|
scheduled_issue_at:,
|
|
809
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
810
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
811
|
+
# line items.
|
|
812
|
+
service_period_end:,
|
|
813
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
814
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
815
|
+
# line items.
|
|
816
|
+
service_period_start:,
|
|
795
817
|
shipping_address:,
|
|
796
818
|
status:,
|
|
797
819
|
subscription:,
|
|
@@ -865,6 +887,8 @@ module Orb
|
|
|
865
887
|
payment_received_at: T.nilable(Time),
|
|
866
888
|
payment_started_at: T.nilable(Time),
|
|
867
889
|
scheduled_issue_at: T.nilable(Time),
|
|
890
|
+
service_period_end: T.nilable(Time),
|
|
891
|
+
service_period_start: T.nilable(Time),
|
|
868
892
|
shipping_address: T.nilable(Orb::Address),
|
|
869
893
|
status:
|
|
870
894
|
Orb::ChangedSubscriptionResources::CreatedInvoice::Status::TaggedSymbol,
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Customers
|
|
6
|
+
class CreditFetchBalanceByExternalIDParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Orb::Customers::CreditFetchBalanceByExternalIDParams,
|
|
14
|
+
Orb::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :external_customer_id
|
|
20
|
+
|
|
21
|
+
# The ledger currency or custom pricing unit to use.
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_accessor :currency
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
external_customer_id: String,
|
|
28
|
+
currency: T.nilable(String),
|
|
29
|
+
request_options: Orb::RequestOptions::OrHash
|
|
30
|
+
).returns(T.attached_class)
|
|
31
|
+
end
|
|
32
|
+
def self.new(
|
|
33
|
+
external_customer_id:,
|
|
34
|
+
# The ledger currency or custom pricing unit to use.
|
|
35
|
+
currency: nil,
|
|
36
|
+
request_options: {}
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
override.returns(
|
|
42
|
+
{
|
|
43
|
+
external_customer_id: String,
|
|
44
|
+
currency: T.nilable(String),
|
|
45
|
+
request_options: Orb::RequestOptions
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
def to_hash
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Customers
|
|
6
|
+
class CreditFetchBalanceByExternalIDResponse < Orb::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Orb::Models::Customers::CreditFetchBalanceByExternalIDResponse,
|
|
11
|
+
Orb::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The customer's available credit balance: the sum of `balance` across their
|
|
16
|
+
# `active` credit blocks.
|
|
17
|
+
sig { returns(Float) }
|
|
18
|
+
attr_accessor :balance
|
|
19
|
+
|
|
20
|
+
# The currency or custom pricing unit the balances are denominated in. Null when
|
|
21
|
+
# no `currency` is passed and the customer has no credit ledger, in which case
|
|
22
|
+
# every balance is `0`.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_accessor :currency
|
|
25
|
+
|
|
26
|
+
# The balance that expires on `next_expiry_date`. Null if `next_expiry_date` is
|
|
27
|
+
# null.
|
|
28
|
+
sig { returns(T.nilable(Float)) }
|
|
29
|
+
attr_accessor :next_expiry_balance
|
|
30
|
+
|
|
31
|
+
# The earliest `expiry_date` among active credit blocks. Null if none of them
|
|
32
|
+
# expire.
|
|
33
|
+
sig { returns(T.nilable(Time)) }
|
|
34
|
+
attr_accessor :next_expiry_date
|
|
35
|
+
|
|
36
|
+
# The total balance of credit blocks in `pending_payment` status. Not included in
|
|
37
|
+
# `balance` until the invoice that funds them is paid.
|
|
38
|
+
sig { returns(Float) }
|
|
39
|
+
attr_accessor :pending_payment_balance
|
|
40
|
+
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
balance: Float,
|
|
44
|
+
currency: T.nilable(String),
|
|
45
|
+
next_expiry_balance: T.nilable(Float),
|
|
46
|
+
next_expiry_date: T.nilable(Time),
|
|
47
|
+
pending_payment_balance: Float
|
|
48
|
+
).returns(T.attached_class)
|
|
49
|
+
end
|
|
50
|
+
def self.new(
|
|
51
|
+
# The customer's available credit balance: the sum of `balance` across their
|
|
52
|
+
# `active` credit blocks.
|
|
53
|
+
balance:,
|
|
54
|
+
# The currency or custom pricing unit the balances are denominated in. Null when
|
|
55
|
+
# no `currency` is passed and the customer has no credit ledger, in which case
|
|
56
|
+
# every balance is `0`.
|
|
57
|
+
currency:,
|
|
58
|
+
# The balance that expires on `next_expiry_date`. Null if `next_expiry_date` is
|
|
59
|
+
# null.
|
|
60
|
+
next_expiry_balance:,
|
|
61
|
+
# The earliest `expiry_date` among active credit blocks. Null if none of them
|
|
62
|
+
# expire.
|
|
63
|
+
next_expiry_date:,
|
|
64
|
+
# The total balance of credit blocks in `pending_payment` status. Not included in
|
|
65
|
+
# `balance` until the invoice that funds them is paid.
|
|
66
|
+
pending_payment_balance:
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
sig do
|
|
71
|
+
override.returns(
|
|
72
|
+
{
|
|
73
|
+
balance: Float,
|
|
74
|
+
currency: T.nilable(String),
|
|
75
|
+
next_expiry_balance: T.nilable(Float),
|
|
76
|
+
next_expiry_date: T.nilable(Time),
|
|
77
|
+
pending_payment_balance: Float
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
def to_hash
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Customers
|
|
6
|
+
class CreditFetchBalanceParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Orb::Customers::CreditFetchBalanceParams,
|
|
14
|
+
Orb::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :customer_id
|
|
20
|
+
|
|
21
|
+
# The ledger currency or custom pricing unit to use.
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_accessor :currency
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
customer_id: String,
|
|
28
|
+
currency: T.nilable(String),
|
|
29
|
+
request_options: Orb::RequestOptions::OrHash
|
|
30
|
+
).returns(T.attached_class)
|
|
31
|
+
end
|
|
32
|
+
def self.new(
|
|
33
|
+
customer_id:,
|
|
34
|
+
# The ledger currency or custom pricing unit to use.
|
|
35
|
+
currency: nil,
|
|
36
|
+
request_options: {}
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
override.returns(
|
|
42
|
+
{
|
|
43
|
+
customer_id: String,
|
|
44
|
+
currency: T.nilable(String),
|
|
45
|
+
request_options: Orb::RequestOptions
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
def to_hash
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Customers
|
|
6
|
+
class CreditFetchBalanceResponse < Orb::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Orb::Models::Customers::CreditFetchBalanceResponse,
|
|
11
|
+
Orb::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The customer's available credit balance: the sum of `balance` across their
|
|
16
|
+
# `active` credit blocks.
|
|
17
|
+
sig { returns(Float) }
|
|
18
|
+
attr_accessor :balance
|
|
19
|
+
|
|
20
|
+
# The currency or custom pricing unit the balances are denominated in. Null when
|
|
21
|
+
# no `currency` is passed and the customer has no credit ledger, in which case
|
|
22
|
+
# every balance is `0`.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_accessor :currency
|
|
25
|
+
|
|
26
|
+
# The balance that expires on `next_expiry_date`. Null if `next_expiry_date` is
|
|
27
|
+
# null.
|
|
28
|
+
sig { returns(T.nilable(Float)) }
|
|
29
|
+
attr_accessor :next_expiry_balance
|
|
30
|
+
|
|
31
|
+
# The earliest `expiry_date` among active credit blocks. Null if none of them
|
|
32
|
+
# expire.
|
|
33
|
+
sig { returns(T.nilable(Time)) }
|
|
34
|
+
attr_accessor :next_expiry_date
|
|
35
|
+
|
|
36
|
+
# The total balance of credit blocks in `pending_payment` status. Not included in
|
|
37
|
+
# `balance` until the invoice that funds them is paid.
|
|
38
|
+
sig { returns(Float) }
|
|
39
|
+
attr_accessor :pending_payment_balance
|
|
40
|
+
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
balance: Float,
|
|
44
|
+
currency: T.nilable(String),
|
|
45
|
+
next_expiry_balance: T.nilable(Float),
|
|
46
|
+
next_expiry_date: T.nilable(Time),
|
|
47
|
+
pending_payment_balance: Float
|
|
48
|
+
).returns(T.attached_class)
|
|
49
|
+
end
|
|
50
|
+
def self.new(
|
|
51
|
+
# The customer's available credit balance: the sum of `balance` across their
|
|
52
|
+
# `active` credit blocks.
|
|
53
|
+
balance:,
|
|
54
|
+
# The currency or custom pricing unit the balances are denominated in. Null when
|
|
55
|
+
# no `currency` is passed and the customer has no credit ledger, in which case
|
|
56
|
+
# every balance is `0`.
|
|
57
|
+
currency:,
|
|
58
|
+
# The balance that expires on `next_expiry_date`. Null if `next_expiry_date` is
|
|
59
|
+
# null.
|
|
60
|
+
next_expiry_balance:,
|
|
61
|
+
# The earliest `expiry_date` among active credit blocks. Null if none of them
|
|
62
|
+
# expire.
|
|
63
|
+
next_expiry_date:,
|
|
64
|
+
# The total balance of credit blocks in `pending_payment` status. Not included in
|
|
65
|
+
# `balance` until the invoice that funds them is paid.
|
|
66
|
+
pending_payment_balance:
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
sig do
|
|
71
|
+
override.returns(
|
|
72
|
+
{
|
|
73
|
+
balance: Float,
|
|
74
|
+
currency: T.nilable(String),
|
|
75
|
+
next_expiry_balance: T.nilable(Float),
|
|
76
|
+
next_expiry_date: T.nilable(Time),
|
|
77
|
+
pending_payment_balance: Float
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
def to_hash
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
data/rbi/orb/models/invoice.rbi
CHANGED
|
@@ -330,6 +330,18 @@ module Orb
|
|
|
330
330
|
sig { returns(T.nilable(Time)) }
|
|
331
331
|
attr_accessor :scheduled_issue_at
|
|
332
332
|
|
|
333
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
334
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
335
|
+
# line items.
|
|
336
|
+
sig { returns(T.nilable(Time)) }
|
|
337
|
+
attr_accessor :service_period_end
|
|
338
|
+
|
|
339
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
340
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
341
|
+
# line items.
|
|
342
|
+
sig { returns(T.nilable(Time)) }
|
|
343
|
+
attr_accessor :service_period_start
|
|
344
|
+
|
|
333
345
|
sig { returns(T.nilable(Orb::Address)) }
|
|
334
346
|
attr_reader :shipping_address
|
|
335
347
|
|
|
@@ -422,6 +434,8 @@ module Orb
|
|
|
422
434
|
payment_received_at: T.nilable(Time),
|
|
423
435
|
payment_started_at: T.nilable(Time),
|
|
424
436
|
scheduled_issue_at: T.nilable(Time),
|
|
437
|
+
service_period_end: T.nilable(Time),
|
|
438
|
+
service_period_start: T.nilable(Time),
|
|
425
439
|
shipping_address: T.nilable(Orb::Address::OrHash),
|
|
426
440
|
status: Orb::Invoice::Status::OrSymbol,
|
|
427
441
|
subscription: T.nilable(Orb::SubscriptionMinified::OrHash),
|
|
@@ -668,6 +682,14 @@ module Orb
|
|
|
668
682
|
# If the invoice is in draft, this timestamp will reflect when the invoice is
|
|
669
683
|
# scheduled to be issued.
|
|
670
684
|
scheduled_issue_at:,
|
|
685
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
686
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
687
|
+
# line items.
|
|
688
|
+
service_period_end:,
|
|
689
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
690
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
691
|
+
# line items.
|
|
692
|
+
service_period_start:,
|
|
671
693
|
shipping_address:,
|
|
672
694
|
status:,
|
|
673
695
|
subscription:,
|
|
@@ -727,6 +749,8 @@ module Orb
|
|
|
727
749
|
payment_received_at: T.nilable(Time),
|
|
728
750
|
payment_started_at: T.nilable(Time),
|
|
729
751
|
scheduled_issue_at: T.nilable(Time),
|
|
752
|
+
service_period_end: T.nilable(Time),
|
|
753
|
+
service_period_start: T.nilable(Time),
|
|
730
754
|
shipping_address: T.nilable(Orb::Address),
|
|
731
755
|
status: Orb::Invoice::Status::TaggedSymbol,
|
|
732
756
|
subscription: T.nilable(Orb::SubscriptionMinified),
|
|
@@ -355,6 +355,18 @@ module Orb
|
|
|
355
355
|
sig { returns(T.nilable(Time)) }
|
|
356
356
|
attr_accessor :scheduled_issue_at
|
|
357
357
|
|
|
358
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
359
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
360
|
+
# line items.
|
|
361
|
+
sig { returns(T.nilable(Time)) }
|
|
362
|
+
attr_accessor :service_period_end
|
|
363
|
+
|
|
364
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
365
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
366
|
+
# line items.
|
|
367
|
+
sig { returns(T.nilable(Time)) }
|
|
368
|
+
attr_accessor :service_period_start
|
|
369
|
+
|
|
358
370
|
sig { returns(T.nilable(Orb::Address)) }
|
|
359
371
|
attr_reader :shipping_address
|
|
360
372
|
|
|
@@ -460,6 +472,8 @@ module Orb
|
|
|
460
472
|
payment_received_at: T.nilable(Time),
|
|
461
473
|
payment_started_at: T.nilable(Time),
|
|
462
474
|
scheduled_issue_at: T.nilable(Time),
|
|
475
|
+
service_period_end: T.nilable(Time),
|
|
476
|
+
service_period_start: T.nilable(Time),
|
|
463
477
|
shipping_address: T.nilable(Orb::Address::OrHash),
|
|
464
478
|
status: Orb::Models::InvoiceFetchUpcomingResponse::Status::OrSymbol,
|
|
465
479
|
subscription: T.nilable(Orb::SubscriptionMinified::OrHash),
|
|
@@ -705,6 +719,14 @@ module Orb
|
|
|
705
719
|
# If the invoice is in draft, this timestamp will reflect when the invoice is
|
|
706
720
|
# scheduled to be issued.
|
|
707
721
|
scheduled_issue_at:,
|
|
722
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
723
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
724
|
+
# line items.
|
|
725
|
+
service_period_end:,
|
|
726
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
727
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
728
|
+
# line items.
|
|
729
|
+
service_period_start:,
|
|
708
730
|
shipping_address:,
|
|
709
731
|
status:,
|
|
710
732
|
subscription:,
|
|
@@ -774,6 +796,8 @@ module Orb
|
|
|
774
796
|
payment_received_at: T.nilable(Time),
|
|
775
797
|
payment_started_at: T.nilable(Time),
|
|
776
798
|
scheduled_issue_at: T.nilable(Time),
|
|
799
|
+
service_period_end: T.nilable(Time),
|
|
800
|
+
service_period_start: T.nilable(Time),
|
|
777
801
|
shipping_address: T.nilable(Orb::Address),
|
|
778
802
|
status:
|
|
779
803
|
Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol,
|
|
@@ -319,6 +319,18 @@ module Orb
|
|
|
319
319
|
sig { returns(T.nilable(Time)) }
|
|
320
320
|
attr_accessor :scheduled_issue_at
|
|
321
321
|
|
|
322
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
323
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
324
|
+
# line items.
|
|
325
|
+
sig { returns(T.nilable(Time)) }
|
|
326
|
+
attr_accessor :service_period_end
|
|
327
|
+
|
|
328
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
329
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
330
|
+
# line items.
|
|
331
|
+
sig { returns(T.nilable(Time)) }
|
|
332
|
+
attr_accessor :service_period_start
|
|
333
|
+
|
|
322
334
|
sig { returns(T.nilable(Orb::Address)) }
|
|
323
335
|
attr_reader :shipping_address
|
|
324
336
|
|
|
@@ -400,6 +412,8 @@ module Orb
|
|
|
400
412
|
payment_received_at: T.nilable(Time),
|
|
401
413
|
payment_started_at: T.nilable(Time),
|
|
402
414
|
scheduled_issue_at: T.nilable(Time),
|
|
415
|
+
service_period_end: T.nilable(Time),
|
|
416
|
+
service_period_start: T.nilable(Time),
|
|
403
417
|
shipping_address: T.nilable(Orb::Address::OrHash),
|
|
404
418
|
status: Orb::Models::InvoiceIssueSummaryResponse::Status::OrSymbol,
|
|
405
419
|
subscription: T.nilable(Orb::SubscriptionMinified::OrHash),
|
|
@@ -629,6 +643,14 @@ module Orb
|
|
|
629
643
|
# If the invoice is in draft, this timestamp will reflect when the invoice is
|
|
630
644
|
# scheduled to be issued.
|
|
631
645
|
scheduled_issue_at:,
|
|
646
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
647
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
648
|
+
# line items.
|
|
649
|
+
service_period_end:,
|
|
650
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
651
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
652
|
+
# line items.
|
|
653
|
+
service_period_start:,
|
|
632
654
|
shipping_address:,
|
|
633
655
|
status:,
|
|
634
656
|
subscription:,
|
|
@@ -686,6 +708,8 @@ module Orb
|
|
|
686
708
|
payment_received_at: T.nilable(Time),
|
|
687
709
|
payment_started_at: T.nilable(Time),
|
|
688
710
|
scheduled_issue_at: T.nilable(Time),
|
|
711
|
+
service_period_end: T.nilable(Time),
|
|
712
|
+
service_period_start: T.nilable(Time),
|
|
689
713
|
shipping_address: T.nilable(Orb::Address),
|
|
690
714
|
status:
|
|
691
715
|
Orb::Models::InvoiceIssueSummaryResponse::Status::TaggedSymbol,
|
|
@@ -422,6 +422,18 @@ module Orb
|
|
|
422
422
|
sig { returns(T.nilable(Time)) }
|
|
423
423
|
attr_accessor :scheduled_issue_at
|
|
424
424
|
|
|
425
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
426
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
427
|
+
# line items.
|
|
428
|
+
sig { returns(T.nilable(Time)) }
|
|
429
|
+
attr_accessor :service_period_end
|
|
430
|
+
|
|
431
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
432
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
433
|
+
# line items.
|
|
434
|
+
sig { returns(T.nilable(Time)) }
|
|
435
|
+
attr_accessor :service_period_start
|
|
436
|
+
|
|
425
437
|
sig { returns(T.nilable(Orb::Address)) }
|
|
426
438
|
attr_reader :shipping_address
|
|
427
439
|
|
|
@@ -507,6 +519,8 @@ module Orb
|
|
|
507
519
|
payment_received_at: T.nilable(Time),
|
|
508
520
|
payment_started_at: T.nilable(Time),
|
|
509
521
|
scheduled_issue_at: T.nilable(Time),
|
|
522
|
+
service_period_end: T.nilable(Time),
|
|
523
|
+
service_period_start: T.nilable(Time),
|
|
510
524
|
shipping_address: T.nilable(Orb::Address::OrHash),
|
|
511
525
|
status:
|
|
512
526
|
Orb::InvoiceIssuedSummaryWebhookEvent::Invoice::Status::OrSymbol,
|
|
@@ -737,6 +751,14 @@ module Orb
|
|
|
737
751
|
# If the invoice is in draft, this timestamp will reflect when the invoice is
|
|
738
752
|
# scheduled to be issued.
|
|
739
753
|
scheduled_issue_at:,
|
|
754
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
755
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
756
|
+
# line items.
|
|
757
|
+
service_period_end:,
|
|
758
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
759
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
760
|
+
# line items.
|
|
761
|
+
service_period_start:,
|
|
740
762
|
shipping_address:,
|
|
741
763
|
status:,
|
|
742
764
|
subscription:,
|
|
@@ -796,6 +818,8 @@ module Orb
|
|
|
796
818
|
payment_received_at: T.nilable(Time),
|
|
797
819
|
payment_started_at: T.nilable(Time),
|
|
798
820
|
scheduled_issue_at: T.nilable(Time),
|
|
821
|
+
service_period_end: T.nilable(Time),
|
|
822
|
+
service_period_start: T.nilable(Time),
|
|
799
823
|
shipping_address: T.nilable(Orb::Address),
|
|
800
824
|
status:
|
|
801
825
|
Orb::InvoiceIssuedSummaryWebhookEvent::Invoice::Status::TaggedSymbol,
|
|
@@ -316,6 +316,18 @@ module Orb
|
|
|
316
316
|
sig { returns(T.nilable(Time)) }
|
|
317
317
|
attr_accessor :scheduled_issue_at
|
|
318
318
|
|
|
319
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
320
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
321
|
+
# line items.
|
|
322
|
+
sig { returns(T.nilable(Time)) }
|
|
323
|
+
attr_accessor :service_period_end
|
|
324
|
+
|
|
325
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
326
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
327
|
+
# line items.
|
|
328
|
+
sig { returns(T.nilable(Time)) }
|
|
329
|
+
attr_accessor :service_period_start
|
|
330
|
+
|
|
319
331
|
sig { returns(T.nilable(Orb::Address)) }
|
|
320
332
|
attr_reader :shipping_address
|
|
321
333
|
|
|
@@ -397,6 +409,8 @@ module Orb
|
|
|
397
409
|
payment_received_at: T.nilable(Time),
|
|
398
410
|
payment_started_at: T.nilable(Time),
|
|
399
411
|
scheduled_issue_at: T.nilable(Time),
|
|
412
|
+
service_period_end: T.nilable(Time),
|
|
413
|
+
service_period_start: T.nilable(Time),
|
|
400
414
|
shipping_address: T.nilable(Orb::Address::OrHash),
|
|
401
415
|
status: Orb::Models::InvoiceListSummaryResponse::Status::OrSymbol,
|
|
402
416
|
subscription: T.nilable(Orb::SubscriptionMinified::OrHash),
|
|
@@ -626,6 +640,14 @@ module Orb
|
|
|
626
640
|
# If the invoice is in draft, this timestamp will reflect when the invoice is
|
|
627
641
|
# scheduled to be issued.
|
|
628
642
|
scheduled_issue_at:,
|
|
643
|
+
# The latest `end_date` of the invoice's line items, including any line items
|
|
644
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
645
|
+
# line items.
|
|
646
|
+
service_period_end:,
|
|
647
|
+
# The earliest `start_date` of the invoice's line items, including any line items
|
|
648
|
+
# hidden because they have zero quantity. This is `null` when the invoice has no
|
|
649
|
+
# line items.
|
|
650
|
+
service_period_start:,
|
|
629
651
|
shipping_address:,
|
|
630
652
|
status:,
|
|
631
653
|
subscription:,
|
|
@@ -681,6 +703,8 @@ module Orb
|
|
|
681
703
|
payment_received_at: T.nilable(Time),
|
|
682
704
|
payment_started_at: T.nilable(Time),
|
|
683
705
|
scheduled_issue_at: T.nilable(Time),
|
|
706
|
+
service_period_end: T.nilable(Time),
|
|
707
|
+
service_period_start: T.nilable(Time),
|
|
684
708
|
shipping_address: T.nilable(Orb::Address),
|
|
685
709
|
status:
|
|
686
710
|
Orb::Models::InvoiceListSummaryResponse::Status::TaggedSymbol,
|