metronome-sdk 3.10.0 → 3.12.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 +50 -0
- data/README.md +1 -10
- data/lib/metronome_sdk/internal/body_cursor_page_cursor_field.rb +86 -0
- data/lib/metronome_sdk/models/contract_v2.rb +111 -7
- data/lib/metronome_sdk/models/contract_without_amendments.rb +86 -6
- data/lib/metronome_sdk/models/credit.rb +13 -1
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +70 -1
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +70 -1
- data/lib/metronome_sdk/models/schedule_duration.rb +28 -1
- data/lib/metronome_sdk/models/subscription.rb +27 -1
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +43 -5
- data/lib/metronome_sdk/models/v1/billable_metric_update_params.rb +31 -0
- data/lib/metronome_sdk/models/v1/billable_metric_update_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rb +11 -1
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +62 -2
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +128 -18
- data/lib/metronome_sdk/models/v1/contract_create_response.rb +86 -6
- data/lib/metronome_sdk/models/v1/contract_get_net_balance_params.rb +22 -1
- data/lib/metronome_sdk/models/v1/contract_get_net_balance_response.rb +4 -3
- data/lib/metronome_sdk/models/v1/contract_list_balances_params.rb +22 -1
- data/lib/metronome_sdk/models/v1/contract_list_params.rb +18 -2
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_response.rb +96 -4
- data/lib/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_response.rb +16 -1
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/product_list_item_state.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/product_update_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_list_params.rb +82 -0
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_list_response.rb +69 -0
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_retrieve_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_update_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/customer_create_params.rb +4 -14
- data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_params.rb +2 -4
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +4 -3
- data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +2 -6
- data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/customers/commit_list_params.rb +22 -1
- data/lib/metronome_sdk/models/v1/customers/credit_create_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +46 -5
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +52 -13
- data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/package_create_params.rb +129 -18
- data/lib/metronome_sdk/models/v1/package_list_response.rb +139 -7
- data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +139 -7
- data/lib/metronome_sdk/models/v1/pricing_unit_archive_params.rb +16 -0
- data/lib/metronome_sdk/models/v1/pricing_unit_archive_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/pricing_unit_create_params.rb +24 -0
- data/lib/metronome_sdk/models/v1/pricing_unit_create_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/usage_list_params.rb +4 -2
- data/lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb +11 -8
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +221 -20
- data/lib/metronome_sdk/models/v2/contract_edit_response.rb +200 -9
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +200 -9
- data/lib/metronome_sdk/models/v2/contract_list_params.rb +17 -1
- data/lib/metronome_sdk/models/v2/lifecycle_event_offset_notification_config.rb +104 -0
- data/lib/metronome_sdk/models/v2/lifecycle_event_system_notification_config.rb +45 -0
- data/lib/metronome_sdk/models/v2/notifications/offset_archive_params.rb +29 -0
- data/lib/metronome_sdk/models/v2/notifications/offset_archive_response.rb +20 -0
- data/lib/metronome_sdk/models/v2/notifications/offset_create_params.rb +77 -0
- data/lib/metronome_sdk/models/v2/notifications/offset_create_response.rb +20 -0
- data/lib/metronome_sdk/models/v2/notifications/offset_edit_params.rb +98 -0
- data/lib/metronome_sdk/models/v2/notifications/offset_edit_response.rb +32 -0
- data/lib/metronome_sdk/models/v2/notifications/offset_list_params.rb +57 -0
- data/lib/metronome_sdk/models/v2/notifications/offset_retrieve_params.rb +26 -0
- data/lib/metronome_sdk/models/v2/notifications/offset_retrieve_response.rb +20 -0
- data/lib/metronome_sdk/models/v2/notifications/system_list_params.rb +18 -0
- data/lib/metronome_sdk/models/v2/notifications/system_list_response.rb +27 -0
- data/lib/metronome_sdk/resources/v1/alerts.rb +6 -2
- data/lib/metronome_sdk/resources/v1/billable_metrics.rb +45 -0
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +6 -2
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/named_schedules.rb +46 -2
- data/lib/metronome_sdk/resources/v1/contracts.rb +26 -9
- data/lib/metronome_sdk/resources/v1/custom_fields.rb +3 -0
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +1 -1
- data/lib/metronome_sdk/resources/v1/customers/commits.rb +6 -1
- data/lib/metronome_sdk/resources/v1/customers/credits.rb +3 -0
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +3 -1
- data/lib/metronome_sdk/resources/v1/pricing_units.rb +45 -0
- data/lib/metronome_sdk/resources/v1/usage.rb +12 -10
- data/lib/metronome_sdk/resources/v2/contracts.rb +15 -6
- data/lib/metronome_sdk/resources/v2/notifications/offset.rb +157 -0
- data/lib/metronome_sdk/resources/v2/notifications/system.rb +37 -0
- data/lib/metronome_sdk/resources/v2/notifications.rb +24 -0
- data/lib/metronome_sdk/resources/v2.rb +4 -0
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +25 -2
- data/rbi/metronome_sdk/internal/body_cursor_page_cursor_field.rbi +22 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +202 -4
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +168 -4
- data/rbi/metronome_sdk/models/credit.rbi +19 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +186 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +186 -0
- data/rbi/metronome_sdk/models/schedule_duration.rbi +57 -1
- data/rbi/metronome_sdk/models/subscription.rbi +34 -0
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +91 -6
- data/rbi/metronome_sdk/models/v1/billable_metric_update_params.rbi +54 -0
- data/rbi/metronome_sdk/models/v1/billable_metric_update_response.rbi +31 -0
- data/rbi/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rbi +15 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +130 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +284 -12
- data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +158 -2
- data/rbi/metronome_sdk/models/v1/contract_get_net_balance_params.rbi +62 -0
- data/rbi/metronome_sdk/models/v1/contract_get_net_balance_response.rbi +6 -4
- data/rbi/metronome_sdk/models/v1/contract_list_balances_params.rbi +62 -0
- data/rbi/metronome_sdk/models/v1/contract_list_params.rbi +24 -2
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_response.rbi +219 -3
- data/rbi/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_response.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_list_item_state.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_list_response.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_response.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_update_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_list_params.rbi +122 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_list_response.rbi +123 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_retrieve_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_update_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +6 -22
- data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbi +3 -6
- data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +6 -4
- data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +3 -16
- data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +3 -16
- data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +65 -0
- data/rbi/metronome_sdk/models/v1/customers/commit_list_params.rbi +62 -0
- data/rbi/metronome_sdk/models/v1/customers/credit_create_params.rbi +65 -0
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +96 -6
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +99 -19
- data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/package_create_params.rbi +289 -12
- data/rbi/metronome_sdk/models/v1/package_list_response.rbi +306 -10
- data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +306 -10
- data/rbi/metronome_sdk/models/v1/pricing_unit_archive_params.rbi +34 -0
- data/rbi/metronome_sdk/models/v1/pricing_unit_archive_response.rbi +31 -0
- data/rbi/metronome_sdk/models/v1/pricing_unit_create_params.rbi +45 -0
- data/rbi/metronome_sdk/models/v1/pricing_unit_create_response.rbi +31 -0
- data/rbi/metronome_sdk/models/v1/usage_list_params.rbi +4 -0
- data/rbi/metronome_sdk/models/v1/usage_list_with_groups_params.rbi +16 -10
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +492 -14
- data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +394 -2
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +402 -4
- data/rbi/metronome_sdk/models/v2/contract_list_params.rbi +22 -0
- data/rbi/metronome_sdk/models/v2/lifecycle_event_offset_notification_config.rbi +147 -0
- data/rbi/metronome_sdk/models/v2/lifecycle_event_system_notification_config.rbi +98 -0
- data/rbi/metronome_sdk/models/v2/notifications/offset_archive_params.rbi +47 -0
- data/rbi/metronome_sdk/models/v2/notifications/offset_archive_response.rbi +49 -0
- data/rbi/metronome_sdk/models/v2/notifications/offset_create_params.rbi +127 -0
- data/rbi/metronome_sdk/models/v2/notifications/offset_create_response.rbi +49 -0
- data/rbi/metronome_sdk/models/v2/notifications/offset_edit_params.rbi +181 -0
- data/rbi/metronome_sdk/models/v2/notifications/offset_edit_response.rbi +71 -0
- data/rbi/metronome_sdk/models/v2/notifications/offset_list_params.rbi +127 -0
- data/rbi/metronome_sdk/models/v2/notifications/offset_retrieve_params.rbi +47 -0
- data/rbi/metronome_sdk/models/v2/notifications/offset_retrieve_response.rbi +49 -0
- data/rbi/metronome_sdk/models/v2/notifications/system_list_params.rbi +36 -0
- data/rbi/metronome_sdk/models/v2/notifications/system_list_response.rbi +55 -0
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +18 -3
- data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +34 -0
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +8 -0
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/named_schedules.rbi +47 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +36 -5
- data/rbi/metronome_sdk/resources/v1/custom_fields.rbi +3 -0
- data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +3 -2
- data/rbi/metronome_sdk/resources/v1/customers/billing_config.rbi +1 -2
- data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +8 -0
- data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +3 -0
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +4 -0
- data/rbi/metronome_sdk/resources/v1/pricing_units.rbi +26 -0
- data/rbi/metronome_sdk/resources/v1/usage.rbi +18 -13
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +18 -4
- data/rbi/metronome_sdk/resources/v2/notifications/offset.rbi +130 -0
- data/rbi/metronome_sdk/resources/v2/notifications/system.rbi +28 -0
- data/rbi/metronome_sdk/resources/v2/notifications.rbi +20 -0
- data/rbi/metronome_sdk/resources/v2.rbi +3 -0
- data/sig/metronome_sdk/internal/body_cursor_page_cursor_field.rbs +13 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +81 -2
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +60 -2
- data/sig/metronome_sdk/models/credit.rbs +7 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +71 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +71 -0
- data/sig/metronome_sdk/models/schedule_duration.rbs +20 -0
- data/sig/metronome_sdk/models/subscription.rbs +21 -0
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +22 -0
- data/sig/metronome_sdk/models/v1/billable_metric_update_params.rbs +30 -0
- data/sig/metronome_sdk/models/v1/billable_metric_update_response.rbs +15 -0
- data/sig/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rbs +8 -1
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +40 -0
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +102 -10
- data/sig/metronome_sdk/models/v1/contract_create_response.rbs +60 -2
- data/sig/metronome_sdk/models/v1/contract_get_net_balance_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/contract_list_balances_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/contract_list_params.rbs +14 -0
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_response.rbs +81 -3
- data/sig/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_response.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contracts/product_list_item_state.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contracts/product_list_response.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contracts/product_retrieve_response.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contracts/product_update_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_list_params.rbs +74 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_list_response.rbs +68 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_retrieve_params.rbs +8 -1
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_update_params.rbs +8 -1
- data/sig/metronome_sdk/models/v1/customer_create_params.rbs +1 -7
- data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +1 -7
- data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +1 -6
- data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/customers/commit_list_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/customers/credit_create_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +22 -0
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +30 -3
- data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/package_create_params.rbs +104 -11
- data/sig/metronome_sdk/models/v1/package_list_response.rbs +105 -9
- data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +105 -9
- data/sig/metronome_sdk/models/v1/pricing_unit_archive_params.rbs +17 -0
- data/sig/metronome_sdk/models/v1/pricing_unit_archive_response.rbs +15 -0
- data/sig/metronome_sdk/models/v1/pricing_unit_create_params.rbs +25 -0
- data/sig/metronome_sdk/models/v1/pricing_unit_create_response.rbs +15 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +180 -10
- data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +159 -2
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +159 -2
- data/sig/metronome_sdk/models/v2/contract_list_params.rbs +14 -0
- data/sig/metronome_sdk/models/v2/lifecycle_event_offset_notification_config.rbs +69 -0
- data/sig/metronome_sdk/models/v2/lifecycle_event_system_notification_config.rbs +44 -0
- data/sig/metronome_sdk/models/v2/notifications/offset_archive_params.rbs +27 -0
- data/sig/metronome_sdk/models/v2/notifications/offset_archive_response.rbs +22 -0
- data/sig/metronome_sdk/models/v2/notifications/offset_create_params.rbs +54 -0
- data/sig/metronome_sdk/models/v2/notifications/offset_create_response.rbs +22 -0
- data/sig/metronome_sdk/models/v2/notifications/offset_edit_params.rbs +77 -0
- data/sig/metronome_sdk/models/v2/notifications/offset_edit_response.rbs +34 -0
- data/sig/metronome_sdk/models/v2/notifications/offset_list_params.rbs +60 -0
- data/sig/metronome_sdk/models/v2/notifications/offset_retrieve_params.rbs +27 -0
- data/sig/metronome_sdk/models/v2/notifications/offset_retrieve_response.rbs +22 -0
- data/sig/metronome_sdk/models/v2/notifications/system_list_params.rbs +19 -0
- data/sig/metronome_sdk/models/v2/notifications/system_list_response.rbs +29 -0
- data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/billable_metrics.rbs +6 -0
- data/sig/metronome_sdk/resources/v1/contracts/products.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/contracts/rate_cards/named_schedules.rbs +13 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +6 -1
- data/sig/metronome_sdk/resources/v1/customers/commits.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/pricing_units.rbs +10 -0
- data/sig/metronome_sdk/resources/v2/contracts.rbs +3 -1
- data/sig/metronome_sdk/resources/v2/notifications/offset.rbs +42 -0
- data/sig/metronome_sdk/resources/v2/notifications/system.rbs +15 -0
- data/sig/metronome_sdk/resources/v2/notifications.rbs +13 -0
- data/sig/metronome_sdk/resources/v2.rbs +2 -0
- metadata +77 -8
- data/lib/metronome_sdk/models/v1/contract_list_response.rb +0 -18
- data/lib/metronome_sdk/models/v2/contract_list_response.rb +0 -18
- data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +0 -32
- data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +0 -32
- data/sig/metronome_sdk/models/v1/contract_list_response.rbs +0 -15
- data/sig/metronome_sdk/models/v2/contract_list_response.rbs +0 -15
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V2
|
|
6
|
+
module Notifications
|
|
7
|
+
# @see MetronomeSDK::Resources::V2::Notifications::Offset#create
|
|
8
|
+
class OffsetCreateParams < MetronomeSDK::Internal::Type::BaseModel
|
|
9
|
+
extend MetronomeSDK::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include MetronomeSDK::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute name
|
|
13
|
+
# The name for this offset notification configuration.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :name, String
|
|
17
|
+
|
|
18
|
+
# @!attribute policy
|
|
19
|
+
# The offset lifecycle event policy that defines when and how this notification
|
|
20
|
+
# should be triggered. The lifecycle event type is inferred from the policy.type
|
|
21
|
+
# field.
|
|
22
|
+
#
|
|
23
|
+
# @return [MetronomeSDK::Models::V2::Notifications::OffsetCreateParams::Policy]
|
|
24
|
+
required :policy, -> { MetronomeSDK::V2::Notifications::OffsetCreateParams::Policy }
|
|
25
|
+
|
|
26
|
+
# @!attribute uniqueness_key
|
|
27
|
+
# Optional uniqueness key to prevent duplicate notification configurations.
|
|
28
|
+
#
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
optional :uniqueness_key, String
|
|
31
|
+
|
|
32
|
+
# @!method initialize(name:, policy:, uniqueness_key: nil, request_options: {})
|
|
33
|
+
# Some parameter documentations has been truncated, see
|
|
34
|
+
# {MetronomeSDK::Models::V2::Notifications::OffsetCreateParams} for more details.
|
|
35
|
+
#
|
|
36
|
+
# @param name [String] The name for this offset notification configuration.
|
|
37
|
+
#
|
|
38
|
+
# @param policy [MetronomeSDK::Models::V2::Notifications::OffsetCreateParams::Policy] The offset lifecycle event policy that defines when and how this notification sh
|
|
39
|
+
#
|
|
40
|
+
# @param uniqueness_key [String] Optional uniqueness key to prevent duplicate notification configurations.
|
|
41
|
+
#
|
|
42
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
43
|
+
|
|
44
|
+
class Policy < MetronomeSDK::Internal::Type::BaseModel
|
|
45
|
+
# @!attribute offset
|
|
46
|
+
# ISO-8601 duration string indicating how much time before or after the base event
|
|
47
|
+
# this notification should be sent. Positive values indicate notifications after
|
|
48
|
+
# the event, negative values indicate notifications before the event. Examples:
|
|
49
|
+
# "P1D" (1 day after), "-PT2H" (2 hours before)
|
|
50
|
+
#
|
|
51
|
+
# @return [String]
|
|
52
|
+
required :offset, String
|
|
53
|
+
|
|
54
|
+
# @!attribute type
|
|
55
|
+
# The type of lifecycle event that this offset is based on.
|
|
56
|
+
#
|
|
57
|
+
# @return [String]
|
|
58
|
+
required :type, String
|
|
59
|
+
|
|
60
|
+
# @!method initialize(offset:, type:)
|
|
61
|
+
# Some parameter documentations has been truncated, see
|
|
62
|
+
# {MetronomeSDK::Models::V2::Notifications::OffsetCreateParams::Policy} for more
|
|
63
|
+
# details.
|
|
64
|
+
#
|
|
65
|
+
# The offset lifecycle event policy that defines when and how this notification
|
|
66
|
+
# should be triggered. The lifecycle event type is inferred from the policy.type
|
|
67
|
+
# field.
|
|
68
|
+
#
|
|
69
|
+
# @param offset [String] ISO-8601 duration string indicating how much time before or after the base event
|
|
70
|
+
#
|
|
71
|
+
# @param type [String] The type of lifecycle event that this offset is based on.
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V2
|
|
6
|
+
module Notifications
|
|
7
|
+
# @see MetronomeSDK::Resources::V2::Notifications::Offset#create
|
|
8
|
+
class OffsetCreateResponse < MetronomeSDK::Internal::Type::BaseModel
|
|
9
|
+
# @!attribute data
|
|
10
|
+
#
|
|
11
|
+
# @return [MetronomeSDK::Models::V2::LifecycleEventOffsetNotificationConfig]
|
|
12
|
+
required :data, -> { MetronomeSDK::V2::LifecycleEventOffsetNotificationConfig }
|
|
13
|
+
|
|
14
|
+
# @!method initialize(data:)
|
|
15
|
+
# @param data [MetronomeSDK::Models::V2::LifecycleEventOffsetNotificationConfig]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V2
|
|
6
|
+
module Notifications
|
|
7
|
+
# @see MetronomeSDK::Resources::V2::Notifications::Offset#edit
|
|
8
|
+
class OffsetEditParams < MetronomeSDK::Internal::Type::BaseModel
|
|
9
|
+
extend MetronomeSDK::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include MetronomeSDK::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute policy
|
|
13
|
+
# Updated policy configuration. The policy.type must match the existing lifecycle
|
|
14
|
+
# event type.
|
|
15
|
+
#
|
|
16
|
+
# @return [MetronomeSDK::Models::V2::Notifications::OffsetEditParams::Policy::LifecycleEventOffsetPolicy, MetronomeSDK::Models::V2::Notifications::OffsetEditParams::Policy::LifecycleEventSystemPolicy]
|
|
17
|
+
required :policy, union: -> { MetronomeSDK::V2::Notifications::OffsetEditParams::Policy }
|
|
18
|
+
|
|
19
|
+
# @!attribute id
|
|
20
|
+
# The ID of the notification configuration to edit. Not provided when updating the
|
|
21
|
+
# configuration for system events
|
|
22
|
+
#
|
|
23
|
+
# @return [String, nil]
|
|
24
|
+
optional :id, String
|
|
25
|
+
|
|
26
|
+
# @!attribute is_enabled
|
|
27
|
+
# Set to true to enable webhook messages for the notification indicated in the
|
|
28
|
+
# policy, false to disable. Only supported by system lifecycle events.
|
|
29
|
+
#
|
|
30
|
+
# @return [Boolean, nil]
|
|
31
|
+
optional :is_enabled, MetronomeSDK::Internal::Type::Boolean
|
|
32
|
+
|
|
33
|
+
# @!method initialize(policy:, id: nil, is_enabled: nil, request_options: {})
|
|
34
|
+
# Some parameter documentations has been truncated, see
|
|
35
|
+
# {MetronomeSDK::Models::V2::Notifications::OffsetEditParams} for more details.
|
|
36
|
+
#
|
|
37
|
+
# @param policy [MetronomeSDK::Models::V2::Notifications::OffsetEditParams::Policy::LifecycleEventOffsetPolicy, MetronomeSDK::Models::V2::Notifications::OffsetEditParams::Policy::LifecycleEventSystemPolicy] Updated policy configuration. The policy.type must match the existing lifecycle
|
|
38
|
+
#
|
|
39
|
+
# @param id [String] The ID of the notification configuration to edit. Not provided when updating the
|
|
40
|
+
#
|
|
41
|
+
# @param is_enabled [Boolean] Set to true to enable webhook messages for the notification indicated in the pol
|
|
42
|
+
#
|
|
43
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
44
|
+
|
|
45
|
+
# Updated policy configuration. The policy.type must match the existing lifecycle
|
|
46
|
+
# event type.
|
|
47
|
+
module Policy
|
|
48
|
+
extend MetronomeSDK::Internal::Type::Union
|
|
49
|
+
|
|
50
|
+
variant -> { MetronomeSDK::V2::Notifications::OffsetEditParams::Policy::LifecycleEventOffsetPolicy }
|
|
51
|
+
|
|
52
|
+
variant -> { MetronomeSDK::V2::Notifications::OffsetEditParams::Policy::LifecycleEventSystemPolicy }
|
|
53
|
+
|
|
54
|
+
class LifecycleEventOffsetPolicy < MetronomeSDK::Internal::Type::BaseModel
|
|
55
|
+
# @!attribute offset
|
|
56
|
+
# ISO-8601 duration string indicating how much time before or after the base event
|
|
57
|
+
# this notification should be sent. Positive values indicate notifications after
|
|
58
|
+
# the event, negative values indicate notifications before the event. Examples:
|
|
59
|
+
# "P1D" (1 day after), "-PT2H" (2 hours before)
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
required :offset, String
|
|
63
|
+
|
|
64
|
+
# @!attribute type
|
|
65
|
+
# The type of lifecycle event that this offset is based on.
|
|
66
|
+
#
|
|
67
|
+
# @return [String]
|
|
68
|
+
required :type, String
|
|
69
|
+
|
|
70
|
+
# @!method initialize(offset:, type:)
|
|
71
|
+
# Some parameter documentations has been truncated, see
|
|
72
|
+
# {MetronomeSDK::Models::V2::Notifications::OffsetEditParams::Policy::LifecycleEventOffsetPolicy}
|
|
73
|
+
# for more details.
|
|
74
|
+
#
|
|
75
|
+
# @param offset [String] ISO-8601 duration string indicating how much time before or after the base event
|
|
76
|
+
#
|
|
77
|
+
# @param type [String] The type of lifecycle event that this offset is based on.
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
class LifecycleEventSystemPolicy < MetronomeSDK::Internal::Type::BaseModel
|
|
81
|
+
# @!attribute type
|
|
82
|
+
# The type of lifecycle event (e.g., "contract.create", "contract.start")
|
|
83
|
+
#
|
|
84
|
+
# @return [String]
|
|
85
|
+
required :type, String
|
|
86
|
+
|
|
87
|
+
# @!method initialize(type:)
|
|
88
|
+
# @param type [String] The type of lifecycle event (e.g., "contract.create", "contract.start")
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# @!method self.variants
|
|
92
|
+
# @return [Array(MetronomeSDK::Models::V2::Notifications::OffsetEditParams::Policy::LifecycleEventOffsetPolicy, MetronomeSDK::Models::V2::Notifications::OffsetEditParams::Policy::LifecycleEventSystemPolicy)]
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V2
|
|
6
|
+
module Notifications
|
|
7
|
+
# @see MetronomeSDK::Resources::V2::Notifications::Offset#edit
|
|
8
|
+
class OffsetEditResponse < MetronomeSDK::Internal::Type::BaseModel
|
|
9
|
+
# @!attribute data
|
|
10
|
+
#
|
|
11
|
+
# @return [MetronomeSDK::Models::V2::LifecycleEventSystemNotificationConfig, MetronomeSDK::Models::V2::LifecycleEventOffsetNotificationConfig]
|
|
12
|
+
required :data, union: -> { MetronomeSDK::Models::V2::Notifications::OffsetEditResponse::Data }
|
|
13
|
+
|
|
14
|
+
# @!method initialize(data:)
|
|
15
|
+
# @param data [MetronomeSDK::Models::V2::LifecycleEventSystemNotificationConfig, MetronomeSDK::Models::V2::LifecycleEventOffsetNotificationConfig]
|
|
16
|
+
|
|
17
|
+
# @see MetronomeSDK::Models::V2::Notifications::OffsetEditResponse#data
|
|
18
|
+
module Data
|
|
19
|
+
extend MetronomeSDK::Internal::Type::Union
|
|
20
|
+
|
|
21
|
+
variant -> { MetronomeSDK::V2::LifecycleEventSystemNotificationConfig }
|
|
22
|
+
|
|
23
|
+
variant -> { MetronomeSDK::V2::LifecycleEventOffsetNotificationConfig }
|
|
24
|
+
|
|
25
|
+
# @!method self.variants
|
|
26
|
+
# @return [Array(MetronomeSDK::Models::V2::LifecycleEventSystemNotificationConfig, MetronomeSDK::Models::V2::LifecycleEventOffsetNotificationConfig)]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V2
|
|
6
|
+
module Notifications
|
|
7
|
+
# @see MetronomeSDK::Resources::V2::Notifications::Offset#list
|
|
8
|
+
class OffsetListParams < MetronomeSDK::Internal::Type::BaseModel
|
|
9
|
+
extend MetronomeSDK::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include MetronomeSDK::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute archive_filter
|
|
13
|
+
# Filter options for the notification configurations. If not provided, defaults to
|
|
14
|
+
# NOT_ARCHIVED.
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, MetronomeSDK::Models::V2::Notifications::OffsetListParams::ArchiveFilter, nil]
|
|
17
|
+
optional :archive_filter, enum: -> { MetronomeSDK::V2::Notifications::OffsetListParams::ArchiveFilter }
|
|
18
|
+
|
|
19
|
+
# @!attribute cursor
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :cursor, String
|
|
23
|
+
|
|
24
|
+
# @!attribute limit
|
|
25
|
+
#
|
|
26
|
+
# @return [Float, nil]
|
|
27
|
+
optional :limit, Float
|
|
28
|
+
|
|
29
|
+
# @!method initialize(archive_filter: nil, cursor: nil, limit: nil, request_options: {})
|
|
30
|
+
# Some parameter documentations has been truncated, see
|
|
31
|
+
# {MetronomeSDK::Models::V2::Notifications::OffsetListParams} for more details.
|
|
32
|
+
#
|
|
33
|
+
# @param archive_filter [Symbol, MetronomeSDK::Models::V2::Notifications::OffsetListParams::ArchiveFilter] Filter options for the notification configurations. If not provided, defaults to
|
|
34
|
+
#
|
|
35
|
+
# @param cursor [String]
|
|
36
|
+
#
|
|
37
|
+
# @param limit [Float]
|
|
38
|
+
#
|
|
39
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
40
|
+
|
|
41
|
+
# Filter options for the notification configurations. If not provided, defaults to
|
|
42
|
+
# NOT_ARCHIVED.
|
|
43
|
+
module ArchiveFilter
|
|
44
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
45
|
+
|
|
46
|
+
ARCHIVED = :ARCHIVED
|
|
47
|
+
NOT_ARCHIVED = :NOT_ARCHIVED
|
|
48
|
+
ALL = :ALL
|
|
49
|
+
|
|
50
|
+
# @!method self.values
|
|
51
|
+
# @return [Array<Symbol>]
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V2
|
|
6
|
+
module Notifications
|
|
7
|
+
# @see MetronomeSDK::Resources::V2::Notifications::Offset#retrieve
|
|
8
|
+
class OffsetRetrieveParams < MetronomeSDK::Internal::Type::BaseModel
|
|
9
|
+
extend MetronomeSDK::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include MetronomeSDK::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute id
|
|
13
|
+
# The ID of the notification configuration to retrieve
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :id, String
|
|
17
|
+
|
|
18
|
+
# @!method initialize(id:, request_options: {})
|
|
19
|
+
# @param id [String] The ID of the notification configuration to retrieve
|
|
20
|
+
#
|
|
21
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V2
|
|
6
|
+
module Notifications
|
|
7
|
+
# @see MetronomeSDK::Resources::V2::Notifications::Offset#retrieve
|
|
8
|
+
class OffsetRetrieveResponse < MetronomeSDK::Internal::Type::BaseModel
|
|
9
|
+
# @!attribute data
|
|
10
|
+
#
|
|
11
|
+
# @return [MetronomeSDK::Models::V2::LifecycleEventOffsetNotificationConfig]
|
|
12
|
+
required :data, -> { MetronomeSDK::V2::LifecycleEventOffsetNotificationConfig }
|
|
13
|
+
|
|
14
|
+
# @!method initialize(data:)
|
|
15
|
+
# @param data [MetronomeSDK::Models::V2::LifecycleEventOffsetNotificationConfig]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V2
|
|
6
|
+
module Notifications
|
|
7
|
+
# @see MetronomeSDK::Resources::V2::Notifications::System#list
|
|
8
|
+
class SystemListParams < MetronomeSDK::Internal::Type::BaseModel
|
|
9
|
+
extend MetronomeSDK::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include MetronomeSDK::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!method initialize(request_options: {})
|
|
13
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V2
|
|
6
|
+
module Notifications
|
|
7
|
+
# @see MetronomeSDK::Resources::V2::Notifications::System#list
|
|
8
|
+
class SystemListResponse < MetronomeSDK::Internal::Type::BaseModel
|
|
9
|
+
# @!attribute data
|
|
10
|
+
#
|
|
11
|
+
# @return [Array<MetronomeSDK::Models::V2::LifecycleEventSystemNotificationConfig>]
|
|
12
|
+
required :data,
|
|
13
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::LifecycleEventSystemNotificationConfig] }
|
|
14
|
+
|
|
15
|
+
# @!attribute cursor
|
|
16
|
+
#
|
|
17
|
+
# @return [String, nil]
|
|
18
|
+
optional :cursor, String, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!method initialize(data:, cursor: nil)
|
|
21
|
+
# @param data [Array<MetronomeSDK::Models::V2::LifecycleEventSystemNotificationConfig>]
|
|
22
|
+
# @param cursor [String, nil]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -58,7 +58,7 @@ module MetronomeSDK
|
|
|
58
58
|
# threshold notification evaluations in real-time as usage events stream in,
|
|
59
59
|
# unlike competitors who rely on periodic polling or batch evaluation cycles
|
|
60
60
|
#
|
|
61
|
-
# @overload create(alert_type:, name:, threshold:, alert_specifiers: nil, 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, seat_filter: nil, uniqueness_key: nil, request_options: {})
|
|
61
|
+
# @overload create(alert_type:, name:, threshold:, access_type: nil, alert_specifiers: nil, 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, seat_filter: nil, uniqueness_key: nil, request_options: {})
|
|
62
62
|
#
|
|
63
63
|
# @param alert_type [Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType] Type of the threshold notification
|
|
64
64
|
#
|
|
@@ -66,7 +66,9 @@ module MetronomeSDK
|
|
|
66
66
|
#
|
|
67
67
|
# @param threshold [Float] Threshold value of the notification policy. Depending upon the notification typ
|
|
68
68
|
#
|
|
69
|
-
# @param
|
|
69
|
+
# @param access_type [Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AccessType] Filters the notification to commits/credits with this access type. Only supporte
|
|
70
|
+
#
|
|
71
|
+
# @param alert_specifiers [Array<MetronomeSDK::Models::V1::AlertCreateParams::AlertSpecifier>] Can be used only with `low_remaining_contract_credit_and_commit_balance_reached`
|
|
70
72
|
#
|
|
71
73
|
# @param billable_metric_id [String] For threshold notifications of type `usage_threshold_reached`, specifies which b
|
|
72
74
|
#
|
|
@@ -137,6 +139,8 @@ module MetronomeSDK
|
|
|
137
139
|
# customers
|
|
138
140
|
# - Historical preservation: Archive operation maintains threshold notification
|
|
139
141
|
# history and configuration for compliance and auditing
|
|
142
|
+
# - Idempotent: Archiving an already-archived threshold notification returns the
|
|
143
|
+
# same successful response
|
|
140
144
|
#
|
|
141
145
|
# @overload archive(id:, release_uniqueness_key: nil, request_options: {})
|
|
142
146
|
#
|
|
@@ -108,6 +108,51 @@ module MetronomeSDK
|
|
|
108
108
|
)
|
|
109
109
|
end
|
|
110
110
|
|
|
111
|
+
# Updates only the display name of an existing billable metric. Use this to
|
|
112
|
+
# correct mistakes or apply standardized naming conventions across all billable
|
|
113
|
+
# metrics. Returns the billable metric ID to confirm the update.
|
|
114
|
+
#
|
|
115
|
+
# Important: Only the name can be modified via this endpoint; configurations
|
|
116
|
+
# cannot be changed after creation.
|
|
117
|
+
#
|
|
118
|
+
# #### Example workflow:
|
|
119
|
+
#
|
|
120
|
+
# If you need to make changes to a streaming billable metric, for example,
|
|
121
|
+
# Metronome supports easily rolling out these changes using a simple workflow:
|
|
122
|
+
#
|
|
123
|
+
# 1. Duplicate the billable metric
|
|
124
|
+
# 2. Make required changes
|
|
125
|
+
# 3. Save the metric
|
|
126
|
+
# 4. Navigate to the product you have associated with the incorrect metric
|
|
127
|
+
# 5. Schedule the product to reference the newly created metric on the appropriate
|
|
128
|
+
# date
|
|
129
|
+
#
|
|
130
|
+
# @overload update(billable_metric_id:, name:, request_options: {})
|
|
131
|
+
#
|
|
132
|
+
# @param billable_metric_id [String] Path param
|
|
133
|
+
#
|
|
134
|
+
# @param name [String] Body param: The new name of the metric
|
|
135
|
+
#
|
|
136
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
137
|
+
#
|
|
138
|
+
# @return [MetronomeSDK::Models::V1::BillableMetricUpdateResponse]
|
|
139
|
+
#
|
|
140
|
+
# @see MetronomeSDK::Models::V1::BillableMetricUpdateParams
|
|
141
|
+
def update(params)
|
|
142
|
+
parsed, options = MetronomeSDK::V1::BillableMetricUpdateParams.dump_request(params)
|
|
143
|
+
billable_metric_id =
|
|
144
|
+
parsed.delete(:billable_metric_id) do
|
|
145
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
146
|
+
end
|
|
147
|
+
@client.request(
|
|
148
|
+
method: :put,
|
|
149
|
+
path: ["v1/billable-metrics/%1$s", billable_metric_id],
|
|
150
|
+
body: parsed,
|
|
151
|
+
model: MetronomeSDK::Models::V1::BillableMetricUpdateResponse,
|
|
152
|
+
options: options
|
|
153
|
+
)
|
|
154
|
+
end
|
|
155
|
+
|
|
111
156
|
# Retrieves all billable metrics with their complete configurations. Use this for
|
|
112
157
|
# programmatic discovery and management of billable metrics, such as associating
|
|
113
158
|
# metrics to products and auditing for orphaned or archived metrics. Important:
|
|
@@ -15,7 +15,7 @@ module MetronomeSDK
|
|
|
15
15
|
# an ERP system. Give the product a meaningful name as they will appear on
|
|
16
16
|
# customer invoices.
|
|
17
17
|
#
|
|
18
|
-
# @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, sql_breakdown_granularity: nil, tags: nil, request_options: {})
|
|
18
|
+
# @overload create(name:, type:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, custom_fields: nil, exclude_free_usage: nil, include_composite_spend: 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, sql_breakdown_granularity: nil, tags: nil, request_options: {})
|
|
19
19
|
#
|
|
20
20
|
# @param name [String] displayed on invoices
|
|
21
21
|
#
|
|
@@ -31,6 +31,8 @@ module MetronomeSDK
|
|
|
31
31
|
#
|
|
32
32
|
# @param exclude_free_usage [Boolean] Beta feature only available for composite products. If true, products with $0 wi
|
|
33
33
|
#
|
|
34
|
+
# @param include_composite_spend [Boolean] Only for composite products. If true, allows a composite to incorporate spend fr
|
|
35
|
+
#
|
|
34
36
|
# @param is_refundable [Boolean] This field's availability is dependent on your client's configuration. Defaults
|
|
35
37
|
#
|
|
36
38
|
# @param netsuite_internal_item_id [String] This field's availability is dependent on your client's configuration.
|
|
@@ -101,7 +103,7 @@ module MetronomeSDK
|
|
|
101
103
|
# - Product type cannot be changed after creation. For incorrect product types,
|
|
102
104
|
# create a new product and archive the original instead.
|
|
103
105
|
#
|
|
104
|
-
# @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, sql_breakdown_granularity: nil, tags: nil, request_options: {})
|
|
106
|
+
# @overload update(product_id:, starting_at:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, exclude_free_usage: nil, include_composite_spend: 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, sql_breakdown_granularity: nil, tags: nil, request_options: {})
|
|
105
107
|
#
|
|
106
108
|
# @param product_id [String] ID of the product to update
|
|
107
109
|
#
|
|
@@ -115,6 +117,8 @@ module MetronomeSDK
|
|
|
115
117
|
#
|
|
116
118
|
# @param exclude_free_usage [Boolean] Beta feature only available for composite products. If true, products with $0 wi
|
|
117
119
|
#
|
|
120
|
+
# @param include_composite_spend [Boolean] Only for composite products. If true, allows a composite to incorporate spend fr
|
|
121
|
+
#
|
|
118
122
|
# @param is_refundable [Boolean] Defaults to product's current refundability status. This field's availability is
|
|
119
123
|
#
|
|
120
124
|
# @param name [String] displayed on invoices. If not provided, defaults to product's current name.
|
|
@@ -15,7 +15,7 @@ module MetronomeSDK
|
|
|
15
15
|
# Get a named schedule for the given contract. This endpoint's availability is
|
|
16
16
|
# dependent on your client's configuration.
|
|
17
17
|
#
|
|
18
|
-
# @overload retrieve(contract_id:, customer_id:, schedule_name:, covering_date: nil, request_options: {})
|
|
18
|
+
# @overload retrieve(contract_id:, customer_id:, schedule_name:, covering_date: nil, properties: nil, request_options: {})
|
|
19
19
|
#
|
|
20
20
|
# @param contract_id [String] ID of the contract whose named schedule is to be retrieved
|
|
21
21
|
#
|
|
@@ -25,6 +25,8 @@ module MetronomeSDK
|
|
|
25
25
|
#
|
|
26
26
|
# @param covering_date [Time] If provided, at most one schedule segment will be returned (the one that covers
|
|
27
27
|
#
|
|
28
|
+
# @param properties [Hash{Symbol=>String}] A set of key-value pairs that qualifies which schedule should be applied when lo
|
|
29
|
+
#
|
|
28
30
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
29
31
|
#
|
|
30
32
|
# @return [MetronomeSDK::Models::V1::Contracts::RateCards::NamedScheduleRetrieveResponse]
|
|
@@ -49,7 +51,7 @@ module MetronomeSDK
|
|
|
49
51
|
# Update a named schedule for the given contract. This endpoint's availability is
|
|
50
52
|
# dependent on your client's configuration.
|
|
51
53
|
#
|
|
52
|
-
# @overload update(contract_id:, customer_id:, schedule_name:, starting_at:, value:, ending_before: nil, request_options: {})
|
|
54
|
+
# @overload update(contract_id:, customer_id:, schedule_name:, starting_at:, value:, ending_before: nil, properties: nil, request_options: {})
|
|
53
55
|
#
|
|
54
56
|
# @param contract_id [String] ID of the contract whose named schedule is to be updated
|
|
55
57
|
#
|
|
@@ -63,6 +65,8 @@ module MetronomeSDK
|
|
|
63
65
|
#
|
|
64
66
|
# @param ending_before [Time]
|
|
65
67
|
#
|
|
68
|
+
# @param properties [Hash{Symbol=>String}] A set of key-value pairs that qualifies which schedule should be applied when lo
|
|
69
|
+
#
|
|
66
70
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
67
71
|
#
|
|
68
72
|
# @return [nil]
|
|
@@ -79,6 +83,46 @@ module MetronomeSDK
|
|
|
79
83
|
)
|
|
80
84
|
end
|
|
81
85
|
|
|
86
|
+
# Some parameter documentations has been truncated, see
|
|
87
|
+
# {MetronomeSDK::Models::V1::Contracts::RateCards::NamedScheduleListParams} for
|
|
88
|
+
# more details.
|
|
89
|
+
#
|
|
90
|
+
# List contract-level named schedules for a customer, optionally scoped to a
|
|
91
|
+
# single contract.
|
|
92
|
+
#
|
|
93
|
+
# @overload list(customer_id:, contract_id: nil, covering_date: nil, limit: nil, next_page: nil, properties: nil, schedule_name: nil, request_options: {})
|
|
94
|
+
#
|
|
95
|
+
# @param customer_id [String] ID of the customer to list contract named schedules for
|
|
96
|
+
#
|
|
97
|
+
# @param contract_id [String] Optional ID of a contract to scope the results to a single contract
|
|
98
|
+
#
|
|
99
|
+
# @param covering_date [Time] If provided, result contains at most one segment covering this date for each sch
|
|
100
|
+
#
|
|
101
|
+
# @param limit [Integer] Maximum number of named schedules to return.
|
|
102
|
+
#
|
|
103
|
+
# @param next_page [String] Cursor for pagination. Use the value from a previous response's next_page.
|
|
104
|
+
#
|
|
105
|
+
# @param properties [Hash{Symbol=>String}] Optional key-value filters. A schedule matches when it contains at least this su
|
|
106
|
+
#
|
|
107
|
+
# @param schedule_name [String] Optional filter to scope the results to a single schedule name
|
|
108
|
+
#
|
|
109
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
110
|
+
#
|
|
111
|
+
# @return [MetronomeSDK::Internal::BodyCursorPage<MetronomeSDK::Models::V1::Contracts::RateCards::NamedScheduleListResponse>]
|
|
112
|
+
#
|
|
113
|
+
# @see MetronomeSDK::Models::V1::Contracts::RateCards::NamedScheduleListParams
|
|
114
|
+
def list(params)
|
|
115
|
+
parsed, options = MetronomeSDK::V1::Contracts::RateCards::NamedScheduleListParams.dump_request(params)
|
|
116
|
+
@client.request(
|
|
117
|
+
method: :post,
|
|
118
|
+
path: "v1/contracts/listNamedSchedules",
|
|
119
|
+
body: parsed,
|
|
120
|
+
page: MetronomeSDK::Internal::BodyCursorPage,
|
|
121
|
+
model: MetronomeSDK::Models::V1::Contracts::RateCards::NamedScheduleListResponse,
|
|
122
|
+
options: options
|
|
123
|
+
)
|
|
124
|
+
end
|
|
125
|
+
|
|
82
126
|
# @api private
|
|
83
127
|
#
|
|
84
128
|
# @param client [MetronomeSDK::Client]
|