metronome-sdk 0.2.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 +61 -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/array_of.rb +1 -0
- data/lib/metronome_sdk/internal/type/base_model.rb +9 -14
- data/lib/metronome_sdk/internal/type/converter.rb +27 -0
- data/lib/metronome_sdk/internal/type/hash_of.rb +1 -0
- data/lib/metronome_sdk/internal/type/union.rb +20 -7
- 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/schedule_point_in_time.rb +14 -1
- 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 +110 -415
- data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb +7 -16
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +287 -1480
- 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 +9 -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 +20 -61
- 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 +68 -43
- 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 +38 -58
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +35 -49
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +469 -2302
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +358 -2414
- 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 +27 -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 +118 -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/internal/type/converter.rbi +58 -0
- data/rbi/metronome_sdk/internal/type/union.rbi +9 -2
- 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/schedule_point_in_time.rbi +17 -1
- 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 +120 -771
- data/rbi/metronome_sdk/models/v1/contract_create_historical_invoices_params.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1613 -4069
- 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 +11 -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 +19 -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 +76 -0
- 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 +66 -76
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +66 -76
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +3563 -7329
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1181 -6070
- 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 +27 -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 +128 -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/internal/type/converter.rbs +17 -0
- data/sig/metronome_sdk/internal/type/union.rbs +2 -2
- 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/schedule_point_in_time.rbs +7 -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 +62 -343
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +218 -1234
- 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/product_create_params.rbs +7 -0
- 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 +13 -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/customers/invoice.rbs +5 -0
- data/sig/metronome_sdk/models/v1/usage_list_response.rbs +33 -55
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +24 -43
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +24 -43
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +400 -1911
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +256 -2249
- 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/products.rbs +1 -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 +9 -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
@@ -16,7 +16,129 @@ module MetronomeSDK
|
|
16
16
|
# Some parameter documentations has been truncated, see
|
17
17
|
# {MetronomeSDK::Models::V1::ContractCreateParams} for more details.
|
18
18
|
#
|
19
|
-
#
|
19
|
+
# Contracts define a customer's products, pricing, discounts, access duration, and
|
20
|
+
# billing configuration. Contracts serve as the central billing agreement for both
|
21
|
+
# PLG and Enterprise customers, you can automatically customers access to your
|
22
|
+
# products and services directly from your product or CRM.
|
23
|
+
#
|
24
|
+
# ### Use this endpoint to:
|
25
|
+
#
|
26
|
+
# - PLG onboarding: Automatically provision new self-serve customers with
|
27
|
+
# contracts when they sign up.
|
28
|
+
# - Enterprise sales: Push negotiated contracts from Salesforce with custom
|
29
|
+
# pricing and commitments
|
30
|
+
# - Promotional pricing: Implement time-limited discounts and free trials through
|
31
|
+
# overrides
|
32
|
+
#
|
33
|
+
# ### Key components:
|
34
|
+
#
|
35
|
+
# #### Contract Term and Billing Schedule
|
36
|
+
#
|
37
|
+
# - Set contract duration using `starting_at` and `ending_before` fields. PLG
|
38
|
+
# contracts typically use perpetual agreements (no end date), while Enterprise
|
39
|
+
# contracts have fixed end dates which can be edited over time in the case of
|
40
|
+
# co-term upsells.
|
41
|
+
#
|
42
|
+
# #### Rate Card
|
43
|
+
#
|
44
|
+
# If you are offering usage based pricing, you can set a rate card for the
|
45
|
+
# contract to reference through `rate_card_id` or `rate_card_alias`. The rate card
|
46
|
+
# is a store of all of your usage based products and their centralized pricing.
|
47
|
+
# Any new products or price changes on the rate card can be set to automatically
|
48
|
+
# propagate to all associated contracts - this ensures consistent pricing and
|
49
|
+
# product launches flow to contracts without manual updates and migrations. The
|
50
|
+
# `usage_statement_schedule` determines the cadence on which Metronome will
|
51
|
+
# finalize a usage invoice for the customer. This defaults to monthly on the 1st,
|
52
|
+
# with options for custom dates, quarterly, or annual cadences. Note: Most usage
|
53
|
+
# based billing companies align usage statements to be evaluated aligned to the
|
54
|
+
# first of the month. Read more about
|
55
|
+
# [Rate Cards](https://docs.metronome.com/pricing-packaging/create-manage-rate-cards/).
|
56
|
+
#
|
57
|
+
# #### Overrides and discounts
|
58
|
+
#
|
59
|
+
# Customize pricing on the contract through time-bounded overrides that can target
|
60
|
+
# specific products, product families, or complex usage scenarios. Overrides
|
61
|
+
# enable two key capabilities:
|
62
|
+
#
|
63
|
+
# - Discounts: Apply percentage discounts, fixed rate reductions, or
|
64
|
+
# quantity-based pricing tiers
|
65
|
+
# - Entitlements: Provide special pricing or access to specific products for
|
66
|
+
# negotiated deals
|
67
|
+
#
|
68
|
+
# Read more about
|
69
|
+
# [Contract Overrides](https://docs.metronome.com/manage-product-access/add-contract-override/).
|
70
|
+
#
|
71
|
+
# #### Commits and Credits
|
72
|
+
#
|
73
|
+
# Using commits, configure prepaid or postpaid spending commitments where
|
74
|
+
# customers promise to spend a certain amount over the contract period paid in
|
75
|
+
# advance or in arrears. Use credits to provide free spending allowances. Under
|
76
|
+
# the hood these are the same mechanisms, however, credits are typically offered
|
77
|
+
# for free (SLA or promotional) or as a part of an allotment associated with a
|
78
|
+
# Subscription.
|
79
|
+
#
|
80
|
+
# In Metronome, you can set commits and credits to only be applicable for a subset
|
81
|
+
# of usage. Use `applicable_product_ids` or `applicable_product_tags` to create
|
82
|
+
# product or product-family specific commits or credits, or you can build complex
|
83
|
+
# boolean logic specifiers to target usage based on pricing and presentation group
|
84
|
+
# values using `override_specifiers`.
|
85
|
+
#
|
86
|
+
# These objects can also also be configured to have a recurrence schedule to
|
87
|
+
# easily model customer packaging which includes recurring monthly or quarterly
|
88
|
+
# allotments.
|
89
|
+
#
|
90
|
+
# Commits support rollover settings (`rollover_fraction`) to transfer unused
|
91
|
+
# balances between contract periods, either entirely or as a percentage.
|
92
|
+
#
|
93
|
+
# Read more about
|
94
|
+
# [Credits and Commits](https://docs.metronome.com/pricing-packaging/apply-credits-commits/).
|
95
|
+
#
|
96
|
+
# #### Subscriptions
|
97
|
+
#
|
98
|
+
# You can add a fixed recurring charge to a contract, like monthly licenses or
|
99
|
+
# seat-based fees, using the subscription charge. Subscription charges are defined
|
100
|
+
# on your rate card and you can select which subscription is applicable to add to
|
101
|
+
# each contract. When you add a subscription to a contract you need to:
|
102
|
+
#
|
103
|
+
# - Define whether the subscription is paid for in-advance or in-arrears
|
104
|
+
# (`collection_schedule`)
|
105
|
+
# - Define the proration behavior (`proration`)
|
106
|
+
# - Specify an initial quantity (`initial_quantity`)
|
107
|
+
# - Define which subscription rate on the rate card should be used
|
108
|
+
# (`subscription_rate`)
|
109
|
+
#
|
110
|
+
# Read more about
|
111
|
+
# [Subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/).
|
112
|
+
#
|
113
|
+
# #### Scheduled Charges
|
114
|
+
#
|
115
|
+
# Set up one-time, recurring, or entirely custom charges that occur on specific
|
116
|
+
# dates, separate from usage-based billing or commitments. These can be used to
|
117
|
+
# model non-recurring platform charges or professional services.
|
118
|
+
#
|
119
|
+
# #### Threshold Billing
|
120
|
+
#
|
121
|
+
# Metronome allows you to configure automatic billing triggers when customers
|
122
|
+
# reach spending thresholds to prevent fraud and manage risk. You can use
|
123
|
+
# `spend_threshold_configuration` to trigger an invoice to cover current charges
|
124
|
+
# whenever the threshold is reached or you can ensure the customer maintains a
|
125
|
+
# minimum prepaid balance using the `prepaid_balance_configuration`.
|
126
|
+
#
|
127
|
+
# Read more about
|
128
|
+
# [Spend Threshold](https://docs.metronome.com/manage-product-access/spend-thresholds/)
|
129
|
+
# and
|
130
|
+
# [Prepaid Balance Thresholds](https://docs.metronome.com/manage-product-access/prepaid-balance-thresholds/).
|
131
|
+
#
|
132
|
+
# ### Usage guidelines:
|
133
|
+
#
|
134
|
+
# - You can always
|
135
|
+
# [Edit Contracts](https://docs.metronome.com/manage-product-access/edit-contract/)
|
136
|
+
# after it has been created, using the `editContract` endpoint. Metronome keeps
|
137
|
+
# track of all edits, both in the audit log and over the `getEditHistory`
|
138
|
+
# endpoint.
|
139
|
+
# - Customers in Metronome can have multiple concurrent contracts at one time. Use
|
140
|
+
# `usage_filters` to route the correct usage to each contract.
|
141
|
+
# [Read more about usage filters](https://docs.metronome.com/manage-product-access/provision-customer/#create-a-usage-filter).
|
20
142
|
#
|
21
143
|
# @overload create(customer_id:, starting_at:, billing_provider_configuration: nil, commits: nil, credits: nil, custom_fields: nil, discounts: nil, ending_before: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, overrides: nil, prepaid_balance_threshold_configuration: nil, priority: nil, professional_services: nil, rate_card_alias: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, reseller_royalties: nil, salesforce_opportunity_id: nil, scheduled_charges: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, subscriptions: nil, total_contract_value: nil, transition: nil, uniqueness_key: nil, usage_filter: nil, usage_statement_schedule: nil, request_options: {})
|
22
144
|
#
|
@@ -30,7 +152,7 @@ module MetronomeSDK
|
|
30
152
|
#
|
31
153
|
# @param credits [Array<MetronomeSDK::Models::V1::ContractCreateParams::Credit>]
|
32
154
|
#
|
33
|
-
# @param custom_fields [Hash{Symbol=>String}]
|
155
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
34
156
|
#
|
35
157
|
# @param discounts [Array<MetronomeSDK::Models::V1::ContractCreateParams::Discount>] This field's availability is dependent on your client's configuration.
|
36
158
|
#
|
@@ -48,7 +170,7 @@ module MetronomeSDK
|
|
48
170
|
#
|
49
171
|
# @param overrides [Array<MetronomeSDK::Models::V1::ContractCreateParams::Override>]
|
50
172
|
#
|
51
|
-
# @param prepaid_balance_threshold_configuration [MetronomeSDK::Models::
|
173
|
+
# @param prepaid_balance_threshold_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration]
|
52
174
|
#
|
53
175
|
# @param priority [Float] Priority of the contract.
|
54
176
|
#
|
@@ -70,7 +192,7 @@ module MetronomeSDK
|
|
70
192
|
#
|
71
193
|
# @param scheduled_charges_on_usage_invoices [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::ScheduledChargesOnUsageInvoices] Determines which scheduled and commit charges to consolidate onto the Contract's
|
72
194
|
#
|
73
|
-
# @param spend_threshold_configuration [MetronomeSDK::Models::
|
195
|
+
# @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfiguration]
|
74
196
|
#
|
75
197
|
# @param subscriptions [Array<MetronomeSDK::Models::V1::ContractCreateParams::Subscription>] Optional list of [subscriptions](https://docs.metronome.com/manage-product-acces
|
76
198
|
#
|
@@ -135,8 +257,13 @@ module MetronomeSDK
|
|
135
257
|
# Some parameter documentations has been truncated, see
|
136
258
|
# {MetronomeSDK::Models::V1::ContractListParams} for more details.
|
137
259
|
#
|
138
|
-
#
|
139
|
-
#
|
260
|
+
# Retrieves all contracts for a specific customer, including pricing, terms,
|
261
|
+
# credits, and commitments. Use this to view a customer's contract history and
|
262
|
+
# current agreements for billing management. Returns contract details with
|
263
|
+
# optional ledgers and balance information.
|
264
|
+
#
|
265
|
+
# ⚠️ Note: This is the legacy v1 endpoint - new integrations should use the v2
|
266
|
+
# endpoint for enhanced features.
|
140
267
|
#
|
141
268
|
# @overload list(customer_id:, covering_date: nil, include_archived: nil, include_balance: nil, include_ledgers: nil, starting_at: nil, request_options: {})
|
142
269
|
#
|
@@ -172,7 +299,24 @@ module MetronomeSDK
|
|
172
299
|
# {MetronomeSDK::Models::V1::ContractAddManualBalanceEntryParams} for more
|
173
300
|
# details.
|
174
301
|
#
|
175
|
-
#
|
302
|
+
# Manually adjust the available balance on a commit or credit. This entry is
|
303
|
+
# appended to the commit ledger as a new event. Optionally include a description
|
304
|
+
# that provides the reasoning for the entry.
|
305
|
+
#
|
306
|
+
# ### Use this endpoint to:
|
307
|
+
#
|
308
|
+
# - Address incorrect usage burn-down caused by malformed usage or invalid config
|
309
|
+
# - Decrease available balance to account for outages where usage may have not
|
310
|
+
# been tracked or sent to Metronome
|
311
|
+
# - Issue credits to customers in the form of increased balance on existing commit
|
312
|
+
# or credit
|
313
|
+
#
|
314
|
+
# ### Usage guidelines:
|
315
|
+
#
|
316
|
+
# Manual ledger entries can be extremely useful for resolving discrepancies in
|
317
|
+
# Metronome. However, most corrections to inaccurate billings can be modified
|
318
|
+
# upstream of the commit, whether that is via contract editing, rate editing, or
|
319
|
+
# other actions that cause an invoice to be recalculated.
|
176
320
|
#
|
177
321
|
# @overload add_manual_balance_entry(id:, amount:, customer_id:, reason:, segment_id:, contract_id: nil, timestamp: nil, request_options: {})
|
178
322
|
#
|
@@ -207,7 +351,7 @@ module MetronomeSDK
|
|
207
351
|
end
|
208
352
|
|
209
353
|
# Amendments will be replaced by Contract editing. New clients should implement
|
210
|
-
# using the editContract endpoint. Read more about the migration to contract
|
354
|
+
# using the `editContract` endpoint. Read more about the migration to contract
|
211
355
|
# editing [here](https://docs.metronome.com/migrate-amendments-to-edits/) and
|
212
356
|
# reach out to your Metronome representative for more details. Once contract
|
213
357
|
# editing is enabled, access to this endpoint will be removed.
|
@@ -224,7 +368,7 @@ module MetronomeSDK
|
|
224
368
|
#
|
225
369
|
# @param credits [Array<MetronomeSDK::Models::V1::ContractAmendParams::Credit>]
|
226
370
|
#
|
227
|
-
# @param custom_fields [Hash{Symbol=>String}]
|
371
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
228
372
|
#
|
229
373
|
# @param discounts [Array<MetronomeSDK::Models::V1::ContractAmendParams::Discount>] This field's availability is dependent on your client's configuration.
|
230
374
|
#
|
@@ -261,7 +405,26 @@ module MetronomeSDK
|
|
261
405
|
# Some parameter documentations has been truncated, see
|
262
406
|
# {MetronomeSDK::Models::V1::ContractArchiveParams} for more details.
|
263
407
|
#
|
264
|
-
#
|
408
|
+
# Permanently end and archive a contract along with all its terms. Any draft
|
409
|
+
# invoices will be canceled, and all upcoming scheduled invoices will be
|
410
|
+
# voided–also all finalized invoices can optionally be voided. Use this in the
|
411
|
+
# event a contract was incorrectly created and needed to be removed from a
|
412
|
+
# customer.
|
413
|
+
#
|
414
|
+
# #### Impact on commits and credits:
|
415
|
+
#
|
416
|
+
# When archiving a contract, all associated commits and credits are also archived.
|
417
|
+
# For prepaid commits with active segments, Metronome automatically generates
|
418
|
+
# expiration ledger entries to close out any remaining balances, ensuring accurate
|
419
|
+
# accounting of unused prepaid amounts. These ledger entries will appear in the
|
420
|
+
# commit's transaction history with type `PREPAID_COMMIT_EXPIRATION`.
|
421
|
+
#
|
422
|
+
# #### Archived contract visibility:
|
423
|
+
#
|
424
|
+
# Archived contracts remain accessible for historical reporting and audit
|
425
|
+
# purposes. They can be retrieved using the `ListContracts` endpoint by setting
|
426
|
+
# the `include_archived` parameter to `true` or in the Metronome UI when the "Show
|
427
|
+
# archived" option is enabled.
|
265
428
|
#
|
266
429
|
# @overload archive(contract_id:, customer_id:, void_invoices:, request_options: {})
|
267
430
|
#
|
@@ -287,7 +450,11 @@ module MetronomeSDK
|
|
287
450
|
)
|
288
451
|
end
|
289
452
|
|
290
|
-
#
|
453
|
+
# Create historical usage invoices for past billing periods on specific contracts.
|
454
|
+
# Use this endpoint to generate retroactive invoices with custom usage line items,
|
455
|
+
# quantities, and date ranges. Supports preview mode to validate invoice data
|
456
|
+
# before creation. Ideal for billing migrations or correcting past billing
|
457
|
+
# periods.
|
291
458
|
#
|
292
459
|
# @overload create_historical_invoices(invoices:, preview:, request_options: {})
|
293
460
|
#
|
@@ -312,7 +479,40 @@ module MetronomeSDK
|
|
312
479
|
# Some parameter documentations has been truncated, see
|
313
480
|
# {MetronomeSDK::Models::V1::ContractListBalancesParams} for more details.
|
314
481
|
#
|
315
|
-
#
|
482
|
+
# Retrieve a comprehensive view of all available balances (commits and credits)
|
483
|
+
# for a customer. This endpoint provides real-time visibility into prepaid funds,
|
484
|
+
# postpaid commitments, promotional credits, and other balance types that can
|
485
|
+
# offset usage charges, helping you build transparent billing experiences.
|
486
|
+
#
|
487
|
+
# ### Use this endpoint to:
|
488
|
+
#
|
489
|
+
# - Display current available balances in customer dashboards
|
490
|
+
# - Verify available funds before approving high-usage operations
|
491
|
+
# - Generate balance reports for finance teams
|
492
|
+
# - Filter balances by contract or date ranges
|
493
|
+
#
|
494
|
+
# ### Key response fields:
|
495
|
+
#
|
496
|
+
# An array of balance objects (all credits and commits) containing:
|
497
|
+
#
|
498
|
+
# - Balance details: Current available amount for each commit or credit
|
499
|
+
# - Metadata: Product associations, priorities, applicable date ranges
|
500
|
+
# - Optional ledger entries: Detailed transaction history (if
|
501
|
+
# `include_ledgers=true`)
|
502
|
+
# - Balance calculations: Including pending transactions and future-dated entries
|
503
|
+
# - Custom fields: Any additional metadata attached to balances
|
504
|
+
#
|
505
|
+
# ### Usage guidelines:
|
506
|
+
#
|
507
|
+
# - Date filtering: Use `effective_before` to include only balances with access
|
508
|
+
# before a specific date (exclusive)
|
509
|
+
# - Set `include_balance=true` for calculated balance amounts on each commit or
|
510
|
+
# credit
|
511
|
+
# - Set `include_ledgers=true` for full transaction history
|
512
|
+
# - Set `include_contract_balances = true` to see contract level balances
|
513
|
+
# - Balance logic: Reflects currently accessible amounts, excluding expired/future
|
514
|
+
# segments
|
515
|
+
# - Manual adjustments: Includes all manual ledger entries, even future-dated ones
|
316
516
|
#
|
317
517
|
# @overload list_balances(customer_id:, id: nil, covering_date: nil, effective_before: nil, include_archived: nil, include_balance: nil, include_contract_balances: nil, include_ledgers: nil, limit: nil, next_page: nil, starting_at: nil, request_options: {})
|
318
518
|
#
|
@@ -340,7 +540,7 @@ module MetronomeSDK
|
|
340
540
|
#
|
341
541
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
342
542
|
#
|
343
|
-
# @return [MetronomeSDK::Models::
|
543
|
+
# @return [MetronomeSDK::Internal::BodyCursorPage<MetronomeSDK::Models::Commit, MetronomeSDK::Models::Credit>]
|
344
544
|
#
|
345
545
|
# @see MetronomeSDK::Models::V1::ContractListBalancesParams
|
346
546
|
def list_balances(params)
|
@@ -349,6 +549,7 @@ module MetronomeSDK
|
|
349
549
|
method: :post,
|
350
550
|
path: "v1/contracts/customerBalances/list",
|
351
551
|
body: parsed,
|
552
|
+
page: MetronomeSDK::Internal::BodyCursorPage,
|
352
553
|
model: MetronomeSDK::Models::V1::ContractListBalancesResponse,
|
353
554
|
options: options
|
354
555
|
)
|
@@ -357,7 +558,13 @@ module MetronomeSDK
|
|
357
558
|
# Some parameter documentations has been truncated, see
|
358
559
|
# {MetronomeSDK::Models::V1::ContractRetrieveRateScheduleParams} for more details.
|
359
560
|
#
|
360
|
-
#
|
561
|
+
# For a specific customer and contract, get the rates at a specific point in time.
|
562
|
+
# This endpoint takes the contract's rate card into consideration, including
|
563
|
+
# scheduled changes. It also takes into account overrides on the contract.
|
564
|
+
#
|
565
|
+
# For example, if you want to show your customer a summary of the prices they are
|
566
|
+
# paying, inclusive of any negotiated discounts or promotions, use this endpoint.
|
567
|
+
# This endpoint only returns rates that are entitled.
|
361
568
|
#
|
362
569
|
# @overload retrieve_rate_schedule(contract_id:, customer_id:, limit: nil, next_page: nil, at: nil, selectors: nil, request_options: {})
|
363
570
|
#
|
@@ -391,8 +598,16 @@ module MetronomeSDK
|
|
391
598
|
)
|
392
599
|
end
|
393
600
|
|
394
|
-
#
|
395
|
-
#
|
601
|
+
# Get the history of subscription quantities and prices over time for a given
|
602
|
+
# `subscription_id`. This endpoint can be used to power an in-product experience
|
603
|
+
# where you show a customer their historical changes to seat count. Future changes
|
604
|
+
# are not included in this endpoint - use the `getContract` endpoint to view the
|
605
|
+
# future scheduled changes to a subscription's quantity.
|
606
|
+
#
|
607
|
+
# Subscriptions are used to model fixed recurring fees as well as seat-based
|
608
|
+
# recurring fees. To model changes to the number of seats in Metronome, you can
|
609
|
+
# increment or decrement the quantity on a subscription at any point in the past
|
610
|
+
# or future.
|
396
611
|
#
|
397
612
|
# @overload retrieve_subscription_quantity_history(contract_id:, customer_id:, subscription_id:, request_options: {})
|
398
613
|
#
|
@@ -449,7 +664,24 @@ module MetronomeSDK
|
|
449
664
|
)
|
450
665
|
end
|
451
666
|
|
452
|
-
#
|
667
|
+
# If a customer has multiple contracts with overlapping rates, the usage filter
|
668
|
+
# routes usage to the appropriate contract based on a predefined group key.
|
669
|
+
#
|
670
|
+
# As an example, imagine you have a customer associated with two projects. Each
|
671
|
+
# project is associated with its own contract. You can create a usage filter with
|
672
|
+
# group key `project_id` on each contract, and route usage for `project_1` to the
|
673
|
+
# first contract and `project_2` to the second contract.
|
674
|
+
#
|
675
|
+
# ### Use this endpoint to:
|
676
|
+
#
|
677
|
+
# - Support enterprise contracting scenarios where multiple contracts are
|
678
|
+
# associated to the same customer with the same rates.
|
679
|
+
# - Update the usage filter associated with the contract over time.
|
680
|
+
#
|
681
|
+
# ### Usage guidelines:
|
682
|
+
#
|
683
|
+
# To use usage filters, the `group_key` must be defined on the billable metrics
|
684
|
+
# underlying the rate card on the contracts.
|
453
685
|
#
|
454
686
|
# @overload set_usage_filter(contract_id:, customer_id:, group_key:, group_values:, starting_at:, request_options: {})
|
455
687
|
#
|
@@ -477,7 +709,11 @@ module MetronomeSDK
|
|
477
709
|
# Some parameter documentations has been truncated, see
|
478
710
|
# {MetronomeSDK::Models::V1::ContractUpdateEndDateParams} for more details.
|
479
711
|
#
|
480
|
-
# Update
|
712
|
+
# Update or and an end date to a contract. Ending a contract early will impact
|
713
|
+
# draft usage statements, truncate any terms, and remove upcoming scheduled
|
714
|
+
# invoices. Moving the date into the future will only extend the contract length.
|
715
|
+
# Terms and scheduled invoices are not extended. Use this if a contract's end date
|
716
|
+
# has changed or if a perpetual contract ends.
|
481
717
|
#
|
482
718
|
# @overload update_end_date(contract_id:, customer_id:, allow_ending_before_finalized_invoice: nil, ending_before: nil, request_options: {})
|
483
719
|
#
|
@@ -147,7 +147,7 @@ module MetronomeSDK
|
|
147
147
|
#
|
148
148
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
149
149
|
#
|
150
|
-
# @return [MetronomeSDK::Models::V1::CreditGrantListEntriesResponse]
|
150
|
+
# @return [MetronomeSDK::Internal::CursorPageWithoutLimit<MetronomeSDK::Models::V1::CreditGrantListEntriesResponse>]
|
151
151
|
#
|
152
152
|
# @see MetronomeSDK::Models::V1::CreditGrantListEntriesParams
|
153
153
|
def list_entries(params = {})
|
@@ -158,6 +158,7 @@ module MetronomeSDK
|
|
158
158
|
path: "v1/credits/listEntries",
|
159
159
|
query: parsed.slice(*query_params),
|
160
160
|
body: parsed.except(*query_params),
|
161
|
+
page: MetronomeSDK::Internal::CursorPageWithoutLimit,
|
161
162
|
model: MetronomeSDK::Models::V1::CreditGrantListEntriesResponse,
|
162
163
|
options: options
|
163
164
|
)
|
@@ -4,8 +4,35 @@ module MetronomeSDK
|
|
4
4
|
module Resources
|
5
5
|
class V1
|
6
6
|
class CustomFields
|
7
|
-
#
|
8
|
-
#
|
7
|
+
# Creates a new custom field key for a given entity (e.g. billable metric,
|
8
|
+
# contract, alert).
|
9
|
+
#
|
10
|
+
# Custom fields are properties that you can add to Metronome objects to store
|
11
|
+
# metadata like foreign keys or other descriptors. This metadata can get
|
12
|
+
# transferred to or accessed by other systems to contextualize Metronome data and
|
13
|
+
# power business processes. For example, to service workflows like revenue
|
14
|
+
# recognition, reconciliation, and invoicing, custom fields help Metronome know
|
15
|
+
# the relationship between entities in the platform and third-party systems.
|
16
|
+
#
|
17
|
+
# ### Use this endpoint to:
|
18
|
+
#
|
19
|
+
# - Create a new custom field key for Customer objects in Metronome. You can then
|
20
|
+
# use the Set Custom Field Values endpoint to set the value of this key for a
|
21
|
+
# specific customer.
|
22
|
+
# - Specify whether the key should enforce uniqueness. If the key is set to
|
23
|
+
# enforce uniqueness and you attempt to set a custom field value for the key
|
24
|
+
# that already exists, it will fail.
|
25
|
+
#
|
26
|
+
# ### Usage guidelines:
|
27
|
+
#
|
28
|
+
# - Custom fields set on commits, credits, and contracts can be used to scope
|
29
|
+
# alert evaluation. For example, you can create a spend threshold alert that
|
30
|
+
# only considers spend associated with contracts with custom field key
|
31
|
+
# `contract_type` and value `paygo`
|
32
|
+
# - Custom fields set on products can be used in the Stripe integration to set
|
33
|
+
# metadata on invoices.
|
34
|
+
# - Custom fields for customers, contracts, invoices, products, commits, scheduled
|
35
|
+
# charges, and subscriptions are passed down to the invoice.
|
9
36
|
#
|
10
37
|
# @overload add_key(enforce_uniqueness:, entity:, key:, request_options: {})
|
11
38
|
#
|
@@ -28,7 +55,10 @@ module MetronomeSDK
|
|
28
55
|
)
|
29
56
|
end
|
30
57
|
|
31
|
-
#
|
58
|
+
# Remove specific custom field values from a Metronome entity instance by
|
59
|
+
# specifying the field keys to delete. Use this endpoint to clean up unwanted
|
60
|
+
# custom field data while preserving other fields on the same entity. Requires the
|
61
|
+
# entity type, entity ID, and array of keys to remove.
|
32
62
|
#
|
33
63
|
# @overload delete_values(entity:, entity_id:, keys:, request_options: {})
|
34
64
|
#
|
@@ -51,7 +81,10 @@ module MetronomeSDK
|
|
51
81
|
)
|
52
82
|
end
|
53
83
|
|
54
|
-
#
|
84
|
+
# Retrieve all your active custom field keys, with optional filtering by entity
|
85
|
+
# type (customer, contract, product, etc.). Use this endpoint to discover what
|
86
|
+
# custom field keys are available before setting values on entities or to audit
|
87
|
+
# your custom field configuration across different entity types.
|
55
88
|
#
|
56
89
|
# @overload list_keys(next_page: nil, entities: nil, request_options: {})
|
57
90
|
#
|
@@ -61,7 +94,7 @@ module MetronomeSDK
|
|
61
94
|
#
|
62
95
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
63
96
|
#
|
64
|
-
# @return [MetronomeSDK::Models::V1::CustomFieldListKeysResponse]
|
97
|
+
# @return [MetronomeSDK::Internal::CursorPageWithoutLimit<MetronomeSDK::Models::V1::CustomFieldListKeysResponse>]
|
65
98
|
#
|
66
99
|
# @see MetronomeSDK::Models::V1::CustomFieldListKeysParams
|
67
100
|
def list_keys(params = {})
|
@@ -72,12 +105,16 @@ module MetronomeSDK
|
|
72
105
|
path: "v1/customFields/listKeys",
|
73
106
|
query: parsed.slice(*query_params),
|
74
107
|
body: parsed.except(*query_params),
|
108
|
+
page: MetronomeSDK::Internal::CursorPageWithoutLimit,
|
75
109
|
model: MetronomeSDK::Models::V1::CustomFieldListKeysResponse,
|
76
110
|
options: options
|
77
111
|
)
|
78
112
|
end
|
79
113
|
|
80
|
-
#
|
114
|
+
# Removes a custom field key from the allowlist for a specific entity type,
|
115
|
+
# preventing future use of that key across all instances of the entity. Existing
|
116
|
+
# values for this key on entity instances will no longer be accessible once the
|
117
|
+
# key is removed.
|
81
118
|
#
|
82
119
|
# @overload remove_key(entity:, key:, request_options: {})
|
83
120
|
#
|
@@ -99,19 +136,19 @@ module MetronomeSDK
|
|
99
136
|
)
|
100
137
|
end
|
101
138
|
|
102
|
-
# Sets
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
# transactional and will update all key/value pairs or no key/value pairs. Partial
|
107
|
-
# updates are not supported. There is a 200 character limit on custom field
|
108
|
-
# values.
|
139
|
+
# Sets custom field values on a specific Metronome entity instance. Overwrites
|
140
|
+
# existing values for matching keys while preserving other fields. All updates are
|
141
|
+
# transactional—either all values are set or none are. Custom field values are
|
142
|
+
# limited to 200 characters each.
|
109
143
|
#
|
110
144
|
# @overload set_values(custom_fields:, entity:, entity_id:, request_options: {})
|
111
145
|
#
|
112
|
-
# @param custom_fields [Hash{Symbol=>String}]
|
146
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
147
|
+
#
|
113
148
|
# @param entity [Symbol, MetronomeSDK::Models::V1::CustomFieldSetValuesParams::Entity]
|
149
|
+
#
|
114
150
|
# @param entity_id [String]
|
151
|
+
#
|
115
152
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
116
153
|
#
|
117
154
|
# @return [nil]
|