metronome-sdk 0.3.0 → 1.0.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 +36 -0
- data/README.md +9 -9
- data/lib/metronome_sdk/internal/body_cursor_page.rb +86 -0
- data/lib/metronome_sdk/internal/cursor_page_without_limit.rb +86 -0
- data/lib/metronome_sdk/internal/transport/base_client.rb +1 -4
- data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/metronome_sdk/internal/type/base_model.rb +6 -13
- data/lib/metronome_sdk/internal/type/union.rb +11 -0
- data/lib/metronome_sdk/internal/util.rb +1 -1
- data/lib/metronome_sdk/models/base_threshold_commit.rb +36 -0
- data/lib/metronome_sdk/models/commit.rb +26 -170
- data/lib/metronome_sdk/models/commit_hierarchy_configuration.rb +98 -0
- data/lib/metronome_sdk/models/commit_rate.rb +48 -0
- data/lib/metronome_sdk/models/commit_specifier.rb +42 -0
- data/lib/metronome_sdk/models/commit_specifier_input.rb +42 -0
- data/lib/metronome_sdk/models/contract.rb +404 -0
- data/lib/metronome_sdk/models/contract_v2.rb +2919 -0
- data/lib/metronome_sdk/models/contract_without_amendments.rb +36 -1126
- data/lib/metronome_sdk/models/credit.rb +9 -156
- data/lib/metronome_sdk/models/discount.rb +2 -1
- data/lib/metronome_sdk/models/hierarchy_configuration.rb +76 -0
- data/lib/metronome_sdk/models/override.rb +6 -101
- data/lib/metronome_sdk/models/override_tier.rb +21 -0
- data/lib/metronome_sdk/models/overwrite_rate.rb +82 -0
- data/lib/metronome_sdk/models/payment_gate_config.rb +149 -0
- data/lib/metronome_sdk/models/payment_gate_config_v2.rb +149 -0
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +100 -0
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +102 -0
- data/lib/metronome_sdk/models/pro_service.rb +2 -1
- data/lib/metronome_sdk/models/recurring_commit_subscription_config.rb +51 -0
- data/lib/metronome_sdk/models/scheduled_charge.rb +2 -1
- data/lib/metronome_sdk/models/spend_threshold_configuration.rb +44 -0
- data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +44 -0
- data/lib/metronome_sdk/models/subscription.rb +227 -0
- data/lib/metronome_sdk/models/update_base_threshold_commit.rb +36 -0
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +4 -6
- data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +1 -2
- data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +3 -3
- data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +4 -7
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +57 -411
- data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb +7 -16
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +236 -1478
- data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +6 -23
- data/lib/metronome_sdk/models/v1/contract_list_response.rb +3 -1153
- data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +5 -50
- data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +3 -1154
- data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +2 -1
- data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +8 -1
- data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +8 -1
- data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +1 -4
- data/lib/metronome_sdk/models/v1/contracts/rate_card_create_params.rb +4 -7
- data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +5 -50
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/rate_card_update_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +6 -61
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +3 -49
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +4 -51
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +5 -49
- data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +103 -123
- data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +3 -5
- data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/custom_field_list_keys_response.rb +41 -58
- data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +5 -1
- data/lib/metronome_sdk/models/v1/customer.rb +2 -1
- data/lib/metronome_sdk/models/v1/customer_create_params.rb +37 -11
- data/lib/metronome_sdk/models/v1/customer_detail.rb +2 -1
- data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +3 -3
- data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rb +28 -0
- data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rb +128 -0
- data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_params.rb +143 -0
- data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +30 -1
- data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +2 -0
- data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +2 -0
- data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +10 -60
- data/lib/metronome_sdk/models/v1/customers/credit_create_params.rb +6 -48
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +8 -16
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +61 -48
- data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_params.rb +1 -4
- data/lib/metronome_sdk/models/v1/customers/plan_add_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +2 -1
- data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +4 -11
- data/lib/metronome_sdk/models/v1/plan_detail.rb +9 -5
- data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +2 -1
- data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +2 -1
- data/lib/metronome_sdk/models/v1/plan_list_response.rb +5 -1
- data/lib/metronome_sdk/models/v1/usage_ingest_params.rb +1 -4
- data/lib/metronome_sdk/models/v1/usage_list_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/usage_list_response.rb +45 -62
- data/lib/metronome_sdk/models/v1/usage_search_response.rb +4 -7
- data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +29 -58
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +26 -49
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +414 -2310
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +337 -2424
- data/lib/metronome_sdk/models/v2/contract_list_response.rb +3 -4520
- data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +3 -4528
- data/lib/metronome_sdk/models.rb +38 -0
- data/lib/metronome_sdk/resources/v1/alerts.rb +72 -2
- data/lib/metronome_sdk/resources/v1/audit_logs.rb +39 -4
- data/lib/metronome_sdk/resources/v1/billable_metrics.rb +54 -4
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +25 -6
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb +7 -2
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +10 -2
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +109 -10
- data/lib/metronome_sdk/resources/v1/contracts.rb +254 -18
- data/lib/metronome_sdk/resources/v1/credit_grants.rb +2 -1
- data/lib/metronome_sdk/resources/v1/custom_fields.rb +51 -14
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +103 -8
- data/lib/metronome_sdk/resources/v1/customers/commits.rb +119 -9
- data/lib/metronome_sdk/resources/v1/customers/credits.rb +104 -8
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +124 -8
- data/lib/metronome_sdk/resources/v1/customers.rb +169 -12
- data/lib/metronome_sdk/resources/v1/dashboards.rb +29 -3
- data/lib/metronome_sdk/resources/v1/invoices.rb +23 -2
- data/lib/metronome_sdk/resources/v1/pricing_units.rb +6 -1
- data/lib/metronome_sdk/resources/v1/services.rb +6 -4
- data/lib/metronome_sdk/resources/v1/usage.rb +185 -12
- data/lib/metronome_sdk/resources/v2/contracts.rb +114 -18
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +24 -3
- data/rbi/metronome_sdk/errors.rbi +2 -2
- data/rbi/metronome_sdk/internal/body_cursor_page.rbi +22 -0
- data/rbi/metronome_sdk/internal/cursor_page_without_limit.rbi +22 -0
- data/rbi/metronome_sdk/models/base_threshold_commit.rbi +58 -0
- data/rbi/metronome_sdk/models/commit.rbi +26 -348
- data/rbi/metronome_sdk/models/commit_hierarchy_configuration.rbi +280 -0
- data/rbi/metronome_sdk/models/commit_rate.rbi +85 -0
- data/rbi/metronome_sdk/models/commit_specifier.rbi +71 -0
- data/rbi/metronome_sdk/models/commit_specifier_input.rbi +74 -0
- data/rbi/metronome_sdk/models/contract.rbi +768 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +5822 -0
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +184 -2507
- data/rbi/metronome_sdk/models/credit.rbi +10 -348
- data/rbi/metronome_sdk/models/discount.rbi +2 -0
- data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +180 -0
- data/rbi/metronome_sdk/models/override.rbi +8 -193
- data/rbi/metronome_sdk/models/override_tier.rbi +29 -0
- data/rbi/metronome_sdk/models/overwrite_rate.rbi +137 -0
- data/rbi/metronome_sdk/models/payment_gate_config.rbi +312 -0
- data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +321 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +183 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +188 -0
- data/rbi/metronome_sdk/models/pro_service.rbi +2 -0
- data/rbi/metronome_sdk/models/recurring_commit_subscription_config.rbi +125 -0
- data/rbi/metronome_sdk/models/scheduled_charge.rbi +2 -0
- data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +76 -0
- data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -0
- data/rbi/metronome_sdk/models/subscription.rbi +460 -0
- data/rbi/metronome_sdk/models/update_base_threshold_commit.rbi +61 -0
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +6 -3
- data/rbi/metronome_sdk/models/v1/billable_metric_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/billable_metric_retrieve_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +44 -768
- data/rbi/metronome_sdk/models/v1/contract_create_historical_invoices_params.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1550 -4079
- data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +8 -59
- data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +5 -2420
- data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +6 -129
- data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +4 -2419
- data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_create_params.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +6 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +4 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +4 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +4 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +6 -129
- data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_response.rbi +147 -198
- data/rbi/metronome_sdk/models/v1/credit_grant_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/custom_field_list_keys_response.rbi +117 -165
- data/rbi/metronome_sdk/models/v1/custom_field_set_values_params.rbi +8 -1
- data/rbi/metronome_sdk/models/v1/customer.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +88 -3
- data/rbi/metronome_sdk/models/v1/customer_detail.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbi +51 -0
- data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbi +265 -0
- data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbi +348 -0
- data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +60 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +10 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +10 -0
- data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +6 -90
- data/rbi/metronome_sdk/models/v1/customers/credit_create_params.rbi +6 -90
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +6 -3
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +70 -10
- data/rbi/metronome_sdk/models/v1/customers/plan_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_detail.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_list_charges_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_list_customers_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_list_response.rbi +8 -1
- data/rbi/metronome_sdk/models/v1/usage_list_response.rbi +45 -86
- data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +56 -76
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +56 -76
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +3419 -7270
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1140 -6062
- data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +5 -9867
- data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +6 -9866
- data/rbi/metronome_sdk/models.rbi +44 -0
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +72 -2
- data/rbi/metronome_sdk/resources/v1/audit_logs.rbi +39 -4
- data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +54 -4
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +25 -5
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rbi +7 -2
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +10 -3
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +109 -9
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +257 -16
- data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +5 -1
- data/rbi/metronome_sdk/resources/v1/custom_fields.rbi +57 -14
- data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +108 -5
- data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +119 -10
- data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +104 -9
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +123 -7
- data/rbi/metronome_sdk/resources/v1/customers.rbi +156 -11
- data/rbi/metronome_sdk/resources/v1/dashboards.rbi +29 -3
- data/rbi/metronome_sdk/resources/v1/invoices.rbi +23 -2
- data/rbi/metronome_sdk/resources/v1/pricing_units.rbi +6 -1
- data/rbi/metronome_sdk/resources/v1/services.rbi +6 -4
- data/rbi/metronome_sdk/resources/v1/usage.rbi +188 -12
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +120 -23
- data/sig/metronome_sdk/internal/body_cursor_page.rbs +13 -0
- data/sig/metronome_sdk/internal/cursor_page_without_limit.rbs +13 -0
- data/sig/metronome_sdk/models/base_threshold_commit.rbs +26 -0
- data/sig/metronome_sdk/models/commit.rbs +17 -170
- data/sig/metronome_sdk/models/commit_hierarchy_configuration.rbs +117 -0
- data/sig/metronome_sdk/models/commit_rate.rbs +48 -0
- data/sig/metronome_sdk/models/commit_specifier.rbs +47 -0
- data/sig/metronome_sdk/models/commit_specifier_input.rbs +47 -0
- data/sig/metronome_sdk/models/contract.rbs +398 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +2881 -0
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +54 -976
- data/sig/metronome_sdk/models/credit.rbs +12 -170
- data/sig/metronome_sdk/models/hierarchy_configuration.rbs +71 -0
- data/sig/metronome_sdk/models/override.rbs +12 -101
- data/sig/metronome_sdk/models/override_tier.rbs +17 -0
- data/sig/metronome_sdk/models/overwrite_rate.rbs +78 -0
- data/sig/metronome_sdk/models/payment_gate_config.rbs +123 -0
- data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +123 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +82 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +82 -0
- data/sig/metronome_sdk/models/recurring_commit_subscription_config.rbs +51 -0
- data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +35 -0
- data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +35 -0
- data/sig/metronome_sdk/models/subscription.rbs +215 -0
- data/sig/metronome_sdk/models/update_base_threshold_commit.rbs +28 -0
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +4 -2
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +24 -340
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +168 -1219
- data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +4 -25
- data/sig/metronome_sdk/models/v1/contract_list_response.rbs +4 -1041
- data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +4 -1041
- data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +72 -94
- data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +53 -75
- data/sig/metronome_sdk/models/v1/customer_create_params.rbs +31 -4
- data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbs +32 -0
- data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbs +113 -0
- data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbs +133 -0
- data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +21 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +7 -1
- data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +6 -1
- data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +6 -50
- data/sig/metronome_sdk/models/v1/customers/credit_create_params.rbs +6 -50
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +4 -2
- data/sig/metronome_sdk/models/v1/usage_list_response.rbs +33 -55
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +19 -43
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +19 -43
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +361 -1917
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +242 -2252
- data/sig/metronome_sdk/models/v2/contract_list_response.rbs +4 -4426
- data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +4 -4426
- data/sig/metronome_sdk/models.rbs +38 -0
- data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -1
- data/sig/metronome_sdk/resources/v1/contracts.rbs +3 -3
- data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -1
- data/sig/metronome_sdk/resources/v1/custom_fields.rbs +1 -1
- data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +2 -1
- data/sig/metronome_sdk/resources/v1/customers/commits.rbs +2 -2
- data/sig/metronome_sdk/resources/v1/customers/credits.rbs +2 -2
- data/sig/metronome_sdk/resources/v1/customers.rbs +11 -0
- data/sig/metronome_sdk/resources/v1/usage.rbs +1 -1
- data/sig/metronome_sdk/resources/v2/contracts.rbs +7 -4
- metadata +74 -11
- data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +0 -29
- data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +0 -26
- data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +0 -26
- data/rbi/metronome_sdk/models/v1/customers/alert_list_response.rbi +0 -46
- data/rbi/metronome_sdk/models/v1/customers/commit_list_response.rbi +0 -45
- data/rbi/metronome_sdk/models/v1/customers/credit_list_response.rbi +0 -45
- data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +0 -29
- data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +0 -26
- data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +0 -26
data/lib/metronome_sdk/models.rb
CHANGED
@@ -39,10 +39,24 @@ module MetronomeSDK
|
|
39
39
|
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
40
40
|
end
|
41
41
|
|
42
|
+
BaseThresholdCommit = MetronomeSDK::Models::BaseThresholdCommit
|
43
|
+
|
42
44
|
BaseUsageFilter = MetronomeSDK::Models::BaseUsageFilter
|
43
45
|
|
44
46
|
Commit = MetronomeSDK::Models::Commit
|
45
47
|
|
48
|
+
CommitHierarchyConfiguration = MetronomeSDK::Models::CommitHierarchyConfiguration
|
49
|
+
|
50
|
+
CommitRate = MetronomeSDK::Models::CommitRate
|
51
|
+
|
52
|
+
CommitSpecifier = MetronomeSDK::Models::CommitSpecifier
|
53
|
+
|
54
|
+
CommitSpecifierInput = MetronomeSDK::Models::CommitSpecifierInput
|
55
|
+
|
56
|
+
Contract = MetronomeSDK::Models::Contract
|
57
|
+
|
58
|
+
ContractV2 = MetronomeSDK::Models::ContractV2
|
59
|
+
|
46
60
|
ContractWithoutAmendments = MetronomeSDK::Models::ContractWithoutAmendments
|
47
61
|
|
48
62
|
Credit = MetronomeSDK::Models::Credit
|
@@ -53,24 +67,48 @@ module MetronomeSDK
|
|
53
67
|
|
54
68
|
EventTypeFilter = MetronomeSDK::Models::EventTypeFilter
|
55
69
|
|
70
|
+
HierarchyConfiguration = MetronomeSDK::Models::HierarchyConfiguration
|
71
|
+
|
56
72
|
ID = MetronomeSDK::Models::ID
|
57
73
|
|
58
74
|
Override = MetronomeSDK::Models::Override
|
59
75
|
|
76
|
+
OverrideTier = MetronomeSDK::Models::OverrideTier
|
77
|
+
|
78
|
+
OverwriteRate = MetronomeSDK::Models::OverwriteRate
|
79
|
+
|
80
|
+
PaymentGateConfig = MetronomeSDK::Models::PaymentGateConfig
|
81
|
+
|
82
|
+
PaymentGateConfigV2 = MetronomeSDK::Models::PaymentGateConfigV2
|
83
|
+
|
84
|
+
PrepaidBalanceThresholdConfiguration = MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration
|
85
|
+
|
86
|
+
PrepaidBalanceThresholdConfigurationV2 = MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2
|
87
|
+
|
60
88
|
PropertyFilter = MetronomeSDK::Models::PropertyFilter
|
61
89
|
|
62
90
|
ProService = MetronomeSDK::Models::ProService
|
63
91
|
|
64
92
|
Rate = MetronomeSDK::Models::Rate
|
65
93
|
|
94
|
+
RecurringCommitSubscriptionConfig = MetronomeSDK::Models::RecurringCommitSubscriptionConfig
|
95
|
+
|
66
96
|
ScheduledCharge = MetronomeSDK::Models::ScheduledCharge
|
67
97
|
|
68
98
|
ScheduleDuration = MetronomeSDK::Models::ScheduleDuration
|
69
99
|
|
70
100
|
SchedulePointInTime = MetronomeSDK::Models::SchedulePointInTime
|
71
101
|
|
102
|
+
SpendThresholdConfiguration = MetronomeSDK::Models::SpendThresholdConfiguration
|
103
|
+
|
104
|
+
SpendThresholdConfigurationV2 = MetronomeSDK::Models::SpendThresholdConfigurationV2
|
105
|
+
|
106
|
+
Subscription = MetronomeSDK::Models::Subscription
|
107
|
+
|
72
108
|
Tier = MetronomeSDK::Models::Tier
|
73
109
|
|
110
|
+
UpdateBaseThresholdCommit = MetronomeSDK::Models::UpdateBaseThresholdCommit
|
111
|
+
|
74
112
|
V1 = MetronomeSDK::Models::V1
|
75
113
|
|
76
114
|
V2 = MetronomeSDK::Models::V2
|
@@ -7,7 +7,51 @@ module MetronomeSDK
|
|
7
7
|
# Some parameter documentations has been truncated, see
|
8
8
|
# {MetronomeSDK::Models::V1::AlertCreateParams} for more details.
|
9
9
|
#
|
10
|
-
# Create a new alert
|
10
|
+
# Create a new alert to monitor customer spending, balances, and billing metrics
|
11
|
+
# in real-time. Metronome's alert system provides industry-leading speed with
|
12
|
+
# immediate evaluation capabilities, enabling you to proactively manage customer
|
13
|
+
# accounts and prevent revenue leakage.
|
14
|
+
#
|
15
|
+
# This endpoint creates configurable alerts that continuously monitor various
|
16
|
+
# billing thresholds including spend limits, credit balances, commitment
|
17
|
+
# utilization, and invoice totals. Alerts can be configured globally for all
|
18
|
+
# customers or targeted to specific customer accounts. Custom fields can be used
|
19
|
+
# on certain alert types to further target alerts to groups of customers.
|
20
|
+
#
|
21
|
+
# ### Use this endpoint to:
|
22
|
+
#
|
23
|
+
# - Proactively monitor customer spending patterns to prevent unexpected overages
|
24
|
+
# or credit exhaustion
|
25
|
+
# - Automate notifications when customers approach commitment limits or credit
|
26
|
+
# thresholds
|
27
|
+
# - Enable real-time intervention for accounts at risk of churn or payment issues
|
28
|
+
# - Scale billing operations by automating threshold-based workflows and
|
29
|
+
# notifications
|
30
|
+
#
|
31
|
+
# ### Key response fields:
|
32
|
+
#
|
33
|
+
# A successful response returns a CustomerAlert object containing:
|
34
|
+
#
|
35
|
+
# - The alert configuration with its unique ID and current status
|
36
|
+
# - The customer's evaluation status (ok, in_alarm, or evaluating)
|
37
|
+
# - Alert metadata including type, threshold values, and update timestamps
|
38
|
+
#
|
39
|
+
# ### Usage guidelines:
|
40
|
+
#
|
41
|
+
# - Immediate evaluation: Set `evaluate_on_create` : `true` (default) for instant
|
42
|
+
# evaluation against existing customers
|
43
|
+
# - Uniqueness constraints: Each alert must have a unique `uniqueness_key` within
|
44
|
+
# your organization. Use `release_uniqueness_key` : `true` when archiving to
|
45
|
+
# reuse keys
|
46
|
+
# - Alert type requirements: Different alert types require specific fields (e.g.,
|
47
|
+
# `billable_metric_id` for usage alerts, `credit_type_id` for credit-based
|
48
|
+
# alerts)
|
49
|
+
# - Webhook delivery: Alerts trigger webhook notifications for real-time
|
50
|
+
# integration with your systems. Configure webhook endpoints before creating
|
51
|
+
# alerts
|
52
|
+
# - Performance at scale: Metronome's event-driven architecture processes alert
|
53
|
+
# evaluations in real-time as usage events stream in, unlike competitors who
|
54
|
+
# rely on periodic polling or batch evaluation cycles
|
11
55
|
#
|
12
56
|
# @overload create(alert_type:, name:, threshold:, billable_metric_id: nil, credit_grant_type_filters: nil, credit_type_id: nil, custom_field_filters: nil, customer_id: nil, evaluate_on_create: nil, group_values: nil, invoice_types_filter: nil, plan_id: nil, uniqueness_key: nil, request_options: {})
|
13
57
|
#
|
@@ -53,7 +97,33 @@ module MetronomeSDK
|
|
53
97
|
)
|
54
98
|
end
|
55
99
|
|
56
|
-
#
|
100
|
+
# Permanently disable an alert and remove it from active monitoring across all
|
101
|
+
# customers. Archived alerts stop evaluating immediately and can optionally
|
102
|
+
# release their uniqueness key for reuse in future alert configurations.
|
103
|
+
#
|
104
|
+
# ### Use this endpoint to:
|
105
|
+
#
|
106
|
+
# - Decommission alerts that are no longer needed
|
107
|
+
# - Clean up test or deprecated alert configurations
|
108
|
+
# - Free up uniqueness keys for reuse with new alerts
|
109
|
+
# - Stop alert evaluations without losing historical configuration data
|
110
|
+
# - Disable outdated monitoring rules during pricing model transitions
|
111
|
+
#
|
112
|
+
# ### Key response fields:
|
113
|
+
#
|
114
|
+
# - data: Object containing the archived alert's ID
|
115
|
+
# - Alert evaluation stops immediately for all affected customers
|
116
|
+
# - Historical alert data and configurations remain accessible for audit purposes
|
117
|
+
#
|
118
|
+
# ### Usage guidelines:
|
119
|
+
#
|
120
|
+
# - Irreversible for evaluation: Archived alerts cannot be re-enabled; create a
|
121
|
+
# new alert to resume monitoring
|
122
|
+
# - Uniqueness key handling: Set `release_uniqueness_key` : `true` to reuse the
|
123
|
+
# key in future alerts
|
124
|
+
# - Immediate effect: Alert evaluation stops instantly across all customers
|
125
|
+
# - Historical preservation: Archive operation maintains alert history and
|
126
|
+
# configuration for compliance and auditing
|
57
127
|
#
|
58
128
|
# @overload archive(id:, release_uniqueness_key: nil, request_options: {})
|
59
129
|
#
|
@@ -7,10 +7,45 @@ module MetronomeSDK
|
|
7
7
|
# Some parameter documentations has been truncated, see
|
8
8
|
# {MetronomeSDK::Models::V1::AuditLogListParams} for more details.
|
9
9
|
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
10
|
+
# Get a comprehensive audit trail of all operations performed in your Metronome
|
11
|
+
# account, whether initiated through the API, web interface, or automated
|
12
|
+
# processes. This endpoint provides detailed logs of who did what and when,
|
13
|
+
# enabling compliance reporting, security monitoring, and operational
|
14
|
+
# troubleshooting across all interaction channels.
|
15
|
+
#
|
16
|
+
# ### Use this endpoint to:
|
17
|
+
#
|
18
|
+
# - Monitor all account activity for security and compliance purposes
|
19
|
+
# - Track configuration changes regardless of source (API, UI, or system)
|
20
|
+
# - Investigate issues by reviewing historical operations
|
21
|
+
#
|
22
|
+
# ### Key response fields:
|
23
|
+
#
|
24
|
+
# An array of AuditLog objects containing:
|
25
|
+
#
|
26
|
+
# - id: Unique identifier for the audit log entry
|
27
|
+
# - timestamp: When the action occurred (RFC 3339 format)
|
28
|
+
# - actor: Information about who performed the action
|
29
|
+
# - request: Details including request ID, IP address, and user agent
|
30
|
+
# - `resource_type`: The type of resource affected (e.g., customer, contract,
|
31
|
+
# invoice)
|
32
|
+
# - `resource_id`: The specific resource identifier
|
33
|
+
# - `action`: The operation performed
|
34
|
+
# - `next_page`: Cursor for continuous log retrieval
|
35
|
+
#
|
36
|
+
# ### Usage guidelines:
|
37
|
+
#
|
38
|
+
# - Continuous retrieval: The next_page token enables uninterrupted log
|
39
|
+
# streaming—save it between requests to ensure no logs are missed
|
40
|
+
# - Empty responses: An empty data array means no new logs yet; continue polling
|
41
|
+
# with the same next_page token
|
42
|
+
# - Date filtering:
|
43
|
+
# - `starting_on`: Earliest logs to return (inclusive)
|
44
|
+
# - `ending_before`: Latest logs to return (exclusive)
|
45
|
+
# - Cannot be used with `next_page`
|
46
|
+
# - Resource filtering: Must specify both `resource_type` and `resource_id`
|
47
|
+
# together
|
48
|
+
# - Sort order: Default is `date_asc`; use `date_desc` for newest first
|
14
49
|
#
|
15
50
|
# @overload list(ending_before: nil, limit: nil, next_page: nil, resource_id: nil, resource_type: nil, sort: nil, starting_on: nil, request_options: {})
|
16
51
|
#
|
@@ -7,7 +7,35 @@ module MetronomeSDK
|
|
7
7
|
# Some parameter documentations has been truncated, see
|
8
8
|
# {MetronomeSDK::Models::V1::BillableMetricCreateParams} for more details.
|
9
9
|
#
|
10
|
-
#
|
10
|
+
# Create billable metrics programmatically with this endpoint—an essential step in
|
11
|
+
# configuring your pricing and packaging in Metronome.
|
12
|
+
#
|
13
|
+
# A billable metric is a customizable query that filters and aggregates events
|
14
|
+
# from your event stream. These metrics are continuously tracked as usage data
|
15
|
+
# enters Metronome through the ingestion pipeline. The ingestion process
|
16
|
+
# transforms raw usage data into actionable pricing metrics, enabling accurate
|
17
|
+
# metering and billing for your products.
|
18
|
+
#
|
19
|
+
# ### Use this endpoint to:
|
20
|
+
#
|
21
|
+
# - Create individual or multiple billable metrics as part of a setup workflow.
|
22
|
+
# - Automate the entire pricing configuration process, from metric creation to
|
23
|
+
# customer contract setup.
|
24
|
+
# - Define metrics using either standard filtering/aggregation or a custom SQL
|
25
|
+
# query.
|
26
|
+
#
|
27
|
+
# ### Key response fields:
|
28
|
+
#
|
29
|
+
# - The ID of the billable metric that was created
|
30
|
+
# - The created billable metric will be available to be used in Products, usage
|
31
|
+
# endpoints, and alerts.
|
32
|
+
#
|
33
|
+
# ### Usage guidelines:
|
34
|
+
#
|
35
|
+
# - Metrics defined using standard filtering and aggregation are Streaming
|
36
|
+
# billable metrics, which have been optimized for ultra low latency and high
|
37
|
+
# throughput workflows.
|
38
|
+
# - Use SQL billable metrics if you require more flexible aggregation options.
|
11
39
|
#
|
12
40
|
# @overload create(name:, aggregation_key: nil, aggregation_type: nil, custom_fields: nil, event_type_filter: nil, group_keys: nil, property_filters: nil, sql: nil, request_options: {})
|
13
41
|
#
|
@@ -43,7 +71,17 @@ module MetronomeSDK
|
|
43
71
|
)
|
44
72
|
end
|
45
73
|
|
46
|
-
#
|
74
|
+
# Retrieves the complete configuration for a specific billable metric by its ID.
|
75
|
+
# Use this to review billable metric setup before associating it with products.
|
76
|
+
# Returns the metric's `name`, `event_type_filter`, `property_filters`,
|
77
|
+
# `aggregation_type`, `aggregation_key`, `group_keys`, `custom fields`, and
|
78
|
+
# `SQL query` (if it's a SQL billable metric).
|
79
|
+
#
|
80
|
+
# Important:
|
81
|
+
#
|
82
|
+
# - Archived billable metrics will include an `archived_at` timestamp; they no
|
83
|
+
# longer process new usage events but remain accessible for historical
|
84
|
+
# reference.
|
47
85
|
#
|
48
86
|
# @overload retrieve(billable_metric_id:, request_options: {})
|
49
87
|
#
|
@@ -67,7 +105,11 @@ module MetronomeSDK
|
|
67
105
|
)
|
68
106
|
end
|
69
107
|
|
70
|
-
#
|
108
|
+
# Retrieves all billable metrics with their complete configurations. Use this for
|
109
|
+
# programmatic discovery and management of billable metrics, such as associating
|
110
|
+
# metrics to products and auditing for orphaned or archived metrics. Important:
|
111
|
+
# Archived metrics are excluded by default; use `include_archived`=`true`
|
112
|
+
# parameter to include them.
|
71
113
|
#
|
72
114
|
# @overload list(include_archived: nil, limit: nil, next_page: nil, request_options: {})
|
73
115
|
#
|
@@ -94,7 +136,15 @@ module MetronomeSDK
|
|
94
136
|
)
|
95
137
|
end
|
96
138
|
|
97
|
-
#
|
139
|
+
# Use this endpoint to retire billable metrics that are no longer used. After a
|
140
|
+
# billable metric is archived, that billable metric can no longer be used in any
|
141
|
+
# new Products to define how that product should be metered. If you archive a
|
142
|
+
# billable metric that is already associated with a Product, the Product will
|
143
|
+
# continue to function as usual, metering based on the definition of the archived
|
144
|
+
# billable metric.
|
145
|
+
#
|
146
|
+
# Archived billable metrics will be returned on the `getBillableMetric` and
|
147
|
+
# `listBillableMetrics` endpoints with a populated `archived_at` field.
|
98
148
|
#
|
99
149
|
# @overload archive(id:, request_options: {})
|
100
150
|
#
|
@@ -8,7 +8,11 @@ module MetronomeSDK
|
|
8
8
|
# Some parameter documentations has been truncated, see
|
9
9
|
# {MetronomeSDK::Models::V1::Contracts::ProductCreateParams} for more details.
|
10
10
|
#
|
11
|
-
# Create a new product
|
11
|
+
# Create a new product object. Products in Metronome represent your company's
|
12
|
+
# individual product or service offerings. A Product can be thought of as the
|
13
|
+
# basic unit of a line item on the invoice. This is analogous to SKUs or items in
|
14
|
+
# an ERP system. Give the product a meaningful name as they will appear on
|
15
|
+
# customer invoices.
|
12
16
|
#
|
13
17
|
# @overload create(name:, type:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, custom_fields: nil, exclude_free_usage: nil, is_refundable: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, tags: nil, request_options: {})
|
14
18
|
#
|
@@ -22,7 +26,7 @@ module MetronomeSDK
|
|
22
26
|
#
|
23
27
|
# @param composite_tags [Array<String>] Required for COMPOSITE products
|
24
28
|
#
|
25
|
-
# @param custom_fields [Hash{Symbol=>String}]
|
29
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
26
30
|
#
|
27
31
|
# @param exclude_free_usage [Boolean] Beta feature only available for composite products. If true, products with $0 wi
|
28
32
|
#
|
@@ -58,7 +62,7 @@ module MetronomeSDK
|
|
58
62
|
)
|
59
63
|
end
|
60
64
|
|
61
|
-
#
|
65
|
+
# Retrieve a product by its ID, including all metadata and historical changes.
|
62
66
|
#
|
63
67
|
# @overload retrieve(id:, request_options: {})
|
64
68
|
#
|
@@ -82,7 +86,17 @@ module MetronomeSDK
|
|
82
86
|
# Some parameter documentations has been truncated, see
|
83
87
|
# {MetronomeSDK::Models::V1::Contracts::ProductUpdateParams} for more details.
|
84
88
|
#
|
85
|
-
#
|
89
|
+
# Updates a product's configuration while maintaining billing continuity for
|
90
|
+
# active customers. Use this endpoint to modify product names, metrics, pricing
|
91
|
+
# rules, and composite settings without disrupting ongoing billing cycles. Changes
|
92
|
+
# are scheduled using the starting_at timestamp, which must be on an hour
|
93
|
+
# boundary—set future dates to schedule updates ahead of time, or past dates for
|
94
|
+
# retroactive changes. Returns the updated product ID upon success.
|
95
|
+
#
|
96
|
+
# ### Usage guidance:
|
97
|
+
#
|
98
|
+
# - Product type cannot be changed after creation. For incorrect product types,
|
99
|
+
# create a new product and archive the original instead.
|
86
100
|
#
|
87
101
|
# @overload update(product_id:, starting_at:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, exclude_free_usage: nil, is_refundable: nil, name: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, tags: nil, request_options: {})
|
88
102
|
#
|
@@ -135,7 +149,9 @@ module MetronomeSDK
|
|
135
149
|
# Some parameter documentations has been truncated, see
|
136
150
|
# {MetronomeSDK::Models::V1::Contracts::ProductListParams} for more details.
|
137
151
|
#
|
138
|
-
#
|
152
|
+
# Get a paginated list of all products in your organization with their complete
|
153
|
+
# configuration, version history, and metadata. By default excludes archived
|
154
|
+
# products unless explicitly requested via the `archive_filter` parameter.
|
139
155
|
#
|
140
156
|
# @overload list(limit: nil, next_page: nil, archive_filter: nil, request_options: {})
|
141
157
|
#
|
@@ -164,7 +180,10 @@ module MetronomeSDK
|
|
164
180
|
)
|
165
181
|
end
|
166
182
|
|
167
|
-
# Archive a product
|
183
|
+
# Archive a product. Any current rate cards associated with this product will
|
184
|
+
# continue to function as normal. However, it will no longer be available as an
|
185
|
+
# option for newly created rates. Once you archive a product, you can still
|
186
|
+
# retrieve it in the UI and API, but you cannot unarchive it.
|
168
187
|
#
|
169
188
|
# @overload archive(product_id:, request_options: {})
|
170
189
|
#
|
@@ -6,7 +6,10 @@ module MetronomeSDK
|
|
6
6
|
class Contracts
|
7
7
|
class RateCards
|
8
8
|
class ProductOrders
|
9
|
-
#
|
9
|
+
# The ordering of products on a rate card determines the order in which the
|
10
|
+
# products will appear on customers' invoices. Use this endpoint to set the order
|
11
|
+
# of specific products on the rate card by moving them relative to their current
|
12
|
+
# location.
|
10
13
|
#
|
11
14
|
# @overload update(product_moves:, rate_card_id:, request_options: {})
|
12
15
|
#
|
@@ -30,7 +33,9 @@ module MetronomeSDK
|
|
30
33
|
)
|
31
34
|
end
|
32
35
|
|
33
|
-
#
|
36
|
+
# The ordering of products on a rate card determines the order in which the
|
37
|
+
# products will appear on customers' invoices. Use this endpoint to set the order
|
38
|
+
# of products on the rate card.
|
34
39
|
#
|
35
40
|
# @overload set(product_order:, rate_card_id:, request_options: {})
|
36
41
|
#
|
@@ -10,7 +10,15 @@ module MetronomeSDK
|
|
10
10
|
# {MetronomeSDK::Models::V1::Contracts::RateCards::RateListParams} for more
|
11
11
|
# details.
|
12
12
|
#
|
13
|
-
#
|
13
|
+
# Understand the rate schedule at a given timestamp, optionally filtering the list
|
14
|
+
# of rates returned based on properties such as `product_id` and
|
15
|
+
# `pricing_group_values`. For example, you may want to display the current price
|
16
|
+
# for a given product in your product experience - use this endpoint to fetch that
|
17
|
+
# information from its source of truth in Metronome.
|
18
|
+
#
|
19
|
+
# If you want to understand the rates for a specific customer's contract,
|
20
|
+
# inclusive of contract-level overrides, use the `getContractRateSchedule`
|
21
|
+
# endpoint.
|
14
22
|
#
|
15
23
|
# @overload list(at:, rate_card_id:, limit: nil, next_page: nil, selectors: nil, request_options: {})
|
16
24
|
#
|
@@ -63,7 +71,7 @@ module MetronomeSDK
|
|
63
71
|
#
|
64
72
|
# @param billing_frequency [Symbol, MetronomeSDK::Models::V1::Contracts::RateCards::RateAddParams::BillingFrequency] Optional. Frequency to bill subscriptions with. Required for subscription type p
|
65
73
|
#
|
66
|
-
# @param commit_rate [MetronomeSDK::Models::
|
74
|
+
# @param commit_rate [MetronomeSDK::Models::CommitRate] A distinct rate on the rate card. You can choose to use this rate rather than li
|
67
75
|
#
|
68
76
|
# @param credit_type_id [String] The Metronome ID of the credit type to associate with price, defaults to USD (ce
|
69
77
|
#
|
@@ -17,7 +17,39 @@ module MetronomeSDK
|
|
17
17
|
# Some parameter documentations has been truncated, see
|
18
18
|
# {MetronomeSDK::Models::V1::Contracts::RateCardCreateParams} for more details.
|
19
19
|
#
|
20
|
-
#
|
20
|
+
# In Metronome, the rate card is the central location for your pricing. Rate cards
|
21
|
+
# were built with new product launches and pricing changes in mind - you can
|
22
|
+
# update your products and pricing in one place, and that change will be
|
23
|
+
# automatically propagated across your customer cohorts. Most clients need only
|
24
|
+
# maintain one or a few rate cards within Metronome.
|
25
|
+
#
|
26
|
+
# ### Use this endpoint to:
|
27
|
+
#
|
28
|
+
# - Create a rate card with a name and description
|
29
|
+
# - Define the rate card's single underlying fiat currency, and any number of
|
30
|
+
# conversion rates between that fiat currency and custom pricing units. You can
|
31
|
+
# then add products and associated rates in the fiat currency or custom pricing
|
32
|
+
# unit for which you have defined a conversion rate.
|
33
|
+
# - Set aliases for the rate card. Aliases are human-readable names that you can
|
34
|
+
# use in the place of the id of the rate card when provisioning a customer's
|
35
|
+
# contract. By using an alias, you can easily create a contract and provision a
|
36
|
+
# customer by choosing the paygo rate card, without storing the rate card id in
|
37
|
+
# your internal systems. This is helpful when launching a new rate card for
|
38
|
+
# paygo customers, you can update the alias for paygo to be scheduled to be
|
39
|
+
# assigned to the new rate card without updating your code.
|
40
|
+
#
|
41
|
+
# ### Key response fields:
|
42
|
+
#
|
43
|
+
# - The ID of the rate card you just created
|
44
|
+
#
|
45
|
+
# ### Usage guidelines:
|
46
|
+
#
|
47
|
+
# - After creating a rate card, you can now use the addRate or addRates endpoints
|
48
|
+
# to add products and their prices to it
|
49
|
+
# - A rate card alias can only be used by one rate card at a time. If you create a
|
50
|
+
# contract with a rate card alias that is already in use by another rate card,
|
51
|
+
# the original rate card's alias schedule will be updated. The alias will
|
52
|
+
# reference the rate card to which it was most recently assigned.
|
21
53
|
#
|
22
54
|
# @overload create(name:, aliases: nil, credit_type_conversions: nil, custom_fields: nil, description: nil, fiat_credit_type_id: nil, request_options: {})
|
23
55
|
#
|
@@ -27,7 +59,7 @@ module MetronomeSDK
|
|
27
59
|
#
|
28
60
|
# @param credit_type_conversions [Array<MetronomeSDK::Models::V1::Contracts::RateCardCreateParams::CreditTypeConversion>] Required when using custom pricing units in rates.
|
29
61
|
#
|
30
|
-
# @param custom_fields [Hash{Symbol=>String}]
|
62
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
31
63
|
#
|
32
64
|
# @param description [String]
|
33
65
|
#
|
@@ -49,8 +81,9 @@ module MetronomeSDK
|
|
49
81
|
)
|
50
82
|
end
|
51
83
|
|
52
|
-
#
|
53
|
-
#
|
84
|
+
# Return details for a specific rate card including name, description, and
|
85
|
+
# aliases. This endpoint does not return rates - use the dedicated getRates or
|
86
|
+
# getRateSchedule endpoints to understand the rates on a rate card.
|
54
87
|
#
|
55
88
|
# @overload retrieve(id:, request_options: {})
|
56
89
|
#
|
@@ -74,7 +107,58 @@ module MetronomeSDK
|
|
74
107
|
# Some parameter documentations has been truncated, see
|
75
108
|
# {MetronomeSDK::Models::V1::Contracts::RateCardUpdateParams} for more details.
|
76
109
|
#
|
77
|
-
# Update
|
110
|
+
# Update the metadata properties of an existing rate card, including its name,
|
111
|
+
# description, and aliases. This endpoint is designed for managing rate card
|
112
|
+
# identity and reference aliases rather than modifying pricing rates.
|
113
|
+
#
|
114
|
+
# Modifies the descriptive properties and alias configuration of a rate card
|
115
|
+
# without affecting the underlying pricing rates or schedules. This allows you to
|
116
|
+
# update how a rate card is identified and referenced throughout your system.
|
117
|
+
#
|
118
|
+
# ### Use this endpoint to:
|
119
|
+
#
|
120
|
+
# - Rate card renaming: Update display names or descriptions for organizational
|
121
|
+
# clarity
|
122
|
+
# - Alias management: Add, modify, or schedule alias transitions for seamless rate
|
123
|
+
# card migrations
|
124
|
+
# - Documentation updates: Keep rate card descriptions current with business
|
125
|
+
# context
|
126
|
+
# - Self-serve provisioning setup: Configure aliases to enable code-free rate card
|
127
|
+
# transitions
|
128
|
+
#
|
129
|
+
# #### Active contract impact:
|
130
|
+
#
|
131
|
+
# - Alias changes: Already-created contracts continue using their originally
|
132
|
+
# assigned rate cards.
|
133
|
+
# - Other changes made using this endpoint will only impact the Metronome UI.
|
134
|
+
#
|
135
|
+
# #### Grandfathering existing PLG customer pricing:
|
136
|
+
#
|
137
|
+
# - Rate card aliases support scheduled transitions, enabling seamless rate card
|
138
|
+
# migrations for new customers, allowing existing customers to be grandfathered
|
139
|
+
# into their existing prices without code. Note that there are multiple
|
140
|
+
# mechanisms to support grandfathering in Metronome.
|
141
|
+
#
|
142
|
+
# #### How scheduled aliases work for PLG grandfathering:
|
143
|
+
#
|
144
|
+
# Initial setup:
|
145
|
+
#
|
146
|
+
# - Add alias to current rate card: Assign a stable alias (e.g.,
|
147
|
+
# "standard-pricing") to your active rate card
|
148
|
+
# - Reference alias during contract creation: Configure your self-serve workflow
|
149
|
+
# to create contracts using `rate_card_alias` instead of direct `rate_card_id`
|
150
|
+
# - Automatic resolution: New contracts referencing the alias automatically
|
151
|
+
# resolve to the rate card associated with the alias at the point in time of
|
152
|
+
# provisioning
|
153
|
+
#
|
154
|
+
# #### Grandfathering process:
|
155
|
+
#
|
156
|
+
# - Create new rate card: Build your new rate card with updated pricing structure
|
157
|
+
# - Schedule alias transition: Add the same alias to the new rate card with a
|
158
|
+
# `starting_at` timestamp
|
159
|
+
# - Automatic cutover: Starting at the scheduled time, new contracts created in
|
160
|
+
# your PLG workflow using that alias will automatically reference the new rate
|
161
|
+
# card
|
78
162
|
#
|
79
163
|
# @overload update(rate_card_id:, aliases: nil, description: nil, name: nil, request_options: {})
|
80
164
|
#
|
@@ -102,8 +186,9 @@ module MetronomeSDK
|
|
102
186
|
)
|
103
187
|
end
|
104
188
|
|
105
|
-
# List rate cards
|
106
|
-
# rate card
|
189
|
+
# List all rate cards. Returns rate card IDs, names, descriptions, aliases, and
|
190
|
+
# other details. To view the rates associated with a given rate card, use the
|
191
|
+
# getRates or getRateSchedule endpoints.
|
107
192
|
#
|
108
193
|
# @overload list(limit: nil, next_page: nil, body: nil, request_options: {})
|
109
194
|
#
|
@@ -131,7 +216,11 @@ module MetronomeSDK
|
|
131
216
|
)
|
132
217
|
end
|
133
218
|
|
134
|
-
#
|
219
|
+
# Permanently disable a rate card by archiving it, preventing use in new contracts
|
220
|
+
# while preserving existing contract pricing. Use this when retiring old pricing
|
221
|
+
# models, consolidating rate cards, or removing outdated pricing structures.
|
222
|
+
# Returns the archived rate card ID and stops the rate card from appearing in
|
223
|
+
# contract creation workflows.
|
135
224
|
#
|
136
225
|
# @overload archive(id:, request_options: {})
|
137
226
|
#
|
@@ -156,8 +245,18 @@ module MetronomeSDK
|
|
156
245
|
# {MetronomeSDK::Models::V1::Contracts::RateCardRetrieveRateScheduleParams} for
|
157
246
|
# more details.
|
158
247
|
#
|
159
|
-
#
|
160
|
-
#
|
248
|
+
# A rate card defines the prices that you charge for your products. Rate cards
|
249
|
+
# support scheduled changes over time, to allow you to easily roll out pricing
|
250
|
+
# changes and new product launches across your customer base. Use this endpoint to
|
251
|
+
# understand the rate schedule `starting_at` a given date, optionally filtering
|
252
|
+
# the list of rates returned based on product id or pricing group values. For
|
253
|
+
# example, you may want to display a schedule of upcoming price changes for a
|
254
|
+
# given product in your product experience - use this endpoint to fetch that
|
255
|
+
# information from its source of truth in Metronome.
|
256
|
+
#
|
257
|
+
# If you want to understand the rates for a specific customer's contract,
|
258
|
+
# inclusive of contract-level overrides, use the `getContractRateSchedule`
|
259
|
+
# endpoint.
|
161
260
|
#
|
162
261
|
# @overload retrieve_rate_schedule(rate_card_id:, starting_at:, limit: nil, next_page: nil, ending_before: nil, selectors: nil, request_options: {})
|
163
262
|
#
|