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
@@ -88,8 +88,8 @@ module Orb
|
|
88
88
|
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
89
89
|
# information on what this timezone parameter influences within Orb.
|
90
90
|
#
|
91
|
-
# @return [Orb::
|
92
|
-
required :customer, -> { Orb::
|
91
|
+
# @return [Orb::Customer]
|
92
|
+
required :customer, -> { Orb::Customer }
|
93
93
|
|
94
94
|
# @!attribute default_invoice_memo
|
95
95
|
# Determines the default memo on this subscriptions' invoices. Note that if this
|
@@ -168,8 +168,8 @@ module Orb
|
|
168
168
|
# subscription. You can see more about how to configure prices in the
|
169
169
|
# [Price resource](/reference/price).
|
170
170
|
#
|
171
|
-
# @return [Orb::
|
172
|
-
required :plan, -> { Orb::
|
171
|
+
# @return [Orb::Plan]
|
172
|
+
required :plan, -> { Orb::Plan }
|
173
173
|
|
174
174
|
# @!attribute price_intervals
|
175
175
|
# The price intervals for this subscription.
|
@@ -216,32 +216,24 @@ module Orb
|
|
216
216
|
# @param id [String]
|
217
217
|
#
|
218
218
|
# @param active_plan_phase_order [Integer, nil] The current plan phase that is active, only if the subscription's plan has phase
|
219
|
-
# ...
|
220
219
|
#
|
221
220
|
# @param adjustment_intervals [Array<Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval>] The adjustment intervals for this subscription sorted by the start_date of the a
|
222
|
-
# ...
|
223
221
|
#
|
224
222
|
# @param auto_collection [Boolean, nil] Determines whether issued invoices for this subscription will automatically be c
|
225
|
-
# ...
|
226
223
|
#
|
227
224
|
# @param billing_cycle_anchor_configuration [Orb::Models::SubscriptionUpdateTrialResponse::BillingCycleAnchorConfiguration]
|
228
225
|
#
|
229
226
|
# @param billing_cycle_day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
|
230
|
-
# ...
|
231
227
|
#
|
232
228
|
# @param created_at [Time]
|
233
229
|
#
|
234
230
|
# @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
|
235
|
-
# ...
|
236
231
|
#
|
237
232
|
# @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
|
238
|
-
# ...
|
239
233
|
#
|
240
|
-
# @param customer [Orb::
|
241
|
-
# ...
|
234
|
+
# @param customer [Orb::Customer] A customer is a buyer of your products, and the other party to the billing relat
|
242
235
|
#
|
243
236
|
# @param default_invoice_memo [String, nil] Determines the default memo on this subscriptions' invoices. Note that if this i
|
244
|
-
# ...
|
245
237
|
#
|
246
238
|
# @param discount_intervals [Array<Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage>] The discount intervals for this subscription sorted by the start_date.
|
247
239
|
#
|
@@ -254,17 +246,14 @@ module Orb
|
|
254
246
|
# @param maximum_intervals [Array<Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval>] The maximum intervals for this subscription sorted by the start_date.
|
255
247
|
#
|
256
248
|
# @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
|
257
|
-
# ...
|
258
249
|
#
|
259
250
|
# @param minimum_intervals [Array<Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
|
260
251
|
#
|
261
252
|
# @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
|
262
|
-
# ...
|
263
253
|
#
|
264
254
|
# @param pending_subscription_change [Orb::Models::SubscriptionUpdateTrialResponse::PendingSubscriptionChange, nil] A pending subscription change if one exists on this subscription.
|
265
255
|
#
|
266
|
-
# @param plan [Orb::
|
267
|
-
# ...
|
256
|
+
# @param plan [Orb::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
268
257
|
#
|
269
258
|
# @param price_intervals [Array<Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval>] The price intervals for this subscription.
|
270
259
|
#
|
@@ -277,7 +266,6 @@ module Orb
|
|
277
266
|
# @param trial_info [Orb::Models::SubscriptionUpdateTrialResponse::TrialInfo]
|
278
267
|
#
|
279
268
|
# @param changed_resources [Orb::Models::SubscriptionUpdateTrialResponse::ChangedResources, nil] The resources that were changed as part of this operation. Only present when fet
|
280
|
-
# ...
|
281
269
|
|
282
270
|
class AdjustmentInterval < Orb::Internal::Type::BaseModel
|
283
271
|
# @!attribute id
|
@@ -394,14 +382,12 @@ module Orb
|
|
394
382
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
395
383
|
#
|
396
384
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
397
|
-
# ...
|
398
385
|
#
|
399
386
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
400
387
|
#
|
401
388
|
# @param reason [String, nil] The reason for the adjustment.
|
402
389
|
#
|
403
390
|
# @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
|
404
|
-
# ...
|
405
391
|
#
|
406
392
|
# @param adjustment_type [Symbol, :usage_discount]
|
407
393
|
end
|
@@ -457,12 +443,10 @@ module Orb
|
|
457
443
|
# @param id [String]
|
458
444
|
#
|
459
445
|
# @param amount_discount [String] The amount by which to discount the prices this adjustment applies to in a given
|
460
|
-
# ...
|
461
446
|
#
|
462
447
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
463
448
|
#
|
464
449
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
465
|
-
# ...
|
466
450
|
#
|
467
451
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
468
452
|
#
|
@@ -524,10 +508,8 @@ module Orb
|
|
524
508
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
525
509
|
#
|
526
510
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
527
|
-
# ...
|
528
511
|
#
|
529
512
|
# @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
|
530
|
-
# ...
|
531
513
|
#
|
532
514
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
533
515
|
#
|
@@ -595,12 +577,10 @@ module Orb
|
|
595
577
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
596
578
|
#
|
597
579
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
598
|
-
# ...
|
599
580
|
#
|
600
581
|
# @param item_id [String] The item ID that revenue from this minimum will be attributed to.
|
601
582
|
#
|
602
583
|
# @param minimum_amount [String] The minimum amount to charge in a given billing period for the prices this adjus
|
603
|
-
# ...
|
604
584
|
#
|
605
585
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
606
586
|
#
|
@@ -662,10 +642,8 @@ module Orb
|
|
662
642
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
663
643
|
#
|
664
644
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
665
|
-
# ...
|
666
645
|
#
|
667
646
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
|
668
|
-
# ...
|
669
647
|
#
|
670
648
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
671
649
|
#
|
@@ -676,6 +654,18 @@ module Orb
|
|
676
654
|
|
677
655
|
# @!method self.variants
|
678
656
|
# @return [Array(Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum)]
|
657
|
+
|
658
|
+
define_sorbet_constant!(:Variants) do
|
659
|
+
T.type_alias do
|
660
|
+
T.any(
|
661
|
+
Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::UsageDiscount,
|
662
|
+
Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::AmountDiscount,
|
663
|
+
Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
|
664
|
+
Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Minimum,
|
665
|
+
Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::Maximum
|
666
|
+
)
|
667
|
+
end
|
668
|
+
end
|
679
669
|
end
|
680
670
|
end
|
681
671
|
|
@@ -711,13 +701,10 @@ module Orb
|
|
711
701
|
# for more details.
|
712
702
|
#
|
713
703
|
# @param day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
|
714
|
-
# ...
|
715
704
|
#
|
716
705
|
# @param month [Integer, nil] The month on which the billing cycle is anchored (e.g. a quarterly price anchore
|
717
|
-
# ...
|
718
706
|
#
|
719
707
|
# @param year [Integer, nil] The year on which the billing cycle is anchored (e.g. a 2 year billing cycle anc
|
720
|
-
# ...
|
721
708
|
end
|
722
709
|
|
723
710
|
module DiscountInterval
|
@@ -830,7 +817,6 @@ module Orb
|
|
830
817
|
# @param end_date [Time, nil] The end date of the discount interval.
|
831
818
|
#
|
832
819
|
# @param percentage_discount [Float] Only available if discount_type is `percentage`.This is a number between 0 and 1
|
833
|
-
# ...
|
834
820
|
#
|
835
821
|
# @param start_date [Time] The start date of the discount interval.
|
836
822
|
#
|
@@ -888,13 +874,22 @@ module Orb
|
|
888
874
|
# @param start_date [Time] The start date of the discount interval.
|
889
875
|
#
|
890
876
|
# @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
|
891
|
-
# ...
|
892
877
|
#
|
893
878
|
# @param discount_type [Symbol, :usage]
|
894
879
|
end
|
895
880
|
|
896
881
|
# @!method self.variants
|
897
882
|
# @return [Array(Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage)]
|
883
|
+
|
884
|
+
define_sorbet_constant!(:Variants) do
|
885
|
+
T.type_alias do
|
886
|
+
T.any(
|
887
|
+
Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Amount,
|
888
|
+
Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Percentage,
|
889
|
+
Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::Usage
|
890
|
+
)
|
891
|
+
end
|
892
|
+
end
|
898
893
|
end
|
899
894
|
|
900
895
|
class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
|
@@ -969,7 +964,6 @@ module Orb
|
|
969
964
|
# @param end_date [Time, nil] The end date of the maximum interval.
|
970
965
|
#
|
971
966
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the price intervals t
|
972
|
-
# ...
|
973
967
|
#
|
974
968
|
# @param start_date [Time] The start date of the maximum interval.
|
975
969
|
end
|
@@ -1018,7 +1012,6 @@ module Orb
|
|
1018
1012
|
# @param end_date [Time, nil] The end date of the minimum interval.
|
1019
1013
|
#
|
1020
1014
|
# @param minimum_amount [String] The minimum amount to charge in a given billing period for the price intervals t
|
1021
|
-
# ...
|
1022
1015
|
#
|
1023
1016
|
# @param start_date [Time] The start date of the minimum interval.
|
1024
1017
|
end
|
@@ -1098,8 +1091,8 @@ module Orb
|
|
1098
1091
|
# For more on the types of prices, see
|
1099
1092
|
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1100
1093
|
#
|
1101
|
-
# @return [Orb::
|
1102
|
-
required :price, union: -> { Orb::
|
1094
|
+
# @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]
|
1095
|
+
required :price, union: -> { Orb::Price }
|
1103
1096
|
|
1104
1097
|
# @!attribute start_date
|
1105
1098
|
# The start date of the price interval. This is the date that Orb starts billing
|
@@ -1128,27 +1121,20 @@ module Orb
|
|
1128
1121
|
# @param billing_cycle_day [Integer] The day of the month that Orb bills for this price
|
1129
1122
|
#
|
1130
1123
|
# @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
|
1131
|
-
# ...
|
1132
1124
|
#
|
1133
1125
|
# @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
|
1134
|
-
# ...
|
1135
1126
|
#
|
1136
1127
|
# @param end_date [Time, nil] The end date of the price interval. This is the date that Orb stops billing for
|
1137
|
-
# ...
|
1138
1128
|
#
|
1139
1129
|
# @param filter [String, nil] An additional filter to apply to usage queries.
|
1140
1130
|
#
|
1141
1131
|
# @param fixed_fee_quantity_transitions [Array<Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval::FixedFeeQuantityTransition>, nil] The fixed fee quantity transitions for this price interval. This is only relevan
|
1142
|
-
# ...
|
1143
1132
|
#
|
1144
|
-
# @param price [Orb::
|
1145
|
-
# ...
|
1133
|
+
# @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
|
1146
1134
|
#
|
1147
1135
|
# @param start_date [Time] The start date of the price interval. This is the date that Orb starts billing f
|
1148
|
-
# ...
|
1149
1136
|
#
|
1150
1137
|
# @param usage_customer_ids [Array<String>, nil] A list of customer IDs whose usage events will be aggregated and billed under th
|
1151
|
-
# ...
|
1152
1138
|
|
1153
1139
|
class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
|
1154
1140
|
# @!attribute effective_date
|
@@ -1224,39 +1210,39 @@ module Orb
|
|
1224
1210
|
# @!attribute created_credit_notes
|
1225
1211
|
# The credit notes that were created as part of this operation.
|
1226
1212
|
#
|
1227
|
-
# @return [Array<Orb::
|
1228
|
-
required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1213
|
+
# @return [Array<Orb::CreditNote>]
|
1214
|
+
required :created_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote] }
|
1229
1215
|
|
1230
1216
|
# @!attribute created_invoices
|
1231
1217
|
# The invoices that were created as part of this operation.
|
1232
1218
|
#
|
1233
|
-
# @return [Array<Orb::
|
1234
|
-
required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1219
|
+
# @return [Array<Orb::Invoice>]
|
1220
|
+
required :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }
|
1235
1221
|
|
1236
1222
|
# @!attribute voided_credit_notes
|
1237
1223
|
# The credit notes that were voided as part of this operation.
|
1238
1224
|
#
|
1239
|
-
# @return [Array<Orb::
|
1240
|
-
required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1225
|
+
# @return [Array<Orb::CreditNote>]
|
1226
|
+
required :voided_credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote] }
|
1241
1227
|
|
1242
1228
|
# @!attribute voided_invoices
|
1243
1229
|
# The invoices that were voided as part of this operation.
|
1244
1230
|
#
|
1245
|
-
# @return [Array<Orb::
|
1246
|
-
required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::
|
1231
|
+
# @return [Array<Orb::Invoice>]
|
1232
|
+
required :voided_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }
|
1247
1233
|
|
1248
1234
|
# @!method initialize(created_credit_notes:, created_invoices:, voided_credit_notes:, voided_invoices:)
|
1249
1235
|
# The resources that were changed as part of this operation. Only present when
|
1250
1236
|
# fetched through the subscription changes API or if the
|
1251
1237
|
# `include_changed_resources` parameter was passed in the request.
|
1252
1238
|
#
|
1253
|
-
# @param created_credit_notes [Array<Orb::
|
1239
|
+
# @param created_credit_notes [Array<Orb::CreditNote>] The credit notes that were created as part of this operation.
|
1254
1240
|
#
|
1255
|
-
# @param created_invoices [Array<Orb::
|
1241
|
+
# @param created_invoices [Array<Orb::Invoice>] The invoices that were created as part of this operation.
|
1256
1242
|
#
|
1257
|
-
# @param voided_credit_notes [Array<Orb::
|
1243
|
+
# @param voided_credit_notes [Array<Orb::CreditNote>] The credit notes that were voided as part of this operation.
|
1258
1244
|
#
|
1259
|
-
# @param voided_invoices [Array<Orb::
|
1245
|
+
# @param voided_invoices [Array<Orb::Invoice>] The invoices that were voided as part of this operation.
|
1260
1246
|
end
|
1261
1247
|
end
|
1262
1248
|
end
|
@@ -6,45 +6,48 @@ module Orb
|
|
6
6
|
module SubscriptionUsage
|
7
7
|
extend Orb::Internal::Type::Union
|
8
8
|
|
9
|
-
variant -> { Orb::
|
9
|
+
variant -> { Orb::SubscriptionUsage::UngroupedSubscriptionUsage }
|
10
10
|
|
11
|
-
variant -> { Orb::
|
11
|
+
variant -> { Orb::SubscriptionUsage::GroupedSubscriptionUsage }
|
12
12
|
|
13
13
|
class UngroupedSubscriptionUsage < Orb::Internal::Type::BaseModel
|
14
14
|
# @!attribute data
|
15
15
|
#
|
16
|
-
# @return [Array<Orb::
|
16
|
+
# @return [Array<Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data>]
|
17
17
|
required :data,
|
18
|
-
-> { Orb::Internal::Type::ArrayOf[Orb::
|
18
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data] }
|
19
19
|
|
20
20
|
# @!method initialize(data:)
|
21
|
-
# @param data [Array<Orb::
|
21
|
+
# @param data [Array<Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data>]
|
22
22
|
|
23
23
|
class Data < Orb::Internal::Type::BaseModel
|
24
24
|
# @!attribute billable_metric
|
25
25
|
#
|
26
|
-
# @return [Orb::
|
26
|
+
# @return [Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric]
|
27
27
|
required :billable_metric,
|
28
|
-
-> {
|
28
|
+
-> {
|
29
|
+
Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric
|
30
|
+
}
|
29
31
|
|
30
32
|
# @!attribute usage
|
31
33
|
#
|
32
|
-
# @return [Array<Orb::
|
34
|
+
# @return [Array<Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage>]
|
33
35
|
required :usage,
|
34
|
-
-> {
|
36
|
+
-> {
|
37
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage]
|
38
|
+
}
|
35
39
|
|
36
40
|
# @!attribute view_mode
|
37
41
|
#
|
38
|
-
# @return [Symbol, Orb::
|
39
|
-
required :view_mode,
|
40
|
-
enum: -> { Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage::Data::ViewMode }
|
42
|
+
# @return [Symbol, Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data::ViewMode]
|
43
|
+
required :view_mode, enum: -> { Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data::ViewMode }
|
41
44
|
|
42
45
|
# @!method initialize(billable_metric:, usage:, view_mode:)
|
43
|
-
# @param billable_metric [Orb::
|
44
|
-
# @param usage [Array<Orb::
|
45
|
-
# @param view_mode [Symbol, Orb::
|
46
|
+
# @param billable_metric [Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data::BillableMetric]
|
47
|
+
# @param usage [Array<Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data::Usage>]
|
48
|
+
# @param view_mode [Symbol, Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data::ViewMode]
|
46
49
|
|
47
|
-
# @see Orb::
|
50
|
+
# @see Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data#billable_metric
|
48
51
|
class BillableMetric < Orb::Internal::Type::BaseModel
|
49
52
|
# @!attribute id
|
50
53
|
#
|
@@ -83,7 +86,7 @@ module Orb
|
|
83
86
|
# @param timeframe_start [Time]
|
84
87
|
end
|
85
88
|
|
86
|
-
# @see Orb::
|
89
|
+
# @see Orb::SubscriptionUsage::UngroupedSubscriptionUsage::Data#view_mode
|
87
90
|
module ViewMode
|
88
91
|
extend Orb::Internal::Type::Enum
|
89
92
|
|
@@ -99,49 +102,53 @@ module Orb
|
|
99
102
|
class GroupedSubscriptionUsage < Orb::Internal::Type::BaseModel
|
100
103
|
# @!attribute data
|
101
104
|
#
|
102
|
-
# @return [Array<Orb::
|
105
|
+
# @return [Array<Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data>]
|
103
106
|
required :data,
|
104
|
-
-> { Orb::Internal::Type::ArrayOf[Orb::
|
107
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data] }
|
105
108
|
|
106
109
|
# @!attribute pagination_metadata
|
107
110
|
#
|
108
|
-
# @return [Orb::
|
109
|
-
optional :pagination_metadata, -> { Orb::
|
111
|
+
# @return [Orb::PaginationMetadata, nil]
|
112
|
+
optional :pagination_metadata, -> { Orb::PaginationMetadata }, nil?: true
|
110
113
|
|
111
114
|
# @!method initialize(data:, pagination_metadata: nil)
|
112
|
-
# @param data [Array<Orb::
|
113
|
-
# @param pagination_metadata [Orb::
|
115
|
+
# @param data [Array<Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data>]
|
116
|
+
# @param pagination_metadata [Orb::PaginationMetadata, nil]
|
114
117
|
|
115
118
|
class Data < Orb::Internal::Type::BaseModel
|
116
119
|
# @!attribute billable_metric
|
117
120
|
#
|
118
|
-
# @return [Orb::
|
121
|
+
# @return [Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric]
|
119
122
|
required :billable_metric,
|
120
|
-
-> {
|
123
|
+
-> {
|
124
|
+
Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric
|
125
|
+
}
|
121
126
|
|
122
127
|
# @!attribute metric_group
|
123
128
|
#
|
124
|
-
# @return [Orb::
|
125
|
-
required :metric_group, -> { Orb::
|
129
|
+
# @return [Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::MetricGroup]
|
130
|
+
required :metric_group, -> { Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::MetricGroup }
|
126
131
|
|
127
132
|
# @!attribute usage
|
128
133
|
#
|
129
|
-
# @return [Array<Orb::
|
134
|
+
# @return [Array<Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage>]
|
130
135
|
required :usage,
|
131
|
-
-> {
|
136
|
+
-> {
|
137
|
+
Orb::Internal::Type::ArrayOf[Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage]
|
138
|
+
}
|
132
139
|
|
133
140
|
# @!attribute view_mode
|
134
141
|
#
|
135
|
-
# @return [Symbol, Orb::
|
136
|
-
required :view_mode, enum: -> { Orb::
|
142
|
+
# @return [Symbol, Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::ViewMode]
|
143
|
+
required :view_mode, enum: -> { Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::ViewMode }
|
137
144
|
|
138
145
|
# @!method initialize(billable_metric:, metric_group:, usage:, view_mode:)
|
139
|
-
# @param billable_metric [Orb::
|
140
|
-
# @param metric_group [Orb::
|
141
|
-
# @param usage [Array<Orb::
|
142
|
-
# @param view_mode [Symbol, Orb::
|
146
|
+
# @param billable_metric [Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::BillableMetric]
|
147
|
+
# @param metric_group [Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::MetricGroup]
|
148
|
+
# @param usage [Array<Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::Usage>]
|
149
|
+
# @param view_mode [Symbol, Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data::ViewMode]
|
143
150
|
|
144
|
-
# @see Orb::
|
151
|
+
# @see Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data#billable_metric
|
145
152
|
class BillableMetric < Orb::Internal::Type::BaseModel
|
146
153
|
# @!attribute id
|
147
154
|
#
|
@@ -158,7 +165,7 @@ module Orb
|
|
158
165
|
# @param name [String]
|
159
166
|
end
|
160
167
|
|
161
|
-
# @see Orb::
|
168
|
+
# @see Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data#metric_group
|
162
169
|
class MetricGroup < Orb::Internal::Type::BaseModel
|
163
170
|
# @!attribute property_key
|
164
171
|
#
|
@@ -197,7 +204,7 @@ module Orb
|
|
197
204
|
# @param timeframe_start [Time]
|
198
205
|
end
|
199
206
|
|
200
|
-
# @see Orb::
|
207
|
+
# @see Orb::SubscriptionUsage::GroupedSubscriptionUsage::Data#view_mode
|
201
208
|
module ViewMode
|
202
209
|
extend Orb::Internal::Type::Enum
|
203
210
|
|
@@ -211,7 +218,16 @@ module Orb
|
|
211
218
|
end
|
212
219
|
|
213
220
|
# @!method self.variants
|
214
|
-
# @return [Array(Orb::
|
221
|
+
# @return [Array(Orb::SubscriptionUsage::UngroupedSubscriptionUsage, Orb::SubscriptionUsage::GroupedSubscriptionUsage)]
|
222
|
+
|
223
|
+
define_sorbet_constant!(:Variants) do
|
224
|
+
T.type_alias do
|
225
|
+
T.any(
|
226
|
+
Orb::SubscriptionUsage::UngroupedSubscriptionUsage,
|
227
|
+
Orb::SubscriptionUsage::GroupedSubscriptionUsage
|
228
|
+
)
|
229
|
+
end
|
230
|
+
end
|
215
231
|
end
|
216
232
|
end
|
217
233
|
end
|
@@ -5,17 +5,17 @@ module Orb
|
|
5
5
|
class SubscriptionsAPI < Orb::Internal::Type::BaseModel
|
6
6
|
# @!attribute data
|
7
7
|
#
|
8
|
-
# @return [Array<Orb::
|
9
|
-
required :data, -> { Orb::Internal::Type::ArrayOf[Orb::
|
8
|
+
# @return [Array<Orb::Subscription>]
|
9
|
+
required :data, -> { Orb::Internal::Type::ArrayOf[Orb::Subscription] }
|
10
10
|
|
11
11
|
# @!attribute pagination_metadata
|
12
12
|
#
|
13
|
-
# @return [Orb::
|
14
|
-
required :pagination_metadata, -> { Orb::
|
13
|
+
# @return [Orb::PaginationMetadata]
|
14
|
+
required :pagination_metadata, -> { Orb::PaginationMetadata }
|
15
15
|
|
16
16
|
# @!method initialize(data:, pagination_metadata:)
|
17
|
-
# @param data [Array<Orb::
|
18
|
-
# @param pagination_metadata [Orb::
|
17
|
+
# @param data [Array<Orb::Subscription>]
|
18
|
+
# @param pagination_metadata [Orb::PaginationMetadata]
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -12,8 +12,8 @@ module Orb
|
|
12
12
|
|
13
13
|
# @!attribute discount_type
|
14
14
|
#
|
15
|
-
# @return [Symbol, Orb::
|
16
|
-
required :discount_type, enum: -> { Orb::
|
15
|
+
# @return [Symbol, Orb::TrialDiscount::DiscountType]
|
16
|
+
required :discount_type, enum: -> { Orb::TrialDiscount::DiscountType }
|
17
17
|
|
18
18
|
# @!attribute reason
|
19
19
|
#
|
@@ -33,13 +33,12 @@ module Orb
|
|
33
33
|
optional :trial_percentage_discount, Float, nil?: true
|
34
34
|
|
35
35
|
# @!method initialize(applies_to_price_ids:, discount_type:, reason: nil, trial_amount_discount: nil, trial_percentage_discount: nil)
|
36
|
-
# Some parameter documentations has been truncated, see
|
37
|
-
#
|
36
|
+
# Some parameter documentations has been truncated, see {Orb::TrialDiscount} for
|
37
|
+
# more details.
|
38
38
|
#
|
39
39
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this discount applies to. For plan/plan phase discounts,
|
40
|
-
# ...
|
41
40
|
#
|
42
|
-
# @param discount_type [Symbol, Orb::
|
41
|
+
# @param discount_type [Symbol, Orb::TrialDiscount::DiscountType]
|
43
42
|
#
|
44
43
|
# @param reason [String, nil]
|
45
44
|
#
|
@@ -47,7 +46,7 @@ module Orb
|
|
47
46
|
#
|
48
47
|
# @param trial_percentage_discount [Float, nil] Only available if discount_type is `trial`
|
49
48
|
|
50
|
-
# @see Orb::
|
49
|
+
# @see Orb::TrialDiscount#discount_type
|
51
50
|
module DiscountType
|
52
51
|
extend Orb::Internal::Type::Enum
|
53
52
|
|
@@ -12,8 +12,8 @@ module Orb
|
|
12
12
|
|
13
13
|
# @!attribute discount_type
|
14
14
|
#
|
15
|
-
# @return [Symbol, Orb::
|
16
|
-
required :discount_type, enum: -> { Orb::
|
15
|
+
# @return [Symbol, Orb::UsageDiscount::DiscountType]
|
16
|
+
required :discount_type, enum: -> { Orb::UsageDiscount::DiscountType }
|
17
17
|
|
18
18
|
# @!attribute usage_discount
|
19
19
|
# Only available if discount_type is `usage`. Number of usage units that this
|
@@ -28,20 +28,18 @@ module Orb
|
|
28
28
|
optional :reason, String, nil?: true
|
29
29
|
|
30
30
|
# @!method initialize(applies_to_price_ids:, discount_type:, usage_discount:, reason: nil)
|
31
|
-
# Some parameter documentations has been truncated, see
|
32
|
-
#
|
31
|
+
# Some parameter documentations has been truncated, see {Orb::UsageDiscount} for
|
32
|
+
# more details.
|
33
33
|
#
|
34
34
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this discount applies to. For plan/plan phase discounts,
|
35
|
-
# ...
|
36
35
|
#
|
37
|
-
# @param discount_type [Symbol, Orb::
|
36
|
+
# @param discount_type [Symbol, Orb::UsageDiscount::DiscountType]
|
38
37
|
#
|
39
38
|
# @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
|
40
|
-
# ...
|
41
39
|
#
|
42
40
|
# @param reason [String, nil]
|
43
41
|
|
44
|
-
# @see Orb::
|
42
|
+
# @see Orb::UsageDiscount#discount_type
|
45
43
|
module DiscountType
|
46
44
|
extend Orb::Internal::Type::Enum
|
47
45
|
|
data/lib/orb/models.rb
CHANGED
@@ -1,6 +1,30 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Orb
|
4
|
+
[Orb::Internal::Type::BaseModel, *Orb::Internal::Type::BaseModel.subclasses].each do |cls|
|
5
|
+
cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, Orb::Internal::AnyHash) } }
|
6
|
+
end
|
7
|
+
|
8
|
+
[*Orb::Internal::Type::Enum.included_modules, *Orb::Internal::Type::Union.included_modules].each do |cls|
|
9
|
+
cls.constants.each do |name|
|
10
|
+
case cls.const_get(name)
|
11
|
+
in true | false
|
12
|
+
cls.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, cls) } }
|
13
|
+
cls.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
|
14
|
+
in Integer
|
15
|
+
cls.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, cls) } }
|
16
|
+
cls.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
|
17
|
+
in Float
|
18
|
+
cls.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, cls) } }
|
19
|
+
cls.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
|
20
|
+
in Symbol
|
21
|
+
cls.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, cls) } }
|
22
|
+
cls.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
|
23
|
+
else
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
4
28
|
Alert = Orb::Models::Alert
|
5
29
|
|
6
30
|
AlertCreateForCustomerParams = Orb::Models::AlertCreateForCustomerParams
|
data/lib/orb/request_options.rb
CHANGED