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
@@ -20,9 +20,11 @@ module Orb
|
|
20
20
|
# The adjustment intervals for this subscription sorted by the start_date of the
|
21
21
|
# adjustment interval.
|
22
22
|
#
|
23
|
-
# @return [Array<Orb::
|
23
|
+
# @return [Array<Orb::Subscription::AdjustmentInterval>]
|
24
24
|
required :adjustment_intervals,
|
25
|
-
-> {
|
25
|
+
-> {
|
26
|
+
Orb::Internal::Type::ArrayOf[Orb::Subscription::AdjustmentInterval]
|
27
|
+
}
|
26
28
|
|
27
29
|
# @!attribute auto_collection
|
28
30
|
# Determines whether issued invoices for this subscription will automatically be
|
@@ -34,9 +36,8 @@ module Orb
|
|
34
36
|
|
35
37
|
# @!attribute billing_cycle_anchor_configuration
|
36
38
|
#
|
37
|
-
# @return [Orb::
|
38
|
-
required :billing_cycle_anchor_configuration,
|
39
|
-
-> { Orb::Models::Subscription::BillingCycleAnchorConfiguration }
|
39
|
+
# @return [Orb::Subscription::BillingCycleAnchorConfiguration]
|
40
|
+
required :billing_cycle_anchor_configuration, -> { Orb::Subscription::BillingCycleAnchorConfiguration }
|
40
41
|
|
41
42
|
# @!attribute billing_cycle_day
|
42
43
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
@@ -88,8 +89,8 @@ module Orb
|
|
88
89
|
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
89
90
|
# information on what this timezone parameter influences within Orb.
|
90
91
|
#
|
91
|
-
# @return [Orb::
|
92
|
-
required :customer, -> { Orb::
|
92
|
+
# @return [Orb::Customer]
|
93
|
+
required :customer, -> { Orb::Customer }
|
93
94
|
|
94
95
|
# @!attribute default_invoice_memo
|
95
96
|
# Determines the default memo on this subscriptions' invoices. Note that if this
|
@@ -101,9 +102,9 @@ module Orb
|
|
101
102
|
# @!attribute discount_intervals
|
102
103
|
# The discount intervals for this subscription sorted by the start_date.
|
103
104
|
#
|
104
|
-
# @return [Array<Orb::
|
105
|
+
# @return [Array<Orb::Subscription::DiscountInterval::Amount, Orb::Subscription::DiscountInterval::Percentage, Orb::Subscription::DiscountInterval::Usage>]
|
105
106
|
required :discount_intervals,
|
106
|
-
-> { Orb::Internal::Type::ArrayOf[union: Orb::
|
107
|
+
-> { Orb::Internal::Type::ArrayOf[union: Orb::Subscription::DiscountInterval] }
|
107
108
|
|
108
109
|
# @!attribute end_date
|
109
110
|
# The date Orb stops billing for this subscription.
|
@@ -113,9 +114,9 @@ module Orb
|
|
113
114
|
|
114
115
|
# @!attribute fixed_fee_quantity_schedule
|
115
116
|
#
|
116
|
-
# @return [Array<Orb::
|
117
|
+
# @return [Array<Orb::Subscription::FixedFeeQuantitySchedule>]
|
117
118
|
required :fixed_fee_quantity_schedule,
|
118
|
-
-> { Orb::Internal::Type::ArrayOf[Orb::
|
119
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Subscription::FixedFeeQuantitySchedule] }
|
119
120
|
|
120
121
|
# @!attribute invoicing_threshold
|
121
122
|
#
|
@@ -125,9 +126,8 @@ module Orb
|
|
125
126
|
# @!attribute maximum_intervals
|
126
127
|
# The maximum intervals for this subscription sorted by the start_date.
|
127
128
|
#
|
128
|
-
# @return [Array<Orb::
|
129
|
-
required :maximum_intervals,
|
130
|
-
-> { Orb::Internal::Type::ArrayOf[Orb::Models::Subscription::MaximumInterval] }
|
129
|
+
# @return [Array<Orb::Subscription::MaximumInterval>]
|
130
|
+
required :maximum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::Subscription::MaximumInterval] }
|
131
131
|
|
132
132
|
# @!attribute metadata
|
133
133
|
# User specified key-value pairs for the resource. If not present, this defaults
|
@@ -141,9 +141,8 @@ module Orb
|
|
141
141
|
# @!attribute minimum_intervals
|
142
142
|
# The minimum intervals for this subscription sorted by the start_date.
|
143
143
|
#
|
144
|
-
# @return [Array<Orb::
|
145
|
-
required :minimum_intervals,
|
146
|
-
-> { Orb::Internal::Type::ArrayOf[Orb::Models::Subscription::MinimumInterval] }
|
144
|
+
# @return [Array<Orb::Subscription::MinimumInterval>]
|
145
|
+
required :minimum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::Subscription::MinimumInterval] }
|
147
146
|
|
148
147
|
# @!attribute net_terms
|
149
148
|
# Determines the difference between the invoice issue date for subscription
|
@@ -157,10 +156,8 @@ module Orb
|
|
157
156
|
# @!attribute pending_subscription_change
|
158
157
|
# A pending subscription change if one exists on this subscription.
|
159
158
|
#
|
160
|
-
# @return [Orb::
|
161
|
-
required :pending_subscription_change,
|
162
|
-
-> { Orb::Models::Subscription::PendingSubscriptionChange },
|
163
|
-
nil?: true
|
159
|
+
# @return [Orb::Subscription::PendingSubscriptionChange, nil]
|
160
|
+
required :pending_subscription_change, -> { Orb::Subscription::PendingSubscriptionChange }, nil?: true
|
164
161
|
|
165
162
|
# @!attribute plan
|
166
163
|
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
@@ -168,19 +165,19 @@ module Orb
|
|
168
165
|
# subscription. You can see more about how to configure prices in the
|
169
166
|
# [Price resource](/reference/price).
|
170
167
|
#
|
171
|
-
# @return [Orb::
|
172
|
-
required :plan, -> { Orb::
|
168
|
+
# @return [Orb::Plan]
|
169
|
+
required :plan, -> { Orb::Plan }
|
173
170
|
|
174
171
|
# @!attribute price_intervals
|
175
172
|
# The price intervals for this subscription.
|
176
173
|
#
|
177
|
-
# @return [Array<Orb::
|
178
|
-
required :price_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::
|
174
|
+
# @return [Array<Orb::Subscription::PriceInterval>]
|
175
|
+
required :price_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::Subscription::PriceInterval] }
|
179
176
|
|
180
177
|
# @!attribute redeemed_coupon
|
181
178
|
#
|
182
|
-
# @return [Orb::
|
183
|
-
required :redeemed_coupon, -> { Orb::
|
179
|
+
# @return [Orb::Subscription::RedeemedCoupon, nil]
|
180
|
+
required :redeemed_coupon, -> { Orb::Subscription::RedeemedCoupon }, nil?: true
|
184
181
|
|
185
182
|
# @!attribute start_date
|
186
183
|
# The date Orb starts billing for this subscription.
|
@@ -190,17 +187,17 @@ module Orb
|
|
190
187
|
|
191
188
|
# @!attribute status
|
192
189
|
#
|
193
|
-
# @return [Symbol, Orb::
|
194
|
-
required :status, enum: -> { Orb::
|
190
|
+
# @return [Symbol, Orb::Subscription::Status]
|
191
|
+
required :status, enum: -> { Orb::Subscription::Status }
|
195
192
|
|
196
193
|
# @!attribute trial_info
|
197
194
|
#
|
198
|
-
# @return [Orb::
|
199
|
-
required :trial_info, -> { Orb::
|
195
|
+
# @return [Orb::Subscription::TrialInfo]
|
196
|
+
required :trial_info, -> { Orb::Subscription::TrialInfo }
|
200
197
|
|
201
198
|
# @!method initialize(id:, active_plan_phase_order:, adjustment_intervals:, auto_collection:, billing_cycle_anchor_configuration:, billing_cycle_day:, created_at:, current_billing_period_end_date:, current_billing_period_start_date:, customer:, default_invoice_memo:, discount_intervals:, end_date:, fixed_fee_quantity_schedule:, invoicing_threshold:, maximum_intervals:, metadata:, minimum_intervals:, net_terms:, pending_subscription_change:, plan:, price_intervals:, redeemed_coupon:, start_date:, status:, trial_info:)
|
202
|
-
# Some parameter documentations has been truncated, see
|
203
|
-
#
|
199
|
+
# Some parameter documentations has been truncated, see {Orb::Subscription} for
|
200
|
+
# more details.
|
204
201
|
#
|
205
202
|
# A [subscription](/core-concepts#subscription) represents the purchase of a plan
|
206
203
|
# by a customer.
|
@@ -225,65 +222,54 @@ module Orb
|
|
225
222
|
# @param id [String]
|
226
223
|
#
|
227
224
|
# @param active_plan_phase_order [Integer, nil] The current plan phase that is active, only if the subscription's plan has phase
|
228
|
-
# ...
|
229
225
|
#
|
230
|
-
# @param adjustment_intervals [Array<Orb::
|
231
|
-
# ...
|
226
|
+
# @param adjustment_intervals [Array<Orb::Subscription::AdjustmentInterval>] The adjustment intervals for this subscription sorted by the start_date of the a
|
232
227
|
#
|
233
228
|
# @param auto_collection [Boolean, nil] Determines whether issued invoices for this subscription will automatically be c
|
234
|
-
# ...
|
235
229
|
#
|
236
|
-
# @param billing_cycle_anchor_configuration [Orb::
|
230
|
+
# @param billing_cycle_anchor_configuration [Orb::Subscription::BillingCycleAnchorConfiguration]
|
237
231
|
#
|
238
232
|
# @param billing_cycle_day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
|
239
|
-
# ...
|
240
233
|
#
|
241
234
|
# @param created_at [Time]
|
242
235
|
#
|
243
236
|
# @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
|
244
|
-
# ...
|
245
237
|
#
|
246
238
|
# @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
|
247
|
-
# ...
|
248
239
|
#
|
249
|
-
# @param customer [Orb::
|
250
|
-
# ...
|
240
|
+
# @param customer [Orb::Customer] A customer is a buyer of your products, and the other party to the billing relat
|
251
241
|
#
|
252
242
|
# @param default_invoice_memo [String, nil] Determines the default memo on this subscriptions' invoices. Note that if this i
|
253
|
-
# ...
|
254
243
|
#
|
255
|
-
# @param discount_intervals [Array<Orb::
|
244
|
+
# @param discount_intervals [Array<Orb::Subscription::DiscountInterval::Amount, Orb::Subscription::DiscountInterval::Percentage, Orb::Subscription::DiscountInterval::Usage>] The discount intervals for this subscription sorted by the start_date.
|
256
245
|
#
|
257
246
|
# @param end_date [Time, nil] The date Orb stops billing for this subscription.
|
258
247
|
#
|
259
|
-
# @param fixed_fee_quantity_schedule [Array<Orb::
|
248
|
+
# @param fixed_fee_quantity_schedule [Array<Orb::Subscription::FixedFeeQuantitySchedule>]
|
260
249
|
#
|
261
250
|
# @param invoicing_threshold [String, nil]
|
262
251
|
#
|
263
|
-
# @param maximum_intervals [Array<Orb::
|
252
|
+
# @param maximum_intervals [Array<Orb::Subscription::MaximumInterval>] The maximum intervals for this subscription sorted by the start_date.
|
264
253
|
#
|
265
254
|
# @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
|
266
|
-
# ...
|
267
255
|
#
|
268
|
-
# @param minimum_intervals [Array<Orb::
|
256
|
+
# @param minimum_intervals [Array<Orb::Subscription::MinimumInterval>] The minimum intervals for this subscription sorted by the start_date.
|
269
257
|
#
|
270
258
|
# @param net_terms [Integer] Determines the difference between the invoice issue date for subscription invoic
|
271
|
-
# ...
|
272
259
|
#
|
273
|
-
# @param pending_subscription_change [Orb::
|
260
|
+
# @param pending_subscription_change [Orb::Subscription::PendingSubscriptionChange, nil] A pending subscription change if one exists on this subscription.
|
274
261
|
#
|
275
|
-
# @param plan [Orb::
|
276
|
-
# ...
|
262
|
+
# @param plan [Orb::Plan] The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
277
263
|
#
|
278
|
-
# @param price_intervals [Array<Orb::
|
264
|
+
# @param price_intervals [Array<Orb::Subscription::PriceInterval>] The price intervals for this subscription.
|
279
265
|
#
|
280
|
-
# @param redeemed_coupon [Orb::
|
266
|
+
# @param redeemed_coupon [Orb::Subscription::RedeemedCoupon, nil]
|
281
267
|
#
|
282
268
|
# @param start_date [Time] The date Orb starts billing for this subscription.
|
283
269
|
#
|
284
|
-
# @param status [Symbol, Orb::
|
270
|
+
# @param status [Symbol, Orb::Subscription::Status]
|
285
271
|
#
|
286
|
-
# @param trial_info [Orb::
|
272
|
+
# @param trial_info [Orb::Subscription::TrialInfo]
|
287
273
|
|
288
274
|
class AdjustmentInterval < Orb::Internal::Type::BaseModel
|
289
275
|
# @!attribute id
|
@@ -293,8 +279,8 @@ module Orb
|
|
293
279
|
|
294
280
|
# @!attribute adjustment
|
295
281
|
#
|
296
|
-
# @return [Orb::
|
297
|
-
required :adjustment, union: -> { Orb::
|
282
|
+
# @return [Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Subscription::AdjustmentInterval::Adjustment::Minimum, Orb::Subscription::AdjustmentInterval::Adjustment::Maximum]
|
283
|
+
required :adjustment, union: -> { Orb::Subscription::AdjustmentInterval::Adjustment }
|
298
284
|
|
299
285
|
# @!attribute applies_to_price_interval_ids
|
300
286
|
# The price interval IDs that this adjustment applies to.
|
@@ -317,7 +303,7 @@ module Orb
|
|
317
303
|
# @!method initialize(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:)
|
318
304
|
# @param id [String]
|
319
305
|
#
|
320
|
-
# @param adjustment [Orb::
|
306
|
+
# @param adjustment [Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Subscription::AdjustmentInterval::Adjustment::Minimum, Orb::Subscription::AdjustmentInterval::Adjustment::Maximum]
|
321
307
|
#
|
322
308
|
# @param applies_to_price_interval_ids [Array<String>] The price interval IDs that this adjustment applies to.
|
323
309
|
#
|
@@ -325,22 +311,24 @@ module Orb
|
|
325
311
|
#
|
326
312
|
# @param start_date [Time] The start date of the adjustment interval.
|
327
313
|
|
328
|
-
# @see Orb::
|
314
|
+
# @see Orb::Subscription::AdjustmentInterval#adjustment
|
329
315
|
module Adjustment
|
330
316
|
extend Orb::Internal::Type::Union
|
331
317
|
|
332
318
|
discriminator :adjustment_type
|
333
319
|
|
334
|
-
variant :usage_discount, -> { Orb::
|
320
|
+
variant :usage_discount, -> { Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount }
|
335
321
|
|
336
|
-
variant :amount_discount, -> { Orb::
|
322
|
+
variant :amount_discount, -> { Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount }
|
337
323
|
|
338
324
|
variant :percentage_discount,
|
339
|
-
-> {
|
325
|
+
-> {
|
326
|
+
Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount
|
327
|
+
}
|
340
328
|
|
341
|
-
variant :minimum, -> { Orb::
|
329
|
+
variant :minimum, -> { Orb::Subscription::AdjustmentInterval::Adjustment::Minimum }
|
342
330
|
|
343
|
-
variant :maximum, -> { Orb::
|
331
|
+
variant :maximum, -> { Orb::Subscription::AdjustmentInterval::Adjustment::Maximum }
|
344
332
|
|
345
333
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
346
334
|
# @!attribute id
|
@@ -387,22 +375,20 @@ module Orb
|
|
387
375
|
|
388
376
|
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, usage_discount:, adjustment_type: :usage_discount)
|
389
377
|
# Some parameter documentations has been truncated, see
|
390
|
-
# {Orb::
|
391
|
-
#
|
378
|
+
# {Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount} for more
|
379
|
+
# details.
|
392
380
|
#
|
393
381
|
# @param id [String]
|
394
382
|
#
|
395
383
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
396
384
|
#
|
397
385
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
398
|
-
# ...
|
399
386
|
#
|
400
387
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
401
388
|
#
|
402
389
|
# @param reason [String, nil] The reason for the adjustment.
|
403
390
|
#
|
404
391
|
# @param usage_discount [Float] The number of usage units by which to discount the price this adjustment applies
|
405
|
-
# ...
|
406
392
|
#
|
407
393
|
# @param adjustment_type [Symbol, :usage_discount]
|
408
394
|
end
|
@@ -452,18 +438,16 @@ module Orb
|
|
452
438
|
|
453
439
|
# @!method initialize(id:, amount_discount:, applies_to_price_ids:, is_invoice_level:, plan_phase_order:, reason:, adjustment_type: :amount_discount)
|
454
440
|
# Some parameter documentations has been truncated, see
|
455
|
-
# {Orb::
|
456
|
-
#
|
441
|
+
# {Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount} for more
|
442
|
+
# details.
|
457
443
|
#
|
458
444
|
# @param id [String]
|
459
445
|
#
|
460
446
|
# @param amount_discount [String] The amount by which to discount the prices this adjustment applies to in a given
|
461
|
-
# ...
|
462
447
|
#
|
463
448
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
464
449
|
#
|
465
450
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
466
|
-
# ...
|
467
451
|
#
|
468
452
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
469
453
|
#
|
@@ -517,18 +501,16 @@ module Orb
|
|
517
501
|
|
518
502
|
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, percentage_discount:, plan_phase_order:, reason:, adjustment_type: :percentage_discount)
|
519
503
|
# Some parameter documentations has been truncated, see
|
520
|
-
# {Orb::
|
521
|
-
#
|
504
|
+
# {Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount} for more
|
505
|
+
# details.
|
522
506
|
#
|
523
507
|
# @param id [String]
|
524
508
|
#
|
525
509
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
526
510
|
#
|
527
511
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
528
|
-
# ...
|
529
512
|
#
|
530
513
|
# @param percentage_discount [Float] The percentage (as a value between 0 and 1) by which to discount the price inter
|
531
|
-
# ...
|
532
514
|
#
|
533
515
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
534
516
|
#
|
@@ -588,20 +570,17 @@ module Orb
|
|
588
570
|
|
589
571
|
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, item_id:, minimum_amount:, plan_phase_order:, reason:, adjustment_type: :minimum)
|
590
572
|
# Some parameter documentations has been truncated, see
|
591
|
-
# {Orb::
|
592
|
-
# details.
|
573
|
+
# {Orb::Subscription::AdjustmentInterval::Adjustment::Minimum} for more details.
|
593
574
|
#
|
594
575
|
# @param id [String]
|
595
576
|
#
|
596
577
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
597
578
|
#
|
598
579
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
599
|
-
# ...
|
600
580
|
#
|
601
581
|
# @param item_id [String] The item ID that revenue from this minimum will be attributed to.
|
602
582
|
#
|
603
583
|
# @param minimum_amount [String] The minimum amount to charge in a given billing period for the prices this adjus
|
604
|
-
# ...
|
605
584
|
#
|
606
585
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
607
586
|
#
|
@@ -655,18 +634,15 @@ module Orb
|
|
655
634
|
|
656
635
|
# @!method initialize(id:, applies_to_price_ids:, is_invoice_level:, maximum_amount:, plan_phase_order:, reason:, adjustment_type: :maximum)
|
657
636
|
# Some parameter documentations has been truncated, see
|
658
|
-
# {Orb::
|
659
|
-
# details.
|
637
|
+
# {Orb::Subscription::AdjustmentInterval::Adjustment::Maximum} for more details.
|
660
638
|
#
|
661
639
|
# @param id [String]
|
662
640
|
#
|
663
641
|
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
664
642
|
#
|
665
643
|
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invocice, false for adjustments tha
|
666
|
-
# ...
|
667
644
|
#
|
668
645
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the prices this adjus
|
669
|
-
# ...
|
670
646
|
#
|
671
647
|
# @param plan_phase_order [Integer, nil] The plan phase in which this adjustment is active.
|
672
648
|
#
|
@@ -676,11 +652,23 @@ module Orb
|
|
676
652
|
end
|
677
653
|
|
678
654
|
# @!method self.variants
|
679
|
-
# @return [Array(Orb::
|
655
|
+
# @return [Array(Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Subscription::AdjustmentInterval::Adjustment::Minimum, Orb::Subscription::AdjustmentInterval::Adjustment::Maximum)]
|
656
|
+
|
657
|
+
define_sorbet_constant!(:Variants) do
|
658
|
+
T.type_alias do
|
659
|
+
T.any(
|
660
|
+
Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount,
|
661
|
+
Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount,
|
662
|
+
Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount,
|
663
|
+
Orb::Subscription::AdjustmentInterval::Adjustment::Minimum,
|
664
|
+
Orb::Subscription::AdjustmentInterval::Adjustment::Maximum
|
665
|
+
)
|
666
|
+
end
|
667
|
+
end
|
680
668
|
end
|
681
669
|
end
|
682
670
|
|
683
|
-
# @see Orb::
|
671
|
+
# @see Orb::Subscription#billing_cycle_anchor_configuration
|
684
672
|
class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
|
685
673
|
# @!attribute day
|
686
674
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
@@ -708,16 +696,13 @@ module Orb
|
|
708
696
|
|
709
697
|
# @!method initialize(day:, month: nil, year: nil)
|
710
698
|
# Some parameter documentations has been truncated, see
|
711
|
-
# {Orb::
|
699
|
+
# {Orb::Subscription::BillingCycleAnchorConfiguration} for more details.
|
712
700
|
#
|
713
701
|
# @param day [Integer] The day of the month on which the billing cycle is anchored. If the maximum numb
|
714
|
-
# ...
|
715
702
|
#
|
716
703
|
# @param month [Integer, nil] The month on which the billing cycle is anchored (e.g. a quarterly price anchore
|
717
|
-
# ...
|
718
704
|
#
|
719
705
|
# @param year [Integer, nil] The year on which the billing cycle is anchored (e.g. a 2 year billing cycle anc
|
720
|
-
# ...
|
721
706
|
end
|
722
707
|
|
723
708
|
module DiscountInterval
|
@@ -725,11 +710,11 @@ module Orb
|
|
725
710
|
|
726
711
|
discriminator :discount_type
|
727
712
|
|
728
|
-
variant :amount, -> { Orb::
|
713
|
+
variant :amount, -> { Orb::Subscription::DiscountInterval::Amount }
|
729
714
|
|
730
|
-
variant :percentage, -> { Orb::
|
715
|
+
variant :percentage, -> { Orb::Subscription::DiscountInterval::Percentage }
|
731
716
|
|
732
|
-
variant :usage, -> { Orb::
|
717
|
+
variant :usage, -> { Orb::Subscription::DiscountInterval::Usage }
|
733
718
|
|
734
719
|
class Amount < Orb::Internal::Type::BaseModel
|
735
720
|
# @!attribute amount_discount
|
@@ -820,7 +805,7 @@ module Orb
|
|
820
805
|
|
821
806
|
# @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, percentage_discount:, start_date:, discount_type: :percentage)
|
822
807
|
# Some parameter documentations has been truncated, see
|
823
|
-
# {Orb::
|
808
|
+
# {Orb::Subscription::DiscountInterval::Percentage} for more details.
|
824
809
|
#
|
825
810
|
# @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
|
826
811
|
#
|
@@ -829,7 +814,6 @@ module Orb
|
|
829
814
|
# @param end_date [Time, nil] The end date of the discount interval.
|
830
815
|
#
|
831
816
|
# @param percentage_discount [Float] Only available if discount_type is `percentage`.This is a number between 0 and 1
|
832
|
-
# ...
|
833
817
|
#
|
834
818
|
# @param start_date [Time] The start date of the discount interval.
|
835
819
|
#
|
@@ -875,7 +859,7 @@ module Orb
|
|
875
859
|
|
876
860
|
# @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, start_date:, usage_discount:, discount_type: :usage)
|
877
861
|
# Some parameter documentations has been truncated, see
|
878
|
-
# {Orb::
|
862
|
+
# {Orb::Subscription::DiscountInterval::Usage} for more details.
|
879
863
|
#
|
880
864
|
# @param applies_to_price_ids [Array<String>] The price ids that this discount interval applies to.
|
881
865
|
#
|
@@ -886,13 +870,22 @@ module Orb
|
|
886
870
|
# @param start_date [Time] The start date of the discount interval.
|
887
871
|
#
|
888
872
|
# @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
|
889
|
-
# ...
|
890
873
|
#
|
891
874
|
# @param discount_type [Symbol, :usage]
|
892
875
|
end
|
893
876
|
|
894
877
|
# @!method self.variants
|
895
|
-
# @return [Array(Orb::
|
878
|
+
# @return [Array(Orb::Subscription::DiscountInterval::Amount, Orb::Subscription::DiscountInterval::Percentage, Orb::Subscription::DiscountInterval::Usage)]
|
879
|
+
|
880
|
+
define_sorbet_constant!(:Variants) do
|
881
|
+
T.type_alias do
|
882
|
+
T.any(
|
883
|
+
Orb::Subscription::DiscountInterval::Amount,
|
884
|
+
Orb::Subscription::DiscountInterval::Percentage,
|
885
|
+
Orb::Subscription::DiscountInterval::Usage
|
886
|
+
)
|
887
|
+
end
|
888
|
+
end
|
896
889
|
end
|
897
890
|
|
898
891
|
class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
|
@@ -957,7 +950,7 @@ module Orb
|
|
957
950
|
|
958
951
|
# @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, maximum_amount:, start_date:)
|
959
952
|
# Some parameter documentations has been truncated, see
|
960
|
-
# {Orb::
|
953
|
+
# {Orb::Subscription::MaximumInterval} for more details.
|
961
954
|
#
|
962
955
|
# @param applies_to_price_ids [Array<String>] The price ids that this maximum interval applies to.
|
963
956
|
#
|
@@ -966,7 +959,6 @@ module Orb
|
|
966
959
|
# @param end_date [Time, nil] The end date of the maximum interval.
|
967
960
|
#
|
968
961
|
# @param maximum_amount [String] The maximum amount to charge in a given billing period for the price intervals t
|
969
|
-
# ...
|
970
962
|
#
|
971
963
|
# @param start_date [Time] The start date of the maximum interval.
|
972
964
|
end
|
@@ -1005,7 +997,7 @@ module Orb
|
|
1005
997
|
|
1006
998
|
# @!method initialize(applies_to_price_ids:, applies_to_price_interval_ids:, end_date:, minimum_amount:, start_date:)
|
1007
999
|
# Some parameter documentations has been truncated, see
|
1008
|
-
# {Orb::
|
1000
|
+
# {Orb::Subscription::MinimumInterval} for more details.
|
1009
1001
|
#
|
1010
1002
|
# @param applies_to_price_ids [Array<String>] The price ids that this minimum interval applies to.
|
1011
1003
|
#
|
@@ -1014,12 +1006,11 @@ module Orb
|
|
1014
1006
|
# @param end_date [Time, nil] The end date of the minimum interval.
|
1015
1007
|
#
|
1016
1008
|
# @param minimum_amount [String] The minimum amount to charge in a given billing period for the price intervals t
|
1017
|
-
# ...
|
1018
1009
|
#
|
1019
1010
|
# @param start_date [Time] The start date of the minimum interval.
|
1020
1011
|
end
|
1021
1012
|
|
1022
|
-
# @see Orb::
|
1013
|
+
# @see Orb::Subscription#pending_subscription_change
|
1023
1014
|
class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
|
1024
1015
|
# @!attribute id
|
1025
1016
|
#
|
@@ -1077,9 +1068,11 @@ module Orb
|
|
1077
1068
|
# The fixed fee quantity transitions for this price interval. This is only
|
1078
1069
|
# relevant for fixed fees.
|
1079
1070
|
#
|
1080
|
-
# @return [Array<Orb::
|
1071
|
+
# @return [Array<Orb::Subscription::PriceInterval::FixedFeeQuantityTransition>, nil]
|
1081
1072
|
required :fixed_fee_quantity_transitions,
|
1082
|
-
-> {
|
1073
|
+
-> {
|
1074
|
+
Orb::Internal::Type::ArrayOf[Orb::Subscription::PriceInterval::FixedFeeQuantityTransition]
|
1075
|
+
},
|
1083
1076
|
nil?: true
|
1084
1077
|
|
1085
1078
|
# @!attribute price
|
@@ -1094,8 +1087,8 @@ module Orb
|
|
1094
1087
|
# For more on the types of prices, see
|
1095
1088
|
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1096
1089
|
#
|
1097
|
-
# @return [Orb::
|
1098
|
-
required :price, union: -> { Orb::
|
1090
|
+
# @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]
|
1091
|
+
required :price, union: -> { Orb::Price }
|
1099
1092
|
|
1100
1093
|
# @!attribute start_date
|
1101
1094
|
# The start date of the price interval. This is the date that Orb starts billing
|
@@ -1113,7 +1106,7 @@ module Orb
|
|
1113
1106
|
|
1114
1107
|
# @!method initialize(id:, billing_cycle_day:, current_billing_period_end_date:, current_billing_period_start_date:, end_date:, filter:, fixed_fee_quantity_transitions:, price:, start_date:, usage_customer_ids:)
|
1115
1108
|
# Some parameter documentations has been truncated, see
|
1116
|
-
# {Orb::
|
1109
|
+
# {Orb::Subscription::PriceInterval} for more details.
|
1117
1110
|
#
|
1118
1111
|
# The Price Interval resource represents a period of time for which a price will
|
1119
1112
|
# bill on a subscription. A subscription’s price intervals define its billing
|
@@ -1124,27 +1117,20 @@ module Orb
|
|
1124
1117
|
# @param billing_cycle_day [Integer] The day of the month that Orb bills for this price
|
1125
1118
|
#
|
1126
1119
|
# @param current_billing_period_end_date [Time, nil] The end of the current billing period. This is an exclusive timestamp, such that
|
1127
|
-
# ...
|
1128
1120
|
#
|
1129
1121
|
# @param current_billing_period_start_date [Time, nil] The start date of the current billing period. This is an inclusive timestamp; th
|
1130
|
-
# ...
|
1131
1122
|
#
|
1132
1123
|
# @param end_date [Time, nil] The end date of the price interval. This is the date that Orb stops billing for
|
1133
|
-
# ...
|
1134
1124
|
#
|
1135
1125
|
# @param filter [String, nil] An additional filter to apply to usage queries.
|
1136
1126
|
#
|
1137
|
-
# @param fixed_fee_quantity_transitions [Array<Orb::
|
1138
|
-
# ...
|
1127
|
+
# @param fixed_fee_quantity_transitions [Array<Orb::Subscription::PriceInterval::FixedFeeQuantityTransition>, nil] The fixed fee quantity transitions for this price interval. This is only relevan
|
1139
1128
|
#
|
1140
|
-
# @param price [Orb::
|
1141
|
-
# ...
|
1129
|
+
# @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
|
1142
1130
|
#
|
1143
1131
|
# @param start_date [Time] The start date of the price interval. This is the date that Orb starts billing f
|
1144
|
-
# ...
|
1145
1132
|
#
|
1146
1133
|
# @param usage_customer_ids [Array<String>, nil] A list of customer IDs whose usage events will be aggregated and billed under th
|
1147
|
-
# ...
|
1148
1134
|
|
1149
1135
|
class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
|
1150
1136
|
# @!attribute effective_date
|
@@ -1169,7 +1155,7 @@ module Orb
|
|
1169
1155
|
end
|
1170
1156
|
end
|
1171
1157
|
|
1172
|
-
# @see Orb::
|
1158
|
+
# @see Orb::Subscription#redeemed_coupon
|
1173
1159
|
class RedeemedCoupon < Orb::Internal::Type::BaseModel
|
1174
1160
|
# @!attribute coupon_id
|
1175
1161
|
#
|
@@ -1192,7 +1178,7 @@ module Orb
|
|
1192
1178
|
# @param start_date [Time]
|
1193
1179
|
end
|
1194
1180
|
|
1195
|
-
# @see Orb::
|
1181
|
+
# @see Orb::Subscription#status
|
1196
1182
|
module Status
|
1197
1183
|
extend Orb::Internal::Type::Enum
|
1198
1184
|
|
@@ -1204,7 +1190,7 @@ module Orb
|
|
1204
1190
|
# @return [Array<Symbol>]
|
1205
1191
|
end
|
1206
1192
|
|
1207
|
-
# @see Orb::
|
1193
|
+
# @see Orb::Subscription#trial_info
|
1208
1194
|
class TrialInfo < Orb::Internal::Type::BaseModel
|
1209
1195
|
# @!attribute end_date
|
1210
1196
|
#
|
@@ -10,8 +10,8 @@ module Orb
|
|
10
10
|
# @!attribute cancel_option
|
11
11
|
# Determines the timing of subscription cancellation
|
12
12
|
#
|
13
|
-
# @return [Symbol, Orb::
|
14
|
-
required :cancel_option, enum: -> { Orb::
|
13
|
+
# @return [Symbol, Orb::SubscriptionCancelParams::CancelOption]
|
14
|
+
required :cancel_option, enum: -> { Orb::SubscriptionCancelParams::CancelOption }
|
15
15
|
|
16
16
|
# @!attribute allow_invoice_credit_or_void
|
17
17
|
# If false, this request will fail if it would void an issued invoice or create a
|
@@ -32,13 +32,11 @@ module Orb
|
|
32
32
|
# Some parameter documentations has been truncated, see
|
33
33
|
# {Orb::Models::SubscriptionCancelParams} for more details.
|
34
34
|
#
|
35
|
-
# @param cancel_option [Symbol, Orb::
|
35
|
+
# @param cancel_option [Symbol, Orb::SubscriptionCancelParams::CancelOption] Determines the timing of subscription cancellation
|
36
36
|
#
|
37
37
|
# @param allow_invoice_credit_or_void [Boolean, nil] If false, this request will fail if it would void an issued invoice or create a
|
38
|
-
# ...
|
39
38
|
#
|
40
39
|
# @param cancellation_date [Time, nil] The date that the cancellation should take effect. This parameter can only be pa
|
41
|
-
# ...
|
42
40
|
#
|
43
41
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
44
42
|
|