orb-billing 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -0
- data/README.md +3 -3
- data/lib/orb/errors.rb +1 -1
- data/lib/orb/file_part.rb +2 -2
- data/lib/orb/internal/transport/base_client.rb +74 -5
- data/lib/orb/internal/transport/pooled_net_requester.rb +14 -0
- data/lib/orb/internal/type/array_of.rb +1 -1
- data/lib/orb/internal/type/base_model.rb +62 -30
- data/lib/orb/internal/type/converter.rb +18 -0
- data/lib/orb/internal/type/enum.rb +4 -3
- data/lib/orb/internal/type/hash_of.rb +1 -1
- data/lib/orb/internal/type/request_parameters.rb +4 -4
- data/lib/orb/internal/type/union.rb +5 -4
- data/lib/orb/internal/util.rb +57 -1
- data/lib/orb/internal.rb +6 -0
- data/lib/orb/models/alert.rb +29 -32
- data/lib/orb/models/alert_create_for_customer_params.rb +7 -8
- data/lib/orb/models/alert_create_for_external_customer_params.rb +7 -8
- data/lib/orb/models/alert_create_for_subscription_params.rb +7 -8
- data/lib/orb/models/alert_list_params.rb +0 -1
- data/lib/orb/models/alert_update_params.rb +4 -5
- data/lib/orb/models/amount_discount.rb +6 -7
- data/lib/orb/models/billable_metric.rb +9 -11
- data/lib/orb/models/coupon.rb +13 -12
- data/lib/orb/models/coupon_create_params.rb +12 -8
- data/lib/orb/models/coupon_list_params.rb +0 -2
- data/lib/orb/models/coupons/subscription_list_params.rb +0 -1
- data/lib/orb/models/credit_note.rb +48 -46
- data/lib/orb/models/credit_note_create_params.rb +6 -6
- data/lib/orb/models/credit_note_list_params.rb +0 -1
- data/lib/orb/models/customer.rb +54 -61
- data/lib/orb/models/customer_create_params.rb +50 -53
- data/lib/orb/models/customer_list_params.rb +0 -1
- data/lib/orb/models/customer_update_by_external_id_params.rb +50 -53
- data/lib/orb/models/customer_update_params.rb +50 -51
- data/lib/orb/models/customers/balance_transaction_create_params.rb +3 -3
- data/lib/orb/models/customers/balance_transaction_create_response.rb +0 -2
- data/lib/orb/models/customers/balance_transaction_list_params.rb +0 -1
- data/lib/orb/models/customers/balance_transaction_list_response.rb +0 -2
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +3 -4
- data/lib/orb/models/customers/cost_list_by_external_id_response.rb +3 -3
- data/lib/orb/models/customers/cost_list_params.rb +3 -4
- data/lib/orb/models/customers/cost_list_response.rb +3 -3
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +0 -2
- data/lib/orb/models/customers/credit_list_params.rb +0 -2
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +12 -21
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +14 -7
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +11 -22
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +14 -7
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +6 -7
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +14 -7
- data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -9
- data/lib/orb/models/customers/credits/ledger_list_response.rb +14 -7
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +10 -15
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +0 -6
- data/lib/orb/models/customers/credits/top_up_create_params.rb +7 -15
- data/lib/orb/models/customers/credits/top_up_create_response.rb +0 -6
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +0 -1
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +0 -6
- data/lib/orb/models/customers/credits/top_up_list_params.rb +0 -1
- data/lib/orb/models/customers/credits/top_up_list_response.rb +0 -6
- data/lib/orb/models/dimensional_price_group.rb +1 -3
- data/lib/orb/models/dimensional_price_group_create_params.rb +0 -1
- data/lib/orb/models/dimensional_price_group_list_params.rb +0 -1
- data/lib/orb/models/dimensional_price_groups.rb +6 -6
- data/lib/orb/models/discount.rb +11 -5
- data/lib/orb/models/evaluate_price_group.rb +5 -1
- data/lib/orb/models/event_ingest_params.rb +4 -9
- data/lib/orb/models/event_ingest_response.rb +0 -3
- data/lib/orb/models/event_search_params.rb +0 -3
- data/lib/orb/models/event_search_response.rb +0 -4
- data/lib/orb/models/event_update_params.rb +0 -3
- data/lib/orb/models/events/backfill_close_response.rb +0 -4
- data/lib/orb/models/events/backfill_create_params.rb +0 -7
- data/lib/orb/models/events/backfill_create_response.rb +0 -4
- data/lib/orb/models/events/backfill_fetch_response.rb +0 -4
- data/lib/orb/models/events/backfill_list_params.rb +0 -1
- data/lib/orb/models/events/backfill_list_response.rb +0 -4
- data/lib/orb/models/events/backfill_revert_response.rb +0 -4
- data/lib/orb/models/events/event_volumes.rb +3 -3
- data/lib/orb/models/events/volume_list_params.rb +0 -3
- data/lib/orb/models/invoice.rb +179 -202
- data/lib/orb/models/invoice_create_params.rb +14 -21
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +31 -54
- data/lib/orb/models/invoice_issue_params.rb +0 -1
- data/lib/orb/models/invoice_level_discount.rb +8 -4
- data/lib/orb/models/invoice_line_item_create_params.rb +0 -1
- data/lib/orb/models/invoice_line_item_create_response.rb +28 -26
- data/lib/orb/models/invoice_list_params.rb +6 -10
- data/lib/orb/models/invoice_update_params.rb +0 -1
- data/lib/orb/models/item.rb +7 -8
- data/lib/orb/models/item_list_params.rb +0 -1
- data/lib/orb/models/item_update_params.rb +7 -7
- data/lib/orb/models/metric_create_params.rb +0 -1
- data/lib/orb/models/metric_list_params.rb +0 -1
- data/lib/orb/models/metric_update_params.rb +0 -1
- data/lib/orb/models/percentage_discount.rb +6 -8
- data/lib/orb/models/plan.rb +90 -103
- data/lib/orb/models/plan_create_params.rb +759 -800
- data/lib/orb/models/plan_list_params.rb +3 -4
- data/lib/orb/models/plan_update_params.rb +0 -2
- data/lib/orb/models/plans/external_plan_id_update_params.rb +0 -2
- data/lib/orb/models/price.rb +1706 -1724
- data/lib/orb/models/price_create_params.rb +75 -84
- data/lib/orb/models/price_evaluate_params.rb +0 -2
- data/lib/orb/models/price_evaluate_response.rb +3 -3
- data/lib/orb/models/price_list_params.rb +0 -1
- data/lib/orb/models/price_update_params.rb +0 -1
- data/lib/orb/models/prices/external_price_id_update_params.rb +0 -1
- data/lib/orb/models/subscription.rb +108 -122
- data/lib/orb/models/subscription_cancel_params.rb +3 -5
- data/lib/orb/models/subscription_cancel_response.rb +43 -57
- data/lib/orb/models/subscription_change_apply_response.rb +43 -58
- data/lib/orb/models/subscription_change_cancel_response.rb +43 -58
- data/lib/orb/models/subscription_change_retrieve_response.rb +43 -58
- data/lib/orb/models/subscription_create_params.rb +1953 -1815
- data/lib/orb/models/subscription_create_response.rb +43 -57
- data/lib/orb/models/subscription_fetch_costs_params.rb +3 -4
- data/lib/orb/models/subscription_fetch_costs_response.rb +3 -3
- data/lib/orb/models/subscription_fetch_schedule_params.rb +0 -1
- data/lib/orb/models/subscription_fetch_schedule_response.rb +0 -1
- data/lib/orb/models/subscription_fetch_usage_params.rb +6 -8
- data/lib/orb/models/subscription_list_params.rb +3 -4
- data/lib/orb/models/subscription_price_intervals_params.rb +1194 -1017
- data/lib/orb/models/subscription_price_intervals_response.rb +43 -57
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +1994 -1791
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +43 -57
- data/lib/orb/models/subscription_trigger_phase_params.rb +0 -2
- data/lib/orb/models/subscription_trigger_phase_response.rb +43 -57
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +43 -57
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +43 -57
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +43 -57
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +3 -6
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +43 -57
- data/lib/orb/models/subscription_update_params.rb +0 -5
- data/lib/orb/models/subscription_update_trial_params.rb +8 -6
- data/lib/orb/models/subscription_update_trial_response.rb +43 -57
- data/lib/orb/models/subscription_usage.rb +55 -39
- data/lib/orb/models/subscriptions.rb +6 -6
- data/lib/orb/models/trial_discount.rb +6 -7
- data/lib/orb/models/usage_discount.rb +6 -8
- data/lib/orb/models.rb +24 -0
- data/lib/orb/request_options.rb +4 -0
- data/lib/orb/resources/alerts.rb +30 -31
- data/lib/orb/resources/coupons/subscriptions.rb +3 -4
- data/lib/orb/resources/coupons.rb +11 -21
- data/lib/orb/resources/credit_notes.rb +10 -11
- data/lib/orb/resources/customers/balance_transactions.rb +3 -4
- data/lib/orb/resources/customers/costs.rb +4 -6
- data/lib/orb/resources/customers/credits/ledger.rb +14 -33
- data/lib/orb/resources/customers/credits/top_ups.rb +10 -20
- data/lib/orb/resources/customers/credits.rb +2 -6
- data/lib/orb/resources/customers.rb +40 -67
- data/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +2 -2
- data/lib/orb/resources/dimensional_price_groups.rb +8 -10
- data/lib/orb/resources/events/backfills.rb +2 -10
- data/lib/orb/resources/events/volume.rb +3 -6
- data/lib/orb/resources/events.rb +4 -12
- data/lib/orb/resources/invoice_line_items.rb +1 -2
- data/lib/orb/resources/invoices.rb +26 -43
- data/lib/orb/resources/items.rb +12 -13
- data/lib/orb/resources/metrics.rb +11 -14
- data/lib/orb/resources/plans/external_plan_id.rb +5 -7
- data/lib/orb/resources/plans.rb +14 -23
- data/lib/orb/resources/prices/external_price_id.rb +5 -6
- data/lib/orb/resources/prices.rb +25 -35
- data/lib/orb/resources/subscription_changes.rb +1 -1
- data/lib/orb/resources/subscriptions.rb +49 -107
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +3 -0
- data/rbi/orb/client.rbi +5 -4
- data/rbi/orb/errors.rbi +59 -28
- data/rbi/orb/file_part.rbi +9 -6
- data/rbi/orb/internal/page.rbi +20 -6
- data/rbi/orb/internal/transport/base_client.rbi +159 -78
- data/rbi/orb/internal/transport/pooled_net_requester.rbi +27 -13
- data/rbi/orb/internal/type/array_of.rbi +42 -34
- data/rbi/orb/internal/type/base_model.rbi +144 -69
- data/rbi/orb/internal/type/base_page.rbi +12 -8
- data/rbi/orb/internal/type/boolean.rbi +16 -10
- data/rbi/orb/internal/type/converter.rbi +68 -31
- data/rbi/orb/internal/type/enum.rbi +28 -15
- data/rbi/orb/internal/type/file_input.rbi +12 -10
- data/rbi/orb/internal/type/hash_of.rbi +34 -24
- data/rbi/orb/internal/type/request_parameters.rbi +12 -4
- data/rbi/orb/internal/type/union.rbi +61 -25
- data/rbi/orb/internal/type/unknown.rbi +20 -12
- data/rbi/orb/internal/util.rbi +232 -90
- data/rbi/orb/internal.rbi +2 -0
- data/rbi/orb/models/alert.rbi +114 -70
- data/rbi/orb/models/alert_create_for_customer_params.rbi +69 -27
- data/rbi/orb/models/alert_create_for_external_customer_params.rbi +80 -29
- data/rbi/orb/models/alert_create_for_subscription_params.rbi +62 -26
- data/rbi/orb/models/alert_disable_params.rbi +18 -6
- data/rbi/orb/models/alert_enable_params.rbi +18 -6
- data/rbi/orb/models/alert_list_params.rbi +24 -20
- data/rbi/orb/models/alert_retrieve_params.rbi +11 -4
- data/rbi/orb/models/alert_update_params.rbi +29 -14
- data/rbi/orb/models/amount_discount.rbi +29 -19
- data/rbi/orb/models/billable_metric.rbi +34 -26
- data/rbi/orb/models/billing_cycle_relative_date.rbi +11 -5
- data/rbi/orb/models/coupon.rbi +28 -20
- data/rbi/orb/models/coupon_archive_params.rbi +11 -4
- data/rbi/orb/models/coupon_create_params.rbi +85 -38
- data/rbi/orb/models/coupon_fetch_params.rbi +11 -4
- data/rbi/orb/models/coupon_list_params.rbi +19 -15
- data/rbi/orb/models/coupons/subscription_list_params.rbi +19 -6
- data/rbi/orb/models/credit_note.rbi +329 -158
- data/rbi/orb/models/credit_note_create_params.rbi +64 -29
- data/rbi/orb/models/credit_note_fetch_params.rbi +13 -4
- data/rbi/orb/models/credit_note_list_params.rbi +23 -17
- data/rbi/orb/models/customer.rbi +461 -329
- data/rbi/orb/models/customer_create_params.rbi +713 -325
- data/rbi/orb/models/customer_delete_params.rbi +13 -4
- data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +13 -4
- data/rbi/orb/models/customer_fetch_params.rbi +11 -4
- data/rbi/orb/models/customer_list_params.rbi +21 -17
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +16 -4
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +16 -4
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +1193 -336
- data/rbi/orb/models/customer_update_params.rbi +712 -324
- data/rbi/orb/models/customers/balance_transaction_create_params.rbi +56 -21
- data/rbi/orb/models/customers/balance_transaction_create_response.rbi +172 -61
- data/rbi/orb/models/customers/balance_transaction_list_params.rbi +26 -17
- data/rbi/orb/models/customers/balance_transaction_list_response.rbi +182 -59
- data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +62 -22
- data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +180 -124
- data/rbi/orb/models/customers/cost_list_params.rbi +48 -22
- data/rbi/orb/models/customers/cost_list_response.rbi +172 -123
- data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +24 -15
- data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +54 -22
- data/rbi/orb/models/customers/credit_list_params.rbi +21 -15
- data/rbi/orb/models/customers/credit_list_response.rbi +50 -21
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +118 -68
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +755 -434
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +129 -59
- data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +812 -425
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +108 -44
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +793 -432
- data/rbi/orb/models/customers/credits/ledger_list_params.rbi +129 -40
- data/rbi/orb/models/customers/credits/ledger_list_response.rbi +847 -389
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +86 -53
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +77 -48
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +96 -45
- data/rbi/orb/models/customers/credits/top_up_create_response.rbi +95 -43
- data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +22 -6
- data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +21 -5
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +15 -5
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +82 -49
- data/rbi/orb/models/customers/credits/top_up_list_params.rbi +15 -5
- data/rbi/orb/models/customers/credits/top_up_list_response.rbi +96 -43
- data/rbi/orb/models/dimensional_price_group.rbi +21 -15
- data/rbi/orb/models/dimensional_price_group_create_params.rbi +22 -16
- data/rbi/orb/models/dimensional_price_group_list_params.rbi +19 -6
- data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +16 -4
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +15 -8
- data/rbi/orb/models/dimensional_price_groups.rbi +21 -13
- data/rbi/orb/models/discount.rbi +11 -5
- data/rbi/orb/models/evaluate_price_group.rbi +29 -12
- data/rbi/orb/models/event_deprecate_params.rbi +13 -4
- data/rbi/orb/models/event_deprecate_response.rbi +11 -3
- data/rbi/orb/models/event_ingest_params.rbi +41 -31
- data/rbi/orb/models/event_ingest_response.rbi +78 -23
- data/rbi/orb/models/event_search_params.rbi +18 -14
- data/rbi/orb/models/event_search_response.rbi +42 -21
- data/rbi/orb/models/event_update_params.rbi +20 -16
- data/rbi/orb/models/event_update_response.rbi +11 -3
- data/rbi/orb/models/events/backfill_close_params.rbi +13 -9
- data/rbi/orb/models/events/backfill_close_response.rbi +70 -29
- data/rbi/orb/models/events/backfill_create_params.rbi +24 -18
- data/rbi/orb/models/events/backfill_create_response.rbi +69 -29
- data/rbi/orb/models/events/backfill_fetch_params.rbi +13 -9
- data/rbi/orb/models/events/backfill_fetch_response.rbi +70 -29
- data/rbi/orb/models/events/backfill_list_params.rbi +19 -6
- data/rbi/orb/models/events/backfill_list_response.rbi +68 -28
- data/rbi/orb/models/events/backfill_revert_params.rbi +13 -9
- data/rbi/orb/models/events/backfill_revert_response.rbi +69 -29
- data/rbi/orb/models/events/event_volumes.rbi +38 -10
- data/rbi/orb/models/events/volume_list_params.rbi +21 -15
- data/rbi/orb/models/invoice.rbi +1411 -805
- data/rbi/orb/models/invoice_create_params.rbi +107 -69
- data/rbi/orb/models/invoice_fetch_params.rbi +11 -4
- data/rbi/orb/models/invoice_fetch_upcoming_params.rbi +18 -5
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +2187 -876
- data/rbi/orb/models/invoice_issue_params.rbi +17 -5
- data/rbi/orb/models/invoice_level_discount.rbi +11 -4
- data/rbi/orb/models/invoice_line_item_create_params.rbi +23 -17
- data/rbi/orb/models/invoice_line_item_create_response.rbi +675 -376
- data/rbi/orb/models/invoice_list_params.rbi +68 -47
- data/rbi/orb/models/invoice_mark_paid_params.rbi +20 -14
- data/rbi/orb/models/invoice_pay_params.rbi +11 -4
- data/rbi/orb/models/invoice_update_params.rbi +16 -10
- data/rbi/orb/models/invoice_void_params.rbi +11 -4
- data/rbi/orb/models/item.rbi +90 -39
- data/rbi/orb/models/item_create_params.rbi +15 -5
- data/rbi/orb/models/item_fetch_params.rbi +11 -4
- data/rbi/orb/models/item_list_params.rbi +17 -6
- data/rbi/orb/models/item_update_params.rbi +86 -39
- data/rbi/orb/models/metric_create_params.rbi +20 -16
- data/rbi/orb/models/metric_fetch_params.rbi +11 -4
- data/rbi/orb/models/metric_list_params.rbi +21 -17
- data/rbi/orb/models/metric_update_params.rbi +16 -10
- data/rbi/orb/models/pagination_metadata.rbi +17 -4
- data/rbi/orb/models/percentage_discount.rbi +33 -19
- data/rbi/orb/models/plan.rbi +532 -365
- data/rbi/orb/models/plan_create_params.rbi +5295 -2870
- data/rbi/orb/models/plan_fetch_params.rbi +11 -4
- data/rbi/orb/models/plan_list_params.rbi +35 -27
- data/rbi/orb/models/plan_update_params.rbi +17 -13
- data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +13 -9
- data/rbi/orb/models/plans/external_plan_id_update_params.rbi +22 -13
- data/rbi/orb/models/price.rbi +11332 -5033
- data/rbi/orb/models/price_create_params.rbi +583 -245
- data/rbi/orb/models/price_evaluate_params.rbi +21 -17
- data/rbi/orb/models/price_evaluate_response.rbi +14 -6
- data/rbi/orb/models/price_fetch_params.rbi +11 -4
- data/rbi/orb/models/price_list_params.rbi +17 -6
- data/rbi/orb/models/price_update_params.rbi +16 -10
- data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +15 -8
- data/rbi/orb/models/prices/external_price_id_update_params.rbi +21 -10
- data/rbi/orb/models/subscription.rbi +668 -420
- data/rbi/orb/models/subscription_cancel_params.rbi +47 -22
- data/rbi/orb/models/subscription_cancel_response.rbi +817 -438
- data/rbi/orb/models/subscription_change_apply_params.rbi +19 -13
- data/rbi/orb/models/subscription_change_apply_response.rbi +906 -505
- data/rbi/orb/models/subscription_change_cancel_params.rbi +13 -4
- data/rbi/orb/models/subscription_change_cancel_response.rbi +906 -516
- data/rbi/orb/models/subscription_change_retrieve_params.rbi +13 -4
- data/rbi/orb/models/subscription_change_retrieve_response.rbi +903 -524
- data/rbi/orb/models/subscription_create_params.rbi +10096 -6746
- data/rbi/orb/models/subscription_create_response.rbi +817 -438
- data/rbi/orb/models/subscription_fetch_costs_params.rbi +50 -22
- data/rbi/orb/models/subscription_fetch_costs_response.rbi +172 -123
- data/rbi/orb/models/subscription_fetch_params.rbi +13 -4
- data/rbi/orb/models/subscription_fetch_schedule_params.rbi +23 -17
- data/rbi/orb/models/subscription_fetch_schedule_response.rbi +45 -19
- data/rbi/orb/models/subscription_fetch_usage_params.rbi +84 -34
- data/rbi/orb/models/subscription_list_params.rbi +42 -28
- data/rbi/orb/models/subscription_price_intervals_params.rbi +5798 -3823
- data/rbi/orb/models/subscription_price_intervals_response.rbi +840 -453
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +9676 -6922
- data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +838 -467
- data/rbi/orb/models/subscription_trigger_phase_params.rbi +19 -13
- data/rbi/orb/models/subscription_trigger_phase_response.rbi +832 -448
- data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +16 -4
- data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +839 -467
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +22 -5
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +815 -504
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +16 -4
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +828 -497
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +63 -26
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +839 -467
- data/rbi/orb/models/subscription_update_params.rbi +22 -16
- data/rbi/orb/models/subscription_update_trial_params.rbi +60 -19
- data/rbi/orb/models/subscription_update_trial_response.rbi +832 -447
- data/rbi/orb/models/subscription_usage.rbi +325 -121
- data/rbi/orb/models/subscriptions.rbi +19 -11
- data/rbi/orb/models/top_level_ping_params.rbi +11 -4
- data/rbi/orb/models/top_level_ping_response.rbi +10 -3
- data/rbi/orb/models/trial_discount.rbi +30 -20
- data/rbi/orb/models/usage_discount.rbi +29 -19
- data/rbi/orb/models.rbi +22 -11
- data/rbi/orb/request_options.rbi +12 -6
- data/rbi/orb/resources/alerts.rbi +61 -40
- data/rbi/orb/resources/coupons/subscriptions.rbi +7 -5
- data/rbi/orb/resources/coupons.rbi +33 -18
- data/rbi/orb/resources/credit_notes.rbi +22 -13
- data/rbi/orb/resources/customers/balance_transactions.rbi +17 -9
- data/rbi/orb/resources/customers/costs.rbi +18 -11
- data/rbi/orb/resources/customers/credits/ledger.rbi +98 -74
- data/rbi/orb/resources/customers/credits/top_ups.rbi +61 -25
- data/rbi/orb/resources/customers/credits.rbi +16 -7
- data/rbi/orb/resources/customers.rbi +137 -72
- data/rbi/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +8 -4
- data/rbi/orb/resources/dimensional_price_groups.rbi +26 -12
- data/rbi/orb/resources/events/backfills.rbi +35 -17
- data/rbi/orb/resources/events/volume.rbi +7 -5
- data/rbi/orb/resources/events.rbi +26 -16
- data/rbi/orb/resources/invoice_line_items.rbi +7 -5
- data/rbi/orb/resources/invoices.rbi +72 -41
- data/rbi/orb/resources/items.rbi +40 -13
- data/rbi/orb/resources/metrics.rbi +25 -15
- data/rbi/orb/resources/plans/external_plan_id.rbi +15 -7
- data/rbi/orb/resources/plans.rbi +57 -47
- data/rbi/orb/resources/prices/external_price_id.rbi +73 -68
- data/rbi/orb/resources/prices.rbi +176 -156
- data/rbi/orb/resources/subscription_changes.rbi +19 -11
- data/rbi/orb/resources/subscriptions.rbi +200 -114
- data/rbi/orb/resources/top_level.rbi +9 -3
- data/sig/orb/internal/page.rbs +0 -2
- data/sig/orb/internal/transport/base_client.rbs +16 -1
- data/sig/orb/internal/transport/pooled_net_requester.rbs +2 -0
- data/sig/orb/internal/type/base_model.rbs +11 -5
- data/sig/orb/internal/type/base_page.rbs +1 -1
- data/sig/orb/internal/type/converter.rbs +2 -0
- data/sig/orb/internal/type/enum.rbs +1 -0
- data/sig/orb/internal/type/request_parameters.rbs +3 -1
- data/sig/orb/internal/type/union.rbs +1 -0
- data/sig/orb/internal/util.rbs +13 -0
- data/sig/orb/internal.rbs +2 -0
- data/sig/orb/models/alert.rbs +19 -31
- data/sig/orb/models/alert_create_for_customer_params.rbs +3 -7
- data/sig/orb/models/alert_create_for_external_customer_params.rbs +3 -7
- data/sig/orb/models/alert_create_for_subscription_params.rbs +3 -7
- data/sig/orb/models/alert_disable_params.rbs +0 -2
- data/sig/orb/models/alert_enable_params.rbs +0 -2
- data/sig/orb/models/alert_list_params.rbs +0 -2
- data/sig/orb/models/alert_retrieve_params.rbs +0 -2
- data/sig/orb/models/alert_update_params.rbs +3 -7
- data/sig/orb/models/amount_discount.rbs +4 -6
- data/sig/orb/models/billable_metric.rbs +7 -9
- data/sig/orb/models/coupon.rbs +5 -8
- data/sig/orb/models/coupon_archive_params.rbs +0 -2
- data/sig/orb/models/coupon_create_params.rbs +3 -9
- data/sig/orb/models/coupon_fetch_params.rbs +0 -2
- data/sig/orb/models/coupon_list_params.rbs +0 -2
- data/sig/orb/models/coupons/subscription_list_params.rbs +0 -2
- data/sig/orb/models/credit_note.rbs +48 -66
- data/sig/orb/models/credit_note_create_params.rbs +3 -7
- data/sig/orb/models/credit_note_fetch_params.rbs +0 -2
- data/sig/orb/models/credit_note_list_params.rbs +0 -2
- data/sig/orb/models/customer.rbs +43 -63
- data/sig/orb/models/customer_create_params.rbs +32 -52
- data/sig/orb/models/customer_delete_params.rbs +0 -2
- data/sig/orb/models/customer_fetch_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customer_fetch_params.rbs +0 -2
- data/sig/orb/models/customer_list_params.rbs +0 -2
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +0 -2
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +0 -2
- data/sig/orb/models/customer_update_by_external_id_params.rbs +32 -52
- data/sig/orb/models/customer_update_params.rbs +32 -52
- data/sig/orb/models/customers/balance_transaction_create_params.rbs +0 -2
- data/sig/orb/models/customers/balance_transaction_create_response.rbs +0 -6
- data/sig/orb/models/customers/balance_transaction_list_params.rbs +0 -2
- data/sig/orb/models/customers/balance_transaction_list_response.rbs +0 -6
- data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +0 -6
- data/sig/orb/models/customers/cost_list_params.rbs +0 -2
- data/sig/orb/models/customers/cost_list_response.rbs +0 -6
- data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +0 -2
- data/sig/orb/models/customers/credit_list_params.rbs +0 -2
- data/sig/orb/models/customers/credit_list_response.rbs +0 -2
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +3 -7
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +1 -43
- data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +3 -7
- data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +1 -43
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +1 -43
- data/sig/orb/models/customers/credits/ledger_list_params.rbs +0 -2
- data/sig/orb/models/customers/credits/ledger_list_response.rbs +1 -43
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +3 -7
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +0 -4
- data/sig/orb/models/customers/credits/top_up_create_params.rbs +3 -7
- data/sig/orb/models/customers/credits/top_up_create_response.rbs +0 -4
- data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customers/credits/top_up_delete_params.rbs +0 -2
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +0 -4
- data/sig/orb/models/customers/credits/top_up_list_params.rbs +0 -2
- data/sig/orb/models/customers/credits/top_up_list_response.rbs +0 -4
- data/sig/orb/models/dimensional_price_group.rbs +0 -2
- data/sig/orb/models/dimensional_price_group_create_params.rbs +0 -2
- data/sig/orb/models/dimensional_price_group_list_params.rbs +0 -2
- data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +0 -2
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +0 -2
- data/sig/orb/models/dimensional_price_groups.rbs +6 -8
- data/sig/orb/models/discount.rbs +5 -5
- data/sig/orb/models/evaluate_price_group.rbs +4 -6
- data/sig/orb/models/event_deprecate_params.rbs +0 -2
- data/sig/orb/models/event_deprecate_response.rbs +0 -2
- data/sig/orb/models/event_ingest_params.rbs +3 -7
- data/sig/orb/models/event_ingest_response.rbs +0 -6
- data/sig/orb/models/event_search_params.rbs +0 -2
- data/sig/orb/models/event_search_response.rbs +0 -4
- data/sig/orb/models/event_update_params.rbs +0 -2
- data/sig/orb/models/event_update_response.rbs +0 -2
- data/sig/orb/models/events/backfill_close_params.rbs +0 -2
- data/sig/orb/models/events/backfill_close_response.rbs +0 -2
- data/sig/orb/models/events/backfill_create_params.rbs +0 -2
- data/sig/orb/models/events/backfill_create_response.rbs +0 -2
- data/sig/orb/models/events/backfill_fetch_params.rbs +0 -2
- data/sig/orb/models/events/backfill_fetch_response.rbs +0 -2
- data/sig/orb/models/events/backfill_list_params.rbs +0 -2
- data/sig/orb/models/events/backfill_list_response.rbs +0 -2
- data/sig/orb/models/events/backfill_revert_params.rbs +0 -2
- data/sig/orb/models/events/backfill_revert_response.rbs +0 -2
- data/sig/orb/models/events/event_volumes.rbs +3 -10
- data/sig/orb/models/events/volume_list_params.rbs +0 -2
- data/sig/orb/models/invoice.rbs +110 -172
- data/sig/orb/models/invoice_create_params.rbs +10 -16
- data/sig/orb/models/invoice_fetch_params.rbs +0 -2
- data/sig/orb/models/invoice_fetch_upcoming_params.rbs +0 -2
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +2 -64
- data/sig/orb/models/invoice_issue_params.rbs +0 -2
- data/sig/orb/models/invoice_level_discount.rbs +2 -4
- data/sig/orb/models/invoice_line_item_create_params.rbs +0 -2
- data/sig/orb/models/invoice_line_item_create_response.rbs +2 -36
- data/sig/orb/models/invoice_list_params.rbs +4 -6
- data/sig/orb/models/invoice_mark_paid_params.rbs +0 -2
- data/sig/orb/models/invoice_pay_params.rbs +0 -2
- data/sig/orb/models/invoice_update_params.rbs +0 -2
- data/sig/orb/models/invoice_void_params.rbs +0 -2
- data/sig/orb/models/item.rbs +7 -11
- data/sig/orb/models/item_create_params.rbs +0 -2
- data/sig/orb/models/item_fetch_params.rbs +0 -2
- data/sig/orb/models/item_list_params.rbs +0 -2
- data/sig/orb/models/item_update_params.rbs +7 -11
- data/sig/orb/models/metric_create_params.rbs +0 -2
- data/sig/orb/models/metric_fetch_params.rbs +0 -2
- data/sig/orb/models/metric_list_params.rbs +0 -2
- data/sig/orb/models/metric_update_params.rbs +0 -2
- data/sig/orb/models/pagination_metadata.rbs +0 -2
- data/sig/orb/models/percentage_discount.rbs +4 -6
- data/sig/orb/models/plan.rbs +45 -73
- data/sig/orb/models/plan_create_params.rbs +518 -696
- data/sig/orb/models/plan_fetch_params.rbs +0 -2
- data/sig/orb/models/plan_list_params.rbs +0 -2
- data/sig/orb/models/plan_update_params.rbs +0 -2
- data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +0 -2
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +0 -2
- data/sig/orb/models/price.rbs +1194 -1730
- data/sig/orb/models/price_create_params.rbs +59 -97
- data/sig/orb/models/price_evaluate_params.rbs +0 -2
- data/sig/orb/models/price_evaluate_response.rbs +3 -6
- data/sig/orb/models/price_fetch_params.rbs +0 -2
- data/sig/orb/models/price_list_params.rbs +0 -2
- data/sig/orb/models/price_update_params.rbs +0 -2
- data/sig/orb/models/prices/external_price_id_fetch_params.rbs +0 -2
- data/sig/orb/models/prices/external_price_id_update_params.rbs +0 -2
- data/sig/orb/models/subscription.rbs +56 -94
- data/sig/orb/models/subscription_cancel_params.rbs +0 -2
- data/sig/orb/models/subscription_cancel_response.rbs +20 -60
- data/sig/orb/models/subscription_change_apply_params.rbs +0 -2
- data/sig/orb/models/subscription_change_apply_response.rbs +20 -62
- data/sig/orb/models/subscription_change_cancel_params.rbs +0 -2
- data/sig/orb/models/subscription_change_cancel_response.rbs +20 -62
- data/sig/orb/models/subscription_change_retrieve_params.rbs +0 -2
- data/sig/orb/models/subscription_change_retrieve_response.rbs +20 -62
- data/sig/orb/models/subscription_create_params.rbs +1103 -1499
- data/sig/orb/models/subscription_create_response.rbs +20 -60
- data/sig/orb/models/subscription_fetch_costs_params.rbs +0 -2
- data/sig/orb/models/subscription_fetch_costs_response.rbs +0 -6
- data/sig/orb/models/subscription_fetch_params.rbs +0 -2
- data/sig/orb/models/subscription_fetch_schedule_params.rbs +0 -2
- data/sig/orb/models/subscription_fetch_schedule_response.rbs +0 -4
- data/sig/orb/models/subscription_fetch_usage_params.rbs +0 -2
- data/sig/orb/models/subscription_list_params.rbs +0 -2
- data/sig/orb/models/subscription_price_intervals_params.rbs +666 -896
- data/sig/orb/models/subscription_price_intervals_response.rbs +20 -60
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1103 -1499
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +20 -60
- data/sig/orb/models/subscription_trigger_phase_params.rbs +0 -2
- data/sig/orb/models/subscription_trigger_phase_response.rbs +20 -60
- data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +0 -2
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +20 -60
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +0 -2
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +20 -60
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +0 -2
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +20 -60
- data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +0 -2
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +20 -60
- data/sig/orb/models/subscription_update_params.rbs +0 -2
- data/sig/orb/models/subscription_update_trial_params.rbs +1 -3
- data/sig/orb/models/subscription_update_trial_response.rbs +20 -60
- data/sig/orb/models/subscription_usage.rbs +35 -53
- data/sig/orb/models/subscriptions.rbs +6 -8
- data/sig/orb/models/top_level_ping_params.rbs +0 -2
- data/sig/orb/models/top_level_ping_response.rbs +0 -2
- data/sig/orb/models/trial_discount.rbs +4 -6
- data/sig/orb/models/usage_discount.rbs +4 -6
- data/sig/orb/request_options.rbs +1 -1
- data/sig/orb/resources/alerts.rbs +12 -12
- data/sig/orb/resources/coupons/subscriptions.rbs +1 -1
- data/sig/orb/resources/coupons.rbs +4 -4
- data/sig/orb/resources/credit_notes.rbs +4 -4
- data/sig/orb/resources/customers/credits/ledger.rbs +2 -2
- data/sig/orb/resources/customers/credits/top_ups.rbs +2 -2
- data/sig/orb/resources/customers.rbs +24 -24
- data/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs +1 -1
- data/sig/orb/resources/dimensional_price_groups.rbs +3 -3
- data/sig/orb/resources/events/volume.rbs +1 -1
- data/sig/orb/resources/events.rbs +1 -1
- data/sig/orb/resources/invoices.rbs +10 -10
- data/sig/orb/resources/items.rbs +5 -5
- data/sig/orb/resources/metrics.rbs +4 -4
- data/sig/orb/resources/plans/external_plan_id.rbs +2 -2
- data/sig/orb/resources/plans.rbs +5 -5
- data/sig/orb/resources/prices.rbs +11 -11
- data/sig/orb/resources/subscriptions.rbs +21 -21
- metadata +2 -2
@@ -49,7 +49,6 @@ module Orb
|
|
49
49
|
# @param id [String]
|
50
50
|
#
|
51
51
|
# @param expiration_time [Time] Subscription change will be cancelled at this time and can no longer be applied.
|
52
|
-
# ...
|
53
52
|
#
|
54
53
|
# @param status [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Status]
|
55
54
|
#
|
@@ -157,8 +156,8 @@ module Orb
|
|
157
156
|
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
158
157
|
# information on what this timezone parameter influences within Orb.
|
159
158
|
#
|
160
|
-
# @return [Orb::
|
161
|
-
required :customer, -> { Orb::
|
159
|
+
# @return [Orb::Customer]
|
160
|
+
required :customer, -> { Orb::Customer }
|
162
161
|
|
163
162
|
# @!attribute default_invoice_memo
|
164
163
|
# Determines the default memo on this subscriptions' invoices. Note that if this
|
@@ -237,8 +236,8 @@ module Orb
|
|
237
236
|
# subscription. You can see more about how to configure prices in the
|
238
237
|
# [Price resource](/reference/price).
|
239
238
|
#
|
240
|
-
# @return [Orb::
|
241
|
-
required :plan, -> { Orb::
|
239
|
+
# @return [Orb::Plan]
|
240
|
+
required :plan, -> { Orb::Plan }
|
242
241
|
|
243
242
|
# @!attribute price_intervals
|
244
243
|
# The price intervals for this subscription.
|
@@ -287,32 +286,24 @@ module Orb
|
|
287
286
|
# @param id [String]
|
288
287
|
#
|
289
288
|
# @param active_plan_phase_order [Integer, nil] The current plan phase that is active, only if the subscription's plan has phase
|
290
|
-
# ...
|
291
289
|
#
|
292
290
|
# @param adjustment_intervals [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval>] The adjustment intervals for this subscription sorted by the start_date of the a
|
293
|
-
# ...
|
294
291
|
#
|
295
292
|
# @param auto_collection [Boolean, nil] Determines whether issued invoices for this subscription will automatically be c
|
296
|
-
# ...
|
297
293
|
#
|
298
294
|
# @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionChangeCancelResponse::Subscription::BillingCycleAnchorConfiguration]
|
299
295
|
#
|
300
296
|
# @param billing_cycle_day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
|
301
|
-
# ...
|
302
297
|
#
|
303
298
|
# @param created_at [Time]
|
304
299
|
#
|
305
300
|
# @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
|
306
|
-
# ...
|
307
301
|
#
|
308
302
|
# @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
|
309
|
-
# ...
|
310
303
|
#
|
311
|
-
# @param customer [Orb::
|
312
|
-
# ...
|
304
|
+
# @param customer [Orb::Customer] A customer is a buyer of your products, and the other party to the billing relat
|
313
305
|
#
|
314
306
|
# @param default_invoice_memo [String, nil] Determines the default memo on this subscriptions' invoices. Note that if this i
|
315
|
-
# ...
|
316
307
|
#
|
317
308
|
# @param discount_intervals [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage>] The discount intervals for this subscription sorted by the start_date.
|
318
309
|
#
|
@@ -325,17 +316,14 @@ module Orb
|
|
325
316
|
# @param maximum_intervals [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::MaximumInterval>] The maximum intervals for this subscription sorted by the start_date.
|
326
317
|
#
|
327
318
|
# @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
|
328
|
-
# ...
|
329
319
|
#
|
330
320
|
# @param minimum_intervals [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
|
331
321
|
#
|
332
322
|
# @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
|
333
|
-
# ...
|
334
323
|
#
|
335
324
|
# @param pending_subscription_change [Orb::Models::SubscriptionChangeCancelResponse::Subscription::PendingSubscriptionChange, nil] A pending subscription change if one exists on this subscription.
|
336
325
|
#
|
337
|
-
# @param plan [Orb::
|
338
|
-
# ...
|
326
|
+
# @param plan [Orb::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
339
327
|
#
|
340
328
|
# @param price_intervals [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::PriceInterval>] The price intervals for this subscription.
|
341
329
|
#
|
@@ -348,7 +336,6 @@ module Orb
|
|
348
336
|
# @param trial_info [Orb::Models::SubscriptionChangeCancelResponse::Subscription::TrialInfo]
|
349
337
|
#
|
350
338
|
# @param changed_resources [Orb::Models::SubscriptionChangeCancelResponse::Subscription::ChangedResources, nil] The resources that were changed as part of this operation. Only present when fet
|
351
|
-
# ...
|
352
339
|
|
353
340
|
class AdjustmentInterval < Orb::Internal::Type::BaseModel
|
354
341
|
# @!attribute id
|
@@ -465,14 +452,12 @@ module Orb
|
|
465
452
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
466
453
|
#
|
467
454
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
468
|
-
# ...
|
469
455
|
#
|
470
456
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
471
457
|
#
|
472
458
|
# @param reason [String, nil] The reason for the adjustment.
|
473
459
|
#
|
474
460
|
# @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
|
475
|
-
# ...
|
476
461
|
#
|
477
462
|
# @param adjustment_type [Symbol, :usage_discount]
|
478
463
|
end
|
@@ -528,12 +513,10 @@ module Orb
|
|
528
513
|
# @param id [String]
|
529
514
|
#
|
530
515
|
# @param amount_discount [String] The amount by which to discount the prices this adjustment applies to in a given
|
531
|
-
# ...
|
532
516
|
#
|
533
517
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
534
518
|
#
|
535
519
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
536
|
-
# ...
|
537
520
|
#
|
538
521
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
539
522
|
#
|
@@ -595,10 +578,8 @@ module Orb
|
|
595
578
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
596
579
|
#
|
597
580
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
598
|
-
# ...
|
599
581
|
#
|
600
582
|
# @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
|
601
|
-
# ...
|
602
583
|
#
|
603
584
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
604
585
|
#
|
@@ -666,12 +647,10 @@ module Orb
|
|
666
647
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
667
648
|
#
|
668
649
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
669
|
-
# ...
|
670
650
|
#
|
671
651
|
# @param item_id [String] The item ID that revenue from this minimum will be attributed to.
|
672
652
|
#
|
673
653
|
# @param minimum_amount [String] The minimum amount to charge in a given billing period for the prices this adjus
|
674
|
-
# ...
|
675
654
|
#
|
676
655
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
677
656
|
#
|
@@ -733,10 +712,8 @@ module Orb
|
|
733
712
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
734
713
|
#
|
735
714
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
736
|
-
# ...
|
737
715
|
#
|
738
716
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
|
739
|
-
# ...
|
740
717
|
#
|
741
718
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
742
719
|
#
|
@@ -747,6 +724,18 @@ module Orb
|
|
747
724
|
|
748
725
|
# @!method self.variants
|
749
726
|
# @return [Array(Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum)]
|
727
|
+
|
728
|
+
define_sorbet_constant!(:Variants) do
|
729
|
+
T.type_alias do
|
730
|
+
T.any(
|
731
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount,
|
732
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount,
|
733
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount,
|
734
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum,
|
735
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum
|
736
|
+
)
|
737
|
+
end
|
738
|
+
end
|
750
739
|
end
|
751
740
|
end
|
752
741
|
|
@@ -782,13 +771,10 @@ module Orb
|
|
782
771
|
# for more details.
|
783
772
|
#
|
784
773
|
# @param day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
|
785
|
-
# ...
|
786
774
|
#
|
787
775
|
# @param month [Integer, nil] The month on which the billing cycle is anchored (e.g. a quarterly price anchore
|
788
|
-
# ...
|
789
776
|
#
|
790
777
|
# @param year [Integer, nil] The year on which the billing cycle is anchored (e.g. a 2 year billing cycle anc
|
791
|
-
# ...
|
792
778
|
end
|
793
779
|
|
794
780
|
module DiscountInterval
|
@@ -904,7 +890,6 @@ module Orb
|
|
904
890
|
# @param end_date [Time, nil] The end date of the discount interval.
|
905
891
|
#
|
906
892
|
# @param percentage_discount [Float] Only available if discount_type is `percentage`.This is a number between 0 and 1
|
907
|
-
# ...
|
908
893
|
#
|
909
894
|
# @param start_date [Time] The start date of the discount interval.
|
910
895
|
#
|
@@ -962,13 +947,22 @@ module Orb
|
|
962
947
|
# @param start_date [Time] The start date of the discount interval.
|
963
948
|
#
|
964
949
|
# @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
|
965
|
-
# ...
|
966
950
|
#
|
967
951
|
# @param discount_type [Symbol, :usage]
|
968
952
|
end
|
969
953
|
|
970
954
|
# @!method self.variants
|
971
955
|
# @return [Array(Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage)]
|
956
|
+
|
957
|
+
define_sorbet_constant!(:Variants) do
|
958
|
+
T.type_alias do
|
959
|
+
T.any(
|
960
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount,
|
961
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage,
|
962
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage
|
963
|
+
)
|
964
|
+
end
|
965
|
+
end
|
972
966
|
end
|
973
967
|
|
974
968
|
class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
|
@@ -1043,7 +1037,6 @@ module Orb
|
|
1043
1037
|
# @param end_date [Time, nil] The end date of the maximum interval.
|
1044
1038
|
#
|
1045
1039
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the price intervals t
|
1046
|
-
# ...
|
1047
1040
|
#
|
1048
1041
|
# @param start_date [Time] The start date of the maximum interval.
|
1049
1042
|
end
|
@@ -1092,7 +1085,6 @@ module Orb
|
|
1092
1085
|
# @param end_date [Time, nil] The end date of the minimum interval.
|
1093
1086
|
#
|
1094
1087
|
# @param minimum_amount [String] The minimum amount to charge in a given billing period for the price intervals t
|
1095
|
-
# ...
|
1096
1088
|
#
|
1097
1089
|
# @param start_date [Time] The start date of the minimum interval.
|
1098
1090
|
end
|
@@ -1172,8 +1164,8 @@ module Orb
|
|
1172
1164
|
# For more on the types of prices, see
|
1173
1165
|
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1174
1166
|
#
|
1175
|
-
# @return [Orb::
|
1176
|
-
required :price, union: -> { Orb::
|
1167
|
+
# @return [Orb::Price::Unit, Orb::Price::Package, Orb::Price::Matrix, Orb::Price::Tiered, Orb::Price::TieredBps, Orb::Price::Bps, Orb::Price::BulkBps, Orb::Price::Bulk, Orb::Price::ThresholdTotalAmount, Orb::Price::TieredPackage, Orb::Price::GroupedTiered, Orb::Price::TieredWithMinimum, Orb::Price::TieredPackageWithMinimum, Orb::Price::PackageWithAllocation, Orb::Price::UnitWithPercent, Orb::Price::MatrixWithAllocation, Orb::Price::TieredWithProration, Orb::Price::UnitWithProration, Orb::Price::GroupedAllocation, Orb::Price::GroupedWithProratedMinimum, Orb::Price::GroupedWithMeteredMinimum, Orb::Price::MatrixWithDisplayName, Orb::Price::BulkWithProration, Orb::Price::GroupedTieredPackage, Orb::Price::MaxGroupTieredPackage, Orb::Price::ScalableMatrixWithUnitPricing, Orb::Price::ScalableMatrixWithTieredPricing, Orb::Price::CumulativeGroupedBulk]
|
1168
|
+
required :price, union: -> { Orb::Price }
|
1177
1169
|
|
1178
1170
|
# @!attribute start_date
|
1179
1171
|
# The start date of the price interval. This is the date that Orb starts billing
|
@@ -1203,27 +1195,20 @@ module Orb
|
|
1203
1195
|
# @param billing_cycle_day [Integer] The day of the month that Orb bills for this price
|
1204
1196
|
#
|
1205
1197
|
# @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
|
1206
|
-
# ...
|
1207
1198
|
#
|
1208
1199
|
# @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
|
1209
|
-
# ...
|
1210
1200
|
#
|
1211
1201
|
# @param end_date [Time, nil] The end date of the price interval. This is the date that Orb stops billing for
|
1212
|
-
# ...
|
1213
1202
|
#
|
1214
1203
|
# @param filter [String, nil] An additional filter to apply to usage queries.
|
1215
1204
|
#
|
1216
1205
|
# @param fixed_fee_quantity_transitions [Array<Orb::Models::SubscriptionChangeCancelResponse::Subscription::PriceInterval::FixedFeeQuantityTransition>, nil] The fixed fee quantity transitions for this price interval. This is only relevan
|
1217
|
-
# ...
|
1218
1206
|
#
|
1219
|
-
# @param price [Orb::
|
1220
|
-
# ...
|
1207
|
+
# @param price [Orb::Price::Unit, Orb::Price::Package, Orb::Price::Matrix, Orb::Price::Tiered, Orb::Price::TieredBps, Orb::Price::Bps, Orb::Price::BulkBps, Orb::Price::Bulk, Orb::Price::ThresholdTotalAmount, Orb::Price::TieredPackage, Orb::Price::GroupedTiered, Orb::Price::TieredWithMinimum, Orb::Price::TieredPackageWithMinimum, Orb::Price::PackageWithAllocation, Orb::Price::UnitWithPercent, Orb::Price::MatrixWithAllocation, Orb::Price::TieredWithProration, Orb::Price::UnitWithProration, Orb::Price::GroupedAllocation, Orb::Price::GroupedWithProratedMinimum, Orb::Price::GroupedWithMeteredMinimum, Orb::Price::MatrixWithDisplayName, Orb::Price::BulkWithProration, Orb::Price::GroupedTieredPackage, Orb::Price::MaxGroupTieredPackage, Orb::Price::ScalableMatrixWithUnitPricing, Orb::Price::ScalableMatrixWithTieredPricing, Orb::Price::CumulativeGroupedBulk] The Price resource represents a price that can be billed on a subscription, resu
|
1221
1208
|
#
|
1222
1209
|
# @param start_date [Time] The start date of the price interval. This is the date that Orb starts billing f
|
1223
|
-
# ...
|
1224
1210
|
#
|
1225
1211
|
# @param usage_customer_ids [Array<String>, nil] A list of customer IDs whose usage events will be aggregated and billed under th
|
1226
|
-
# ...
|
1227
1212
|
|
1228
1213
|
class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
|
1229
1214
|
# @!attribute effective_date
|
@@ -1299,39 +1284,39 @@ module Orb
|
|
1299
1284
|
# @!attribute created_credit_notes
|
1300
1285
|
# The credit notes that were created as part of this operation.
|
1301
1286
|
#
|
1302
|
-
# @return [Array<Orb::
|
1303
|
-
required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1287
|
+
# @return [Array<Orb::CreditNote>]
|
1288
|
+
required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote] }
|
1304
1289
|
|
1305
1290
|
# @!attribute created_invoices
|
1306
1291
|
# The invoices that were created as part of this operation.
|
1307
1292
|
#
|
1308
|
-
# @return [Array<Orb::
|
1309
|
-
required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1293
|
+
# @return [Array<Orb::Invoice>]
|
1294
|
+
required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }
|
1310
1295
|
|
1311
1296
|
# @!attribute voided_credit_notes
|
1312
1297
|
# The credit notes that were voided as part of this operation.
|
1313
1298
|
#
|
1314
|
-
# @return [Array<Orb::
|
1315
|
-
required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1299
|
+
# @return [Array<Orb::CreditNote>]
|
1300
|
+
required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote] }
|
1316
1301
|
|
1317
1302
|
# @!attribute voided_invoices
|
1318
1303
|
# The invoices that were voided as part of this operation.
|
1319
1304
|
#
|
1320
|
-
# @return [Array<Orb::
|
1321
|
-
required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1305
|
+
# @return [Array<Orb::Invoice>]
|
1306
|
+
required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }
|
1322
1307
|
|
1323
1308
|
# @!method initialize(created_credit_notes:, created_invoices:, voided_credit_notes:, voided_invoices:)
|
1324
1309
|
# The resources that were changed as part of this operation. Only present when
|
1325
1310
|
# fetched through the subscription changes API or if the
|
1326
1311
|
# `include_changed_resources` parameter was passed in the request.
|
1327
1312
|
#
|
1328
|
-
# @param created_credit_notes [Array<Orb::
|
1313
|
+
# @param created_credit_notes [Array<Orb::CreditNote>] The credit notes that were created as part of this operation.
|
1329
1314
|
#
|
1330
|
-
# @param created_invoices [Array<Orb::
|
1315
|
+
# @param created_invoices [Array<Orb::Invoice>] The invoices that were created as part of this operation.
|
1331
1316
|
#
|
1332
|
-
# @param voided_credit_notes [Array<Orb::
|
1317
|
+
# @param voided_credit_notes [Array<Orb::CreditNote>] The credit notes that were voided as part of this operation.
|
1333
1318
|
#
|
1334
|
-
# @param voided_invoices [Array<Orb::
|
1319
|
+
# @param voided_invoices [Array<Orb::Invoice>] The invoices that were voided as part of this operation.
|
1335
1320
|
end
|
1336
1321
|
end
|
1337
1322
|
end
|
@@ -49,7 +49,6 @@ module Orb
|
|
49
49
|
# @param id [String]
|
50
50
|
#
|
51
51
|
# @param expiration_time [Time] Subscription change will be cancelled at this time and can no longer be applied.
|
52
|
-
# ...
|
53
52
|
#
|
54
53
|
# @param status [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Status]
|
55
54
|
#
|
@@ -157,8 +156,8 @@ module Orb
|
|
157
156
|
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
158
157
|
# information on what this timezone parameter influences within Orb.
|
159
158
|
#
|
160
|
-
# @return [Orb::
|
161
|
-
required :customer, -> { Orb::
|
159
|
+
# @return [Orb::Customer]
|
160
|
+
required :customer, -> { Orb::Customer }
|
162
161
|
|
163
162
|
# @!attribute default_invoice_memo
|
164
163
|
# Determines the default memo on this subscriptions' invoices. Note that if this
|
@@ -237,8 +236,8 @@ module Orb
|
|
237
236
|
# subscription. You can see more about how to configure prices in the
|
238
237
|
# [Price resource](/reference/price).
|
239
238
|
#
|
240
|
-
# @return [Orb::
|
241
|
-
required :plan, -> { Orb::
|
239
|
+
# @return [Orb::Plan]
|
240
|
+
required :plan, -> { Orb::Plan }
|
242
241
|
|
243
242
|
# @!attribute price_intervals
|
244
243
|
# The price intervals for this subscription.
|
@@ -288,32 +287,24 @@ module Orb
|
|
288
287
|
# @param id [String]
|
289
288
|
#
|
290
289
|
# @param active_plan_phase_order [Integer, nil] The current plan phase that is active, only if the subscription's plan has phase
|
291
|
-
# ...
|
292
290
|
#
|
293
291
|
# @param adjustment_intervals [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval>] The adjustment intervals for this subscription sorted by the start_date of the a
|
294
|
-
# ...
|
295
292
|
#
|
296
293
|
# @param auto_collection [Boolean, nil] Determines whether issued invoices for this subscription will automatically be c
|
297
|
-
# ...
|
298
294
|
#
|
299
295
|
# @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::BillingCycleAnchorConfiguration]
|
300
296
|
#
|
301
297
|
# @param billing_cycle_day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
|
302
|
-
# ...
|
303
298
|
#
|
304
299
|
# @param created_at [Time]
|
305
300
|
#
|
306
301
|
# @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
|
307
|
-
# ...
|
308
302
|
#
|
309
303
|
# @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
|
310
|
-
# ...
|
311
304
|
#
|
312
|
-
# @param customer [Orb::
|
313
|
-
# ...
|
305
|
+
# @param customer [Orb::Customer] A customer is a buyer of your products, and the other party to the billing relat
|
314
306
|
#
|
315
307
|
# @param default_invoice_memo [String, nil] Determines the default memo on this subscriptions' invoices. Note that if this i
|
316
|
-
# ...
|
317
308
|
#
|
318
309
|
# @param discount_intervals [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage>] The discount intervals for this subscription sorted by the start_date.
|
319
310
|
#
|
@@ -326,17 +317,14 @@ module Orb
|
|
326
317
|
# @param maximum_intervals [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MaximumInterval>] The maximum intervals for this subscription sorted by the start_date.
|
327
318
|
#
|
328
319
|
# @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
|
329
|
-
# ...
|
330
320
|
#
|
331
321
|
# @param minimum_intervals [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
|
332
322
|
#
|
333
323
|
# @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
|
334
|
-
# ...
|
335
324
|
#
|
336
325
|
# @param pending_subscription_change [Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PendingSubscriptionChange, nil] A pending subscription change if one exists on this subscription.
|
337
326
|
#
|
338
|
-
# @param plan [Orb::
|
339
|
-
# ...
|
327
|
+
# @param plan [Orb::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
340
328
|
#
|
341
329
|
# @param price_intervals [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PriceInterval>] The price intervals for this subscription.
|
342
330
|
#
|
@@ -349,7 +337,6 @@ module Orb
|
|
349
337
|
# @param trial_info [Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::TrialInfo]
|
350
338
|
#
|
351
339
|
# @param changed_resources [Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::ChangedResources, nil] The resources that were changed as part of this operation. Only present when fet
|
352
|
-
# ...
|
353
340
|
|
354
341
|
class AdjustmentInterval < Orb::Internal::Type::BaseModel
|
355
342
|
# @!attribute id
|
@@ -466,14 +453,12 @@ module Orb
|
|
466
453
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
467
454
|
#
|
468
455
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
469
|
-
# ...
|
470
456
|
#
|
471
457
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
472
458
|
#
|
473
459
|
# @param reason [String, nil] The reason for the adjustment.
|
474
460
|
#
|
475
461
|
# @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
|
476
|
-
# ...
|
477
462
|
#
|
478
463
|
# @param adjustment_type [Symbol, :usage_discount]
|
479
464
|
end
|
@@ -529,12 +514,10 @@ module Orb
|
|
529
514
|
# @param id [String]
|
530
515
|
#
|
531
516
|
# @param amount_discount [String] The amount by which to discount the prices this adjustment applies to in a given
|
532
|
-
# ...
|
533
517
|
#
|
534
518
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
535
519
|
#
|
536
520
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
537
|
-
# ...
|
538
521
|
#
|
539
522
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
540
523
|
#
|
@@ -596,10 +579,8 @@ module Orb
|
|
596
579
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
597
580
|
#
|
598
581
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
599
|
-
# ...
|
600
582
|
#
|
601
583
|
# @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
|
602
|
-
# ...
|
603
584
|
#
|
604
585
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
605
586
|
#
|
@@ -667,12 +648,10 @@ module Orb
|
|
667
648
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
668
649
|
#
|
669
650
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
670
|
-
# ...
|
671
651
|
#
|
672
652
|
# @param item_id [String] The item ID that revenue from this minimum will be attributed to.
|
673
653
|
#
|
674
654
|
# @param minimum_amount [String] The minimum amount to charge in a given billing period for the prices this adjus
|
675
|
-
# ...
|
676
655
|
#
|
677
656
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
678
657
|
#
|
@@ -734,10 +713,8 @@ module Orb
|
|
734
713
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
735
714
|
#
|
736
715
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
737
|
-
# ...
|
738
716
|
#
|
739
717
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
|
740
|
-
# ...
|
741
718
|
#
|
742
719
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
743
720
|
#
|
@@ -748,6 +725,18 @@ module Orb
|
|
748
725
|
|
749
726
|
# @!method self.variants
|
750
727
|
# @return [Array(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum)]
|
728
|
+
|
729
|
+
define_sorbet_constant!(:Variants) do
|
730
|
+
T.type_alias do
|
731
|
+
T.any(
|
732
|
+
Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount,
|
733
|
+
Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount,
|
734
|
+
Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount,
|
735
|
+
Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Minimum,
|
736
|
+
Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::AdjustmentInterval::Adjustment::Maximum
|
737
|
+
)
|
738
|
+
end
|
739
|
+
end
|
751
740
|
end
|
752
741
|
end
|
753
742
|
|
@@ -783,13 +772,10 @@ module Orb
|
|
783
772
|
# for more details.
|
784
773
|
#
|
785
774
|
# @param day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
|
786
|
-
# ...
|
787
775
|
#
|
788
776
|
# @param month [Integer, nil] The month on which the billing cycle is anchored (e.g. a quarterly price anchore
|
789
|
-
# ...
|
790
777
|
#
|
791
778
|
# @param year [Integer, nil] The year on which the billing cycle is anchored (e.g. a 2 year billing cycle anc
|
792
|
-
# ...
|
793
779
|
end
|
794
780
|
|
795
781
|
module DiscountInterval
|
@@ -905,7 +891,6 @@ module Orb
|
|
905
891
|
# @param end_date [Time, nil] The end date of the discount interval.
|
906
892
|
#
|
907
893
|
# @param percentage_discount [Float] Only available if discount_type is `percentage`.This is a number between 0 and 1
|
908
|
-
# ...
|
909
894
|
#
|
910
895
|
# @param start_date [Time] The start date of the discount interval.
|
911
896
|
#
|
@@ -963,13 +948,22 @@ module Orb
|
|
963
948
|
# @param start_date [Time] The start date of the discount interval.
|
964
949
|
#
|
965
950
|
# @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
|
966
|
-
# ...
|
967
951
|
#
|
968
952
|
# @param discount_type [Symbol, :usage]
|
969
953
|
end
|
970
954
|
|
971
955
|
# @!method self.variants
|
972
956
|
# @return [Array(Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage, Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage)]
|
957
|
+
|
958
|
+
define_sorbet_constant!(:Variants) do
|
959
|
+
T.type_alias do
|
960
|
+
T.any(
|
961
|
+
Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Amount,
|
962
|
+
Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Percentage,
|
963
|
+
Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::DiscountInterval::Usage
|
964
|
+
)
|
965
|
+
end
|
966
|
+
end
|
973
967
|
end
|
974
968
|
|
975
969
|
class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
|
@@ -1044,7 +1038,6 @@ module Orb
|
|
1044
1038
|
# @param end_date [Time, nil] The end date of the maximum interval.
|
1045
1039
|
#
|
1046
1040
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the price intervals t
|
1047
|
-
# ...
|
1048
1041
|
#
|
1049
1042
|
# @param start_date [Time] The start date of the maximum interval.
|
1050
1043
|
end
|
@@ -1093,7 +1086,6 @@ module Orb
|
|
1093
1086
|
# @param end_date [Time, nil] The end date of the minimum interval.
|
1094
1087
|
#
|
1095
1088
|
# @param minimum_amount [String] The minimum amount to charge in a given billing period for the price intervals t
|
1096
|
-
# ...
|
1097
1089
|
#
|
1098
1090
|
# @param start_date [Time] The start date of the minimum interval.
|
1099
1091
|
end
|
@@ -1173,8 +1165,8 @@ module Orb
|
|
1173
1165
|
# For more on the types of prices, see
|
1174
1166
|
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1175
1167
|
#
|
1176
|
-
# @return [Orb::
|
1177
|
-
required :price, union: -> { Orb::
|
1168
|
+
# @return [Orb::Price::Unit, Orb::Price::Package, Orb::Price::Matrix, Orb::Price::Tiered, Orb::Price::TieredBps, Orb::Price::Bps, Orb::Price::BulkBps, Orb::Price::Bulk, Orb::Price::ThresholdTotalAmount, Orb::Price::TieredPackage, Orb::Price::GroupedTiered, Orb::Price::TieredWithMinimum, Orb::Price::TieredPackageWithMinimum, Orb::Price::PackageWithAllocation, Orb::Price::UnitWithPercent, Orb::Price::MatrixWithAllocation, Orb::Price::TieredWithProration, Orb::Price::UnitWithProration, Orb::Price::GroupedAllocation, Orb::Price::GroupedWithProratedMinimum, Orb::Price::GroupedWithMeteredMinimum, Orb::Price::MatrixWithDisplayName, Orb::Price::BulkWithProration, Orb::Price::GroupedTieredPackage, Orb::Price::MaxGroupTieredPackage, Orb::Price::ScalableMatrixWithUnitPricing, Orb::Price::ScalableMatrixWithTieredPricing, Orb::Price::CumulativeGroupedBulk]
|
1169
|
+
required :price, union: -> { Orb::Price }
|
1178
1170
|
|
1179
1171
|
# @!attribute start_date
|
1180
1172
|
# The start date of the price interval. This is the date that Orb starts billing
|
@@ -1204,27 +1196,20 @@ module Orb
|
|
1204
1196
|
# @param billing_cycle_day [Integer] The day of the month that Orb bills for this price
|
1205
1197
|
#
|
1206
1198
|
# @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
|
1207
|
-
# ...
|
1208
1199
|
#
|
1209
1200
|
# @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
|
1210
|
-
# ...
|
1211
1201
|
#
|
1212
1202
|
# @param end_date [Time, nil] The end date of the price interval. This is the date that Orb stops billing for
|
1213
|
-
# ...
|
1214
1203
|
#
|
1215
1204
|
# @param filter [String, nil] An additional filter to apply to usage queries.
|
1216
1205
|
#
|
1217
1206
|
# @param fixed_fee_quantity_transitions [Array<Orb::Models::SubscriptionChangeRetrieveResponse::Subscription::PriceInterval::FixedFeeQuantityTransition>, nil] The fixed fee quantity transitions for this price interval. This is only relevan
|
1218
|
-
# ...
|
1219
1207
|
#
|
1220
|
-
# @param price [Orb::
|
1221
|
-
# ...
|
1208
|
+
# @param price [Orb::Price::Unit, Orb::Price::Package, Orb::Price::Matrix, Orb::Price::Tiered, Orb::Price::TieredBps, Orb::Price::Bps, Orb::Price::BulkBps, Orb::Price::Bulk, Orb::Price::ThresholdTotalAmount, Orb::Price::TieredPackage, Orb::Price::GroupedTiered, Orb::Price::TieredWithMinimum, Orb::Price::TieredPackageWithMinimum, Orb::Price::PackageWithAllocation, Orb::Price::UnitWithPercent, Orb::Price::MatrixWithAllocation, Orb::Price::TieredWithProration, Orb::Price::UnitWithProration, Orb::Price::GroupedAllocation, Orb::Price::GroupedWithProratedMinimum, Orb::Price::GroupedWithMeteredMinimum, Orb::Price::MatrixWithDisplayName, Orb::Price::BulkWithProration, Orb::Price::GroupedTieredPackage, Orb::Price::MaxGroupTieredPackage, Orb::Price::ScalableMatrixWithUnitPricing, Orb::Price::ScalableMatrixWithTieredPricing, Orb::Price::CumulativeGroupedBulk] The Price resource represents a price that can be billed on a subscription, resu
|
1222
1209
|
#
|
1223
1210
|
# @param start_date [Time] The start date of the price interval. This is the date that Orb starts billing f
|
1224
|
-
# ...
|
1225
1211
|
#
|
1226
1212
|
# @param usage_customer_ids [Array<String>, nil] A list of customer IDs whose usage events will be aggregated and billed under th
|
1227
|
-
# ...
|
1228
1213
|
|
1229
1214
|
class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
|
1230
1215
|
# @!attribute effective_date
|
@@ -1300,39 +1285,39 @@ module Orb
|
|
1300
1285
|
# @!attribute created_credit_notes
|
1301
1286
|
# The credit notes that were created as part of this operation.
|
1302
1287
|
#
|
1303
|
-
# @return [Array<Orb::
|
1304
|
-
required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1288
|
+
# @return [Array<Orb::CreditNote>]
|
1289
|
+
required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote] }
|
1305
1290
|
|
1306
1291
|
# @!attribute created_invoices
|
1307
1292
|
# The invoices that were created as part of this operation.
|
1308
1293
|
#
|
1309
|
-
# @return [Array<Orb::
|
1310
|
-
required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1294
|
+
# @return [Array<Orb::Invoice>]
|
1295
|
+
required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }
|
1311
1296
|
|
1312
1297
|
# @!attribute voided_credit_notes
|
1313
1298
|
# The credit notes that were voided as part of this operation.
|
1314
1299
|
#
|
1315
|
-
# @return [Array<Orb::
|
1316
|
-
required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1300
|
+
# @return [Array<Orb::CreditNote>]
|
1301
|
+
required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote] }
|
1317
1302
|
|
1318
1303
|
# @!attribute voided_invoices
|
1319
1304
|
# The invoices that were voided as part of this operation.
|
1320
1305
|
#
|
1321
|
-
# @return [Array<Orb::
|
1322
|
-
required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1306
|
+
# @return [Array<Orb::Invoice>]
|
1307
|
+
required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }
|
1323
1308
|
|
1324
1309
|
# @!method initialize(created_credit_notes:, created_invoices:, voided_credit_notes:, voided_invoices:)
|
1325
1310
|
# The resources that were changed as part of this operation. Only present when
|
1326
1311
|
# fetched through the subscription changes API or if the
|
1327
1312
|
# `include_changed_resources` parameter was passed in the request.
|
1328
1313
|
#
|
1329
|
-
# @param created_credit_notes [Array<Orb::
|
1314
|
+
# @param created_credit_notes [Array<Orb::CreditNote>] The credit notes that were created as part of this operation.
|
1330
1315
|
#
|
1331
|
-
# @param created_invoices [Array<Orb::
|
1316
|
+
# @param created_invoices [Array<Orb::Invoice>] The invoices that were created as part of this operation.
|
1332
1317
|
#
|
1333
|
-
# @param voided_credit_notes [Array<Orb::
|
1318
|
+
# @param voided_credit_notes [Array<Orb::CreditNote>] The credit notes that were voided as part of this operation.
|
1334
1319
|
#
|
1335
|
-
# @param voided_invoices [Array<Orb::
|
1320
|
+
# @param voided_invoices [Array<Orb::Invoice>] The invoices that were voided as part of this operation.
|
1336
1321
|
end
|
1337
1322
|
end
|
1338
1323
|
end
|