orb-billing 0.1.3 → 0.3.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/.ignore +2 -0
- data/CHANGELOG.md +65 -0
- data/README.md +61 -51
- data/lib/orb/client.rb +7 -6
- data/lib/orb/file_part.rb +55 -0
- data/lib/orb/internal/page.rb +37 -39
- data/lib/orb/internal/transport/base_client.rb +21 -11
- data/lib/orb/internal/transport/pooled_net_requester.rb +3 -3
- data/lib/orb/internal/type/array_of.rb +28 -2
- data/lib/orb/internal/type/base_model.rb +83 -21
- data/lib/orb/internal/type/base_page.rb +10 -1
- data/lib/orb/internal/type/boolean.rb +6 -0
- data/lib/orb/internal/type/converter.rb +28 -1
- data/lib/orb/internal/type/enum.rb +28 -8
- data/lib/orb/internal/type/{io_like.rb → file_input.rb} +35 -15
- data/lib/orb/internal/type/hash_of.rb +28 -2
- data/lib/orb/internal/type/request_parameters.rb +1 -2
- data/lib/orb/internal/type/union.rb +27 -4
- data/lib/orb/internal/type/unknown.rb +6 -0
- data/lib/orb/internal/util.rb +105 -70
- data/lib/orb/internal.rb +5 -2
- 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 +24 -29
- 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 +211 -252
- 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 +207 -250
- data/lib/orb/models/customer_update_params.rb +207 -250
- 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 +22 -26
- data/lib/orb/models/customers/cost_list_params.rb +17 -17
- data/lib/orb/models/customers/cost_list_response.rb +22 -26
- 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 +300 -406
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +63 -66
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +300 -406
- 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 +300 -406
- data/lib/orb/models/customers/credits/ledger_list_params.rb +32 -48
- data/lib/orb/models/customers/credits/ledger_list_response.rb +300 -406
- 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 +589 -637
- 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 +584 -631
- 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 +247 -269
- 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 +250 -279
- data/lib/orb/models/plan_create_params.rb +1623 -1984
- 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 +2709 -3820
- 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 +343 -382
- data/lib/orb/models/subscription_cancel_params.rb +16 -16
- data/lib/orb/models/subscription_cancel_response.rb +339 -377
- data/lib/orb/models/subscription_change_apply_params.rb +7 -10
- data/lib/orb/models/subscription_change_apply_response.rb +365 -398
- data/lib/orb/models/subscription_change_cancel_params.rb +3 -8
- data/lib/orb/models/subscription_change_cancel_response.rb +365 -398
- data/lib/orb/models/subscription_change_retrieve_params.rb +3 -8
- data/lib/orb/models/subscription_change_retrieve_response.rb +366 -398
- data/lib/orb/models/subscription_create_params.rb +3771 -4402
- data/lib/orb/models/subscription_create_response.rb +339 -377
- data/lib/orb/models/subscription_fetch_costs_params.rb +17 -17
- data/lib/orb/models/subscription_fetch_costs_response.rb +22 -26
- 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 +2018 -2472
- data/lib/orb/models/subscription_price_intervals_response.rb +342 -377
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +3764 -4392
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +342 -377
- data/lib/orb/models/subscription_trigger_phase_params.rb +12 -10
- data/lib/orb/models/subscription_trigger_phase_response.rb +341 -377
- data/lib/orb/models/subscription_unschedule_cancellation_params.rb +3 -8
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +342 -377
- 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 +343 -377
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +3 -8
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +343 -377
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +22 -33
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +342 -377
- 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 +341 -377
- 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/request_options.rb +3 -4
- data/lib/orb/resources/alerts.rb +48 -17
- data/lib/orb/resources/coupons/subscriptions.rb +9 -2
- data/lib/orb/resources/coupons.rb +25 -7
- 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 +108 -28
- 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 +135 -36
- 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 +7 -1
- data/lib/orb/resources/prices.rb +97 -22
- 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/client.rbi +7 -6
- data/rbi/lib/orb/file_part.rbi +34 -0
- data/rbi/lib/orb/internal/page.rbi +1 -0
- data/rbi/lib/orb/internal/transport/base_client.rbi +18 -3
- data/rbi/lib/orb/internal/type/array_of.rbi +15 -9
- data/rbi/lib/orb/internal/type/base_model.rbi +22 -0
- data/rbi/lib/orb/internal/type/base_page.rbi +2 -0
- data/rbi/lib/orb/internal/type/boolean.rbi +4 -5
- data/rbi/lib/orb/internal/type/converter.rbi +8 -0
- data/rbi/lib/orb/internal/type/enum.rbi +7 -6
- data/rbi/lib/orb/internal/type/{io_like.rbi → file_input.rbi} +9 -7
- data/rbi/lib/orb/internal/type/hash_of.rbi +15 -9
- data/rbi/lib/orb/internal/type/union.rbi +7 -0
- data/rbi/lib/orb/internal/type/unknown.rbi +4 -5
- data/rbi/lib/orb/internal/util.rbi +39 -19
- data/rbi/lib/orb/internal.rbi +1 -2
- data/rbi/lib/orb/models/alert.rbi +28 -8
- data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +16 -6
- data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +16 -6
- data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +16 -6
- data/rbi/lib/orb/models/alert_disable_params.rbi +5 -2
- data/rbi/lib/orb/models/alert_enable_params.rbi +5 -2
- data/rbi/lib/orb/models/alert_list_params.rbi +6 -0
- data/rbi/lib/orb/models/alert_update_params.rbi +11 -4
- data/rbi/lib/orb/models/amount_discount.rbi +10 -4
- data/rbi/lib/orb/models/billable_metric.rbi +16 -3
- data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +1 -1
- data/rbi/lib/orb/models/coupon.rbi +10 -3
- data/rbi/lib/orb/models/coupon_create_params.rbi +6 -3
- data/rbi/lib/orb/models/coupon_list_params.rbi +13 -3
- data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +8 -2
- data/rbi/lib/orb/models/credit_note.rbi +44 -12
- data/rbi/lib/orb/models/credit_note_create_params.rbi +15 -6
- data/rbi/lib/orb/models/credit_note_list_params.rbi +3 -0
- data/rbi/lib/orb/models/customer.rbi +130 -11
- data/rbi/lib/orb/models/customer_create_params.rbi +142 -8
- data/rbi/lib/orb/models/customer_list_params.rbi +3 -0
- data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +140 -8
- data/rbi/lib/orb/models/customer_update_params.rbi +140 -8
- data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +8 -4
- data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +18 -8
- data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +3 -0
- data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +18 -8
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +9 -5
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +21 -4
- data/rbi/lib/orb/models/customers/cost_list_params.rbi +9 -5
- data/rbi/lib/orb/models/customers/cost_list_response.rbi +21 -4
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +13 -3
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +1 -2
- data/rbi/lib/orb/models/customers/credit_list_params.rbi +13 -3
- data/rbi/lib/orb/models/customers/credit_list_response.rbi +1 -2
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +40 -18
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +40 -6
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -16
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +6 -4
- data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +35 -56
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +27 -10
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +25 -10
- data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +27 -4
- data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +25 -10
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +8 -2
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +25 -10
- data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +8 -2
- data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +25 -4
- data/rbi/lib/orb/models/dimensional_price_group.rbi +11 -3
- data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +4 -0
- data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +8 -2
- data/rbi/lib/orb/models/evaluate_price_group.rbi +8 -2
- data/rbi/lib/orb/models/event_deprecate_response.rbi +4 -2
- data/rbi/lib/orb/models/event_ingest_params.rbi +22 -5
- data/rbi/lib/orb/models/event_ingest_response.rbi +15 -4
- data/rbi/lib/orb/models/event_search_params.rbi +14 -2
- data/rbi/lib/orb/models/event_search_response.rbi +14 -3
- data/rbi/lib/orb/models/event_update_params.rbi +10 -3
- data/rbi/lib/orb/models/event_update_response.rbi +4 -2
- data/rbi/lib/orb/models/events/backfill_close_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_create_params.rbi +18 -0
- data/rbi/lib/orb/models/events/backfill_create_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_list_params.rbi +8 -2
- data/rbi/lib/orb/models/events/backfill_list_response.rbi +14 -2
- data/rbi/lib/orb/models/events/backfill_revert_response.rbi +14 -2
- data/rbi/lib/orb/models/events/event_volumes.rbi +6 -2
- data/rbi/lib/orb/models/events/volume_list_params.rbi +18 -2
- data/rbi/lib/orb/models/invoice.rbi +375 -46
- data/rbi/lib/orb/models/invoice_create_params.rbi +38 -6
- data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +375 -66
- data/rbi/lib/orb/models/invoice_issue_params.rbi +9 -2
- data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +16 -2
- data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +141 -20
- data/rbi/lib/orb/models/invoice_list_params.rbi +9 -2
- data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +9 -2
- data/rbi/lib/orb/models/invoice_update_params.rbi +7 -2
- data/rbi/lib/orb/models/item.rbi +1 -2
- data/rbi/lib/orb/models/item_create_params.rbi +5 -2
- data/rbi/lib/orb/models/item_list_params.rbi +8 -2
- data/rbi/lib/orb/models/item_update_params.rbi +1 -8
- data/rbi/lib/orb/models/metric_create_params.rbi +15 -2
- data/rbi/lib/orb/models/metric_list_params.rbi +3 -0
- data/rbi/lib/orb/models/metric_update_params.rbi +7 -2
- data/rbi/lib/orb/models/percentage_discount.rbi +11 -4
- data/rbi/lib/orb/models/plan.rbi +102 -15
- data/rbi/lib/orb/models/plan_create_params.rbi +997 -679
- data/rbi/lib/orb/models/plan_list_params.rbi +5 -1
- data/rbi/lib/orb/models/plan_update_params.rbi +11 -2
- data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +11 -2
- data/rbi/lib/orb/models/price.rbi +717 -688
- data/rbi/lib/orb/models/price_create_params.rbi +137 -53
- data/rbi/lib/orb/models/price_evaluate_params.rbi +10 -0
- data/rbi/lib/orb/models/price_list_params.rbi +8 -2
- data/rbi/lib/orb/models/price_update_params.rbi +7 -2
- data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +7 -2
- data/rbi/lib/orb/models/subscription.rbi +174 -11
- data/rbi/lib/orb/models/subscription_cancel_params.rbi +8 -5
- data/rbi/lib/orb/models/subscription_cancel_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_change_apply_params.rbi +7 -2
- data/rbi/lib/orb/models/subscription_change_apply_response.rbi +199 -18
- data/rbi/lib/orb/models/subscription_change_cancel_response.rbi +199 -18
- data/rbi/lib/orb/models/subscription_change_retrieve_response.rbi +199 -18
- data/rbi/lib/orb/models/subscription_create_params.rbi +2282 -1536
- data/rbi/lib/orb/models/subscription_create_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +9 -5
- data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +21 -4
- data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +3 -0
- data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +8 -2
- data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +13 -4
- data/rbi/lib/orb/models/subscription_list_params.rbi +4 -2
- data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +1228 -861
- data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +2288 -1544
- data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +10 -2
- data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +5 -2
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +187 -20
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +11 -2
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_update_params.rbi +15 -0
- data/rbi/lib/orb/models/subscription_update_trial_params.rbi +11 -5
- data/rbi/lib/orb/models/subscription_update_trial_response.rbi +187 -14
- data/rbi/lib/orb/models/subscription_usage.rbi +2 -16
- data/rbi/lib/orb/models/trial_discount.rbi +5 -1
- data/rbi/lib/orb/models/usage_discount.rbi +11 -3
- 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 +4 -0
- data/sig/orb/internal/type/base_model.rbs +12 -0
- data/sig/orb/internal/type/converter.rbs +4 -0
- data/sig/orb/internal/type/enum.rbs +4 -2
- data/sig/orb/internal/type/{io_like.rbs → file_input.rbs} +1 -1
- data/sig/orb/internal/type/hash_of.rbs +4 -0
- data/sig/orb/internal/type/union.rbs +4 -0
- data/sig/orb/internal/util.rbs +16 -12
- data/sig/orb/internal.rbs +1 -1
- metadata +9 -5
@@ -398,45 +398,199 @@ module Orb
|
|
398
398
|
end
|
399
399
|
def self.new(
|
400
400
|
id:,
|
401
|
+
# This is the final amount required to be charged to the customer and reflects the
|
402
|
+
# application of the customer balance to the `total` of the invoice.
|
401
403
|
amount_due:,
|
402
404
|
auto_collection:,
|
403
405
|
billing_address:,
|
406
|
+
# The creation time of the resource in Orb.
|
404
407
|
created_at:,
|
408
|
+
# A list of credit notes associated with the invoice
|
405
409
|
credit_notes:,
|
410
|
+
# An ISO 4217 currency string or `credits`
|
406
411
|
currency:,
|
407
412
|
customer:,
|
408
413
|
customer_balance_transactions:,
|
414
|
+
# Tax IDs are commonly required to be displayed on customer invoices, which are
|
415
|
+
# added to the headers of invoices.
|
416
|
+
#
|
417
|
+
# ### Supported Tax ID Countries and Types
|
418
|
+
#
|
419
|
+
# | Country | Type | Description |
|
420
|
+
# | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
|
421
|
+
# | Andorra | `ad_nrt` | Andorran NRT Number |
|
422
|
+
# | Argentina | `ar_cuit` | Argentinian Tax ID Number |
|
423
|
+
# | Australia | `au_abn` | Australian Business Number (AU ABN) |
|
424
|
+
# | Australia | `au_arn` | Australian Taxation Office Reference Number |
|
425
|
+
# | Austria | `eu_vat` | European VAT Number |
|
426
|
+
# | Bahrain | `bh_vat` | Bahraini VAT Number |
|
427
|
+
# | Belgium | `eu_vat` | European VAT Number |
|
428
|
+
# | Bolivia | `bo_tin` | Bolivian Tax ID |
|
429
|
+
# | Brazil | `br_cnpj` | Brazilian CNPJ Number |
|
430
|
+
# | Brazil | `br_cpf` | Brazilian CPF Number |
|
431
|
+
# | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
|
432
|
+
# | Bulgaria | `eu_vat` | European VAT Number |
|
433
|
+
# | Canada | `ca_bn` | Canadian BN |
|
434
|
+
# | Canada | `ca_gst_hst` | Canadian GST/HST Number |
|
435
|
+
# | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
|
436
|
+
# | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
|
437
|
+
# | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
|
438
|
+
# | Canada | `ca_qst` | Canadian QST Number (Québec) |
|
439
|
+
# | Chile | `cl_tin` | Chilean TIN |
|
440
|
+
# | China | `cn_tin` | Chinese Tax ID |
|
441
|
+
# | Colombia | `co_nit` | Colombian NIT Number |
|
442
|
+
# | Costa Rica | `cr_tin` | Costa Rican Tax ID |
|
443
|
+
# | Croatia | `eu_vat` | European VAT Number |
|
444
|
+
# | Cyprus | `eu_vat` | European VAT Number |
|
445
|
+
# | Czech Republic | `eu_vat` | European VAT Number |
|
446
|
+
# | Denmark | `eu_vat` | European VAT Number |
|
447
|
+
# | Dominican Republic | `do_rcn` | Dominican RCN Number |
|
448
|
+
# | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
|
449
|
+
# | Egypt | `eg_tin` | Egyptian Tax Identification Number |
|
450
|
+
# | El Salvador | `sv_nit` | El Salvadorian NIT Number |
|
451
|
+
# | Estonia | `eu_vat` | European VAT Number |
|
452
|
+
# | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
453
|
+
# | Finland | `eu_vat` | European VAT Number |
|
454
|
+
# | France | `eu_vat` | European VAT Number |
|
455
|
+
# | Georgia | `ge_vat` | Georgian VAT |
|
456
|
+
# | Germany | `eu_vat` | European VAT Number |
|
457
|
+
# | Greece | `eu_vat` | European VAT Number |
|
458
|
+
# | Hong Kong | `hk_br` | Hong Kong BR Number |
|
459
|
+
# | Hungary | `eu_vat` | European VAT Number |
|
460
|
+
# | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
|
461
|
+
# | Iceland | `is_vat` | Icelandic VAT |
|
462
|
+
# | India | `in_gst` | Indian GST Number |
|
463
|
+
# | Indonesia | `id_npwp` | Indonesian NPWP Number |
|
464
|
+
# | Ireland | `eu_vat` | European VAT Number |
|
465
|
+
# | Israel | `il_vat` | Israel VAT |
|
466
|
+
# | Italy | `eu_vat` | European VAT Number |
|
467
|
+
# | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
468
|
+
# | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
469
|
+
# | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
470
|
+
# | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
|
471
|
+
# | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
|
472
|
+
# | Latvia | `eu_vat` | European VAT Number |
|
473
|
+
# | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
|
474
|
+
# | Lithuania | `eu_vat` | European VAT Number |
|
475
|
+
# | Luxembourg | `eu_vat` | European VAT Number |
|
476
|
+
# | Malaysia | `my_frp` | Malaysian FRP Number |
|
477
|
+
# | Malaysia | `my_itn` | Malaysian ITN |
|
478
|
+
# | Malaysia | `my_sst` | Malaysian SST Number |
|
479
|
+
# | Malta | `eu_vat ` | European VAT Number |
|
480
|
+
# | Mexico | `mx_rfc` | Mexican RFC Number |
|
481
|
+
# | Netherlands | `eu_vat` | European VAT Number |
|
482
|
+
# | New Zealand | `nz_gst` | New Zealand GST Number |
|
483
|
+
# | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
|
484
|
+
# | Norway | `no_vat` | Norwegian VAT Number |
|
485
|
+
# | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
486
|
+
# | Oman | `om_vat` | Omani VAT Number |
|
487
|
+
# | Peru | `pe_ruc` | Peruvian RUC Number |
|
488
|
+
# | Philippines | `ph_tin ` | Philippines Tax Identification Number |
|
489
|
+
# | Poland | `eu_vat` | European VAT Number |
|
490
|
+
# | Portugal | `eu_vat` | European VAT Number |
|
491
|
+
# | Romania | `eu_vat` | European VAT Number |
|
492
|
+
# | Romania | `ro_tin` | Romanian Tax ID Number |
|
493
|
+
# | Russia | `ru_inn` | Russian INN |
|
494
|
+
# | Russia | `ru_kpp` | Russian KPP |
|
495
|
+
# | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
|
496
|
+
# | Serbia | `rs_pib` | Serbian PIB Number |
|
497
|
+
# | Singapore | `sg_gst` | Singaporean GST |
|
498
|
+
# | Singapore | `sg_uen` | Singaporean UEN |
|
499
|
+
# | Slovakia | `eu_vat` | European VAT Number |
|
500
|
+
# | Slovenia | `eu_vat` | European VAT Number |
|
501
|
+
# | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
|
502
|
+
# | South Africa | `za_vat` | South African VAT Number |
|
503
|
+
# | South Korea | `kr_brn` | Korean BRN |
|
504
|
+
# | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
505
|
+
# | Spain | `eu_vat` | European VAT Number |
|
506
|
+
# | Sweden | `eu_vat` | European VAT Number |
|
507
|
+
# | Switzerland | `ch_vat` | Switzerland VAT Number |
|
508
|
+
# | Taiwan | `tw_vat` | Taiwanese VAT |
|
509
|
+
# | Thailand | `th_vat` | Thai VAT |
|
510
|
+
# | Turkey | `tr_tin` | Turkish Tax Identification Number |
|
511
|
+
# | Ukraine | `ua_vat` | Ukrainian VAT |
|
512
|
+
# | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
|
513
|
+
# | United Kingdom | `eu_vat` | Northern Ireland VAT Number |
|
514
|
+
# | United Kingdom | `gb_vat` | United Kingdom VAT Number |
|
515
|
+
# | United States | `us_ein` | United States EIN |
|
516
|
+
# | Uruguay | `uy_ruc` | Uruguayan RUC Number |
|
517
|
+
# | Venezuela | `ve_rif` | Venezuelan RIF Number |
|
518
|
+
# | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
|
409
519
|
customer_tax_id:,
|
520
|
+
# This field is deprecated in favor of `discounts`. If a `discounts` list is
|
521
|
+
# provided, the first discount in the list will be returned. If the list is empty,
|
522
|
+
# `None` will be returned.
|
410
523
|
discount:,
|
411
524
|
discounts:,
|
525
|
+
# When the invoice payment is due. The due date is null if the invoice is not yet
|
526
|
+
# finalized.
|
412
527
|
due_date:,
|
528
|
+
# If the invoice has a status of `draft`, this will be the time that the invoice
|
529
|
+
# will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
|
530
|
+
# true, the invoice will automatically begin issuing at this time.
|
413
531
|
eligible_to_issue_at:,
|
532
|
+
# A URL for the customer-facing invoice portal. This URL expires 30 days after the
|
533
|
+
# invoice's due date, or 60 days after being re-generated through the UI.
|
414
534
|
hosted_invoice_url:,
|
535
|
+
# Automatically generated invoice number to help track and reconcile invoices.
|
536
|
+
# Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
|
537
|
+
# account or customer.
|
415
538
|
invoice_number:,
|
539
|
+
# The link to download the PDF representation of the `Invoice`.
|
416
540
|
invoice_pdf:,
|
417
541
|
invoice_source:,
|
542
|
+
# If the invoice failed to issue, this will be the last time it failed to issue
|
543
|
+
# (even if it is now in a different state.)
|
418
544
|
issue_failed_at:,
|
545
|
+
# If the invoice has been issued, this will be the time it transitioned to
|
546
|
+
# `issued` (even if it is now in a different state.)
|
419
547
|
issued_at:,
|
548
|
+
# The breakdown of prices in this invoice.
|
420
549
|
line_items:,
|
421
550
|
maximum:,
|
422
551
|
maximum_amount:,
|
552
|
+
# Free-form text which is available on the invoice PDF and the Orb invoice portal.
|
423
553
|
memo:,
|
554
|
+
# User specified key-value pairs for the resource. If not present, this defaults
|
555
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
556
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
557
|
+
# `null`.
|
424
558
|
metadata:,
|
425
559
|
minimum:,
|
426
560
|
minimum_amount:,
|
561
|
+
# If the invoice has a status of `paid`, this gives a timestamp when the invoice
|
562
|
+
# was paid.
|
427
563
|
paid_at:,
|
564
|
+
# A list of payment attempts associated with the invoice
|
428
565
|
payment_attempts:,
|
566
|
+
# If payment was attempted on this invoice but failed, this will be the time of
|
567
|
+
# the most recent attempt.
|
429
568
|
payment_failed_at:,
|
569
|
+
# If payment was attempted on this invoice, this will be the start time of the
|
570
|
+
# most recent attempt. This field is especially useful for delayed-notification
|
571
|
+
# payment mechanisms (like bank transfers), where payment can take 3 days or more.
|
430
572
|
payment_started_at:,
|
573
|
+
# If the invoice is in draft, this timestamp will reflect when the invoice is
|
574
|
+
# scheduled to be issued.
|
431
575
|
scheduled_issue_at:,
|
432
576
|
shipping_address:,
|
433
577
|
status:,
|
434
578
|
subscription:,
|
579
|
+
# The total before any discounts and minimums are applied.
|
435
580
|
subtotal:,
|
581
|
+
# If the invoice failed to sync, this will be the last time an external invoicing
|
582
|
+
# provider sync was attempted. This field will always be `null` for invoices using
|
583
|
+
# Orb Invoicing.
|
436
584
|
sync_failed_at:,
|
585
|
+
# The scheduled date of the invoice
|
437
586
|
target_date:,
|
587
|
+
# The total after any minimums and discounts have been applied.
|
438
588
|
total:,
|
589
|
+
# If the invoice has a status of `void`, this gives a timestamp when the invoice
|
590
|
+
# was voided.
|
439
591
|
voided_at:,
|
592
|
+
# This is true if the invoice will be automatically issued in the future, and
|
593
|
+
# false otherwise.
|
440
594
|
will_auto_issue:
|
441
595
|
); end
|
442
596
|
sig do
|
@@ -522,8 +676,23 @@ module Orb
|
|
522
676
|
)
|
523
677
|
.returns(T.attached_class)
|
524
678
|
end
|
525
|
-
def self.new(
|
526
|
-
|
679
|
+
def self.new(
|
680
|
+
# True only if auto-collection is enabled for this invoice.
|
681
|
+
enabled:,
|
682
|
+
# If the invoice is scheduled for auto-collection, this field will reflect when
|
683
|
+
# the next attempt will occur. If dunning has been exhausted, or auto-collection
|
684
|
+
# is not enabled for this invoice, this field will be `null`.
|
685
|
+
next_attempt_at:,
|
686
|
+
# Number of auto-collection payment attempts.
|
687
|
+
num_attempts:,
|
688
|
+
# If Orb has ever attempted payment auto-collection for this invoice, this field
|
689
|
+
# will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
|
690
|
+
# this can be used to tell whether the invoice is currently in dunning (that is,
|
691
|
+
# `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or
|
692
|
+
# if dunning has been exhausted (`previously_attempted_at` is non-null, but
|
693
|
+
# `next_attempt_time` is null).
|
694
|
+
previously_attempted_at:
|
695
|
+
); end
|
527
696
|
sig do
|
528
697
|
override
|
529
698
|
.returns(
|
@@ -623,8 +792,18 @@ module Orb
|
|
623
792
|
)
|
624
793
|
.returns(T.attached_class)
|
625
794
|
end
|
626
|
-
def self.new(
|
627
|
-
|
795
|
+
def self.new(
|
796
|
+
id:,
|
797
|
+
credit_note_number:,
|
798
|
+
# An optional memo supplied on the credit note.
|
799
|
+
memo:,
|
800
|
+
reason:,
|
801
|
+
total:,
|
802
|
+
type:,
|
803
|
+
# If the credit note has a status of `void`, this gives a timestamp when the
|
804
|
+
# credit note was voided.
|
805
|
+
voided_at:
|
806
|
+
); end
|
628
807
|
sig do
|
629
808
|
override
|
630
809
|
.returns(
|
@@ -747,14 +926,22 @@ module Orb
|
|
747
926
|
.returns(T.attached_class)
|
748
927
|
end
|
749
928
|
def self.new(
|
929
|
+
# A unique id for this transaction.
|
750
930
|
id:,
|
751
931
|
action:,
|
932
|
+
# The value of the amount changed in the transaction.
|
752
933
|
amount:,
|
934
|
+
# The creation time of this transaction.
|
753
935
|
created_at:,
|
754
936
|
credit_note:,
|
937
|
+
# An optional description provided for manual customer balance adjustments.
|
755
938
|
description:,
|
939
|
+
# The new value of the customer's balance prior to the transaction, in the
|
940
|
+
# customer's currency.
|
756
941
|
ending_balance:,
|
757
942
|
invoice:,
|
943
|
+
# The original value of the customer's balance prior to the transaction, in the
|
944
|
+
# customer's currency.
|
758
945
|
starting_balance:,
|
759
946
|
type:
|
760
947
|
); end
|
@@ -782,14 +969,7 @@ module Orb
|
|
782
969
|
|
783
970
|
TaggedSymbol =
|
784
971
|
T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action) }
|
785
|
-
OrSymbol =
|
786
|
-
T.type_alias do
|
787
|
-
T.any(
|
788
|
-
Symbol,
|
789
|
-
String,
|
790
|
-
Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol
|
791
|
-
)
|
792
|
-
end
|
972
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
793
973
|
|
794
974
|
APPLIED_TO_INVOICE =
|
795
975
|
T.let(
|
@@ -852,8 +1032,10 @@ module Orb
|
|
852
1032
|
attr_accessor :id
|
853
1033
|
|
854
1034
|
sig { params(id: String).returns(T.attached_class) }
|
855
|
-
def self.new(
|
856
|
-
|
1035
|
+
def self.new(
|
1036
|
+
# The id of the Credit note
|
1037
|
+
id:
|
1038
|
+
); end
|
857
1039
|
sig { override.returns({id: String}) }
|
858
1040
|
def to_hash; end
|
859
1041
|
end
|
@@ -864,8 +1046,10 @@ module Orb
|
|
864
1046
|
attr_accessor :id
|
865
1047
|
|
866
1048
|
sig { params(id: String).returns(T.attached_class) }
|
867
|
-
def self.new(
|
868
|
-
|
1049
|
+
def self.new(
|
1050
|
+
# The Invoice id
|
1051
|
+
id:
|
1052
|
+
); end
|
869
1053
|
sig { override.returns({id: String}) }
|
870
1054
|
def to_hash; end
|
871
1055
|
end
|
@@ -875,14 +1059,7 @@ module Orb
|
|
875
1059
|
|
876
1060
|
TaggedSymbol =
|
877
1061
|
T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type) }
|
878
|
-
OrSymbol =
|
879
|
-
T.type_alias do
|
880
|
-
T.any(
|
881
|
-
Symbol,
|
882
|
-
String,
|
883
|
-
Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type::TaggedSymbol
|
884
|
-
)
|
885
|
-
end
|
1062
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
886
1063
|
|
887
1064
|
INCREMENT =
|
888
1065
|
T.let(
|
@@ -1047,8 +1224,7 @@ module Orb
|
|
1047
1224
|
|
1048
1225
|
TaggedSymbol =
|
1049
1226
|
T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country) }
|
1050
|
-
OrSymbol =
|
1051
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol) }
|
1227
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1052
1228
|
|
1053
1229
|
AD = T.let(:AD, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
|
1054
1230
|
AE = T.let(:AE, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
|
@@ -1140,8 +1316,7 @@ module Orb
|
|
1140
1316
|
|
1141
1317
|
TaggedSymbol =
|
1142
1318
|
T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type) }
|
1143
|
-
OrSymbol =
|
1144
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol) }
|
1319
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1145
1320
|
|
1146
1321
|
AD_NRT = T.let(:ad_nrt, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
|
1147
1322
|
AE_TRN = T.let(:ae_trn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
|
@@ -1229,8 +1404,7 @@ module Orb
|
|
1229
1404
|
extend Orb::Internal::Type::Enum
|
1230
1405
|
|
1231
1406
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource) }
|
1232
|
-
OrSymbol =
|
1233
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource::TaggedSymbol) }
|
1407
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1234
1408
|
|
1235
1409
|
SUBSCRIPTION =
|
1236
1410
|
T.let(:subscription, Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource::TaggedSymbol)
|
@@ -1514,27 +1688,65 @@ module Orb
|
|
1514
1688
|
.returns(T.attached_class)
|
1515
1689
|
end
|
1516
1690
|
def self.new(
|
1691
|
+
# A unique ID for this line item.
|
1517
1692
|
id:,
|
1693
|
+
# The line amount after any adjustments and before overage conversion, credits and
|
1694
|
+
# partial invoicing.
|
1518
1695
|
adjusted_subtotal:,
|
1696
|
+
# All adjustments applied to the line item in the order they were applied based on
|
1697
|
+
# invoice calculations (ie. usage discounts -> amount discounts -> percentage
|
1698
|
+
# discounts -> minimums -> maximums).
|
1519
1699
|
adjustments:,
|
1700
|
+
# The final amount for a line item after all adjustments and pre paid credits have
|
1701
|
+
# been applied.
|
1520
1702
|
amount:,
|
1703
|
+
# The number of prepaid credits applied.
|
1521
1704
|
credits_applied:,
|
1522
1705
|
discount:,
|
1706
|
+
# The end date of the range of time applied for this line item's price.
|
1523
1707
|
end_date:,
|
1708
|
+
# An additional filter that was used to calculate the usage for this line item.
|
1524
1709
|
filter:,
|
1710
|
+
# [DEPRECATED] For configured prices that are split by a grouping key, this will
|
1711
|
+
# be populated with the key and a value. The `amount` and `subtotal` will be the
|
1712
|
+
# values for this particular grouping.
|
1525
1713
|
grouping:,
|
1714
|
+
# This field is deprecated in favor of `adjustments`.
|
1526
1715
|
maximum:,
|
1716
|
+
# This field is deprecated in favor of `adjustments`.
|
1527
1717
|
maximum_amount:,
|
1718
|
+
# This field is deprecated in favor of `adjustments`.
|
1528
1719
|
minimum:,
|
1720
|
+
# This field is deprecated in favor of `adjustments`.
|
1529
1721
|
minimum_amount:,
|
1722
|
+
# The name of the price associated with this line item.
|
1530
1723
|
name:,
|
1724
|
+
# Any amount applied from a partial invoice
|
1531
1725
|
partially_invoiced_amount:,
|
1726
|
+
# The Price resource represents a price that can be billed on a subscription,
|
1727
|
+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
|
1728
|
+
# take a quantity and determine an amount to bill.
|
1729
|
+
#
|
1730
|
+
# Orb supports a few different pricing models out of the box. Each of these models
|
1731
|
+
# is serialized differently in a given Price object. The model_type field
|
1732
|
+
# determines the key for the configuration object that is present.
|
1733
|
+
#
|
1734
|
+
# For more on the types of prices, see
|
1735
|
+
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1532
1736
|
price:,
|
1737
|
+
# Either the fixed fee quantity or the usage during the service period.
|
1533
1738
|
quantity:,
|
1739
|
+
# The start date of the range of time applied for this line item's price.
|
1534
1740
|
start_date:,
|
1741
|
+
# For complex pricing structures, the line item can be broken down further in
|
1742
|
+
# `sub_line_items`.
|
1535
1743
|
sub_line_items:,
|
1744
|
+
# The line amount before before any adjustments.
|
1536
1745
|
subtotal:,
|
1746
|
+
# An array of tax rates and their incurred tax amounts. Empty if no tax
|
1747
|
+
# integration is configured.
|
1537
1748
|
tax_amounts:,
|
1749
|
+
# A list of customer ids that were used to calculate the usage for this line item.
|
1538
1750
|
usage_customer_ids:
|
1539
1751
|
); end
|
1540
1752
|
sig do
|
@@ -1666,10 +1878,17 @@ module Orb
|
|
1666
1878
|
end
|
1667
1879
|
def self.new(
|
1668
1880
|
id:,
|
1881
|
+
# The value applied by an adjustment.
|
1669
1882
|
amount:,
|
1883
|
+
# The price IDs that this adjustment applies to.
|
1670
1884
|
applies_to_price_ids:,
|
1885
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
1886
|
+
# that apply to only one price.
|
1671
1887
|
is_invoice_level:,
|
1888
|
+
# The reason for the adjustment.
|
1672
1889
|
reason:,
|
1890
|
+
# The number of usage units by which to discount the price this adjustment applies
|
1891
|
+
# to in a given billing period.
|
1673
1892
|
usage_discount:,
|
1674
1893
|
adjustment_type: :usage_discount
|
1675
1894
|
); end
|
@@ -1733,10 +1952,17 @@ module Orb
|
|
1733
1952
|
end
|
1734
1953
|
def self.new(
|
1735
1954
|
id:,
|
1955
|
+
# The value applied by an adjustment.
|
1736
1956
|
amount:,
|
1957
|
+
# The amount by which to discount the prices this adjustment applies to in a given
|
1958
|
+
# billing period.
|
1737
1959
|
amount_discount:,
|
1960
|
+
# The price IDs that this adjustment applies to.
|
1738
1961
|
applies_to_price_ids:,
|
1962
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
1963
|
+
# that apply to only one price.
|
1739
1964
|
is_invoice_level:,
|
1965
|
+
# The reason for the adjustment.
|
1740
1966
|
reason:,
|
1741
1967
|
adjustment_type: :amount_discount
|
1742
1968
|
); end
|
@@ -1800,10 +2026,17 @@ module Orb
|
|
1800
2026
|
end
|
1801
2027
|
def self.new(
|
1802
2028
|
id:,
|
2029
|
+
# The value applied by an adjustment.
|
1803
2030
|
amount:,
|
2031
|
+
# The price IDs that this adjustment applies to.
|
1804
2032
|
applies_to_price_ids:,
|
2033
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
2034
|
+
# that apply to only one price.
|
1805
2035
|
is_invoice_level:,
|
2036
|
+
# The percentage (as a value between 0 and 1) by which to discount the price
|
2037
|
+
# intervals this adjustment applies to in a given billing period.
|
1806
2038
|
percentage_discount:,
|
2039
|
+
# The reason for the adjustment.
|
1807
2040
|
reason:,
|
1808
2041
|
adjustment_type: :percentage_discount
|
1809
2042
|
); end
|
@@ -1872,11 +2105,19 @@ module Orb
|
|
1872
2105
|
end
|
1873
2106
|
def self.new(
|
1874
2107
|
id:,
|
2108
|
+
# The value applied by an adjustment.
|
1875
2109
|
amount:,
|
2110
|
+
# The price IDs that this adjustment applies to.
|
1876
2111
|
applies_to_price_ids:,
|
2112
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
2113
|
+
# that apply to only one price.
|
1877
2114
|
is_invoice_level:,
|
2115
|
+
# The item ID that revenue from this minimum will be attributed to.
|
1878
2116
|
item_id:,
|
2117
|
+
# The minimum amount to charge in a given billing period for the prices this
|
2118
|
+
# adjustment applies to.
|
1879
2119
|
minimum_amount:,
|
2120
|
+
# The reason for the adjustment.
|
1880
2121
|
reason:,
|
1881
2122
|
adjustment_type: :minimum
|
1882
2123
|
); end
|
@@ -1941,10 +2182,17 @@ module Orb
|
|
1941
2182
|
end
|
1942
2183
|
def self.new(
|
1943
2184
|
id:,
|
2185
|
+
# The value applied by an adjustment.
|
1944
2186
|
amount:,
|
2187
|
+
# The price IDs that this adjustment applies to.
|
1945
2188
|
applies_to_price_ids:,
|
2189
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
2190
|
+
# that apply to only one price.
|
1946
2191
|
is_invoice_level:,
|
2192
|
+
# The maximum amount to charge in a given billing period for the prices this
|
2193
|
+
# adjustment applies to.
|
1947
2194
|
maximum_amount:,
|
2195
|
+
# The reason for the adjustment.
|
1948
2196
|
reason:,
|
1949
2197
|
adjustment_type: :maximum
|
1950
2198
|
); end
|
@@ -1988,8 +2236,13 @@ module Orb
|
|
1988
2236
|
sig do
|
1989
2237
|
params(applies_to_price_ids: T::Array[String], maximum_amount: String).returns(T.attached_class)
|
1990
2238
|
end
|
1991
|
-
def self.new(
|
1992
|
-
|
2239
|
+
def self.new(
|
2240
|
+
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
2241
|
+
# maximums, this can be a subset of prices.
|
2242
|
+
applies_to_price_ids:,
|
2243
|
+
# Maximum amount applied
|
2244
|
+
maximum_amount:
|
2245
|
+
); end
|
1993
2246
|
sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) }
|
1994
2247
|
def to_hash; end
|
1995
2248
|
end
|
@@ -2008,8 +2261,13 @@ module Orb
|
|
2008
2261
|
sig do
|
2009
2262
|
params(applies_to_price_ids: T::Array[String], minimum_amount: String).returns(T.attached_class)
|
2010
2263
|
end
|
2011
|
-
def self.new(
|
2012
|
-
|
2264
|
+
def self.new(
|
2265
|
+
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
2266
|
+
# minimums, this can be a subset of prices.
|
2267
|
+
applies_to_price_ids:,
|
2268
|
+
# Minimum amount applied
|
2269
|
+
minimum_amount:
|
2270
|
+
); end
|
2013
2271
|
sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) }
|
2014
2272
|
def to_hash; end
|
2015
2273
|
end
|
@@ -2084,8 +2342,15 @@ module Orb
|
|
2084
2342
|
)
|
2085
2343
|
.returns(T.attached_class)
|
2086
2344
|
end
|
2087
|
-
def self.new(
|
2088
|
-
|
2345
|
+
def self.new(
|
2346
|
+
# The total amount for this sub line item.
|
2347
|
+
amount:,
|
2348
|
+
grouping:,
|
2349
|
+
matrix_config:,
|
2350
|
+
name:,
|
2351
|
+
quantity:,
|
2352
|
+
type: :matrix
|
2353
|
+
); end
|
2089
2354
|
sig do
|
2090
2355
|
override
|
2091
2356
|
.returns(
|
@@ -2110,8 +2375,11 @@ module Orb
|
|
2110
2375
|
attr_accessor :value
|
2111
2376
|
|
2112
2377
|
sig { params(key: String, value: T.nilable(String)).returns(T.attached_class) }
|
2113
|
-
def self.new(
|
2114
|
-
|
2378
|
+
def self.new(
|
2379
|
+
key:,
|
2380
|
+
# No value indicates the default group
|
2381
|
+
value:
|
2382
|
+
); end
|
2115
2383
|
sig { override.returns({key: String, value: T.nilable(String)}) }
|
2116
2384
|
def to_hash; end
|
2117
2385
|
end
|
@@ -2122,8 +2390,10 @@ module Orb
|
|
2122
2390
|
attr_accessor :dimension_values
|
2123
2391
|
|
2124
2392
|
sig { params(dimension_values: T::Array[T.nilable(String)]).returns(T.attached_class) }
|
2125
|
-
def self.new(
|
2126
|
-
|
2393
|
+
def self.new(
|
2394
|
+
# The ordered dimension values for this line item.
|
2395
|
+
dimension_values:
|
2396
|
+
); end
|
2127
2397
|
sig { override.returns({dimension_values: T::Array[T.nilable(String)]}) }
|
2128
2398
|
def to_hash; end
|
2129
2399
|
end
|
@@ -2196,8 +2466,15 @@ module Orb
|
|
2196
2466
|
)
|
2197
2467
|
.returns(T.attached_class)
|
2198
2468
|
end
|
2199
|
-
def self.new(
|
2200
|
-
|
2469
|
+
def self.new(
|
2470
|
+
# The total amount for this sub line item.
|
2471
|
+
amount:,
|
2472
|
+
grouping:,
|
2473
|
+
name:,
|
2474
|
+
quantity:,
|
2475
|
+
tier_config:,
|
2476
|
+
type: :tier
|
2477
|
+
); end
|
2201
2478
|
sig do
|
2202
2479
|
override
|
2203
2480
|
.returns(
|
@@ -2222,8 +2499,11 @@ module Orb
|
|
2222
2499
|
attr_accessor :value
|
2223
2500
|
|
2224
2501
|
sig { params(key: String, value: T.nilable(String)).returns(T.attached_class) }
|
2225
|
-
def self.new(
|
2226
|
-
|
2502
|
+
def self.new(
|
2503
|
+
key:,
|
2504
|
+
# No value indicates the default group
|
2505
|
+
value:
|
2506
|
+
); end
|
2227
2507
|
sig { override.returns({key: String, value: T.nilable(String)}) }
|
2228
2508
|
def to_hash; end
|
2229
2509
|
end
|
@@ -2301,8 +2581,14 @@ module Orb
|
|
2301
2581
|
)
|
2302
2582
|
.returns(T.attached_class)
|
2303
2583
|
end
|
2304
|
-
def self.new(
|
2305
|
-
|
2584
|
+
def self.new(
|
2585
|
+
# The total amount for this sub line item.
|
2586
|
+
amount:,
|
2587
|
+
grouping:,
|
2588
|
+
name:,
|
2589
|
+
quantity:,
|
2590
|
+
type: :"'null'"
|
2591
|
+
); end
|
2306
2592
|
sig do
|
2307
2593
|
override
|
2308
2594
|
.returns(
|
@@ -2326,8 +2612,11 @@ module Orb
|
|
2326
2612
|
attr_accessor :value
|
2327
2613
|
|
2328
2614
|
sig { params(key: String, value: T.nilable(String)).returns(T.attached_class) }
|
2329
|
-
def self.new(
|
2330
|
-
|
2615
|
+
def self.new(
|
2616
|
+
key:,
|
2617
|
+
# No value indicates the default group
|
2618
|
+
value:
|
2619
|
+
); end
|
2331
2620
|
sig { override.returns({key: String, value: T.nilable(String)}) }
|
2332
2621
|
def to_hash; end
|
2333
2622
|
end
|
@@ -2359,8 +2648,14 @@ module Orb
|
|
2359
2648
|
params(amount: String, tax_rate_description: String, tax_rate_percentage: T.nilable(String))
|
2360
2649
|
.returns(T.attached_class)
|
2361
2650
|
end
|
2362
|
-
def self.new(
|
2363
|
-
|
2651
|
+
def self.new(
|
2652
|
+
# The amount of additional tax incurred by this tax rate.
|
2653
|
+
amount:,
|
2654
|
+
# The human-readable description of the applied tax rate.
|
2655
|
+
tax_rate_description:,
|
2656
|
+
# The tax rate percentage, out of 100.
|
2657
|
+
tax_rate_percentage:
|
2658
|
+
); end
|
2364
2659
|
sig do
|
2365
2660
|
override.returns(
|
2366
2661
|
{
|
@@ -2387,8 +2682,13 @@ module Orb
|
|
2387
2682
|
sig do
|
2388
2683
|
params(applies_to_price_ids: T::Array[String], maximum_amount: String).returns(T.attached_class)
|
2389
2684
|
end
|
2390
|
-
def self.new(
|
2391
|
-
|
2685
|
+
def self.new(
|
2686
|
+
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
2687
|
+
# maximums, this can be a subset of prices.
|
2688
|
+
applies_to_price_ids:,
|
2689
|
+
# Maximum amount applied
|
2690
|
+
maximum_amount:
|
2691
|
+
); end
|
2392
2692
|
sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) }
|
2393
2693
|
def to_hash; end
|
2394
2694
|
end
|
@@ -2406,8 +2706,13 @@ module Orb
|
|
2406
2706
|
sig do
|
2407
2707
|
params(applies_to_price_ids: T::Array[String], minimum_amount: String).returns(T.attached_class)
|
2408
2708
|
end
|
2409
|
-
def self.new(
|
2410
|
-
|
2709
|
+
def self.new(
|
2710
|
+
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
2711
|
+
# minimums, this can be a subset of prices.
|
2712
|
+
applies_to_price_ids:,
|
2713
|
+
# Minimum amount applied
|
2714
|
+
minimum_amount:
|
2715
|
+
); end
|
2411
2716
|
sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) }
|
2412
2717
|
def to_hash; end
|
2413
2718
|
end
|
@@ -2452,8 +2757,20 @@ module Orb
|
|
2452
2757
|
)
|
2453
2758
|
.returns(T.attached_class)
|
2454
2759
|
end
|
2455
|
-
def self.new(
|
2456
|
-
|
2760
|
+
def self.new(
|
2761
|
+
# The ID of the payment attempt.
|
2762
|
+
id:,
|
2763
|
+
# The amount of the payment attempt.
|
2764
|
+
amount:,
|
2765
|
+
# The time at which the payment attempt was created.
|
2766
|
+
created_at:,
|
2767
|
+
# The payment provider that attempted to collect the payment.
|
2768
|
+
payment_provider:,
|
2769
|
+
# The ID of the payment attempt in the payment provider.
|
2770
|
+
payment_provider_id:,
|
2771
|
+
# Whether the payment attempt succeeded.
|
2772
|
+
succeeded:
|
2773
|
+
); end
|
2457
2774
|
sig do
|
2458
2775
|
override
|
2459
2776
|
.returns(
|
@@ -2475,14 +2792,7 @@ module Orb
|
|
2475
2792
|
|
2476
2793
|
TaggedSymbol =
|
2477
2794
|
T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider) }
|
2478
|
-
OrSymbol =
|
2479
|
-
T.type_alias do
|
2480
|
-
T.any(
|
2481
|
-
Symbol,
|
2482
|
-
String,
|
2483
|
-
Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider::TaggedSymbol
|
2484
|
-
)
|
2485
|
-
end
|
2795
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
2486
2796
|
|
2487
2797
|
STRIPE =
|
2488
2798
|
T.let(:stripe, Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider::TaggedSymbol)
|
@@ -2549,8 +2859,7 @@ module Orb
|
|
2549
2859
|
extend Orb::Internal::Type::Enum
|
2550
2860
|
|
2551
2861
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::Status) }
|
2552
|
-
OrSymbol =
|
2553
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol) }
|
2862
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
2554
2863
|
|
2555
2864
|
ISSUED = T.let(:issued, Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol)
|
2556
2865
|
PAID = T.let(:paid, Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol)
|