orb-billing 0.2.0 → 0.3.1
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 +67 -0
- data/README.md +63 -53
- data/lib/orb/client.rb +4 -4
- data/lib/orb/errors.rb +9 -9
- data/lib/orb/file_part.rb +55 -0
- data/lib/orb/internal/page.rb +7 -11
- data/lib/orb/internal/transport/base_client.rb +10 -10
- data/lib/orb/internal/transport/pooled_net_requester.rb +2 -2
- data/lib/orb/internal/type/array_of.rb +11 -0
- data/lib/orb/internal/type/base_model.rb +33 -23
- data/lib/orb/internal/type/base_page.rb +9 -1
- data/lib/orb/internal/type/boolean.rb +14 -11
- data/lib/orb/internal/type/converter.rb +4 -1
- data/lib/orb/internal/type/enum.rb +19 -16
- data/lib/orb/internal/type/{io_like.rb → file_input.rb} +33 -15
- data/lib/orb/internal/type/hash_of.rb +11 -0
- data/lib/orb/internal/type/request_parameters.rb +3 -10
- data/lib/orb/internal/type/union.rb +10 -1
- data/lib/orb/internal/type/unknown.rb +14 -11
- data/lib/orb/internal/util.rb +88 -64
- data/lib/orb/internal.rb +0 -1
- data/lib/orb/models/alert.rb +68 -71
- data/lib/orb/models/alert_create_for_customer_params.rb +20 -25
- data/lib/orb/models/alert_create_for_external_customer_params.rb +20 -25
- data/lib/orb/models/alert_create_for_subscription_params.rb +20 -25
- data/lib/orb/models/alert_disable_params.rb +5 -9
- data/lib/orb/models/alert_enable_params.rb +5 -9
- data/lib/orb/models/alert_list_params.rb +26 -36
- data/lib/orb/models/alert_retrieve_params.rb +3 -8
- data/lib/orb/models/alert_update_params.rb +14 -18
- data/lib/orb/models/amount_discount.rb +14 -14
- data/lib/orb/models/billable_metric.rb +23 -20
- data/lib/orb/models/billing_cycle_relative_date.rb +2 -5
- data/lib/orb/models/coupon.rb +28 -21
- data/lib/orb/models/coupon_archive_params.rb +3 -8
- data/lib/orb/models/coupon_create_params.rb +29 -34
- data/lib/orb/models/coupon_fetch_params.rb +3 -8
- data/lib/orb/models/coupon_list_params.rb +17 -17
- data/lib/orb/models/coupons/subscription_list_params.rb +12 -15
- data/lib/orb/models/credit_note.rb +100 -166
- data/lib/orb/models/credit_note_create_params.rb +15 -23
- data/lib/orb/models/credit_note_fetch_params.rb +3 -8
- data/lib/orb/models/credit_note_list_params.rb +20 -30
- data/lib/orb/models/customer.rb +224 -271
- data/lib/orb/models/customer_create_params.rb +216 -257
- data/lib/orb/models/customer_delete_params.rb +3 -8
- data/lib/orb/models/customer_fetch_by_external_id_params.rb +3 -8
- data/lib/orb/models/customer_fetch_params.rb +3 -8
- data/lib/orb/models/customer_list_params.rb +20 -30
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +3 -8
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +3 -8
- data/lib/orb/models/customer_update_by_external_id_params.rb +212 -257
- data/lib/orb/models/customer_update_params.rb +212 -255
- data/lib/orb/models/customers/balance_transaction_create_params.rb +11 -16
- data/lib/orb/models/customers/balance_transaction_create_response.rb +33 -51
- data/lib/orb/models/customers/balance_transaction_list_params.rb +20 -30
- data/lib/orb/models/customers/balance_transaction_list_response.rb +33 -51
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +17 -17
- data/lib/orb/models/customers/cost_list_by_external_id_response.rb +23 -27
- data/lib/orb/models/customers/cost_list_params.rb +17 -17
- data/lib/orb/models/customers/cost_list_response.rb +23 -27
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +18 -22
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +10 -17
- data/lib/orb/models/customers/credit_list_params.rb +18 -22
- data/lib/orb/models/customers/credit_list_response.rb +10 -17
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +64 -66
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +384 -491
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +63 -66
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +384 -498
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +33 -48
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +384 -494
- data/lib/orb/models/customers/credits/ledger_list_params.rb +32 -48
- data/lib/orb/models/customers/credits/ledger_list_response.rb +383 -501
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +47 -50
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +43 -46
- data/lib/orb/models/customers/credits/top_up_create_params.rb +46 -50
- data/lib/orb/models/customers/credits/top_up_create_response.rb +42 -46
- data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +4 -9
- data/lib/orb/models/customers/credits/top_up_delete_params.rb +4 -9
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +12 -15
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +43 -46
- data/lib/orb/models/customers/credits/top_up_list_params.rb +12 -15
- data/lib/orb/models/customers/credits/top_up_list_response.rb +42 -46
- data/lib/orb/models/dimensional_price_group.rb +21 -15
- data/lib/orb/models/dimensional_price_group_create_params.rb +17 -23
- data/lib/orb/models/dimensional_price_group_list_params.rb +12 -15
- data/lib/orb/models/dimensional_price_group_retrieve_params.rb +3 -8
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +3 -8
- data/lib/orb/models/dimensional_price_groups.rb +3 -7
- data/lib/orb/models/discount.rb +2 -3
- data/lib/orb/models/evaluate_price_group.rb +8 -11
- data/lib/orb/models/event_deprecate_params.rb +3 -8
- data/lib/orb/models/event_deprecate_response.rb +2 -6
- data/lib/orb/models/event_ingest_params.rb +33 -27
- data/lib/orb/models/event_ingest_response.rb +23 -24
- data/lib/orb/models/event_search_params.rb +15 -11
- data/lib/orb/models/event_search_response.rb +27 -22
- data/lib/orb/models/event_update_params.rb +19 -13
- data/lib/orb/models/event_update_response.rb +2 -6
- data/lib/orb/models/events/backfill_close_params.rb +3 -8
- data/lib/orb/models/events/backfill_close_response.rb +34 -39
- data/lib/orb/models/events/backfill_create_params.rb +28 -32
- data/lib/orb/models/events/backfill_create_response.rb +34 -39
- data/lib/orb/models/events/backfill_fetch_params.rb +3 -8
- data/lib/orb/models/events/backfill_fetch_response.rb +34 -39
- data/lib/orb/models/events/backfill_list_params.rb +12 -15
- data/lib/orb/models/events/backfill_list_response.rb +34 -39
- data/lib/orb/models/events/backfill_revert_params.rb +3 -8
- data/lib/orb/models/events/backfill_revert_response.rb +34 -39
- data/lib/orb/models/events/event_volumes.rb +11 -17
- data/lib/orb/models/events/volume_list_params.rb +19 -22
- data/lib/orb/models/invoice.rb +619 -681
- data/lib/orb/models/invoice_create_params.rb +52 -61
- data/lib/orb/models/invoice_fetch_params.rb +3 -8
- data/lib/orb/models/invoice_fetch_upcoming_params.rb +4 -9
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +618 -669
- data/lib/orb/models/invoice_issue_params.rb +10 -14
- data/lib/orb/models/invoice_level_discount.rb +2 -3
- data/lib/orb/models/invoice_line_item_create_params.rb +19 -14
- data/lib/orb/models/invoice_line_item_create_response.rb +281 -306
- data/lib/orb/models/invoice_list_params.rb +51 -66
- data/lib/orb/models/invoice_mark_paid_params.rb +9 -11
- data/lib/orb/models/invoice_pay_params.rb +3 -8
- data/lib/orb/models/invoice_update_params.rb +9 -9
- data/lib/orb/models/invoice_void_params.rb +3 -8
- data/lib/orb/models/item.rb +14 -25
- data/lib/orb/models/item_create_params.rb +5 -9
- data/lib/orb/models/item_fetch_params.rb +3 -8
- data/lib/orb/models/item_list_params.rb +12 -15
- data/lib/orb/models/item_update_params.rb +10 -22
- data/lib/orb/models/metric_create_params.rb +17 -13
- data/lib/orb/models/metric_fetch_params.rb +3 -8
- data/lib/orb/models/metric_list_params.rb +20 -30
- data/lib/orb/models/metric_update_params.rb +9 -9
- data/lib/orb/models/pagination_metadata.rb +3 -7
- data/lib/orb/models/percentage_discount.rb +15 -14
- data/lib/orb/models/plan.rb +259 -291
- data/lib/orb/models/plan_create_params.rb +2070 -2466
- data/lib/orb/models/plan_fetch_params.rb +3 -8
- data/lib/orb/models/plan_list_params.rb +25 -42
- data/lib/orb/models/plan_update_params.rb +12 -10
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +3 -8
- data/lib/orb/models/plans/external_plan_id_update_params.rb +12 -10
- data/lib/orb/models/price.rb +3842 -5005
- data/lib/orb/models/price_create_params.rb +203 -244
- data/lib/orb/models/price_evaluate_params.rb +21 -30
- data/lib/orb/models/price_evaluate_response.rb +2 -6
- data/lib/orb/models/price_fetch_params.rb +3 -8
- data/lib/orb/models/price_list_params.rb +12 -15
- data/lib/orb/models/price_update_params.rb +9 -9
- data/lib/orb/models/prices/external_price_id_fetch_params.rb +3 -8
- data/lib/orb/models/prices/external_price_id_update_params.rb +9 -9
- data/lib/orb/models/subscription.rb +360 -405
- data/lib/orb/models/subscription_cancel_params.rb +16 -16
- data/lib/orb/models/subscription_cancel_response.rb +358 -399
- data/lib/orb/models/subscription_change_apply_params.rb +7 -10
- data/lib/orb/models/subscription_change_apply_response.rb +384 -418
- data/lib/orb/models/subscription_change_cancel_params.rb +3 -8
- data/lib/orb/models/subscription_change_cancel_response.rb +384 -417
- data/lib/orb/models/subscription_change_retrieve_params.rb +3 -8
- data/lib/orb/models/subscription_change_retrieve_response.rb +385 -417
- data/lib/orb/models/subscription_create_params.rb +4735 -5417
- data/lib/orb/models/subscription_create_response.rb +358 -399
- data/lib/orb/models/subscription_fetch_costs_params.rb +17 -17
- data/lib/orb/models/subscription_fetch_costs_response.rb +23 -27
- data/lib/orb/models/subscription_fetch_params.rb +3 -8
- data/lib/orb/models/subscription_fetch_schedule_params.rb +20 -30
- data/lib/orb/models/subscription_fetch_schedule_response.rb +15 -17
- data/lib/orb/models/subscription_fetch_usage_params.rb +32 -43
- data/lib/orb/models/subscription_list_params.rb +28 -41
- data/lib/orb/models/subscription_price_intervals_params.rb +2560 -3040
- data/lib/orb/models/subscription_price_intervals_response.rb +361 -399
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +4728 -5411
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +361 -398
- data/lib/orb/models/subscription_trigger_phase_params.rb +12 -10
- data/lib/orb/models/subscription_trigger_phase_response.rb +360 -399
- data/lib/orb/models/subscription_unschedule_cancellation_params.rb +3 -8
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +361 -398
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +5 -9
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +362 -396
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +3 -8
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +362 -396
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +22 -33
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +361 -398
- data/lib/orb/models/subscription_update_params.rb +21 -23
- data/lib/orb/models/subscription_update_trial_params.rb +15 -18
- data/lib/orb/models/subscription_update_trial_response.rb +360 -399
- data/lib/orb/models/subscription_usage.rb +37 -80
- data/lib/orb/models/subscriptions.rb +3 -7
- data/lib/orb/models/top_level_ping_params.rb +3 -8
- data/lib/orb/models/top_level_ping_response.rb +2 -6
- data/lib/orb/models/trial_discount.rb +16 -24
- data/lib/orb/models/usage_discount.rb +15 -14
- data/lib/orb/models.rb +220 -0
- data/lib/orb/request_options.rb +4 -6
- data/lib/orb/resources/alerts.rb +48 -17
- data/lib/orb/resources/coupons/subscriptions.rb +9 -2
- data/lib/orb/resources/coupons.rb +26 -8
- data/lib/orb/resources/credit_notes.rb +17 -4
- data/lib/orb/resources/customers/balance_transactions.rb +18 -3
- data/lib/orb/resources/customers/costs.rb +26 -8
- data/lib/orb/resources/customers/credits/ledger.rb +112 -32
- data/lib/orb/resources/customers/credits/top_ups.rb +67 -20
- data/lib/orb/resources/customers/credits.rb +28 -8
- data/lib/orb/resources/customers.rb +138 -39
- data/lib/orb/resources/dimensional_price_groups.rb +19 -4
- data/lib/orb/resources/events/backfills.rb +32 -9
- data/lib/orb/resources/events/volume.rb +14 -4
- data/lib/orb/resources/events.rb +40 -11
- data/lib/orb/resources/invoice_line_items.rb +16 -6
- data/lib/orb/resources/invoices.rb +77 -17
- data/lib/orb/resources/items.rb +10 -3
- data/lib/orb/resources/metrics.rb +33 -8
- data/lib/orb/resources/plans/external_plan_id.rb +10 -2
- data/lib/orb/resources/plans.rb +47 -11
- data/lib/orb/resources/prices/external_price_id.rb +9 -3
- data/lib/orb/resources/prices.rb +101 -26
- data/lib/orb/resources/subscription_changes.rb +5 -2
- data/lib/orb/resources/subscriptions.rb +292 -78
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +2 -10
- data/rbi/{lib/orb → orb}/client.rbi +4 -4
- data/rbi/{lib/orb → orb}/errors.rbi +1 -1
- data/rbi/orb/file_part.rbi +34 -0
- data/rbi/{lib/orb → orb}/internal/transport/base_client.rbi +19 -5
- data/rbi/{lib/orb → orb}/internal/type/array_of.rbi +3 -0
- data/rbi/{lib/orb → orb}/internal/type/base_model.rbi +7 -1
- data/rbi/{lib/orb → orb}/internal/type/base_page.rbi +2 -0
- data/rbi/{lib/orb → orb}/internal/type/enum.rbi +3 -6
- data/rbi/{lib/orb/internal/type/io_like.rbi → orb/internal/type/file_input.rbi} +5 -2
- data/rbi/{lib/orb → orb}/internal/type/hash_of.rbi +3 -0
- data/rbi/{lib/orb → orb}/internal/type/request_parameters.rbi +1 -1
- data/rbi/{lib/orb → orb}/internal/type/union.rbi +3 -0
- data/rbi/{lib/orb → orb}/internal/util.rbi +28 -19
- data/rbi/{lib/orb → orb}/internal.rbi +0 -1
- data/rbi/{lib/orb → orb}/models/alert.rbi +28 -8
- data/rbi/{lib/orb → orb}/models/alert_create_for_customer_params.rbi +16 -6
- data/rbi/{lib/orb → orb}/models/alert_create_for_external_customer_params.rbi +16 -6
- data/rbi/{lib/orb → orb}/models/alert_create_for_subscription_params.rbi +16 -6
- data/rbi/{lib/orb → orb}/models/alert_disable_params.rbi +5 -2
- data/rbi/{lib/orb → orb}/models/alert_enable_params.rbi +5 -2
- data/rbi/{lib/orb → orb}/models/alert_list_params.rbi +6 -0
- data/rbi/{lib/orb → orb}/models/alert_update_params.rbi +11 -4
- data/rbi/{lib/orb → orb}/models/amount_discount.rbi +10 -4
- data/rbi/{lib/orb → orb}/models/billable_metric.rbi +16 -3
- data/rbi/{lib/orb → orb}/models/billing_cycle_relative_date.rbi +1 -1
- data/rbi/{lib/orb → orb}/models/coupon.rbi +10 -3
- data/rbi/{lib/orb → orb}/models/coupon_create_params.rbi +15 -12
- data/rbi/{lib/orb → orb}/models/coupon_list_params.rbi +13 -3
- data/rbi/{lib/orb → orb}/models/coupons/subscription_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/credit_note.rbi +44 -12
- data/rbi/{lib/orb → orb}/models/credit_note_create_params.rbi +15 -6
- data/rbi/{lib/orb → orb}/models/credit_note_list_params.rbi +3 -0
- data/rbi/{lib/orb → orb}/models/customer.rbi +130 -11
- data/rbi/{lib/orb → orb}/models/customer_create_params.rbi +151 -17
- data/rbi/{lib/orb → orb}/models/customer_list_params.rbi +3 -0
- data/rbi/{lib/orb → orb}/models/customer_update_by_external_id_params.rbi +149 -17
- data/rbi/{lib/orb → orb}/models/customer_update_params.rbi +149 -17
- data/rbi/{lib/orb → orb}/models/customers/balance_transaction_create_params.rbi +8 -4
- data/rbi/{lib/orb → orb}/models/customers/balance_transaction_create_response.rbi +18 -8
- data/rbi/{lib/orb → orb}/models/customers/balance_transaction_list_params.rbi +3 -0
- data/rbi/{lib/orb → orb}/models/customers/balance_transaction_list_response.rbi +18 -8
- data/rbi/{lib/orb → orb}/models/customers/cost_list_by_external_id_params.rbi +9 -5
- data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +225 -0
- data/rbi/{lib/orb → orb}/models/customers/cost_list_params.rbi +9 -5
- data/rbi/orb/models/customers/cost_list_response.rbi +223 -0
- data/rbi/{lib/orb → orb}/models/customers/credit_list_by_external_id_params.rbi +13 -3
- data/rbi/{lib/orb → orb}/models/customers/credit_list_by_external_id_response.rbi +1 -2
- data/rbi/{lib/orb → orb}/models/customers/credit_list_params.rbi +13 -3
- data/rbi/{lib/orb → orb}/models/customers/credit_list_response.rbi +1 -2
- data/rbi/{lib/orb → orb}/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +40 -18
- data/rbi/{lib/orb/models/customers/credits/ledger_create_entry_response.rbi → orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi} +157 -170
- data/rbi/{lib/orb → orb}/models/customers/credits/ledger_create_entry_params.rbi +40 -6
- data/rbi/{lib/orb/models/customers/credits/ledger_list_response.rbi → orb/models/customers/credits/ledger_create_entry_response.rbi} +149 -196
- data/rbi/{lib/orb → orb}/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -16
- data/rbi/{lib/orb → orb}/models/customers/credits/ledger_list_by_external_id_response.rbi +148 -229
- data/rbi/{lib/orb → orb}/models/customers/credits/ledger_list_params.rbi +6 -4
- data/rbi/{lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi → orb/models/customers/credits/ledger_list_response.rbi} +149 -343
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_create_by_external_id_params.rbi +27 -10
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_create_by_external_id_response.rbi +25 -10
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_create_params.rbi +27 -4
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_create_response.rbi +25 -10
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_list_by_external_id_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_list_by_external_id_response.rbi +25 -10
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_list_response.rbi +25 -4
- data/rbi/{lib/orb → orb}/models/dimensional_price_group.rbi +11 -3
- data/rbi/{lib/orb → orb}/models/dimensional_price_group_create_params.rbi +4 -0
- data/rbi/{lib/orb → orb}/models/dimensional_price_group_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/evaluate_price_group.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/event_deprecate_response.rbi +4 -2
- data/rbi/{lib/orb → orb}/models/event_ingest_params.rbi +22 -5
- data/rbi/{lib/orb → orb}/models/event_ingest_response.rbi +15 -4
- data/rbi/{lib/orb → orb}/models/event_search_params.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/event_search_response.rbi +14 -3
- data/rbi/{lib/orb → orb}/models/event_update_params.rbi +10 -3
- data/rbi/{lib/orb → orb}/models/event_update_response.rbi +4 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_close_response.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_create_params.rbi +18 -0
- data/rbi/{lib/orb → orb}/models/events/backfill_create_response.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_fetch_response.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_list_response.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_revert_response.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/events/event_volumes.rbi +8 -4
- data/rbi/{lib/orb → orb}/models/events/volume_list_params.rbi +18 -2
- data/rbi/{lib/orb → orb}/models/invoice.rbi +513 -202
- data/rbi/{lib/orb → orb}/models/invoice_create_params.rbi +38 -6
- data/rbi/{lib/orb → orb}/models/invoice_fetch_upcoming_response.rbi +513 -216
- data/rbi/{lib/orb → orb}/models/invoice_issue_params.rbi +9 -2
- data/rbi/{lib/orb → orb}/models/invoice_line_item_create_params.rbi +16 -2
- data/rbi/{lib/orb → orb}/models/invoice_line_item_create_response.rbi +279 -182
- data/rbi/{lib/orb → orb}/models/invoice_list_params.rbi +9 -2
- data/rbi/{lib/orb → orb}/models/invoice_mark_paid_params.rbi +9 -2
- data/rbi/{lib/orb → orb}/models/invoice_update_params.rbi +7 -2
- data/rbi/{lib/orb → orb}/models/item.rbi +1 -2
- data/rbi/{lib/orb → orb}/models/item_create_params.rbi +5 -2
- data/rbi/{lib/orb → orb}/models/item_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/item_update_params.rbi +1 -8
- data/rbi/{lib/orb → orb}/models/metric_create_params.rbi +15 -2
- data/rbi/{lib/orb → orb}/models/metric_list_params.rbi +3 -0
- data/rbi/{lib/orb → orb}/models/metric_update_params.rbi +7 -2
- data/rbi/{lib/orb → orb}/models/percentage_discount.rbi +11 -4
- data/rbi/{lib/orb → orb}/models/plan.rbi +207 -120
- data/rbi/{lib/orb → orb}/models/plan_create_params.rbi +1971 -2414
- data/rbi/{lib/orb → orb}/models/plan_list_params.rbi +5 -1
- data/rbi/{lib/orb → orb}/models/plan_update_params.rbi +11 -2
- data/rbi/{lib/orb → orb}/models/plans/external_plan_id_update_params.rbi +11 -2
- data/rbi/{lib/orb → orb}/models/price.rbi +2594 -2957
- data/rbi/{lib/orb → orb}/models/price_create_params.rbi +137 -53
- data/rbi/{lib/orb → orb}/models/price_evaluate_params.rbi +10 -0
- data/rbi/{lib/orb → orb}/models/price_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/price_update_params.rbi +7 -2
- data/rbi/{lib/orb → orb}/models/prices/external_price_id_update_params.rbi +7 -2
- data/rbi/{lib/orb → orb}/models/subscription.rbi +292 -129
- data/rbi/{lib/orb → orb}/models/subscription_cancel_params.rbi +8 -5
- data/rbi/{lib/orb → orb}/models/subscription_cancel_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_change_apply_params.rbi +7 -2
- data/rbi/{lib/orb → orb}/models/subscription_change_apply_response.rbi +317 -136
- data/rbi/{lib/orb → orb}/models/subscription_change_cancel_response.rbi +317 -136
- data/rbi/{lib/orb → orb}/models/subscription_change_retrieve_response.rbi +317 -136
- data/rbi/{lib/orb → orb}/models/subscription_create_params.rbi +4271 -4270
- data/rbi/{lib/orb → orb}/models/subscription_create_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_fetch_costs_params.rbi +9 -5
- data/rbi/orb/models/subscription_fetch_costs_response.rbi +221 -0
- data/rbi/{lib/orb → orb}/models/subscription_fetch_schedule_params.rbi +3 -0
- data/rbi/{lib/orb → orb}/models/subscription_fetch_schedule_response.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/subscription_fetch_usage_params.rbi +13 -4
- data/rbi/{lib/orb → orb}/models/subscription_list_params.rbi +4 -2
- data/rbi/{lib/orb → orb}/models/subscription_price_intervals_params.rbi +2354 -2317
- data/rbi/{lib/orb → orb}/models/subscription_price_intervals_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_schedule_plan_change_params.rbi +4280 -3758
- data/rbi/{lib/orb → orb}/models/subscription_schedule_plan_change_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_trigger_phase_params.rbi +10 -2
- data/rbi/{lib/orb → orb}/models/subscription_trigger_phase_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_unschedule_cancellation_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +5 -2
- data/rbi/{lib/orb → orb}/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +305 -138
- data/rbi/{lib/orb → orb}/models/subscription_unschedule_pending_plan_changes_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_update_fixed_fee_quantity_params.rbi +11 -2
- data/rbi/{lib/orb → orb}/models/subscription_update_fixed_fee_quantity_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_update_params.rbi +15 -0
- data/rbi/{lib/orb → orb}/models/subscription_update_trial_params.rbi +11 -5
- data/rbi/{lib/orb → orb}/models/subscription_update_trial_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_usage.rbi +2 -16
- data/rbi/{lib/orb → orb}/models/trial_discount.rbi +5 -1
- data/rbi/{lib/orb → orb}/models/usage_discount.rbi +11 -3
- data/rbi/orb/models.rbi +220 -0
- data/rbi/{lib/orb → orb}/request_options.rbi +2 -0
- data/rbi/{lib/orb → orb}/resources/alerts.rbi +8 -14
- data/rbi/{lib/orb → orb}/resources/coupons/subscriptions.rbi +1 -1
- data/rbi/{lib/orb → orb}/resources/coupons.rbi +6 -18
- data/rbi/{lib/orb → orb}/resources/credit_notes.rbi +3 -9
- data/rbi/{lib/orb → orb}/resources/customers/balance_transactions.rbi +2 -2
- data/rbi/{lib/orb → orb}/resources/customers/costs.rbi +2 -2
- data/rbi/{lib/orb → orb}/resources/customers/credits/ledger.rbi +32 -32
- data/rbi/{lib/orb → orb}/resources/customers/credits/top_ups.rbi +6 -18
- data/rbi/{lib/orb → orb}/resources/customers/credits.rbi +2 -2
- data/rbi/{lib/orb → orb}/resources/customers.rbi +15 -45
- data/rbi/{lib/orb → orb}/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +1 -4
- data/rbi/{lib/orb → orb}/resources/dimensional_price_groups.rbi +3 -10
- data/rbi/{lib/orb → orb}/resources/events/backfills.rbi +5 -18
- data/rbi/{lib/orb → orb}/resources/events/volume.rbi +1 -1
- data/rbi/{lib/orb → orb}/resources/events.rbi +4 -10
- data/rbi/{lib/orb → orb}/resources/invoice_line_items.rbi +1 -1
- data/rbi/{lib/orb → orb}/resources/invoices.rbi +9 -34
- data/rbi/{lib/orb → orb}/resources/items.rbi +4 -17
- data/rbi/{lib/orb → orb}/resources/metrics.rbi +4 -10
- data/rbi/{lib/orb → orb}/resources/plans/external_plan_id.rbi +2 -8
- data/rbi/{lib/orb → orb}/resources/plans.rbi +29 -35
- data/rbi/orb/resources/prices/external_price_id.rbi +103 -0
- data/rbi/{lib/orb → orb}/resources/prices.rbi +117 -124
- data/rbi/{lib/orb → orb}/resources/subscription_changes.rbi +3 -9
- data/rbi/{lib/orb → orb}/resources/subscriptions.rbi +16 -32
- data/rbi/{lib/orb → orb}/resources/top_level.rbi +1 -4
- data/sig/orb/file_part.rbs +21 -0
- data/sig/orb/internal/transport/base_client.rbs +9 -3
- data/sig/orb/internal/type/array_of.rbs +2 -0
- data/sig/orb/internal/type/base_model.rbs +4 -0
- data/sig/orb/internal/type/enum.rbs +2 -2
- data/sig/orb/internal/type/{io_like.rbs → file_input.rbs} +1 -1
- data/sig/orb/internal/type/hash_of.rbs +2 -0
- data/sig/orb/internal/type/union.rbs +2 -0
- data/sig/orb/internal/util.rbs +16 -12
- data/sig/orb/models/coupon_create_params.rbs +9 -10
- data/sig/orb/models/customer_create_params.rbs +9 -10
- data/sig/orb/models/customer_update_by_external_id_params.rbs +9 -10
- data/sig/orb/models/customer_update_params.rbs +9 -10
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +113 -113
- data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +113 -113
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +113 -113
- data/sig/orb/models/customers/credits/ledger_list_response.rbs +113 -113
- data/sig/orb/models/invoice.rbs +54 -54
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +54 -54
- data/sig/orb/models/invoice_line_item_create_response.rbs +54 -54
- data/sig/orb/models/plan.rbs +21 -21
- data/sig/orb/models/plan_create_params.rbs +653 -653
- data/sig/orb/models/price.rbs +1517 -1521
- data/sig/orb/models/subscription.rbs +34 -34
- data/sig/orb/models/subscription_cancel_response.rbs +34 -34
- data/sig/orb/models/subscription_change_apply_response.rbs +34 -34
- data/sig/orb/models/subscription_change_cancel_response.rbs +34 -34
- data/sig/orb/models/subscription_change_retrieve_response.rbs +34 -34
- data/sig/orb/models/subscription_create_params.rbs +1348 -1348
- data/sig/orb/models/subscription_create_response.rbs +34 -34
- data/sig/orb/models/subscription_price_intervals_params.rbs +767 -769
- data/sig/orb/models/subscription_price_intervals_response.rbs +34 -34
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1348 -1348
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +34 -34
- data/sig/orb/models/subscription_trigger_phase_response.rbs +34 -34
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +34 -34
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +34 -34
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +34 -34
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +34 -34
- data/sig/orb/models/subscription_update_trial_response.rbs +34 -34
- data/sig/orb/models.rbs +215 -0
- metadata +230 -224
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +0 -208
- data/rbi/lib/orb/models/customers/cost_list_response.rbi +0 -206
- data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +0 -204
- data/rbi/lib/orb/resources/prices/external_price_id.rbi +0 -106
- /data/rbi/{lib/orb → orb}/internal/page.rbi +0 -0
- /data/rbi/{lib/orb → orb}/internal/transport/pooled_net_requester.rbi +0 -0
- /data/rbi/{lib/orb → orb}/internal/type/boolean.rbi +0 -0
- /data/rbi/{lib/orb → orb}/internal/type/converter.rbi +0 -0
- /data/rbi/{lib/orb → orb}/internal/type/unknown.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/alert_retrieve_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/coupon_archive_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/coupon_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/credit_note_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customer_delete_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customer_fetch_by_external_id_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customer_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customer_sync_payment_methods_from_gateway_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customers/credits/top_up_delete_by_external_id_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customers/credits/top_up_delete_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/dimensional_price_group_retrieve_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/dimensional_price_groups.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/discount.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/event_deprecate_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/events/backfill_close_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/events/backfill_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/events/backfill_revert_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/invoice_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/invoice_fetch_upcoming_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/invoice_level_discount.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/invoice_pay_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/invoice_void_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/item_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/metric_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/pagination_metadata.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/plan_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/plans/external_plan_id_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/price_evaluate_response.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/price_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/prices/external_price_id_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscription_change_cancel_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscription_change_retrieve_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscription_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscription_unschedule_cancellation_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscription_unschedule_pending_plan_changes_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscriptions.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/top_level_ping_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/top_level_ping_response.rbi +0 -0
- /data/rbi/{lib/orb → orb}/version.rbi +0 -0
@@ -376,45 +376,199 @@ module Orb
|
|
376
376
|
end
|
377
377
|
def self.new(
|
378
378
|
id:,
|
379
|
+
# This is the final amount required to be charged to the customer and reflects the
|
380
|
+
# application of the customer balance to the `total` of the invoice.
|
379
381
|
amount_due:,
|
380
382
|
auto_collection:,
|
381
383
|
billing_address:,
|
384
|
+
# The creation time of the resource in Orb.
|
382
385
|
created_at:,
|
386
|
+
# A list of credit notes associated with the invoice
|
383
387
|
credit_notes:,
|
388
|
+
# An ISO 4217 currency string or `credits`
|
384
389
|
currency:,
|
385
390
|
customer:,
|
386
391
|
customer_balance_transactions:,
|
392
|
+
# Tax IDs are commonly required to be displayed on customer invoices, which are
|
393
|
+
# added to the headers of invoices.
|
394
|
+
#
|
395
|
+
# ### Supported Tax ID Countries and Types
|
396
|
+
#
|
397
|
+
# | Country | Type | Description |
|
398
|
+
# | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
|
399
|
+
# | Andorra | `ad_nrt` | Andorran NRT Number |
|
400
|
+
# | Argentina | `ar_cuit` | Argentinian Tax ID Number |
|
401
|
+
# | Australia | `au_abn` | Australian Business Number (AU ABN) |
|
402
|
+
# | Australia | `au_arn` | Australian Taxation Office Reference Number |
|
403
|
+
# | Austria | `eu_vat` | European VAT Number |
|
404
|
+
# | Bahrain | `bh_vat` | Bahraini VAT Number |
|
405
|
+
# | Belgium | `eu_vat` | European VAT Number |
|
406
|
+
# | Bolivia | `bo_tin` | Bolivian Tax ID |
|
407
|
+
# | Brazil | `br_cnpj` | Brazilian CNPJ Number |
|
408
|
+
# | Brazil | `br_cpf` | Brazilian CPF Number |
|
409
|
+
# | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
|
410
|
+
# | Bulgaria | `eu_vat` | European VAT Number |
|
411
|
+
# | Canada | `ca_bn` | Canadian BN |
|
412
|
+
# | Canada | `ca_gst_hst` | Canadian GST/HST Number |
|
413
|
+
# | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
|
414
|
+
# | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
|
415
|
+
# | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
|
416
|
+
# | Canada | `ca_qst` | Canadian QST Number (Québec) |
|
417
|
+
# | Chile | `cl_tin` | Chilean TIN |
|
418
|
+
# | China | `cn_tin` | Chinese Tax ID |
|
419
|
+
# | Colombia | `co_nit` | Colombian NIT Number |
|
420
|
+
# | Costa Rica | `cr_tin` | Costa Rican Tax ID |
|
421
|
+
# | Croatia | `eu_vat` | European VAT Number |
|
422
|
+
# | Cyprus | `eu_vat` | European VAT Number |
|
423
|
+
# | Czech Republic | `eu_vat` | European VAT Number |
|
424
|
+
# | Denmark | `eu_vat` | European VAT Number |
|
425
|
+
# | Dominican Republic | `do_rcn` | Dominican RCN Number |
|
426
|
+
# | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
|
427
|
+
# | Egypt | `eg_tin` | Egyptian Tax Identification Number |
|
428
|
+
# | El Salvador | `sv_nit` | El Salvadorian NIT Number |
|
429
|
+
# | Estonia | `eu_vat` | European VAT Number |
|
430
|
+
# | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
431
|
+
# | Finland | `eu_vat` | European VAT Number |
|
432
|
+
# | France | `eu_vat` | European VAT Number |
|
433
|
+
# | Georgia | `ge_vat` | Georgian VAT |
|
434
|
+
# | Germany | `eu_vat` | European VAT Number |
|
435
|
+
# | Greece | `eu_vat` | European VAT Number |
|
436
|
+
# | Hong Kong | `hk_br` | Hong Kong BR Number |
|
437
|
+
# | Hungary | `eu_vat` | European VAT Number |
|
438
|
+
# | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
|
439
|
+
# | Iceland | `is_vat` | Icelandic VAT |
|
440
|
+
# | India | `in_gst` | Indian GST Number |
|
441
|
+
# | Indonesia | `id_npwp` | Indonesian NPWP Number |
|
442
|
+
# | Ireland | `eu_vat` | European VAT Number |
|
443
|
+
# | Israel | `il_vat` | Israel VAT |
|
444
|
+
# | Italy | `eu_vat` | European VAT Number |
|
445
|
+
# | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
446
|
+
# | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
447
|
+
# | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
448
|
+
# | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
|
449
|
+
# | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
|
450
|
+
# | Latvia | `eu_vat` | European VAT Number |
|
451
|
+
# | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
|
452
|
+
# | Lithuania | `eu_vat` | European VAT Number |
|
453
|
+
# | Luxembourg | `eu_vat` | European VAT Number |
|
454
|
+
# | Malaysia | `my_frp` | Malaysian FRP Number |
|
455
|
+
# | Malaysia | `my_itn` | Malaysian ITN |
|
456
|
+
# | Malaysia | `my_sst` | Malaysian SST Number |
|
457
|
+
# | Malta | `eu_vat ` | European VAT Number |
|
458
|
+
# | Mexico | `mx_rfc` | Mexican RFC Number |
|
459
|
+
# | Netherlands | `eu_vat` | European VAT Number |
|
460
|
+
# | New Zealand | `nz_gst` | New Zealand GST Number |
|
461
|
+
# | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
|
462
|
+
# | Norway | `no_vat` | Norwegian VAT Number |
|
463
|
+
# | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
464
|
+
# | Oman | `om_vat` | Omani VAT Number |
|
465
|
+
# | Peru | `pe_ruc` | Peruvian RUC Number |
|
466
|
+
# | Philippines | `ph_tin ` | Philippines Tax Identification Number |
|
467
|
+
# | Poland | `eu_vat` | European VAT Number |
|
468
|
+
# | Portugal | `eu_vat` | European VAT Number |
|
469
|
+
# | Romania | `eu_vat` | European VAT Number |
|
470
|
+
# | Romania | `ro_tin` | Romanian Tax ID Number |
|
471
|
+
# | Russia | `ru_inn` | Russian INN |
|
472
|
+
# | Russia | `ru_kpp` | Russian KPP |
|
473
|
+
# | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
|
474
|
+
# | Serbia | `rs_pib` | Serbian PIB Number |
|
475
|
+
# | Singapore | `sg_gst` | Singaporean GST |
|
476
|
+
# | Singapore | `sg_uen` | Singaporean UEN |
|
477
|
+
# | Slovakia | `eu_vat` | European VAT Number |
|
478
|
+
# | Slovenia | `eu_vat` | European VAT Number |
|
479
|
+
# | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
|
480
|
+
# | South Africa | `za_vat` | South African VAT Number |
|
481
|
+
# | South Korea | `kr_brn` | Korean BRN |
|
482
|
+
# | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
483
|
+
# | Spain | `eu_vat` | European VAT Number |
|
484
|
+
# | Sweden | `eu_vat` | European VAT Number |
|
485
|
+
# | Switzerland | `ch_vat` | Switzerland VAT Number |
|
486
|
+
# | Taiwan | `tw_vat` | Taiwanese VAT |
|
487
|
+
# | Thailand | `th_vat` | Thai VAT |
|
488
|
+
# | Turkey | `tr_tin` | Turkish Tax Identification Number |
|
489
|
+
# | Ukraine | `ua_vat` | Ukrainian VAT |
|
490
|
+
# | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
|
491
|
+
# | United Kingdom | `eu_vat` | Northern Ireland VAT Number |
|
492
|
+
# | United Kingdom | `gb_vat` | United Kingdom VAT Number |
|
493
|
+
# | United States | `us_ein` | United States EIN |
|
494
|
+
# | Uruguay | `uy_ruc` | Uruguayan RUC Number |
|
495
|
+
# | Venezuela | `ve_rif` | Venezuelan RIF Number |
|
496
|
+
# | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
|
387
497
|
customer_tax_id:,
|
498
|
+
# This field is deprecated in favor of `discounts`. If a `discounts` list is
|
499
|
+
# provided, the first discount in the list will be returned. If the list is empty,
|
500
|
+
# `None` will be returned.
|
388
501
|
discount:,
|
389
502
|
discounts:,
|
503
|
+
# When the invoice payment is due. The due date is null if the invoice is not yet
|
504
|
+
# finalized.
|
390
505
|
due_date:,
|
506
|
+
# If the invoice has a status of `draft`, this will be the time that the invoice
|
507
|
+
# will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
|
508
|
+
# true, the invoice will automatically begin issuing at this time.
|
391
509
|
eligible_to_issue_at:,
|
510
|
+
# A URL for the customer-facing invoice portal. This URL expires 30 days after the
|
511
|
+
# invoice's due date, or 60 days after being re-generated through the UI.
|
392
512
|
hosted_invoice_url:,
|
513
|
+
# The scheduled date of the invoice
|
393
514
|
invoice_date:,
|
515
|
+
# Automatically generated invoice number to help track and reconcile invoices.
|
516
|
+
# Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
|
517
|
+
# account or customer.
|
394
518
|
invoice_number:,
|
519
|
+
# The link to download the PDF representation of the `Invoice`.
|
395
520
|
invoice_pdf:,
|
396
521
|
invoice_source:,
|
522
|
+
# If the invoice failed to issue, this will be the last time it failed to issue
|
523
|
+
# (even if it is now in a different state.)
|
397
524
|
issue_failed_at:,
|
525
|
+
# If the invoice has been issued, this will be the time it transitioned to
|
526
|
+
# `issued` (even if it is now in a different state.)
|
398
527
|
issued_at:,
|
528
|
+
# The breakdown of prices in this invoice.
|
399
529
|
line_items:,
|
400
530
|
maximum:,
|
401
531
|
maximum_amount:,
|
532
|
+
# Free-form text which is available on the invoice PDF and the Orb invoice portal.
|
402
533
|
memo:,
|
534
|
+
# User specified key-value pairs for the resource. If not present, this defaults
|
535
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
536
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
537
|
+
# `null`.
|
403
538
|
metadata:,
|
404
539
|
minimum:,
|
405
540
|
minimum_amount:,
|
541
|
+
# If the invoice has a status of `paid`, this gives a timestamp when the invoice
|
542
|
+
# was paid.
|
406
543
|
paid_at:,
|
544
|
+
# A list of payment attempts associated with the invoice
|
407
545
|
payment_attempts:,
|
546
|
+
# If payment was attempted on this invoice but failed, this will be the time of
|
547
|
+
# the most recent attempt.
|
408
548
|
payment_failed_at:,
|
549
|
+
# If payment was attempted on this invoice, this will be the start time of the
|
550
|
+
# most recent attempt. This field is especially useful for delayed-notification
|
551
|
+
# payment mechanisms (like bank transfers), where payment can take 3 days or more.
|
409
552
|
payment_started_at:,
|
553
|
+
# If the invoice is in draft, this timestamp will reflect when the invoice is
|
554
|
+
# scheduled to be issued.
|
410
555
|
scheduled_issue_at:,
|
411
556
|
shipping_address:,
|
412
557
|
status:,
|
413
558
|
subscription:,
|
559
|
+
# The total before any discounts and minimums are applied.
|
414
560
|
subtotal:,
|
561
|
+
# If the invoice failed to sync, this will be the last time an external invoicing
|
562
|
+
# provider sync was attempted. This field will always be `null` for invoices using
|
563
|
+
# Orb Invoicing.
|
415
564
|
sync_failed_at:,
|
565
|
+
# The total after any minimums and discounts have been applied.
|
416
566
|
total:,
|
567
|
+
# If the invoice has a status of `void`, this gives a timestamp when the invoice
|
568
|
+
# was voided.
|
417
569
|
voided_at:,
|
570
|
+
# This is true if the invoice will be automatically issued in the future, and
|
571
|
+
# false otherwise.
|
418
572
|
will_auto_issue:
|
419
573
|
); end
|
420
574
|
sig do
|
@@ -500,8 +654,23 @@ module Orb
|
|
500
654
|
)
|
501
655
|
.returns(T.attached_class)
|
502
656
|
end
|
503
|
-
def self.new(
|
504
|
-
|
657
|
+
def self.new(
|
658
|
+
# True only if auto-collection is enabled for this invoice.
|
659
|
+
enabled:,
|
660
|
+
# If the invoice is scheduled for auto-collection, this field will reflect when
|
661
|
+
# the next attempt will occur. If dunning has been exhausted, or auto-collection
|
662
|
+
# is not enabled for this invoice, this field will be `null`.
|
663
|
+
next_attempt_at:,
|
664
|
+
# Number of auto-collection payment attempts.
|
665
|
+
num_attempts:,
|
666
|
+
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
667
|
+
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
668
|
+
# this can be used to tell whether the invoice is currently in dunning (that is,
|
669
|
+
# `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or
|
670
|
+
# if dunning has been exhausted (`previously_attempted_at` is non-null, but
|
671
|
+
# `next_attempt_time` is null).
|
672
|
+
previously_attempted_at:
|
673
|
+
); end
|
505
674
|
sig do
|
506
675
|
override
|
507
676
|
.returns(
|
@@ -601,8 +770,18 @@ module Orb
|
|
601
770
|
)
|
602
771
|
.returns(T.attached_class)
|
603
772
|
end
|
604
|
-
def self.new(
|
605
|
-
|
773
|
+
def self.new(
|
774
|
+
id:,
|
775
|
+
credit_note_number:,
|
776
|
+
# An optional memo supplied on the credit note.
|
777
|
+
memo:,
|
778
|
+
reason:,
|
779
|
+
total:,
|
780
|
+
type:,
|
781
|
+
# If the credit note has a status of `void`, this gives a timestamp when the
|
782
|
+
# credit note was voided.
|
783
|
+
voided_at:
|
784
|
+
); end
|
606
785
|
sig do
|
607
786
|
override
|
608
787
|
.returns(
|
@@ -705,14 +884,22 @@ module Orb
|
|
705
884
|
.returns(T.attached_class)
|
706
885
|
end
|
707
886
|
def self.new(
|
887
|
+
# A unique id for this transaction.
|
708
888
|
id:,
|
709
889
|
action:,
|
890
|
+
# The value of the amount changed in the transaction.
|
710
891
|
amount:,
|
892
|
+
# The creation time of this transaction.
|
711
893
|
created_at:,
|
712
894
|
credit_note:,
|
895
|
+
# An optional description provided for manual customer balance adjustments.
|
713
896
|
description:,
|
897
|
+
# The new value of the customer's balance prior to the transaction, in the
|
898
|
+
# customer's currency.
|
714
899
|
ending_balance:,
|
715
900
|
invoice:,
|
901
|
+
# The original value of the customer's balance prior to the transaction, in the
|
902
|
+
# customer's currency.
|
716
903
|
starting_balance:,
|
717
904
|
type:
|
718
905
|
); end
|
@@ -739,8 +926,7 @@ module Orb
|
|
739
926
|
extend Orb::Internal::Type::Enum
|
740
927
|
|
741
928
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::Invoice::CustomerBalanceTransaction::Action) }
|
742
|
-
OrSymbol =
|
743
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol) }
|
929
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
744
930
|
|
745
931
|
APPLIED_TO_INVOICE =
|
746
932
|
T.let(:applied_to_invoice, Orb::Models::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol)
|
@@ -771,8 +957,10 @@ module Orb
|
|
771
957
|
attr_accessor :id
|
772
958
|
|
773
959
|
sig { params(id: String).returns(T.attached_class) }
|
774
|
-
def self.new(
|
775
|
-
|
960
|
+
def self.new(
|
961
|
+
# The id of the Credit note
|
962
|
+
id:
|
963
|
+
); end
|
776
964
|
sig { override.returns({id: String}) }
|
777
965
|
def to_hash; end
|
778
966
|
end
|
@@ -783,8 +971,10 @@ module Orb
|
|
783
971
|
attr_accessor :id
|
784
972
|
|
785
973
|
sig { params(id: String).returns(T.attached_class) }
|
786
|
-
def self.new(
|
787
|
-
|
974
|
+
def self.new(
|
975
|
+
# The Invoice id
|
976
|
+
id:
|
977
|
+
); end
|
788
978
|
sig { override.returns({id: String}) }
|
789
979
|
def to_hash; end
|
790
980
|
end
|
@@ -793,8 +983,7 @@ module Orb
|
|
793
983
|
extend Orb::Internal::Type::Enum
|
794
984
|
|
795
985
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::Invoice::CustomerBalanceTransaction::Type) }
|
796
|
-
OrSymbol =
|
797
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol) }
|
986
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
798
987
|
|
799
988
|
INCREMENT = T.let(:increment, Orb::Models::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol)
|
800
989
|
DECREMENT = T.let(:decrement, Orb::Models::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol)
|
@@ -945,8 +1134,7 @@ module Orb
|
|
945
1134
|
extend Orb::Internal::Type::Enum
|
946
1135
|
|
947
1136
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::Invoice::CustomerTaxID::Country) }
|
948
|
-
OrSymbol =
|
949
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::Invoice::CustomerTaxID::Country::TaggedSymbol) }
|
1137
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
950
1138
|
|
951
1139
|
AD = T.let(:AD, Orb::Models::Invoice::CustomerTaxID::Country::TaggedSymbol)
|
952
1140
|
AE = T.let(:AE, Orb::Models::Invoice::CustomerTaxID::Country::TaggedSymbol)
|
@@ -1035,8 +1223,7 @@ module Orb
|
|
1035
1223
|
extend Orb::Internal::Type::Enum
|
1036
1224
|
|
1037
1225
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::Invoice::CustomerTaxID::Type) }
|
1038
|
-
OrSymbol =
|
1039
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::Invoice::CustomerTaxID::Type::TaggedSymbol) }
|
1226
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1040
1227
|
|
1041
1228
|
AD_NRT = T.let(:ad_nrt, Orb::Models::Invoice::CustomerTaxID::Type::TaggedSymbol)
|
1042
1229
|
AE_TRN = T.let(:ae_trn, Orb::Models::Invoice::CustomerTaxID::Type::TaggedSymbol)
|
@@ -1119,7 +1306,7 @@ module Orb
|
|
1119
1306
|
extend Orb::Internal::Type::Enum
|
1120
1307
|
|
1121
1308
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::Invoice::InvoiceSource) }
|
1122
|
-
OrSymbol = T.type_alias { T.any(Symbol, String
|
1309
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1123
1310
|
|
1124
1311
|
SUBSCRIPTION = T.let(:subscription, Orb::Models::Invoice::InvoiceSource::TaggedSymbol)
|
1125
1312
|
PARTIAL = T.let(:partial, Orb::Models::Invoice::InvoiceSource::TaggedSymbol)
|
@@ -1146,11 +1333,11 @@ module Orb
|
|
1146
1333
|
returns(
|
1147
1334
|
T::Array[
|
1148
1335
|
T.any(
|
1149
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1150
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1151
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1152
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1153
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1336
|
+
Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount,
|
1337
|
+
Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount,
|
1338
|
+
Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount,
|
1339
|
+
Orb::Models::Invoice::LineItem::Adjustment::Minimum,
|
1340
|
+
Orb::Models::Invoice::LineItem::Adjustment::Maximum
|
1154
1341
|
)
|
1155
1342
|
]
|
1156
1343
|
)
|
@@ -1238,34 +1425,34 @@ module Orb
|
|
1238
1425
|
returns(
|
1239
1426
|
T.nilable(
|
1240
1427
|
T.any(
|
1241
|
-
Orb::Models::Price::
|
1242
|
-
Orb::Models::Price::
|
1243
|
-
Orb::Models::Price::
|
1244
|
-
Orb::Models::Price::
|
1245
|
-
Orb::Models::Price::
|
1246
|
-
Orb::Models::Price::
|
1247
|
-
Orb::Models::Price::
|
1248
|
-
Orb::Models::Price::
|
1249
|
-
Orb::Models::Price::
|
1250
|
-
Orb::Models::Price::
|
1251
|
-
Orb::Models::Price::
|
1252
|
-
Orb::Models::Price::
|
1253
|
-
Orb::Models::Price::
|
1254
|
-
Orb::Models::Price::
|
1255
|
-
Orb::Models::Price::
|
1256
|
-
Orb::Models::Price::
|
1257
|
-
Orb::Models::Price::
|
1258
|
-
Orb::Models::Price::
|
1259
|
-
Orb::Models::Price::
|
1260
|
-
Orb::Models::Price::
|
1261
|
-
Orb::Models::Price::
|
1262
|
-
Orb::Models::Price::
|
1263
|
-
Orb::Models::Price::
|
1264
|
-
Orb::Models::Price::
|
1265
|
-
Orb::Models::Price::
|
1266
|
-
Orb::Models::Price::
|
1267
|
-
Orb::Models::Price::
|
1268
|
-
Orb::Models::Price::
|
1428
|
+
Orb::Models::Price::Unit,
|
1429
|
+
Orb::Models::Price::Package,
|
1430
|
+
Orb::Models::Price::Matrix,
|
1431
|
+
Orb::Models::Price::Tiered,
|
1432
|
+
Orb::Models::Price::TieredBps,
|
1433
|
+
Orb::Models::Price::Bps,
|
1434
|
+
Orb::Models::Price::BulkBps,
|
1435
|
+
Orb::Models::Price::Bulk,
|
1436
|
+
Orb::Models::Price::ThresholdTotalAmount,
|
1437
|
+
Orb::Models::Price::TieredPackage,
|
1438
|
+
Orb::Models::Price::GroupedTiered,
|
1439
|
+
Orb::Models::Price::TieredWithMinimum,
|
1440
|
+
Orb::Models::Price::TieredPackageWithMinimum,
|
1441
|
+
Orb::Models::Price::PackageWithAllocation,
|
1442
|
+
Orb::Models::Price::UnitWithPercent,
|
1443
|
+
Orb::Models::Price::MatrixWithAllocation,
|
1444
|
+
Orb::Models::Price::TieredWithProration,
|
1445
|
+
Orb::Models::Price::UnitWithProration,
|
1446
|
+
Orb::Models::Price::GroupedAllocation,
|
1447
|
+
Orb::Models::Price::GroupedWithProratedMinimum,
|
1448
|
+
Orb::Models::Price::GroupedWithMeteredMinimum,
|
1449
|
+
Orb::Models::Price::MatrixWithDisplayName,
|
1450
|
+
Orb::Models::Price::BulkWithProration,
|
1451
|
+
Orb::Models::Price::GroupedTieredPackage,
|
1452
|
+
Orb::Models::Price::MaxGroupTieredPackage,
|
1453
|
+
Orb::Models::Price::ScalableMatrixWithUnitPricing,
|
1454
|
+
Orb::Models::Price::ScalableMatrixWithTieredPricing,
|
1455
|
+
Orb::Models::Price::CumulativeGroupedBulk
|
1269
1456
|
)
|
1270
1457
|
)
|
1271
1458
|
)
|
@@ -1286,9 +1473,9 @@ module Orb
|
|
1286
1473
|
returns(
|
1287
1474
|
T::Array[
|
1288
1475
|
T.any(
|
1289
|
-
Orb::Models::Invoice::LineItem::SubLineItem::
|
1290
|
-
Orb::Models::Invoice::LineItem::SubLineItem::
|
1291
|
-
Orb::Models::Invoice::LineItem::SubLineItem::
|
1476
|
+
Orb::Models::Invoice::LineItem::SubLineItem::Matrix,
|
1477
|
+
Orb::Models::Invoice::LineItem::SubLineItem::Tier,
|
1478
|
+
Orb::Models::Invoice::LineItem::SubLineItem::Null
|
1292
1479
|
)
|
1293
1480
|
]
|
1294
1481
|
)
|
@@ -1314,12 +1501,12 @@ module Orb
|
|
1314
1501
|
adjusted_subtotal: String,
|
1315
1502
|
adjustments: T::Array[
|
1316
1503
|
T.any(
|
1317
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1504
|
+
Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount,
|
1318
1505
|
Orb::Internal::AnyHash,
|
1319
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1320
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1321
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1322
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1506
|
+
Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount,
|
1507
|
+
Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount,
|
1508
|
+
Orb::Models::Invoice::LineItem::Adjustment::Minimum,
|
1509
|
+
Orb::Models::Invoice::LineItem::Adjustment::Maximum
|
1323
1510
|
)
|
1324
1511
|
],
|
1325
1512
|
amount: String,
|
@@ -1344,45 +1531,45 @@ module Orb
|
|
1344
1531
|
partially_invoiced_amount: String,
|
1345
1532
|
price: T.nilable(
|
1346
1533
|
T.any(
|
1347
|
-
Orb::Models::Price::
|
1534
|
+
Orb::Models::Price::Unit,
|
1348
1535
|
Orb::Internal::AnyHash,
|
1349
|
-
Orb::Models::Price::
|
1350
|
-
Orb::Models::Price::
|
1351
|
-
Orb::Models::Price::
|
1352
|
-
Orb::Models::Price::
|
1353
|
-
Orb::Models::Price::
|
1354
|
-
Orb::Models::Price::
|
1355
|
-
Orb::Models::Price::
|
1356
|
-
Orb::Models::Price::
|
1357
|
-
Orb::Models::Price::
|
1358
|
-
Orb::Models::Price::
|
1359
|
-
Orb::Models::Price::
|
1360
|
-
Orb::Models::Price::
|
1361
|
-
Orb::Models::Price::
|
1362
|
-
Orb::Models::Price::
|
1363
|
-
Orb::Models::Price::
|
1364
|
-
Orb::Models::Price::
|
1365
|
-
Orb::Models::Price::
|
1366
|
-
Orb::Models::Price::
|
1367
|
-
Orb::Models::Price::
|
1368
|
-
Orb::Models::Price::
|
1369
|
-
Orb::Models::Price::
|
1370
|
-
Orb::Models::Price::
|
1371
|
-
Orb::Models::Price::
|
1372
|
-
Orb::Models::Price::
|
1373
|
-
Orb::Models::Price::
|
1374
|
-
Orb::Models::Price::
|
1375
|
-
Orb::Models::Price::
|
1536
|
+
Orb::Models::Price::Package,
|
1537
|
+
Orb::Models::Price::Matrix,
|
1538
|
+
Orb::Models::Price::Tiered,
|
1539
|
+
Orb::Models::Price::TieredBps,
|
1540
|
+
Orb::Models::Price::Bps,
|
1541
|
+
Orb::Models::Price::BulkBps,
|
1542
|
+
Orb::Models::Price::Bulk,
|
1543
|
+
Orb::Models::Price::ThresholdTotalAmount,
|
1544
|
+
Orb::Models::Price::TieredPackage,
|
1545
|
+
Orb::Models::Price::GroupedTiered,
|
1546
|
+
Orb::Models::Price::TieredWithMinimum,
|
1547
|
+
Orb::Models::Price::TieredPackageWithMinimum,
|
1548
|
+
Orb::Models::Price::PackageWithAllocation,
|
1549
|
+
Orb::Models::Price::UnitWithPercent,
|
1550
|
+
Orb::Models::Price::MatrixWithAllocation,
|
1551
|
+
Orb::Models::Price::TieredWithProration,
|
1552
|
+
Orb::Models::Price::UnitWithProration,
|
1553
|
+
Orb::Models::Price::GroupedAllocation,
|
1554
|
+
Orb::Models::Price::GroupedWithProratedMinimum,
|
1555
|
+
Orb::Models::Price::GroupedWithMeteredMinimum,
|
1556
|
+
Orb::Models::Price::MatrixWithDisplayName,
|
1557
|
+
Orb::Models::Price::BulkWithProration,
|
1558
|
+
Orb::Models::Price::GroupedTieredPackage,
|
1559
|
+
Orb::Models::Price::MaxGroupTieredPackage,
|
1560
|
+
Orb::Models::Price::ScalableMatrixWithUnitPricing,
|
1561
|
+
Orb::Models::Price::ScalableMatrixWithTieredPricing,
|
1562
|
+
Orb::Models::Price::CumulativeGroupedBulk
|
1376
1563
|
)
|
1377
1564
|
),
|
1378
1565
|
quantity: Float,
|
1379
1566
|
start_date: Time,
|
1380
1567
|
sub_line_items: T::Array[
|
1381
1568
|
T.any(
|
1382
|
-
Orb::Models::Invoice::LineItem::SubLineItem::
|
1569
|
+
Orb::Models::Invoice::LineItem::SubLineItem::Matrix,
|
1383
1570
|
Orb::Internal::AnyHash,
|
1384
|
-
Orb::Models::Invoice::LineItem::SubLineItem::
|
1385
|
-
Orb::Models::Invoice::LineItem::SubLineItem::
|
1571
|
+
Orb::Models::Invoice::LineItem::SubLineItem::Tier,
|
1572
|
+
Orb::Models::Invoice::LineItem::SubLineItem::Null
|
1386
1573
|
)
|
1387
1574
|
],
|
1388
1575
|
subtotal: String,
|
@@ -1392,27 +1579,65 @@ module Orb
|
|
1392
1579
|
.returns(T.attached_class)
|
1393
1580
|
end
|
1394
1581
|
def self.new(
|
1582
|
+
# A unique ID for this line item.
|
1395
1583
|
id:,
|
1584
|
+
# The line amount after any adjustments and before overage conversion, credits and
|
1585
|
+
# partial invoicing.
|
1396
1586
|
adjusted_subtotal:,
|
1587
|
+
# All adjustments applied to the line item in the order they were applied based on
|
1588
|
+
# invoice calculations (ie. usage discounts -> amount discounts -> percentage
|
1589
|
+
# discounts -> minimums -> maximums).
|
1397
1590
|
adjustments:,
|
1591
|
+
# The final amount for a line item after all adjustments and pre paid credits have
|
1592
|
+
# been applied.
|
1398
1593
|
amount:,
|
1594
|
+
# The number of prepaid credits applied.
|
1399
1595
|
credits_applied:,
|
1400
1596
|
discount:,
|
1597
|
+
# The end date of the range of time applied for this line item's price.
|
1401
1598
|
end_date:,
|
1599
|
+
# An additional filter that was used to calculate the usage for this line item.
|
1402
1600
|
filter:,
|
1601
|
+
# [DEPRECATED] For configured prices that are split by a grouping key, this will
|
1602
|
+
# be populated with the key and a value. The `amount` and `subtotal` will be the
|
1603
|
+
# values for this particular grouping.
|
1403
1604
|
grouping:,
|
1605
|
+
# This field is deprecated in favor of `adjustments`.
|
1404
1606
|
maximum:,
|
1607
|
+
# This field is deprecated in favor of `adjustments`.
|
1405
1608
|
maximum_amount:,
|
1609
|
+
# This field is deprecated in favor of `adjustments`.
|
1406
1610
|
minimum:,
|
1611
|
+
# This field is deprecated in favor of `adjustments`.
|
1407
1612
|
minimum_amount:,
|
1613
|
+
# The name of the price associated with this line item.
|
1408
1614
|
name:,
|
1615
|
+
# Any amount applied from a partial invoice
|
1409
1616
|
partially_invoiced_amount:,
|
1617
|
+
# The Price resource represents a price that can be billed on a subscription,
|
1618
|
+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
|
1619
|
+
# take a quantity and determine an amount to bill.
|
1620
|
+
#
|
1621
|
+
# Orb supports a few different pricing models out of the box. Each of these models
|
1622
|
+
# is serialized differently in a given Price object. The model_type field
|
1623
|
+
# determines the key for the configuration object that is present.
|
1624
|
+
#
|
1625
|
+
# For more on the types of prices, see
|
1626
|
+
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1410
1627
|
price:,
|
1628
|
+
# Either the fixed fee quantity or the usage during the service period.
|
1411
1629
|
quantity:,
|
1630
|
+
# The start date of the range of time applied for this line item's price.
|
1412
1631
|
start_date:,
|
1632
|
+
# For complex pricing structures, the line item can be broken down further in
|
1633
|
+
# `sub_line_items`.
|
1413
1634
|
sub_line_items:,
|
1635
|
+
# The line amount before before any adjustments.
|
1414
1636
|
subtotal:,
|
1637
|
+
# An array of tax rates and their incurred tax amounts. Empty if no tax
|
1638
|
+
# integration is configured.
|
1415
1639
|
tax_amounts:,
|
1640
|
+
# A list of customer ids that were used to calculate the usage for this line item.
|
1416
1641
|
usage_customer_ids:
|
1417
1642
|
); end
|
1418
1643
|
sig do
|
@@ -1423,11 +1648,11 @@ module Orb
|
|
1423
1648
|
adjusted_subtotal: String,
|
1424
1649
|
adjustments: T::Array[
|
1425
1650
|
T.any(
|
1426
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1427
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1428
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1429
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1430
|
-
Orb::Models::Invoice::LineItem::Adjustment::
|
1651
|
+
Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount,
|
1652
|
+
Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount,
|
1653
|
+
Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount,
|
1654
|
+
Orb::Models::Invoice::LineItem::Adjustment::Minimum,
|
1655
|
+
Orb::Models::Invoice::LineItem::Adjustment::Maximum
|
1431
1656
|
)
|
1432
1657
|
],
|
1433
1658
|
amount: String,
|
@@ -1451,43 +1676,43 @@ module Orb
|
|
1451
1676
|
partially_invoiced_amount: String,
|
1452
1677
|
price: T.nilable(
|
1453
1678
|
T.any(
|
1454
|
-
Orb::Models::Price::
|
1455
|
-
Orb::Models::Price::
|
1456
|
-
Orb::Models::Price::
|
1457
|
-
Orb::Models::Price::
|
1458
|
-
Orb::Models::Price::
|
1459
|
-
Orb::Models::Price::
|
1460
|
-
Orb::Models::Price::
|
1461
|
-
Orb::Models::Price::
|
1462
|
-
Orb::Models::Price::
|
1463
|
-
Orb::Models::Price::
|
1464
|
-
Orb::Models::Price::
|
1465
|
-
Orb::Models::Price::
|
1466
|
-
Orb::Models::Price::
|
1467
|
-
Orb::Models::Price::
|
1468
|
-
Orb::Models::Price::
|
1469
|
-
Orb::Models::Price::
|
1470
|
-
Orb::Models::Price::
|
1471
|
-
Orb::Models::Price::
|
1472
|
-
Orb::Models::Price::
|
1473
|
-
Orb::Models::Price::
|
1474
|
-
Orb::Models::Price::
|
1475
|
-
Orb::Models::Price::
|
1476
|
-
Orb::Models::Price::
|
1477
|
-
Orb::Models::Price::
|
1478
|
-
Orb::Models::Price::
|
1479
|
-
Orb::Models::Price::
|
1480
|
-
Orb::Models::Price::
|
1481
|
-
Orb::Models::Price::
|
1679
|
+
Orb::Models::Price::Unit,
|
1680
|
+
Orb::Models::Price::Package,
|
1681
|
+
Orb::Models::Price::Matrix,
|
1682
|
+
Orb::Models::Price::Tiered,
|
1683
|
+
Orb::Models::Price::TieredBps,
|
1684
|
+
Orb::Models::Price::Bps,
|
1685
|
+
Orb::Models::Price::BulkBps,
|
1686
|
+
Orb::Models::Price::Bulk,
|
1687
|
+
Orb::Models::Price::ThresholdTotalAmount,
|
1688
|
+
Orb::Models::Price::TieredPackage,
|
1689
|
+
Orb::Models::Price::GroupedTiered,
|
1690
|
+
Orb::Models::Price::TieredWithMinimum,
|
1691
|
+
Orb::Models::Price::TieredPackageWithMinimum,
|
1692
|
+
Orb::Models::Price::PackageWithAllocation,
|
1693
|
+
Orb::Models::Price::UnitWithPercent,
|
1694
|
+
Orb::Models::Price::MatrixWithAllocation,
|
1695
|
+
Orb::Models::Price::TieredWithProration,
|
1696
|
+
Orb::Models::Price::UnitWithProration,
|
1697
|
+
Orb::Models::Price::GroupedAllocation,
|
1698
|
+
Orb::Models::Price::GroupedWithProratedMinimum,
|
1699
|
+
Orb::Models::Price::GroupedWithMeteredMinimum,
|
1700
|
+
Orb::Models::Price::MatrixWithDisplayName,
|
1701
|
+
Orb::Models::Price::BulkWithProration,
|
1702
|
+
Orb::Models::Price::GroupedTieredPackage,
|
1703
|
+
Orb::Models::Price::MaxGroupTieredPackage,
|
1704
|
+
Orb::Models::Price::ScalableMatrixWithUnitPricing,
|
1705
|
+
Orb::Models::Price::ScalableMatrixWithTieredPricing,
|
1706
|
+
Orb::Models::Price::CumulativeGroupedBulk
|
1482
1707
|
)
|
1483
1708
|
),
|
1484
1709
|
quantity: Float,
|
1485
1710
|
start_date: Time,
|
1486
1711
|
sub_line_items: T::Array[
|
1487
1712
|
T.any(
|
1488
|
-
Orb::Models::Invoice::LineItem::SubLineItem::
|
1489
|
-
Orb::Models::Invoice::LineItem::SubLineItem::
|
1490
|
-
Orb::Models::Invoice::LineItem::SubLineItem::
|
1713
|
+
Orb::Models::Invoice::LineItem::SubLineItem::Matrix,
|
1714
|
+
Orb::Models::Invoice::LineItem::SubLineItem::Tier,
|
1715
|
+
Orb::Models::Invoice::LineItem::SubLineItem::Null
|
1491
1716
|
)
|
1492
1717
|
],
|
1493
1718
|
subtotal: String,
|
@@ -1501,7 +1726,7 @@ module Orb
|
|
1501
1726
|
module Adjustment
|
1502
1727
|
extend Orb::Internal::Type::Union
|
1503
1728
|
|
1504
|
-
class
|
1729
|
+
class UsageDiscount < Orb::Internal::Type::BaseModel
|
1505
1730
|
sig { returns(String) }
|
1506
1731
|
attr_accessor :id
|
1507
1732
|
|
@@ -1544,10 +1769,17 @@ module Orb
|
|
1544
1769
|
end
|
1545
1770
|
def self.new(
|
1546
1771
|
id:,
|
1772
|
+
# The value applied by an adjustment.
|
1547
1773
|
amount:,
|
1774
|
+
# The price IDs that this adjustment applies to.
|
1548
1775
|
applies_to_price_ids:,
|
1776
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
1777
|
+
# that apply to only one price.
|
1549
1778
|
is_invoice_level:,
|
1779
|
+
# The reason for the adjustment.
|
1550
1780
|
reason:,
|
1781
|
+
# The number of usage units by which to discount the price this adjustment applies
|
1782
|
+
# to in a given billing period.
|
1551
1783
|
usage_discount:,
|
1552
1784
|
adjustment_type: :usage_discount
|
1553
1785
|
); end
|
@@ -1568,7 +1800,7 @@ module Orb
|
|
1568
1800
|
def to_hash; end
|
1569
1801
|
end
|
1570
1802
|
|
1571
|
-
class
|
1803
|
+
class AmountDiscount < Orb::Internal::Type::BaseModel
|
1572
1804
|
sig { returns(String) }
|
1573
1805
|
attr_accessor :id
|
1574
1806
|
|
@@ -1611,10 +1843,17 @@ module Orb
|
|
1611
1843
|
end
|
1612
1844
|
def self.new(
|
1613
1845
|
id:,
|
1846
|
+
# The value applied by an adjustment.
|
1614
1847
|
amount:,
|
1848
|
+
# The amount by which to discount the prices this adjustment applies to in a given
|
1849
|
+
# billing period.
|
1615
1850
|
amount_discount:,
|
1851
|
+
# The price IDs that this adjustment applies to.
|
1616
1852
|
applies_to_price_ids:,
|
1853
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
1854
|
+
# that apply to only one price.
|
1617
1855
|
is_invoice_level:,
|
1856
|
+
# The reason for the adjustment.
|
1618
1857
|
reason:,
|
1619
1858
|
adjustment_type: :amount_discount
|
1620
1859
|
); end
|
@@ -1635,7 +1874,7 @@ module Orb
|
|
1635
1874
|
def to_hash; end
|
1636
1875
|
end
|
1637
1876
|
|
1638
|
-
class
|
1877
|
+
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
1639
1878
|
sig { returns(String) }
|
1640
1879
|
attr_accessor :id
|
1641
1880
|
|
@@ -1678,10 +1917,17 @@ module Orb
|
|
1678
1917
|
end
|
1679
1918
|
def self.new(
|
1680
1919
|
id:,
|
1920
|
+
# The value applied by an adjustment.
|
1681
1921
|
amount:,
|
1922
|
+
# The price IDs that this adjustment applies to.
|
1682
1923
|
applies_to_price_ids:,
|
1924
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
1925
|
+
# that apply to only one price.
|
1683
1926
|
is_invoice_level:,
|
1927
|
+
# The percentage (as a value between 0 and 1) by which to discount the price
|
1928
|
+
# intervals this adjustment applies to in a given billing period.
|
1684
1929
|
percentage_discount:,
|
1930
|
+
# The reason for the adjustment.
|
1685
1931
|
reason:,
|
1686
1932
|
adjustment_type: :percentage_discount
|
1687
1933
|
); end
|
@@ -1702,7 +1948,7 @@ module Orb
|
|
1702
1948
|
def to_hash; end
|
1703
1949
|
end
|
1704
1950
|
|
1705
|
-
class
|
1951
|
+
class Minimum < Orb::Internal::Type::BaseModel
|
1706
1952
|
sig { returns(String) }
|
1707
1953
|
attr_accessor :id
|
1708
1954
|
|
@@ -1750,11 +1996,19 @@ module Orb
|
|
1750
1996
|
end
|
1751
1997
|
def self.new(
|
1752
1998
|
id:,
|
1999
|
+
# The value applied by an adjustment.
|
1753
2000
|
amount:,
|
2001
|
+
# The price IDs that this adjustment applies to.
|
1754
2002
|
applies_to_price_ids:,
|
2003
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
2004
|
+
# that apply to only one price.
|
1755
2005
|
is_invoice_level:,
|
2006
|
+
# The item ID that revenue from this minimum will be attributed to.
|
1756
2007
|
item_id:,
|
2008
|
+
# The minimum amount to charge in a given billing period for the prices this
|
2009
|
+
# adjustment applies to.
|
1757
2010
|
minimum_amount:,
|
2011
|
+
# The reason for the adjustment.
|
1758
2012
|
reason:,
|
1759
2013
|
adjustment_type: :minimum
|
1760
2014
|
); end
|
@@ -1776,7 +2030,7 @@ module Orb
|
|
1776
2030
|
def to_hash; end
|
1777
2031
|
end
|
1778
2032
|
|
1779
|
-
class
|
2033
|
+
class Maximum < Orb::Internal::Type::BaseModel
|
1780
2034
|
sig { returns(String) }
|
1781
2035
|
attr_accessor :id
|
1782
2036
|
|
@@ -1819,10 +2073,17 @@ module Orb
|
|
1819
2073
|
end
|
1820
2074
|
def self.new(
|
1821
2075
|
id:,
|
2076
|
+
# The value applied by an adjustment.
|
1822
2077
|
amount:,
|
2078
|
+
# The price IDs that this adjustment applies to.
|
1823
2079
|
applies_to_price_ids:,
|
2080
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
2081
|
+
# that apply to only one price.
|
1824
2082
|
is_invoice_level:,
|
2083
|
+
# The maximum amount to charge in a given billing period for the prices this
|
2084
|
+
# adjustment applies to.
|
1825
2085
|
maximum_amount:,
|
2086
|
+
# The reason for the adjustment.
|
1826
2087
|
reason:,
|
1827
2088
|
adjustment_type: :maximum
|
1828
2089
|
); end
|
@@ -1846,7 +2107,7 @@ module Orb
|
|
1846
2107
|
sig do
|
1847
2108
|
override
|
1848
2109
|
.returns(
|
1849
|
-
[Orb::Models::Invoice::LineItem::Adjustment::
|
2110
|
+
[Orb::Models::Invoice::LineItem::Adjustment::UsageDiscount, Orb::Models::Invoice::LineItem::Adjustment::AmountDiscount, Orb::Models::Invoice::LineItem::Adjustment::PercentageDiscount, Orb::Models::Invoice::LineItem::Adjustment::Minimum, Orb::Models::Invoice::LineItem::Adjustment::Maximum]
|
1850
2111
|
)
|
1851
2112
|
end
|
1852
2113
|
def self.variants; end
|
@@ -1866,8 +2127,13 @@ module Orb
|
|
1866
2127
|
sig do
|
1867
2128
|
params(applies_to_price_ids: T::Array[String], maximum_amount: String).returns(T.attached_class)
|
1868
2129
|
end
|
1869
|
-
def self.new(
|
1870
|
-
|
2130
|
+
def self.new(
|
2131
|
+
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
2132
|
+
# maximums, this can be a subset of prices.
|
2133
|
+
applies_to_price_ids:,
|
2134
|
+
# Maximum amount applied
|
2135
|
+
maximum_amount:
|
2136
|
+
); end
|
1871
2137
|
sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) }
|
1872
2138
|
def to_hash; end
|
1873
2139
|
end
|
@@ -1886,8 +2152,13 @@ module Orb
|
|
1886
2152
|
sig do
|
1887
2153
|
params(applies_to_price_ids: T::Array[String], minimum_amount: String).returns(T.attached_class)
|
1888
2154
|
end
|
1889
|
-
def self.new(
|
1890
|
-
|
2155
|
+
def self.new(
|
2156
|
+
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
2157
|
+
# minimums, this can be a subset of prices.
|
2158
|
+
applies_to_price_ids:,
|
2159
|
+
# Minimum amount applied
|
2160
|
+
minimum_amount:
|
2161
|
+
); end
|
1891
2162
|
sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) }
|
1892
2163
|
def to_hash; end
|
1893
2164
|
end
|
@@ -1895,33 +2166,28 @@ module Orb
|
|
1895
2166
|
module SubLineItem
|
1896
2167
|
extend Orb::Internal::Type::Union
|
1897
2168
|
|
1898
|
-
class
|
2169
|
+
class Matrix < Orb::Internal::Type::BaseModel
|
1899
2170
|
# The total amount for this sub line item.
|
1900
2171
|
sig { returns(String) }
|
1901
2172
|
attr_accessor :amount
|
1902
2173
|
|
1903
|
-
sig { returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::
|
2174
|
+
sig { returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::Matrix::Grouping)) }
|
1904
2175
|
attr_reader :grouping
|
1905
2176
|
|
1906
2177
|
sig do
|
1907
2178
|
params(
|
1908
|
-
grouping: T.nilable(
|
1909
|
-
T.any(Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::Grouping, Orb::Internal::AnyHash)
|
1910
|
-
)
|
2179
|
+
grouping: T.nilable(T.any(Orb::Models::Invoice::LineItem::SubLineItem::Matrix::Grouping, Orb::Internal::AnyHash))
|
1911
2180
|
)
|
1912
2181
|
.void
|
1913
2182
|
end
|
1914
2183
|
attr_writer :grouping
|
1915
2184
|
|
1916
|
-
sig { returns(Orb::Models::Invoice::LineItem::SubLineItem::
|
2185
|
+
sig { returns(Orb::Models::Invoice::LineItem::SubLineItem::Matrix::MatrixConfig) }
|
1917
2186
|
attr_reader :matrix_config
|
1918
2187
|
|
1919
2188
|
sig do
|
1920
2189
|
params(
|
1921
|
-
matrix_config: T.any(
|
1922
|
-
Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig,
|
1923
|
-
Orb::Internal::AnyHash
|
1924
|
-
)
|
2190
|
+
matrix_config: T.any(Orb::Models::Invoice::LineItem::SubLineItem::Matrix::MatrixConfig, Orb::Internal::AnyHash)
|
1925
2191
|
)
|
1926
2192
|
.void
|
1927
2193
|
end
|
@@ -1939,28 +2205,30 @@ module Orb
|
|
1939
2205
|
sig do
|
1940
2206
|
params(
|
1941
2207
|
amount: String,
|
1942
|
-
grouping: T.nilable(
|
1943
|
-
|
1944
|
-
),
|
1945
|
-
matrix_config: T.any(
|
1946
|
-
Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig,
|
1947
|
-
Orb::Internal::AnyHash
|
1948
|
-
),
|
2208
|
+
grouping: T.nilable(T.any(Orb::Models::Invoice::LineItem::SubLineItem::Matrix::Grouping, Orb::Internal::AnyHash)),
|
2209
|
+
matrix_config: T.any(Orb::Models::Invoice::LineItem::SubLineItem::Matrix::MatrixConfig, Orb::Internal::AnyHash),
|
1949
2210
|
name: String,
|
1950
2211
|
quantity: Float,
|
1951
2212
|
type: Symbol
|
1952
2213
|
)
|
1953
2214
|
.returns(T.attached_class)
|
1954
2215
|
end
|
1955
|
-
def self.new(
|
1956
|
-
|
2216
|
+
def self.new(
|
2217
|
+
# The total amount for this sub line item.
|
2218
|
+
amount:,
|
2219
|
+
grouping:,
|
2220
|
+
matrix_config:,
|
2221
|
+
name:,
|
2222
|
+
quantity:,
|
2223
|
+
type: :matrix
|
2224
|
+
); end
|
1957
2225
|
sig do
|
1958
2226
|
override
|
1959
2227
|
.returns(
|
1960
2228
|
{
|
1961
2229
|
amount: String,
|
1962
|
-
grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::
|
1963
|
-
matrix_config: Orb::Models::Invoice::LineItem::SubLineItem::
|
2230
|
+
grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::Matrix::Grouping),
|
2231
|
+
matrix_config: Orb::Models::Invoice::LineItem::SubLineItem::Matrix::MatrixConfig,
|
1964
2232
|
name: String,
|
1965
2233
|
quantity: Float,
|
1966
2234
|
type: Symbol
|
@@ -1978,8 +2246,11 @@ module Orb
|
|
1978
2246
|
attr_accessor :value
|
1979
2247
|
|
1980
2248
|
sig { params(key: String, value: T.nilable(String)).returns(T.attached_class) }
|
1981
|
-
def self.new(
|
1982
|
-
|
2249
|
+
def self.new(
|
2250
|
+
key:,
|
2251
|
+
# No value indicates the default group
|
2252
|
+
value:
|
2253
|
+
); end
|
1983
2254
|
sig { override.returns({key: String, value: T.nilable(String)}) }
|
1984
2255
|
def to_hash; end
|
1985
2256
|
end
|
@@ -1990,26 +2261,26 @@ module Orb
|
|
1990
2261
|
attr_accessor :dimension_values
|
1991
2262
|
|
1992
2263
|
sig { params(dimension_values: T::Array[T.nilable(String)]).returns(T.attached_class) }
|
1993
|
-
def self.new(
|
1994
|
-
|
2264
|
+
def self.new(
|
2265
|
+
# The ordered dimension values for this line item.
|
2266
|
+
dimension_values:
|
2267
|
+
); end
|
1995
2268
|
sig { override.returns({dimension_values: T::Array[T.nilable(String)]}) }
|
1996
2269
|
def to_hash; end
|
1997
2270
|
end
|
1998
2271
|
end
|
1999
2272
|
|
2000
|
-
class
|
2273
|
+
class Tier < Orb::Internal::Type::BaseModel
|
2001
2274
|
# The total amount for this sub line item.
|
2002
2275
|
sig { returns(String) }
|
2003
2276
|
attr_accessor :amount
|
2004
2277
|
|
2005
|
-
sig { returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::
|
2278
|
+
sig { returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::Tier::Grouping)) }
|
2006
2279
|
attr_reader :grouping
|
2007
2280
|
|
2008
2281
|
sig do
|
2009
2282
|
params(
|
2010
|
-
grouping: T.nilable(
|
2011
|
-
T.any(Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping, Orb::Internal::AnyHash)
|
2012
|
-
)
|
2283
|
+
grouping: T.nilable(T.any(Orb::Models::Invoice::LineItem::SubLineItem::Tier::Grouping, Orb::Internal::AnyHash))
|
2013
2284
|
)
|
2014
2285
|
.void
|
2015
2286
|
end
|
@@ -2021,12 +2292,12 @@ module Orb
|
|
2021
2292
|
sig { returns(Float) }
|
2022
2293
|
attr_accessor :quantity
|
2023
2294
|
|
2024
|
-
sig { returns(Orb::Models::Invoice::LineItem::SubLineItem::
|
2295
|
+
sig { returns(Orb::Models::Invoice::LineItem::SubLineItem::Tier::TierConfig) }
|
2025
2296
|
attr_reader :tier_config
|
2026
2297
|
|
2027
2298
|
sig do
|
2028
2299
|
params(
|
2029
|
-
tier_config: T.any(Orb::Models::Invoice::LineItem::SubLineItem::
|
2300
|
+
tier_config: T.any(Orb::Models::Invoice::LineItem::SubLineItem::Tier::TierConfig, Orb::Internal::AnyHash)
|
2030
2301
|
)
|
2031
2302
|
.void
|
2032
2303
|
end
|
@@ -2038,27 +2309,32 @@ module Orb
|
|
2038
2309
|
sig do
|
2039
2310
|
params(
|
2040
2311
|
amount: String,
|
2041
|
-
grouping: T.nilable(
|
2042
|
-
T.any(Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem::Grouping, Orb::Internal::AnyHash)
|
2043
|
-
),
|
2312
|
+
grouping: T.nilable(T.any(Orb::Models::Invoice::LineItem::SubLineItem::Tier::Grouping, Orb::Internal::AnyHash)),
|
2044
2313
|
name: String,
|
2045
2314
|
quantity: Float,
|
2046
|
-
tier_config: T.any(Orb::Models::Invoice::LineItem::SubLineItem::
|
2315
|
+
tier_config: T.any(Orb::Models::Invoice::LineItem::SubLineItem::Tier::TierConfig, Orb::Internal::AnyHash),
|
2047
2316
|
type: Symbol
|
2048
2317
|
)
|
2049
2318
|
.returns(T.attached_class)
|
2050
2319
|
end
|
2051
|
-
def self.new(
|
2052
|
-
|
2320
|
+
def self.new(
|
2321
|
+
# The total amount for this sub line item.
|
2322
|
+
amount:,
|
2323
|
+
grouping:,
|
2324
|
+
name:,
|
2325
|
+
quantity:,
|
2326
|
+
tier_config:,
|
2327
|
+
type: :tier
|
2328
|
+
); end
|
2053
2329
|
sig do
|
2054
2330
|
override
|
2055
2331
|
.returns(
|
2056
2332
|
{
|
2057
2333
|
amount: String,
|
2058
|
-
grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::
|
2334
|
+
grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::Tier::Grouping),
|
2059
2335
|
name: String,
|
2060
2336
|
quantity: Float,
|
2061
|
-
tier_config: Orb::Models::Invoice::LineItem::SubLineItem::
|
2337
|
+
tier_config: Orb::Models::Invoice::LineItem::SubLineItem::Tier::TierConfig,
|
2062
2338
|
type: Symbol
|
2063
2339
|
}
|
2064
2340
|
)
|
@@ -2074,8 +2350,11 @@ module Orb
|
|
2074
2350
|
attr_accessor :value
|
2075
2351
|
|
2076
2352
|
sig { params(key: String, value: T.nilable(String)).returns(T.attached_class) }
|
2077
|
-
def self.new(
|
2078
|
-
|
2353
|
+
def self.new(
|
2354
|
+
key:,
|
2355
|
+
# No value indicates the default group
|
2356
|
+
value:
|
2357
|
+
); end
|
2079
2358
|
sig { override.returns({key: String, value: T.nilable(String)}) }
|
2080
2359
|
def to_hash; end
|
2081
2360
|
end
|
@@ -2104,19 +2383,17 @@ module Orb
|
|
2104
2383
|
end
|
2105
2384
|
end
|
2106
2385
|
|
2107
|
-
class
|
2386
|
+
class Null < Orb::Internal::Type::BaseModel
|
2108
2387
|
# The total amount for this sub line item.
|
2109
2388
|
sig { returns(String) }
|
2110
2389
|
attr_accessor :amount
|
2111
2390
|
|
2112
|
-
sig { returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::
|
2391
|
+
sig { returns(T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::Null::Grouping)) }
|
2113
2392
|
attr_reader :grouping
|
2114
2393
|
|
2115
2394
|
sig do
|
2116
2395
|
params(
|
2117
|
-
grouping: T.nilable(
|
2118
|
-
T.any(Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping, Orb::Internal::AnyHash)
|
2119
|
-
)
|
2396
|
+
grouping: T.nilable(T.any(Orb::Models::Invoice::LineItem::SubLineItem::Null::Grouping, Orb::Internal::AnyHash))
|
2120
2397
|
)
|
2121
2398
|
.void
|
2122
2399
|
end
|
@@ -2134,23 +2411,27 @@ module Orb
|
|
2134
2411
|
sig do
|
2135
2412
|
params(
|
2136
2413
|
amount: String,
|
2137
|
-
grouping: T.nilable(
|
2138
|
-
T.any(Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem::Grouping, Orb::Internal::AnyHash)
|
2139
|
-
),
|
2414
|
+
grouping: T.nilable(T.any(Orb::Models::Invoice::LineItem::SubLineItem::Null::Grouping, Orb::Internal::AnyHash)),
|
2140
2415
|
name: String,
|
2141
2416
|
quantity: Float,
|
2142
2417
|
type: Symbol
|
2143
2418
|
)
|
2144
2419
|
.returns(T.attached_class)
|
2145
2420
|
end
|
2146
|
-
def self.new(
|
2147
|
-
|
2421
|
+
def self.new(
|
2422
|
+
# The total amount for this sub line item.
|
2423
|
+
amount:,
|
2424
|
+
grouping:,
|
2425
|
+
name:,
|
2426
|
+
quantity:,
|
2427
|
+
type: :"'null'"
|
2428
|
+
); end
|
2148
2429
|
sig do
|
2149
2430
|
override
|
2150
2431
|
.returns(
|
2151
2432
|
{
|
2152
2433
|
amount: String,
|
2153
|
-
grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::
|
2434
|
+
grouping: T.nilable(Orb::Models::Invoice::LineItem::SubLineItem::Null::Grouping),
|
2154
2435
|
name: String,
|
2155
2436
|
quantity: Float,
|
2156
2437
|
type: Symbol
|
@@ -2168,8 +2449,11 @@ module Orb
|
|
2168
2449
|
attr_accessor :value
|
2169
2450
|
|
2170
2451
|
sig { params(key: String, value: T.nilable(String)).returns(T.attached_class) }
|
2171
|
-
def self.new(
|
2172
|
-
|
2452
|
+
def self.new(
|
2453
|
+
key:,
|
2454
|
+
# No value indicates the default group
|
2455
|
+
value:
|
2456
|
+
); end
|
2173
2457
|
sig { override.returns({key: String, value: T.nilable(String)}) }
|
2174
2458
|
def to_hash; end
|
2175
2459
|
end
|
@@ -2178,7 +2462,7 @@ module Orb
|
|
2178
2462
|
sig do
|
2179
2463
|
override
|
2180
2464
|
.returns(
|
2181
|
-
[Orb::Models::Invoice::LineItem::SubLineItem::
|
2465
|
+
[Orb::Models::Invoice::LineItem::SubLineItem::Matrix, Orb::Models::Invoice::LineItem::SubLineItem::Tier, Orb::Models::Invoice::LineItem::SubLineItem::Null]
|
2182
2466
|
)
|
2183
2467
|
end
|
2184
2468
|
def self.variants; end
|
@@ -2201,8 +2485,14 @@ module Orb
|
|
2201
2485
|
params(amount: String, tax_rate_description: String, tax_rate_percentage: T.nilable(String))
|
2202
2486
|
.returns(T.attached_class)
|
2203
2487
|
end
|
2204
|
-
def self.new(
|
2205
|
-
|
2488
|
+
def self.new(
|
2489
|
+
# The amount of additional tax incurred by this tax rate.
|
2490
|
+
amount:,
|
2491
|
+
# The human-readable description of the applied tax rate.
|
2492
|
+
tax_rate_description:,
|
2493
|
+
# The tax rate percentage, out of 100.
|
2494
|
+
tax_rate_percentage:
|
2495
|
+
); end
|
2206
2496
|
sig do
|
2207
2497
|
override.returns(
|
2208
2498
|
{
|
@@ -2229,8 +2519,13 @@ module Orb
|
|
2229
2519
|
sig do
|
2230
2520
|
params(applies_to_price_ids: T::Array[String], maximum_amount: String).returns(T.attached_class)
|
2231
2521
|
end
|
2232
|
-
def self.new(
|
2233
|
-
|
2522
|
+
def self.new(
|
2523
|
+
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
2524
|
+
# maximums, this can be a subset of prices.
|
2525
|
+
applies_to_price_ids:,
|
2526
|
+
# Maximum amount applied
|
2527
|
+
maximum_amount:
|
2528
|
+
); end
|
2234
2529
|
sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) }
|
2235
2530
|
def to_hash; end
|
2236
2531
|
end
|
@@ -2248,8 +2543,13 @@ module Orb
|
|
2248
2543
|
sig do
|
2249
2544
|
params(applies_to_price_ids: T::Array[String], minimum_amount: String).returns(T.attached_class)
|
2250
2545
|
end
|
2251
|
-
def self.new(
|
2252
|
-
|
2546
|
+
def self.new(
|
2547
|
+
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
2548
|
+
# minimums, this can be a subset of prices.
|
2549
|
+
applies_to_price_ids:,
|
2550
|
+
# Minimum amount applied
|
2551
|
+
minimum_amount:
|
2552
|
+
); end
|
2253
2553
|
sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) }
|
2254
2554
|
def to_hash; end
|
2255
2555
|
end
|
@@ -2290,8 +2590,20 @@ module Orb
|
|
2290
2590
|
)
|
2291
2591
|
.returns(T.attached_class)
|
2292
2592
|
end
|
2293
|
-
def self.new(
|
2294
|
-
|
2593
|
+
def self.new(
|
2594
|
+
# The ID of the payment attempt.
|
2595
|
+
id:,
|
2596
|
+
# The amount of the payment attempt.
|
2597
|
+
amount:,
|
2598
|
+
# The time at which the payment attempt was created.
|
2599
|
+
created_at:,
|
2600
|
+
# The payment provider that attempted to collect the payment.
|
2601
|
+
payment_provider:,
|
2602
|
+
# The ID of the payment attempt in the payment provider.
|
2603
|
+
payment_provider_id:,
|
2604
|
+
# Whether the payment attempt succeeded.
|
2605
|
+
succeeded:
|
2606
|
+
); end
|
2295
2607
|
sig do
|
2296
2608
|
override
|
2297
2609
|
.returns(
|
@@ -2312,8 +2624,7 @@ module Orb
|
|
2312
2624
|
extend Orb::Internal::Type::Enum
|
2313
2625
|
|
2314
2626
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::Invoice::PaymentAttempt::PaymentProvider) }
|
2315
|
-
OrSymbol =
|
2316
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol) }
|
2627
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
2317
2628
|
|
2318
2629
|
STRIPE = T.let(:stripe, Orb::Models::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol)
|
2319
2630
|
|
@@ -2374,7 +2685,7 @@ module Orb
|
|
2374
2685
|
extend Orb::Internal::Type::Enum
|
2375
2686
|
|
2376
2687
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::Invoice::Status) }
|
2377
|
-
OrSymbol = T.type_alias { T.any(Symbol, String
|
2688
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
2378
2689
|
|
2379
2690
|
ISSUED = T.let(:issued, Orb::Models::Invoice::Status::TaggedSymbol)
|
2380
2691
|
PAID = T.let(:paid, Orb::Models::Invoice::Status::TaggedSymbol)
|