orb-billing 1.34.0 → 1.36.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 +25 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +4 -0
- data/lib/orb/models/backfill_reflected_webhook_event.rb +180 -0
- data/lib/orb/models/backfill_reverted_webhook_event.rb +180 -0
- data/lib/orb/models/billable_metric_edited_webhook_event.rb +104 -0
- data/lib/orb/models/credit_block_accounting_sync_failed_webhook_event.rb +499 -0
- data/lib/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rb +494 -0
- data/lib/orb/models/credit_note_accounting_sync_failed_webhook_event.rb +161 -0
- data/lib/orb/models/credit_note_accounting_sync_succeeded_webhook_event.rb +155 -0
- data/lib/orb/models/credit_note_issued_webhook_event.rb +65 -0
- data/lib/orb/models/credit_note_marked_as_void_webhook_event.rb +65 -0
- data/lib/orb/models/customer_accounting_sync_failed_webhook_event.rb +171 -0
- data/lib/orb/models/customer_accounting_sync_succeeded_webhook_event.rb +165 -0
- data/lib/orb/models/customer_balance_transaction_created_webhook_event.rb +212 -0
- data/lib/orb/models/customer_created_webhook_event.rb +81 -0
- data/lib/orb/models/customer_credit_balance_depleted_webhook_event.rb +560 -0
- data/lib/orb/models/customer_credit_balance_dropped_webhook_event.rb +566 -0
- data/lib/orb/models/customer_credit_balance_recovered_webhook_event.rb +560 -0
- data/lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb +474 -0
- data/lib/orb/models/customer_edited_webhook_event.rb +344 -0
- data/lib/orb/models/data_exports_transfer_error_webhook_event.rb +100 -0
- data/lib/orb/models/data_exports_transfer_success_webhook_event.rb +94 -0
- data/lib/orb/models/event_unmatched_event_webhook_event.rb +105 -0
- data/lib/orb/models/ingestion_unmatched_customer_ids_webhook_event.rb +64 -0
- data/lib/orb/models/invoice_accounting_sync_failed_webhook_event.rb +164 -0
- data/lib/orb/models/invoice_accounting_sync_succeeded_webhook_event.rb +158 -0
- data/lib/orb/models/invoice_automation_schedule_step_executed_webhook_event.rb +338 -0
- data/lib/orb/models/invoice_cost_data_exported_webhook_event.rb +83 -0
- data/lib/orb/models/invoice_due_date_recalculation_canceled_webhook_event.rb +70 -0
- data/lib/orb/models/invoice_due_date_recalculation_completed_webhook_event.rb +70 -0
- data/lib/orb/models/invoice_due_date_recalculation_started_webhook_event.rb +64 -0
- data/lib/orb/models/invoice_dunning_schedule_created_webhook_event.rb +186 -0
- data/lib/orb/models/invoice_dunning_schedule_ended_webhook_event.rb +180 -0
- data/lib/orb/models/invoice_dunning_schedule_reset_webhook_event.rb +184 -0
- data/lib/orb/models/invoice_dunning_schedule_step_executed_webhook_event.rb +133 -0
- data/lib/orb/models/invoice_edited_webhook_event.rb +550 -0
- data/lib/orb/models/invoice_invoice_date_elapsed_webhook_event.rb +120 -0
- data/lib/orb/models/invoice_issue_failed_webhook_event.rb +79 -0
- data/lib/orb/models/invoice_issued_summary_webhook_event.rb +841 -0
- data/lib/orb/models/invoice_issued_webhook_event.rb +79 -0
- data/lib/orb/models/invoice_manually_marked_as_paid_webhook_event.rb +91 -0
- data/lib/orb/models/invoice_manually_marked_as_void_webhook_event.rb +68 -0
- data/lib/orb/models/invoice_payment_failed_webhook_event.rb +92 -0
- data/lib/orb/models/invoice_payment_processing_webhook_event.rb +85 -0
- data/lib/orb/models/invoice_payment_succeeded_webhook_event.rb +101 -0
- data/lib/orb/models/invoice_sync_failed_webhook_event.rb +85 -0
- data/lib/orb/models/invoice_sync_succeeded_webhook_event.rb +85 -0
- data/lib/orb/models/invoice_undo_mark_as_paid_webhook_event.rb +68 -0
- data/lib/orb/models/metric_events_dropped_by_watermark_webhook_event.rb +98 -0
- data/lib/orb/models/payment_method_created_webhook_event.rb +156 -0
- data/lib/orb/models/payment_method_deleted_webhook_event.rb +156 -0
- data/lib/orb/models/plan_default_version_set_webhook_event.rb +108 -0
- data/lib/orb/models/plan_version_created_webhook_event.rb +108 -0
- data/lib/orb/models/price_edited_webhook_event.rb +105 -0
- data/lib/orb/models/resource_event_test_webhook_event.rb +64 -0
- data/lib/orb/models/sales_order_accounting_sync_failed_webhook_event.rb +164 -0
- data/lib/orb/models/sales_order_accounting_sync_succeeded_webhook_event.rb +158 -0
- data/lib/orb/models/subscription_accounting_sync_failed_webhook_event.rb +178 -0
- data/lib/orb/models/subscription_accounting_sync_succeeded_webhook_event.rb +172 -0
- data/lib/orb/models/subscription_alert_disabled_webhook_event.rb +624 -0
- data/lib/orb/models/subscription_cancellation_scheduled_webhook_event.rb +93 -0
- data/lib/orb/models/subscription_cancellation_unscheduled_webhook_event.rb +93 -0
- data/lib/orb/models/subscription_cost_exceeded_webhook_event.rb +540 -0
- data/lib/orb/models/subscription_created_webhook_event.rb +82 -0
- data/lib/orb/models/subscription_edited_webhook_event.rb +134 -0
- data/lib/orb/models/subscription_ended_webhook_event.rb +82 -0
- data/lib/orb/models/subscription_fixed_fee_quantity_updated_webhook_event.rb +111 -0
- data/lib/orb/models/subscription_grouped_cost_exceeded_webhook_event.rb +655 -0
- data/lib/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rb +191 -0
- data/lib/orb/models/subscription_license_allocation_reset_webhook_event.rb +214 -0
- data/lib/orb/models/subscription_license_balance_threshold_reached_webhook_event.rb +652 -0
- data/lib/orb/models/subscription_plan_change_scheduled_webhook_event.rb +105 -0
- data/lib/orb/models/subscription_plan_changed_webhook_event.rb +93 -0
- data/lib/orb/models/subscription_plan_version_change_scheduled_webhook_event.rb +106 -0
- data/lib/orb/models/subscription_plan_version_changed_webhook_event.rb +105 -0
- data/lib/orb/models/subscription_spend_exceeded_webhook_event.rb +541 -0
- data/lib/orb/models/subscription_started_webhook_event.rb +82 -0
- data/lib/orb/models/subscription_trial_ended_webhook_event.rb +82 -0
- data/lib/orb/models/subscription_usage_exceeded_webhook_event.rb +548 -0
- data/lib/orb/models/transaction_accounting_sync_failed_webhook_event.rb +236 -0
- data/lib/orb/models/transaction_accounting_sync_succeeded_webhook_event.rb +232 -0
- data/lib/orb/models/unwrap_webhook_event.rb +250 -0
- data/lib/orb/models/webhook_unwrap_params.rb +14 -0
- data/lib/orb/models.rb +180 -0
- data/lib/orb/resources/subscriptions.rb +13 -0
- data/lib/orb/resources/webhooks.rb +22 -0
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +82 -0
- data/rbi/orb/client.rbi +3 -0
- data/rbi/orb/models/backfill_reflected_webhook_event.rbi +274 -0
- data/rbi/orb/models/backfill_reverted_webhook_event.rbi +271 -0
- data/rbi/orb/models/billable_metric_edited_webhook_event.rbi +198 -0
- data/rbi/orb/models/credit_block_accounting_sync_failed_webhook_event.rbi +1039 -0
- data/rbi/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbi +1034 -0
- data/rbi/orb/models/credit_note_accounting_sync_failed_webhook_event.rbi +315 -0
- data/rbi/orb/models/credit_note_accounting_sync_succeeded_webhook_event.rbi +310 -0
- data/rbi/orb/models/credit_note_issued_webhook_event.rbi +98 -0
- data/rbi/orb/models/credit_note_marked_as_void_webhook_event.rbi +102 -0
- data/rbi/orb/models/customer_accounting_sync_failed_webhook_event.rbi +339 -0
- data/rbi/orb/models/customer_accounting_sync_succeeded_webhook_event.rbi +335 -0
- data/rbi/orb/models/customer_balance_transaction_created_webhook_event.rbi +437 -0
- data/rbi/orb/models/customer_created_webhook_event.rbi +128 -0
- data/rbi/orb/models/customer_credit_balance_depleted_webhook_event.rbi +1091 -0
- data/rbi/orb/models/customer_credit_balance_dropped_webhook_event.rbi +1096 -0
- data/rbi/orb/models/customer_credit_balance_recovered_webhook_event.rbi +1091 -0
- data/rbi/orb/models/customer_credit_ledger_incremented_webhook_event.rbi +987 -0
- data/rbi/orb/models/customer_edited_webhook_event.rbi +599 -0
- data/rbi/orb/models/data_exports_transfer_error_webhook_event.rbi +170 -0
- data/rbi/orb/models/data_exports_transfer_success_webhook_event.rbi +165 -0
- data/rbi/orb/models/event_unmatched_event_webhook_event.rbi +193 -0
- data/rbi/orb/models/ingestion_unmatched_customer_ids_webhook_event.rbi +132 -0
- data/rbi/orb/models/invoice_accounting_sync_failed_webhook_event.rbi +319 -0
- data/rbi/orb/models/invoice_accounting_sync_succeeded_webhook_event.rbi +312 -0
- data/rbi/orb/models/invoice_automation_schedule_step_executed_webhook_event.rbi +614 -0
- data/rbi/orb/models/invoice_cost_data_exported_webhook_event.rbi +144 -0
- data/rbi/orb/models/invoice_due_date_recalculation_canceled_webhook_event.rbi +139 -0
- data/rbi/orb/models/invoice_due_date_recalculation_completed_webhook_event.rbi +139 -0
- data/rbi/orb/models/invoice_due_date_recalculation_started_webhook_event.rbi +132 -0
- data/rbi/orb/models/invoice_dunning_schedule_created_webhook_event.rbi +331 -0
- data/rbi/orb/models/invoice_dunning_schedule_ended_webhook_event.rbi +324 -0
- data/rbi/orb/models/invoice_dunning_schedule_reset_webhook_event.rbi +329 -0
- data/rbi/orb/models/invoice_dunning_schedule_step_executed_webhook_event.rbi +250 -0
- data/rbi/orb/models/invoice_edited_webhook_event.rbi +942 -0
- data/rbi/orb/models/invoice_invoice_date_elapsed_webhook_event.rbi +251 -0
- data/rbi/orb/models/invoice_issue_failed_webhook_event.rbi +132 -0
- data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +1432 -0
- data/rbi/orb/models/invoice_issued_webhook_event.rbi +134 -0
- data/rbi/orb/models/invoice_manually_marked_as_paid_webhook_event.rbi +165 -0
- data/rbi/orb/models/invoice_manually_marked_as_void_webhook_event.rbi +114 -0
- data/rbi/orb/models/invoice_payment_failed_webhook_event.rbi +157 -0
- data/rbi/orb/models/invoice_payment_processing_webhook_event.rbi +156 -0
- data/rbi/orb/models/invoice_payment_succeeded_webhook_event.rbi +175 -0
- data/rbi/orb/models/invoice_sync_failed_webhook_event.rbi +147 -0
- data/rbi/orb/models/invoice_sync_succeeded_webhook_event.rbi +147 -0
- data/rbi/orb/models/invoice_undo_mark_as_paid_webhook_event.rbi +106 -0
- data/rbi/orb/models/metric_events_dropped_by_watermark_webhook_event.rbi +167 -0
- data/rbi/orb/models/payment_method_created_webhook_event.rbi +259 -0
- data/rbi/orb/models/payment_method_deleted_webhook_event.rbi +259 -0
- data/rbi/orb/models/plan_default_version_set_webhook_event.rbi +196 -0
- data/rbi/orb/models/plan_version_created_webhook_event.rbi +190 -0
- data/rbi/orb/models/price_edited_webhook_event.rbi +235 -0
- data/rbi/orb/models/resource_event_test_webhook_event.rbi +116 -0
- data/rbi/orb/models/sales_order_accounting_sync_failed_webhook_event.rbi +321 -0
- data/rbi/orb/models/sales_order_accounting_sync_succeeded_webhook_event.rbi +316 -0
- data/rbi/orb/models/subscription_accounting_sync_failed_webhook_event.rbi +353 -0
- data/rbi/orb/models/subscription_accounting_sync_succeeded_webhook_event.rbi +346 -0
- data/rbi/orb/models/subscription_alert_disabled_webhook_event.rbi +1232 -0
- data/rbi/orb/models/subscription_cancellation_scheduled_webhook_event.rbi +179 -0
- data/rbi/orb/models/subscription_cancellation_unscheduled_webhook_event.rbi +183 -0
- data/rbi/orb/models/subscription_cost_exceeded_webhook_event.rbi +1034 -0
- data/rbi/orb/models/subscription_created_webhook_event.rbi +132 -0
- data/rbi/orb/models/subscription_edited_webhook_event.rbi +247 -0
- data/rbi/orb/models/subscription_ended_webhook_event.rbi +132 -0
- data/rbi/orb/models/subscription_fixed_fee_quantity_updated_webhook_event.rbi +206 -0
- data/rbi/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbi +1262 -0
- data/rbi/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbi +374 -0
- data/rbi/orb/models/subscription_license_allocation_reset_webhook_event.rbi +421 -0
- data/rbi/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbi +1265 -0
- data/rbi/orb/models/subscription_plan_change_scheduled_webhook_event.rbi +198 -0
- data/rbi/orb/models/subscription_plan_changed_webhook_event.rbi +169 -0
- data/rbi/orb/models/subscription_plan_version_change_scheduled_webhook_event.rbi +205 -0
- data/rbi/orb/models/subscription_plan_version_changed_webhook_event.rbi +199 -0
- data/rbi/orb/models/subscription_spend_exceeded_webhook_event.rbi +1035 -0
- data/rbi/orb/models/subscription_started_webhook_event.rbi +132 -0
- data/rbi/orb/models/subscription_trial_ended_webhook_event.rbi +136 -0
- data/rbi/orb/models/subscription_usage_exceeded_webhook_event.rbi +1041 -0
- data/rbi/orb/models/transaction_accounting_sync_failed_webhook_event.rbi +455 -0
- data/rbi/orb/models/transaction_accounting_sync_succeeded_webhook_event.rbi +449 -0
- data/rbi/orb/models/unwrap_webhook_event.rbi +99 -0
- data/rbi/orb/models/webhook_unwrap_params.rbi +25 -0
- data/rbi/orb/models.rbi +224 -0
- data/rbi/orb/resources/subscriptions.rbi +13 -0
- data/rbi/orb/resources/webhooks.rbi +103 -0
- data/sig/orb/client.rbs +2 -0
- data/sig/orb/models/backfill_reflected_webhook_event.rbs +130 -0
- data/sig/orb/models/backfill_reverted_webhook_event.rbs +130 -0
- data/sig/orb/models/billable_metric_edited_webhook_event.rbs +94 -0
- data/sig/orb/models/credit_block_accounting_sync_failed_webhook_event.rbs +412 -0
- data/sig/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbs +407 -0
- data/sig/orb/models/credit_note_accounting_sync_failed_webhook_event.rbs +147 -0
- data/sig/orb/models/credit_note_accounting_sync_succeeded_webhook_event.rbs +142 -0
- data/sig/orb/models/credit_note_issued_webhook_event.rbs +50 -0
- data/sig/orb/models/credit_note_marked_as_void_webhook_event.rbs +50 -0
- data/sig/orb/models/customer_accounting_sync_failed_webhook_event.rbs +142 -0
- data/sig/orb/models/customer_accounting_sync_succeeded_webhook_event.rbs +137 -0
- data/sig/orb/models/customer_balance_transaction_created_webhook_event.rbs +171 -0
- data/sig/orb/models/customer_created_webhook_event.rbs +50 -0
- data/sig/orb/models/customer_credit_balance_depleted_webhook_event.rbs +374 -0
- data/sig/orb/models/customer_credit_balance_dropped_webhook_event.rbs +379 -0
- data/sig/orb/models/customer_credit_balance_recovered_webhook_event.rbs +374 -0
- data/sig/orb/models/customer_credit_ledger_incremented_webhook_event.rbs +364 -0
- data/sig/orb/models/customer_edited_webhook_event.rbs +139 -0
- data/sig/orb/models/data_exports_transfer_error_webhook_event.rbs +92 -0
- data/sig/orb/models/data_exports_transfer_success_webhook_event.rbs +87 -0
- data/sig/orb/models/event_unmatched_event_webhook_event.rbs +102 -0
- data/sig/orb/models/ingestion_unmatched_customer_ids_webhook_event.rbs +55 -0
- data/sig/orb/models/invoice_accounting_sync_failed_webhook_event.rbs +147 -0
- data/sig/orb/models/invoice_accounting_sync_succeeded_webhook_event.rbs +142 -0
- data/sig/orb/models/invoice_automation_schedule_step_executed_webhook_event.rbs +313 -0
- data/sig/orb/models/invoice_cost_data_exported_webhook_event.rbs +73 -0
- data/sig/orb/models/invoice_due_date_recalculation_canceled_webhook_event.rbs +57 -0
- data/sig/orb/models/invoice_due_date_recalculation_completed_webhook_event.rbs +57 -0
- data/sig/orb/models/invoice_due_date_recalculation_started_webhook_event.rbs +55 -0
- data/sig/orb/models/invoice_dunning_schedule_created_webhook_event.rbs +171 -0
- data/sig/orb/models/invoice_dunning_schedule_ended_webhook_event.rbs +166 -0
- data/sig/orb/models/invoice_dunning_schedule_reset_webhook_event.rbs +156 -0
- data/sig/orb/models/invoice_dunning_schedule_step_executed_webhook_event.rbs +119 -0
- data/sig/orb/models/invoice_edited_webhook_event.rbs +388 -0
- data/sig/orb/models/invoice_invoice_date_elapsed_webhook_event.rbs +111 -0
- data/sig/orb/models/invoice_issue_failed_webhook_event.rbs +60 -0
- data/sig/orb/models/invoice_issued_summary_webhook_event.rbs +504 -0
- data/sig/orb/models/invoice_issued_webhook_event.rbs +60 -0
- data/sig/orb/models/invoice_manually_marked_as_paid_webhook_event.rbs +73 -0
- data/sig/orb/models/invoice_manually_marked_as_void_webhook_event.rbs +50 -0
- data/sig/orb/models/invoice_payment_failed_webhook_event.rbs +77 -0
- data/sig/orb/models/invoice_payment_processing_webhook_event.rbs +71 -0
- data/sig/orb/models/invoice_payment_succeeded_webhook_event.rbs +82 -0
- data/sig/orb/models/invoice_sync_failed_webhook_event.rbs +69 -0
- data/sig/orb/models/invoice_sync_succeeded_webhook_event.rbs +69 -0
- data/sig/orb/models/invoice_undo_mark_as_paid_webhook_event.rbs +50 -0
- data/sig/orb/models/metric_events_dropped_by_watermark_webhook_event.rbs +82 -0
- data/sig/orb/models/payment_method_created_webhook_event.rbs +112 -0
- data/sig/orb/models/payment_method_deleted_webhook_event.rbs +112 -0
- data/sig/orb/models/plan_default_version_set_webhook_event.rbs +94 -0
- data/sig/orb/models/plan_version_created_webhook_event.rbs +91 -0
- data/sig/orb/models/price_edited_webhook_event.rbs +77 -0
- data/sig/orb/models/resource_event_test_webhook_event.rbs +57 -0
- data/sig/orb/models/sales_order_accounting_sync_failed_webhook_event.rbs +147 -0
- data/sig/orb/models/sales_order_accounting_sync_succeeded_webhook_event.rbs +142 -0
- data/sig/orb/models/subscription_accounting_sync_failed_webhook_event.rbs +147 -0
- data/sig/orb/models/subscription_accounting_sync_succeeded_webhook_event.rbs +142 -0
- data/sig/orb/models/subscription_alert_disabled_webhook_event.rbs +444 -0
- data/sig/orb/models/subscription_cancellation_scheduled_webhook_event.rbs +60 -0
- data/sig/orb/models/subscription_cancellation_unscheduled_webhook_event.rbs +60 -0
- data/sig/orb/models/subscription_cost_exceeded_webhook_event.rbs +362 -0
- data/sig/orb/models/subscription_created_webhook_event.rbs +50 -0
- data/sig/orb/models/subscription_edited_webhook_event.rbs +109 -0
- data/sig/orb/models/subscription_ended_webhook_event.rbs +50 -0
- data/sig/orb/models/subscription_fixed_fee_quantity_updated_webhook_event.rbs +82 -0
- data/sig/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbs +465 -0
- data/sig/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbs +158 -0
- data/sig/orb/models/subscription_license_allocation_reset_webhook_event.rbs +180 -0
- data/sig/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbs +460 -0
- data/sig/orb/models/subscription_plan_change_scheduled_webhook_event.rbs +73 -0
- data/sig/orb/models/subscription_plan_changed_webhook_event.rbs +60 -0
- data/sig/orb/models/subscription_plan_version_change_scheduled_webhook_event.rbs +77 -0
- data/sig/orb/models/subscription_plan_version_changed_webhook_event.rbs +77 -0
- data/sig/orb/models/subscription_spend_exceeded_webhook_event.rbs +362 -0
- data/sig/orb/models/subscription_started_webhook_event.rbs +50 -0
- data/sig/orb/models/subscription_trial_ended_webhook_event.rbs +50 -0
- data/sig/orb/models/subscription_usage_exceeded_webhook_event.rbs +367 -0
- data/sig/orb/models/transaction_accounting_sync_failed_webhook_event.rbs +205 -0
- data/sig/orb/models/transaction_accounting_sync_succeeded_webhook_event.rbs +200 -0
- data/sig/orb/models/unwrap_webhook_event.rbs +90 -0
- data/sig/orb/models/webhook_unwrap_params.rbs +14 -0
- data/sig/orb/models.rbs +162 -0
- data/sig/orb/resources/webhooks.rbs +89 -0
- metadata +248 -2
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class InvoiceEditedWebhookEvent < Orb::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
# The ID of this webhook event.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
# The time at which this event was created, to the second.
|
|
14
|
+
#
|
|
15
|
+
# @return [Time]
|
|
16
|
+
required :created_at, Time
|
|
17
|
+
|
|
18
|
+
# @!attribute invoice
|
|
19
|
+
# An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity,
|
|
20
|
+
# representing the request for payment for a single subscription. This includes a
|
|
21
|
+
# set of line items, which correspond to prices in the subscription's plan and can
|
|
22
|
+
# represent fixed recurring fees or usage-based fees. They are generated at the
|
|
23
|
+
# end of a billing period, or as the result of an action, such as a cancellation.
|
|
24
|
+
#
|
|
25
|
+
# @return [Orb::Models::Invoice]
|
|
26
|
+
required :invoice, -> { Orb::Invoice }
|
|
27
|
+
|
|
28
|
+
# @!attribute properties
|
|
29
|
+
#
|
|
30
|
+
# @return [Orb::Models::InvoiceEditedWebhookEvent::Properties]
|
|
31
|
+
required :properties, -> { Orb::InvoiceEditedWebhookEvent::Properties }
|
|
32
|
+
|
|
33
|
+
# @!attribute type
|
|
34
|
+
# The event this payload describes.
|
|
35
|
+
#
|
|
36
|
+
# @return [Symbol, Orb::Models::InvoiceEditedWebhookEvent::Type]
|
|
37
|
+
required :type, enum: -> { Orb::InvoiceEditedWebhookEvent::Type }
|
|
38
|
+
|
|
39
|
+
# @!method initialize(id:, created_at:, invoice:, properties:, type:)
|
|
40
|
+
# Some parameter documentations has been truncated, see
|
|
41
|
+
# {Orb::Models::InvoiceEditedWebhookEvent} for more details.
|
|
42
|
+
#
|
|
43
|
+
# Issued when a draft invoice has been edited.
|
|
44
|
+
#
|
|
45
|
+
# @param id [String] The ID of this webhook event.
|
|
46
|
+
#
|
|
47
|
+
# @param created_at [Time] The time at which this event was created, to the second.
|
|
48
|
+
#
|
|
49
|
+
# @param invoice [Orb::Models::Invoice] An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, represen
|
|
50
|
+
#
|
|
51
|
+
# @param properties [Orb::Models::InvoiceEditedWebhookEvent::Properties]
|
|
52
|
+
#
|
|
53
|
+
# @param type [Symbol, Orb::Models::InvoiceEditedWebhookEvent::Type] The event this payload describes.
|
|
54
|
+
|
|
55
|
+
# @see Orb::Models::InvoiceEditedWebhookEvent#properties
|
|
56
|
+
class Properties < Orb::Internal::Type::BaseModel
|
|
57
|
+
# @!attribute previous_attributes
|
|
58
|
+
# `due_date` is an ISO-8601 string rather than a datetime: the untyped message
|
|
59
|
+
# called `.isoformat()` on it, so it keeps microseconds where the webhook JSON
|
|
60
|
+
# provider would have truncated them.
|
|
61
|
+
#
|
|
62
|
+
# @return [Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes]
|
|
63
|
+
required :previous_attributes, -> { Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes }
|
|
64
|
+
|
|
65
|
+
# @!method initialize(previous_attributes:)
|
|
66
|
+
# Some parameter documentations has been truncated, see
|
|
67
|
+
# {Orb::Models::InvoiceEditedWebhookEvent::Properties} for more details.
|
|
68
|
+
#
|
|
69
|
+
# @param previous_attributes [Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes] `due_date` is an ISO-8601 string rather than a datetime: the untyped message cal
|
|
70
|
+
|
|
71
|
+
# @see Orb::Models::InvoiceEditedWebhookEvent::Properties#previous_attributes
|
|
72
|
+
class PreviousAttributes < Orb::Internal::Type::BaseModel
|
|
73
|
+
# @!attribute amount_due
|
|
74
|
+
#
|
|
75
|
+
# @return [String, nil]
|
|
76
|
+
optional :amount_due, String, nil?: true
|
|
77
|
+
|
|
78
|
+
# @!attribute discounts
|
|
79
|
+
#
|
|
80
|
+
# @return [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount, Orb::Models::InvoiceLevelDiscount::TieredPercentage>, nil]
|
|
81
|
+
optional :discounts,
|
|
82
|
+
-> {
|
|
83
|
+
Orb::Internal::Type::ArrayOf[union: Orb::InvoiceLevelDiscount]
|
|
84
|
+
},
|
|
85
|
+
nil?: true
|
|
86
|
+
|
|
87
|
+
# @!attribute due_date
|
|
88
|
+
#
|
|
89
|
+
# @return [String, nil]
|
|
90
|
+
optional :due_date, String, nil?: true
|
|
91
|
+
|
|
92
|
+
# @!attribute line_items
|
|
93
|
+
#
|
|
94
|
+
# @return [Array<Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem>, nil]
|
|
95
|
+
optional :line_items,
|
|
96
|
+
-> {
|
|
97
|
+
Orb::Internal::Type::ArrayOf[Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem]
|
|
98
|
+
},
|
|
99
|
+
nil?: true
|
|
100
|
+
|
|
101
|
+
# @!attribute maximum
|
|
102
|
+
#
|
|
103
|
+
# @return [Orb::Models::Maximum, nil]
|
|
104
|
+
optional :maximum, -> { Orb::Maximum }, nil?: true
|
|
105
|
+
|
|
106
|
+
# @!attribute metadata
|
|
107
|
+
#
|
|
108
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
109
|
+
optional :metadata, Orb::Internal::Type::HashOf[String], nil?: true
|
|
110
|
+
|
|
111
|
+
# @!attribute minimum
|
|
112
|
+
#
|
|
113
|
+
# @return [Orb::Models::Minimum, nil]
|
|
114
|
+
optional :minimum, -> { Orb::Minimum }, nil?: true
|
|
115
|
+
|
|
116
|
+
# @!attribute net_terms
|
|
117
|
+
#
|
|
118
|
+
# @return [Integer, nil]
|
|
119
|
+
optional :net_terms, Integer, nil?: true
|
|
120
|
+
|
|
121
|
+
# @!attribute subtotal
|
|
122
|
+
#
|
|
123
|
+
# @return [String, nil]
|
|
124
|
+
optional :subtotal, String, nil?: true
|
|
125
|
+
|
|
126
|
+
# @!attribute total
|
|
127
|
+
#
|
|
128
|
+
# @return [String, nil]
|
|
129
|
+
optional :total, String, nil?: true
|
|
130
|
+
|
|
131
|
+
# @!method initialize(amount_due: nil, discounts: nil, due_date: nil, line_items: nil, maximum: nil, metadata: nil, minimum: nil, net_terms: nil, subtotal: nil, total: nil)
|
|
132
|
+
# `due_date` is an ISO-8601 string rather than a datetime: the untyped message
|
|
133
|
+
# called `.isoformat()` on it, so it keeps microseconds where the webhook JSON
|
|
134
|
+
# provider would have truncated them.
|
|
135
|
+
#
|
|
136
|
+
# @param amount_due [String, nil]
|
|
137
|
+
# @param discounts [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount, Orb::Models::InvoiceLevelDiscount::TieredPercentage>, nil]
|
|
138
|
+
# @param due_date [String, nil]
|
|
139
|
+
# @param line_items [Array<Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem>, nil]
|
|
140
|
+
# @param maximum [Orb::Models::Maximum, nil]
|
|
141
|
+
# @param metadata [Hash{Symbol=>String}, nil]
|
|
142
|
+
# @param minimum [Orb::Models::Minimum, nil]
|
|
143
|
+
# @param net_terms [Integer, nil]
|
|
144
|
+
# @param subtotal [String, nil]
|
|
145
|
+
# @param total [String, nil]
|
|
146
|
+
|
|
147
|
+
class LineItem < Orb::Internal::Type::BaseModel
|
|
148
|
+
# @!attribute id
|
|
149
|
+
# A unique ID for this line item.
|
|
150
|
+
#
|
|
151
|
+
# @return [String]
|
|
152
|
+
required :id, String
|
|
153
|
+
|
|
154
|
+
# @!attribute adjusted_subtotal
|
|
155
|
+
# The line amount after any adjustments and before overage conversion, credits and
|
|
156
|
+
# partial invoicing.
|
|
157
|
+
#
|
|
158
|
+
# @return [String]
|
|
159
|
+
required :adjusted_subtotal, String
|
|
160
|
+
|
|
161
|
+
# @!attribute adjustments
|
|
162
|
+
# All adjustments applied to the line item in the order they were applied based on
|
|
163
|
+
# invoice calculations (ie. usage discounts -> amount discounts -> percentage
|
|
164
|
+
# discounts -> minimums -> maximums).
|
|
165
|
+
#
|
|
166
|
+
# @return [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>]
|
|
167
|
+
required :adjustments,
|
|
168
|
+
-> { Orb::Internal::Type::ArrayOf[union: Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment] }
|
|
169
|
+
|
|
170
|
+
# @!attribute amount
|
|
171
|
+
# The final amount for a line item after all adjustments and pre paid credits have
|
|
172
|
+
# been applied.
|
|
173
|
+
#
|
|
174
|
+
# @return [String]
|
|
175
|
+
required :amount, String
|
|
176
|
+
|
|
177
|
+
# @!attribute credits_applied
|
|
178
|
+
# The number of prepaid credits applied.
|
|
179
|
+
#
|
|
180
|
+
# @return [String]
|
|
181
|
+
required :credits_applied, String
|
|
182
|
+
|
|
183
|
+
# @!attribute end_date
|
|
184
|
+
# The end date of the range of time applied for this line item's price.
|
|
185
|
+
#
|
|
186
|
+
# @return [Time]
|
|
187
|
+
required :end_date, Time
|
|
188
|
+
|
|
189
|
+
# @!attribute filter
|
|
190
|
+
# An additional filter that was used to calculate the usage for this line item.
|
|
191
|
+
#
|
|
192
|
+
# @return [String, nil]
|
|
193
|
+
required :filter, String, nil?: true
|
|
194
|
+
|
|
195
|
+
# @!attribute grouping
|
|
196
|
+
# [DEPRECATED] For configured prices that are split by a grouping key, this will
|
|
197
|
+
# be populated with the key and a value. The `amount` and `subtotal` will be the
|
|
198
|
+
# values for this particular grouping.
|
|
199
|
+
#
|
|
200
|
+
# @return [String, nil]
|
|
201
|
+
required :grouping, String, nil?: true
|
|
202
|
+
|
|
203
|
+
# @!attribute name
|
|
204
|
+
# The name of the price associated with this line item.
|
|
205
|
+
#
|
|
206
|
+
# @return [String]
|
|
207
|
+
required :name, String
|
|
208
|
+
|
|
209
|
+
# @!attribute partially_invoiced_amount
|
|
210
|
+
# Any amount applied from a partial invoice
|
|
211
|
+
#
|
|
212
|
+
# @return [String]
|
|
213
|
+
required :partially_invoiced_amount, String
|
|
214
|
+
|
|
215
|
+
# @!attribute price
|
|
216
|
+
# The Price resource represents a price that can be billed on a subscription,
|
|
217
|
+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
|
|
218
|
+
# take a quantity and determine an amount to bill.
|
|
219
|
+
#
|
|
220
|
+
# Orb supports a few different pricing models out of the box. Each of these models
|
|
221
|
+
# is serialized differently in a given Price object. The model_type field
|
|
222
|
+
# determines the key for the configuration object that is present.
|
|
223
|
+
#
|
|
224
|
+
# For more on the types of prices, see
|
|
225
|
+
# [the core concepts documentation](/core-concepts#plan-and-price)
|
|
226
|
+
#
|
|
227
|
+
# @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::GroupedTieredMatrix, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredMatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput]
|
|
228
|
+
required :price, union: -> { Orb::Price }
|
|
229
|
+
|
|
230
|
+
# @!attribute quantity
|
|
231
|
+
# Either the fixed fee quantity or the usage during the service period.
|
|
232
|
+
#
|
|
233
|
+
# @return [Float]
|
|
234
|
+
required :quantity, Float
|
|
235
|
+
|
|
236
|
+
# @!attribute start_date
|
|
237
|
+
# The start date of the range of time applied for this line item's price.
|
|
238
|
+
#
|
|
239
|
+
# @return [Time]
|
|
240
|
+
required :start_date, Time
|
|
241
|
+
|
|
242
|
+
# @!attribute sub_line_items
|
|
243
|
+
# For complex pricing structures, the line item can be broken down further in
|
|
244
|
+
# `sub_line_items`.
|
|
245
|
+
#
|
|
246
|
+
# @return [Array<Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem>]
|
|
247
|
+
required :sub_line_items,
|
|
248
|
+
-> { Orb::Internal::Type::ArrayOf[union: Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::SubLineItem] }
|
|
249
|
+
|
|
250
|
+
# @!attribute subtotal
|
|
251
|
+
# The line amount before any adjustments.
|
|
252
|
+
#
|
|
253
|
+
# @return [String]
|
|
254
|
+
required :subtotal, String
|
|
255
|
+
|
|
256
|
+
# @!attribute tax_amounts
|
|
257
|
+
# An array of tax rates and their incurred tax amounts. Empty if no tax
|
|
258
|
+
# integration is configured.
|
|
259
|
+
#
|
|
260
|
+
# @return [Array<Orb::Models::TaxAmount>]
|
|
261
|
+
required :tax_amounts, -> { Orb::Internal::Type::ArrayOf[Orb::TaxAmount] }
|
|
262
|
+
|
|
263
|
+
# @!attribute usage_customer_ids
|
|
264
|
+
# A list of customer ids that were used to calculate the usage for this line item.
|
|
265
|
+
#
|
|
266
|
+
# @return [Array<String>, nil]
|
|
267
|
+
required :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
|
268
|
+
|
|
269
|
+
# @!method initialize(id:, adjusted_subtotal:, adjustments:, amount:, credits_applied:, end_date:, filter:, grouping:, name:, partially_invoiced_amount:, price:, quantity:, start_date:, sub_line_items:, subtotal:, tax_amounts:, usage_customer_ids:)
|
|
270
|
+
# Some parameter documentations has been truncated, see
|
|
271
|
+
# {Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem}
|
|
272
|
+
# for more details.
|
|
273
|
+
#
|
|
274
|
+
# @param id [String] A unique ID for this line item.
|
|
275
|
+
#
|
|
276
|
+
# @param adjusted_subtotal [String] The line amount after any adjustments and before overage conversion, credits and
|
|
277
|
+
#
|
|
278
|
+
# @param adjustments [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>] All adjustments applied to the line item in the order they were applied based on
|
|
279
|
+
#
|
|
280
|
+
# @param amount [String] The final amount for a line item after all adjustments and pre paid credits have
|
|
281
|
+
#
|
|
282
|
+
# @param credits_applied [String] The number of prepaid credits applied.
|
|
283
|
+
#
|
|
284
|
+
# @param end_date [Time] The end date of the range of time applied for this line item's price.
|
|
285
|
+
#
|
|
286
|
+
# @param filter [String, nil] An additional filter that was used to calculate the usage for this line item.
|
|
287
|
+
#
|
|
288
|
+
# @param grouping [String, nil] [DEPRECATED] For configured prices that are split by a grouping key, this will b
|
|
289
|
+
#
|
|
290
|
+
# @param name [String] The name of the price associated with this line item.
|
|
291
|
+
#
|
|
292
|
+
# @param partially_invoiced_amount [String] Any amount applied from a partial invoice
|
|
293
|
+
#
|
|
294
|
+
# @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::GroupedTieredMatrix, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredMatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu
|
|
295
|
+
#
|
|
296
|
+
# @param quantity [Float] Either the fixed fee quantity or the usage during the service period.
|
|
297
|
+
#
|
|
298
|
+
# @param start_date [Time] The start date of the range of time applied for this line item's price.
|
|
299
|
+
#
|
|
300
|
+
# @param sub_line_items [Array<Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem>] For complex pricing structures, the line item can be broken down further in `sub
|
|
301
|
+
#
|
|
302
|
+
# @param subtotal [String] The line amount before any adjustments.
|
|
303
|
+
#
|
|
304
|
+
# @param tax_amounts [Array<Orb::Models::TaxAmount>] An array of tax rates and their incurred tax amounts. Empty if no tax integratio
|
|
305
|
+
#
|
|
306
|
+
# @param usage_customer_ids [Array<String>, nil] A list of customer ids that were used to calculate the usage for this line item.
|
|
307
|
+
|
|
308
|
+
module Adjustment
|
|
309
|
+
extend Orb::Internal::Type::Union
|
|
310
|
+
|
|
311
|
+
discriminator :adjustment_type
|
|
312
|
+
|
|
313
|
+
variant :usage_discount, -> { Orb::MonetaryUsageDiscountAdjustment }
|
|
314
|
+
|
|
315
|
+
variant :amount_discount, -> { Orb::MonetaryAmountDiscountAdjustment }
|
|
316
|
+
|
|
317
|
+
variant :percentage_discount, -> { Orb::MonetaryPercentageDiscountAdjustment }
|
|
318
|
+
|
|
319
|
+
variant :tiered_percentage_discount,
|
|
320
|
+
-> { Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount }
|
|
321
|
+
|
|
322
|
+
variant :minimum, -> { Orb::MonetaryMinimumAdjustment }
|
|
323
|
+
|
|
324
|
+
variant :maximum, -> { Orb::MonetaryMaximumAdjustment }
|
|
325
|
+
|
|
326
|
+
class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
|
|
327
|
+
# @!attribute id
|
|
328
|
+
#
|
|
329
|
+
# @return [String]
|
|
330
|
+
required :id, String
|
|
331
|
+
|
|
332
|
+
# @!attribute adjustment_type
|
|
333
|
+
#
|
|
334
|
+
# @return [Symbol, :tiered_percentage_discount]
|
|
335
|
+
required :adjustment_type, const: :tiered_percentage_discount
|
|
336
|
+
|
|
337
|
+
# @!attribute amount
|
|
338
|
+
# The value applied by an adjustment.
|
|
339
|
+
#
|
|
340
|
+
# @return [String]
|
|
341
|
+
required :amount, String
|
|
342
|
+
|
|
343
|
+
# @!attribute applies_to_price_ids
|
|
344
|
+
# @deprecated
|
|
345
|
+
#
|
|
346
|
+
# The price IDs that this adjustment applies to.
|
|
347
|
+
#
|
|
348
|
+
# @return [Array<String>]
|
|
349
|
+
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
|
350
|
+
|
|
351
|
+
# @!attribute filters
|
|
352
|
+
# The filters that determine which prices to apply this adjustment to.
|
|
353
|
+
#
|
|
354
|
+
# @return [Array<Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter>]
|
|
355
|
+
required :filters,
|
|
356
|
+
-> do
|
|
357
|
+
Orb::Internal::Type::ArrayOf[
|
|
358
|
+
Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter
|
|
359
|
+
]
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# @!attribute is_invoice_level
|
|
363
|
+
# True for adjustments that apply to an entire invoice, false for adjustments that
|
|
364
|
+
# apply to only one price.
|
|
365
|
+
#
|
|
366
|
+
# @return [Boolean]
|
|
367
|
+
required :is_invoice_level, Orb::Internal::Type::Boolean
|
|
368
|
+
|
|
369
|
+
# @!attribute reason
|
|
370
|
+
# The reason for the adjustment.
|
|
371
|
+
#
|
|
372
|
+
# @return [String, nil]
|
|
373
|
+
required :reason, String, nil?: true
|
|
374
|
+
|
|
375
|
+
# @!attribute replaces_adjustment_id
|
|
376
|
+
# The adjustment id this adjustment replaces. This adjustment will take the place
|
|
377
|
+
# of the replaced adjustment in plan version migrations.
|
|
378
|
+
#
|
|
379
|
+
# @return [String, nil]
|
|
380
|
+
required :replaces_adjustment_id, String, nil?: true
|
|
381
|
+
|
|
382
|
+
# @!attribute tiers
|
|
383
|
+
# The ordered, contiguous bands of cumulative eligible spend, each discounted at
|
|
384
|
+
# its own percentage (progressive fill-a-tier), applied to the prices this
|
|
385
|
+
# adjustment covers in a given billing period.
|
|
386
|
+
#
|
|
387
|
+
# @return [Array<Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Tier>]
|
|
388
|
+
required :tiers,
|
|
389
|
+
-> do
|
|
390
|
+
Orb::Internal::Type::ArrayOf[
|
|
391
|
+
Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Tier
|
|
392
|
+
]
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, reason:, replaces_adjustment_id:, tiers:, adjustment_type: :tiered_percentage_discount)
|
|
396
|
+
# Some parameter documentations has been truncated, see
|
|
397
|
+
# {Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount}
|
|
398
|
+
# for more details.
|
|
399
|
+
#
|
|
400
|
+
# @param id [String]
|
|
401
|
+
#
|
|
402
|
+
# @param amount [String] The value applied by an adjustment.
|
|
403
|
+
#
|
|
404
|
+
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
|
405
|
+
#
|
|
406
|
+
# @param filters [Array<Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
|
407
|
+
#
|
|
408
|
+
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invoice, false for adjustments that
|
|
409
|
+
#
|
|
410
|
+
# @param reason [String, nil] The reason for the adjustment.
|
|
411
|
+
#
|
|
412
|
+
# @param replaces_adjustment_id [String, nil] The adjustment id this adjustment replaces. This adjustment will take the place
|
|
413
|
+
#
|
|
414
|
+
# @param tiers [Array<Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Tier>] The ordered, contiguous bands of cumulative eligible spend, each discounted at i
|
|
415
|
+
#
|
|
416
|
+
# @param adjustment_type [Symbol, :tiered_percentage_discount]
|
|
417
|
+
|
|
418
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
419
|
+
# @!attribute field
|
|
420
|
+
# The property of the price to filter on.
|
|
421
|
+
#
|
|
422
|
+
# @return [Symbol, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field]
|
|
423
|
+
required :field,
|
|
424
|
+
enum: -> { Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field }
|
|
425
|
+
|
|
426
|
+
# @!attribute operator
|
|
427
|
+
# Should prices that match the filter be included or excluded.
|
|
428
|
+
#
|
|
429
|
+
# @return [Symbol, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator]
|
|
430
|
+
required :operator,
|
|
431
|
+
enum: -> { Orb::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator }
|
|
432
|
+
|
|
433
|
+
# @!attribute values
|
|
434
|
+
# The IDs or values that match this filter.
|
|
435
|
+
#
|
|
436
|
+
# @return [Array<String>]
|
|
437
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
|
438
|
+
|
|
439
|
+
# @!method initialize(field:, operator:, values:)
|
|
440
|
+
# @param field [Symbol, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on.
|
|
441
|
+
#
|
|
442
|
+
# @param operator [Symbol, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
|
443
|
+
#
|
|
444
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
|
445
|
+
|
|
446
|
+
# The property of the price to filter on.
|
|
447
|
+
#
|
|
448
|
+
# @see Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter#field
|
|
449
|
+
module Field
|
|
450
|
+
extend Orb::Internal::Type::Enum
|
|
451
|
+
|
|
452
|
+
PRICE_ID = :price_id
|
|
453
|
+
ITEM_ID = :item_id
|
|
454
|
+
PRICE_TYPE = :price_type
|
|
455
|
+
CURRENCY = :currency
|
|
456
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
|
457
|
+
|
|
458
|
+
# @!method self.values
|
|
459
|
+
# @return [Array<Symbol>]
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
# Should prices that match the filter be included or excluded.
|
|
463
|
+
#
|
|
464
|
+
# @see Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Filter#operator
|
|
465
|
+
module Operator
|
|
466
|
+
extend Orb::Internal::Type::Enum
|
|
467
|
+
|
|
468
|
+
INCLUDES = :includes
|
|
469
|
+
EXCLUDES = :excludes
|
|
470
|
+
|
|
471
|
+
# @!method self.values
|
|
472
|
+
# @return [Array<Symbol>]
|
|
473
|
+
end
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
477
|
+
# @!attribute lower_bound
|
|
478
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
479
|
+
#
|
|
480
|
+
# @return [Float]
|
|
481
|
+
required :lower_bound, Float
|
|
482
|
+
|
|
483
|
+
# @!attribute percentage
|
|
484
|
+
# The percentage (between 0 and 1) discounted from spend that falls within this
|
|
485
|
+
# tier.
|
|
486
|
+
#
|
|
487
|
+
# @return [Float]
|
|
488
|
+
required :percentage, Float
|
|
489
|
+
|
|
490
|
+
# @!attribute upper_bound
|
|
491
|
+
# Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
492
|
+
# open-ended tier.
|
|
493
|
+
#
|
|
494
|
+
# @return [Float, nil]
|
|
495
|
+
optional :upper_bound, Float, nil?: true
|
|
496
|
+
|
|
497
|
+
# @!method initialize(lower_bound:, percentage:, upper_bound: nil)
|
|
498
|
+
# Some parameter documentations has been truncated, see
|
|
499
|
+
# {Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount::Tier}
|
|
500
|
+
# for more details.
|
|
501
|
+
#
|
|
502
|
+
# One band of a tiered percentage discount. Bounds are denominated in the
|
|
503
|
+
# discount's currency. `lower_bound` is the exclusive start of the band and
|
|
504
|
+
# `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
505
|
+
# open-ended final tier.
|
|
506
|
+
#
|
|
507
|
+
# @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
|
|
508
|
+
#
|
|
509
|
+
# @param percentage [Float] The percentage (between 0 and 1) discounted from spend that falls within this ti
|
|
510
|
+
#
|
|
511
|
+
# @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend for this tier; null for the final open
|
|
512
|
+
end
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
# @!method self.variants
|
|
516
|
+
# @return [Array(Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceEditedWebhookEvent::Properties::PreviousAttributes::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment)]
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
module SubLineItem
|
|
520
|
+
extend Orb::Internal::Type::Union
|
|
521
|
+
|
|
522
|
+
discriminator :type
|
|
523
|
+
|
|
524
|
+
variant :matrix, -> { Orb::MatrixSubLineItem }
|
|
525
|
+
|
|
526
|
+
variant :tier, -> { Orb::TierSubLineItem }
|
|
527
|
+
|
|
528
|
+
variant :"'null'", -> { Orb::OtherSubLineItem }
|
|
529
|
+
|
|
530
|
+
# @!method self.variants
|
|
531
|
+
# @return [Array(Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem)]
|
|
532
|
+
end
|
|
533
|
+
end
|
|
534
|
+
end
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
# The event this payload describes.
|
|
538
|
+
#
|
|
539
|
+
# @see Orb::Models::InvoiceEditedWebhookEvent#type
|
|
540
|
+
module Type
|
|
541
|
+
extend Orb::Internal::Type::Enum
|
|
542
|
+
|
|
543
|
+
INVOICE_EDITED = :"invoice.edited"
|
|
544
|
+
|
|
545
|
+
# @!method self.values
|
|
546
|
+
# @return [Array<Symbol>]
|
|
547
|
+
end
|
|
548
|
+
end
|
|
549
|
+
end
|
|
550
|
+
end
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class InvoiceInvoiceDateElapsedWebhookEvent < Orb::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
# The ID of this webhook event.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
# The time at which this event was created, to the second.
|
|
14
|
+
#
|
|
15
|
+
# @return [Time]
|
|
16
|
+
required :created_at, Time
|
|
17
|
+
|
|
18
|
+
# @!attribute invoice
|
|
19
|
+
#
|
|
20
|
+
# @return [Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent::Invoice]
|
|
21
|
+
required :invoice, -> { Orb::InvoiceInvoiceDateElapsedWebhookEvent::Invoice }
|
|
22
|
+
|
|
23
|
+
# @!attribute properties
|
|
24
|
+
#
|
|
25
|
+
# @return [Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent::Properties]
|
|
26
|
+
required :properties, -> { Orb::InvoiceInvoiceDateElapsedWebhookEvent::Properties }
|
|
27
|
+
|
|
28
|
+
# @!attribute type
|
|
29
|
+
# The event this payload describes.
|
|
30
|
+
#
|
|
31
|
+
# @return [Symbol, Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent::Type]
|
|
32
|
+
required :type, enum: -> { Orb::InvoiceInvoiceDateElapsedWebhookEvent::Type }
|
|
33
|
+
|
|
34
|
+
# @!method initialize(id:, created_at:, invoice:, properties:, type:)
|
|
35
|
+
# Issued when an invoice's invoice date has elapsed.
|
|
36
|
+
#
|
|
37
|
+
# @param id [String] The ID of this webhook event.
|
|
38
|
+
#
|
|
39
|
+
# @param created_at [Time] The time at which this event was created, to the second.
|
|
40
|
+
#
|
|
41
|
+
# @param invoice [Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent::Invoice]
|
|
42
|
+
#
|
|
43
|
+
# @param properties [Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent::Properties]
|
|
44
|
+
#
|
|
45
|
+
# @param type [Symbol, Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent::Type] The event this payload describes.
|
|
46
|
+
|
|
47
|
+
# @see Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent#invoice
|
|
48
|
+
class Invoice < Orb::Internal::Type::BaseModel
|
|
49
|
+
# @!attribute id
|
|
50
|
+
#
|
|
51
|
+
# @return [String]
|
|
52
|
+
required :id, String
|
|
53
|
+
|
|
54
|
+
# @!attribute customer
|
|
55
|
+
#
|
|
56
|
+
# @return [Orb::Models::CustomerMinified]
|
|
57
|
+
required :customer, -> { Orb::CustomerMinified }
|
|
58
|
+
|
|
59
|
+
# @!attribute invoice_number
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
required :invoice_number, String
|
|
63
|
+
|
|
64
|
+
# @!attribute status
|
|
65
|
+
#
|
|
66
|
+
# @return [Symbol, Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent::Invoice::Status]
|
|
67
|
+
required :status, enum: -> { Orb::InvoiceInvoiceDateElapsedWebhookEvent::Invoice::Status }
|
|
68
|
+
|
|
69
|
+
# @!attribute subscription
|
|
70
|
+
#
|
|
71
|
+
# @return [Orb::Models::SubscriptionMinified, nil]
|
|
72
|
+
required :subscription, -> { Orb::SubscriptionMinified }, nil?: true
|
|
73
|
+
|
|
74
|
+
# @!method initialize(id:, customer:, invoice_number:, status:, subscription:)
|
|
75
|
+
# @param id [String]
|
|
76
|
+
# @param customer [Orb::Models::CustomerMinified]
|
|
77
|
+
# @param invoice_number [String]
|
|
78
|
+
# @param status [Symbol, Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent::Invoice::Status]
|
|
79
|
+
# @param subscription [Orb::Models::SubscriptionMinified, nil]
|
|
80
|
+
|
|
81
|
+
# @see Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent::Invoice#status
|
|
82
|
+
module Status
|
|
83
|
+
extend Orb::Internal::Type::Enum
|
|
84
|
+
|
|
85
|
+
ISSUED = :issued
|
|
86
|
+
PAID = :paid
|
|
87
|
+
SYNCED = :synced
|
|
88
|
+
VOID = :void
|
|
89
|
+
DRAFT = :draft
|
|
90
|
+
|
|
91
|
+
# @!method self.values
|
|
92
|
+
# @return [Array<Symbol>]
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# @see Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent#properties
|
|
97
|
+
class Properties < Orb::Internal::Type::BaseModel
|
|
98
|
+
# @!attribute invoice_date
|
|
99
|
+
#
|
|
100
|
+
# @return [Time]
|
|
101
|
+
required :invoice_date, Time
|
|
102
|
+
|
|
103
|
+
# @!method initialize(invoice_date:)
|
|
104
|
+
# @param invoice_date [Time]
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# The event this payload describes.
|
|
108
|
+
#
|
|
109
|
+
# @see Orb::Models::InvoiceInvoiceDateElapsedWebhookEvent#type
|
|
110
|
+
module Type
|
|
111
|
+
extend Orb::Internal::Type::Enum
|
|
112
|
+
|
|
113
|
+
INVOICE_INVOICE_DATE_ELAPSED = :"invoice.invoice_date_elapsed"
|
|
114
|
+
|
|
115
|
+
# @!method self.values
|
|
116
|
+
# @return [Array<Symbol>]
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|