orb-billing 0.1.0.pre.alpha.38 → 0.1.0.pre.alpha.39
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/README.md +1 -1
- data/lib/orb/client.rb +4 -0
- data/lib/orb/internal/transport/base_client.rb +1 -1
- data/lib/orb/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/orb/internal/type/base_model.rb +14 -17
- data/lib/orb/internal/type/converter.rb +20 -22
- data/lib/orb/internal/type/enum.rb +8 -8
- data/lib/orb/internal/util.rb +1 -5
- data/lib/orb/models/alert.rb +9 -9
- data/lib/orb/models/alert_create_for_customer_params.rb +3 -3
- data/lib/orb/models/alert_create_for_external_customer_params.rb +3 -3
- data/lib/orb/models/alert_create_for_subscription_params.rb +3 -3
- data/lib/orb/models/alert_list_params.rb +5 -5
- data/lib/orb/models/alert_update_params.rb +3 -3
- data/lib/orb/models/amount_discount.rb +1 -1
- data/lib/orb/models/billable_metric.rb +7 -7
- data/lib/orb/models/coupon.rb +7 -7
- data/lib/orb/models/coupon_create_params.rb +2 -2
- data/lib/orb/models/coupon_list_params.rb +2 -2
- data/lib/orb/models/coupons/subscription_list_params.rb +1 -1
- data/lib/orb/models/credit_note.rb +1 -1
- data/lib/orb/models/credit_note_list_params.rb +5 -5
- data/lib/orb/models/customer.rb +232 -232
- data/lib/orb/models/customer_create_params.rb +223 -223
- data/lib/orb/models/customer_list_params.rb +5 -5
- data/lib/orb/models/customer_update_by_external_id_params.rb +224 -224
- data/lib/orb/models/customer_update_params.rb +224 -224
- data/lib/orb/models/customers/balance_transaction_create_response.rb +2 -2
- data/lib/orb/models/customers/balance_transaction_list_params.rb +5 -5
- data/lib/orb/models/customers/balance_transaction_list_response.rb +2 -2
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +6 -6
- data/lib/orb/models/customers/cost_list_params.rb +6 -6
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +2 -2
- data/lib/orb/models/customers/credit_list_params.rb +2 -2
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +20 -20
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +22 -22
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +20 -20
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +22 -22
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +5 -5
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +22 -22
- data/lib/orb/models/customers/credits/ledger_list_params.rb +5 -5
- data/lib/orb/models/customers/credits/ledger_list_response.rb +22 -22
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +8 -8
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +7 -7
- data/lib/orb/models/customers/credits/top_up_create_params.rb +8 -8
- data/lib/orb/models/customers/credits/top_up_create_response.rb +7 -7
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +1 -1
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +7 -7
- data/lib/orb/models/customers/credits/top_up_list_params.rb +1 -1
- data/lib/orb/models/customers/credits/top_up_list_response.rb +7 -7
- data/lib/orb/models/dimensional_price_group.rb +7 -7
- data/lib/orb/models/dimensional_price_group_create_params.rb +2 -2
- data/lib/orb/models/dimensional_price_group_list_params.rb +1 -1
- data/lib/orb/models/event_ingest_params.rb +7 -7
- data/lib/orb/models/event_ingest_response.rb +4 -4
- data/lib/orb/models/event_search_params.rb +5 -5
- data/lib/orb/models/event_search_response.rb +8 -8
- data/lib/orb/models/event_update_params.rb +4 -4
- data/lib/orb/models/events/backfill_close_response.rb +7 -7
- data/lib/orb/models/events/backfill_create_params.rb +11 -11
- data/lib/orb/models/events/backfill_create_response.rb +7 -7
- data/lib/orb/models/events/backfill_fetch_response.rb +7 -7
- data/lib/orb/models/events/backfill_list_params.rb +1 -1
- data/lib/orb/models/events/backfill_list_response.rb +7 -7
- data/lib/orb/models/events/backfill_revert_response.rb +7 -7
- data/lib/orb/models/events/event_volumes.rb +1 -1
- data/lib/orb/models/events/volume_list_params.rb +7 -7
- data/lib/orb/models/invoice.rb +270 -270
- data/lib/orb/models/invoice_create_params.rb +12 -11
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +266 -266
- data/lib/orb/models/invoice_issue_params.rb +4 -4
- data/lib/orb/models/invoice_line_item_create_params.rb +1 -1
- data/lib/orb/models/invoice_line_item_create_response.rb +27 -27
- data/lib/orb/models/invoice_list_params.rb +12 -12
- data/lib/orb/models/invoice_update_params.rb +2 -2
- data/lib/orb/models/item.rb +2 -2
- data/lib/orb/models/item_list_params.rb +1 -1
- data/lib/orb/models/metric_create_params.rb +2 -2
- data/lib/orb/models/metric_list_params.rb +5 -5
- data/lib/orb/models/metric_update_params.rb +2 -2
- data/lib/orb/models/percentage_discount.rb +2 -2
- data/lib/orb/models/plan.rb +35 -35
- data/lib/orb/models/plan_create_params.rb +267 -267
- data/lib/orb/models/plan_list_params.rb +5 -5
- data/lib/orb/models/plan_update_params.rb +4 -4
- data/lib/orb/models/plans/external_plan_id_update_params.rb +4 -4
- data/lib/orb/models/price.rb +158 -158
- data/lib/orb/models/price_create_params.rb +20 -20
- data/lib/orb/models/price_evaluate_params.rb +4 -4
- data/lib/orb/models/price_list_params.rb +1 -1
- data/lib/orb/models/price_update_params.rb +2 -2
- data/lib/orb/models/prices/external_price_id_update_params.rb +2 -2
- data/lib/orb/models/subscription.rb +114 -87
- data/lib/orb/models/subscription_cancel_params.rb +3 -3
- data/lib/orb/models/subscription_cancel_response.rb +150 -72
- data/lib/orb/models/subscription_change_apply_params.rb +33 -0
- data/lib/orb/models/subscription_change_apply_response.rb +1372 -0
- data/lib/orb/models/subscription_change_cancel_params.rb +19 -0
- data/lib/orb/models/subscription_change_cancel_response.rb +1372 -0
- data/lib/orb/models/subscription_change_retrieve_params.rb +19 -0
- data/lib/orb/models/subscription_change_retrieve_response.rb +1372 -0
- data/lib/orb/models/subscription_create_params.rb +641 -641
- data/lib/orb/models/subscription_create_response.rb +150 -72
- data/lib/orb/models/subscription_fetch_costs_params.rb +6 -6
- data/lib/orb/models/subscription_fetch_schedule_params.rb +5 -5
- data/lib/orb/models/subscription_fetch_schedule_response.rb +2 -2
- data/lib/orb/models/subscription_fetch_usage_params.rb +8 -8
- data/lib/orb/models/subscription_list_params.rb +5 -5
- data/lib/orb/models/subscription_price_intervals_params.rb +323 -323
- data/lib/orb/models/subscription_price_intervals_response.rb +152 -72
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +651 -651
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +152 -72
- data/lib/orb/models/subscription_trigger_phase_params.rb +3 -3
- data/lib/orb/models/subscription_trigger_phase_response.rb +152 -72
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +152 -72
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +153 -73
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +152 -72
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +8 -8
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +152 -72
- data/lib/orb/models/subscription_update_params.rb +10 -10
- data/lib/orb/models/subscription_update_trial_params.rb +3 -3
- data/lib/orb/models/subscription_update_trial_response.rb +152 -72
- data/lib/orb/models/trial_discount.rb +1 -1
- data/lib/orb/models/usage_discount.rb +2 -2
- data/lib/orb/request_options.rb +7 -7
- data/lib/orb/resources/alerts.rb +38 -38
- data/lib/orb/resources/coupons/subscriptions.rb +3 -3
- data/lib/orb/resources/coupons.rb +9 -9
- data/lib/orb/resources/credit_notes.rb +8 -8
- data/lib/orb/resources/customers/balance_transactions.rb +26 -26
- data/lib/orb/resources/customers/costs.rb +232 -232
- data/lib/orb/resources/customers/credits/ledger.rb +344 -344
- data/lib/orb/resources/customers/credits/top_ups.rb +12 -12
- data/lib/orb/resources/customers/credits.rb +8 -8
- data/lib/orb/resources/customers.rb +59 -59
- data/lib/orb/resources/dimensional_price_groups.rb +6 -6
- data/lib/orb/resources/events/backfills.rb +49 -49
- data/lib/orb/resources/events/volume.rb +10 -10
- data/lib/orb/resources/events.rb +295 -295
- data/lib/orb/resources/invoice_line_items.rb +1 -1
- data/lib/orb/resources/invoices.rb +38 -38
- data/lib/orb/resources/items.rb +1 -1
- data/lib/orb/resources/metrics.rb +11 -11
- data/lib/orb/resources/plans/external_plan_id.rb +14 -14
- data/lib/orb/resources/plans.rb +22 -22
- data/lib/orb/resources/prices/external_price_id.rb +4 -4
- data/lib/orb/resources/prices.rb +30 -30
- data/lib/orb/resources/subscription_changes.rb +87 -0
- data/lib/orb/resources/subscriptions.rb +813 -813
- data/lib/orb/resources/top_level.rb +4 -4
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +7 -0
- data/rbi/lib/orb/client.rbi +5 -4
- data/rbi/lib/orb/errors.rbi +3 -6
- data/rbi/lib/orb/internal/page.rbi +3 -6
- data/rbi/lib/orb/internal/transport/base_client.rbi +13 -27
- data/rbi/lib/orb/internal/transport/pooled_net_requester.rbi +7 -13
- data/rbi/lib/orb/internal/type/array_of.rbi +8 -16
- data/rbi/lib/orb/internal/type/base_model.rbi +45 -64
- data/rbi/lib/orb/internal/type/base_page.rbi +5 -10
- data/rbi/lib/orb/internal/type/boolean.rbi +4 -8
- data/rbi/lib/orb/internal/type/converter.rbi +25 -31
- data/rbi/lib/orb/internal/type/enum.rbi +14 -20
- data/rbi/lib/orb/internal/type/hash_of.rbi +8 -16
- data/rbi/lib/orb/internal/type/request_parameters.rbi +1 -2
- data/rbi/lib/orb/internal/type/union.rbi +10 -20
- data/rbi/lib/orb/internal/type/unknown.rbi +4 -8
- data/rbi/lib/orb/internal/util.rbi +34 -68
- data/rbi/lib/orb/internal.rbi +1 -1
- data/rbi/lib/orb/models/alert.rbi +21 -33
- data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +8 -13
- data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +8 -13
- data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +8 -13
- data/rbi/lib/orb/models/alert_disable_params.rbi +2 -4
- data/rbi/lib/orb/models/alert_enable_params.rbi +2 -4
- data/rbi/lib/orb/models/alert_list_params.rbi +3 -6
- data/rbi/lib/orb/models/alert_retrieve_params.rbi +2 -4
- data/rbi/lib/orb/models/alert_update_params.rbi +7 -11
- data/rbi/lib/orb/models/amount_discount.rbi +4 -7
- data/rbi/lib/orb/models/billable_metric.rbi +10 -13
- data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +1 -2
- data/rbi/lib/orb/models/coupon.rbi +9 -11
- data/rbi/lib/orb/models/coupon_archive_params.rbi +2 -4
- data/rbi/lib/orb/models/coupon_create_params.rbi +8 -14
- data/rbi/lib/orb/models/coupon_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/coupon_list_params.rbi +3 -4
- data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +3 -5
- data/rbi/lib/orb/models/credit_note.rbi +22 -45
- data/rbi/lib/orb/models/credit_note_create_params.rbi +5 -10
- data/rbi/lib/orb/models/credit_note_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/credit_note_list_params.rbi +3 -6
- data/rbi/lib/orb/models/customer.rbi +256 -281
- data/rbi/lib/orb/models/customer_create_params.rbi +251 -276
- data/rbi/lib/orb/models/customer_delete_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_fetch_by_external_id_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_list_params.rbi +3 -6
- data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +252 -277
- data/rbi/lib/orb/models/customer_update_params.rbi +252 -277
- data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +3 -6
- data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +10 -19
- data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +3 -6
- data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +10 -19
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +8 -10
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +6 -12
- data/rbi/lib/orb/models/customers/cost_list_params.rbi +8 -10
- data/rbi/lib/orb/models/customers/cost_list_response.rbi +6 -12
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +3 -4
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +2 -4
- data/rbi/lib/orb/models/customers/credit_list_params.rbi +3 -4
- data/rbi/lib/orb/models/customers/credit_list_response.rbi +2 -4
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +26 -33
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +79 -136
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +26 -33
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +78 -135
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +5 -10
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +79 -136
- data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +5 -10
- data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +74 -131
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +13 -19
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +12 -18
- data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +13 -19
- data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +12 -18
- data/rbi/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +2 -4
- data/rbi/lib/orb/models/customers/credits/top_up_delete_params.rbi +2 -4
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +3 -5
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +12 -18
- data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +3 -5
- data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +12 -18
- data/rbi/lib/orb/models/dimensional_price_group.rbi +8 -9
- data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +4 -7
- data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +3 -5
- data/rbi/lib/orb/models/dimensional_price_group_retrieve_params.rbi +2 -4
- data/rbi/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +2 -4
- data/rbi/lib/orb/models/dimensional_price_groups.rbi +2 -4
- data/rbi/lib/orb/models/discount.rbi +1 -2
- data/rbi/lib/orb/models/evaluate_price_group.rbi +3 -6
- data/rbi/lib/orb/models/event_deprecate_params.rbi +2 -4
- data/rbi/lib/orb/models/event_deprecate_response.rbi +2 -4
- data/rbi/lib/orb/models/event_ingest_params.rbi +10 -13
- data/rbi/lib/orb/models/event_ingest_response.rbi +10 -16
- data/rbi/lib/orb/models/event_search_params.rbi +7 -9
- data/rbi/lib/orb/models/event_search_response.rbi +11 -14
- data/rbi/lib/orb/models/event_update_params.rbi +5 -6
- data/rbi/lib/orb/models/event_update_response.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_close_params.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_close_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_create_params.rbi +13 -16
- data/rbi/lib/orb/models/events/backfill_create_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_list_params.rbi +3 -5
- data/rbi/lib/orb/models/events/backfill_list_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_revert_params.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_revert_response.rbi +10 -14
- data/rbi/lib/orb/models/events/event_volumes.rbi +5 -9
- data/rbi/lib/orb/models/events/volume_list_params.rbi +9 -11
- data/rbi/lib/orb/models/invoice.rbi +388 -465
- data/rbi/lib/orb/models/invoice_create_params.rbi +19 -26
- data/rbi/lib/orb/models/invoice_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_fetch_upcoming_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +381 -460
- data/rbi/lib/orb/models/invoice_issue_params.rbi +6 -8
- data/rbi/lib/orb/models/invoice_level_discount.rbi +1 -2
- data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +3 -5
- data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +101 -143
- data/rbi/lib/orb/models/invoice_list_params.rbi +8 -13
- data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_pay_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_update_params.rbi +4 -6
- data/rbi/lib/orb/models/invoice_void_params.rbi +2 -4
- data/rbi/lib/orb/models/item.rbi +7 -12
- data/rbi/lib/orb/models/item_create_params.rbi +2 -4
- data/rbi/lib/orb/models/item_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/item_list_params.rbi +3 -5
- data/rbi/lib/orb/models/item_update_params.rbi +5 -10
- data/rbi/lib/orb/models/metric_create_params.rbi +4 -6
- data/rbi/lib/orb/models/metric_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/metric_list_params.rbi +3 -6
- data/rbi/lib/orb/models/metric_update_params.rbi +4 -6
- data/rbi/lib/orb/models/pagination_metadata.rbi +2 -4
- data/rbi/lib/orb/models/percentage_discount.rbi +5 -8
- data/rbi/lib/orb/models/plan.rbi +180 -219
- data/rbi/lib/orb/models/plan_create_params.rbi +670 -951
- data/rbi/lib/orb/models/plan_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/plan_list_params.rbi +4 -8
- data/rbi/lib/orb/models/plan_update_params.rbi +6 -8
- data/rbi/lib/orb/models/plans/external_plan_id_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +6 -8
- data/rbi/lib/orb/models/price.rbi +827 -1494
- data/rbi/lib/orb/models/price_create_params.rbi +60 -101
- data/rbi/lib/orb/models/price_evaluate_params.rbi +6 -9
- data/rbi/lib/orb/models/price_evaluate_response.rbi +2 -4
- data/rbi/lib/orb/models/price_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/price_list_params.rbi +3 -5
- data/rbi/lib/orb/models/price_update_params.rbi +4 -6
- data/rbi/lib/orb/models/prices/external_price_id_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +4 -6
- data/rbi/lib/orb/models/subscription.rbi +167 -187
- data/rbi/lib/orb/models/subscription_cancel_params.rbi +5 -7
- data/rbi/lib/orb/models/subscription_cancel_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_change_apply_params.rbi +40 -0
- data/rbi/lib/orb/models/subscription_change_apply_response.rbi +1554 -0
- data/rbi/lib/orb/models/subscription_change_cancel_params.rbi +18 -0
- data/rbi/lib/orb/models/subscription_change_cancel_response.rbi +1565 -0
- data/rbi/lib/orb/models/subscription_change_retrieve_params.rbi +18 -0
- data/rbi/lib/orb/models/subscription_change_retrieve_response.rbi +1581 -0
- data/rbi/lib/orb/models/subscription_create_params.rbi +1372 -1968
- data/rbi/lib/orb/models/subscription_create_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +8 -10
- data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +6 -12
- data/rbi/lib/orb/models/subscription_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +3 -6
- data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +6 -10
- data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +12 -17
- data/rbi/lib/orb/models/subscription_list_params.rbi +4 -8
- data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +772 -1124
- data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +228 -178
- data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +1396 -1993
- data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +238 -182
- data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +5 -7
- data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +238 -182
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +265 -199
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +264 -198
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +11 -15
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +238 -182
- data/rbi/lib/orb/models/subscription_update_params.rbi +12 -15
- data/rbi/lib/orb/models/subscription_update_trial_params.rbi +6 -9
- data/rbi/lib/orb/models/subscription_update_trial_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_usage.rbi +24 -43
- data/rbi/lib/orb/models/subscriptions.rbi +2 -4
- data/rbi/lib/orb/models/top_level_ping_params.rbi +2 -4
- data/rbi/lib/orb/models/top_level_ping_response.rbi +2 -4
- data/rbi/lib/orb/models/trial_discount.rbi +4 -8
- data/rbi/lib/orb/models/usage_discount.rbi +5 -8
- data/rbi/lib/orb/request_options.rbi +9 -11
- data/rbi/lib/orb/resources/alerts.rbi +44 -60
- data/rbi/lib/orb/resources/coupons/subscriptions.rbi +6 -9
- data/rbi/lib/orb/resources/coupons.rbi +18 -25
- data/rbi/lib/orb/resources/credit_notes.rbi +9 -15
- data/rbi/lib/orb/resources/customers/balance_transactions.rbi +26 -31
- data/rbi/lib/orb/resources/customers/costs.rbi +241 -246
- data/rbi/lib/orb/resources/customers/credits/ledger.rbi +387 -396
- data/rbi/lib/orb/resources/customers/credits/top_ups.rbi +29 -40
- data/rbi/lib/orb/resources/customers/credits.rbi +15 -20
- data/rbi/lib/orb/resources/customers.rbi +407 -417
- data/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +2 -4
- data/rbi/lib/orb/resources/dimensional_price_groups.rbi +13 -19
- data/rbi/lib/orb/resources/events/backfills.rbi +61 -69
- data/rbi/lib/orb/resources/events/volume.rbi +19 -22
- data/rbi/lib/orb/resources/events.rbi +311 -319
- data/rbi/lib/orb/resources/invoice_line_items.rbi +4 -7
- data/rbi/lib/orb/resources/invoices.rbi +62 -76
- data/rbi/lib/orb/resources/items.rbi +7 -14
- data/rbi/lib/orb/resources/metrics.rbi +17 -25
- data/rbi/lib/orb/resources/plans/external_plan_id.rbi +21 -25
- data/rbi/lib/orb/resources/plans.rbi +63 -71
- data/rbi/lib/orb/resources/prices/external_price_id.rbi +9 -13
- data/rbi/lib/orb/resources/prices.rbi +77 -87
- data/rbi/lib/orb/resources/subscription_changes.rbi +61 -0
- data/rbi/lib/orb/resources/subscriptions.rbi +933 -963
- data/rbi/lib/orb/resources/top_level.rbi +6 -8
- data/sig/orb/client.rbs +2 -0
- data/sig/orb/models/subscription.rbs +14 -0
- data/sig/orb/models/subscription_cancel_response.rbs +47 -2
- data/sig/orb/models/subscription_change_apply_params.rbs +24 -0
- data/sig/orb/models/subscription_change_apply_response.rbs +784 -0
- data/sig/orb/models/subscription_change_cancel_params.rbs +15 -0
- data/sig/orb/models/subscription_change_cancel_response.rbs +784 -0
- data/sig/orb/models/subscription_change_retrieve_params.rbs +15 -0
- data/sig/orb/models/subscription_change_retrieve_response.rbs +784 -0
- data/sig/orb/models/subscription_create_response.rbs +47 -2
- data/sig/orb/models/subscription_price_intervals_response.rbs +47 -2
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +47 -2
- data/sig/orb/models/subscription_trigger_phase_response.rbs +47 -2
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +47 -2
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +47 -2
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +47 -2
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +47 -2
- data/sig/orb/models/subscription_update_trial_response.rbs +47 -2
- data/sig/orb/resources/customers.rbs +2 -2
- data/sig/orb/resources/subscription_changes.rbs +24 -0
- metadata +23 -2
@@ -10,10 +10,10 @@ module Orb
|
|
10
10
|
|
11
11
|
# @!attribute [r] synchronous
|
12
12
|
# If true, the invoice will be issued synchronously. If false, the invoice will be
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
13
|
+
# issued asynchronously. The synchronous option is only available for invoices
|
14
|
+
# that have no usage fees. If the invoice is configured to sync to an external
|
15
|
+
# provider, a successful response from this endpoint guarantees the invoice is
|
16
|
+
# present in the provider.
|
17
17
|
#
|
18
18
|
# @return [Boolean, nil]
|
19
19
|
optional :synchronous, Orb::Internal::Type::Boolean
|
@@ -28,7 +28,7 @@ module Orb
|
|
28
28
|
|
29
29
|
# @!attribute name
|
30
30
|
# The item name associated with this line item. If an item with the same name
|
31
|
-
#
|
31
|
+
# exists in Orb, that item will be associated with the line item.
|
32
32
|
#
|
33
33
|
# @return [String]
|
34
34
|
required :name, String
|
@@ -12,15 +12,15 @@ module Orb
|
|
12
12
|
|
13
13
|
# @!attribute adjusted_subtotal
|
14
14
|
# The line amount after any adjustments and before overage conversion, credits and
|
15
|
-
#
|
15
|
+
# partial invoicing.
|
16
16
|
#
|
17
17
|
# @return [String]
|
18
18
|
required :adjusted_subtotal, String
|
19
19
|
|
20
20
|
# @!attribute adjustments
|
21
21
|
# All adjustments applied to the line item in the order they were applied based on
|
22
|
-
#
|
23
|
-
#
|
22
|
+
# invoice calculations (ie. usage discounts -> amount discounts -> percentage
|
23
|
+
# discounts -> minimums -> maximums).
|
24
24
|
#
|
25
25
|
# @return [Array<Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment>]
|
26
26
|
required :adjustments,
|
@@ -28,7 +28,7 @@ module Orb
|
|
28
28
|
|
29
29
|
# @!attribute amount
|
30
30
|
# The final amount for a line item after all adjustments and pre paid credits have
|
31
|
-
#
|
31
|
+
# been applied.
|
32
32
|
#
|
33
33
|
# @return [String]
|
34
34
|
required :amount, String
|
@@ -58,8 +58,8 @@ module Orb
|
|
58
58
|
|
59
59
|
# @!attribute grouping
|
60
60
|
# [DEPRECATED] For configured prices that are split by a grouping key, this will
|
61
|
-
#
|
62
|
-
#
|
61
|
+
# be populated with the key and a value. The `amount` and `subtotal` will be the
|
62
|
+
# values for this particular grouping.
|
63
63
|
#
|
64
64
|
# @return [String, nil]
|
65
65
|
required :grouping, String, nil?: true
|
@@ -102,15 +102,15 @@ module Orb
|
|
102
102
|
|
103
103
|
# @!attribute price
|
104
104
|
# The Price resource represents a price that can be billed on a subscription,
|
105
|
-
#
|
106
|
-
#
|
105
|
+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
|
106
|
+
# take a quantity and determine an amount to bill.
|
107
107
|
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
108
|
+
# Orb supports a few different pricing models out of the box. Each of these models
|
109
|
+
# is serialized differently in a given Price object. The model_type field
|
110
|
+
# determines the key for the configuration object that is present.
|
111
111
|
#
|
112
|
-
#
|
113
|
-
#
|
112
|
+
# For more on the types of prices, see
|
113
|
+
# [the core concepts documentation](/core-concepts#plan-and-price)
|
114
114
|
#
|
115
115
|
# @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice, nil]
|
116
116
|
required :price, union: -> { Orb::Models::Price }, nil?: true
|
@@ -129,7 +129,7 @@ module Orb
|
|
129
129
|
|
130
130
|
# @!attribute sub_line_items
|
131
131
|
# For complex pricing structures, the line item can be broken down further in
|
132
|
-
#
|
132
|
+
# `sub_line_items`.
|
133
133
|
#
|
134
134
|
# @return [Array<Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem>]
|
135
135
|
required :sub_line_items,
|
@@ -143,7 +143,7 @@ module Orb
|
|
143
143
|
|
144
144
|
# @!attribute tax_amounts
|
145
145
|
# An array of tax rates and their incurred tax amounts. Empty if no tax
|
146
|
-
#
|
146
|
+
# integration is configured.
|
147
147
|
#
|
148
148
|
# @return [Array<Orb::Models::InvoiceLineItemCreateResponse::TaxAmount>]
|
149
149
|
required :tax_amounts,
|
@@ -252,7 +252,7 @@ module Orb
|
|
252
252
|
|
253
253
|
# @!attribute is_invoice_level
|
254
254
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
255
|
-
#
|
255
|
+
# that apply to only one price.
|
256
256
|
#
|
257
257
|
# @return [Boolean]
|
258
258
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
@@ -265,7 +265,7 @@ module Orb
|
|
265
265
|
|
266
266
|
# @!attribute usage_discount
|
267
267
|
# The number of usage units by which to discount the price this adjustment applies
|
268
|
-
#
|
268
|
+
# to in a given billing period.
|
269
269
|
#
|
270
270
|
# @return [Float]
|
271
271
|
required :usage_discount, Float
|
@@ -314,7 +314,7 @@ module Orb
|
|
314
314
|
|
315
315
|
# @!attribute amount_discount
|
316
316
|
# The amount by which to discount the prices this adjustment applies to in a given
|
317
|
-
#
|
317
|
+
# billing period.
|
318
318
|
#
|
319
319
|
# @return [String]
|
320
320
|
required :amount_discount, String
|
@@ -327,7 +327,7 @@ module Orb
|
|
327
327
|
|
328
328
|
# @!attribute is_invoice_level
|
329
329
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
330
|
-
#
|
330
|
+
# that apply to only one price.
|
331
331
|
#
|
332
332
|
# @return [Boolean]
|
333
333
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
@@ -388,14 +388,14 @@ module Orb
|
|
388
388
|
|
389
389
|
# @!attribute is_invoice_level
|
390
390
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
391
|
-
#
|
391
|
+
# that apply to only one price.
|
392
392
|
#
|
393
393
|
# @return [Boolean]
|
394
394
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
395
395
|
|
396
396
|
# @!attribute percentage_discount
|
397
397
|
# The percentage (as a value between 0 and 1) by which to discount the price
|
398
|
-
#
|
398
|
+
# intervals this adjustment applies to in a given billing period.
|
399
399
|
#
|
400
400
|
# @return [Float]
|
401
401
|
required :percentage_discount, Float
|
@@ -456,7 +456,7 @@ module Orb
|
|
456
456
|
|
457
457
|
# @!attribute is_invoice_level
|
458
458
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
459
|
-
#
|
459
|
+
# that apply to only one price.
|
460
460
|
#
|
461
461
|
# @return [Boolean]
|
462
462
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
@@ -469,7 +469,7 @@ module Orb
|
|
469
469
|
|
470
470
|
# @!attribute minimum_amount
|
471
471
|
# The minimum amount to charge in a given billing period for the prices this
|
472
|
-
#
|
472
|
+
# adjustment applies to.
|
473
473
|
#
|
474
474
|
# @return [String]
|
475
475
|
required :minimum_amount, String
|
@@ -532,14 +532,14 @@ module Orb
|
|
532
532
|
|
533
533
|
# @!attribute is_invoice_level
|
534
534
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
535
|
-
#
|
535
|
+
# that apply to only one price.
|
536
536
|
#
|
537
537
|
# @return [Boolean]
|
538
538
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
539
539
|
|
540
540
|
# @!attribute maximum_amount
|
541
541
|
# The maximum amount to charge in a given billing period for the prices this
|
542
|
-
#
|
542
|
+
# adjustment applies to.
|
543
543
|
#
|
544
544
|
# @return [String]
|
545
545
|
required :maximum_amount, String
|
@@ -586,7 +586,7 @@ module Orb
|
|
586
586
|
class Maximum < Orb::Internal::Type::BaseModel
|
587
587
|
# @!attribute applies_to_price_ids
|
588
588
|
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
589
|
-
#
|
589
|
+
# maximums, this can be a subset of prices.
|
590
590
|
#
|
591
591
|
# @return [Array<String>]
|
592
592
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
@@ -614,7 +614,7 @@ module Orb
|
|
614
614
|
class Minimum < Orb::Internal::Type::BaseModel
|
615
615
|
# @!attribute applies_to_price_ids
|
616
616
|
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
617
|
-
#
|
617
|
+
# minimums, this can be a subset of prices.
|
618
618
|
#
|
619
619
|
# @return [Array<String>]
|
620
620
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
@@ -16,16 +16,16 @@ module Orb
|
|
16
16
|
# @!attribute amount_gt
|
17
17
|
#
|
18
18
|
# @return [String, nil]
|
19
|
-
optional :amount_gt, String,
|
19
|
+
optional :amount_gt, String, nil?: true
|
20
20
|
|
21
21
|
# @!attribute amount_lt
|
22
22
|
#
|
23
23
|
# @return [String, nil]
|
24
|
-
optional :amount_lt, String,
|
24
|
+
optional :amount_lt, String, nil?: true
|
25
25
|
|
26
26
|
# @!attribute cursor
|
27
27
|
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
28
|
-
#
|
28
|
+
# from the initial request.
|
29
29
|
#
|
30
30
|
# @return [String, nil]
|
31
31
|
optional :cursor, String, nil?: true
|
@@ -47,9 +47,9 @@ module Orb
|
|
47
47
|
|
48
48
|
# @!attribute due_date_window
|
49
49
|
# Filters invoices by their due dates within a specific time range in the past.
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
50
|
+
# Specify the range as a number followed by 'd' (days) or 'm' (months). For
|
51
|
+
# example, '7d' filters invoices due in the last 7 days, and '2m' filters those
|
52
|
+
# due in the last 2 months.
|
53
53
|
#
|
54
54
|
# @return [String, nil]
|
55
55
|
optional :due_date_window, String, nil?: true
|
@@ -57,12 +57,12 @@ module Orb
|
|
57
57
|
# @!attribute due_date_gt
|
58
58
|
#
|
59
59
|
# @return [Date, nil]
|
60
|
-
optional :due_date_gt, Date,
|
60
|
+
optional :due_date_gt, Date, nil?: true
|
61
61
|
|
62
62
|
# @!attribute due_date_lt
|
63
63
|
#
|
64
64
|
# @return [Date, nil]
|
65
|
-
optional :due_date_lt, Date,
|
65
|
+
optional :due_date_lt, Date, nil?: true
|
66
66
|
|
67
67
|
# @!attribute external_customer_id
|
68
68
|
#
|
@@ -72,22 +72,22 @@ module Orb
|
|
72
72
|
# @!attribute invoice_date_gt
|
73
73
|
#
|
74
74
|
# @return [Time, nil]
|
75
|
-
optional :invoice_date_gt, Time,
|
75
|
+
optional :invoice_date_gt, Time, nil?: true
|
76
76
|
|
77
77
|
# @!attribute invoice_date_gte
|
78
78
|
#
|
79
79
|
# @return [Time, nil]
|
80
|
-
optional :invoice_date_gte, Time,
|
80
|
+
optional :invoice_date_gte, Time, nil?: true
|
81
81
|
|
82
82
|
# @!attribute invoice_date_lt
|
83
83
|
#
|
84
84
|
# @return [Time, nil]
|
85
|
-
optional :invoice_date_lt, Time,
|
85
|
+
optional :invoice_date_lt, Time, nil?: true
|
86
86
|
|
87
87
|
# @!attribute invoice_date_lte
|
88
88
|
#
|
89
89
|
# @return [Time, nil]
|
90
|
-
optional :invoice_date_lte, Time,
|
90
|
+
optional :invoice_date_lte, Time, nil?: true
|
91
91
|
|
92
92
|
# @!attribute is_recurring
|
93
93
|
#
|
@@ -10,8 +10,8 @@ module Orb
|
|
10
10
|
|
11
11
|
# @!attribute metadata
|
12
12
|
# User-specified key/value pairs for the resource. Individual keys can be removed
|
13
|
-
#
|
14
|
-
#
|
13
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
14
|
+
# by setting `metadata` to `null`.
|
15
15
|
#
|
16
16
|
# @return [Hash{Symbol=>String, nil}, nil]
|
17
17
|
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
data/lib/orb/models/item.rb
CHANGED
@@ -26,8 +26,8 @@ module Orb
|
|
26
26
|
|
27
27
|
# @!parse
|
28
28
|
# # The Item resource represents a sellable product or good. Items are associated
|
29
|
-
# #
|
30
|
-
# #
|
29
|
+
# # with all line items, billable metrics, and prices and are used for defining
|
30
|
+
# # external sync behavior for invoices and tax calculation purposes.
|
31
31
|
# #
|
32
32
|
# # @param id [String]
|
33
33
|
# # @param created_at [Time]
|
@@ -34,8 +34,8 @@ module Orb
|
|
34
34
|
|
35
35
|
# @!attribute metadata
|
36
36
|
# User-specified key/value pairs for the resource. Individual keys can be removed
|
37
|
-
#
|
38
|
-
#
|
37
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
38
|
+
# by setting `metadata` to `null`.
|
39
39
|
#
|
40
40
|
# @return [Hash{Symbol=>String, nil}, nil]
|
41
41
|
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
@@ -11,26 +11,26 @@ module Orb
|
|
11
11
|
# @!attribute created_at_gt
|
12
12
|
#
|
13
13
|
# @return [Time, nil]
|
14
|
-
optional :created_at_gt, Time,
|
14
|
+
optional :created_at_gt, Time, nil?: true
|
15
15
|
|
16
16
|
# @!attribute created_at_gte
|
17
17
|
#
|
18
18
|
# @return [Time, nil]
|
19
|
-
optional :created_at_gte, Time,
|
19
|
+
optional :created_at_gte, Time, nil?: true
|
20
20
|
|
21
21
|
# @!attribute created_at_lt
|
22
22
|
#
|
23
23
|
# @return [Time, nil]
|
24
|
-
optional :created_at_lt, Time,
|
24
|
+
optional :created_at_lt, Time, nil?: true
|
25
25
|
|
26
26
|
# @!attribute created_at_lte
|
27
27
|
#
|
28
28
|
# @return [Time, nil]
|
29
|
-
optional :created_at_lte, Time,
|
29
|
+
optional :created_at_lte, Time, nil?: true
|
30
30
|
|
31
31
|
# @!attribute cursor
|
32
32
|
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
33
|
-
#
|
33
|
+
# from the initial request.
|
34
34
|
#
|
35
35
|
# @return [String, nil]
|
36
36
|
optional :cursor, String, nil?: true
|
@@ -10,8 +10,8 @@ module Orb
|
|
10
10
|
|
11
11
|
# @!attribute metadata
|
12
12
|
# User-specified key/value pairs for the resource. Individual keys can be removed
|
13
|
-
#
|
14
|
-
#
|
13
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
14
|
+
# by setting `metadata` to `null`.
|
15
15
|
#
|
16
16
|
# @return [Hash{Symbol=>String, nil}, nil]
|
17
17
|
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
|
@@ -5,7 +5,7 @@ module Orb
|
|
5
5
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
6
6
|
# @!attribute applies_to_price_ids
|
7
7
|
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
8
|
-
#
|
8
|
+
# this can be a subset of prices.
|
9
9
|
#
|
10
10
|
# @return [Array<String>]
|
11
11
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
@@ -17,7 +17,7 @@ module Orb
|
|
17
17
|
|
18
18
|
# @!attribute percentage_discount
|
19
19
|
# Only available if discount_type is `percentage`. This is a number between 0
|
20
|
-
#
|
20
|
+
# and 1.
|
21
21
|
#
|
22
22
|
# @return [Float]
|
23
23
|
required :percentage_discount, Float
|
data/lib/orb/models/plan.rb
CHANGED
@@ -11,7 +11,7 @@ module Orb
|
|
11
11
|
|
12
12
|
# @!attribute adjustments
|
13
13
|
# Adjustments for this plan. If the plan has phases, this includes adjustments
|
14
|
-
#
|
14
|
+
# across all phases of the plan.
|
15
15
|
#
|
16
16
|
# @return [Array<Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment>]
|
17
17
|
required :adjustments, -> { Orb::Internal::Type::ArrayOf[union: Orb::Models::Plan::Adjustment] }
|
@@ -23,7 +23,7 @@ module Orb
|
|
23
23
|
|
24
24
|
# @!attribute base_plan_id
|
25
25
|
# The parent plan id if the given plan was created by overriding one or more of
|
26
|
-
#
|
26
|
+
# the parent's prices
|
27
27
|
#
|
28
28
|
# @return [String, nil]
|
29
29
|
required :base_plan_id, String, nil?: true
|
@@ -35,14 +35,14 @@ module Orb
|
|
35
35
|
|
36
36
|
# @!attribute currency
|
37
37
|
# An ISO 4217 currency string or custom pricing unit (`credits`) for this plan's
|
38
|
-
#
|
38
|
+
# prices.
|
39
39
|
#
|
40
40
|
# @return [String]
|
41
41
|
required :currency, String
|
42
42
|
|
43
43
|
# @!attribute default_invoice_memo
|
44
44
|
# The default memo text on the invoices corresponding to subscriptions on this
|
45
|
-
#
|
45
|
+
# plan. Note that each subscription may configure its own memo.
|
46
46
|
#
|
47
47
|
# @return [String, nil]
|
48
48
|
required :default_invoice_memo, String, nil?: true
|
@@ -59,15 +59,15 @@ module Orb
|
|
59
59
|
|
60
60
|
# @!attribute external_plan_id
|
61
61
|
# An optional user-defined ID for this plan resource, used throughout the system
|
62
|
-
#
|
63
|
-
#
|
62
|
+
# as an alias for this Plan. Use this field to identify a plan by an existing
|
63
|
+
# identifier in your system.
|
64
64
|
#
|
65
65
|
# @return [String, nil]
|
66
66
|
required :external_plan_id, String, nil?: true
|
67
67
|
|
68
68
|
# @!attribute invoicing_currency
|
69
69
|
# An ISO 4217 currency string for which this plan is billed in. Matches `currency`
|
70
|
-
#
|
70
|
+
# unless `currency` is a custom pricing unit.
|
71
71
|
#
|
72
72
|
# @return [String]
|
73
73
|
required :invoicing_currency, String
|
@@ -84,9 +84,9 @@ module Orb
|
|
84
84
|
|
85
85
|
# @!attribute metadata
|
86
86
|
# User specified key-value pairs for the resource. If not present, this defaults
|
87
|
-
#
|
88
|
-
#
|
89
|
-
#
|
87
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
88
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
89
|
+
# `null`.
|
90
90
|
#
|
91
91
|
# @return [Hash{Symbol=>String}]
|
92
92
|
required :metadata, Orb::Internal::Type::HashOf[String]
|
@@ -108,10 +108,10 @@ module Orb
|
|
108
108
|
|
109
109
|
# @!attribute net_terms
|
110
110
|
# Determines the difference between the invoice issue date and the due date. A
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
111
|
+
# value of "0" here signifies that invoices are due on issue, whereas a value of
|
112
|
+
# "30" means that the customer has a month to pay the invoice before its overdue.
|
113
|
+
# Note that individual subscriptions or invoices may set a different net terms
|
114
|
+
# configuration.
|
115
115
|
#
|
116
116
|
# @return [Integer, nil]
|
117
117
|
required :net_terms, Integer, nil?: true
|
@@ -123,7 +123,7 @@ module Orb
|
|
123
123
|
|
124
124
|
# @!attribute prices
|
125
125
|
# Prices for this plan. If the plan has phases, this includes prices across all
|
126
|
-
#
|
126
|
+
# phases of the plan.
|
127
127
|
#
|
128
128
|
# @return [Array<Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice>]
|
129
129
|
required :prices, -> { Orb::Internal::Type::ArrayOf[union: Orb::Models::Price] }
|
@@ -150,9 +150,9 @@ module Orb
|
|
150
150
|
|
151
151
|
# @!parse
|
152
152
|
# # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
153
|
-
# #
|
154
|
-
# #
|
155
|
-
# #
|
153
|
+
# # subscribed to by a customer. Plans define the billing behavior of the
|
154
|
+
# # subscription. You can see more about how to configure prices in the
|
155
|
+
# # [Price resource](/reference/price).
|
156
156
|
# #
|
157
157
|
# # @param id [String]
|
158
158
|
# # @param adjustments [Array<Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment>]
|
@@ -245,7 +245,7 @@ module Orb
|
|
245
245
|
|
246
246
|
# @!attribute is_invoice_level
|
247
247
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
248
|
-
#
|
248
|
+
# that apply to only one price.
|
249
249
|
#
|
250
250
|
# @return [Boolean]
|
251
251
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
@@ -264,7 +264,7 @@ module Orb
|
|
264
264
|
|
265
265
|
# @!attribute usage_discount
|
266
266
|
# The number of usage units by which to discount the price this adjustment applies
|
267
|
-
#
|
267
|
+
# to in a given billing period.
|
268
268
|
#
|
269
269
|
# @return [Float]
|
270
270
|
required :usage_discount, Float
|
@@ -307,7 +307,7 @@ module Orb
|
|
307
307
|
|
308
308
|
# @!attribute amount_discount
|
309
309
|
# The amount by which to discount the prices this adjustment applies to in a given
|
310
|
-
#
|
310
|
+
# billing period.
|
311
311
|
#
|
312
312
|
# @return [String]
|
313
313
|
required :amount_discount, String
|
@@ -320,7 +320,7 @@ module Orb
|
|
320
320
|
|
321
321
|
# @!attribute is_invoice_level
|
322
322
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
323
|
-
#
|
323
|
+
# that apply to only one price.
|
324
324
|
#
|
325
325
|
# @return [Boolean]
|
326
326
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
@@ -381,14 +381,14 @@ module Orb
|
|
381
381
|
|
382
382
|
# @!attribute is_invoice_level
|
383
383
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
384
|
-
#
|
384
|
+
# that apply to only one price.
|
385
385
|
#
|
386
386
|
# @return [Boolean]
|
387
387
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
388
388
|
|
389
389
|
# @!attribute percentage_discount
|
390
390
|
# The percentage (as a value between 0 and 1) by which to discount the price
|
391
|
-
#
|
391
|
+
# intervals this adjustment applies to in a given billing period.
|
392
392
|
#
|
393
393
|
# @return [Float]
|
394
394
|
required :percentage_discount, Float
|
@@ -449,7 +449,7 @@ module Orb
|
|
449
449
|
|
450
450
|
# @!attribute is_invoice_level
|
451
451
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
452
|
-
#
|
452
|
+
# that apply to only one price.
|
453
453
|
#
|
454
454
|
# @return [Boolean]
|
455
455
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
@@ -462,7 +462,7 @@ module Orb
|
|
462
462
|
|
463
463
|
# @!attribute minimum_amount
|
464
464
|
# The minimum amount to charge in a given billing period for the prices this
|
465
|
-
#
|
465
|
+
# adjustment applies to.
|
466
466
|
#
|
467
467
|
# @return [String]
|
468
468
|
required :minimum_amount, String
|
@@ -525,14 +525,14 @@ module Orb
|
|
525
525
|
|
526
526
|
# @!attribute is_invoice_level
|
527
527
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
528
|
-
#
|
528
|
+
# that apply to only one price.
|
529
529
|
#
|
530
530
|
# @return [Boolean]
|
531
531
|
required :is_invoice_level, Orb::Internal::Type::Boolean
|
532
532
|
|
533
533
|
# @!attribute maximum_amount
|
534
534
|
# The maximum amount to charge in a given billing period for the prices this
|
535
|
-
#
|
535
|
+
# adjustment applies to.
|
536
536
|
#
|
537
537
|
# @return [String]
|
538
538
|
required :maximum_amount, String
|
@@ -588,8 +588,8 @@ module Orb
|
|
588
588
|
|
589
589
|
# @!attribute external_plan_id
|
590
590
|
# An optional user-defined ID for this plan resource, used throughout the system
|
591
|
-
#
|
592
|
-
#
|
591
|
+
# as an alias for this Plan. Use this field to identify a plan by an existing
|
592
|
+
# identifier in your system.
|
593
593
|
#
|
594
594
|
# @return [String, nil]
|
595
595
|
required :external_plan_id, String, nil?: true
|
@@ -613,7 +613,7 @@ module Orb
|
|
613
613
|
class Maximum < Orb::Internal::Type::BaseModel
|
614
614
|
# @!attribute applies_to_price_ids
|
615
615
|
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
616
|
-
#
|
616
|
+
# maximums, this can be a subset of prices.
|
617
617
|
#
|
618
618
|
# @return [Array<String>]
|
619
619
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
@@ -637,7 +637,7 @@ module Orb
|
|
637
637
|
class Minimum < Orb::Internal::Type::BaseModel
|
638
638
|
# @!attribute applies_to_price_ids
|
639
639
|
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
640
|
-
#
|
640
|
+
# minimums, this can be a subset of prices.
|
641
641
|
#
|
642
642
|
# @return [Array<String>]
|
643
643
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
@@ -675,7 +675,7 @@ module Orb
|
|
675
675
|
|
676
676
|
# @!attribute duration
|
677
677
|
# How many terms of length `duration_unit` this phase is active for. If null, this
|
678
|
-
#
|
678
|
+
# phase is evergreen and active indefinitely
|
679
679
|
#
|
680
680
|
# @return [Integer, nil]
|
681
681
|
required :duration, Integer, nil?: true
|
@@ -769,7 +769,7 @@ module Orb
|
|
769
769
|
class Maximum < Orb::Internal::Type::BaseModel
|
770
770
|
# @!attribute applies_to_price_ids
|
771
771
|
# List of price_ids that this maximum amount applies to. For plan/plan phase
|
772
|
-
#
|
772
|
+
# maximums, this can be a subset of prices.
|
773
773
|
#
|
774
774
|
# @return [Array<String>]
|
775
775
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
@@ -793,7 +793,7 @@ module Orb
|
|
793
793
|
class Minimum < Orb::Internal::Type::BaseModel
|
794
794
|
# @!attribute applies_to_price_ids
|
795
795
|
# List of price_ids that this minimum amount applies to. For plan/plan phase
|
796
|
-
#
|
796
|
+
# minimums, this can be a subset of prices.
|
797
797
|
#
|
798
798
|
# @return [Array<String>]
|
799
799
|
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|