metronome-sdk 0.2.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +61 -0
- data/README.md +9 -9
- data/lib/metronome_sdk/internal/body_cursor_page.rb +86 -0
- data/lib/metronome_sdk/internal/cursor_page_without_limit.rb +86 -0
- data/lib/metronome_sdk/internal/transport/base_client.rb +1 -4
- data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/metronome_sdk/internal/type/array_of.rb +1 -0
- data/lib/metronome_sdk/internal/type/base_model.rb +9 -14
- data/lib/metronome_sdk/internal/type/converter.rb +27 -0
- data/lib/metronome_sdk/internal/type/hash_of.rb +1 -0
- data/lib/metronome_sdk/internal/type/union.rb +20 -7
- data/lib/metronome_sdk/internal/util.rb +1 -1
- data/lib/metronome_sdk/models/base_threshold_commit.rb +36 -0
- data/lib/metronome_sdk/models/commit.rb +26 -170
- data/lib/metronome_sdk/models/commit_hierarchy_configuration.rb +98 -0
- data/lib/metronome_sdk/models/commit_rate.rb +48 -0
- data/lib/metronome_sdk/models/commit_specifier.rb +42 -0
- data/lib/metronome_sdk/models/commit_specifier_input.rb +42 -0
- data/lib/metronome_sdk/models/contract.rb +404 -0
- data/lib/metronome_sdk/models/contract_v2.rb +2919 -0
- data/lib/metronome_sdk/models/contract_without_amendments.rb +36 -1126
- data/lib/metronome_sdk/models/credit.rb +9 -156
- data/lib/metronome_sdk/models/discount.rb +2 -1
- data/lib/metronome_sdk/models/hierarchy_configuration.rb +76 -0
- data/lib/metronome_sdk/models/override.rb +6 -101
- data/lib/metronome_sdk/models/override_tier.rb +21 -0
- data/lib/metronome_sdk/models/overwrite_rate.rb +82 -0
- data/lib/metronome_sdk/models/payment_gate_config.rb +149 -0
- data/lib/metronome_sdk/models/payment_gate_config_v2.rb +149 -0
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +100 -0
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +102 -0
- data/lib/metronome_sdk/models/pro_service.rb +2 -1
- data/lib/metronome_sdk/models/recurring_commit_subscription_config.rb +51 -0
- data/lib/metronome_sdk/models/schedule_point_in_time.rb +14 -1
- data/lib/metronome_sdk/models/scheduled_charge.rb +2 -1
- data/lib/metronome_sdk/models/spend_threshold_configuration.rb +44 -0
- data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +44 -0
- data/lib/metronome_sdk/models/subscription.rb +227 -0
- data/lib/metronome_sdk/models/update_base_threshold_commit.rb +36 -0
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +4 -6
- data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +1 -2
- data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +3 -3
- data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +4 -7
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +110 -415
- data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb +7 -16
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +287 -1480
- data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +6 -23
- data/lib/metronome_sdk/models/v1/contract_list_response.rb +3 -1153
- data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +5 -50
- data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +3 -1154
- data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +9 -1
- data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +8 -1
- data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +8 -1
- data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +1 -4
- data/lib/metronome_sdk/models/v1/contracts/rate_card_create_params.rb +4 -7
- data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +5 -50
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +10 -1
- data/lib/metronome_sdk/models/v1/contracts/rate_card_update_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +6 -61
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +3 -49
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +4 -51
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +5 -49
- data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +103 -123
- data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +3 -5
- data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/custom_field_list_keys_response.rb +41 -58
- data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +5 -1
- data/lib/metronome_sdk/models/v1/customer.rb +2 -1
- data/lib/metronome_sdk/models/v1/customer_create_params.rb +37 -11
- data/lib/metronome_sdk/models/v1/customer_detail.rb +2 -1
- data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +3 -3
- data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rb +28 -0
- data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rb +128 -0
- data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_params.rb +143 -0
- data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +30 -1
- data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +2 -0
- data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +2 -0
- data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +20 -61
- data/lib/metronome_sdk/models/v1/customers/credit_create_params.rb +6 -48
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +8 -16
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +68 -43
- data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_params.rb +1 -4
- data/lib/metronome_sdk/models/v1/customers/plan_add_params.rb +2 -6
- data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +2 -1
- data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +4 -11
- data/lib/metronome_sdk/models/v1/plan_detail.rb +9 -5
- data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +2 -1
- data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +2 -1
- data/lib/metronome_sdk/models/v1/plan_list_response.rb +5 -1
- data/lib/metronome_sdk/models/v1/usage_ingest_params.rb +1 -4
- data/lib/metronome_sdk/models/v1/usage_list_params.rb +1 -3
- data/lib/metronome_sdk/models/v1/usage_list_response.rb +45 -62
- data/lib/metronome_sdk/models/v1/usage_search_response.rb +4 -7
- data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +38 -58
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +35 -49
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +469 -2302
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +358 -2414
- data/lib/metronome_sdk/models/v2/contract_list_response.rb +3 -4520
- data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +3 -4528
- data/lib/metronome_sdk/models.rb +38 -0
- data/lib/metronome_sdk/resources/v1/alerts.rb +72 -2
- data/lib/metronome_sdk/resources/v1/audit_logs.rb +39 -4
- data/lib/metronome_sdk/resources/v1/billable_metrics.rb +54 -4
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +27 -6
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb +7 -2
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +10 -2
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +109 -10
- data/lib/metronome_sdk/resources/v1/contracts.rb +254 -18
- data/lib/metronome_sdk/resources/v1/credit_grants.rb +2 -1
- data/lib/metronome_sdk/resources/v1/custom_fields.rb +51 -14
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +103 -8
- data/lib/metronome_sdk/resources/v1/customers/commits.rb +119 -9
- data/lib/metronome_sdk/resources/v1/customers/credits.rb +104 -8
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +124 -8
- data/lib/metronome_sdk/resources/v1/customers.rb +169 -12
- data/lib/metronome_sdk/resources/v1/dashboards.rb +29 -3
- data/lib/metronome_sdk/resources/v1/invoices.rb +23 -2
- data/lib/metronome_sdk/resources/v1/pricing_units.rb +6 -1
- data/lib/metronome_sdk/resources/v1/services.rb +6 -4
- data/lib/metronome_sdk/resources/v1/usage.rb +185 -12
- data/lib/metronome_sdk/resources/v2/contracts.rb +118 -18
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +24 -3
- data/rbi/metronome_sdk/errors.rbi +2 -2
- data/rbi/metronome_sdk/internal/body_cursor_page.rbi +22 -0
- data/rbi/metronome_sdk/internal/cursor_page_without_limit.rbi +22 -0
- data/rbi/metronome_sdk/internal/type/converter.rbi +58 -0
- data/rbi/metronome_sdk/internal/type/union.rbi +9 -2
- data/rbi/metronome_sdk/models/base_threshold_commit.rbi +58 -0
- data/rbi/metronome_sdk/models/commit.rbi +26 -348
- data/rbi/metronome_sdk/models/commit_hierarchy_configuration.rbi +280 -0
- data/rbi/metronome_sdk/models/commit_rate.rbi +85 -0
- data/rbi/metronome_sdk/models/commit_specifier.rbi +71 -0
- data/rbi/metronome_sdk/models/commit_specifier_input.rbi +74 -0
- data/rbi/metronome_sdk/models/contract.rbi +768 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +5822 -0
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +184 -2507
- data/rbi/metronome_sdk/models/credit.rbi +10 -348
- data/rbi/metronome_sdk/models/discount.rbi +2 -0
- data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +180 -0
- data/rbi/metronome_sdk/models/override.rbi +8 -193
- data/rbi/metronome_sdk/models/override_tier.rbi +29 -0
- data/rbi/metronome_sdk/models/overwrite_rate.rbi +137 -0
- data/rbi/metronome_sdk/models/payment_gate_config.rbi +312 -0
- data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +321 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +183 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +188 -0
- data/rbi/metronome_sdk/models/pro_service.rbi +2 -0
- data/rbi/metronome_sdk/models/recurring_commit_subscription_config.rbi +125 -0
- data/rbi/metronome_sdk/models/schedule_point_in_time.rbi +17 -1
- data/rbi/metronome_sdk/models/scheduled_charge.rbi +2 -0
- data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +76 -0
- data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -0
- data/rbi/metronome_sdk/models/subscription.rbi +460 -0
- data/rbi/metronome_sdk/models/update_base_threshold_commit.rbi +61 -0
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +6 -3
- data/rbi/metronome_sdk/models/v1/billable_metric_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/billable_metric_retrieve_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +120 -771
- data/rbi/metronome_sdk/models/v1/contract_create_historical_invoices_params.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1613 -4069
- data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +8 -59
- data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +5 -2420
- data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +6 -129
- data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +4 -2419
- data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +11 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_retrieve_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_create_params.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +6 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +4 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +4 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +4 -129
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +6 -129
- data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_response.rbi +147 -198
- data/rbi/metronome_sdk/models/v1/credit_grant_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/custom_field_list_keys_response.rbi +117 -165
- data/rbi/metronome_sdk/models/v1/custom_field_set_values_params.rbi +8 -1
- data/rbi/metronome_sdk/models/v1/customer.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +88 -3
- data/rbi/metronome_sdk/models/v1/customer_detail.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbi +51 -0
- data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbi +265 -0
- data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbi +348 -0
- data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +60 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +10 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +10 -0
- data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +19 -90
- data/rbi/metronome_sdk/models/v1/customers/credit_create_params.rbi +6 -90
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +6 -3
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +76 -0
- data/rbi/metronome_sdk/models/v1/customers/plan_list_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_detail.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_list_charges_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_list_customers_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v1/plan_list_response.rbi +8 -1
- data/rbi/metronome_sdk/models/v1/usage_list_response.rbi +45 -86
- data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +2 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +66 -76
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +66 -76
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +3563 -7329
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1181 -6070
- data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +5 -9867
- data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +6 -9866
- data/rbi/metronome_sdk/models.rbi +44 -0
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +72 -2
- data/rbi/metronome_sdk/resources/v1/audit_logs.rbi +39 -4
- data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +54 -4
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +27 -5
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rbi +7 -2
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +10 -3
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +109 -9
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +257 -16
- data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +5 -1
- data/rbi/metronome_sdk/resources/v1/custom_fields.rbi +57 -14
- data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +108 -5
- data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +119 -10
- data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +104 -9
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +123 -7
- data/rbi/metronome_sdk/resources/v1/customers.rbi +156 -11
- data/rbi/metronome_sdk/resources/v1/dashboards.rbi +29 -3
- data/rbi/metronome_sdk/resources/v1/invoices.rbi +23 -2
- data/rbi/metronome_sdk/resources/v1/pricing_units.rbi +6 -1
- data/rbi/metronome_sdk/resources/v1/services.rbi +6 -4
- data/rbi/metronome_sdk/resources/v1/usage.rbi +188 -12
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +128 -23
- data/sig/metronome_sdk/internal/body_cursor_page.rbs +13 -0
- data/sig/metronome_sdk/internal/cursor_page_without_limit.rbs +13 -0
- data/sig/metronome_sdk/internal/type/converter.rbs +17 -0
- data/sig/metronome_sdk/internal/type/union.rbs +2 -2
- data/sig/metronome_sdk/models/base_threshold_commit.rbs +26 -0
- data/sig/metronome_sdk/models/commit.rbs +17 -170
- data/sig/metronome_sdk/models/commit_hierarchy_configuration.rbs +117 -0
- data/sig/metronome_sdk/models/commit_rate.rbs +48 -0
- data/sig/metronome_sdk/models/commit_specifier.rbs +47 -0
- data/sig/metronome_sdk/models/commit_specifier_input.rbs +47 -0
- data/sig/metronome_sdk/models/contract.rbs +398 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +2881 -0
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +54 -976
- data/sig/metronome_sdk/models/credit.rbs +12 -170
- data/sig/metronome_sdk/models/hierarchy_configuration.rbs +71 -0
- data/sig/metronome_sdk/models/override.rbs +12 -101
- data/sig/metronome_sdk/models/override_tier.rbs +17 -0
- data/sig/metronome_sdk/models/overwrite_rate.rbs +78 -0
- data/sig/metronome_sdk/models/payment_gate_config.rbs +123 -0
- data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +123 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +82 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +82 -0
- data/sig/metronome_sdk/models/recurring_commit_subscription_config.rbs +51 -0
- data/sig/metronome_sdk/models/schedule_point_in_time.rbs +7 -0
- data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +35 -0
- data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +35 -0
- data/sig/metronome_sdk/models/subscription.rbs +215 -0
- data/sig/metronome_sdk/models/update_base_threshold_commit.rbs +28 -0
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +4 -2
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +62 -343
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +218 -1234
- data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +4 -25
- data/sig/metronome_sdk/models/v1/contract_list_response.rbs +4 -1041
- data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +4 -1041
- data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +6 -54
- data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +72 -94
- data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +53 -75
- data/sig/metronome_sdk/models/v1/customer_create_params.rbs +31 -4
- data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_params.rbs +32 -0
- data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbs +113 -0
- data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbs +133 -0
- data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +21 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +7 -1
- data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +6 -1
- data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +13 -50
- data/sig/metronome_sdk/models/v1/customers/credit_create_params.rbs +6 -50
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +4 -2
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +5 -0
- data/sig/metronome_sdk/models/v1/usage_list_response.rbs +33 -55
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +24 -43
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +24 -43
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +400 -1911
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +256 -2249
- data/sig/metronome_sdk/models/v2/contract_list_response.rbs +4 -4426
- data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +4 -4426
- data/sig/metronome_sdk/models.rbs +38 -0
- data/sig/metronome_sdk/resources/v1/contracts/products.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -1
- data/sig/metronome_sdk/resources/v1/contracts.rbs +3 -3
- data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -1
- data/sig/metronome_sdk/resources/v1/custom_fields.rbs +1 -1
- data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +2 -1
- data/sig/metronome_sdk/resources/v1/customers/commits.rbs +2 -2
- data/sig/metronome_sdk/resources/v1/customers/credits.rbs +2 -2
- data/sig/metronome_sdk/resources/v1/customers.rbs +11 -0
- data/sig/metronome_sdk/resources/v1/usage.rbs +1 -1
- data/sig/metronome_sdk/resources/v2/contracts.rbs +9 -4
- metadata +74 -11
- data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +0 -29
- data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +0 -26
- data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +0 -26
- data/rbi/metronome_sdk/models/v1/customers/alert_list_response.rbi +0 -46
- data/rbi/metronome_sdk/models/v1/customers/commit_list_response.rbi +0 -45
- data/rbi/metronome_sdk/models/v1/customers/credit_list_response.rbi +0 -45
- data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +0 -29
- data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +0 -26
- data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +0 -26
@@ -0,0 +1,149 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MetronomeSDK
|
4
|
+
module Models
|
5
|
+
class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
|
6
|
+
# @!attribute payment_gate_type
|
7
|
+
# Gate access to the commit balance based on successful collection of payment.
|
8
|
+
# Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
9
|
+
# facilitate payment using your own payment integration. Select NONE if you do not
|
10
|
+
# wish to payment gate the commit balance.
|
11
|
+
#
|
12
|
+
# @return [Symbol, MetronomeSDK::Models::PaymentGateConfig::PaymentGateType]
|
13
|
+
required :payment_gate_type, enum: -> { MetronomeSDK::PaymentGateConfig::PaymentGateType }
|
14
|
+
|
15
|
+
# @!attribute precalculated_tax_config
|
16
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
17
|
+
#
|
18
|
+
# @return [MetronomeSDK::Models::PaymentGateConfig::PrecalculatedTaxConfig, nil]
|
19
|
+
optional :precalculated_tax_config, -> { MetronomeSDK::PaymentGateConfig::PrecalculatedTaxConfig }
|
20
|
+
|
21
|
+
# @!attribute stripe_config
|
22
|
+
# Only applicable if using STRIPE as your payment gate type.
|
23
|
+
#
|
24
|
+
# @return [MetronomeSDK::Models::PaymentGateConfig::StripeConfig, nil]
|
25
|
+
optional :stripe_config, -> { MetronomeSDK::PaymentGateConfig::StripeConfig }
|
26
|
+
|
27
|
+
# @!attribute tax_type
|
28
|
+
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
29
|
+
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
30
|
+
# will default to NONE.
|
31
|
+
#
|
32
|
+
# @return [Symbol, MetronomeSDK::Models::PaymentGateConfig::TaxType, nil]
|
33
|
+
optional :tax_type, enum: -> { MetronomeSDK::PaymentGateConfig::TaxType }
|
34
|
+
|
35
|
+
# @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
|
36
|
+
# Some parameter documentations has been truncated, see
|
37
|
+
# {MetronomeSDK::Models::PaymentGateConfig} for more details.
|
38
|
+
#
|
39
|
+
# @param payment_gate_type [Symbol, MetronomeSDK::Models::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
|
40
|
+
#
|
41
|
+
# @param precalculated_tax_config [MetronomeSDK::Models::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
|
42
|
+
#
|
43
|
+
# @param stripe_config [MetronomeSDK::Models::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gate type.
|
44
|
+
#
|
45
|
+
# @param tax_type [Symbol, MetronomeSDK::Models::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
|
46
|
+
|
47
|
+
# Gate access to the commit balance based on successful collection of payment.
|
48
|
+
# Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
49
|
+
# facilitate payment using your own payment integration. Select NONE if you do not
|
50
|
+
# wish to payment gate the commit balance.
|
51
|
+
#
|
52
|
+
# @see MetronomeSDK::Models::PaymentGateConfig#payment_gate_type
|
53
|
+
module PaymentGateType
|
54
|
+
extend MetronomeSDK::Internal::Type::Enum
|
55
|
+
|
56
|
+
NONE = :NONE
|
57
|
+
STRIPE = :STRIPE
|
58
|
+
EXTERNAL = :EXTERNAL
|
59
|
+
|
60
|
+
# @!method self.values
|
61
|
+
# @return [Array<Symbol>]
|
62
|
+
end
|
63
|
+
|
64
|
+
# @see MetronomeSDK::Models::PaymentGateConfig#precalculated_tax_config
|
65
|
+
class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
|
66
|
+
# @!attribute tax_amount
|
67
|
+
# Amount of tax to be applied. This should be in the same currency and
|
68
|
+
# denomination as the commit's invoice schedule
|
69
|
+
#
|
70
|
+
# @return [Float]
|
71
|
+
required :tax_amount, Float
|
72
|
+
|
73
|
+
# @!attribute tax_name
|
74
|
+
# Name of the tax to be applied. This may be used in an invoice line item
|
75
|
+
# description.
|
76
|
+
#
|
77
|
+
# @return [String, nil]
|
78
|
+
optional :tax_name, String
|
79
|
+
|
80
|
+
# @!method initialize(tax_amount:, tax_name: nil)
|
81
|
+
# Some parameter documentations has been truncated, see
|
82
|
+
# {MetronomeSDK::Models::PaymentGateConfig::PrecalculatedTaxConfig} for more
|
83
|
+
# details.
|
84
|
+
#
|
85
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
86
|
+
#
|
87
|
+
# @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
|
88
|
+
#
|
89
|
+
# @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
|
90
|
+
end
|
91
|
+
|
92
|
+
# @see MetronomeSDK::Models::PaymentGateConfig#stripe_config
|
93
|
+
class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
|
94
|
+
# @!attribute payment_type
|
95
|
+
# If left blank, will default to INVOICE
|
96
|
+
#
|
97
|
+
# @return [Symbol, MetronomeSDK::Models::PaymentGateConfig::StripeConfig::PaymentType]
|
98
|
+
required :payment_type, enum: -> { MetronomeSDK::PaymentGateConfig::StripeConfig::PaymentType }
|
99
|
+
|
100
|
+
# @!attribute invoice_metadata
|
101
|
+
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
102
|
+
# your payment type.
|
103
|
+
#
|
104
|
+
# @return [Hash{Symbol=>String}, nil]
|
105
|
+
optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
|
106
|
+
|
107
|
+
# @!method initialize(payment_type:, invoice_metadata: nil)
|
108
|
+
# Some parameter documentations has been truncated, see
|
109
|
+
# {MetronomeSDK::Models::PaymentGateConfig::StripeConfig} for more details.
|
110
|
+
#
|
111
|
+
# Only applicable if using STRIPE as your payment gate type.
|
112
|
+
#
|
113
|
+
# @param payment_type [Symbol, MetronomeSDK::Models::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
|
114
|
+
#
|
115
|
+
# @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
116
|
+
|
117
|
+
# If left blank, will default to INVOICE
|
118
|
+
#
|
119
|
+
# @see MetronomeSDK::Models::PaymentGateConfig::StripeConfig#payment_type
|
120
|
+
module PaymentType
|
121
|
+
extend MetronomeSDK::Internal::Type::Enum
|
122
|
+
|
123
|
+
INVOICE = :INVOICE
|
124
|
+
PAYMENT_INTENT = :PAYMENT_INTENT
|
125
|
+
|
126
|
+
# @!method self.values
|
127
|
+
# @return [Array<Symbol>]
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
132
|
+
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
133
|
+
# will default to NONE.
|
134
|
+
#
|
135
|
+
# @see MetronomeSDK::Models::PaymentGateConfig#tax_type
|
136
|
+
module TaxType
|
137
|
+
extend MetronomeSDK::Internal::Type::Enum
|
138
|
+
|
139
|
+
NONE = :NONE
|
140
|
+
STRIPE = :STRIPE
|
141
|
+
ANROK = :ANROK
|
142
|
+
PRECALCULATED = :PRECALCULATED
|
143
|
+
|
144
|
+
# @!method self.values
|
145
|
+
# @return [Array<Symbol>]
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
@@ -0,0 +1,149 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MetronomeSDK
|
4
|
+
module Models
|
5
|
+
class PaymentGateConfigV2 < MetronomeSDK::Internal::Type::BaseModel
|
6
|
+
# @!attribute payment_gate_type
|
7
|
+
# Gate access to the commit balance based on successful collection of payment.
|
8
|
+
# Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
9
|
+
# facilitate payment using your own payment integration. Select NONE if you do not
|
10
|
+
# wish to payment gate the commit balance.
|
11
|
+
#
|
12
|
+
# @return [Symbol, MetronomeSDK::Models::PaymentGateConfigV2::PaymentGateType]
|
13
|
+
required :payment_gate_type, enum: -> { MetronomeSDK::PaymentGateConfigV2::PaymentGateType }
|
14
|
+
|
15
|
+
# @!attribute precalculated_tax_config
|
16
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
17
|
+
#
|
18
|
+
# @return [MetronomeSDK::Models::PaymentGateConfigV2::PrecalculatedTaxConfig, nil]
|
19
|
+
optional :precalculated_tax_config, -> { MetronomeSDK::PaymentGateConfigV2::PrecalculatedTaxConfig }
|
20
|
+
|
21
|
+
# @!attribute stripe_config
|
22
|
+
# Only applicable if using STRIPE as your payment gateway type.
|
23
|
+
#
|
24
|
+
# @return [MetronomeSDK::Models::PaymentGateConfigV2::StripeConfig, nil]
|
25
|
+
optional :stripe_config, -> { MetronomeSDK::PaymentGateConfigV2::StripeConfig }
|
26
|
+
|
27
|
+
# @!attribute tax_type
|
28
|
+
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
29
|
+
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
30
|
+
# will default to NONE.
|
31
|
+
#
|
32
|
+
# @return [Symbol, MetronomeSDK::Models::PaymentGateConfigV2::TaxType, nil]
|
33
|
+
optional :tax_type, enum: -> { MetronomeSDK::PaymentGateConfigV2::TaxType }
|
34
|
+
|
35
|
+
# @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
|
36
|
+
# Some parameter documentations has been truncated, see
|
37
|
+
# {MetronomeSDK::Models::PaymentGateConfigV2} for more details.
|
38
|
+
#
|
39
|
+
# @param payment_gate_type [Symbol, MetronomeSDK::Models::PaymentGateConfigV2::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
|
40
|
+
#
|
41
|
+
# @param precalculated_tax_config [MetronomeSDK::Models::PaymentGateConfigV2::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
|
42
|
+
#
|
43
|
+
# @param stripe_config [MetronomeSDK::Models::PaymentGateConfigV2::StripeConfig] Only applicable if using STRIPE as your payment gateway type.
|
44
|
+
#
|
45
|
+
# @param tax_type [Symbol, MetronomeSDK::Models::PaymentGateConfigV2::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
|
46
|
+
|
47
|
+
# Gate access to the commit balance based on successful collection of payment.
|
48
|
+
# Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
49
|
+
# facilitate payment using your own payment integration. Select NONE if you do not
|
50
|
+
# wish to payment gate the commit balance.
|
51
|
+
#
|
52
|
+
# @see MetronomeSDK::Models::PaymentGateConfigV2#payment_gate_type
|
53
|
+
module PaymentGateType
|
54
|
+
extend MetronomeSDK::Internal::Type::Enum
|
55
|
+
|
56
|
+
NONE = :NONE
|
57
|
+
STRIPE = :STRIPE
|
58
|
+
EXTERNAL = :EXTERNAL
|
59
|
+
|
60
|
+
# @!method self.values
|
61
|
+
# @return [Array<Symbol>]
|
62
|
+
end
|
63
|
+
|
64
|
+
# @see MetronomeSDK::Models::PaymentGateConfigV2#precalculated_tax_config
|
65
|
+
class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
|
66
|
+
# @!attribute tax_amount
|
67
|
+
# Amount of tax to be applied. This should be in the same currency and
|
68
|
+
# denomination as the commit's invoice schedule
|
69
|
+
#
|
70
|
+
# @return [Float]
|
71
|
+
required :tax_amount, Float
|
72
|
+
|
73
|
+
# @!attribute tax_name
|
74
|
+
# Name of the tax to be applied. This may be used in an invoice line item
|
75
|
+
# description.
|
76
|
+
#
|
77
|
+
# @return [String, nil]
|
78
|
+
optional :tax_name, String
|
79
|
+
|
80
|
+
# @!method initialize(tax_amount:, tax_name: nil)
|
81
|
+
# Some parameter documentations has been truncated, see
|
82
|
+
# {MetronomeSDK::Models::PaymentGateConfigV2::PrecalculatedTaxConfig} for more
|
83
|
+
# details.
|
84
|
+
#
|
85
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
86
|
+
#
|
87
|
+
# @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
|
88
|
+
#
|
89
|
+
# @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
|
90
|
+
end
|
91
|
+
|
92
|
+
# @see MetronomeSDK::Models::PaymentGateConfigV2#stripe_config
|
93
|
+
class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
|
94
|
+
# @!attribute payment_type
|
95
|
+
# If left blank, will default to INVOICE
|
96
|
+
#
|
97
|
+
# @return [Symbol, MetronomeSDK::Models::PaymentGateConfigV2::StripeConfig::PaymentType]
|
98
|
+
required :payment_type, enum: -> { MetronomeSDK::PaymentGateConfigV2::StripeConfig::PaymentType }
|
99
|
+
|
100
|
+
# @!attribute invoice_metadata
|
101
|
+
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
102
|
+
# your payment type.
|
103
|
+
#
|
104
|
+
# @return [Hash{Symbol=>String}, nil]
|
105
|
+
optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
|
106
|
+
|
107
|
+
# @!method initialize(payment_type:, invoice_metadata: nil)
|
108
|
+
# Some parameter documentations has been truncated, see
|
109
|
+
# {MetronomeSDK::Models::PaymentGateConfigV2::StripeConfig} for more details.
|
110
|
+
#
|
111
|
+
# Only applicable if using STRIPE as your payment gateway type.
|
112
|
+
#
|
113
|
+
# @param payment_type [Symbol, MetronomeSDK::Models::PaymentGateConfigV2::StripeConfig::PaymentType] If left blank, will default to INVOICE
|
114
|
+
#
|
115
|
+
# @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
116
|
+
|
117
|
+
# If left blank, will default to INVOICE
|
118
|
+
#
|
119
|
+
# @see MetronomeSDK::Models::PaymentGateConfigV2::StripeConfig#payment_type
|
120
|
+
module PaymentType
|
121
|
+
extend MetronomeSDK::Internal::Type::Enum
|
122
|
+
|
123
|
+
INVOICE = :INVOICE
|
124
|
+
PAYMENT_INTENT = :PAYMENT_INTENT
|
125
|
+
|
126
|
+
# @!method self.values
|
127
|
+
# @return [Array<Symbol>]
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
132
|
+
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
133
|
+
# will default to NONE.
|
134
|
+
#
|
135
|
+
# @see MetronomeSDK::Models::PaymentGateConfigV2#tax_type
|
136
|
+
module TaxType
|
137
|
+
extend MetronomeSDK::Internal::Type::Enum
|
138
|
+
|
139
|
+
NONE = :NONE
|
140
|
+
STRIPE = :STRIPE
|
141
|
+
ANROK = :ANROK
|
142
|
+
PRECALCULATED = :PRECALCULATED
|
143
|
+
|
144
|
+
# @!method self.values
|
145
|
+
# @return [Array<Symbol>]
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MetronomeSDK
|
4
|
+
module Models
|
5
|
+
class PrepaidBalanceThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
6
|
+
# @!attribute commit
|
7
|
+
#
|
8
|
+
# @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::Commit]
|
9
|
+
required :commit, -> { MetronomeSDK::PrepaidBalanceThresholdConfiguration::Commit }
|
10
|
+
|
11
|
+
# @!attribute is_enabled
|
12
|
+
# When set to false, the contract will not be evaluated against the
|
13
|
+
# threshold_amount. Toggling to true will result an immediate evaluation,
|
14
|
+
# regardless of prior state.
|
15
|
+
#
|
16
|
+
# @return [Boolean]
|
17
|
+
required :is_enabled, MetronomeSDK::Internal::Type::Boolean
|
18
|
+
|
19
|
+
# @!attribute payment_gate_config
|
20
|
+
#
|
21
|
+
# @return [MetronomeSDK::Models::PaymentGateConfig]
|
22
|
+
required :payment_gate_config, -> { MetronomeSDK::PaymentGateConfig }
|
23
|
+
|
24
|
+
# @!attribute recharge_to_amount
|
25
|
+
# Specify the amount the balance should be recharged to.
|
26
|
+
#
|
27
|
+
# @return [Float]
|
28
|
+
required :recharge_to_amount, Float
|
29
|
+
|
30
|
+
# @!attribute threshold_amount
|
31
|
+
# Specify the threshold amount for the contract. Each time the contract's prepaid
|
32
|
+
# balance lowers to this amount, a threshold charge will be initiated.
|
33
|
+
#
|
34
|
+
# @return [Float]
|
35
|
+
required :threshold_amount, Float
|
36
|
+
|
37
|
+
# @!attribute custom_credit_type_id
|
38
|
+
# If provided, the threshold, recharge-to amount, and the resulting threshold
|
39
|
+
# commit amount will be in terms of this credit type instead of the fiat currency.
|
40
|
+
#
|
41
|
+
# @return [String, nil]
|
42
|
+
optional :custom_credit_type_id, String
|
43
|
+
|
44
|
+
# @!method initialize(commit:, is_enabled:, payment_gate_config:, recharge_to_amount:, threshold_amount:, custom_credit_type_id: nil)
|
45
|
+
# Some parameter documentations has been truncated, see
|
46
|
+
# {MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration} for more details.
|
47
|
+
#
|
48
|
+
# @param commit [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::Commit]
|
49
|
+
#
|
50
|
+
# @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
|
51
|
+
#
|
52
|
+
# @param payment_gate_config [MetronomeSDK::Models::PaymentGateConfig]
|
53
|
+
#
|
54
|
+
# @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
|
55
|
+
#
|
56
|
+
# @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's prepaid
|
57
|
+
#
|
58
|
+
# @param custom_credit_type_id [String] If provided, the threshold, recharge-to amount, and the resulting threshold comm
|
59
|
+
|
60
|
+
# @see MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration#commit
|
61
|
+
class Commit < MetronomeSDK::Models::BaseThresholdCommit
|
62
|
+
# @!attribute applicable_product_ids
|
63
|
+
# Which products the threshold commit applies to. If applicable_product_ids,
|
64
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
65
|
+
# all products.
|
66
|
+
#
|
67
|
+
# @return [Array<String>, nil]
|
68
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
69
|
+
|
70
|
+
# @!attribute applicable_product_tags
|
71
|
+
# Which tags the threshold commit applies to. If applicable_product_ids,
|
72
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
73
|
+
# all products.
|
74
|
+
#
|
75
|
+
# @return [Array<String>, nil]
|
76
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
77
|
+
|
78
|
+
# @!attribute specifiers
|
79
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
80
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
81
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
82
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
83
|
+
#
|
84
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
|
85
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
|
86
|
+
|
87
|
+
# @!method initialize(applicable_product_ids: nil, applicable_product_tags: nil, specifiers: nil)
|
88
|
+
# Some parameter documentations has been truncated, see
|
89
|
+
# {MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::Commit} for more
|
90
|
+
# details.
|
91
|
+
#
|
92
|
+
# @param applicable_product_ids [Array<String>] Which products the threshold commit applies to. If applicable_product_ids, appli
|
93
|
+
#
|
94
|
+
# @param applicable_product_tags [Array<String>] Which tags the threshold commit applies to. If applicable_product_ids, applicabl
|
95
|
+
#
|
96
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MetronomeSDK
|
4
|
+
module Models
|
5
|
+
class PrepaidBalanceThresholdConfigurationV2 < MetronomeSDK::Internal::Type::BaseModel
|
6
|
+
# @!attribute commit
|
7
|
+
#
|
8
|
+
# @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2::Commit]
|
9
|
+
required :commit, -> { MetronomeSDK::PrepaidBalanceThresholdConfigurationV2::Commit }
|
10
|
+
|
11
|
+
# @!attribute is_enabled
|
12
|
+
# When set to false, the contract will not be evaluated against the
|
13
|
+
# threshold_amount. Toggling to true will result an immediate evaluation,
|
14
|
+
# regardless of prior state.
|
15
|
+
#
|
16
|
+
# @return [Boolean]
|
17
|
+
required :is_enabled, MetronomeSDK::Internal::Type::Boolean
|
18
|
+
|
19
|
+
# @!attribute payment_gate_config
|
20
|
+
#
|
21
|
+
# @return [MetronomeSDK::Models::PaymentGateConfigV2]
|
22
|
+
required :payment_gate_config, -> { MetronomeSDK::PaymentGateConfigV2 }
|
23
|
+
|
24
|
+
# @!attribute recharge_to_amount
|
25
|
+
# Specify the amount the balance should be recharged to.
|
26
|
+
#
|
27
|
+
# @return [Float]
|
28
|
+
required :recharge_to_amount, Float
|
29
|
+
|
30
|
+
# @!attribute threshold_amount
|
31
|
+
# Specify the threshold amount for the contract. Each time the contract's balance
|
32
|
+
# lowers to this amount, a threshold charge will be initiated.
|
33
|
+
#
|
34
|
+
# @return [Float]
|
35
|
+
required :threshold_amount, Float
|
36
|
+
|
37
|
+
# @!attribute custom_credit_type_id
|
38
|
+
# If provided, the threshold, recharge-to amount, and the resulting threshold
|
39
|
+
# commit amount will be in terms of this credit type instead of the fiat currency.
|
40
|
+
#
|
41
|
+
# @return [String, nil]
|
42
|
+
optional :custom_credit_type_id, String
|
43
|
+
|
44
|
+
# @!method initialize(commit:, is_enabled:, payment_gate_config:, recharge_to_amount:, threshold_amount:, custom_credit_type_id: nil)
|
45
|
+
# Some parameter documentations has been truncated, see
|
46
|
+
# {MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2} for more details.
|
47
|
+
#
|
48
|
+
# @param commit [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2::Commit]
|
49
|
+
#
|
50
|
+
# @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
|
51
|
+
#
|
52
|
+
# @param payment_gate_config [MetronomeSDK::Models::PaymentGateConfigV2]
|
53
|
+
#
|
54
|
+
# @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
|
55
|
+
#
|
56
|
+
# @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
|
57
|
+
#
|
58
|
+
# @param custom_credit_type_id [String] If provided, the threshold, recharge-to amount, and the resulting threshold comm
|
59
|
+
|
60
|
+
# @see MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2#commit
|
61
|
+
class Commit < MetronomeSDK::Models::UpdateBaseThresholdCommit
|
62
|
+
# @!attribute applicable_product_ids
|
63
|
+
# Which products the threshold commit applies to. If applicable_product_ids,
|
64
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
65
|
+
# all products.
|
66
|
+
#
|
67
|
+
# @return [Array<String>, nil]
|
68
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
69
|
+
|
70
|
+
# @!attribute applicable_product_tags
|
71
|
+
# Which tags the threshold commit applies to. If applicable_product_ids,
|
72
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
73
|
+
# all products.
|
74
|
+
#
|
75
|
+
# @return [Array<String>, nil]
|
76
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
77
|
+
|
78
|
+
# @!attribute specifiers
|
79
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
80
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
81
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
82
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
83
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
84
|
+
# body of `specifiers`.
|
85
|
+
#
|
86
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
|
87
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
|
88
|
+
|
89
|
+
# @!method initialize(applicable_product_ids: nil, applicable_product_tags: nil, specifiers: nil)
|
90
|
+
# Some parameter documentations has been truncated, see
|
91
|
+
# {MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2::Commit} for more
|
92
|
+
# details.
|
93
|
+
#
|
94
|
+
# @param applicable_product_ids [Array<String>] Which products the threshold commit applies to. If applicable_product_ids, appli
|
95
|
+
#
|
96
|
+
# @param applicable_product_tags [Array<String>] Which tags the threshold commit applies to. If applicable_product_ids, applicabl
|
97
|
+
#
|
98
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -34,6 +34,7 @@ module MetronomeSDK
|
|
34
34
|
required :unit_price, Float
|
35
35
|
|
36
36
|
# @!attribute custom_fields
|
37
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
37
38
|
#
|
38
39
|
# @return [Hash{Symbol=>String}, nil]
|
39
40
|
optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
|
@@ -63,7 +64,7 @@ module MetronomeSDK
|
|
63
64
|
#
|
64
65
|
# @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun
|
65
66
|
#
|
66
|
-
# @param custom_fields [Hash{Symbol=>String}]
|
67
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
67
68
|
#
|
68
69
|
# @param description [String]
|
69
70
|
#
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MetronomeSDK
|
4
|
+
module Models
|
5
|
+
class RecurringCommitSubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
|
6
|
+
# @!attribute allocation
|
7
|
+
#
|
8
|
+
# @return [Symbol, MetronomeSDK::Models::RecurringCommitSubscriptionConfig::Allocation]
|
9
|
+
required :allocation, enum: -> { MetronomeSDK::RecurringCommitSubscriptionConfig::Allocation }
|
10
|
+
|
11
|
+
# @!attribute apply_seat_increase_config
|
12
|
+
#
|
13
|
+
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig::ApplySeatIncreaseConfig]
|
14
|
+
required :apply_seat_increase_config,
|
15
|
+
-> { MetronomeSDK::RecurringCommitSubscriptionConfig::ApplySeatIncreaseConfig }
|
16
|
+
|
17
|
+
# @!attribute subscription_id
|
18
|
+
#
|
19
|
+
# @return [String]
|
20
|
+
required :subscription_id, String
|
21
|
+
|
22
|
+
# @!method initialize(allocation:, apply_seat_increase_config:, subscription_id:)
|
23
|
+
# @param allocation [Symbol, MetronomeSDK::Models::RecurringCommitSubscriptionConfig::Allocation]
|
24
|
+
# @param apply_seat_increase_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig::ApplySeatIncreaseConfig]
|
25
|
+
# @param subscription_id [String]
|
26
|
+
|
27
|
+
# @see MetronomeSDK::Models::RecurringCommitSubscriptionConfig#allocation
|
28
|
+
module Allocation
|
29
|
+
extend MetronomeSDK::Internal::Type::Enum
|
30
|
+
|
31
|
+
INDIVIDUAL = :INDIVIDUAL
|
32
|
+
POOLED = :POOLED
|
33
|
+
|
34
|
+
# @!method self.values
|
35
|
+
# @return [Array<Symbol>]
|
36
|
+
end
|
37
|
+
|
38
|
+
# @see MetronomeSDK::Models::RecurringCommitSubscriptionConfig#apply_seat_increase_config
|
39
|
+
class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
|
40
|
+
# @!attribute is_prorated
|
41
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
42
|
+
#
|
43
|
+
# @return [Boolean]
|
44
|
+
required :is_prorated, MetronomeSDK::Internal::Type::Boolean
|
45
|
+
|
46
|
+
# @!method initialize(is_prorated:)
|
47
|
+
# @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -8,14 +8,27 @@ module MetronomeSDK
|
|
8
8
|
# @return [MetronomeSDK::Models::CreditTypeData, nil]
|
9
9
|
optional :credit_type, -> { MetronomeSDK::CreditTypeData }
|
10
10
|
|
11
|
+
# @!attribute do_not_invoice
|
12
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
13
|
+
# schedule will not generate an invoice.
|
14
|
+
#
|
15
|
+
# @return [Boolean, nil]
|
16
|
+
optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean
|
17
|
+
|
11
18
|
# @!attribute schedule_items
|
12
19
|
#
|
13
20
|
# @return [Array<MetronomeSDK::Models::SchedulePointInTime::ScheduleItem>, nil]
|
14
21
|
optional :schedule_items,
|
15
22
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::SchedulePointInTime::ScheduleItem] }
|
16
23
|
|
17
|
-
# @!method initialize(credit_type: nil, schedule_items: nil)
|
24
|
+
# @!method initialize(credit_type: nil, do_not_invoice: nil, schedule_items: nil)
|
25
|
+
# Some parameter documentations has been truncated, see
|
26
|
+
# {MetronomeSDK::Models::SchedulePointInTime} for more details.
|
27
|
+
#
|
18
28
|
# @param credit_type [MetronomeSDK::Models::CreditTypeData]
|
29
|
+
#
|
30
|
+
# @param do_not_invoice [Boolean] This field is only applicable to commit invoice schedules. If true, this schedul
|
31
|
+
#
|
19
32
|
# @param schedule_items [Array<MetronomeSDK::Models::SchedulePointInTime::ScheduleItem>]
|
20
33
|
|
21
34
|
class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
|
@@ -24,6 +24,7 @@ module MetronomeSDK
|
|
24
24
|
optional :archived_at, Time
|
25
25
|
|
26
26
|
# @!attribute custom_fields
|
27
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
27
28
|
#
|
28
29
|
# @return [Hash{Symbol=>String}, nil]
|
29
30
|
optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
|
@@ -49,7 +50,7 @@ module MetronomeSDK
|
|
49
50
|
#
|
50
51
|
# @param archived_at [Time]
|
51
52
|
#
|
52
|
-
# @param custom_fields [Hash{Symbol=>String}]
|
53
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
53
54
|
#
|
54
55
|
# @param name [String] displayed on invoices
|
55
56
|
#
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MetronomeSDK
|
4
|
+
module Models
|
5
|
+
class SpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
6
|
+
# @!attribute commit
|
7
|
+
#
|
8
|
+
# @return [MetronomeSDK::Models::BaseThresholdCommit]
|
9
|
+
required :commit, -> { MetronomeSDK::BaseThresholdCommit }
|
10
|
+
|
11
|
+
# @!attribute is_enabled
|
12
|
+
# When set to false, the contract will not be evaluated against the
|
13
|
+
# threshold_amount. Toggling to true will result an immediate evaluation,
|
14
|
+
# regardless of prior state.
|
15
|
+
#
|
16
|
+
# @return [Boolean]
|
17
|
+
required :is_enabled, MetronomeSDK::Internal::Type::Boolean
|
18
|
+
|
19
|
+
# @!attribute payment_gate_config
|
20
|
+
#
|
21
|
+
# @return [MetronomeSDK::Models::PaymentGateConfig]
|
22
|
+
required :payment_gate_config, -> { MetronomeSDK::PaymentGateConfig }
|
23
|
+
|
24
|
+
# @!attribute threshold_amount
|
25
|
+
# Specify the threshold amount for the contract. Each time the contract's usage
|
26
|
+
# hits this amount, a threshold charge will be initiated.
|
27
|
+
#
|
28
|
+
# @return [Float]
|
29
|
+
required :threshold_amount, Float
|
30
|
+
|
31
|
+
# @!method initialize(commit:, is_enabled:, payment_gate_config:, threshold_amount:)
|
32
|
+
# Some parameter documentations has been truncated, see
|
33
|
+
# {MetronomeSDK::Models::SpendThresholdConfiguration} for more details.
|
34
|
+
#
|
35
|
+
# @param commit [MetronomeSDK::Models::BaseThresholdCommit]
|
36
|
+
#
|
37
|
+
# @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
|
38
|
+
#
|
39
|
+
# @param payment_gate_config [MetronomeSDK::Models::PaymentGateConfig]
|
40
|
+
#
|
41
|
+
# @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|