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