metronome-sdk 0.3.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/README.md +9 -9
- data/lib/metronome_sdk/internal/body_cursor_page.rb +86 -0
- data/lib/metronome_sdk/internal/cursor_page_without_limit.rb +86 -0
- data/lib/metronome_sdk/internal/transport/base_client.rb +1 -4
- data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/metronome_sdk/internal/type/base_model.rb +6 -13
- data/lib/metronome_sdk/internal/type/union.rb +11 -0
- data/lib/metronome_sdk/internal/util.rb +1 -1
- data/lib/metronome_sdk/models/base_threshold_commit.rb +36 -0
- data/lib/metronome_sdk/models/commit.rb +26 -170
- data/lib/metronome_sdk/models/commit_hierarchy_configuration.rb +98 -0
- data/lib/metronome_sdk/models/commit_rate.rb +48 -0
- data/lib/metronome_sdk/models/commit_specifier.rb +42 -0
- data/lib/metronome_sdk/models/commit_specifier_input.rb +42 -0
- data/lib/metronome_sdk/models/contract.rb +404 -0
- data/lib/metronome_sdk/models/contract_v2.rb +2919 -0
- data/lib/metronome_sdk/models/contract_without_amendments.rb +36 -1126
- data/lib/metronome_sdk/models/credit.rb +9 -156
- data/lib/metronome_sdk/models/discount.rb +2 -1
- data/lib/metronome_sdk/models/hierarchy_configuration.rb +76 -0
- data/lib/metronome_sdk/models/override.rb +6 -101
- data/lib/metronome_sdk/models/override_tier.rb +21 -0
- data/lib/metronome_sdk/models/overwrite_rate.rb +82 -0
- data/lib/metronome_sdk/models/payment_gate_config.rb +149 -0
- data/lib/metronome_sdk/models/payment_gate_config_v2.rb +149 -0
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +100 -0
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +102 -0
- data/lib/metronome_sdk/models/pro_service.rb +2 -1
- data/lib/metronome_sdk/models/recurring_commit_subscription_config.rb +51 -0
- data/lib/metronome_sdk/models/scheduled_charge.rb +2 -1
- data/lib/metronome_sdk/models/spend_threshold_configuration.rb +44 -0
- data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +44 -0
- data/lib/metronome_sdk/models/subscription.rb +227 -0
- data/lib/metronome_sdk/models/update_base_threshold_commit.rb +36 -0
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +4 -6
- data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +1 -2
- data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +3 -3
- data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +4 -7
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +57 -411
- data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb +7 -16
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +236 -1478
- data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +6 -23
- data/lib/metronome_sdk/models/v1/contract_list_response.rb +3 -1153
- data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +5 -50
- data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +3 -1154
- data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +2 -1
- data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +8 -1
- data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +8 -1
- data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +1 -4
- data/lib/metronome_sdk/models/v1/contracts/rate_card_create_params.rb +4 -7
- data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +5 -50
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/rate_card_update_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +6 -61
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +3 -49
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +4 -51
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +5 -49
- data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +103 -123
- data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +3 -5
- data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/custom_field_list_keys_response.rb +41 -58
- data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +5 -1
- data/lib/metronome_sdk/models/v1/customer.rb +2 -1
- data/lib/metronome_sdk/models/v1/customer_create_params.rb +37 -11
- data/lib/metronome_sdk/models/v1/customer_detail.rb +2 -1
- data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +3 -3
- data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rb +28 -0
- data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rb +128 -0
- data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_params.rb +143 -0
- data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +30 -1
- data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +2 -0
- data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +2 -0
- data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +10 -60
- data/lib/metronome_sdk/models/v1/customers/credit_create_params.rb +6 -48
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +8 -16
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +61 -48
- data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_params.rb +1 -4
- data/lib/metronome_sdk/models/v1/customers/plan_add_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +2 -1
- data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +4 -11
- data/lib/metronome_sdk/models/v1/plan_detail.rb +9 -5
- data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +2 -1
- data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +2 -1
- data/lib/metronome_sdk/models/v1/plan_list_response.rb +5 -1
- data/lib/metronome_sdk/models/v1/usage_ingest_params.rb +1 -4
- data/lib/metronome_sdk/models/v1/usage_list_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/usage_list_response.rb +45 -62
- data/lib/metronome_sdk/models/v1/usage_search_response.rb +4 -7
- data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +29 -58
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +26 -49
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +414 -2310
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +337 -2424
- data/lib/metronome_sdk/models/v2/contract_list_response.rb +3 -4520
- data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +3 -4528
- data/lib/metronome_sdk/models.rb +38 -0
- data/lib/metronome_sdk/resources/v1/alerts.rb +72 -2
- data/lib/metronome_sdk/resources/v1/audit_logs.rb +39 -4
- data/lib/metronome_sdk/resources/v1/billable_metrics.rb +54 -4
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +25 -6
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb +7 -2
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +10 -2
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +109 -10
- data/lib/metronome_sdk/resources/v1/contracts.rb +254 -18
- data/lib/metronome_sdk/resources/v1/credit_grants.rb +2 -1
- data/lib/metronome_sdk/resources/v1/custom_fields.rb +51 -14
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +103 -8
- data/lib/metronome_sdk/resources/v1/customers/commits.rb +119 -9
- data/lib/metronome_sdk/resources/v1/customers/credits.rb +104 -8
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +124 -8
- data/lib/metronome_sdk/resources/v1/customers.rb +169 -12
- data/lib/metronome_sdk/resources/v1/dashboards.rb +29 -3
- data/lib/metronome_sdk/resources/v1/invoices.rb +23 -2
- data/lib/metronome_sdk/resources/v1/pricing_units.rb +6 -1
- data/lib/metronome_sdk/resources/v1/services.rb +6 -4
- data/lib/metronome_sdk/resources/v1/usage.rb +185 -12
- data/lib/metronome_sdk/resources/v2/contracts.rb +114 -18
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +24 -3
- data/rbi/metronome_sdk/errors.rbi +2 -2
- data/rbi/metronome_sdk/internal/body_cursor_page.rbi +22 -0
- data/rbi/metronome_sdk/internal/cursor_page_without_limit.rbi +22 -0
- data/rbi/metronome_sdk/models/base_threshold_commit.rbi +58 -0
- data/rbi/metronome_sdk/models/commit.rbi +26 -348
- data/rbi/metronome_sdk/models/commit_hierarchy_configuration.rbi +280 -0
- data/rbi/metronome_sdk/models/commit_rate.rbi +85 -0
- data/rbi/metronome_sdk/models/commit_specifier.rbi +71 -0
- data/rbi/metronome_sdk/models/commit_specifier_input.rbi +74 -0
- data/rbi/metronome_sdk/models/contract.rbi +768 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +5822 -0
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +184 -2507
- data/rbi/metronome_sdk/models/credit.rbi +10 -348
- data/rbi/metronome_sdk/models/discount.rbi +2 -0
- data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +180 -0
- data/rbi/metronome_sdk/models/override.rbi +8 -193
- data/rbi/metronome_sdk/models/override_tier.rbi +29 -0
- data/rbi/metronome_sdk/models/overwrite_rate.rbi +137 -0
- data/rbi/metronome_sdk/models/payment_gate_config.rbi +312 -0
- data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +321 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +183 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +188 -0
- data/rbi/metronome_sdk/models/pro_service.rbi +2 -0
- data/rbi/metronome_sdk/models/recurring_commit_subscription_config.rbi +125 -0
- data/rbi/metronome_sdk/models/scheduled_charge.rbi +2 -0
- data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +76 -0
- data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -0
- data/rbi/metronome_sdk/models/subscription.rbi +460 -0
- data/rbi/metronome_sdk/models/update_base_threshold_commit.rbi +61 -0
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +6 -3
- data/rbi/metronome_sdk/models/v1/billable_metric_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/billable_metric_retrieve_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +44 -768
- data/rbi/metronome_sdk/models/v1/contract_create_historical_invoices_params.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1550 -4079
- data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +8 -59
- data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +5 -2420
- data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +6 -129
- data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +4 -2419
- data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_create_params.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +6 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +4 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +4 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +4 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +6 -129
- data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_response.rbi +147 -198
- data/rbi/metronome_sdk/models/v1/credit_grant_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/custom_field_list_keys_response.rbi +117 -165
- data/rbi/metronome_sdk/models/v1/custom_field_set_values_params.rbi +8 -1
- data/rbi/metronome_sdk/models/v1/customer.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +88 -3
- data/rbi/metronome_sdk/models/v1/customer_detail.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbi +51 -0
- data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbi +265 -0
- data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbi +348 -0
- data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +60 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +10 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +10 -0
- data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +6 -90
- data/rbi/metronome_sdk/models/v1/customers/credit_create_params.rbi +6 -90
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +6 -3
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +70 -10
- data/rbi/metronome_sdk/models/v1/customers/plan_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_detail.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_list_charges_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_list_customers_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_list_response.rbi +8 -1
- data/rbi/metronome_sdk/models/v1/usage_list_response.rbi +45 -86
- data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +56 -76
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +56 -76
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +3419 -7270
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1140 -6062
- data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +5 -9867
- data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +6 -9866
- data/rbi/metronome_sdk/models.rbi +44 -0
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +72 -2
- data/rbi/metronome_sdk/resources/v1/audit_logs.rbi +39 -4
- data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +54 -4
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +25 -5
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rbi +7 -2
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +10 -3
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +109 -9
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +257 -16
- data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +5 -1
- data/rbi/metronome_sdk/resources/v1/custom_fields.rbi +57 -14
- data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +108 -5
- data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +119 -10
- data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +104 -9
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +123 -7
- data/rbi/metronome_sdk/resources/v1/customers.rbi +156 -11
- data/rbi/metronome_sdk/resources/v1/dashboards.rbi +29 -3
- data/rbi/metronome_sdk/resources/v1/invoices.rbi +23 -2
- data/rbi/metronome_sdk/resources/v1/pricing_units.rbi +6 -1
- data/rbi/metronome_sdk/resources/v1/services.rbi +6 -4
- data/rbi/metronome_sdk/resources/v1/usage.rbi +188 -12
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +120 -23
- data/sig/metronome_sdk/internal/body_cursor_page.rbs +13 -0
- data/sig/metronome_sdk/internal/cursor_page_without_limit.rbs +13 -0
- data/sig/metronome_sdk/models/base_threshold_commit.rbs +26 -0
- data/sig/metronome_sdk/models/commit.rbs +17 -170
- data/sig/metronome_sdk/models/commit_hierarchy_configuration.rbs +117 -0
- data/sig/metronome_sdk/models/commit_rate.rbs +48 -0
- data/sig/metronome_sdk/models/commit_specifier.rbs +47 -0
- data/sig/metronome_sdk/models/commit_specifier_input.rbs +47 -0
- data/sig/metronome_sdk/models/contract.rbs +398 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +2881 -0
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +54 -976
- data/sig/metronome_sdk/models/credit.rbs +12 -170
- data/sig/metronome_sdk/models/hierarchy_configuration.rbs +71 -0
- data/sig/metronome_sdk/models/override.rbs +12 -101
- data/sig/metronome_sdk/models/override_tier.rbs +17 -0
- data/sig/metronome_sdk/models/overwrite_rate.rbs +78 -0
- data/sig/metronome_sdk/models/payment_gate_config.rbs +123 -0
- data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +123 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +82 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +82 -0
- data/sig/metronome_sdk/models/recurring_commit_subscription_config.rbs +51 -0
- data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +35 -0
- data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +35 -0
- data/sig/metronome_sdk/models/subscription.rbs +215 -0
- data/sig/metronome_sdk/models/update_base_threshold_commit.rbs +28 -0
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +4 -2
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +24 -340
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +168 -1219
- data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +4 -25
- data/sig/metronome_sdk/models/v1/contract_list_response.rbs +4 -1041
- data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +4 -1041
- data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +72 -94
- data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +53 -75
- data/sig/metronome_sdk/models/v1/customer_create_params.rbs +31 -4
- data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbs +32 -0
- data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbs +113 -0
- data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbs +133 -0
- data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +21 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +7 -1
- data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +6 -1
- data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +6 -50
- data/sig/metronome_sdk/models/v1/customers/credit_create_params.rbs +6 -50
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +4 -2
- data/sig/metronome_sdk/models/v1/usage_list_response.rbs +33 -55
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +19 -43
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +19 -43
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +361 -1917
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +242 -2252
- data/sig/metronome_sdk/models/v2/contract_list_response.rbs +4 -4426
- data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +4 -4426
- data/sig/metronome_sdk/models.rbs +38 -0
- data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -1
- data/sig/metronome_sdk/resources/v1/contracts.rbs +3 -3
- data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -1
- data/sig/metronome_sdk/resources/v1/custom_fields.rbs +1 -1
- data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +2 -1
- data/sig/metronome_sdk/resources/v1/customers/commits.rbs +2 -2
- data/sig/metronome_sdk/resources/v1/customers/credits.rbs +2 -2
- data/sig/metronome_sdk/resources/v1/customers.rbs +11 -0
- data/sig/metronome_sdk/resources/v1/usage.rbs +1 -1
- data/sig/metronome_sdk/resources/v2/contracts.rbs +7 -4
- metadata +74 -11
- data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +0 -29
- data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +0 -26
- data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +0 -26
- data/rbi/metronome_sdk/models/v1/customers/alert_list_response.rbi +0 -46
- data/rbi/metronome_sdk/models/v1/customers/commit_list_response.rbi +0 -45
- data/rbi/metronome_sdk/models/v1/customers/credit_list_response.rbi +0 -45
- data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +0 -29
- data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +0 -26
- data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +0 -26
@@ -0,0 +1,2919 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MetronomeSDK
|
4
|
+
module Models
|
5
|
+
class ContractV2 < MetronomeSDK::Internal::Type::BaseModel
|
6
|
+
# @!attribute id
|
7
|
+
#
|
8
|
+
# @return [String]
|
9
|
+
required :id, String
|
10
|
+
|
11
|
+
# @!attribute commits
|
12
|
+
#
|
13
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::Commit>]
|
14
|
+
required :commits, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::Commit] }
|
15
|
+
|
16
|
+
# @!attribute created_at
|
17
|
+
#
|
18
|
+
# @return [Time]
|
19
|
+
required :created_at, Time
|
20
|
+
|
21
|
+
# @!attribute created_by
|
22
|
+
#
|
23
|
+
# @return [String]
|
24
|
+
required :created_by, String
|
25
|
+
|
26
|
+
# @!attribute customer_id
|
27
|
+
#
|
28
|
+
# @return [String]
|
29
|
+
required :customer_id, String
|
30
|
+
|
31
|
+
# @!attribute overrides
|
32
|
+
#
|
33
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::Override>]
|
34
|
+
required :overrides, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::Override] }
|
35
|
+
|
36
|
+
# @!attribute scheduled_charges
|
37
|
+
#
|
38
|
+
# @return [Array<MetronomeSDK::Models::ScheduledCharge>]
|
39
|
+
required :scheduled_charges, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ScheduledCharge] }
|
40
|
+
|
41
|
+
# @!attribute starting_at
|
42
|
+
#
|
43
|
+
# @return [Time]
|
44
|
+
required :starting_at, Time
|
45
|
+
|
46
|
+
# @!attribute transitions
|
47
|
+
#
|
48
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::Transition>]
|
49
|
+
required :transitions, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::Transition] }
|
50
|
+
|
51
|
+
# @!attribute usage_filter
|
52
|
+
#
|
53
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::UsageFilter>]
|
54
|
+
required :usage_filter,
|
55
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::UsageFilter] }
|
56
|
+
|
57
|
+
# @!attribute usage_statement_schedule
|
58
|
+
#
|
59
|
+
# @return [MetronomeSDK::Models::ContractV2::UsageStatementSchedule]
|
60
|
+
required :usage_statement_schedule, -> { MetronomeSDK::ContractV2::UsageStatementSchedule }
|
61
|
+
|
62
|
+
# @!attribute archived_at
|
63
|
+
#
|
64
|
+
# @return [Time, nil]
|
65
|
+
optional :archived_at, Time
|
66
|
+
|
67
|
+
# @!attribute credits
|
68
|
+
#
|
69
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::Credit>, nil]
|
70
|
+
optional :credits, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::Credit] }
|
71
|
+
|
72
|
+
# @!attribute custom_fields
|
73
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
74
|
+
#
|
75
|
+
# @return [Hash{Symbol=>String}, nil]
|
76
|
+
optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
|
77
|
+
|
78
|
+
# @!attribute customer_billing_provider_configuration
|
79
|
+
# This field's availability is dependent on your client's configuration.
|
80
|
+
#
|
81
|
+
# @return [MetronomeSDK::Models::ContractV2::CustomerBillingProviderConfiguration, nil]
|
82
|
+
optional :customer_billing_provider_configuration,
|
83
|
+
-> { MetronomeSDK::ContractV2::CustomerBillingProviderConfiguration }
|
84
|
+
|
85
|
+
# @!attribute discounts
|
86
|
+
# This field's availability is dependent on your client's configuration.
|
87
|
+
#
|
88
|
+
# @return [Array<MetronomeSDK::Models::Discount>, nil]
|
89
|
+
optional :discounts, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Discount] }
|
90
|
+
|
91
|
+
# @!attribute ending_before
|
92
|
+
#
|
93
|
+
# @return [Time, nil]
|
94
|
+
optional :ending_before, Time
|
95
|
+
|
96
|
+
# @!attribute has_more
|
97
|
+
# Indicates whether there are more items than the limit for this endpoint. Use the
|
98
|
+
# respective list endpoints to get the full lists.
|
99
|
+
#
|
100
|
+
# @return [MetronomeSDK::Models::ContractV2::HasMore, nil]
|
101
|
+
optional :has_more, -> { MetronomeSDK::ContractV2::HasMore }
|
102
|
+
|
103
|
+
# @!attribute hierarchy_configuration
|
104
|
+
# Either a **parent** configuration with a list of children or a **child**
|
105
|
+
# configuration with a single parent.
|
106
|
+
#
|
107
|
+
# @return [MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration, nil]
|
108
|
+
optional :hierarchy_configuration, union: -> { MetronomeSDK::HierarchyConfiguration }
|
109
|
+
|
110
|
+
# @!attribute multiplier_override_prioritization
|
111
|
+
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
112
|
+
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
113
|
+
# each multiplier; the one with the lowest priority value will be prioritized
|
114
|
+
# first.
|
115
|
+
#
|
116
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::MultiplierOverridePrioritization, nil]
|
117
|
+
optional :multiplier_override_prioritization,
|
118
|
+
enum: -> { MetronomeSDK::ContractV2::MultiplierOverridePrioritization }
|
119
|
+
|
120
|
+
# @!attribute name
|
121
|
+
#
|
122
|
+
# @return [String, nil]
|
123
|
+
optional :name, String
|
124
|
+
|
125
|
+
# @!attribute net_payment_terms_days
|
126
|
+
#
|
127
|
+
# @return [Float, nil]
|
128
|
+
optional :net_payment_terms_days, Float
|
129
|
+
|
130
|
+
# @!attribute netsuite_sales_order_id
|
131
|
+
# This field's availability is dependent on your client's configuration.
|
132
|
+
#
|
133
|
+
# @return [String, nil]
|
134
|
+
optional :netsuite_sales_order_id, String
|
135
|
+
|
136
|
+
# @!attribute prepaid_balance_threshold_configuration
|
137
|
+
#
|
138
|
+
# @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2, nil]
|
139
|
+
optional :prepaid_balance_threshold_configuration,
|
140
|
+
-> { MetronomeSDK::PrepaidBalanceThresholdConfigurationV2 }
|
141
|
+
|
142
|
+
# @!attribute priority
|
143
|
+
# Priority of the contract.
|
144
|
+
#
|
145
|
+
# @return [Float, nil]
|
146
|
+
optional :priority, Float
|
147
|
+
|
148
|
+
# @!attribute professional_services
|
149
|
+
# This field's availability is dependent on your client's configuration.
|
150
|
+
#
|
151
|
+
# @return [Array<MetronomeSDK::Models::ProService>, nil]
|
152
|
+
optional :professional_services, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ProService] }
|
153
|
+
|
154
|
+
# @!attribute rate_card_id
|
155
|
+
#
|
156
|
+
# @return [String, nil]
|
157
|
+
optional :rate_card_id, String
|
158
|
+
|
159
|
+
# @!attribute recurring_commits
|
160
|
+
#
|
161
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::RecurringCommit>, nil]
|
162
|
+
optional :recurring_commits,
|
163
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::RecurringCommit] }
|
164
|
+
|
165
|
+
# @!attribute recurring_credits
|
166
|
+
#
|
167
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::RecurringCredit>, nil]
|
168
|
+
optional :recurring_credits,
|
169
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::RecurringCredit] }
|
170
|
+
|
171
|
+
# @!attribute reseller_royalties
|
172
|
+
# This field's availability is dependent on your client's configuration.
|
173
|
+
#
|
174
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::ResellerRoyalty>, nil]
|
175
|
+
optional :reseller_royalties,
|
176
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::ResellerRoyalty] }
|
177
|
+
|
178
|
+
# @!attribute salesforce_opportunity_id
|
179
|
+
# This field's availability is dependent on your client's configuration.
|
180
|
+
#
|
181
|
+
# @return [String, nil]
|
182
|
+
optional :salesforce_opportunity_id, String
|
183
|
+
|
184
|
+
# @!attribute scheduled_charges_on_usage_invoices
|
185
|
+
# Determines which scheduled and commit charges to consolidate onto the Contract's
|
186
|
+
# usage invoice. The charge's `timestamp` must match the usage invoice's
|
187
|
+
# `ending_before` date for consolidation to occur. This field cannot be modified
|
188
|
+
# after a Contract has been created. If this field is omitted, charges will appear
|
189
|
+
# on a separate invoice from usage charges.
|
190
|
+
#
|
191
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::ScheduledChargesOnUsageInvoices, nil]
|
192
|
+
optional :scheduled_charges_on_usage_invoices,
|
193
|
+
enum: -> { MetronomeSDK::ContractV2::ScheduledChargesOnUsageInvoices }
|
194
|
+
|
195
|
+
# @!attribute spend_threshold_configuration
|
196
|
+
#
|
197
|
+
# @return [MetronomeSDK::Models::SpendThresholdConfigurationV2, nil]
|
198
|
+
optional :spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfigurationV2 }
|
199
|
+
|
200
|
+
# @!attribute subscriptions
|
201
|
+
# List of subscriptions on the contract.
|
202
|
+
#
|
203
|
+
# @return [Array<MetronomeSDK::Models::Subscription>, nil]
|
204
|
+
optional :subscriptions, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Subscription] }
|
205
|
+
|
206
|
+
# @!attribute total_contract_value
|
207
|
+
#
|
208
|
+
# @return [Float, nil]
|
209
|
+
optional :total_contract_value, Float
|
210
|
+
|
211
|
+
# @!attribute uniqueness_key
|
212
|
+
# Optional uniqueness key to prevent duplicate contract creations.
|
213
|
+
#
|
214
|
+
# @return [String, nil]
|
215
|
+
optional :uniqueness_key, String
|
216
|
+
|
217
|
+
# @!method initialize(id:, commits:, created_at:, created_by:, customer_id:, overrides:, scheduled_charges:, starting_at:, transitions:, usage_filter:, usage_statement_schedule:, archived_at: nil, credits: nil, custom_fields: nil, customer_billing_provider_configuration: nil, discounts: nil, ending_before: nil, has_more: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, prepaid_balance_threshold_configuration: nil, priority: nil, professional_services: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, reseller_royalties: nil, salesforce_opportunity_id: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, subscriptions: nil, total_contract_value: nil, uniqueness_key: nil)
|
218
|
+
# Some parameter documentations has been truncated, see
|
219
|
+
# {MetronomeSDK::Models::ContractV2} for more details.
|
220
|
+
#
|
221
|
+
# @param id [String]
|
222
|
+
#
|
223
|
+
# @param commits [Array<MetronomeSDK::Models::ContractV2::Commit>]
|
224
|
+
#
|
225
|
+
# @param created_at [Time]
|
226
|
+
#
|
227
|
+
# @param created_by [String]
|
228
|
+
#
|
229
|
+
# @param customer_id [String]
|
230
|
+
#
|
231
|
+
# @param overrides [Array<MetronomeSDK::Models::ContractV2::Override>]
|
232
|
+
#
|
233
|
+
# @param scheduled_charges [Array<MetronomeSDK::Models::ScheduledCharge>]
|
234
|
+
#
|
235
|
+
# @param starting_at [Time]
|
236
|
+
#
|
237
|
+
# @param transitions [Array<MetronomeSDK::Models::ContractV2::Transition>]
|
238
|
+
#
|
239
|
+
# @param usage_filter [Array<MetronomeSDK::Models::ContractV2::UsageFilter>]
|
240
|
+
#
|
241
|
+
# @param usage_statement_schedule [MetronomeSDK::Models::ContractV2::UsageStatementSchedule]
|
242
|
+
#
|
243
|
+
# @param archived_at [Time]
|
244
|
+
#
|
245
|
+
# @param credits [Array<MetronomeSDK::Models::ContractV2::Credit>]
|
246
|
+
#
|
247
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
248
|
+
#
|
249
|
+
# @param customer_billing_provider_configuration [MetronomeSDK::Models::ContractV2::CustomerBillingProviderConfiguration] This field's availability is dependent on your client's configuration.
|
250
|
+
#
|
251
|
+
# @param discounts [Array<MetronomeSDK::Models::Discount>] This field's availability is dependent on your client's configuration.
|
252
|
+
#
|
253
|
+
# @param ending_before [Time]
|
254
|
+
#
|
255
|
+
# @param has_more [MetronomeSDK::Models::ContractV2::HasMore] Indicates whether there are more items than the limit for this endpoint. Use the
|
256
|
+
#
|
257
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration] Either a **parent** configuration with a list of children or a **child** configu
|
258
|
+
#
|
259
|
+
# @param multiplier_override_prioritization [Symbol, MetronomeSDK::Models::ContractV2::MultiplierOverridePrioritization] Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list price
|
260
|
+
#
|
261
|
+
# @param name [String]
|
262
|
+
#
|
263
|
+
# @param net_payment_terms_days [Float]
|
264
|
+
#
|
265
|
+
# @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
|
266
|
+
#
|
267
|
+
# @param prepaid_balance_threshold_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2]
|
268
|
+
#
|
269
|
+
# @param priority [Float] Priority of the contract.
|
270
|
+
#
|
271
|
+
# @param professional_services [Array<MetronomeSDK::Models::ProService>] This field's availability is dependent on your client's configuration.
|
272
|
+
#
|
273
|
+
# @param rate_card_id [String]
|
274
|
+
#
|
275
|
+
# @param recurring_commits [Array<MetronomeSDK::Models::ContractV2::RecurringCommit>]
|
276
|
+
#
|
277
|
+
# @param recurring_credits [Array<MetronomeSDK::Models::ContractV2::RecurringCredit>]
|
278
|
+
#
|
279
|
+
# @param reseller_royalties [Array<MetronomeSDK::Models::ContractV2::ResellerRoyalty>] This field's availability is dependent on your client's configuration.
|
280
|
+
#
|
281
|
+
# @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
|
282
|
+
#
|
283
|
+
# @param scheduled_charges_on_usage_invoices [Symbol, MetronomeSDK::Models::ContractV2::ScheduledChargesOnUsageInvoices] Determines which scheduled and commit charges to consolidate onto the Contract's
|
284
|
+
#
|
285
|
+
# @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfigurationV2]
|
286
|
+
#
|
287
|
+
# @param subscriptions [Array<MetronomeSDK::Models::Subscription>] List of subscriptions on the contract.
|
288
|
+
#
|
289
|
+
# @param total_contract_value [Float]
|
290
|
+
#
|
291
|
+
# @param uniqueness_key [String] Optional uniqueness key to prevent duplicate contract creations.
|
292
|
+
|
293
|
+
class Commit < MetronomeSDK::Internal::Type::BaseModel
|
294
|
+
# @!attribute id
|
295
|
+
#
|
296
|
+
# @return [String]
|
297
|
+
required :id, String
|
298
|
+
|
299
|
+
# @!attribute created_at
|
300
|
+
# Timestamp of when the commit was created.
|
301
|
+
#
|
302
|
+
# - Recurring commits: latter of commit service period date and parent commit
|
303
|
+
# start date
|
304
|
+
# - Rollover commits: when the new contract started
|
305
|
+
#
|
306
|
+
# @return [Time]
|
307
|
+
required :created_at, Time
|
308
|
+
|
309
|
+
# @!attribute product
|
310
|
+
#
|
311
|
+
# @return [MetronomeSDK::Models::ContractV2::Commit::Product]
|
312
|
+
required :product, -> { MetronomeSDK::ContractV2::Commit::Product }
|
313
|
+
|
314
|
+
# @!attribute type
|
315
|
+
#
|
316
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Type]
|
317
|
+
required :type, enum: -> { MetronomeSDK::ContractV2::Commit::Type }
|
318
|
+
|
319
|
+
# @!attribute access_schedule
|
320
|
+
# The schedule that the customer will gain access to the credits purposed with
|
321
|
+
# this commit.
|
322
|
+
#
|
323
|
+
# @return [MetronomeSDK::Models::ScheduleDuration, nil]
|
324
|
+
optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }
|
325
|
+
|
326
|
+
# @!attribute applicable_contract_ids
|
327
|
+
#
|
328
|
+
# @return [Array<String>, nil]
|
329
|
+
optional :applicable_contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
330
|
+
|
331
|
+
# @!attribute applicable_product_ids
|
332
|
+
#
|
333
|
+
# @return [Array<String>, nil]
|
334
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
335
|
+
|
336
|
+
# @!attribute applicable_product_tags
|
337
|
+
#
|
338
|
+
# @return [Array<String>, nil]
|
339
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
340
|
+
|
341
|
+
# @!attribute archived_at
|
342
|
+
#
|
343
|
+
# @return [Time, nil]
|
344
|
+
optional :archived_at, Time
|
345
|
+
|
346
|
+
# @!attribute balance
|
347
|
+
# The current balance of the credit or commit. This balance reflects the amount of
|
348
|
+
# credit or commit that the customer has access to use at this moment - thus,
|
349
|
+
# expired and upcoming credit or commit segments contribute 0 to the balance. The
|
350
|
+
# balance will match the sum of all ledger entries with the exception of the case
|
351
|
+
# where the sum of negative manual ledger entries exceeds the positive amount
|
352
|
+
# remaining on the credit or commit - in that case, the balance will be 0. All
|
353
|
+
# manual ledger entries associated with active credit or commit segments are
|
354
|
+
# included in the balance, including future-dated manual ledger entries.
|
355
|
+
#
|
356
|
+
# @return [Float, nil]
|
357
|
+
optional :balance, Float
|
358
|
+
|
359
|
+
# @!attribute contract
|
360
|
+
#
|
361
|
+
# @return [MetronomeSDK::Models::ContractV2::Commit::Contract, nil]
|
362
|
+
optional :contract, -> { MetronomeSDK::ContractV2::Commit::Contract }
|
363
|
+
|
364
|
+
# @!attribute custom_fields
|
365
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
366
|
+
#
|
367
|
+
# @return [Hash{Symbol=>String}, nil]
|
368
|
+
optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
|
369
|
+
|
370
|
+
# @!attribute description
|
371
|
+
#
|
372
|
+
# @return [String, nil]
|
373
|
+
optional :description, String
|
374
|
+
|
375
|
+
# @!attribute hierarchy_configuration
|
376
|
+
# Optional configuration for commit hierarchy access control
|
377
|
+
#
|
378
|
+
# @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
|
379
|
+
optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
|
380
|
+
|
381
|
+
# @!attribute invoice_contract
|
382
|
+
# The contract that this commit will be billed on.
|
383
|
+
#
|
384
|
+
# @return [MetronomeSDK::Models::ContractV2::Commit::InvoiceContract, nil]
|
385
|
+
optional :invoice_contract, -> { MetronomeSDK::ContractV2::Commit::InvoiceContract }
|
386
|
+
|
387
|
+
# @!attribute invoice_schedule
|
388
|
+
# The schedule that the customer will be invoiced for this commit.
|
389
|
+
#
|
390
|
+
# @return [MetronomeSDK::Models::SchedulePointInTime, nil]
|
391
|
+
optional :invoice_schedule, -> { MetronomeSDK::SchedulePointInTime }
|
392
|
+
|
393
|
+
# @!attribute ledger
|
394
|
+
# A list of ordered events that impact the balance of a commit. For example, an
|
395
|
+
# invoice deduction or a rollover.
|
396
|
+
#
|
397
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry>, nil]
|
398
|
+
optional :ledger,
|
399
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[union: MetronomeSDK::ContractV2::Commit::Ledger] }
|
400
|
+
|
401
|
+
# @!attribute name
|
402
|
+
#
|
403
|
+
# @return [String, nil]
|
404
|
+
optional :name, String
|
405
|
+
|
406
|
+
# @!attribute netsuite_sales_order_id
|
407
|
+
# This field's availability is dependent on your client's configuration.
|
408
|
+
#
|
409
|
+
# @return [String, nil]
|
410
|
+
optional :netsuite_sales_order_id, String
|
411
|
+
|
412
|
+
# @!attribute priority
|
413
|
+
# If multiple credits or commits are applicable, the one with the lower priority
|
414
|
+
# will apply first.
|
415
|
+
#
|
416
|
+
# @return [Float, nil]
|
417
|
+
optional :priority, Float
|
418
|
+
|
419
|
+
# @!attribute rate_type
|
420
|
+
#
|
421
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::RateType, nil]
|
422
|
+
optional :rate_type, enum: -> { MetronomeSDK::ContractV2::Commit::RateType }
|
423
|
+
|
424
|
+
# @!attribute rolled_over_from
|
425
|
+
#
|
426
|
+
# @return [MetronomeSDK::Models::ContractV2::Commit::RolledOverFrom, nil]
|
427
|
+
optional :rolled_over_from, -> { MetronomeSDK::ContractV2::Commit::RolledOverFrom }
|
428
|
+
|
429
|
+
# @!attribute rollover_fraction
|
430
|
+
#
|
431
|
+
# @return [Float, nil]
|
432
|
+
optional :rollover_fraction, Float
|
433
|
+
|
434
|
+
# @!attribute salesforce_opportunity_id
|
435
|
+
# This field's availability is dependent on your client's configuration.
|
436
|
+
#
|
437
|
+
# @return [String, nil]
|
438
|
+
optional :salesforce_opportunity_id, String
|
439
|
+
|
440
|
+
# @!attribute specifiers
|
441
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
442
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
443
|
+
# specifiers to contribute to a commit's or credit's drawdown.
|
444
|
+
#
|
445
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
|
446
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
|
447
|
+
|
448
|
+
# @!method initialize(id:, created_at:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_contract: nil, invoice_schedule: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rolled_over_from: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil)
|
449
|
+
# Some parameter documentations has been truncated, see
|
450
|
+
# {MetronomeSDK::Models::ContractV2::Commit} for more details.
|
451
|
+
#
|
452
|
+
# @param id [String]
|
453
|
+
#
|
454
|
+
# @param created_at [Time] Timestamp of when the commit was created.
|
455
|
+
#
|
456
|
+
# @param product [MetronomeSDK::Models::ContractV2::Commit::Product]
|
457
|
+
#
|
458
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Type]
|
459
|
+
#
|
460
|
+
# @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits purposed with thi
|
461
|
+
#
|
462
|
+
# @param applicable_contract_ids [Array<String>]
|
463
|
+
#
|
464
|
+
# @param applicable_product_ids [Array<String>]
|
465
|
+
#
|
466
|
+
# @param applicable_product_tags [Array<String>]
|
467
|
+
#
|
468
|
+
# @param archived_at [Time]
|
469
|
+
#
|
470
|
+
# @param balance [Float] The current balance of the credit or commit. This balance reflects the amount of
|
471
|
+
#
|
472
|
+
# @param contract [MetronomeSDK::Models::ContractV2::Commit::Contract]
|
473
|
+
#
|
474
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
475
|
+
#
|
476
|
+
# @param description [String]
|
477
|
+
#
|
478
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
|
479
|
+
#
|
480
|
+
# @param invoice_contract [MetronomeSDK::Models::ContractV2::Commit::InvoiceContract] The contract that this commit will be billed on.
|
481
|
+
#
|
482
|
+
# @param invoice_schedule [MetronomeSDK::Models::SchedulePointInTime] The schedule that the customer will be invoiced for this commit.
|
483
|
+
#
|
484
|
+
# @param ledger [Array<MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry>] A list of ordered events that impact the balance of a commit. For example, an in
|
485
|
+
#
|
486
|
+
# @param name [String]
|
487
|
+
#
|
488
|
+
# @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
|
489
|
+
#
|
490
|
+
# @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
|
491
|
+
#
|
492
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::ContractV2::Commit::RateType]
|
493
|
+
#
|
494
|
+
# @param rolled_over_from [MetronomeSDK::Models::ContractV2::Commit::RolledOverFrom]
|
495
|
+
#
|
496
|
+
# @param rollover_fraction [Float]
|
497
|
+
#
|
498
|
+
# @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
|
499
|
+
#
|
500
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
|
501
|
+
|
502
|
+
# @see MetronomeSDK::Models::ContractV2::Commit#product
|
503
|
+
class Product < MetronomeSDK::Internal::Type::BaseModel
|
504
|
+
# @!attribute id
|
505
|
+
#
|
506
|
+
# @return [String]
|
507
|
+
required :id, String
|
508
|
+
|
509
|
+
# @!attribute name
|
510
|
+
#
|
511
|
+
# @return [String]
|
512
|
+
required :name, String
|
513
|
+
|
514
|
+
# @!method initialize(id:, name:)
|
515
|
+
# @param id [String]
|
516
|
+
# @param name [String]
|
517
|
+
end
|
518
|
+
|
519
|
+
# @see MetronomeSDK::Models::ContractV2::Commit#type
|
520
|
+
module Type
|
521
|
+
extend MetronomeSDK::Internal::Type::Enum
|
522
|
+
|
523
|
+
PREPAID = :PREPAID
|
524
|
+
POSTPAID = :POSTPAID
|
525
|
+
|
526
|
+
# @!method self.values
|
527
|
+
# @return [Array<Symbol>]
|
528
|
+
end
|
529
|
+
|
530
|
+
# @see MetronomeSDK::Models::ContractV2::Commit#contract
|
531
|
+
class Contract < MetronomeSDK::Internal::Type::BaseModel
|
532
|
+
# @!attribute id
|
533
|
+
#
|
534
|
+
# @return [String]
|
535
|
+
required :id, String
|
536
|
+
|
537
|
+
# @!method initialize(id:)
|
538
|
+
# @param id [String]
|
539
|
+
end
|
540
|
+
|
541
|
+
# @see MetronomeSDK::Models::ContractV2::Commit#invoice_contract
|
542
|
+
class InvoiceContract < MetronomeSDK::Internal::Type::BaseModel
|
543
|
+
# @!attribute id
|
544
|
+
#
|
545
|
+
# @return [String]
|
546
|
+
required :id, String
|
547
|
+
|
548
|
+
# @!method initialize(id:)
|
549
|
+
# The contract that this commit will be billed on.
|
550
|
+
#
|
551
|
+
# @param id [String]
|
552
|
+
end
|
553
|
+
|
554
|
+
module Ledger
|
555
|
+
extend MetronomeSDK::Internal::Type::Union
|
556
|
+
|
557
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry }
|
558
|
+
|
559
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry }
|
560
|
+
|
561
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry }
|
562
|
+
|
563
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry }
|
564
|
+
|
565
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry }
|
566
|
+
|
567
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry }
|
568
|
+
|
569
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry }
|
570
|
+
|
571
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry }
|
572
|
+
|
573
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry }
|
574
|
+
|
575
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry }
|
576
|
+
|
577
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry }
|
578
|
+
|
579
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry }
|
580
|
+
|
581
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry }
|
582
|
+
|
583
|
+
variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry }
|
584
|
+
|
585
|
+
class PrepaidCommitSegmentStartLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
586
|
+
# @!attribute amount
|
587
|
+
#
|
588
|
+
# @return [Float]
|
589
|
+
required :amount, Float
|
590
|
+
|
591
|
+
# @!attribute segment_id
|
592
|
+
#
|
593
|
+
# @return [String]
|
594
|
+
required :segment_id, String
|
595
|
+
|
596
|
+
# @!attribute timestamp
|
597
|
+
#
|
598
|
+
# @return [Time]
|
599
|
+
required :timestamp, Time
|
600
|
+
|
601
|
+
# @!attribute type
|
602
|
+
#
|
603
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry::Type]
|
604
|
+
required :type,
|
605
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry::Type }
|
606
|
+
|
607
|
+
# @!method initialize(amount:, segment_id:, timestamp:, type:)
|
608
|
+
# @param amount [Float]
|
609
|
+
# @param segment_id [String]
|
610
|
+
# @param timestamp [Time]
|
611
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry::Type]
|
612
|
+
|
613
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry#type
|
614
|
+
module Type
|
615
|
+
extend MetronomeSDK::Internal::Type::Enum
|
616
|
+
|
617
|
+
PREPAID_COMMIT_SEGMENT_START = :PREPAID_COMMIT_SEGMENT_START
|
618
|
+
|
619
|
+
# @!method self.values
|
620
|
+
# @return [Array<Symbol>]
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
|
+
class PrepaidCommitAutomatedInvoiceDeductionLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
625
|
+
# @!attribute amount
|
626
|
+
#
|
627
|
+
# @return [Float]
|
628
|
+
required :amount, Float
|
629
|
+
|
630
|
+
# @!attribute invoice_id
|
631
|
+
#
|
632
|
+
# @return [String]
|
633
|
+
required :invoice_id, String
|
634
|
+
|
635
|
+
# @!attribute segment_id
|
636
|
+
#
|
637
|
+
# @return [String]
|
638
|
+
required :segment_id, String
|
639
|
+
|
640
|
+
# @!attribute timestamp
|
641
|
+
#
|
642
|
+
# @return [Time]
|
643
|
+
required :timestamp, Time
|
644
|
+
|
645
|
+
# @!attribute type
|
646
|
+
#
|
647
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
|
648
|
+
required :type,
|
649
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type }
|
650
|
+
|
651
|
+
# @!attribute contract_id
|
652
|
+
#
|
653
|
+
# @return [String, nil]
|
654
|
+
optional :contract_id, String
|
655
|
+
|
656
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
657
|
+
# @param amount [Float]
|
658
|
+
# @param invoice_id [String]
|
659
|
+
# @param segment_id [String]
|
660
|
+
# @param timestamp [Time]
|
661
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
|
662
|
+
# @param contract_id [String]
|
663
|
+
|
664
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry#type
|
665
|
+
module Type
|
666
|
+
extend MetronomeSDK::Internal::Type::Enum
|
667
|
+
|
668
|
+
PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION = :PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION
|
669
|
+
|
670
|
+
# @!method self.values
|
671
|
+
# @return [Array<Symbol>]
|
672
|
+
end
|
673
|
+
end
|
674
|
+
|
675
|
+
class PrepaidCommitRolloverLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
676
|
+
# @!attribute amount
|
677
|
+
#
|
678
|
+
# @return [Float]
|
679
|
+
required :amount, Float
|
680
|
+
|
681
|
+
# @!attribute new_contract_id
|
682
|
+
#
|
683
|
+
# @return [String]
|
684
|
+
required :new_contract_id, String
|
685
|
+
|
686
|
+
# @!attribute segment_id
|
687
|
+
#
|
688
|
+
# @return [String]
|
689
|
+
required :segment_id, String
|
690
|
+
|
691
|
+
# @!attribute timestamp
|
692
|
+
#
|
693
|
+
# @return [Time]
|
694
|
+
required :timestamp, Time
|
695
|
+
|
696
|
+
# @!attribute type
|
697
|
+
#
|
698
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry::Type]
|
699
|
+
required :type,
|
700
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry::Type }
|
701
|
+
|
702
|
+
# @!method initialize(amount:, new_contract_id:, segment_id:, timestamp:, type:)
|
703
|
+
# @param amount [Float]
|
704
|
+
# @param new_contract_id [String]
|
705
|
+
# @param segment_id [String]
|
706
|
+
# @param timestamp [Time]
|
707
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry::Type]
|
708
|
+
|
709
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry#type
|
710
|
+
module Type
|
711
|
+
extend MetronomeSDK::Internal::Type::Enum
|
712
|
+
|
713
|
+
PREPAID_COMMIT_ROLLOVER = :PREPAID_COMMIT_ROLLOVER
|
714
|
+
|
715
|
+
# @!method self.values
|
716
|
+
# @return [Array<Symbol>]
|
717
|
+
end
|
718
|
+
end
|
719
|
+
|
720
|
+
class PrepaidCommitExpirationLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
721
|
+
# @!attribute amount
|
722
|
+
#
|
723
|
+
# @return [Float]
|
724
|
+
required :amount, Float
|
725
|
+
|
726
|
+
# @!attribute segment_id
|
727
|
+
#
|
728
|
+
# @return [String]
|
729
|
+
required :segment_id, String
|
730
|
+
|
731
|
+
# @!attribute timestamp
|
732
|
+
#
|
733
|
+
# @return [Time]
|
734
|
+
required :timestamp, Time
|
735
|
+
|
736
|
+
# @!attribute type
|
737
|
+
#
|
738
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry::Type]
|
739
|
+
required :type,
|
740
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry::Type }
|
741
|
+
|
742
|
+
# @!method initialize(amount:, segment_id:, timestamp:, type:)
|
743
|
+
# @param amount [Float]
|
744
|
+
# @param segment_id [String]
|
745
|
+
# @param timestamp [Time]
|
746
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry::Type]
|
747
|
+
|
748
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry#type
|
749
|
+
module Type
|
750
|
+
extend MetronomeSDK::Internal::Type::Enum
|
751
|
+
|
752
|
+
PREPAID_COMMIT_EXPIRATION = :PREPAID_COMMIT_EXPIRATION
|
753
|
+
|
754
|
+
# @!method self.values
|
755
|
+
# @return [Array<Symbol>]
|
756
|
+
end
|
757
|
+
end
|
758
|
+
|
759
|
+
class PrepaidCommitCanceledLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
760
|
+
# @!attribute amount
|
761
|
+
#
|
762
|
+
# @return [Float]
|
763
|
+
required :amount, Float
|
764
|
+
|
765
|
+
# @!attribute invoice_id
|
766
|
+
#
|
767
|
+
# @return [String]
|
768
|
+
required :invoice_id, String
|
769
|
+
|
770
|
+
# @!attribute segment_id
|
771
|
+
#
|
772
|
+
# @return [String]
|
773
|
+
required :segment_id, String
|
774
|
+
|
775
|
+
# @!attribute timestamp
|
776
|
+
#
|
777
|
+
# @return [Time]
|
778
|
+
required :timestamp, Time
|
779
|
+
|
780
|
+
# @!attribute type
|
781
|
+
#
|
782
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type]
|
783
|
+
required :type,
|
784
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type }
|
785
|
+
|
786
|
+
# @!attribute contract_id
|
787
|
+
#
|
788
|
+
# @return [String, nil]
|
789
|
+
optional :contract_id, String
|
790
|
+
|
791
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
792
|
+
# @param amount [Float]
|
793
|
+
# @param invoice_id [String]
|
794
|
+
# @param segment_id [String]
|
795
|
+
# @param timestamp [Time]
|
796
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type]
|
797
|
+
# @param contract_id [String]
|
798
|
+
|
799
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry#type
|
800
|
+
module Type
|
801
|
+
extend MetronomeSDK::Internal::Type::Enum
|
802
|
+
|
803
|
+
PREPAID_COMMIT_CANCELED = :PREPAID_COMMIT_CANCELED
|
804
|
+
|
805
|
+
# @!method self.values
|
806
|
+
# @return [Array<Symbol>]
|
807
|
+
end
|
808
|
+
end
|
809
|
+
|
810
|
+
class PrepaidCommitCreditedLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
811
|
+
# @!attribute amount
|
812
|
+
#
|
813
|
+
# @return [Float]
|
814
|
+
required :amount, Float
|
815
|
+
|
816
|
+
# @!attribute invoice_id
|
817
|
+
#
|
818
|
+
# @return [String]
|
819
|
+
required :invoice_id, String
|
820
|
+
|
821
|
+
# @!attribute segment_id
|
822
|
+
#
|
823
|
+
# @return [String]
|
824
|
+
required :segment_id, String
|
825
|
+
|
826
|
+
# @!attribute timestamp
|
827
|
+
#
|
828
|
+
# @return [Time]
|
829
|
+
required :timestamp, Time
|
830
|
+
|
831
|
+
# @!attribute type
|
832
|
+
#
|
833
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type]
|
834
|
+
required :type,
|
835
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type }
|
836
|
+
|
837
|
+
# @!attribute contract_id
|
838
|
+
#
|
839
|
+
# @return [String, nil]
|
840
|
+
optional :contract_id, String
|
841
|
+
|
842
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
843
|
+
# @param amount [Float]
|
844
|
+
# @param invoice_id [String]
|
845
|
+
# @param segment_id [String]
|
846
|
+
# @param timestamp [Time]
|
847
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type]
|
848
|
+
# @param contract_id [String]
|
849
|
+
|
850
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry#type
|
851
|
+
module Type
|
852
|
+
extend MetronomeSDK::Internal::Type::Enum
|
853
|
+
|
854
|
+
PREPAID_COMMIT_CREDITED = :PREPAID_COMMIT_CREDITED
|
855
|
+
|
856
|
+
# @!method self.values
|
857
|
+
# @return [Array<Symbol>]
|
858
|
+
end
|
859
|
+
end
|
860
|
+
|
861
|
+
class PrepaidCommitSeatBasedAdjustmentLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
862
|
+
# @!attribute amount
|
863
|
+
#
|
864
|
+
# @return [Float]
|
865
|
+
required :amount, Float
|
866
|
+
|
867
|
+
# @!attribute segment_id
|
868
|
+
#
|
869
|
+
# @return [String]
|
870
|
+
required :segment_id, String
|
871
|
+
|
872
|
+
# @!attribute timestamp
|
873
|
+
#
|
874
|
+
# @return [Time]
|
875
|
+
required :timestamp, Time
|
876
|
+
|
877
|
+
# @!attribute type
|
878
|
+
#
|
879
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry::Type]
|
880
|
+
required :type,
|
881
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry::Type }
|
882
|
+
|
883
|
+
# @!method initialize(amount:, segment_id:, timestamp:, type:)
|
884
|
+
# @param amount [Float]
|
885
|
+
# @param segment_id [String]
|
886
|
+
# @param timestamp [Time]
|
887
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry::Type]
|
888
|
+
|
889
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry#type
|
890
|
+
module Type
|
891
|
+
extend MetronomeSDK::Internal::Type::Enum
|
892
|
+
|
893
|
+
PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT = :PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT
|
894
|
+
|
895
|
+
# @!method self.values
|
896
|
+
# @return [Array<Symbol>]
|
897
|
+
end
|
898
|
+
end
|
899
|
+
|
900
|
+
class PostpaidCommitInitialBalanceLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
901
|
+
# @!attribute amount
|
902
|
+
#
|
903
|
+
# @return [Float]
|
904
|
+
required :amount, Float
|
905
|
+
|
906
|
+
# @!attribute timestamp
|
907
|
+
#
|
908
|
+
# @return [Time]
|
909
|
+
required :timestamp, Time
|
910
|
+
|
911
|
+
# @!attribute type
|
912
|
+
#
|
913
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry::Type]
|
914
|
+
required :type,
|
915
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry::Type }
|
916
|
+
|
917
|
+
# @!method initialize(amount:, timestamp:, type:)
|
918
|
+
# @param amount [Float]
|
919
|
+
# @param timestamp [Time]
|
920
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry::Type]
|
921
|
+
|
922
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry#type
|
923
|
+
module Type
|
924
|
+
extend MetronomeSDK::Internal::Type::Enum
|
925
|
+
|
926
|
+
POSTPAID_COMMIT_INITIAL_BALANCE = :POSTPAID_COMMIT_INITIAL_BALANCE
|
927
|
+
|
928
|
+
# @!method self.values
|
929
|
+
# @return [Array<Symbol>]
|
930
|
+
end
|
931
|
+
end
|
932
|
+
|
933
|
+
class PostpaidCommitAutomatedInvoiceDeductionLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
934
|
+
# @!attribute amount
|
935
|
+
#
|
936
|
+
# @return [Float]
|
937
|
+
required :amount, Float
|
938
|
+
|
939
|
+
# @!attribute invoice_id
|
940
|
+
#
|
941
|
+
# @return [String]
|
942
|
+
required :invoice_id, String
|
943
|
+
|
944
|
+
# @!attribute segment_id
|
945
|
+
#
|
946
|
+
# @return [String]
|
947
|
+
required :segment_id, String
|
948
|
+
|
949
|
+
# @!attribute timestamp
|
950
|
+
#
|
951
|
+
# @return [Time]
|
952
|
+
required :timestamp, Time
|
953
|
+
|
954
|
+
# @!attribute type
|
955
|
+
#
|
956
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
|
957
|
+
required :type,
|
958
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type }
|
959
|
+
|
960
|
+
# @!attribute contract_id
|
961
|
+
#
|
962
|
+
# @return [String, nil]
|
963
|
+
optional :contract_id, String
|
964
|
+
|
965
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
966
|
+
# @param amount [Float]
|
967
|
+
# @param invoice_id [String]
|
968
|
+
# @param segment_id [String]
|
969
|
+
# @param timestamp [Time]
|
970
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
|
971
|
+
# @param contract_id [String]
|
972
|
+
|
973
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry#type
|
974
|
+
module Type
|
975
|
+
extend MetronomeSDK::Internal::Type::Enum
|
976
|
+
|
977
|
+
POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION = :POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION
|
978
|
+
|
979
|
+
# @!method self.values
|
980
|
+
# @return [Array<Symbol>]
|
981
|
+
end
|
982
|
+
end
|
983
|
+
|
984
|
+
class PostpaidCommitRolloverLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
985
|
+
# @!attribute amount
|
986
|
+
#
|
987
|
+
# @return [Float]
|
988
|
+
required :amount, Float
|
989
|
+
|
990
|
+
# @!attribute new_contract_id
|
991
|
+
#
|
992
|
+
# @return [String]
|
993
|
+
required :new_contract_id, String
|
994
|
+
|
995
|
+
# @!attribute segment_id
|
996
|
+
#
|
997
|
+
# @return [String]
|
998
|
+
required :segment_id, String
|
999
|
+
|
1000
|
+
# @!attribute timestamp
|
1001
|
+
#
|
1002
|
+
# @return [Time]
|
1003
|
+
required :timestamp, Time
|
1004
|
+
|
1005
|
+
# @!attribute type
|
1006
|
+
#
|
1007
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry::Type]
|
1008
|
+
required :type,
|
1009
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry::Type }
|
1010
|
+
|
1011
|
+
# @!method initialize(amount:, new_contract_id:, segment_id:, timestamp:, type:)
|
1012
|
+
# @param amount [Float]
|
1013
|
+
# @param new_contract_id [String]
|
1014
|
+
# @param segment_id [String]
|
1015
|
+
# @param timestamp [Time]
|
1016
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry::Type]
|
1017
|
+
|
1018
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry#type
|
1019
|
+
module Type
|
1020
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1021
|
+
|
1022
|
+
POSTPAID_COMMIT_ROLLOVER = :POSTPAID_COMMIT_ROLLOVER
|
1023
|
+
|
1024
|
+
# @!method self.values
|
1025
|
+
# @return [Array<Symbol>]
|
1026
|
+
end
|
1027
|
+
end
|
1028
|
+
|
1029
|
+
class PostpaidCommitTrueupLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
1030
|
+
# @!attribute amount
|
1031
|
+
#
|
1032
|
+
# @return [Float]
|
1033
|
+
required :amount, Float
|
1034
|
+
|
1035
|
+
# @!attribute invoice_id
|
1036
|
+
#
|
1037
|
+
# @return [String]
|
1038
|
+
required :invoice_id, String
|
1039
|
+
|
1040
|
+
# @!attribute timestamp
|
1041
|
+
#
|
1042
|
+
# @return [Time]
|
1043
|
+
required :timestamp, Time
|
1044
|
+
|
1045
|
+
# @!attribute type
|
1046
|
+
#
|
1047
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type]
|
1048
|
+
required :type,
|
1049
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type }
|
1050
|
+
|
1051
|
+
# @!attribute contract_id
|
1052
|
+
#
|
1053
|
+
# @return [String, nil]
|
1054
|
+
optional :contract_id, String
|
1055
|
+
|
1056
|
+
# @!method initialize(amount:, invoice_id:, timestamp:, type:, contract_id: nil)
|
1057
|
+
# @param amount [Float]
|
1058
|
+
# @param invoice_id [String]
|
1059
|
+
# @param timestamp [Time]
|
1060
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type]
|
1061
|
+
# @param contract_id [String]
|
1062
|
+
|
1063
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry#type
|
1064
|
+
module Type
|
1065
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1066
|
+
|
1067
|
+
POSTPAID_COMMIT_TRUEUP = :POSTPAID_COMMIT_TRUEUP
|
1068
|
+
|
1069
|
+
# @!method self.values
|
1070
|
+
# @return [Array<Symbol>]
|
1071
|
+
end
|
1072
|
+
end
|
1073
|
+
|
1074
|
+
class PrepaidCommitManualLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
1075
|
+
# @!attribute amount
|
1076
|
+
#
|
1077
|
+
# @return [Float]
|
1078
|
+
required :amount, Float
|
1079
|
+
|
1080
|
+
# @!attribute reason
|
1081
|
+
#
|
1082
|
+
# @return [String]
|
1083
|
+
required :reason, String
|
1084
|
+
|
1085
|
+
# @!attribute timestamp
|
1086
|
+
#
|
1087
|
+
# @return [Time]
|
1088
|
+
required :timestamp, Time
|
1089
|
+
|
1090
|
+
# @!attribute type
|
1091
|
+
#
|
1092
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry::Type]
|
1093
|
+
required :type,
|
1094
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry::Type }
|
1095
|
+
|
1096
|
+
# @!method initialize(amount:, reason:, timestamp:, type:)
|
1097
|
+
# @param amount [Float]
|
1098
|
+
# @param reason [String]
|
1099
|
+
# @param timestamp [Time]
|
1100
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry::Type]
|
1101
|
+
|
1102
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry#type
|
1103
|
+
module Type
|
1104
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1105
|
+
|
1106
|
+
PREPAID_COMMIT_MANUAL = :PREPAID_COMMIT_MANUAL
|
1107
|
+
|
1108
|
+
# @!method self.values
|
1109
|
+
# @return [Array<Symbol>]
|
1110
|
+
end
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
class PostpaidCommitManualLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
1114
|
+
# @!attribute amount
|
1115
|
+
#
|
1116
|
+
# @return [Float]
|
1117
|
+
required :amount, Float
|
1118
|
+
|
1119
|
+
# @!attribute reason
|
1120
|
+
#
|
1121
|
+
# @return [String]
|
1122
|
+
required :reason, String
|
1123
|
+
|
1124
|
+
# @!attribute timestamp
|
1125
|
+
#
|
1126
|
+
# @return [Time]
|
1127
|
+
required :timestamp, Time
|
1128
|
+
|
1129
|
+
# @!attribute type
|
1130
|
+
#
|
1131
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry::Type]
|
1132
|
+
required :type,
|
1133
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry::Type }
|
1134
|
+
|
1135
|
+
# @!method initialize(amount:, reason:, timestamp:, type:)
|
1136
|
+
# @param amount [Float]
|
1137
|
+
# @param reason [String]
|
1138
|
+
# @param timestamp [Time]
|
1139
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry::Type]
|
1140
|
+
|
1141
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry#type
|
1142
|
+
module Type
|
1143
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1144
|
+
|
1145
|
+
POSTPAID_COMMIT_MANUAL = :POSTPAID_COMMIT_MANUAL
|
1146
|
+
|
1147
|
+
# @!method self.values
|
1148
|
+
# @return [Array<Symbol>]
|
1149
|
+
end
|
1150
|
+
end
|
1151
|
+
|
1152
|
+
class PostpaidCommitExpirationLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
1153
|
+
# @!attribute amount
|
1154
|
+
#
|
1155
|
+
# @return [Float]
|
1156
|
+
required :amount, Float
|
1157
|
+
|
1158
|
+
# @!attribute timestamp
|
1159
|
+
#
|
1160
|
+
# @return [Time]
|
1161
|
+
required :timestamp, Time
|
1162
|
+
|
1163
|
+
# @!attribute type
|
1164
|
+
#
|
1165
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry::Type]
|
1166
|
+
required :type,
|
1167
|
+
enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry::Type }
|
1168
|
+
|
1169
|
+
# @!method initialize(amount:, timestamp:, type:)
|
1170
|
+
# @param amount [Float]
|
1171
|
+
# @param timestamp [Time]
|
1172
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry::Type]
|
1173
|
+
|
1174
|
+
# @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry#type
|
1175
|
+
module Type
|
1176
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1177
|
+
|
1178
|
+
POSTPAID_COMMIT_EXPIRATION = :POSTPAID_COMMIT_EXPIRATION
|
1179
|
+
|
1180
|
+
# @!method self.values
|
1181
|
+
# @return [Array<Symbol>]
|
1182
|
+
end
|
1183
|
+
end
|
1184
|
+
|
1185
|
+
# @!method self.variants
|
1186
|
+
# @return [Array(MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry)]
|
1187
|
+
end
|
1188
|
+
|
1189
|
+
# @see MetronomeSDK::Models::ContractV2::Commit#rate_type
|
1190
|
+
module RateType
|
1191
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1192
|
+
|
1193
|
+
COMMIT_RATE = :COMMIT_RATE
|
1194
|
+
LIST_RATE = :LIST_RATE
|
1195
|
+
|
1196
|
+
# @!method self.values
|
1197
|
+
# @return [Array<Symbol>]
|
1198
|
+
end
|
1199
|
+
|
1200
|
+
# @see MetronomeSDK::Models::ContractV2::Commit#rolled_over_from
|
1201
|
+
class RolledOverFrom < MetronomeSDK::Internal::Type::BaseModel
|
1202
|
+
# @!attribute commit_id
|
1203
|
+
#
|
1204
|
+
# @return [String]
|
1205
|
+
required :commit_id, String
|
1206
|
+
|
1207
|
+
# @!attribute contract_id
|
1208
|
+
#
|
1209
|
+
# @return [String]
|
1210
|
+
required :contract_id, String
|
1211
|
+
|
1212
|
+
# @!method initialize(commit_id:, contract_id:)
|
1213
|
+
# @param commit_id [String]
|
1214
|
+
# @param contract_id [String]
|
1215
|
+
end
|
1216
|
+
end
|
1217
|
+
|
1218
|
+
class Override < MetronomeSDK::Internal::Type::BaseModel
|
1219
|
+
# @!attribute id
|
1220
|
+
#
|
1221
|
+
# @return [String]
|
1222
|
+
required :id, String
|
1223
|
+
|
1224
|
+
# @!attribute starting_at
|
1225
|
+
#
|
1226
|
+
# @return [Time]
|
1227
|
+
required :starting_at, Time
|
1228
|
+
|
1229
|
+
# @!attribute applicable_product_tags
|
1230
|
+
#
|
1231
|
+
# @return [Array<String>, nil]
|
1232
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
1233
|
+
|
1234
|
+
# @!attribute ending_before
|
1235
|
+
#
|
1236
|
+
# @return [Time, nil]
|
1237
|
+
optional :ending_before, Time
|
1238
|
+
|
1239
|
+
# @!attribute entitled
|
1240
|
+
#
|
1241
|
+
# @return [Boolean, nil]
|
1242
|
+
optional :entitled, MetronomeSDK::Internal::Type::Boolean
|
1243
|
+
|
1244
|
+
# @!attribute is_commit_specific
|
1245
|
+
#
|
1246
|
+
# @return [Boolean, nil]
|
1247
|
+
optional :is_commit_specific, MetronomeSDK::Internal::Type::Boolean
|
1248
|
+
|
1249
|
+
# @!attribute multiplier
|
1250
|
+
#
|
1251
|
+
# @return [Float, nil]
|
1252
|
+
optional :multiplier, Float
|
1253
|
+
|
1254
|
+
# @!attribute override_specifiers
|
1255
|
+
#
|
1256
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::Override::OverrideSpecifier>, nil]
|
1257
|
+
optional :override_specifiers,
|
1258
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::Override::OverrideSpecifier] }
|
1259
|
+
|
1260
|
+
# @!attribute override_tiers
|
1261
|
+
#
|
1262
|
+
# @return [Array<MetronomeSDK::Models::OverrideTier>, nil]
|
1263
|
+
optional :override_tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::OverrideTier] }
|
1264
|
+
|
1265
|
+
# @!attribute overwrite_rate
|
1266
|
+
#
|
1267
|
+
# @return [MetronomeSDK::Models::OverwriteRate, nil]
|
1268
|
+
optional :overwrite_rate, -> { MetronomeSDK::OverwriteRate }
|
1269
|
+
|
1270
|
+
# @!attribute priority
|
1271
|
+
#
|
1272
|
+
# @return [Float, nil]
|
1273
|
+
optional :priority, Float
|
1274
|
+
|
1275
|
+
# @!attribute product
|
1276
|
+
#
|
1277
|
+
# @return [MetronomeSDK::Models::ContractV2::Override::Product, nil]
|
1278
|
+
optional :product, -> { MetronomeSDK::ContractV2::Override::Product }
|
1279
|
+
|
1280
|
+
# @!attribute target
|
1281
|
+
#
|
1282
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Override::Target, nil]
|
1283
|
+
optional :target, enum: -> { MetronomeSDK::ContractV2::Override::Target }
|
1284
|
+
|
1285
|
+
# @!attribute type
|
1286
|
+
#
|
1287
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Override::Type, nil]
|
1288
|
+
optional :type, enum: -> { MetronomeSDK::ContractV2::Override::Type }
|
1289
|
+
|
1290
|
+
# @!method initialize(id:, starting_at:, applicable_product_tags: nil, ending_before: nil, entitled: nil, is_commit_specific: nil, multiplier: nil, override_specifiers: nil, override_tiers: nil, overwrite_rate: nil, priority: nil, product: nil, target: nil, type: nil)
|
1291
|
+
# @param id [String]
|
1292
|
+
# @param starting_at [Time]
|
1293
|
+
# @param applicable_product_tags [Array<String>]
|
1294
|
+
# @param ending_before [Time]
|
1295
|
+
# @param entitled [Boolean]
|
1296
|
+
# @param is_commit_specific [Boolean]
|
1297
|
+
# @param multiplier [Float]
|
1298
|
+
# @param override_specifiers [Array<MetronomeSDK::Models::ContractV2::Override::OverrideSpecifier>]
|
1299
|
+
# @param override_tiers [Array<MetronomeSDK::Models::OverrideTier>]
|
1300
|
+
# @param overwrite_rate [MetronomeSDK::Models::OverwriteRate]
|
1301
|
+
# @param priority [Float]
|
1302
|
+
# @param product [MetronomeSDK::Models::ContractV2::Override::Product]
|
1303
|
+
# @param target [Symbol, MetronomeSDK::Models::ContractV2::Override::Target]
|
1304
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Override::Type]
|
1305
|
+
|
1306
|
+
class OverrideSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
1307
|
+
# @!attribute billing_frequency
|
1308
|
+
#
|
1309
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Override::OverrideSpecifier::BillingFrequency, nil]
|
1310
|
+
optional :billing_frequency,
|
1311
|
+
enum: -> { MetronomeSDK::ContractV2::Override::OverrideSpecifier::BillingFrequency }
|
1312
|
+
|
1313
|
+
# @!attribute commit_ids
|
1314
|
+
#
|
1315
|
+
# @return [Array<String>, nil]
|
1316
|
+
optional :commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
1317
|
+
|
1318
|
+
# @!attribute presentation_group_values
|
1319
|
+
#
|
1320
|
+
# @return [Hash{Symbol=>String, nil}, nil]
|
1321
|
+
optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String, nil?: true]
|
1322
|
+
|
1323
|
+
# @!attribute pricing_group_values
|
1324
|
+
#
|
1325
|
+
# @return [Hash{Symbol=>String}, nil]
|
1326
|
+
optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
|
1327
|
+
|
1328
|
+
# @!attribute product_id
|
1329
|
+
#
|
1330
|
+
# @return [String, nil]
|
1331
|
+
optional :product_id, String
|
1332
|
+
|
1333
|
+
# @!attribute product_tags
|
1334
|
+
#
|
1335
|
+
# @return [Array<String>, nil]
|
1336
|
+
optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
1337
|
+
|
1338
|
+
# @!attribute recurring_commit_ids
|
1339
|
+
#
|
1340
|
+
# @return [Array<String>, nil]
|
1341
|
+
optional :recurring_commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
1342
|
+
|
1343
|
+
# @!attribute recurring_credit_ids
|
1344
|
+
#
|
1345
|
+
# @return [Array<String>, nil]
|
1346
|
+
optional :recurring_credit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
1347
|
+
|
1348
|
+
# @!method initialize(billing_frequency: nil, commit_ids: nil, presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil, recurring_commit_ids: nil, recurring_credit_ids: nil)
|
1349
|
+
# @param billing_frequency [Symbol, MetronomeSDK::Models::ContractV2::Override::OverrideSpecifier::BillingFrequency]
|
1350
|
+
# @param commit_ids [Array<String>]
|
1351
|
+
# @param presentation_group_values [Hash{Symbol=>String, nil}]
|
1352
|
+
# @param pricing_group_values [Hash{Symbol=>String}]
|
1353
|
+
# @param product_id [String]
|
1354
|
+
# @param product_tags [Array<String>]
|
1355
|
+
# @param recurring_commit_ids [Array<String>]
|
1356
|
+
# @param recurring_credit_ids [Array<String>]
|
1357
|
+
|
1358
|
+
# @see MetronomeSDK::Models::ContractV2::Override::OverrideSpecifier#billing_frequency
|
1359
|
+
module BillingFrequency
|
1360
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1361
|
+
|
1362
|
+
MONTHLY = :MONTHLY
|
1363
|
+
QUARTERLY = :QUARTERLY
|
1364
|
+
ANNUAL = :ANNUAL
|
1365
|
+
WEEKLY = :WEEKLY
|
1366
|
+
|
1367
|
+
# @!method self.values
|
1368
|
+
# @return [Array<Symbol>]
|
1369
|
+
end
|
1370
|
+
end
|
1371
|
+
|
1372
|
+
# @see MetronomeSDK::Models::ContractV2::Override#product
|
1373
|
+
class Product < MetronomeSDK::Internal::Type::BaseModel
|
1374
|
+
# @!attribute id
|
1375
|
+
#
|
1376
|
+
# @return [String]
|
1377
|
+
required :id, String
|
1378
|
+
|
1379
|
+
# @!attribute name
|
1380
|
+
#
|
1381
|
+
# @return [String]
|
1382
|
+
required :name, String
|
1383
|
+
|
1384
|
+
# @!method initialize(id:, name:)
|
1385
|
+
# @param id [String]
|
1386
|
+
# @param name [String]
|
1387
|
+
end
|
1388
|
+
|
1389
|
+
# @see MetronomeSDK::Models::ContractV2::Override#target
|
1390
|
+
module Target
|
1391
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1392
|
+
|
1393
|
+
COMMIT_RATE = :COMMIT_RATE
|
1394
|
+
LIST_RATE = :LIST_RATE
|
1395
|
+
|
1396
|
+
# @!method self.values
|
1397
|
+
# @return [Array<Symbol>]
|
1398
|
+
end
|
1399
|
+
|
1400
|
+
# @see MetronomeSDK::Models::ContractV2::Override#type
|
1401
|
+
module Type
|
1402
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1403
|
+
|
1404
|
+
OVERWRITE = :OVERWRITE
|
1405
|
+
MULTIPLIER = :MULTIPLIER
|
1406
|
+
TIERED = :TIERED
|
1407
|
+
|
1408
|
+
# @!method self.values
|
1409
|
+
# @return [Array<Symbol>]
|
1410
|
+
end
|
1411
|
+
end
|
1412
|
+
|
1413
|
+
class Transition < MetronomeSDK::Internal::Type::BaseModel
|
1414
|
+
# @!attribute from_contract_id
|
1415
|
+
#
|
1416
|
+
# @return [String]
|
1417
|
+
required :from_contract_id, String
|
1418
|
+
|
1419
|
+
# @!attribute to_contract_id
|
1420
|
+
#
|
1421
|
+
# @return [String]
|
1422
|
+
required :to_contract_id, String
|
1423
|
+
|
1424
|
+
# @!attribute type
|
1425
|
+
#
|
1426
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Transition::Type]
|
1427
|
+
required :type, enum: -> { MetronomeSDK::ContractV2::Transition::Type }
|
1428
|
+
|
1429
|
+
# @!method initialize(from_contract_id:, to_contract_id:, type:)
|
1430
|
+
# @param from_contract_id [String]
|
1431
|
+
# @param to_contract_id [String]
|
1432
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Transition::Type]
|
1433
|
+
|
1434
|
+
# @see MetronomeSDK::Models::ContractV2::Transition#type
|
1435
|
+
module Type
|
1436
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1437
|
+
|
1438
|
+
SUPERSEDE = :SUPERSEDE
|
1439
|
+
RENEWAL = :RENEWAL
|
1440
|
+
|
1441
|
+
# @!method self.values
|
1442
|
+
# @return [Array<Symbol>]
|
1443
|
+
end
|
1444
|
+
end
|
1445
|
+
|
1446
|
+
class UsageFilter < MetronomeSDK::Internal::Type::BaseModel
|
1447
|
+
# @!attribute group_key
|
1448
|
+
#
|
1449
|
+
# @return [String]
|
1450
|
+
required :group_key, String
|
1451
|
+
|
1452
|
+
# @!attribute group_values
|
1453
|
+
#
|
1454
|
+
# @return [Array<String>]
|
1455
|
+
required :group_values, MetronomeSDK::Internal::Type::ArrayOf[String]
|
1456
|
+
|
1457
|
+
# @!attribute starting_at
|
1458
|
+
# This will match contract starting_at value if usage filter is active from the
|
1459
|
+
# beginning of the contract.
|
1460
|
+
#
|
1461
|
+
# @return [Time]
|
1462
|
+
required :starting_at, Time
|
1463
|
+
|
1464
|
+
# @!attribute ending_before
|
1465
|
+
# This will match contract ending_before value if usage filter is active until the
|
1466
|
+
# end of the contract. It will be undefined if the contract is open-ended.
|
1467
|
+
#
|
1468
|
+
# @return [Time, nil]
|
1469
|
+
optional :ending_before, Time
|
1470
|
+
|
1471
|
+
# @!method initialize(group_key:, group_values:, starting_at:, ending_before: nil)
|
1472
|
+
# Some parameter documentations has been truncated, see
|
1473
|
+
# {MetronomeSDK::Models::ContractV2::UsageFilter} for more details.
|
1474
|
+
#
|
1475
|
+
# @param group_key [String]
|
1476
|
+
#
|
1477
|
+
# @param group_values [Array<String>]
|
1478
|
+
#
|
1479
|
+
# @param starting_at [Time] This will match contract starting_at value if usage filter is active from the be
|
1480
|
+
#
|
1481
|
+
# @param ending_before [Time] This will match contract ending_before value if usage filter is active until the
|
1482
|
+
end
|
1483
|
+
|
1484
|
+
# @see MetronomeSDK::Models::ContractV2#usage_statement_schedule
|
1485
|
+
class UsageStatementSchedule < MetronomeSDK::Internal::Type::BaseModel
|
1486
|
+
# @!attribute billing_anchor_date
|
1487
|
+
# Contract usage statements follow a selected cadence based on this date.
|
1488
|
+
#
|
1489
|
+
# @return [Time]
|
1490
|
+
required :billing_anchor_date, Time
|
1491
|
+
|
1492
|
+
# @!attribute frequency
|
1493
|
+
#
|
1494
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::UsageStatementSchedule::Frequency]
|
1495
|
+
required :frequency, enum: -> { MetronomeSDK::ContractV2::UsageStatementSchedule::Frequency }
|
1496
|
+
|
1497
|
+
# @!method initialize(billing_anchor_date:, frequency:)
|
1498
|
+
# @param billing_anchor_date [Time] Contract usage statements follow a selected cadence based on this date.
|
1499
|
+
#
|
1500
|
+
# @param frequency [Symbol, MetronomeSDK::Models::ContractV2::UsageStatementSchedule::Frequency]
|
1501
|
+
|
1502
|
+
# @see MetronomeSDK::Models::ContractV2::UsageStatementSchedule#frequency
|
1503
|
+
module Frequency
|
1504
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1505
|
+
|
1506
|
+
MONTHLY = :MONTHLY
|
1507
|
+
QUARTERLY = :QUARTERLY
|
1508
|
+
ANNUAL = :ANNUAL
|
1509
|
+
WEEKLY = :WEEKLY
|
1510
|
+
|
1511
|
+
# @!method self.values
|
1512
|
+
# @return [Array<Symbol>]
|
1513
|
+
end
|
1514
|
+
end
|
1515
|
+
|
1516
|
+
class Credit < MetronomeSDK::Internal::Type::BaseModel
|
1517
|
+
# @!attribute id
|
1518
|
+
#
|
1519
|
+
# @return [String]
|
1520
|
+
required :id, String
|
1521
|
+
|
1522
|
+
# @!attribute product
|
1523
|
+
#
|
1524
|
+
# @return [MetronomeSDK::Models::ContractV2::Credit::Product]
|
1525
|
+
required :product, -> { MetronomeSDK::ContractV2::Credit::Product }
|
1526
|
+
|
1527
|
+
# @!attribute type
|
1528
|
+
#
|
1529
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Credit::Type]
|
1530
|
+
required :type, enum: -> { MetronomeSDK::ContractV2::Credit::Type }
|
1531
|
+
|
1532
|
+
# @!attribute access_schedule
|
1533
|
+
# The schedule that the customer will gain access to the credits.
|
1534
|
+
#
|
1535
|
+
# @return [MetronomeSDK::Models::ScheduleDuration, nil]
|
1536
|
+
optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }
|
1537
|
+
|
1538
|
+
# @!attribute applicable_contract_ids
|
1539
|
+
#
|
1540
|
+
# @return [Array<String>, nil]
|
1541
|
+
optional :applicable_contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
1542
|
+
|
1543
|
+
# @!attribute applicable_product_ids
|
1544
|
+
#
|
1545
|
+
# @return [Array<String>, nil]
|
1546
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
1547
|
+
|
1548
|
+
# @!attribute applicable_product_tags
|
1549
|
+
#
|
1550
|
+
# @return [Array<String>, nil]
|
1551
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
1552
|
+
|
1553
|
+
# @!attribute balance
|
1554
|
+
# The current balance of the credit or commit. This balance reflects the amount of
|
1555
|
+
# credit or commit that the customer has access to use at this moment - thus,
|
1556
|
+
# expired and upcoming credit or commit segments contribute 0 to the balance. The
|
1557
|
+
# balance will match the sum of all ledger entries with the exception of the case
|
1558
|
+
# where the sum of negative manual ledger entries exceeds the positive amount
|
1559
|
+
# remaining on the credit or commit - in that case, the balance will be 0. All
|
1560
|
+
# manual ledger entries associated with active credit or commit segments are
|
1561
|
+
# included in the balance, including future-dated manual ledger entries.
|
1562
|
+
#
|
1563
|
+
# @return [Float, nil]
|
1564
|
+
optional :balance, Float
|
1565
|
+
|
1566
|
+
# @!attribute contract
|
1567
|
+
#
|
1568
|
+
# @return [MetronomeSDK::Models::ContractV2::Credit::Contract, nil]
|
1569
|
+
optional :contract, -> { MetronomeSDK::ContractV2::Credit::Contract }
|
1570
|
+
|
1571
|
+
# @!attribute custom_fields
|
1572
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
1573
|
+
#
|
1574
|
+
# @return [Hash{Symbol=>String}, nil]
|
1575
|
+
optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
|
1576
|
+
|
1577
|
+
# @!attribute description
|
1578
|
+
#
|
1579
|
+
# @return [String, nil]
|
1580
|
+
optional :description, String
|
1581
|
+
|
1582
|
+
# @!attribute hierarchy_configuration
|
1583
|
+
# Optional configuration for credit hierarchy access control
|
1584
|
+
#
|
1585
|
+
# @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
|
1586
|
+
optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
|
1587
|
+
|
1588
|
+
# @!attribute ledger
|
1589
|
+
# A list of ordered events that impact the balance of a credit. For example, an
|
1590
|
+
# invoice deduction or an expiration.
|
1591
|
+
#
|
1592
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditManualLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry>, nil]
|
1593
|
+
optional :ledger,
|
1594
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[union: MetronomeSDK::ContractV2::Credit::Ledger] }
|
1595
|
+
|
1596
|
+
# @!attribute name
|
1597
|
+
#
|
1598
|
+
# @return [String, nil]
|
1599
|
+
optional :name, String
|
1600
|
+
|
1601
|
+
# @!attribute netsuite_sales_order_id
|
1602
|
+
# This field's availability is dependent on your client's configuration.
|
1603
|
+
#
|
1604
|
+
# @return [String, nil]
|
1605
|
+
optional :netsuite_sales_order_id, String
|
1606
|
+
|
1607
|
+
# @!attribute priority
|
1608
|
+
# If multiple credits or commits are applicable, the one with the lower priority
|
1609
|
+
# will apply first.
|
1610
|
+
#
|
1611
|
+
# @return [Float, nil]
|
1612
|
+
optional :priority, Float
|
1613
|
+
|
1614
|
+
# @!attribute salesforce_opportunity_id
|
1615
|
+
# This field's availability is dependent on your client's configuration.
|
1616
|
+
#
|
1617
|
+
# @return [String, nil]
|
1618
|
+
optional :salesforce_opportunity_id, String
|
1619
|
+
|
1620
|
+
# @!attribute specifiers
|
1621
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
1622
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
1623
|
+
# specifiers to contribute to a commit's or credit's drawdown.
|
1624
|
+
#
|
1625
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
|
1626
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
|
1627
|
+
|
1628
|
+
# @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, salesforce_opportunity_id: nil, specifiers: nil)
|
1629
|
+
# Some parameter documentations has been truncated, see
|
1630
|
+
# {MetronomeSDK::Models::ContractV2::Credit} for more details.
|
1631
|
+
#
|
1632
|
+
# @param id [String]
|
1633
|
+
#
|
1634
|
+
# @param product [MetronomeSDK::Models::ContractV2::Credit::Product]
|
1635
|
+
#
|
1636
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Credit::Type]
|
1637
|
+
#
|
1638
|
+
# @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits.
|
1639
|
+
#
|
1640
|
+
# @param applicable_contract_ids [Array<String>]
|
1641
|
+
#
|
1642
|
+
# @param applicable_product_ids [Array<String>]
|
1643
|
+
#
|
1644
|
+
# @param applicable_product_tags [Array<String>]
|
1645
|
+
#
|
1646
|
+
# @param balance [Float] The current balance of the credit or commit. This balance reflects the amount of
|
1647
|
+
#
|
1648
|
+
# @param contract [MetronomeSDK::Models::ContractV2::Credit::Contract]
|
1649
|
+
#
|
1650
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
1651
|
+
#
|
1652
|
+
# @param description [String]
|
1653
|
+
#
|
1654
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for credit hierarchy access control
|
1655
|
+
#
|
1656
|
+
# @param ledger [Array<MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditManualLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry>] A list of ordered events that impact the balance of a credit. For example, an in
|
1657
|
+
#
|
1658
|
+
# @param name [String]
|
1659
|
+
#
|
1660
|
+
# @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
|
1661
|
+
#
|
1662
|
+
# @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
|
1663
|
+
#
|
1664
|
+
# @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
|
1665
|
+
#
|
1666
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
|
1667
|
+
|
1668
|
+
# @see MetronomeSDK::Models::ContractV2::Credit#product
|
1669
|
+
class Product < MetronomeSDK::Internal::Type::BaseModel
|
1670
|
+
# @!attribute id
|
1671
|
+
#
|
1672
|
+
# @return [String]
|
1673
|
+
required :id, String
|
1674
|
+
|
1675
|
+
# @!attribute name
|
1676
|
+
#
|
1677
|
+
# @return [String]
|
1678
|
+
required :name, String
|
1679
|
+
|
1680
|
+
# @!method initialize(id:, name:)
|
1681
|
+
# @param id [String]
|
1682
|
+
# @param name [String]
|
1683
|
+
end
|
1684
|
+
|
1685
|
+
# @see MetronomeSDK::Models::ContractV2::Credit#type
|
1686
|
+
module Type
|
1687
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1688
|
+
|
1689
|
+
CREDIT = :CREDIT
|
1690
|
+
|
1691
|
+
# @!method self.values
|
1692
|
+
# @return [Array<Symbol>]
|
1693
|
+
end
|
1694
|
+
|
1695
|
+
# @see MetronomeSDK::Models::ContractV2::Credit#contract
|
1696
|
+
class Contract < MetronomeSDK::Internal::Type::BaseModel
|
1697
|
+
# @!attribute id
|
1698
|
+
#
|
1699
|
+
# @return [String]
|
1700
|
+
required :id, String
|
1701
|
+
|
1702
|
+
# @!method initialize(id:)
|
1703
|
+
# @param id [String]
|
1704
|
+
end
|
1705
|
+
|
1706
|
+
module Ledger
|
1707
|
+
extend MetronomeSDK::Internal::Type::Union
|
1708
|
+
|
1709
|
+
variant -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditSegmentStartLedgerEntry }
|
1710
|
+
|
1711
|
+
variant -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry }
|
1712
|
+
|
1713
|
+
variant -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditExpirationLedgerEntry }
|
1714
|
+
|
1715
|
+
variant -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditCanceledLedgerEntry }
|
1716
|
+
|
1717
|
+
variant -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditCreditedLedgerEntry }
|
1718
|
+
|
1719
|
+
variant -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditManualLedgerEntry }
|
1720
|
+
|
1721
|
+
variant -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry }
|
1722
|
+
|
1723
|
+
class CreditSegmentStartLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
1724
|
+
# @!attribute amount
|
1725
|
+
#
|
1726
|
+
# @return [Float]
|
1727
|
+
required :amount, Float
|
1728
|
+
|
1729
|
+
# @!attribute segment_id
|
1730
|
+
#
|
1731
|
+
# @return [String]
|
1732
|
+
required :segment_id, String
|
1733
|
+
|
1734
|
+
# @!attribute timestamp
|
1735
|
+
#
|
1736
|
+
# @return [Time]
|
1737
|
+
required :timestamp, Time
|
1738
|
+
|
1739
|
+
# @!attribute type
|
1740
|
+
#
|
1741
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSegmentStartLedgerEntry::Type]
|
1742
|
+
required :type, enum: -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditSegmentStartLedgerEntry::Type }
|
1743
|
+
|
1744
|
+
# @!method initialize(amount:, segment_id:, timestamp:, type:)
|
1745
|
+
# @param amount [Float]
|
1746
|
+
# @param segment_id [String]
|
1747
|
+
# @param timestamp [Time]
|
1748
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSegmentStartLedgerEntry::Type]
|
1749
|
+
|
1750
|
+
# @see MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSegmentStartLedgerEntry#type
|
1751
|
+
module Type
|
1752
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1753
|
+
|
1754
|
+
CREDIT_SEGMENT_START = :CREDIT_SEGMENT_START
|
1755
|
+
|
1756
|
+
# @!method self.values
|
1757
|
+
# @return [Array<Symbol>]
|
1758
|
+
end
|
1759
|
+
end
|
1760
|
+
|
1761
|
+
class CreditAutomatedInvoiceDeductionLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
1762
|
+
# @!attribute amount
|
1763
|
+
#
|
1764
|
+
# @return [Float]
|
1765
|
+
required :amount, Float
|
1766
|
+
|
1767
|
+
# @!attribute invoice_id
|
1768
|
+
#
|
1769
|
+
# @return [String]
|
1770
|
+
required :invoice_id, String
|
1771
|
+
|
1772
|
+
# @!attribute segment_id
|
1773
|
+
#
|
1774
|
+
# @return [String]
|
1775
|
+
required :segment_id, String
|
1776
|
+
|
1777
|
+
# @!attribute timestamp
|
1778
|
+
#
|
1779
|
+
# @return [Time]
|
1780
|
+
required :timestamp, Time
|
1781
|
+
|
1782
|
+
# @!attribute type
|
1783
|
+
#
|
1784
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type]
|
1785
|
+
required :type,
|
1786
|
+
enum: -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type }
|
1787
|
+
|
1788
|
+
# @!attribute contract_id
|
1789
|
+
#
|
1790
|
+
# @return [String, nil]
|
1791
|
+
optional :contract_id, String
|
1792
|
+
|
1793
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
1794
|
+
# @param amount [Float]
|
1795
|
+
# @param invoice_id [String]
|
1796
|
+
# @param segment_id [String]
|
1797
|
+
# @param timestamp [Time]
|
1798
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type]
|
1799
|
+
# @param contract_id [String]
|
1800
|
+
|
1801
|
+
# @see MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry#type
|
1802
|
+
module Type
|
1803
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1804
|
+
|
1805
|
+
CREDIT_AUTOMATED_INVOICE_DEDUCTION = :CREDIT_AUTOMATED_INVOICE_DEDUCTION
|
1806
|
+
|
1807
|
+
# @!method self.values
|
1808
|
+
# @return [Array<Symbol>]
|
1809
|
+
end
|
1810
|
+
end
|
1811
|
+
|
1812
|
+
class CreditExpirationLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
1813
|
+
# @!attribute amount
|
1814
|
+
#
|
1815
|
+
# @return [Float]
|
1816
|
+
required :amount, Float
|
1817
|
+
|
1818
|
+
# @!attribute segment_id
|
1819
|
+
#
|
1820
|
+
# @return [String]
|
1821
|
+
required :segment_id, String
|
1822
|
+
|
1823
|
+
# @!attribute timestamp
|
1824
|
+
#
|
1825
|
+
# @return [Time]
|
1826
|
+
required :timestamp, Time
|
1827
|
+
|
1828
|
+
# @!attribute type
|
1829
|
+
#
|
1830
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditExpirationLedgerEntry::Type]
|
1831
|
+
required :type, enum: -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditExpirationLedgerEntry::Type }
|
1832
|
+
|
1833
|
+
# @!method initialize(amount:, segment_id:, timestamp:, type:)
|
1834
|
+
# @param amount [Float]
|
1835
|
+
# @param segment_id [String]
|
1836
|
+
# @param timestamp [Time]
|
1837
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditExpirationLedgerEntry::Type]
|
1838
|
+
|
1839
|
+
# @see MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditExpirationLedgerEntry#type
|
1840
|
+
module Type
|
1841
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1842
|
+
|
1843
|
+
CREDIT_EXPIRATION = :CREDIT_EXPIRATION
|
1844
|
+
|
1845
|
+
# @!method self.values
|
1846
|
+
# @return [Array<Symbol>]
|
1847
|
+
end
|
1848
|
+
end
|
1849
|
+
|
1850
|
+
class CreditCanceledLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
1851
|
+
# @!attribute amount
|
1852
|
+
#
|
1853
|
+
# @return [Float]
|
1854
|
+
required :amount, Float
|
1855
|
+
|
1856
|
+
# @!attribute invoice_id
|
1857
|
+
#
|
1858
|
+
# @return [String]
|
1859
|
+
required :invoice_id, String
|
1860
|
+
|
1861
|
+
# @!attribute segment_id
|
1862
|
+
#
|
1863
|
+
# @return [String]
|
1864
|
+
required :segment_id, String
|
1865
|
+
|
1866
|
+
# @!attribute timestamp
|
1867
|
+
#
|
1868
|
+
# @return [Time]
|
1869
|
+
required :timestamp, Time
|
1870
|
+
|
1871
|
+
# @!attribute type
|
1872
|
+
#
|
1873
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCanceledLedgerEntry::Type]
|
1874
|
+
required :type, enum: -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditCanceledLedgerEntry::Type }
|
1875
|
+
|
1876
|
+
# @!attribute contract_id
|
1877
|
+
#
|
1878
|
+
# @return [String, nil]
|
1879
|
+
optional :contract_id, String
|
1880
|
+
|
1881
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
1882
|
+
# @param amount [Float]
|
1883
|
+
# @param invoice_id [String]
|
1884
|
+
# @param segment_id [String]
|
1885
|
+
# @param timestamp [Time]
|
1886
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCanceledLedgerEntry::Type]
|
1887
|
+
# @param contract_id [String]
|
1888
|
+
|
1889
|
+
# @see MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCanceledLedgerEntry#type
|
1890
|
+
module Type
|
1891
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1892
|
+
|
1893
|
+
CREDIT_CANCELED = :CREDIT_CANCELED
|
1894
|
+
|
1895
|
+
# @!method self.values
|
1896
|
+
# @return [Array<Symbol>]
|
1897
|
+
end
|
1898
|
+
end
|
1899
|
+
|
1900
|
+
class CreditCreditedLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
1901
|
+
# @!attribute amount
|
1902
|
+
#
|
1903
|
+
# @return [Float]
|
1904
|
+
required :amount, Float
|
1905
|
+
|
1906
|
+
# @!attribute invoice_id
|
1907
|
+
#
|
1908
|
+
# @return [String]
|
1909
|
+
required :invoice_id, String
|
1910
|
+
|
1911
|
+
# @!attribute segment_id
|
1912
|
+
#
|
1913
|
+
# @return [String]
|
1914
|
+
required :segment_id, String
|
1915
|
+
|
1916
|
+
# @!attribute timestamp
|
1917
|
+
#
|
1918
|
+
# @return [Time]
|
1919
|
+
required :timestamp, Time
|
1920
|
+
|
1921
|
+
# @!attribute type
|
1922
|
+
#
|
1923
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCreditedLedgerEntry::Type]
|
1924
|
+
required :type, enum: -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditCreditedLedgerEntry::Type }
|
1925
|
+
|
1926
|
+
# @!attribute contract_id
|
1927
|
+
#
|
1928
|
+
# @return [String, nil]
|
1929
|
+
optional :contract_id, String
|
1930
|
+
|
1931
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
1932
|
+
# @param amount [Float]
|
1933
|
+
# @param invoice_id [String]
|
1934
|
+
# @param segment_id [String]
|
1935
|
+
# @param timestamp [Time]
|
1936
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCreditedLedgerEntry::Type]
|
1937
|
+
# @param contract_id [String]
|
1938
|
+
|
1939
|
+
# @see MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCreditedLedgerEntry#type
|
1940
|
+
module Type
|
1941
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1942
|
+
|
1943
|
+
CREDIT_CREDITED = :CREDIT_CREDITED
|
1944
|
+
|
1945
|
+
# @!method self.values
|
1946
|
+
# @return [Array<Symbol>]
|
1947
|
+
end
|
1948
|
+
end
|
1949
|
+
|
1950
|
+
class CreditManualLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
1951
|
+
# @!attribute amount
|
1952
|
+
#
|
1953
|
+
# @return [Float]
|
1954
|
+
required :amount, Float
|
1955
|
+
|
1956
|
+
# @!attribute reason
|
1957
|
+
#
|
1958
|
+
# @return [String]
|
1959
|
+
required :reason, String
|
1960
|
+
|
1961
|
+
# @!attribute timestamp
|
1962
|
+
#
|
1963
|
+
# @return [Time]
|
1964
|
+
required :timestamp, Time
|
1965
|
+
|
1966
|
+
# @!attribute type
|
1967
|
+
#
|
1968
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditManualLedgerEntry::Type]
|
1969
|
+
required :type, enum: -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditManualLedgerEntry::Type }
|
1970
|
+
|
1971
|
+
# @!method initialize(amount:, reason:, timestamp:, type:)
|
1972
|
+
# @param amount [Float]
|
1973
|
+
# @param reason [String]
|
1974
|
+
# @param timestamp [Time]
|
1975
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditManualLedgerEntry::Type]
|
1976
|
+
|
1977
|
+
# @see MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditManualLedgerEntry#type
|
1978
|
+
module Type
|
1979
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1980
|
+
|
1981
|
+
CREDIT_MANUAL = :CREDIT_MANUAL
|
1982
|
+
|
1983
|
+
# @!method self.values
|
1984
|
+
# @return [Array<Symbol>]
|
1985
|
+
end
|
1986
|
+
end
|
1987
|
+
|
1988
|
+
class CreditSeatBasedAdjustmentLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
1989
|
+
# @!attribute amount
|
1990
|
+
#
|
1991
|
+
# @return [Float]
|
1992
|
+
required :amount, Float
|
1993
|
+
|
1994
|
+
# @!attribute segment_id
|
1995
|
+
#
|
1996
|
+
# @return [String]
|
1997
|
+
required :segment_id, String
|
1998
|
+
|
1999
|
+
# @!attribute timestamp
|
2000
|
+
#
|
2001
|
+
# @return [Time]
|
2002
|
+
required :timestamp, Time
|
2003
|
+
|
2004
|
+
# @!attribute type
|
2005
|
+
#
|
2006
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry::Type]
|
2007
|
+
required :type,
|
2008
|
+
enum: -> { MetronomeSDK::ContractV2::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry::Type }
|
2009
|
+
|
2010
|
+
# @!method initialize(amount:, segment_id:, timestamp:, type:)
|
2011
|
+
# @param amount [Float]
|
2012
|
+
# @param segment_id [String]
|
2013
|
+
# @param timestamp [Time]
|
2014
|
+
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry::Type]
|
2015
|
+
|
2016
|
+
# @see MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry#type
|
2017
|
+
module Type
|
2018
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2019
|
+
|
2020
|
+
CREDIT_SEAT_BASED_ADJUSTMENT = :CREDIT_SEAT_BASED_ADJUSTMENT
|
2021
|
+
|
2022
|
+
# @!method self.values
|
2023
|
+
# @return [Array<Symbol>]
|
2024
|
+
end
|
2025
|
+
end
|
2026
|
+
|
2027
|
+
# @!method self.variants
|
2028
|
+
# @return [Array(MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditManualLedgerEntry, MetronomeSDK::Models::ContractV2::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry)]
|
2029
|
+
end
|
2030
|
+
end
|
2031
|
+
|
2032
|
+
# @see MetronomeSDK::Models::ContractV2#customer_billing_provider_configuration
|
2033
|
+
class CustomerBillingProviderConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
2034
|
+
# @!attribute id
|
2035
|
+
# ID of Customer's billing provider configuration.
|
2036
|
+
#
|
2037
|
+
# @return [String]
|
2038
|
+
required :id, String
|
2039
|
+
|
2040
|
+
# @!attribute billing_provider
|
2041
|
+
#
|
2042
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::CustomerBillingProviderConfiguration::BillingProvider]
|
2043
|
+
required :billing_provider,
|
2044
|
+
enum: -> { MetronomeSDK::ContractV2::CustomerBillingProviderConfiguration::BillingProvider }
|
2045
|
+
|
2046
|
+
# @!attribute delivery_method
|
2047
|
+
#
|
2048
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::CustomerBillingProviderConfiguration::DeliveryMethod]
|
2049
|
+
required :delivery_method,
|
2050
|
+
enum: -> { MetronomeSDK::ContractV2::CustomerBillingProviderConfiguration::DeliveryMethod }
|
2051
|
+
|
2052
|
+
# @!method initialize(id:, billing_provider:, delivery_method:)
|
2053
|
+
# This field's availability is dependent on your client's configuration.
|
2054
|
+
#
|
2055
|
+
# @param id [String] ID of Customer's billing provider configuration.
|
2056
|
+
#
|
2057
|
+
# @param billing_provider [Symbol, MetronomeSDK::Models::ContractV2::CustomerBillingProviderConfiguration::BillingProvider]
|
2058
|
+
#
|
2059
|
+
# @param delivery_method [Symbol, MetronomeSDK::Models::ContractV2::CustomerBillingProviderConfiguration::DeliveryMethod]
|
2060
|
+
|
2061
|
+
# @see MetronomeSDK::Models::ContractV2::CustomerBillingProviderConfiguration#billing_provider
|
2062
|
+
module BillingProvider
|
2063
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2064
|
+
|
2065
|
+
AWS_MARKETPLACE = :aws_marketplace
|
2066
|
+
STRIPE = :stripe
|
2067
|
+
NETSUITE = :netsuite
|
2068
|
+
CUSTOM = :custom
|
2069
|
+
AZURE_MARKETPLACE = :azure_marketplace
|
2070
|
+
QUICKBOOKS_ONLINE = :quickbooks_online
|
2071
|
+
WORKDAY = :workday
|
2072
|
+
GCP_MARKETPLACE = :gcp_marketplace
|
2073
|
+
|
2074
|
+
# @!method self.values
|
2075
|
+
# @return [Array<Symbol>]
|
2076
|
+
end
|
2077
|
+
|
2078
|
+
# @see MetronomeSDK::Models::ContractV2::CustomerBillingProviderConfiguration#delivery_method
|
2079
|
+
module DeliveryMethod
|
2080
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2081
|
+
|
2082
|
+
DIRECT_TO_BILLING_PROVIDER = :direct_to_billing_provider
|
2083
|
+
AWS_SQS = :aws_sqs
|
2084
|
+
TACKLE = :tackle
|
2085
|
+
AWS_SNS = :aws_sns
|
2086
|
+
|
2087
|
+
# @!method self.values
|
2088
|
+
# @return [Array<Symbol>]
|
2089
|
+
end
|
2090
|
+
end
|
2091
|
+
|
2092
|
+
# @see MetronomeSDK::Models::ContractV2#has_more
|
2093
|
+
class HasMore < MetronomeSDK::Internal::Type::BaseModel
|
2094
|
+
# @!attribute commits
|
2095
|
+
# Whether there are more commits on this contract than the limit for this
|
2096
|
+
# endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
2097
|
+
# of commits.
|
2098
|
+
#
|
2099
|
+
# @return [Boolean]
|
2100
|
+
required :commits, MetronomeSDK::Internal::Type::Boolean
|
2101
|
+
|
2102
|
+
# @!attribute credits
|
2103
|
+
# Whether there are more credits on this contract than the limit for this
|
2104
|
+
# endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
2105
|
+
# of credits.
|
2106
|
+
#
|
2107
|
+
# @return [Boolean]
|
2108
|
+
required :credits, MetronomeSDK::Internal::Type::Boolean
|
2109
|
+
|
2110
|
+
# @!method initialize(commits:, credits:)
|
2111
|
+
# Some parameter documentations has been truncated, see
|
2112
|
+
# {MetronomeSDK::Models::ContractV2::HasMore} for more details.
|
2113
|
+
#
|
2114
|
+
# Indicates whether there are more items than the limit for this endpoint. Use the
|
2115
|
+
# respective list endpoints to get the full lists.
|
2116
|
+
#
|
2117
|
+
# @param commits [Boolean] Whether there are more commits on this contract than the limit for this endpoint
|
2118
|
+
#
|
2119
|
+
# @param credits [Boolean] Whether there are more credits on this contract than the limit for this endpoint
|
2120
|
+
end
|
2121
|
+
|
2122
|
+
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
2123
|
+
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
2124
|
+
# each multiplier; the one with the lowest priority value will be prioritized
|
2125
|
+
# first.
|
2126
|
+
#
|
2127
|
+
# @see MetronomeSDK::Models::ContractV2#multiplier_override_prioritization
|
2128
|
+
module MultiplierOverridePrioritization
|
2129
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2130
|
+
|
2131
|
+
LOWEST_MULTIPLIER = :LOWEST_MULTIPLIER
|
2132
|
+
EXPLICIT = :EXPLICIT
|
2133
|
+
|
2134
|
+
# @!method self.values
|
2135
|
+
# @return [Array<Symbol>]
|
2136
|
+
end
|
2137
|
+
|
2138
|
+
class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
|
2139
|
+
# @!attribute id
|
2140
|
+
#
|
2141
|
+
# @return [String]
|
2142
|
+
required :id, String
|
2143
|
+
|
2144
|
+
# @!attribute access_amount
|
2145
|
+
# The amount of commit to grant.
|
2146
|
+
#
|
2147
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCommit::AccessAmount]
|
2148
|
+
required :access_amount, -> { MetronomeSDK::ContractV2::RecurringCommit::AccessAmount }
|
2149
|
+
|
2150
|
+
# @!attribute commit_duration
|
2151
|
+
# The amount of time the created commits will be valid for
|
2152
|
+
#
|
2153
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCommit::CommitDuration]
|
2154
|
+
required :commit_duration, -> { MetronomeSDK::ContractV2::RecurringCommit::CommitDuration }
|
2155
|
+
|
2156
|
+
# @!attribute priority
|
2157
|
+
# Will be passed down to the individual commits
|
2158
|
+
#
|
2159
|
+
# @return [Float]
|
2160
|
+
required :priority, Float
|
2161
|
+
|
2162
|
+
# @!attribute product
|
2163
|
+
#
|
2164
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCommit::Product]
|
2165
|
+
required :product, -> { MetronomeSDK::ContractV2::RecurringCommit::Product }
|
2166
|
+
|
2167
|
+
# @!attribute rate_type
|
2168
|
+
# Whether the created commits will use the commit rate or list rate
|
2169
|
+
#
|
2170
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::RateType]
|
2171
|
+
required :rate_type, enum: -> { MetronomeSDK::ContractV2::RecurringCommit::RateType }
|
2172
|
+
|
2173
|
+
# @!attribute starting_at
|
2174
|
+
# Determines the start time for the first commit
|
2175
|
+
#
|
2176
|
+
# @return [Time]
|
2177
|
+
required :starting_at, Time
|
2178
|
+
|
2179
|
+
# @!attribute applicable_product_ids
|
2180
|
+
# Will be passed down to the individual commits
|
2181
|
+
#
|
2182
|
+
# @return [Array<String>, nil]
|
2183
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
2184
|
+
|
2185
|
+
# @!attribute applicable_product_tags
|
2186
|
+
# Will be passed down to the individual commits
|
2187
|
+
#
|
2188
|
+
# @return [Array<String>, nil]
|
2189
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
2190
|
+
|
2191
|
+
# @!attribute contract
|
2192
|
+
#
|
2193
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCommit::Contract, nil]
|
2194
|
+
optional :contract, -> { MetronomeSDK::ContractV2::RecurringCommit::Contract }
|
2195
|
+
|
2196
|
+
# @!attribute description
|
2197
|
+
# Will be passed down to the individual commits
|
2198
|
+
#
|
2199
|
+
# @return [String, nil]
|
2200
|
+
optional :description, String
|
2201
|
+
|
2202
|
+
# @!attribute ending_before
|
2203
|
+
# Determines when the contract will stop creating recurring commits. Optional
|
2204
|
+
#
|
2205
|
+
# @return [Time, nil]
|
2206
|
+
optional :ending_before, Time
|
2207
|
+
|
2208
|
+
# @!attribute hierarchy_configuration
|
2209
|
+
# Optional configuration for recurring credit hierarchy access control
|
2210
|
+
#
|
2211
|
+
# @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
|
2212
|
+
optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
|
2213
|
+
|
2214
|
+
# @!attribute invoice_amount
|
2215
|
+
# The amount the customer should be billed for the commit. Not required.
|
2216
|
+
#
|
2217
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCommit::InvoiceAmount, nil]
|
2218
|
+
optional :invoice_amount, -> { MetronomeSDK::ContractV2::RecurringCommit::InvoiceAmount }
|
2219
|
+
|
2220
|
+
# @!attribute name
|
2221
|
+
# Displayed on invoices. Will be passed through to the individual commits
|
2222
|
+
#
|
2223
|
+
# @return [String, nil]
|
2224
|
+
optional :name, String
|
2225
|
+
|
2226
|
+
# @!attribute netsuite_sales_order_id
|
2227
|
+
# Will be passed down to the individual commits
|
2228
|
+
#
|
2229
|
+
# @return [String, nil]
|
2230
|
+
optional :netsuite_sales_order_id, String
|
2231
|
+
|
2232
|
+
# @!attribute proration
|
2233
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
2234
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
2235
|
+
#
|
2236
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::Proration, nil]
|
2237
|
+
optional :proration, enum: -> { MetronomeSDK::ContractV2::RecurringCommit::Proration }
|
2238
|
+
|
2239
|
+
# @!attribute recurrence_frequency
|
2240
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
2241
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
2242
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
2243
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
2244
|
+
# invoice dates.
|
2245
|
+
#
|
2246
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::RecurrenceFrequency, nil]
|
2247
|
+
optional :recurrence_frequency,
|
2248
|
+
enum: -> { MetronomeSDK::ContractV2::RecurringCommit::RecurrenceFrequency }
|
2249
|
+
|
2250
|
+
# @!attribute rollover_fraction
|
2251
|
+
# Will be passed down to the individual commits. This controls how much of an
|
2252
|
+
# individual unexpired commit will roll over upon contract transition. Must be
|
2253
|
+
# between 0 and 1.
|
2254
|
+
#
|
2255
|
+
# @return [Float, nil]
|
2256
|
+
optional :rollover_fraction, Float
|
2257
|
+
|
2258
|
+
# @!attribute specifiers
|
2259
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
2260
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
2261
|
+
# specifiers to contribute to a commit's or credit's drawdown.
|
2262
|
+
#
|
2263
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
|
2264
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
|
2265
|
+
|
2266
|
+
# @!attribute subscription_config
|
2267
|
+
# Attach a subscription to the recurring commit/credit.
|
2268
|
+
#
|
2269
|
+
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
2270
|
+
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
2271
|
+
|
2272
|
+
# @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
|
2273
|
+
# Some parameter documentations has been truncated, see
|
2274
|
+
# {MetronomeSDK::Models::ContractV2::RecurringCommit} for more details.
|
2275
|
+
#
|
2276
|
+
# @param id [String]
|
2277
|
+
#
|
2278
|
+
# @param access_amount [MetronomeSDK::Models::ContractV2::RecurringCommit::AccessAmount] The amount of commit to grant.
|
2279
|
+
#
|
2280
|
+
# @param commit_duration [MetronomeSDK::Models::ContractV2::RecurringCommit::CommitDuration] The amount of time the created commits will be valid for
|
2281
|
+
#
|
2282
|
+
# @param priority [Float] Will be passed down to the individual commits
|
2283
|
+
#
|
2284
|
+
# @param product [MetronomeSDK::Models::ContractV2::RecurringCommit::Product]
|
2285
|
+
#
|
2286
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::RateType] Whether the created commits will use the commit rate or list rate
|
2287
|
+
#
|
2288
|
+
# @param starting_at [Time] Determines the start time for the first commit
|
2289
|
+
#
|
2290
|
+
# @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
|
2291
|
+
#
|
2292
|
+
# @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
|
2293
|
+
#
|
2294
|
+
# @param contract [MetronomeSDK::Models::ContractV2::RecurringCommit::Contract]
|
2295
|
+
#
|
2296
|
+
# @param description [String] Will be passed down to the individual commits
|
2297
|
+
#
|
2298
|
+
# @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
|
2299
|
+
#
|
2300
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
|
2301
|
+
#
|
2302
|
+
# @param invoice_amount [MetronomeSDK::Models::ContractV2::RecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
|
2303
|
+
#
|
2304
|
+
# @param name [String] Displayed on invoices. Will be passed through to the individual commits
|
2305
|
+
#
|
2306
|
+
# @param netsuite_sales_order_id [String] Will be passed down to the individual commits
|
2307
|
+
#
|
2308
|
+
# @param proration [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
|
2309
|
+
#
|
2310
|
+
# @param recurrence_frequency [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
|
2311
|
+
#
|
2312
|
+
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
2313
|
+
#
|
2314
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
|
2315
|
+
#
|
2316
|
+
# @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
|
2317
|
+
|
2318
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit#access_amount
|
2319
|
+
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
2320
|
+
# @!attribute credit_type_id
|
2321
|
+
#
|
2322
|
+
# @return [String]
|
2323
|
+
required :credit_type_id, String
|
2324
|
+
|
2325
|
+
# @!attribute unit_price
|
2326
|
+
#
|
2327
|
+
# @return [Float]
|
2328
|
+
required :unit_price, Float
|
2329
|
+
|
2330
|
+
# @!attribute quantity
|
2331
|
+
#
|
2332
|
+
# @return [Float, nil]
|
2333
|
+
optional :quantity, Float
|
2334
|
+
|
2335
|
+
# @!method initialize(credit_type_id:, unit_price:, quantity: nil)
|
2336
|
+
# The amount of commit to grant.
|
2337
|
+
#
|
2338
|
+
# @param credit_type_id [String]
|
2339
|
+
# @param unit_price [Float]
|
2340
|
+
# @param quantity [Float]
|
2341
|
+
end
|
2342
|
+
|
2343
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit#commit_duration
|
2344
|
+
class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
|
2345
|
+
# @!attribute value
|
2346
|
+
#
|
2347
|
+
# @return [Float]
|
2348
|
+
required :value, Float
|
2349
|
+
|
2350
|
+
# @!attribute unit
|
2351
|
+
#
|
2352
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::CommitDuration::Unit, nil]
|
2353
|
+
optional :unit, enum: -> { MetronomeSDK::ContractV2::RecurringCommit::CommitDuration::Unit }
|
2354
|
+
|
2355
|
+
# @!method initialize(value:, unit: nil)
|
2356
|
+
# The amount of time the created commits will be valid for
|
2357
|
+
#
|
2358
|
+
# @param value [Float]
|
2359
|
+
# @param unit [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::CommitDuration::Unit]
|
2360
|
+
|
2361
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit::CommitDuration#unit
|
2362
|
+
module Unit
|
2363
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2364
|
+
|
2365
|
+
PERIODS = :PERIODS
|
2366
|
+
|
2367
|
+
# @!method self.values
|
2368
|
+
# @return [Array<Symbol>]
|
2369
|
+
end
|
2370
|
+
end
|
2371
|
+
|
2372
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit#product
|
2373
|
+
class Product < MetronomeSDK::Internal::Type::BaseModel
|
2374
|
+
# @!attribute id
|
2375
|
+
#
|
2376
|
+
# @return [String]
|
2377
|
+
required :id, String
|
2378
|
+
|
2379
|
+
# @!attribute name
|
2380
|
+
#
|
2381
|
+
# @return [String]
|
2382
|
+
required :name, String
|
2383
|
+
|
2384
|
+
# @!method initialize(id:, name:)
|
2385
|
+
# @param id [String]
|
2386
|
+
# @param name [String]
|
2387
|
+
end
|
2388
|
+
|
2389
|
+
# Whether the created commits will use the commit rate or list rate
|
2390
|
+
#
|
2391
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit#rate_type
|
2392
|
+
module RateType
|
2393
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2394
|
+
|
2395
|
+
COMMIT_RATE = :COMMIT_RATE
|
2396
|
+
LIST_RATE = :LIST_RATE
|
2397
|
+
|
2398
|
+
# @!method self.values
|
2399
|
+
# @return [Array<Symbol>]
|
2400
|
+
end
|
2401
|
+
|
2402
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit#contract
|
2403
|
+
class Contract < MetronomeSDK::Internal::Type::BaseModel
|
2404
|
+
# @!attribute id
|
2405
|
+
#
|
2406
|
+
# @return [String]
|
2407
|
+
required :id, String
|
2408
|
+
|
2409
|
+
# @!method initialize(id:)
|
2410
|
+
# @param id [String]
|
2411
|
+
end
|
2412
|
+
|
2413
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit#invoice_amount
|
2414
|
+
class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
|
2415
|
+
# @!attribute credit_type_id
|
2416
|
+
#
|
2417
|
+
# @return [String]
|
2418
|
+
required :credit_type_id, String
|
2419
|
+
|
2420
|
+
# @!attribute quantity
|
2421
|
+
#
|
2422
|
+
# @return [Float]
|
2423
|
+
required :quantity, Float
|
2424
|
+
|
2425
|
+
# @!attribute unit_price
|
2426
|
+
#
|
2427
|
+
# @return [Float]
|
2428
|
+
required :unit_price, Float
|
2429
|
+
|
2430
|
+
# @!method initialize(credit_type_id:, quantity:, unit_price:)
|
2431
|
+
# The amount the customer should be billed for the commit. Not required.
|
2432
|
+
#
|
2433
|
+
# @param credit_type_id [String]
|
2434
|
+
# @param quantity [Float]
|
2435
|
+
# @param unit_price [Float]
|
2436
|
+
end
|
2437
|
+
|
2438
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
2439
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
2440
|
+
#
|
2441
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit#proration
|
2442
|
+
module Proration
|
2443
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2444
|
+
|
2445
|
+
NONE = :NONE
|
2446
|
+
FIRST = :FIRST
|
2447
|
+
LAST = :LAST
|
2448
|
+
FIRST_AND_LAST = :FIRST_AND_LAST
|
2449
|
+
|
2450
|
+
# @!method self.values
|
2451
|
+
# @return [Array<Symbol>]
|
2452
|
+
end
|
2453
|
+
|
2454
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
2455
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
2456
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
2457
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
2458
|
+
# invoice dates.
|
2459
|
+
#
|
2460
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit#recurrence_frequency
|
2461
|
+
module RecurrenceFrequency
|
2462
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2463
|
+
|
2464
|
+
MONTHLY = :MONTHLY
|
2465
|
+
QUARTERLY = :QUARTERLY
|
2466
|
+
ANNUAL = :ANNUAL
|
2467
|
+
WEEKLY = :WEEKLY
|
2468
|
+
|
2469
|
+
# @!method self.values
|
2470
|
+
# @return [Array<Symbol>]
|
2471
|
+
end
|
2472
|
+
end
|
2473
|
+
|
2474
|
+
class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
|
2475
|
+
# @!attribute id
|
2476
|
+
#
|
2477
|
+
# @return [String]
|
2478
|
+
required :id, String
|
2479
|
+
|
2480
|
+
# @!attribute access_amount
|
2481
|
+
# The amount of commit to grant.
|
2482
|
+
#
|
2483
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCredit::AccessAmount]
|
2484
|
+
required :access_amount, -> { MetronomeSDK::ContractV2::RecurringCredit::AccessAmount }
|
2485
|
+
|
2486
|
+
# @!attribute commit_duration
|
2487
|
+
# The amount of time the created commits will be valid for
|
2488
|
+
#
|
2489
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCredit::CommitDuration]
|
2490
|
+
required :commit_duration, -> { MetronomeSDK::ContractV2::RecurringCredit::CommitDuration }
|
2491
|
+
|
2492
|
+
# @!attribute priority
|
2493
|
+
# Will be passed down to the individual commits
|
2494
|
+
#
|
2495
|
+
# @return [Float]
|
2496
|
+
required :priority, Float
|
2497
|
+
|
2498
|
+
# @!attribute product
|
2499
|
+
#
|
2500
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCredit::Product]
|
2501
|
+
required :product, -> { MetronomeSDK::ContractV2::RecurringCredit::Product }
|
2502
|
+
|
2503
|
+
# @!attribute rate_type
|
2504
|
+
# Whether the created commits will use the commit rate or list rate
|
2505
|
+
#
|
2506
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::RateType]
|
2507
|
+
required :rate_type, enum: -> { MetronomeSDK::ContractV2::RecurringCredit::RateType }
|
2508
|
+
|
2509
|
+
# @!attribute starting_at
|
2510
|
+
# Determines the start time for the first commit
|
2511
|
+
#
|
2512
|
+
# @return [Time]
|
2513
|
+
required :starting_at, Time
|
2514
|
+
|
2515
|
+
# @!attribute applicable_product_ids
|
2516
|
+
# Will be passed down to the individual commits
|
2517
|
+
#
|
2518
|
+
# @return [Array<String>, nil]
|
2519
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
2520
|
+
|
2521
|
+
# @!attribute applicable_product_tags
|
2522
|
+
# Will be passed down to the individual commits
|
2523
|
+
#
|
2524
|
+
# @return [Array<String>, nil]
|
2525
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
2526
|
+
|
2527
|
+
# @!attribute contract
|
2528
|
+
#
|
2529
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCredit::Contract, nil]
|
2530
|
+
optional :contract, -> { MetronomeSDK::ContractV2::RecurringCredit::Contract }
|
2531
|
+
|
2532
|
+
# @!attribute description
|
2533
|
+
# Will be passed down to the individual commits
|
2534
|
+
#
|
2535
|
+
# @return [String, nil]
|
2536
|
+
optional :description, String
|
2537
|
+
|
2538
|
+
# @!attribute ending_before
|
2539
|
+
# Determines when the contract will stop creating recurring commits. Optional
|
2540
|
+
#
|
2541
|
+
# @return [Time, nil]
|
2542
|
+
optional :ending_before, Time
|
2543
|
+
|
2544
|
+
# @!attribute hierarchy_configuration
|
2545
|
+
# Optional configuration for recurring credit hierarchy access control
|
2546
|
+
#
|
2547
|
+
# @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
|
2548
|
+
optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
|
2549
|
+
|
2550
|
+
# @!attribute name
|
2551
|
+
# Displayed on invoices. Will be passed through to the individual commits
|
2552
|
+
#
|
2553
|
+
# @return [String, nil]
|
2554
|
+
optional :name, String
|
2555
|
+
|
2556
|
+
# @!attribute netsuite_sales_order_id
|
2557
|
+
# Will be passed down to the individual commits
|
2558
|
+
#
|
2559
|
+
# @return [String, nil]
|
2560
|
+
optional :netsuite_sales_order_id, String
|
2561
|
+
|
2562
|
+
# @!attribute proration
|
2563
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
2564
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
2565
|
+
#
|
2566
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::Proration, nil]
|
2567
|
+
optional :proration, enum: -> { MetronomeSDK::ContractV2::RecurringCredit::Proration }
|
2568
|
+
|
2569
|
+
# @!attribute recurrence_frequency
|
2570
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
2571
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
2572
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
2573
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
2574
|
+
# invoice dates.
|
2575
|
+
#
|
2576
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::RecurrenceFrequency, nil]
|
2577
|
+
optional :recurrence_frequency,
|
2578
|
+
enum: -> { MetronomeSDK::ContractV2::RecurringCredit::RecurrenceFrequency }
|
2579
|
+
|
2580
|
+
# @!attribute rollover_fraction
|
2581
|
+
# Will be passed down to the individual commits. This controls how much of an
|
2582
|
+
# individual unexpired commit will roll over upon contract transition. Must be
|
2583
|
+
# between 0 and 1.
|
2584
|
+
#
|
2585
|
+
# @return [Float, nil]
|
2586
|
+
optional :rollover_fraction, Float
|
2587
|
+
|
2588
|
+
# @!attribute specifiers
|
2589
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
2590
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
2591
|
+
# specifiers to contribute to a commit's or credit's drawdown.
|
2592
|
+
#
|
2593
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
|
2594
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
|
2595
|
+
|
2596
|
+
# @!attribute subscription_config
|
2597
|
+
# Attach a subscription to the recurring commit/credit.
|
2598
|
+
#
|
2599
|
+
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
2600
|
+
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
2601
|
+
|
2602
|
+
# @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
|
2603
|
+
# Some parameter documentations has been truncated, see
|
2604
|
+
# {MetronomeSDK::Models::ContractV2::RecurringCredit} for more details.
|
2605
|
+
#
|
2606
|
+
# @param id [String]
|
2607
|
+
#
|
2608
|
+
# @param access_amount [MetronomeSDK::Models::ContractV2::RecurringCredit::AccessAmount] The amount of commit to grant.
|
2609
|
+
#
|
2610
|
+
# @param commit_duration [MetronomeSDK::Models::ContractV2::RecurringCredit::CommitDuration] The amount of time the created commits will be valid for
|
2611
|
+
#
|
2612
|
+
# @param priority [Float] Will be passed down to the individual commits
|
2613
|
+
#
|
2614
|
+
# @param product [MetronomeSDK::Models::ContractV2::RecurringCredit::Product]
|
2615
|
+
#
|
2616
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::RateType] Whether the created commits will use the commit rate or list rate
|
2617
|
+
#
|
2618
|
+
# @param starting_at [Time] Determines the start time for the first commit
|
2619
|
+
#
|
2620
|
+
# @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
|
2621
|
+
#
|
2622
|
+
# @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
|
2623
|
+
#
|
2624
|
+
# @param contract [MetronomeSDK::Models::ContractV2::RecurringCredit::Contract]
|
2625
|
+
#
|
2626
|
+
# @param description [String] Will be passed down to the individual commits
|
2627
|
+
#
|
2628
|
+
# @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
|
2629
|
+
#
|
2630
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
|
2631
|
+
#
|
2632
|
+
# @param name [String] Displayed on invoices. Will be passed through to the individual commits
|
2633
|
+
#
|
2634
|
+
# @param netsuite_sales_order_id [String] Will be passed down to the individual commits
|
2635
|
+
#
|
2636
|
+
# @param proration [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
|
2637
|
+
#
|
2638
|
+
# @param recurrence_frequency [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
|
2639
|
+
#
|
2640
|
+
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
2641
|
+
#
|
2642
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
|
2643
|
+
#
|
2644
|
+
# @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
|
2645
|
+
|
2646
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCredit#access_amount
|
2647
|
+
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
2648
|
+
# @!attribute credit_type_id
|
2649
|
+
#
|
2650
|
+
# @return [String]
|
2651
|
+
required :credit_type_id, String
|
2652
|
+
|
2653
|
+
# @!attribute unit_price
|
2654
|
+
#
|
2655
|
+
# @return [Float]
|
2656
|
+
required :unit_price, Float
|
2657
|
+
|
2658
|
+
# @!attribute quantity
|
2659
|
+
#
|
2660
|
+
# @return [Float, nil]
|
2661
|
+
optional :quantity, Float
|
2662
|
+
|
2663
|
+
# @!method initialize(credit_type_id:, unit_price:, quantity: nil)
|
2664
|
+
# The amount of commit to grant.
|
2665
|
+
#
|
2666
|
+
# @param credit_type_id [String]
|
2667
|
+
# @param unit_price [Float]
|
2668
|
+
# @param quantity [Float]
|
2669
|
+
end
|
2670
|
+
|
2671
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCredit#commit_duration
|
2672
|
+
class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
|
2673
|
+
# @!attribute value
|
2674
|
+
#
|
2675
|
+
# @return [Float]
|
2676
|
+
required :value, Float
|
2677
|
+
|
2678
|
+
# @!attribute unit
|
2679
|
+
#
|
2680
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::CommitDuration::Unit, nil]
|
2681
|
+
optional :unit, enum: -> { MetronomeSDK::ContractV2::RecurringCredit::CommitDuration::Unit }
|
2682
|
+
|
2683
|
+
# @!method initialize(value:, unit: nil)
|
2684
|
+
# The amount of time the created commits will be valid for
|
2685
|
+
#
|
2686
|
+
# @param value [Float]
|
2687
|
+
# @param unit [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::CommitDuration::Unit]
|
2688
|
+
|
2689
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCredit::CommitDuration#unit
|
2690
|
+
module Unit
|
2691
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2692
|
+
|
2693
|
+
PERIODS = :PERIODS
|
2694
|
+
|
2695
|
+
# @!method self.values
|
2696
|
+
# @return [Array<Symbol>]
|
2697
|
+
end
|
2698
|
+
end
|
2699
|
+
|
2700
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCredit#product
|
2701
|
+
class Product < MetronomeSDK::Internal::Type::BaseModel
|
2702
|
+
# @!attribute id
|
2703
|
+
#
|
2704
|
+
# @return [String]
|
2705
|
+
required :id, String
|
2706
|
+
|
2707
|
+
# @!attribute name
|
2708
|
+
#
|
2709
|
+
# @return [String]
|
2710
|
+
required :name, String
|
2711
|
+
|
2712
|
+
# @!method initialize(id:, name:)
|
2713
|
+
# @param id [String]
|
2714
|
+
# @param name [String]
|
2715
|
+
end
|
2716
|
+
|
2717
|
+
# Whether the created commits will use the commit rate or list rate
|
2718
|
+
#
|
2719
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCredit#rate_type
|
2720
|
+
module RateType
|
2721
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2722
|
+
|
2723
|
+
COMMIT_RATE = :COMMIT_RATE
|
2724
|
+
LIST_RATE = :LIST_RATE
|
2725
|
+
|
2726
|
+
# @!method self.values
|
2727
|
+
# @return [Array<Symbol>]
|
2728
|
+
end
|
2729
|
+
|
2730
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCredit#contract
|
2731
|
+
class Contract < MetronomeSDK::Internal::Type::BaseModel
|
2732
|
+
# @!attribute id
|
2733
|
+
#
|
2734
|
+
# @return [String]
|
2735
|
+
required :id, String
|
2736
|
+
|
2737
|
+
# @!method initialize(id:)
|
2738
|
+
# @param id [String]
|
2739
|
+
end
|
2740
|
+
|
2741
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
2742
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
2743
|
+
#
|
2744
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCredit#proration
|
2745
|
+
module Proration
|
2746
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2747
|
+
|
2748
|
+
NONE = :NONE
|
2749
|
+
FIRST = :FIRST
|
2750
|
+
LAST = :LAST
|
2751
|
+
FIRST_AND_LAST = :FIRST_AND_LAST
|
2752
|
+
|
2753
|
+
# @!method self.values
|
2754
|
+
# @return [Array<Symbol>]
|
2755
|
+
end
|
2756
|
+
|
2757
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
2758
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
2759
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
2760
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
2761
|
+
# invoice dates.
|
2762
|
+
#
|
2763
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCredit#recurrence_frequency
|
2764
|
+
module RecurrenceFrequency
|
2765
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2766
|
+
|
2767
|
+
MONTHLY = :MONTHLY
|
2768
|
+
QUARTERLY = :QUARTERLY
|
2769
|
+
ANNUAL = :ANNUAL
|
2770
|
+
WEEKLY = :WEEKLY
|
2771
|
+
|
2772
|
+
# @!method self.values
|
2773
|
+
# @return [Array<Symbol>]
|
2774
|
+
end
|
2775
|
+
end
|
2776
|
+
|
2777
|
+
class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
|
2778
|
+
# @!attribute reseller_type
|
2779
|
+
#
|
2780
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::ResellerRoyalty::ResellerType]
|
2781
|
+
required :reseller_type, enum: -> { MetronomeSDK::ContractV2::ResellerRoyalty::ResellerType }
|
2782
|
+
|
2783
|
+
# @!attribute segments
|
2784
|
+
#
|
2785
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::ResellerRoyalty::Segment>]
|
2786
|
+
required :segments,
|
2787
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::ResellerRoyalty::Segment] }
|
2788
|
+
|
2789
|
+
# @!method initialize(reseller_type:, segments:)
|
2790
|
+
# @param reseller_type [Symbol, MetronomeSDK::Models::ContractV2::ResellerRoyalty::ResellerType]
|
2791
|
+
# @param segments [Array<MetronomeSDK::Models::ContractV2::ResellerRoyalty::Segment>]
|
2792
|
+
|
2793
|
+
# @see MetronomeSDK::Models::ContractV2::ResellerRoyalty#reseller_type
|
2794
|
+
module ResellerType
|
2795
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2796
|
+
|
2797
|
+
AWS = :AWS
|
2798
|
+
AWS_PRO_SERVICE = :AWS_PRO_SERVICE
|
2799
|
+
GCP = :GCP
|
2800
|
+
GCP_PRO_SERVICE = :GCP_PRO_SERVICE
|
2801
|
+
|
2802
|
+
# @!method self.values
|
2803
|
+
# @return [Array<Symbol>]
|
2804
|
+
end
|
2805
|
+
|
2806
|
+
class Segment < MetronomeSDK::Internal::Type::BaseModel
|
2807
|
+
# @!attribute fraction
|
2808
|
+
#
|
2809
|
+
# @return [Float]
|
2810
|
+
required :fraction, Float
|
2811
|
+
|
2812
|
+
# @!attribute netsuite_reseller_id
|
2813
|
+
#
|
2814
|
+
# @return [String]
|
2815
|
+
required :netsuite_reseller_id, String
|
2816
|
+
|
2817
|
+
# @!attribute reseller_type
|
2818
|
+
#
|
2819
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::ResellerRoyalty::Segment::ResellerType]
|
2820
|
+
required :reseller_type, enum: -> { MetronomeSDK::ContractV2::ResellerRoyalty::Segment::ResellerType }
|
2821
|
+
|
2822
|
+
# @!attribute starting_at
|
2823
|
+
#
|
2824
|
+
# @return [Time]
|
2825
|
+
required :starting_at, Time
|
2826
|
+
|
2827
|
+
# @!attribute applicable_product_ids
|
2828
|
+
#
|
2829
|
+
# @return [Array<String>, nil]
|
2830
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
2831
|
+
|
2832
|
+
# @!attribute applicable_product_tags
|
2833
|
+
#
|
2834
|
+
# @return [Array<String>, nil]
|
2835
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
2836
|
+
|
2837
|
+
# @!attribute aws_account_number
|
2838
|
+
#
|
2839
|
+
# @return [String, nil]
|
2840
|
+
optional :aws_account_number, String
|
2841
|
+
|
2842
|
+
# @!attribute aws_offer_id
|
2843
|
+
#
|
2844
|
+
# @return [String, nil]
|
2845
|
+
optional :aws_offer_id, String
|
2846
|
+
|
2847
|
+
# @!attribute aws_payer_reference_id
|
2848
|
+
#
|
2849
|
+
# @return [String, nil]
|
2850
|
+
optional :aws_payer_reference_id, String
|
2851
|
+
|
2852
|
+
# @!attribute ending_before
|
2853
|
+
#
|
2854
|
+
# @return [Time, nil]
|
2855
|
+
optional :ending_before, Time
|
2856
|
+
|
2857
|
+
# @!attribute gcp_account_id
|
2858
|
+
#
|
2859
|
+
# @return [String, nil]
|
2860
|
+
optional :gcp_account_id, String
|
2861
|
+
|
2862
|
+
# @!attribute gcp_offer_id
|
2863
|
+
#
|
2864
|
+
# @return [String, nil]
|
2865
|
+
optional :gcp_offer_id, String
|
2866
|
+
|
2867
|
+
# @!attribute reseller_contract_value
|
2868
|
+
#
|
2869
|
+
# @return [Float, nil]
|
2870
|
+
optional :reseller_contract_value, Float
|
2871
|
+
|
2872
|
+
# @!method initialize(fraction:, netsuite_reseller_id:, reseller_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, aws_account_number: nil, aws_offer_id: nil, aws_payer_reference_id: nil, ending_before: nil, gcp_account_id: nil, gcp_offer_id: nil, reseller_contract_value: nil)
|
2873
|
+
# @param fraction [Float]
|
2874
|
+
# @param netsuite_reseller_id [String]
|
2875
|
+
# @param reseller_type [Symbol, MetronomeSDK::Models::ContractV2::ResellerRoyalty::Segment::ResellerType]
|
2876
|
+
# @param starting_at [Time]
|
2877
|
+
# @param applicable_product_ids [Array<String>]
|
2878
|
+
# @param applicable_product_tags [Array<String>]
|
2879
|
+
# @param aws_account_number [String]
|
2880
|
+
# @param aws_offer_id [String]
|
2881
|
+
# @param aws_payer_reference_id [String]
|
2882
|
+
# @param ending_before [Time]
|
2883
|
+
# @param gcp_account_id [String]
|
2884
|
+
# @param gcp_offer_id [String]
|
2885
|
+
# @param reseller_contract_value [Float]
|
2886
|
+
|
2887
|
+
# @see MetronomeSDK::Models::ContractV2::ResellerRoyalty::Segment#reseller_type
|
2888
|
+
module ResellerType
|
2889
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2890
|
+
|
2891
|
+
AWS = :AWS
|
2892
|
+
AWS_PRO_SERVICE = :AWS_PRO_SERVICE
|
2893
|
+
GCP = :GCP
|
2894
|
+
GCP_PRO_SERVICE = :GCP_PRO_SERVICE
|
2895
|
+
|
2896
|
+
# @!method self.values
|
2897
|
+
# @return [Array<Symbol>]
|
2898
|
+
end
|
2899
|
+
end
|
2900
|
+
end
|
2901
|
+
|
2902
|
+
# Determines which scheduled and commit charges to consolidate onto the Contract's
|
2903
|
+
# usage invoice. The charge's `timestamp` must match the usage invoice's
|
2904
|
+
# `ending_before` date for consolidation to occur. This field cannot be modified
|
2905
|
+
# after a Contract has been created. If this field is omitted, charges will appear
|
2906
|
+
# on a separate invoice from usage charges.
|
2907
|
+
#
|
2908
|
+
# @see MetronomeSDK::Models::ContractV2#scheduled_charges_on_usage_invoices
|
2909
|
+
module ScheduledChargesOnUsageInvoices
|
2910
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2911
|
+
|
2912
|
+
ALL = :ALL
|
2913
|
+
|
2914
|
+
# @!method self.values
|
2915
|
+
# @return [Array<Symbol>]
|
2916
|
+
end
|
2917
|
+
end
|
2918
|
+
end
|
2919
|
+
end
|