metronome-sdk 0.1.0.pre.alpha.2 → 0.1.0.pre.alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +85 -0
- data/README.md +120 -74
- data/SECURITY.md +2 -2
- data/lib/metronome_sdk/client.rb +4 -4
- data/lib/metronome_sdk/errors.rb +22 -0
- data/lib/metronome_sdk/internal/transport/base_client.rb +10 -2
- data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +3 -1
- data/lib/metronome_sdk/internal/type/array_of.rb +14 -1
- data/lib/metronome_sdk/internal/type/base_model.rb +92 -23
- data/lib/metronome_sdk/internal/type/boolean.rb +15 -1
- data/lib/metronome_sdk/internal/type/converter.rb +42 -34
- data/lib/metronome_sdk/internal/type/enum.rb +25 -2
- data/lib/metronome_sdk/internal/type/file_input.rb +13 -1
- data/lib/metronome_sdk/internal/type/hash_of.rb +14 -1
- data/lib/metronome_sdk/internal/type/union.rb +27 -7
- data/lib/metronome_sdk/internal/type/unknown.rb +15 -1
- data/lib/metronome_sdk/internal/util.rb +62 -10
- data/lib/metronome_sdk/internal.rb +3 -0
- data/lib/metronome_sdk/models/commit.rb +230 -87
- data/lib/metronome_sdk/models/contract_without_amendments.rb +551 -185
- data/lib/metronome_sdk/models/credit.rb +201 -51
- data/lib/metronome_sdk/models/discount.rb +5 -5
- data/lib/metronome_sdk/models/event_type_filter.rb +1 -1
- data/lib/metronome_sdk/models/override.rb +53 -34
- data/lib/metronome_sdk/models/pro_service.rb +2 -2
- data/lib/metronome_sdk/models/property_filter.rb +1 -1
- data/lib/metronome_sdk/models/rate.rb +9 -9
- data/lib/metronome_sdk/models/schedule_duration.rb +4 -4
- data/lib/metronome_sdk/models/schedule_point_in_time.rb +11 -11
- data/lib/metronome_sdk/models/scheduled_charge.rb +5 -5
- data/lib/metronome_sdk/models/v1/alert_archive_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +15 -12
- data/lib/metronome_sdk/models/v1/alert_create_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/audit_log_list_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/billable_metric_archive_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/billable_metric_create_params.rb +6 -6
- data/lib/metronome_sdk/models/v1/billable_metric_create_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/billable_metric_list_response.rb +4 -4
- data/lib/metronome_sdk/models/v1/billable_metric_retrieve_response.rb +4 -4
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +577 -152
- data/lib/metronome_sdk/models/v1/contract_amend_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contract_archive_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb +12 -12
- data/lib/metronome_sdk/models/v1/contract_create_historical_invoices_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +1317 -341
- data/lib/metronome_sdk/models/v1/contract_create_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contract_list_balances_response.rb +3 -7
- data/lib/metronome_sdk/models/v1/contract_list_response.rb +421 -36
- data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rb +33 -5
- data/lib/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rb +28 -7
- data/lib/metronome_sdk/models/v1/contract_retrieve_response.rb +422 -36
- data/lib/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_params.rb +34 -0
- data/lib/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_response.rb +81 -0
- data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_params.rb +4 -4
- data/lib/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contract_update_end_date_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/product_archive_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +6 -6
- data/lib/metronome_sdk/models/v1/contracts/product_create_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/product_list_item_state.rb +5 -5
- data/lib/metronome_sdk/models/v1/contracts/product_list_params.rb +4 -4
- data/lib/metronome_sdk/models/v1/contracts/product_list_response.rb +8 -8
- data/lib/metronome_sdk/models/v1/contracts/product_retrieve_response.rb +8 -8
- data/lib/metronome_sdk/models/v1/contracts/product_update_params.rb +4 -4
- data/lib/metronome_sdk/models/v1/contracts/product_update_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/quantity_conversion.rb +3 -3
- data/lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb +3 -3
- data/lib/metronome_sdk/models/v1/contracts/rate_card_archive_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/rate_card_create_params.rb +4 -4
- data/lib/metronome_sdk/models/v1/contracts/rate_card_create_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/rate_card_list_response.rb +4 -4
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rb +33 -5
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rb +26 -5
- data/lib/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rb +4 -4
- data/lib/metronome_sdk/models/v1/contracts/rate_card_update_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/rate_card_update_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +46 -18
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +36 -12
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +6 -6
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rb +33 -5
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rb +26 -5
- data/lib/metronome_sdk/models/v1/credit_grant_create_params.rb +12 -20
- data/lib/metronome_sdk/models/v1/credit_grant_create_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/credit_grant_edit_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/credit_grant_list_entries_params.rb +20 -1
- data/lib/metronome_sdk/models/v1/credit_grant_list_entries_response.rb +6 -6
- data/lib/metronome_sdk/models/v1/credit_grant_list_response.rb +8 -8
- data/lib/metronome_sdk/models/v1/credit_grant_void_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/credit_ledger_entry.rb +1 -1
- data/lib/metronome_sdk/models/v1/custom_field_add_key_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/custom_field_delete_values_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/custom_field_remove_key_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/customer.rb +1 -1
- data/lib/metronome_sdk/models/v1/customer_archive_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customer_create_params.rb +20 -20
- data/lib/metronome_sdk/models/v1/customer_create_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customer_detail.rb +10 -10
- data/lib/metronome_sdk/models/v1/customer_list_billable_metrics_response.rb +4 -4
- data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +115 -0
- data/lib/metronome_sdk/models/v1/customer_preview_events_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/customer_retrieve_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customer_set_name_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/alert_list_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +6 -6
- data/lib/metronome_sdk/models/v1/customers/billing_config_delete_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +9 -1
- data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +86 -32
- data/lib/metronome_sdk/models/v1/customers/commit_create_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/commit_list_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/commit_update_end_date_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/credit_create_params.rb +59 -7
- data/lib/metronome_sdk/models/v1/customers/credit_create_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/credit_list_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/credit_update_end_date_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +24 -24
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +74 -73
- data/lib/metronome_sdk/models/v1/customers/invoice_list_breakdowns_params.rb +4 -4
- data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/invoice_retrieve_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/plan_add_params.rb +16 -15
- data/lib/metronome_sdk/models/v1/customers/plan_add_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/plan_list_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +14 -13
- data/lib/metronome_sdk/models/v1/plan_detail.rb +18 -18
- data/lib/metronome_sdk/models/v1/plan_get_details_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/plan_list_charges_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/plan_list_customers_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/plan_list_customers_response.rb +2 -2
- data/lib/metronome_sdk/models/v1/rollover_amount_max_amount.rb +3 -3
- data/lib/metronome_sdk/models/v1/rollover_amount_max_percentage.rb +3 -3
- data/lib/metronome_sdk/models/v1/usage_ingest_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/usage_list_params.rb +9 -8
- data/lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb +5 -5
- data/lib/metronome_sdk/models/v1/usage_search_params.rb +24 -0
- data/lib/metronome_sdk/models/v1/usage_search_response.rb +249 -0
- data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +78 -23
- data/lib/metronome_sdk/models/v2/contract_edit_commit_response.rb +2 -2
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +62 -9
- data/lib/metronome_sdk/models/v2/contract_edit_credit_response.rb +2 -2
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +1995 -443
- data/lib/metronome_sdk/models/v2/contract_edit_response.rb +2 -2
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +1959 -140
- data/lib/metronome_sdk/models/v2/contract_list_response.rb +963 -91
- data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +964 -91
- data/lib/metronome_sdk/models.rb +30 -19
- data/lib/metronome_sdk/resources/v1/alerts.rb +4 -4
- data/lib/metronome_sdk/resources/v1/audit_logs.rb +1 -1
- data/lib/metronome_sdk/resources/v1/billable_metrics.rb +3 -3
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +9 -6
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb +1 -1
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +8 -6
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +4 -4
- data/lib/metronome_sdk/resources/v1/contracts.rb +59 -28
- data/lib/metronome_sdk/resources/v1/credit_grants.rb +7 -5
- data/lib/metronome_sdk/resources/v1/custom_fields.rb +5 -5
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +2 -2
- data/lib/metronome_sdk/resources/v1/customers/billing_config.rb +5 -5
- data/lib/metronome_sdk/resources/v1/customers/commits.rb +9 -7
- data/lib/metronome_sdk/resources/v1/customers/credits.rb +5 -3
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +4 -4
- data/lib/metronome_sdk/resources/v1/customers/plans.rb +3 -3
- data/lib/metronome_sdk/resources/v1/customers.rb +43 -4
- data/lib/metronome_sdk/resources/v1/dashboards.rb +4 -4
- data/lib/metronome_sdk/resources/v1/plans.rb +1 -1
- data/lib/metronome_sdk/resources/v1/usage.rb +30 -5
- data/lib/metronome_sdk/resources/v2/contracts.rb +45 -31
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +9 -1
- data/rbi/metronome_sdk/errors.rbi +16 -0
- data/rbi/metronome_sdk/internal/transport/pooled_net_requester.rbi +5 -1
- data/rbi/metronome_sdk/internal/type/array_of.rbi +6 -0
- data/rbi/metronome_sdk/internal/type/base_model.rbi +5 -0
- data/rbi/metronome_sdk/internal/type/boolean.rbi +8 -0
- data/rbi/metronome_sdk/internal/type/converter.rbi +15 -15
- data/rbi/metronome_sdk/internal/type/enum.rbi +5 -0
- data/rbi/metronome_sdk/internal/type/file_input.rbi +5 -0
- data/rbi/metronome_sdk/internal/type/hash_of.rbi +6 -0
- data/rbi/metronome_sdk/internal/type/union.rbi +10 -0
- data/rbi/metronome_sdk/internal/type/unknown.rbi +8 -0
- data/rbi/metronome_sdk/internal/util.rbi +36 -0
- data/rbi/metronome_sdk/internal.rbi +5 -0
- data/rbi/metronome_sdk/models/commit.rbi +376 -39
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +791 -54
- data/rbi/metronome_sdk/models/credit.rbi +376 -25
- data/rbi/metronome_sdk/models/override.rbi +66 -0
- data/rbi/metronome_sdk/models/schedule_point_in_time.rbi +9 -9
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +10 -4
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +995 -17
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +2220 -136
- data/rbi/metronome_sdk/models/v1/contract_list_balances_response.rbi +9 -2
- data/rbi/metronome_sdk/models/v1/contract_list_response.rbi +820 -28
- data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rbi +72 -0
- data/rbi/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbi +66 -0
- data/rbi/metronome_sdk/models/v1/contract_retrieve_response.rbi +820 -28
- data/rbi/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_params.rbi +58 -0
- data/rbi/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_response.rbi +212 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_list_params.rbi +3 -3
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rbi +72 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbi +66 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +72 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +72 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rbi +72 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbi +66 -0
- data/rbi/metronome_sdk/models/v1/credit_grant_list_entries_params.rbi +58 -0
- data/rbi/metronome_sdk/models/v1/customer_preview_events_params.rbi +214 -0
- data/rbi/metronome_sdk/models/v1/customer_preview_events_response.rbi +35 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +11 -0
- data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +121 -8
- data/rbi/metronome_sdk/models/v1/customers/credit_create_params.rbi +109 -0
- data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/usage_search_params.rbi +48 -0
- data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +438 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +113 -8
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +101 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +3667 -315
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +5965 -2014
- data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +2279 -226
- data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +2279 -226
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +5 -2
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +2 -1
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +5 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +36 -1
- data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +4 -0
- data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +15 -4
- data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +9 -0
- data/rbi/metronome_sdk/resources/v1/customers.rbi +35 -1
- data/rbi/metronome_sdk/resources/v1/usage.rbi +17 -0
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +65 -7
- data/sig/metronome_sdk/errors.rbs +9 -0
- data/sig/metronome_sdk/internal/transport/pooled_net_requester.rbs +2 -0
- data/sig/metronome_sdk/internal/type/array_of.rbs +3 -0
- data/sig/metronome_sdk/internal/type/base_model.rbs +2 -0
- data/sig/metronome_sdk/internal/type/boolean.rbs +3 -0
- data/sig/metronome_sdk/internal/type/converter.rbs +7 -1
- data/sig/metronome_sdk/internal/type/enum.rbs +2 -0
- data/sig/metronome_sdk/internal/type/file_input.rbs +2 -0
- data/sig/metronome_sdk/internal/type/hash_of.rbs +3 -0
- data/sig/metronome_sdk/internal/type/union.rbs +2 -0
- data/sig/metronome_sdk/internal/type/unknown.rbs +3 -0
- data/sig/metronome_sdk/internal/util.rbs +12 -0
- data/sig/metronome_sdk/internal.rbs +2 -0
- data/sig/metronome_sdk/models/base_usage_filter.rbs +6 -0
- data/sig/metronome_sdk/models/commit.rbs +374 -68
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +620 -110
- data/sig/metronome_sdk/models/credit.rbs +286 -40
- data/sig/metronome_sdk/models/credit_type_data.rbs +2 -0
- data/sig/metronome_sdk/models/discount.rbs +11 -0
- data/sig/metronome_sdk/models/event_type_filter.rbs +5 -0
- data/sig/metronome_sdk/models/id.rbs +2 -0
- data/sig/metronome_sdk/models/override.rbs +92 -22
- data/sig/metronome_sdk/models/pro_service.rbs +11 -0
- data/sig/metronome_sdk/models/property_filter.rbs +7 -0
- data/sig/metronome_sdk/models/rate.rbs +16 -4
- data/sig/metronome_sdk/models/schedule_duration.rbs +12 -0
- data/sig/metronome_sdk/models/schedule_point_in_time.rbs +20 -6
- data/sig/metronome_sdk/models/scheduled_charge.rbs +12 -0
- data/sig/metronome_sdk/models/tier.rbs +2 -0
- data/sig/metronome_sdk/models/v1/alert_archive_params.rbs +6 -0
- data/sig/metronome_sdk/models/v1/alert_archive_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +29 -4
- data/sig/metronome_sdk/models/v1/alert_create_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/audit_log_list_params.rbs +11 -0
- data/sig/metronome_sdk/models/v1/audit_log_list_response.rbs +16 -0
- data/sig/metronome_sdk/models/v1/billable_metric_archive_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/billable_metric_archive_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/billable_metric_create_params.rbs +12 -0
- data/sig/metronome_sdk/models/v1/billable_metric_create_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/billable_metric_list_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/billable_metric_list_response.rbs +13 -0
- data/sig/metronome_sdk/models/v1/billable_metric_retrieve_params.rbs +5 -0
- data/sig/metronome_sdk/models/v1/billable_metric_retrieve_response.rbs +17 -0
- data/sig/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rbs +11 -0
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +719 -75
- data/sig/metronome_sdk/models/v1/contract_amend_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contract_archive_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contract_archive_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contract_create_historical_invoices_params.rbs +47 -12
- data/sig/metronome_sdk/models/v1/contract_create_historical_invoices_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +1503 -250
- data/sig/metronome_sdk/models/v1/contract_create_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contract_list_balances_params.rbs +14 -0
- data/sig/metronome_sdk/models/v1/contract_list_balances_response.rbs +5 -0
- data/sig/metronome_sdk/models/v1/contract_list_params.rbs +10 -0
- data/sig/metronome_sdk/models/v1/contract_list_response.rbs +459 -10
- data/sig/metronome_sdk/models/v1/contract_retrieve_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_params.rbs +39 -0
- data/sig/metronome_sdk/models/v1/contract_retrieve_rate_schedule_response.rbs +48 -0
- data/sig/metronome_sdk/models/v1/contract_retrieve_response.rbs +459 -10
- data/sig/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_params.rbs +34 -0
- data/sig/metronome_sdk/models/v1/contract_retrieve_subscription_quantity_history_response.rbs +101 -0
- data/sig/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_params.rbs +21 -0
- data/sig/metronome_sdk/models/v1/contract_schedule_pro_services_invoice_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contract_set_usage_filter_params.rbs +9 -0
- data/sig/metronome_sdk/models/v1/contract_update_end_date_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/contract_update_end_date_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/named_schedule_retrieve_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contracts/named_schedule_retrieve_response.rbs +10 -0
- data/sig/metronome_sdk/models/v1/contracts/named_schedule_update_params.rbs +9 -0
- data/sig/metronome_sdk/models/v1/contracts/product_archive_params.rbs +5 -0
- data/sig/metronome_sdk/models/v1/contracts/product_archive_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +18 -0
- data/sig/metronome_sdk/models/v1/contracts/product_create_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/product_list_item_state.rbs +19 -0
- data/sig/metronome_sdk/models/v1/contracts/product_list_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contracts/product_list_response.rbs +29 -0
- data/sig/metronome_sdk/models/v1/contracts/product_retrieve_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/product_retrieve_response.rbs +33 -0
- data/sig/metronome_sdk/models/v1/contracts/product_update_params.rbs +19 -0
- data/sig/metronome_sdk/models/v1/contracts/product_update_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/quantity_conversion.rbs +10 -4
- data/sig/metronome_sdk/models/v1/contracts/quantity_rounding.rbs +9 -4
- data/sig/metronome_sdk/models/v1/contracts/rate_card_archive_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_archive_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_create_params.rbs +21 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_create_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_list_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_list_response.rbs +23 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_params.rbs +38 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_rate_schedule_response.rbs +46 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_retrieve_response.rbs +27 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_update_params.rbs +14 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_card_update_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_retrieve_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_retrieve_response.rbs +10 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/named_schedule_update_params.rbs +10 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_params.rbs +6 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_set_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/product_order_update_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +59 -8
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +51 -4
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +23 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_params.rbs +38 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_list_response.rbs +41 -0
- data/sig/metronome_sdk/models/v1/credit_grant_create_params.rbs +32 -4
- data/sig/metronome_sdk/models/v1/credit_grant_create_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/credit_grant_edit_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/credit_grant_edit_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/credit_grant_list_entries_params.rbs +29 -0
- data/sig/metronome_sdk/models/v1/credit_grant_list_entries_response.rbs +30 -0
- data/sig/metronome_sdk/models/v1/credit_grant_list_params.rbs +11 -0
- data/sig/metronome_sdk/models/v1/credit_grant_list_response.rbs +38 -0
- data/sig/metronome_sdk/models/v1/credit_grant_void_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/credit_grant_void_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/credit_ledger_entry.rbs +10 -0
- data/sig/metronome_sdk/models/v1/custom_field_add_key_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/custom_field_delete_values_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/custom_field_list_keys_params.rbs +12 -6
- data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +11 -0
- data/sig/metronome_sdk/models/v1/custom_field_remove_key_params.rbs +6 -0
- data/sig/metronome_sdk/models/v1/custom_field_set_values_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customer.rbs +8 -0
- data/sig/metronome_sdk/models/v1/customer_archive_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customer_archive_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customer_create_params.rbs +52 -26
- data/sig/metronome_sdk/models/v1/customer_create_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customer_detail.rbs +23 -4
- data/sig/metronome_sdk/models/v1/customer_list_billable_metrics_params.rbs +9 -0
- data/sig/metronome_sdk/models/v1/customer_list_billable_metrics_response.rbs +17 -0
- data/sig/metronome_sdk/models/v1/customer_list_costs_params.rbs +9 -0
- data/sig/metronome_sdk/models/v1/customer_list_costs_response.rbs +19 -0
- data/sig/metronome_sdk/models/v1/customer_list_params.rbs +10 -0
- data/sig/metronome_sdk/models/v1/customer_preview_events_params.rbs +105 -0
- data/sig/metronome_sdk/models/v1/customer_preview_events_response.rbs +16 -0
- data/sig/metronome_sdk/models/v1/customer_retrieve_params.rbs +5 -0
- data/sig/metronome_sdk/models/v1/customer_retrieve_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customer_set_ingest_aliases_params.rbs +6 -0
- data/sig/metronome_sdk/models/v1/customer_set_name_params.rbs +6 -0
- data/sig/metronome_sdk/models/v1/customer_set_name_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customer_update_config_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/alert_list_params.rbs +13 -6
- data/sig/metronome_sdk/models/v1/customers/alert_list_response.rbs +5 -0
- data/sig/metronome_sdk/models/v1/customers/alert_reset_params.rbs +6 -0
- data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/alert_retrieve_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +10 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_delete_params.rbs +6 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rbs +6 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +23 -0
- data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +116 -8
- data/sig/metronome_sdk/models/v1/customers/commit_create_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/commit_list_params.rbs +14 -0
- data/sig/metronome_sdk/models/v1/customers/commit_list_response.rbs +5 -0
- data/sig/metronome_sdk/models/v1/customers/commit_update_end_date_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/customers/commit_update_end_date_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/credit_create_params.rbs +82 -0
- data/sig/metronome_sdk/models/v1/customers/credit_create_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/credit_list_params.rbs +14 -0
- data/sig/metronome_sdk/models/v1/customers/credit_list_response.rbs +5 -0
- data/sig/metronome_sdk/models/v1/customers/credit_update_end_date_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/credit_update_end_date_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +45 -16
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +195 -40
- data/sig/metronome_sdk/models/v1/customers/invoice_add_charge_params.rbs +11 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_add_charge_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_list_breakdowns_params.rbs +14 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_list_breakdowns_response.rbs +5 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +13 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/named_schedule_retrieve_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/named_schedule_retrieve_response.rbs +10 -0
- data/sig/metronome_sdk/models/v1/customers/named_schedule_update_params.rbs +9 -0
- data/sig/metronome_sdk/models/v1/customers/plan_add_params.rbs +38 -4
- data/sig/metronome_sdk/models/v1/customers/plan_add_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/plan_end_params.rbs +9 -0
- data/sig/metronome_sdk/models/v1/customers/plan_end_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/plan_list_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/plan_list_price_adjustments_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/customers/plan_list_price_adjustments_response.rbs +14 -0
- data/sig/metronome_sdk/models/v1/customers/plan_list_response.rbs +23 -0
- data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +30 -7
- data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_response.rbs +6 -0
- data/sig/metronome_sdk/models/v1/invoice_regenerate_params.rbs +5 -0
- data/sig/metronome_sdk/models/v1/invoice_regenerate_response.rbs +6 -0
- data/sig/metronome_sdk/models/v1/invoice_void_params.rbs +5 -0
- data/sig/metronome_sdk/models/v1/invoice_void_response.rbs +6 -0
- data/sig/metronome_sdk/models/v1/plan_detail.rbs +38 -0
- data/sig/metronome_sdk/models/v1/plan_get_details_params.rbs +5 -0
- data/sig/metronome_sdk/models/v1/plan_get_details_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/plan_list_charges_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/plan_list_charges_response.rbs +28 -0
- data/sig/metronome_sdk/models/v1/plan_list_customers_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/plan_list_customers_response.rbs +14 -0
- data/sig/metronome_sdk/models/v1/plan_list_params.rbs +6 -0
- data/sig/metronome_sdk/models/v1/plan_list_response.rbs +7 -0
- data/sig/metronome_sdk/models/v1/pricing_unit_list_params.rbs +6 -0
- data/sig/metronome_sdk/models/v1/pricing_unit_list_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/rollover_amount_max_amount.rbs +12 -4
- data/sig/metronome_sdk/models/v1/rollover_amount_max_percentage.rbs +9 -4
- data/sig/metronome_sdk/models/v1/service_list_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/service_list_response.rbs +10 -0
- data/sig/metronome_sdk/models/v1/usage_ingest_params.rbs +13 -0
- data/sig/metronome_sdk/models/v1/usage_list_params.rbs +17 -0
- data/sig/metronome_sdk/models/v1/usage_list_response.rbs +15 -0
- data/sig/metronome_sdk/models/v1/usage_list_with_groups_params.rbs +15 -0
- data/sig/metronome_sdk/models/v1/usage_list_with_groups_response.rbs +8 -0
- data/sig/metronome_sdk/models/v1/usage_search_params.rbs +26 -0
- data/sig/metronome_sdk/models/v1/usage_search_response.rbs +230 -0
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +106 -1
- data/sig/metronome_sdk/models/v2/contract_edit_commit_response.rbs +2 -0
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +81 -1
- data/sig/metronome_sdk/models/v2/contract_edit_credit_response.rbs +2 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +2233 -303
- data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +2 -0
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_params.rbs +6 -0
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +2475 -453
- data/sig/metronome_sdk/models/v2/contract_list_params.rbs +10 -0
- data/sig/metronome_sdk/models/v2/contract_list_response.rbs +1400 -43
- data/sig/metronome_sdk/models/v2/contract_retrieve_params.rbs +9 -0
- data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +1400 -43
- data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +10 -0
- data/sig/metronome_sdk/resources/v1/credit_grants.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/custom_fields.rbs +1 -1
- data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -1
- data/sig/metronome_sdk/resources/v1/customers/commits.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/customers/credits.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/customers.rbs +8 -0
- data/sig/metronome_sdk/resources/v1/usage.rbs +5 -0
- data/sig/metronome_sdk/resources/v2/contracts.rbs +8 -1
- metadata +20 -2
@@ -22,7 +22,8 @@ module MetronomeSDK
|
|
22
22
|
sig { returns(Time) }
|
23
23
|
attr_accessor :starting_at
|
24
24
|
|
25
|
-
# The billing provider configuration associated with a contract.
|
25
|
+
# The billing provider configuration associated with a contract. Provide either an
|
26
|
+
# ID or the provider and delivery method.
|
26
27
|
sig do
|
27
28
|
returns(
|
28
29
|
T.nilable(
|
@@ -101,6 +102,23 @@ module MetronomeSDK
|
|
101
102
|
sig { params(ending_before: Time).void }
|
102
103
|
attr_writer :ending_before
|
103
104
|
|
105
|
+
sig do
|
106
|
+
returns(
|
107
|
+
T.nilable(
|
108
|
+
MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration
|
109
|
+
)
|
110
|
+
)
|
111
|
+
end
|
112
|
+
attr_reader :hierarchy_configuration
|
113
|
+
|
114
|
+
sig do
|
115
|
+
params(
|
116
|
+
hierarchy_configuration:
|
117
|
+
MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::OrHash
|
118
|
+
).void
|
119
|
+
end
|
120
|
+
attr_writer :hierarchy_configuration
|
121
|
+
|
104
122
|
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
105
123
|
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
106
124
|
# each multiplier; the one with the lowest priority value will be prioritized
|
@@ -175,6 +193,13 @@ module MetronomeSDK
|
|
175
193
|
end
|
176
194
|
attr_writer :prepaid_balance_threshold_configuration
|
177
195
|
|
196
|
+
# Priority of the contract.
|
197
|
+
sig { returns(T.nilable(Float)) }
|
198
|
+
attr_reader :priority
|
199
|
+
|
200
|
+
sig { params(priority: Float).void }
|
201
|
+
attr_writer :priority
|
202
|
+
|
178
203
|
# This field's availability is dependent on your client's configuration.
|
179
204
|
sig do
|
180
205
|
returns(
|
@@ -334,6 +359,28 @@ module MetronomeSDK
|
|
334
359
|
end
|
335
360
|
attr_writer :spend_threshold_configuration
|
336
361
|
|
362
|
+
# Optional list of
|
363
|
+
# [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
364
|
+
# to add to the contract.
|
365
|
+
sig do
|
366
|
+
returns(
|
367
|
+
T.nilable(
|
368
|
+
T::Array[MetronomeSDK::V1::ContractCreateParams::Subscription]
|
369
|
+
)
|
370
|
+
)
|
371
|
+
end
|
372
|
+
attr_reader :subscriptions
|
373
|
+
|
374
|
+
sig do
|
375
|
+
params(
|
376
|
+
subscriptions:
|
377
|
+
T::Array[
|
378
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::OrHash
|
379
|
+
]
|
380
|
+
).void
|
381
|
+
end
|
382
|
+
attr_writer :subscriptions
|
383
|
+
|
337
384
|
# This field's availability is dependent on your client's configuration.
|
338
385
|
sig { returns(T.nilable(Float)) }
|
339
386
|
attr_reader :total_contract_value
|
@@ -402,6 +449,8 @@ module MetronomeSDK
|
|
402
449
|
MetronomeSDK::V1::ContractCreateParams::Discount::OrHash
|
403
450
|
],
|
404
451
|
ending_before: Time,
|
452
|
+
hierarchy_configuration:
|
453
|
+
MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::OrHash,
|
405
454
|
multiplier_override_prioritization:
|
406
455
|
MetronomeSDK::V1::ContractCreateParams::MultiplierOverridePrioritization::OrSymbol,
|
407
456
|
name: String,
|
@@ -413,6 +462,7 @@ module MetronomeSDK
|
|
413
462
|
],
|
414
463
|
prepaid_balance_threshold_configuration:
|
415
464
|
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::OrHash,
|
465
|
+
priority: Float,
|
416
466
|
professional_services:
|
417
467
|
T::Array[
|
418
468
|
MetronomeSDK::V1::ContractCreateParams::ProfessionalService::OrHash
|
@@ -440,6 +490,10 @@ module MetronomeSDK
|
|
440
490
|
MetronomeSDK::V1::ContractCreateParams::ScheduledChargesOnUsageInvoices::OrSymbol,
|
441
491
|
spend_threshold_configuration:
|
442
492
|
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::OrHash,
|
493
|
+
subscriptions:
|
494
|
+
T::Array[
|
495
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::OrHash
|
496
|
+
],
|
443
497
|
total_contract_value: Float,
|
444
498
|
transition:
|
445
499
|
MetronomeSDK::V1::ContractCreateParams::Transition::OrHash,
|
@@ -454,7 +508,8 @@ module MetronomeSDK
|
|
454
508
|
customer_id:,
|
455
509
|
# inclusive contract start time
|
456
510
|
starting_at:,
|
457
|
-
# The billing provider configuration associated with a contract.
|
511
|
+
# The billing provider configuration associated with a contract. Provide either an
|
512
|
+
# ID or the provider and delivery method.
|
458
513
|
billing_provider_configuration: nil,
|
459
514
|
commits: nil,
|
460
515
|
credits: nil,
|
@@ -463,6 +518,7 @@ module MetronomeSDK
|
|
463
518
|
discounts: nil,
|
464
519
|
# exclusive contract end time
|
465
520
|
ending_before: nil,
|
521
|
+
hierarchy_configuration: nil,
|
466
522
|
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
467
523
|
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
468
524
|
# each multiplier; the one with the lowest priority value will be prioritized
|
@@ -474,6 +530,8 @@ module MetronomeSDK
|
|
474
530
|
netsuite_sales_order_id: nil,
|
475
531
|
overrides: nil,
|
476
532
|
prepaid_balance_threshold_configuration: nil,
|
533
|
+
# Priority of the contract.
|
534
|
+
priority: nil,
|
477
535
|
# This field's availability is dependent on your client's configuration.
|
478
536
|
professional_services: nil,
|
479
537
|
# Selects the rate card linked to the specified alias as of the contract's start
|
@@ -494,6 +552,10 @@ module MetronomeSDK
|
|
494
552
|
# on a separate invoice from usage charges.
|
495
553
|
scheduled_charges_on_usage_invoices: nil,
|
496
554
|
spend_threshold_configuration: nil,
|
555
|
+
# Optional list of
|
556
|
+
# [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
557
|
+
# to add to the contract.
|
558
|
+
subscriptions: nil,
|
497
559
|
# This field's availability is dependent on your client's configuration.
|
498
560
|
total_contract_value: nil,
|
499
561
|
transition: nil,
|
@@ -520,6 +582,8 @@ module MetronomeSDK
|
|
520
582
|
discounts:
|
521
583
|
T::Array[MetronomeSDK::V1::ContractCreateParams::Discount],
|
522
584
|
ending_before: Time,
|
585
|
+
hierarchy_configuration:
|
586
|
+
MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration,
|
523
587
|
multiplier_override_prioritization:
|
524
588
|
MetronomeSDK::V1::ContractCreateParams::MultiplierOverridePrioritization::OrSymbol,
|
525
589
|
name: String,
|
@@ -529,6 +593,7 @@ module MetronomeSDK
|
|
529
593
|
T::Array[MetronomeSDK::V1::ContractCreateParams::Override],
|
530
594
|
prepaid_balance_threshold_configuration:
|
531
595
|
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration,
|
596
|
+
priority: Float,
|
532
597
|
professional_services:
|
533
598
|
T::Array[
|
534
599
|
MetronomeSDK::V1::ContractCreateParams::ProfessionalService
|
@@ -556,6 +621,8 @@ module MetronomeSDK
|
|
556
621
|
MetronomeSDK::V1::ContractCreateParams::ScheduledChargesOnUsageInvoices::OrSymbol,
|
557
622
|
spend_threshold_configuration:
|
558
623
|
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration,
|
624
|
+
subscriptions:
|
625
|
+
T::Array[MetronomeSDK::V1::ContractCreateParams::Subscription],
|
559
626
|
total_contract_value: Float,
|
560
627
|
transition: MetronomeSDK::V1::ContractCreateParams::Transition,
|
561
628
|
uniqueness_key: String,
|
@@ -578,6 +645,7 @@ module MetronomeSDK
|
|
578
645
|
)
|
579
646
|
end
|
580
647
|
|
648
|
+
# Do not specify if using billing_provider_configuration_id.
|
581
649
|
sig do
|
582
650
|
returns(
|
583
651
|
T.nilable(
|
@@ -595,13 +663,16 @@ module MetronomeSDK
|
|
595
663
|
end
|
596
664
|
attr_writer :billing_provider
|
597
665
|
|
598
|
-
# The Metronome ID of the billing provider configuration
|
666
|
+
# The Metronome ID of the billing provider configuration. Use when a customer has
|
667
|
+
# multiple configurations with the same billing provider and delivery method.
|
668
|
+
# Otherwise, specify the billing_provider and delivery_method.
|
599
669
|
sig { returns(T.nilable(String)) }
|
600
670
|
attr_reader :billing_provider_configuration_id
|
601
671
|
|
602
672
|
sig { params(billing_provider_configuration_id: String).void }
|
603
673
|
attr_writer :billing_provider_configuration_id
|
604
674
|
|
675
|
+
# Do not specify if using billing_provider_configuration_id.
|
605
676
|
sig do
|
606
677
|
returns(
|
607
678
|
T.nilable(
|
@@ -619,7 +690,8 @@ module MetronomeSDK
|
|
619
690
|
end
|
620
691
|
attr_writer :delivery_method
|
621
692
|
|
622
|
-
# The billing provider configuration associated with a contract.
|
693
|
+
# The billing provider configuration associated with a contract. Provide either an
|
694
|
+
# ID or the provider and delivery method.
|
623
695
|
sig do
|
624
696
|
params(
|
625
697
|
billing_provider:
|
@@ -630,9 +702,13 @@ module MetronomeSDK
|
|
630
702
|
).returns(T.attached_class)
|
631
703
|
end
|
632
704
|
def self.new(
|
705
|
+
# Do not specify if using billing_provider_configuration_id.
|
633
706
|
billing_provider: nil,
|
634
|
-
# The Metronome ID of the billing provider configuration
|
707
|
+
# The Metronome ID of the billing provider configuration. Use when a customer has
|
708
|
+
# multiple configurations with the same billing provider and delivery method.
|
709
|
+
# Otherwise, specify the billing_provider and delivery_method.
|
635
710
|
billing_provider_configuration_id: nil,
|
711
|
+
# Do not specify if using billing_provider_configuration_id.
|
636
712
|
delivery_method: nil
|
637
713
|
)
|
638
714
|
end
|
@@ -651,6 +727,7 @@ module MetronomeSDK
|
|
651
727
|
def to_hash
|
652
728
|
end
|
653
729
|
|
730
|
+
# Do not specify if using billing_provider_configuration_id.
|
654
731
|
module BillingProvider
|
655
732
|
extend MetronomeSDK::Internal::Type::Enum
|
656
733
|
|
@@ -700,6 +777,7 @@ module MetronomeSDK
|
|
700
777
|
end
|
701
778
|
end
|
702
779
|
|
780
|
+
# Do not specify if using billing_provider_configuration_id.
|
703
781
|
module DeliveryMethod
|
704
782
|
extend MetronomeSDK::Internal::Type::Enum
|
705
783
|
|
@@ -791,16 +869,18 @@ module MetronomeSDK
|
|
791
869
|
sig { params(amount: Float).void }
|
792
870
|
attr_writer :amount
|
793
871
|
|
794
|
-
# Which products the commit applies to. If
|
795
|
-
# applicable_product_tags are not provided, the commit applies to
|
872
|
+
# Which products the commit applies to. If applicable_product_ids,
|
873
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
874
|
+
# all products.
|
796
875
|
sig { returns(T.nilable(T::Array[String])) }
|
797
876
|
attr_reader :applicable_product_ids
|
798
877
|
|
799
878
|
sig { params(applicable_product_ids: T::Array[String]).void }
|
800
879
|
attr_writer :applicable_product_ids
|
801
880
|
|
802
|
-
# Which tags the commit applies to. If
|
803
|
-
# applicable_product_tags are not provided, the commit applies to
|
881
|
+
# Which tags the commit applies to. If applicable_product_ids,
|
882
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
883
|
+
# all products.
|
804
884
|
sig { returns(T.nilable(T::Array[String])) }
|
805
885
|
attr_reader :applicable_product_tags
|
806
886
|
|
@@ -820,6 +900,24 @@ module MetronomeSDK
|
|
820
900
|
sig { params(description: String).void }
|
821
901
|
attr_writer :description
|
822
902
|
|
903
|
+
# Optional configuration for commit hierarchy access control
|
904
|
+
sig do
|
905
|
+
returns(
|
906
|
+
T.nilable(
|
907
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration
|
908
|
+
)
|
909
|
+
)
|
910
|
+
end
|
911
|
+
attr_reader :hierarchy_configuration
|
912
|
+
|
913
|
+
sig do
|
914
|
+
params(
|
915
|
+
hierarchy_configuration:
|
916
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::OrHash
|
917
|
+
).void
|
918
|
+
end
|
919
|
+
attr_writer :hierarchy_configuration
|
920
|
+
|
823
921
|
# Required for "POSTPAID" commits: the true up invoice will be generated at this
|
824
922
|
# time and only one schedule item is allowed; the total must match access_schedule
|
825
923
|
# amount. Optional for "PREPAID" commits: if not provided, this will be a
|
@@ -905,6 +1003,31 @@ module MetronomeSDK
|
|
905
1003
|
sig { params(rollover_fraction: Float).void }
|
906
1004
|
attr_writer :rollover_fraction
|
907
1005
|
|
1006
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
1007
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
1008
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
1009
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
1010
|
+
sig do
|
1011
|
+
returns(
|
1012
|
+
T.nilable(
|
1013
|
+
T::Array[
|
1014
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::Specifier
|
1015
|
+
]
|
1016
|
+
)
|
1017
|
+
)
|
1018
|
+
end
|
1019
|
+
attr_reader :specifiers
|
1020
|
+
|
1021
|
+
sig do
|
1022
|
+
params(
|
1023
|
+
specifiers:
|
1024
|
+
T::Array[
|
1025
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::Specifier::OrHash
|
1026
|
+
]
|
1027
|
+
).void
|
1028
|
+
end
|
1029
|
+
attr_writer :specifiers
|
1030
|
+
|
908
1031
|
# A temporary ID for the commit that can be used to reference the commit for
|
909
1032
|
# commit specific overrides.
|
910
1033
|
sig { returns(T.nilable(String)) }
|
@@ -925,6 +1048,8 @@ module MetronomeSDK
|
|
925
1048
|
applicable_product_tags: T::Array[String],
|
926
1049
|
custom_fields: T::Hash[Symbol, String],
|
927
1050
|
description: String,
|
1051
|
+
hierarchy_configuration:
|
1052
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::OrHash,
|
928
1053
|
invoice_schedule:
|
929
1054
|
MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule::OrHash,
|
930
1055
|
name: String,
|
@@ -935,6 +1060,10 @@ module MetronomeSDK
|
|
935
1060
|
rate_type:
|
936
1061
|
MetronomeSDK::V1::ContractCreateParams::Commit::RateType::OrSymbol,
|
937
1062
|
rollover_fraction: Float,
|
1063
|
+
specifiers:
|
1064
|
+
T::Array[
|
1065
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::Specifier::OrHash
|
1066
|
+
],
|
938
1067
|
temporary_id: String
|
939
1068
|
).returns(T.attached_class)
|
940
1069
|
end
|
@@ -947,15 +1076,19 @@ module MetronomeSDK
|
|
947
1076
|
access_schedule: nil,
|
948
1077
|
# (DEPRECATED) Use access_schedule and invoice_schedule instead.
|
949
1078
|
amount: nil,
|
950
|
-
# Which products the commit applies to. If
|
951
|
-
# applicable_product_tags are not provided, the commit applies to
|
1079
|
+
# Which products the commit applies to. If applicable_product_ids,
|
1080
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
1081
|
+
# all products.
|
952
1082
|
applicable_product_ids: nil,
|
953
|
-
# Which tags the commit applies to. If
|
954
|
-
# applicable_product_tags are not provided, the commit applies to
|
1083
|
+
# Which tags the commit applies to. If applicable_product_ids,
|
1084
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
1085
|
+
# all products.
|
955
1086
|
applicable_product_tags: nil,
|
956
1087
|
custom_fields: nil,
|
957
1088
|
# Used only in UI/API. It is not exposed to end customers.
|
958
1089
|
description: nil,
|
1090
|
+
# Optional configuration for commit hierarchy access control
|
1091
|
+
hierarchy_configuration: nil,
|
959
1092
|
# Required for "POSTPAID" commits: the true up invoice will be generated at this
|
960
1093
|
# time and only one schedule item is allowed; the total must match access_schedule
|
961
1094
|
# amount. Optional for "PREPAID" commits: if not provided, this will be a
|
@@ -973,6 +1106,11 @@ module MetronomeSDK
|
|
973
1106
|
rate_type: nil,
|
974
1107
|
# Fraction of unused segments that will be rolled over. Must be between 0 and 1.
|
975
1108
|
rollover_fraction: nil,
|
1109
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
1110
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
1111
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
1112
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
1113
|
+
specifiers: nil,
|
976
1114
|
# A temporary ID for the commit that can be used to reference the commit for
|
977
1115
|
# commit specific overrides.
|
978
1116
|
temporary_id: nil
|
@@ -992,6 +1130,8 @@ module MetronomeSDK
|
|
992
1130
|
applicable_product_tags: T::Array[String],
|
993
1131
|
custom_fields: T::Hash[Symbol, String],
|
994
1132
|
description: String,
|
1133
|
+
hierarchy_configuration:
|
1134
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration,
|
995
1135
|
invoice_schedule:
|
996
1136
|
MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule,
|
997
1137
|
name: String,
|
@@ -1002,6 +1142,10 @@ module MetronomeSDK
|
|
1002
1142
|
rate_type:
|
1003
1143
|
MetronomeSDK::V1::ContractCreateParams::Commit::RateType::OrSymbol,
|
1004
1144
|
rollover_fraction: Float,
|
1145
|
+
specifiers:
|
1146
|
+
T::Array[
|
1147
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::Specifier
|
1148
|
+
],
|
1005
1149
|
temporary_id: String
|
1006
1150
|
}
|
1007
1151
|
)
|
@@ -1147,6 +1291,282 @@ module MetronomeSDK
|
|
1147
1291
|
end
|
1148
1292
|
end
|
1149
1293
|
|
1294
|
+
class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
1295
|
+
OrHash =
|
1296
|
+
T.type_alias do
|
1297
|
+
T.any(
|
1298
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration,
|
1299
|
+
MetronomeSDK::Internal::AnyHash
|
1300
|
+
)
|
1301
|
+
end
|
1302
|
+
|
1303
|
+
sig do
|
1304
|
+
returns(
|
1305
|
+
T.any(
|
1306
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
|
1307
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
|
1308
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
|
1309
|
+
)
|
1310
|
+
)
|
1311
|
+
end
|
1312
|
+
attr_accessor :child_access
|
1313
|
+
|
1314
|
+
# Optional configuration for commit hierarchy access control
|
1315
|
+
sig do
|
1316
|
+
params(
|
1317
|
+
child_access:
|
1318
|
+
T.any(
|
1319
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::OrHash,
|
1320
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::OrHash,
|
1321
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::OrHash
|
1322
|
+
)
|
1323
|
+
).returns(T.attached_class)
|
1324
|
+
end
|
1325
|
+
def self.new(child_access:)
|
1326
|
+
end
|
1327
|
+
|
1328
|
+
sig do
|
1329
|
+
override.returns(
|
1330
|
+
{
|
1331
|
+
child_access:
|
1332
|
+
T.any(
|
1333
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
|
1334
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
|
1335
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
|
1336
|
+
)
|
1337
|
+
}
|
1338
|
+
)
|
1339
|
+
end
|
1340
|
+
def to_hash
|
1341
|
+
end
|
1342
|
+
|
1343
|
+
module ChildAccess
|
1344
|
+
extend MetronomeSDK::Internal::Type::Union
|
1345
|
+
|
1346
|
+
Variants =
|
1347
|
+
T.type_alias do
|
1348
|
+
T.any(
|
1349
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
|
1350
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
|
1351
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
|
1352
|
+
)
|
1353
|
+
end
|
1354
|
+
|
1355
|
+
class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
|
1356
|
+
OrHash =
|
1357
|
+
T.type_alias do
|
1358
|
+
T.any(
|
1359
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
|
1360
|
+
MetronomeSDK::Internal::AnyHash
|
1361
|
+
)
|
1362
|
+
end
|
1363
|
+
|
1364
|
+
sig do
|
1365
|
+
returns(
|
1366
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::OrSymbol
|
1367
|
+
)
|
1368
|
+
end
|
1369
|
+
attr_accessor :type
|
1370
|
+
|
1371
|
+
sig do
|
1372
|
+
params(
|
1373
|
+
type:
|
1374
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::OrSymbol
|
1375
|
+
).returns(T.attached_class)
|
1376
|
+
end
|
1377
|
+
def self.new(type:)
|
1378
|
+
end
|
1379
|
+
|
1380
|
+
sig do
|
1381
|
+
override.returns(
|
1382
|
+
{
|
1383
|
+
type:
|
1384
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::OrSymbol
|
1385
|
+
}
|
1386
|
+
)
|
1387
|
+
end
|
1388
|
+
def to_hash
|
1389
|
+
end
|
1390
|
+
|
1391
|
+
module Type
|
1392
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1393
|
+
|
1394
|
+
TaggedSymbol =
|
1395
|
+
T.type_alias do
|
1396
|
+
T.all(
|
1397
|
+
Symbol,
|
1398
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
|
1399
|
+
)
|
1400
|
+
end
|
1401
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1402
|
+
|
1403
|
+
ALL =
|
1404
|
+
T.let(
|
1405
|
+
:ALL,
|
1406
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
|
1407
|
+
)
|
1408
|
+
|
1409
|
+
sig do
|
1410
|
+
override.returns(
|
1411
|
+
T::Array[
|
1412
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
|
1413
|
+
]
|
1414
|
+
)
|
1415
|
+
end
|
1416
|
+
def self.values
|
1417
|
+
end
|
1418
|
+
end
|
1419
|
+
end
|
1420
|
+
|
1421
|
+
class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
|
1422
|
+
OrHash =
|
1423
|
+
T.type_alias do
|
1424
|
+
T.any(
|
1425
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
|
1426
|
+
MetronomeSDK::Internal::AnyHash
|
1427
|
+
)
|
1428
|
+
end
|
1429
|
+
|
1430
|
+
sig do
|
1431
|
+
returns(
|
1432
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::OrSymbol
|
1433
|
+
)
|
1434
|
+
end
|
1435
|
+
attr_accessor :type
|
1436
|
+
|
1437
|
+
sig do
|
1438
|
+
params(
|
1439
|
+
type:
|
1440
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::OrSymbol
|
1441
|
+
).returns(T.attached_class)
|
1442
|
+
end
|
1443
|
+
def self.new(type:)
|
1444
|
+
end
|
1445
|
+
|
1446
|
+
sig do
|
1447
|
+
override.returns(
|
1448
|
+
{
|
1449
|
+
type:
|
1450
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::OrSymbol
|
1451
|
+
}
|
1452
|
+
)
|
1453
|
+
end
|
1454
|
+
def to_hash
|
1455
|
+
end
|
1456
|
+
|
1457
|
+
module Type
|
1458
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1459
|
+
|
1460
|
+
TaggedSymbol =
|
1461
|
+
T.type_alias do
|
1462
|
+
T.all(
|
1463
|
+
Symbol,
|
1464
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
|
1465
|
+
)
|
1466
|
+
end
|
1467
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1468
|
+
|
1469
|
+
NONE =
|
1470
|
+
T.let(
|
1471
|
+
:NONE,
|
1472
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
|
1473
|
+
)
|
1474
|
+
|
1475
|
+
sig do
|
1476
|
+
override.returns(
|
1477
|
+
T::Array[
|
1478
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
|
1479
|
+
]
|
1480
|
+
)
|
1481
|
+
end
|
1482
|
+
def self.values
|
1483
|
+
end
|
1484
|
+
end
|
1485
|
+
end
|
1486
|
+
|
1487
|
+
class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
|
1488
|
+
OrHash =
|
1489
|
+
T.type_alias do
|
1490
|
+
T.any(
|
1491
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs,
|
1492
|
+
MetronomeSDK::Internal::AnyHash
|
1493
|
+
)
|
1494
|
+
end
|
1495
|
+
|
1496
|
+
sig { returns(T::Array[String]) }
|
1497
|
+
attr_accessor :contract_ids
|
1498
|
+
|
1499
|
+
sig do
|
1500
|
+
returns(
|
1501
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::OrSymbol
|
1502
|
+
)
|
1503
|
+
end
|
1504
|
+
attr_accessor :type
|
1505
|
+
|
1506
|
+
sig do
|
1507
|
+
params(
|
1508
|
+
contract_ids: T::Array[String],
|
1509
|
+
type:
|
1510
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::OrSymbol
|
1511
|
+
).returns(T.attached_class)
|
1512
|
+
end
|
1513
|
+
def self.new(contract_ids:, type:)
|
1514
|
+
end
|
1515
|
+
|
1516
|
+
sig do
|
1517
|
+
override.returns(
|
1518
|
+
{
|
1519
|
+
contract_ids: T::Array[String],
|
1520
|
+
type:
|
1521
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::OrSymbol
|
1522
|
+
}
|
1523
|
+
)
|
1524
|
+
end
|
1525
|
+
def to_hash
|
1526
|
+
end
|
1527
|
+
|
1528
|
+
module Type
|
1529
|
+
extend MetronomeSDK::Internal::Type::Enum
|
1530
|
+
|
1531
|
+
TaggedSymbol =
|
1532
|
+
T.type_alias do
|
1533
|
+
T.all(
|
1534
|
+
Symbol,
|
1535
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
|
1536
|
+
)
|
1537
|
+
end
|
1538
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1539
|
+
|
1540
|
+
CONTRACT_IDS =
|
1541
|
+
T.let(
|
1542
|
+
:CONTRACT_IDS,
|
1543
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
|
1544
|
+
)
|
1545
|
+
|
1546
|
+
sig do
|
1547
|
+
override.returns(
|
1548
|
+
T::Array[
|
1549
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
|
1550
|
+
]
|
1551
|
+
)
|
1552
|
+
end
|
1553
|
+
def self.values
|
1554
|
+
end
|
1555
|
+
end
|
1556
|
+
end
|
1557
|
+
|
1558
|
+
sig do
|
1559
|
+
override.returns(
|
1560
|
+
T::Array[
|
1561
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::HierarchyConfiguration::ChildAccess::Variants
|
1562
|
+
]
|
1563
|
+
)
|
1564
|
+
end
|
1565
|
+
def self.variants
|
1566
|
+
end
|
1567
|
+
end
|
1568
|
+
end
|
1569
|
+
|
1150
1570
|
class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
|
1151
1571
|
OrHash =
|
1152
1572
|
T.type_alias do
|
@@ -1547,7 +1967,25 @@ module MetronomeSDK
|
|
1547
1967
|
end
|
1548
1968
|
attr_accessor :payment_gate_type
|
1549
1969
|
|
1550
|
-
# Only applicable if using
|
1970
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
1971
|
+
sig do
|
1972
|
+
returns(
|
1973
|
+
T.nilable(
|
1974
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig
|
1975
|
+
)
|
1976
|
+
)
|
1977
|
+
end
|
1978
|
+
attr_reader :precalculated_tax_config
|
1979
|
+
|
1980
|
+
sig do
|
1981
|
+
params(
|
1982
|
+
precalculated_tax_config:
|
1983
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig::OrHash
|
1984
|
+
).void
|
1985
|
+
end
|
1986
|
+
attr_writer :precalculated_tax_config
|
1987
|
+
|
1988
|
+
# Only applicable if using STRIPE as your payment gate type.
|
1551
1989
|
sig do
|
1552
1990
|
returns(
|
1553
1991
|
T.nilable(
|
@@ -1590,6 +2028,8 @@ module MetronomeSDK
|
|
1590
2028
|
params(
|
1591
2029
|
payment_gate_type:
|
1592
2030
|
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PaymentGateType::OrSymbol,
|
2031
|
+
precalculated_tax_config:
|
2032
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig::OrHash,
|
1593
2033
|
stripe_config:
|
1594
2034
|
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::OrHash,
|
1595
2035
|
tax_type:
|
@@ -1602,7 +2042,9 @@ module MetronomeSDK
|
|
1602
2042
|
# facilitate payment using your own payment integration. Select NONE if you do not
|
1603
2043
|
# wish to payment gate the commit balance.
|
1604
2044
|
payment_gate_type:,
|
1605
|
-
# Only applicable if using
|
2045
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
2046
|
+
precalculated_tax_config: nil,
|
2047
|
+
# Only applicable if using STRIPE as your payment gate type.
|
1606
2048
|
stripe_config: nil,
|
1607
2049
|
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
1608
2050
|
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
@@ -1616,6 +2058,8 @@ module MetronomeSDK
|
|
1616
2058
|
{
|
1617
2059
|
payment_gate_type:
|
1618
2060
|
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PaymentGateType::OrSymbol,
|
2061
|
+
precalculated_tax_config:
|
2062
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig,
|
1619
2063
|
stripe_config:
|
1620
2064
|
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig,
|
1621
2065
|
tax_type:
|
@@ -1669,6 +2113,49 @@ module MetronomeSDK
|
|
1669
2113
|
end
|
1670
2114
|
end
|
1671
2115
|
|
2116
|
+
class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
|
2117
|
+
OrHash =
|
2118
|
+
T.type_alias do
|
2119
|
+
T.any(
|
2120
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig,
|
2121
|
+
MetronomeSDK::Internal::AnyHash
|
2122
|
+
)
|
2123
|
+
end
|
2124
|
+
|
2125
|
+
# Amount of tax to be applied. This should be in the same currency and
|
2126
|
+
# denomination as the commit's invoice schedule
|
2127
|
+
sig { returns(Float) }
|
2128
|
+
attr_accessor :tax_amount
|
2129
|
+
|
2130
|
+
# Name of the tax to be applied. This may be used in an invoice line item
|
2131
|
+
# description.
|
2132
|
+
sig { returns(T.nilable(String)) }
|
2133
|
+
attr_reader :tax_name
|
2134
|
+
|
2135
|
+
sig { params(tax_name: String).void }
|
2136
|
+
attr_writer :tax_name
|
2137
|
+
|
2138
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
2139
|
+
sig do
|
2140
|
+
params(tax_amount: Float, tax_name: String).returns(
|
2141
|
+
T.attached_class
|
2142
|
+
)
|
2143
|
+
end
|
2144
|
+
def self.new(
|
2145
|
+
# Amount of tax to be applied. This should be in the same currency and
|
2146
|
+
# denomination as the commit's invoice schedule
|
2147
|
+
tax_amount:,
|
2148
|
+
# Name of the tax to be applied. This may be used in an invoice line item
|
2149
|
+
# description.
|
2150
|
+
tax_name: nil
|
2151
|
+
)
|
2152
|
+
end
|
2153
|
+
|
2154
|
+
sig { override.returns({ tax_amount: Float, tax_name: String }) }
|
2155
|
+
def to_hash
|
2156
|
+
end
|
2157
|
+
end
|
2158
|
+
|
1672
2159
|
class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
|
1673
2160
|
OrHash =
|
1674
2161
|
T.type_alias do
|
@@ -1686,16 +2173,28 @@ module MetronomeSDK
|
|
1686
2173
|
end
|
1687
2174
|
attr_accessor :payment_type
|
1688
2175
|
|
1689
|
-
#
|
2176
|
+
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
2177
|
+
# your payment type.
|
2178
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
2179
|
+
attr_reader :invoice_metadata
|
2180
|
+
|
2181
|
+
sig { params(invoice_metadata: T::Hash[Symbol, String]).void }
|
2182
|
+
attr_writer :invoice_metadata
|
2183
|
+
|
2184
|
+
# Only applicable if using STRIPE as your payment gate type.
|
1690
2185
|
sig do
|
1691
2186
|
params(
|
1692
2187
|
payment_type:
|
1693
|
-
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol
|
2188
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
2189
|
+
invoice_metadata: T::Hash[Symbol, String]
|
1694
2190
|
).returns(T.attached_class)
|
1695
2191
|
end
|
1696
2192
|
def self.new(
|
1697
2193
|
# If left blank, will default to INVOICE
|
1698
|
-
payment_type
|
2194
|
+
payment_type:,
|
2195
|
+
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
2196
|
+
# your payment type.
|
2197
|
+
invoice_metadata: nil
|
1699
2198
|
)
|
1700
2199
|
end
|
1701
2200
|
|
@@ -1703,7 +2202,8 @@ module MetronomeSDK
|
|
1703
2202
|
override.returns(
|
1704
2203
|
{
|
1705
2204
|
payment_type:
|
1706
|
-
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol
|
2205
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
2206
|
+
invoice_metadata: T::Hash[Symbol, String]
|
1707
2207
|
}
|
1708
2208
|
)
|
1709
2209
|
end
|
@@ -1771,6 +2271,16 @@ module MetronomeSDK
|
|
1771
2271
|
:STRIPE,
|
1772
2272
|
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::TaxType::TaggedSymbol
|
1773
2273
|
)
|
2274
|
+
ANROK =
|
2275
|
+
T.let(
|
2276
|
+
:ANROK,
|
2277
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::TaxType::TaggedSymbol
|
2278
|
+
)
|
2279
|
+
PRECALCULATED =
|
2280
|
+
T.let(
|
2281
|
+
:PRECALCULATED,
|
2282
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::TaxType::TaggedSymbol
|
2283
|
+
)
|
1774
2284
|
|
1775
2285
|
sig do
|
1776
2286
|
override.returns(
|
@@ -1817,19 +2327,90 @@ module MetronomeSDK
|
|
1817
2327
|
def self.values
|
1818
2328
|
end
|
1819
2329
|
end
|
1820
|
-
end
|
1821
2330
|
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
2331
|
+
class Specifier < MetronomeSDK::Internal::Type::BaseModel
|
2332
|
+
OrHash =
|
2333
|
+
T.type_alias do
|
2334
|
+
T.any(
|
2335
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::Specifier,
|
2336
|
+
MetronomeSDK::Internal::AnyHash
|
2337
|
+
)
|
2338
|
+
end
|
2339
|
+
|
2340
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
2341
|
+
attr_reader :presentation_group_values
|
2342
|
+
|
2343
|
+
sig do
|
2344
|
+
params(presentation_group_values: T::Hash[Symbol, String]).void
|
1829
2345
|
end
|
2346
|
+
attr_writer :presentation_group_values
|
1830
2347
|
|
1831
|
-
|
1832
|
-
|
2348
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
2349
|
+
attr_reader :pricing_group_values
|
2350
|
+
|
2351
|
+
sig { params(pricing_group_values: T::Hash[Symbol, String]).void }
|
2352
|
+
attr_writer :pricing_group_values
|
2353
|
+
|
2354
|
+
# If provided, the specifier will only apply to the product with the specified ID.
|
2355
|
+
sig { returns(T.nilable(String)) }
|
2356
|
+
attr_reader :product_id
|
2357
|
+
|
2358
|
+
sig { params(product_id: String).void }
|
2359
|
+
attr_writer :product_id
|
2360
|
+
|
2361
|
+
# If provided, the specifier will only apply to products with all the specified
|
2362
|
+
# tags.
|
2363
|
+
sig { returns(T.nilable(T::Array[String])) }
|
2364
|
+
attr_reader :product_tags
|
2365
|
+
|
2366
|
+
sig { params(product_tags: T::Array[String]).void }
|
2367
|
+
attr_writer :product_tags
|
2368
|
+
|
2369
|
+
sig do
|
2370
|
+
params(
|
2371
|
+
presentation_group_values: T::Hash[Symbol, String],
|
2372
|
+
pricing_group_values: T::Hash[Symbol, String],
|
2373
|
+
product_id: String,
|
2374
|
+
product_tags: T::Array[String]
|
2375
|
+
).returns(T.attached_class)
|
2376
|
+
end
|
2377
|
+
def self.new(
|
2378
|
+
presentation_group_values: nil,
|
2379
|
+
pricing_group_values: nil,
|
2380
|
+
# If provided, the specifier will only apply to the product with the specified ID.
|
2381
|
+
product_id: nil,
|
2382
|
+
# If provided, the specifier will only apply to products with all the specified
|
2383
|
+
# tags.
|
2384
|
+
product_tags: nil
|
2385
|
+
)
|
2386
|
+
end
|
2387
|
+
|
2388
|
+
sig do
|
2389
|
+
override.returns(
|
2390
|
+
{
|
2391
|
+
presentation_group_values: T::Hash[Symbol, String],
|
2392
|
+
pricing_group_values: T::Hash[Symbol, String],
|
2393
|
+
product_id: String,
|
2394
|
+
product_tags: T::Array[String]
|
2395
|
+
}
|
2396
|
+
)
|
2397
|
+
end
|
2398
|
+
def to_hash
|
2399
|
+
end
|
2400
|
+
end
|
2401
|
+
end
|
2402
|
+
|
2403
|
+
class Credit < MetronomeSDK::Internal::Type::BaseModel
|
2404
|
+
OrHash =
|
2405
|
+
T.type_alias do
|
2406
|
+
T.any(
|
2407
|
+
MetronomeSDK::V1::ContractCreateParams::Credit,
|
2408
|
+
MetronomeSDK::Internal::AnyHash
|
2409
|
+
)
|
2410
|
+
end
|
2411
|
+
|
2412
|
+
# Schedule for distributing the credit to the customer.
|
2413
|
+
sig do
|
1833
2414
|
returns(
|
1834
2415
|
MetronomeSDK::V1::ContractCreateParams::Credit::AccessSchedule
|
1835
2416
|
)
|
@@ -1876,6 +2457,24 @@ module MetronomeSDK
|
|
1876
2457
|
sig { params(description: String).void }
|
1877
2458
|
attr_writer :description
|
1878
2459
|
|
2460
|
+
# Optional configuration for credit hierarchy access control
|
2461
|
+
sig do
|
2462
|
+
returns(
|
2463
|
+
T.nilable(
|
2464
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration
|
2465
|
+
)
|
2466
|
+
)
|
2467
|
+
end
|
2468
|
+
attr_reader :hierarchy_configuration
|
2469
|
+
|
2470
|
+
sig do
|
2471
|
+
params(
|
2472
|
+
hierarchy_configuration:
|
2473
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::OrHash
|
2474
|
+
).void
|
2475
|
+
end
|
2476
|
+
attr_writer :hierarchy_configuration
|
2477
|
+
|
1879
2478
|
# displayed on invoices
|
1880
2479
|
sig { returns(T.nilable(String)) }
|
1881
2480
|
attr_reader :name
|
@@ -1915,6 +2514,31 @@ module MetronomeSDK
|
|
1915
2514
|
end
|
1916
2515
|
attr_writer :rate_type
|
1917
2516
|
|
2517
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
2518
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
2519
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
2520
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
2521
|
+
sig do
|
2522
|
+
returns(
|
2523
|
+
T.nilable(
|
2524
|
+
T::Array[
|
2525
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::Specifier
|
2526
|
+
]
|
2527
|
+
)
|
2528
|
+
)
|
2529
|
+
end
|
2530
|
+
attr_reader :specifiers
|
2531
|
+
|
2532
|
+
sig do
|
2533
|
+
params(
|
2534
|
+
specifiers:
|
2535
|
+
T::Array[
|
2536
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::Specifier::OrHash
|
2537
|
+
]
|
2538
|
+
).void
|
2539
|
+
end
|
2540
|
+
attr_writer :specifiers
|
2541
|
+
|
1918
2542
|
sig do
|
1919
2543
|
params(
|
1920
2544
|
access_schedule:
|
@@ -1924,11 +2548,17 @@ module MetronomeSDK
|
|
1924
2548
|
applicable_product_tags: T::Array[String],
|
1925
2549
|
custom_fields: T::Hash[Symbol, String],
|
1926
2550
|
description: String,
|
2551
|
+
hierarchy_configuration:
|
2552
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::OrHash,
|
1927
2553
|
name: String,
|
1928
2554
|
netsuite_sales_order_id: String,
|
1929
2555
|
priority: Float,
|
1930
2556
|
rate_type:
|
1931
|
-
MetronomeSDK::V1::ContractCreateParams::Credit::RateType::OrSymbol
|
2557
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::RateType::OrSymbol,
|
2558
|
+
specifiers:
|
2559
|
+
T::Array[
|
2560
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::Specifier::OrHash
|
2561
|
+
]
|
1932
2562
|
).returns(T.attached_class)
|
1933
2563
|
end
|
1934
2564
|
def self.new(
|
@@ -1944,6 +2574,8 @@ module MetronomeSDK
|
|
1944
2574
|
custom_fields: nil,
|
1945
2575
|
# Used only in UI/API. It is not exposed to end customers.
|
1946
2576
|
description: nil,
|
2577
|
+
# Optional configuration for credit hierarchy access control
|
2578
|
+
hierarchy_configuration: nil,
|
1947
2579
|
# displayed on invoices
|
1948
2580
|
name: nil,
|
1949
2581
|
# This field's availability is dependent on your client's configuration.
|
@@ -1951,7 +2583,12 @@ module MetronomeSDK
|
|
1951
2583
|
# If multiple credits are applicable, the one with the lower priority will apply
|
1952
2584
|
# first.
|
1953
2585
|
priority: nil,
|
1954
|
-
rate_type: nil
|
2586
|
+
rate_type: nil,
|
2587
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
2588
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
2589
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
2590
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
2591
|
+
specifiers: nil
|
1955
2592
|
)
|
1956
2593
|
end
|
1957
2594
|
|
@@ -1965,11 +2602,17 @@ module MetronomeSDK
|
|
1965
2602
|
applicable_product_tags: T::Array[String],
|
1966
2603
|
custom_fields: T::Hash[Symbol, String],
|
1967
2604
|
description: String,
|
2605
|
+
hierarchy_configuration:
|
2606
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration,
|
1968
2607
|
name: String,
|
1969
2608
|
netsuite_sales_order_id: String,
|
1970
2609
|
priority: Float,
|
1971
2610
|
rate_type:
|
1972
|
-
MetronomeSDK::V1::ContractCreateParams::Credit::RateType::OrSymbol
|
2611
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::RateType::OrSymbol,
|
2612
|
+
specifiers:
|
2613
|
+
T::Array[
|
2614
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::Specifier
|
2615
|
+
]
|
1973
2616
|
}
|
1974
2617
|
)
|
1975
2618
|
end
|
@@ -2078,6 +2721,282 @@ module MetronomeSDK
|
|
2078
2721
|
end
|
2079
2722
|
end
|
2080
2723
|
|
2724
|
+
class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
2725
|
+
OrHash =
|
2726
|
+
T.type_alias do
|
2727
|
+
T.any(
|
2728
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration,
|
2729
|
+
MetronomeSDK::Internal::AnyHash
|
2730
|
+
)
|
2731
|
+
end
|
2732
|
+
|
2733
|
+
sig do
|
2734
|
+
returns(
|
2735
|
+
T.any(
|
2736
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
|
2737
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
|
2738
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
|
2739
|
+
)
|
2740
|
+
)
|
2741
|
+
end
|
2742
|
+
attr_accessor :child_access
|
2743
|
+
|
2744
|
+
# Optional configuration for credit hierarchy access control
|
2745
|
+
sig do
|
2746
|
+
params(
|
2747
|
+
child_access:
|
2748
|
+
T.any(
|
2749
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::OrHash,
|
2750
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::OrHash,
|
2751
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::OrHash
|
2752
|
+
)
|
2753
|
+
).returns(T.attached_class)
|
2754
|
+
end
|
2755
|
+
def self.new(child_access:)
|
2756
|
+
end
|
2757
|
+
|
2758
|
+
sig do
|
2759
|
+
override.returns(
|
2760
|
+
{
|
2761
|
+
child_access:
|
2762
|
+
T.any(
|
2763
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
|
2764
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
|
2765
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
|
2766
|
+
)
|
2767
|
+
}
|
2768
|
+
)
|
2769
|
+
end
|
2770
|
+
def to_hash
|
2771
|
+
end
|
2772
|
+
|
2773
|
+
module ChildAccess
|
2774
|
+
extend MetronomeSDK::Internal::Type::Union
|
2775
|
+
|
2776
|
+
Variants =
|
2777
|
+
T.type_alias do
|
2778
|
+
T.any(
|
2779
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
|
2780
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
|
2781
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs
|
2782
|
+
)
|
2783
|
+
end
|
2784
|
+
|
2785
|
+
class CommitHierarchyChildAccessAll < MetronomeSDK::Internal::Type::BaseModel
|
2786
|
+
OrHash =
|
2787
|
+
T.type_alias do
|
2788
|
+
T.any(
|
2789
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll,
|
2790
|
+
MetronomeSDK::Internal::AnyHash
|
2791
|
+
)
|
2792
|
+
end
|
2793
|
+
|
2794
|
+
sig do
|
2795
|
+
returns(
|
2796
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::OrSymbol
|
2797
|
+
)
|
2798
|
+
end
|
2799
|
+
attr_accessor :type
|
2800
|
+
|
2801
|
+
sig do
|
2802
|
+
params(
|
2803
|
+
type:
|
2804
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::OrSymbol
|
2805
|
+
).returns(T.attached_class)
|
2806
|
+
end
|
2807
|
+
def self.new(type:)
|
2808
|
+
end
|
2809
|
+
|
2810
|
+
sig do
|
2811
|
+
override.returns(
|
2812
|
+
{
|
2813
|
+
type:
|
2814
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::OrSymbol
|
2815
|
+
}
|
2816
|
+
)
|
2817
|
+
end
|
2818
|
+
def to_hash
|
2819
|
+
end
|
2820
|
+
|
2821
|
+
module Type
|
2822
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2823
|
+
|
2824
|
+
TaggedSymbol =
|
2825
|
+
T.type_alias do
|
2826
|
+
T.all(
|
2827
|
+
Symbol,
|
2828
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type
|
2829
|
+
)
|
2830
|
+
end
|
2831
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
2832
|
+
|
2833
|
+
ALL =
|
2834
|
+
T.let(
|
2835
|
+
:ALL,
|
2836
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
|
2837
|
+
)
|
2838
|
+
|
2839
|
+
sig do
|
2840
|
+
override.returns(
|
2841
|
+
T::Array[
|
2842
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type::TaggedSymbol
|
2843
|
+
]
|
2844
|
+
)
|
2845
|
+
end
|
2846
|
+
def self.values
|
2847
|
+
end
|
2848
|
+
end
|
2849
|
+
end
|
2850
|
+
|
2851
|
+
class CommitHierarchyChildAccessNone < MetronomeSDK::Internal::Type::BaseModel
|
2852
|
+
OrHash =
|
2853
|
+
T.type_alias do
|
2854
|
+
T.any(
|
2855
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone,
|
2856
|
+
MetronomeSDK::Internal::AnyHash
|
2857
|
+
)
|
2858
|
+
end
|
2859
|
+
|
2860
|
+
sig do
|
2861
|
+
returns(
|
2862
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::OrSymbol
|
2863
|
+
)
|
2864
|
+
end
|
2865
|
+
attr_accessor :type
|
2866
|
+
|
2867
|
+
sig do
|
2868
|
+
params(
|
2869
|
+
type:
|
2870
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::OrSymbol
|
2871
|
+
).returns(T.attached_class)
|
2872
|
+
end
|
2873
|
+
def self.new(type:)
|
2874
|
+
end
|
2875
|
+
|
2876
|
+
sig do
|
2877
|
+
override.returns(
|
2878
|
+
{
|
2879
|
+
type:
|
2880
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::OrSymbol
|
2881
|
+
}
|
2882
|
+
)
|
2883
|
+
end
|
2884
|
+
def to_hash
|
2885
|
+
end
|
2886
|
+
|
2887
|
+
module Type
|
2888
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2889
|
+
|
2890
|
+
TaggedSymbol =
|
2891
|
+
T.type_alias do
|
2892
|
+
T.all(
|
2893
|
+
Symbol,
|
2894
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type
|
2895
|
+
)
|
2896
|
+
end
|
2897
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
2898
|
+
|
2899
|
+
NONE =
|
2900
|
+
T.let(
|
2901
|
+
:NONE,
|
2902
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
|
2903
|
+
)
|
2904
|
+
|
2905
|
+
sig do
|
2906
|
+
override.returns(
|
2907
|
+
T::Array[
|
2908
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type::TaggedSymbol
|
2909
|
+
]
|
2910
|
+
)
|
2911
|
+
end
|
2912
|
+
def self.values
|
2913
|
+
end
|
2914
|
+
end
|
2915
|
+
end
|
2916
|
+
|
2917
|
+
class CommitHierarchyChildAccessContractIDs < MetronomeSDK::Internal::Type::BaseModel
|
2918
|
+
OrHash =
|
2919
|
+
T.type_alias do
|
2920
|
+
T.any(
|
2921
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs,
|
2922
|
+
MetronomeSDK::Internal::AnyHash
|
2923
|
+
)
|
2924
|
+
end
|
2925
|
+
|
2926
|
+
sig { returns(T::Array[String]) }
|
2927
|
+
attr_accessor :contract_ids
|
2928
|
+
|
2929
|
+
sig do
|
2930
|
+
returns(
|
2931
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::OrSymbol
|
2932
|
+
)
|
2933
|
+
end
|
2934
|
+
attr_accessor :type
|
2935
|
+
|
2936
|
+
sig do
|
2937
|
+
params(
|
2938
|
+
contract_ids: T::Array[String],
|
2939
|
+
type:
|
2940
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::OrSymbol
|
2941
|
+
).returns(T.attached_class)
|
2942
|
+
end
|
2943
|
+
def self.new(contract_ids:, type:)
|
2944
|
+
end
|
2945
|
+
|
2946
|
+
sig do
|
2947
|
+
override.returns(
|
2948
|
+
{
|
2949
|
+
contract_ids: T::Array[String],
|
2950
|
+
type:
|
2951
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::OrSymbol
|
2952
|
+
}
|
2953
|
+
)
|
2954
|
+
end
|
2955
|
+
def to_hash
|
2956
|
+
end
|
2957
|
+
|
2958
|
+
module Type
|
2959
|
+
extend MetronomeSDK::Internal::Type::Enum
|
2960
|
+
|
2961
|
+
TaggedSymbol =
|
2962
|
+
T.type_alias do
|
2963
|
+
T.all(
|
2964
|
+
Symbol,
|
2965
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type
|
2966
|
+
)
|
2967
|
+
end
|
2968
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
2969
|
+
|
2970
|
+
CONTRACT_IDS =
|
2971
|
+
T.let(
|
2972
|
+
:CONTRACT_IDS,
|
2973
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
|
2974
|
+
)
|
2975
|
+
|
2976
|
+
sig do
|
2977
|
+
override.returns(
|
2978
|
+
T::Array[
|
2979
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type::TaggedSymbol
|
2980
|
+
]
|
2981
|
+
)
|
2982
|
+
end
|
2983
|
+
def self.values
|
2984
|
+
end
|
2985
|
+
end
|
2986
|
+
end
|
2987
|
+
|
2988
|
+
sig do
|
2989
|
+
override.returns(
|
2990
|
+
T::Array[
|
2991
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::HierarchyConfiguration::ChildAccess::Variants
|
2992
|
+
]
|
2993
|
+
)
|
2994
|
+
end
|
2995
|
+
def self.variants
|
2996
|
+
end
|
2997
|
+
end
|
2998
|
+
end
|
2999
|
+
|
2081
3000
|
module RateType
|
2082
3001
|
extend MetronomeSDK::Internal::Type::Enum
|
2083
3002
|
|
@@ -2111,30 +3030,101 @@ module MetronomeSDK
|
|
2111
3030
|
def self.values
|
2112
3031
|
end
|
2113
3032
|
end
|
2114
|
-
end
|
2115
3033
|
|
2116
|
-
|
2117
|
-
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2121
|
-
|
2122
|
-
|
3034
|
+
class Specifier < MetronomeSDK::Internal::Type::BaseModel
|
3035
|
+
OrHash =
|
3036
|
+
T.type_alias do
|
3037
|
+
T.any(
|
3038
|
+
MetronomeSDK::V1::ContractCreateParams::Credit::Specifier,
|
3039
|
+
MetronomeSDK::Internal::AnyHash
|
3040
|
+
)
|
3041
|
+
end
|
3042
|
+
|
3043
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
3044
|
+
attr_reader :presentation_group_values
|
3045
|
+
|
3046
|
+
sig do
|
3047
|
+
params(presentation_group_values: T::Hash[Symbol, String]).void
|
2123
3048
|
end
|
3049
|
+
attr_writer :presentation_group_values
|
2124
3050
|
|
2125
|
-
|
2126
|
-
|
3051
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
3052
|
+
attr_reader :pricing_group_values
|
2127
3053
|
|
2128
|
-
|
2129
|
-
|
2130
|
-
returns(MetronomeSDK::V1::ContractCreateParams::Discount::Schedule)
|
2131
|
-
end
|
2132
|
-
attr_reader :schedule
|
3054
|
+
sig { params(pricing_group_values: T::Hash[Symbol, String]).void }
|
3055
|
+
attr_writer :pricing_group_values
|
2133
3056
|
|
2134
|
-
|
2135
|
-
|
2136
|
-
|
2137
|
-
|
3057
|
+
# If provided, the specifier will only apply to the product with the specified ID.
|
3058
|
+
sig { returns(T.nilable(String)) }
|
3059
|
+
attr_reader :product_id
|
3060
|
+
|
3061
|
+
sig { params(product_id: String).void }
|
3062
|
+
attr_writer :product_id
|
3063
|
+
|
3064
|
+
# If provided, the specifier will only apply to products with all the specified
|
3065
|
+
# tags.
|
3066
|
+
sig { returns(T.nilable(T::Array[String])) }
|
3067
|
+
attr_reader :product_tags
|
3068
|
+
|
3069
|
+
sig { params(product_tags: T::Array[String]).void }
|
3070
|
+
attr_writer :product_tags
|
3071
|
+
|
3072
|
+
sig do
|
3073
|
+
params(
|
3074
|
+
presentation_group_values: T::Hash[Symbol, String],
|
3075
|
+
pricing_group_values: T::Hash[Symbol, String],
|
3076
|
+
product_id: String,
|
3077
|
+
product_tags: T::Array[String]
|
3078
|
+
).returns(T.attached_class)
|
3079
|
+
end
|
3080
|
+
def self.new(
|
3081
|
+
presentation_group_values: nil,
|
3082
|
+
pricing_group_values: nil,
|
3083
|
+
# If provided, the specifier will only apply to the product with the specified ID.
|
3084
|
+
product_id: nil,
|
3085
|
+
# If provided, the specifier will only apply to products with all the specified
|
3086
|
+
# tags.
|
3087
|
+
product_tags: nil
|
3088
|
+
)
|
3089
|
+
end
|
3090
|
+
|
3091
|
+
sig do
|
3092
|
+
override.returns(
|
3093
|
+
{
|
3094
|
+
presentation_group_values: T::Hash[Symbol, String],
|
3095
|
+
pricing_group_values: T::Hash[Symbol, String],
|
3096
|
+
product_id: String,
|
3097
|
+
product_tags: T::Array[String]
|
3098
|
+
}
|
3099
|
+
)
|
3100
|
+
end
|
3101
|
+
def to_hash
|
3102
|
+
end
|
3103
|
+
end
|
3104
|
+
end
|
3105
|
+
|
3106
|
+
class Discount < MetronomeSDK::Internal::Type::BaseModel
|
3107
|
+
OrHash =
|
3108
|
+
T.type_alias do
|
3109
|
+
T.any(
|
3110
|
+
MetronomeSDK::V1::ContractCreateParams::Discount,
|
3111
|
+
MetronomeSDK::Internal::AnyHash
|
3112
|
+
)
|
3113
|
+
end
|
3114
|
+
|
3115
|
+
sig { returns(String) }
|
3116
|
+
attr_accessor :product_id
|
3117
|
+
|
3118
|
+
# Must provide either schedule_items or recurring_schedule.
|
3119
|
+
sig do
|
3120
|
+
returns(MetronomeSDK::V1::ContractCreateParams::Discount::Schedule)
|
3121
|
+
end
|
3122
|
+
attr_reader :schedule
|
3123
|
+
|
3124
|
+
sig do
|
3125
|
+
params(
|
3126
|
+
schedule:
|
3127
|
+
MetronomeSDK::V1::ContractCreateParams::Discount::Schedule::OrHash
|
2138
3128
|
).void
|
2139
3129
|
end
|
2140
3130
|
attr_writer :schedule
|
@@ -2574,6 +3564,81 @@ module MetronomeSDK
|
|
2574
3564
|
end
|
2575
3565
|
end
|
2576
3566
|
|
3567
|
+
class HierarchyConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
3568
|
+
OrHash =
|
3569
|
+
T.type_alias do
|
3570
|
+
T.any(
|
3571
|
+
MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration,
|
3572
|
+
MetronomeSDK::Internal::AnyHash
|
3573
|
+
)
|
3574
|
+
end
|
3575
|
+
|
3576
|
+
sig do
|
3577
|
+
returns(
|
3578
|
+
MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::Parent
|
3579
|
+
)
|
3580
|
+
end
|
3581
|
+
attr_reader :parent
|
3582
|
+
|
3583
|
+
sig do
|
3584
|
+
params(
|
3585
|
+
parent:
|
3586
|
+
MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::Parent::OrHash
|
3587
|
+
).void
|
3588
|
+
end
|
3589
|
+
attr_writer :parent
|
3590
|
+
|
3591
|
+
sig do
|
3592
|
+
params(
|
3593
|
+
parent:
|
3594
|
+
MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::Parent::OrHash
|
3595
|
+
).returns(T.attached_class)
|
3596
|
+
end
|
3597
|
+
def self.new(parent:)
|
3598
|
+
end
|
3599
|
+
|
3600
|
+
sig do
|
3601
|
+
override.returns(
|
3602
|
+
{
|
3603
|
+
parent:
|
3604
|
+
MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::Parent
|
3605
|
+
}
|
3606
|
+
)
|
3607
|
+
end
|
3608
|
+
def to_hash
|
3609
|
+
end
|
3610
|
+
|
3611
|
+
class Parent < MetronomeSDK::Internal::Type::BaseModel
|
3612
|
+
OrHash =
|
3613
|
+
T.type_alias do
|
3614
|
+
T.any(
|
3615
|
+
MetronomeSDK::V1::ContractCreateParams::HierarchyConfiguration::Parent,
|
3616
|
+
MetronomeSDK::Internal::AnyHash
|
3617
|
+
)
|
3618
|
+
end
|
3619
|
+
|
3620
|
+
sig { returns(String) }
|
3621
|
+
attr_accessor :contract_id
|
3622
|
+
|
3623
|
+
sig { returns(String) }
|
3624
|
+
attr_accessor :customer_id
|
3625
|
+
|
3626
|
+
sig do
|
3627
|
+
params(contract_id: String, customer_id: String).returns(
|
3628
|
+
T.attached_class
|
3629
|
+
)
|
3630
|
+
end
|
3631
|
+
def self.new(contract_id:, customer_id:)
|
3632
|
+
end
|
3633
|
+
|
3634
|
+
sig do
|
3635
|
+
override.returns({ contract_id: String, customer_id: String })
|
3636
|
+
end
|
3637
|
+
def to_hash
|
3638
|
+
end
|
3639
|
+
end
|
3640
|
+
end
|
3641
|
+
|
2577
3642
|
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
2578
3643
|
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
2579
3644
|
# each multiplier; the one with the lowest priority value will be prioritized
|
@@ -2886,6 +3951,23 @@ module MetronomeSDK
|
|
2886
3951
|
)
|
2887
3952
|
end
|
2888
3953
|
|
3954
|
+
sig do
|
3955
|
+
returns(
|
3956
|
+
T.nilable(
|
3957
|
+
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::OrSymbol
|
3958
|
+
)
|
3959
|
+
)
|
3960
|
+
end
|
3961
|
+
attr_reader :billing_frequency
|
3962
|
+
|
3963
|
+
sig do
|
3964
|
+
params(
|
3965
|
+
billing_frequency:
|
3966
|
+
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::OrSymbol
|
3967
|
+
).void
|
3968
|
+
end
|
3969
|
+
attr_writer :billing_frequency
|
3970
|
+
|
2889
3971
|
# Can only be used for commit specific overrides. Must be used in conjunction with
|
2890
3972
|
# one of product_id, product_tags, pricing_group_values, or
|
2891
3973
|
# presentation_group_values. If provided, the override will only apply to the
|
@@ -2951,6 +4033,8 @@ module MetronomeSDK
|
|
2951
4033
|
|
2952
4034
|
sig do
|
2953
4035
|
params(
|
4036
|
+
billing_frequency:
|
4037
|
+
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::OrSymbol,
|
2954
4038
|
commit_ids: T::Array[String],
|
2955
4039
|
presentation_group_values: T::Hash[Symbol, String],
|
2956
4040
|
pricing_group_values: T::Hash[Symbol, String],
|
@@ -2961,6 +4045,7 @@ module MetronomeSDK
|
|
2961
4045
|
).returns(T.attached_class)
|
2962
4046
|
end
|
2963
4047
|
def self.new(
|
4048
|
+
billing_frequency: nil,
|
2964
4049
|
# Can only be used for commit specific overrides. Must be used in conjunction with
|
2965
4050
|
# one of product_id, product_tags, pricing_group_values, or
|
2966
4051
|
# presentation_group_values. If provided, the override will only apply to the
|
@@ -2993,6 +4078,8 @@ module MetronomeSDK
|
|
2993
4078
|
sig do
|
2994
4079
|
override.returns(
|
2995
4080
|
{
|
4081
|
+
billing_frequency:
|
4082
|
+
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::OrSymbol,
|
2996
4083
|
commit_ids: T::Array[String],
|
2997
4084
|
presentation_group_values: T::Hash[Symbol, String],
|
2998
4085
|
pricing_group_values: T::Hash[Symbol, String],
|
@@ -3005,6 +4092,50 @@ module MetronomeSDK
|
|
3005
4092
|
end
|
3006
4093
|
def to_hash
|
3007
4094
|
end
|
4095
|
+
|
4096
|
+
module BillingFrequency
|
4097
|
+
extend MetronomeSDK::Internal::Type::Enum
|
4098
|
+
|
4099
|
+
TaggedSymbol =
|
4100
|
+
T.type_alias do
|
4101
|
+
T.all(
|
4102
|
+
Symbol,
|
4103
|
+
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency
|
4104
|
+
)
|
4105
|
+
end
|
4106
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
4107
|
+
|
4108
|
+
MONTHLY =
|
4109
|
+
T.let(
|
4110
|
+
:MONTHLY,
|
4111
|
+
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::TaggedSymbol
|
4112
|
+
)
|
4113
|
+
QUARTERLY =
|
4114
|
+
T.let(
|
4115
|
+
:QUARTERLY,
|
4116
|
+
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::TaggedSymbol
|
4117
|
+
)
|
4118
|
+
ANNUAL =
|
4119
|
+
T.let(
|
4120
|
+
:ANNUAL,
|
4121
|
+
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::TaggedSymbol
|
4122
|
+
)
|
4123
|
+
WEEKLY =
|
4124
|
+
T.let(
|
4125
|
+
:WEEKLY,
|
4126
|
+
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::TaggedSymbol
|
4127
|
+
)
|
4128
|
+
|
4129
|
+
sig do
|
4130
|
+
override.returns(
|
4131
|
+
T::Array[
|
4132
|
+
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::TaggedSymbol
|
4133
|
+
]
|
4134
|
+
)
|
4135
|
+
end
|
4136
|
+
def self.values
|
4137
|
+
end
|
4138
|
+
end
|
3008
4139
|
end
|
3009
4140
|
|
3010
4141
|
class OverwriteRate < MetronomeSDK::Internal::Type::BaseModel
|
@@ -3327,6 +4458,14 @@ module MetronomeSDK
|
|
3327
4458
|
sig { returns(Float) }
|
3328
4459
|
attr_accessor :threshold_amount
|
3329
4460
|
|
4461
|
+
# If provided, the threshold, recharge-to amount, and the resulting threshold
|
4462
|
+
# commit amount will be in terms of this credit type instead of the fiat currency.
|
4463
|
+
sig { returns(T.nilable(String)) }
|
4464
|
+
attr_reader :custom_credit_type_id
|
4465
|
+
|
4466
|
+
sig { params(custom_credit_type_id: String).void }
|
4467
|
+
attr_writer :custom_credit_type_id
|
4468
|
+
|
3330
4469
|
sig do
|
3331
4470
|
params(
|
3332
4471
|
commit:
|
@@ -3335,7 +4474,8 @@ module MetronomeSDK
|
|
3335
4474
|
payment_gate_config:
|
3336
4475
|
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::OrHash,
|
3337
4476
|
recharge_to_amount: Float,
|
3338
|
-
threshold_amount: Float
|
4477
|
+
threshold_amount: Float,
|
4478
|
+
custom_credit_type_id: String
|
3339
4479
|
).returns(T.attached_class)
|
3340
4480
|
end
|
3341
4481
|
def self.new(
|
@@ -3349,7 +4489,10 @@ module MetronomeSDK
|
|
3349
4489
|
recharge_to_amount:,
|
3350
4490
|
# Specify the threshold amount for the contract. Each time the contract's prepaid
|
3351
4491
|
# balance lowers to this amount, a threshold charge will be initiated.
|
3352
|
-
threshold_amount
|
4492
|
+
threshold_amount:,
|
4493
|
+
# If provided, the threshold, recharge-to amount, and the resulting threshold
|
4494
|
+
# commit amount will be in terms of this credit type instead of the fiat currency.
|
4495
|
+
custom_credit_type_id: nil
|
3353
4496
|
)
|
3354
4497
|
end
|
3355
4498
|
|
@@ -3362,7 +4505,8 @@ module MetronomeSDK
|
|
3362
4505
|
payment_gate_config:
|
3363
4506
|
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig,
|
3364
4507
|
recharge_to_amount: Float,
|
3365
|
-
threshold_amount: Float
|
4508
|
+
threshold_amount: Float,
|
4509
|
+
custom_credit_type_id: String
|
3366
4510
|
}
|
3367
4511
|
)
|
3368
4512
|
end
|
@@ -3383,17 +4527,18 @@ module MetronomeSDK
|
|
3383
4527
|
sig { returns(String) }
|
3384
4528
|
attr_accessor :product_id
|
3385
4529
|
|
3386
|
-
# Which products the threshold commit applies to. If
|
3387
|
-
#
|
3388
|
-
# products.
|
4530
|
+
# Which products the threshold commit applies to. If applicable_product_ids,
|
4531
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
4532
|
+
# all products.
|
3389
4533
|
sig { returns(T.nilable(T::Array[String])) }
|
3390
4534
|
attr_reader :applicable_product_ids
|
3391
4535
|
|
3392
4536
|
sig { params(applicable_product_ids: T::Array[String]).void }
|
3393
4537
|
attr_writer :applicable_product_ids
|
3394
4538
|
|
3395
|
-
# Which tags the threshold commit applies to. If
|
3396
|
-
# applicable_product_tags are not provided, the commit applies to
|
4539
|
+
# Which tags the threshold commit applies to. If applicable_product_ids,
|
4540
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
4541
|
+
# all products.
|
3397
4542
|
sig { returns(T.nilable(T::Array[String])) }
|
3398
4543
|
attr_reader :applicable_product_tags
|
3399
4544
|
|
@@ -3414,30 +4559,65 @@ module MetronomeSDK
|
|
3414
4559
|
sig { params(name: String).void }
|
3415
4560
|
attr_writer :name
|
3416
4561
|
|
4562
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
4563
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
4564
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
4565
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
4566
|
+
sig do
|
4567
|
+
returns(
|
4568
|
+
T.nilable(
|
4569
|
+
T::Array[
|
4570
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit::Specifier
|
4571
|
+
]
|
4572
|
+
)
|
4573
|
+
)
|
4574
|
+
end
|
4575
|
+
attr_reader :specifiers
|
4576
|
+
|
4577
|
+
sig do
|
4578
|
+
params(
|
4579
|
+
specifiers:
|
4580
|
+
T::Array[
|
4581
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit::Specifier::OrHash
|
4582
|
+
]
|
4583
|
+
).void
|
4584
|
+
end
|
4585
|
+
attr_writer :specifiers
|
4586
|
+
|
3417
4587
|
sig do
|
3418
4588
|
params(
|
3419
4589
|
product_id: String,
|
3420
4590
|
applicable_product_ids: T::Array[String],
|
3421
4591
|
applicable_product_tags: T::Array[String],
|
3422
4592
|
description: String,
|
3423
|
-
name: String
|
4593
|
+
name: String,
|
4594
|
+
specifiers:
|
4595
|
+
T::Array[
|
4596
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit::Specifier::OrHash
|
4597
|
+
]
|
3424
4598
|
).returns(T.attached_class)
|
3425
4599
|
end
|
3426
4600
|
def self.new(
|
3427
4601
|
# The commit product that will be used to generate the line item for commit
|
3428
4602
|
# payment.
|
3429
4603
|
product_id:,
|
3430
|
-
# Which products the threshold commit applies to. If
|
3431
|
-
#
|
3432
|
-
# products.
|
4604
|
+
# Which products the threshold commit applies to. If applicable_product_ids,
|
4605
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
4606
|
+
# all products.
|
3433
4607
|
applicable_product_ids: nil,
|
3434
|
-
# Which tags the threshold commit applies to. If
|
3435
|
-
# applicable_product_tags are not provided, the commit applies to
|
4608
|
+
# Which tags the threshold commit applies to. If applicable_product_ids,
|
4609
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
4610
|
+
# all products.
|
3436
4611
|
applicable_product_tags: nil,
|
3437
4612
|
description: nil,
|
3438
4613
|
# Specify the name of the line item for the threshold charge. If left blank, it
|
3439
4614
|
# will default to the commit product name.
|
3440
|
-
name: nil
|
4615
|
+
name: nil,
|
4616
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
4617
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
4618
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
4619
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
4620
|
+
specifiers: nil
|
3441
4621
|
)
|
3442
4622
|
end
|
3443
4623
|
|
@@ -3448,12 +4628,87 @@ module MetronomeSDK
|
|
3448
4628
|
applicable_product_ids: T::Array[String],
|
3449
4629
|
applicable_product_tags: T::Array[String],
|
3450
4630
|
description: String,
|
3451
|
-
name: String
|
4631
|
+
name: String,
|
4632
|
+
specifiers:
|
4633
|
+
T::Array[
|
4634
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit::Specifier
|
4635
|
+
]
|
3452
4636
|
}
|
3453
4637
|
)
|
3454
4638
|
end
|
3455
4639
|
def to_hash
|
3456
4640
|
end
|
4641
|
+
|
4642
|
+
class Specifier < MetronomeSDK::Internal::Type::BaseModel
|
4643
|
+
OrHash =
|
4644
|
+
T.type_alias do
|
4645
|
+
T.any(
|
4646
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::Commit::Specifier,
|
4647
|
+
MetronomeSDK::Internal::AnyHash
|
4648
|
+
)
|
4649
|
+
end
|
4650
|
+
|
4651
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
4652
|
+
attr_reader :presentation_group_values
|
4653
|
+
|
4654
|
+
sig do
|
4655
|
+
params(presentation_group_values: T::Hash[Symbol, String]).void
|
4656
|
+
end
|
4657
|
+
attr_writer :presentation_group_values
|
4658
|
+
|
4659
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
4660
|
+
attr_reader :pricing_group_values
|
4661
|
+
|
4662
|
+
sig { params(pricing_group_values: T::Hash[Symbol, String]).void }
|
4663
|
+
attr_writer :pricing_group_values
|
4664
|
+
|
4665
|
+
# If provided, the specifier will only apply to the product with the specified ID.
|
4666
|
+
sig { returns(T.nilable(String)) }
|
4667
|
+
attr_reader :product_id
|
4668
|
+
|
4669
|
+
sig { params(product_id: String).void }
|
4670
|
+
attr_writer :product_id
|
4671
|
+
|
4672
|
+
# If provided, the specifier will only apply to products with all the specified
|
4673
|
+
# tags.
|
4674
|
+
sig { returns(T.nilable(T::Array[String])) }
|
4675
|
+
attr_reader :product_tags
|
4676
|
+
|
4677
|
+
sig { params(product_tags: T::Array[String]).void }
|
4678
|
+
attr_writer :product_tags
|
4679
|
+
|
4680
|
+
sig do
|
4681
|
+
params(
|
4682
|
+
presentation_group_values: T::Hash[Symbol, String],
|
4683
|
+
pricing_group_values: T::Hash[Symbol, String],
|
4684
|
+
product_id: String,
|
4685
|
+
product_tags: T::Array[String]
|
4686
|
+
).returns(T.attached_class)
|
4687
|
+
end
|
4688
|
+
def self.new(
|
4689
|
+
presentation_group_values: nil,
|
4690
|
+
pricing_group_values: nil,
|
4691
|
+
# If provided, the specifier will only apply to the product with the specified ID.
|
4692
|
+
product_id: nil,
|
4693
|
+
# If provided, the specifier will only apply to products with all the specified
|
4694
|
+
# tags.
|
4695
|
+
product_tags: nil
|
4696
|
+
)
|
4697
|
+
end
|
4698
|
+
|
4699
|
+
sig do
|
4700
|
+
override.returns(
|
4701
|
+
{
|
4702
|
+
presentation_group_values: T::Hash[Symbol, String],
|
4703
|
+
pricing_group_values: T::Hash[Symbol, String],
|
4704
|
+
product_id: String,
|
4705
|
+
product_tags: T::Array[String]
|
4706
|
+
}
|
4707
|
+
)
|
4708
|
+
end
|
4709
|
+
def to_hash
|
4710
|
+
end
|
4711
|
+
end
|
3457
4712
|
end
|
3458
4713
|
|
3459
4714
|
class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
|
@@ -3476,7 +4731,25 @@ module MetronomeSDK
|
|
3476
4731
|
end
|
3477
4732
|
attr_accessor :payment_gate_type
|
3478
4733
|
|
3479
|
-
# Only applicable if using
|
4734
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
4735
|
+
sig do
|
4736
|
+
returns(
|
4737
|
+
T.nilable(
|
4738
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
|
4739
|
+
)
|
4740
|
+
)
|
4741
|
+
end
|
4742
|
+
attr_reader :precalculated_tax_config
|
4743
|
+
|
4744
|
+
sig do
|
4745
|
+
params(
|
4746
|
+
precalculated_tax_config:
|
4747
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig::OrHash
|
4748
|
+
).void
|
4749
|
+
end
|
4750
|
+
attr_writer :precalculated_tax_config
|
4751
|
+
|
4752
|
+
# Only applicable if using STRIPE as your payment gate type.
|
3480
4753
|
sig do
|
3481
4754
|
returns(
|
3482
4755
|
T.nilable(
|
@@ -3518,6 +4791,8 @@ module MetronomeSDK
|
|
3518
4791
|
params(
|
3519
4792
|
payment_gate_type:
|
3520
4793
|
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType::OrSymbol,
|
4794
|
+
precalculated_tax_config:
|
4795
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig::OrHash,
|
3521
4796
|
stripe_config:
|
3522
4797
|
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::OrHash,
|
3523
4798
|
tax_type:
|
@@ -3530,7 +4805,9 @@ module MetronomeSDK
|
|
3530
4805
|
# facilitate payment using your own payment integration. Select NONE if you do not
|
3531
4806
|
# wish to payment gate the commit balance.
|
3532
4807
|
payment_gate_type:,
|
3533
|
-
# Only applicable if using
|
4808
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
4809
|
+
precalculated_tax_config: nil,
|
4810
|
+
# Only applicable if using STRIPE as your payment gate type.
|
3534
4811
|
stripe_config: nil,
|
3535
4812
|
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
3536
4813
|
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
@@ -3544,6 +4821,8 @@ module MetronomeSDK
|
|
3544
4821
|
{
|
3545
4822
|
payment_gate_type:
|
3546
4823
|
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PaymentGateType::OrSymbol,
|
4824
|
+
precalculated_tax_config:
|
4825
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig,
|
3547
4826
|
stripe_config:
|
3548
4827
|
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig,
|
3549
4828
|
tax_type:
|
@@ -3597,33 +4876,88 @@ module MetronomeSDK
|
|
3597
4876
|
end
|
3598
4877
|
end
|
3599
4878
|
|
3600
|
-
class
|
4879
|
+
class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
|
3601
4880
|
OrHash =
|
3602
4881
|
T.type_alias do
|
3603
4882
|
T.any(
|
3604
|
-
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::
|
4883
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig,
|
3605
4884
|
MetronomeSDK::Internal::AnyHash
|
3606
4885
|
)
|
3607
4886
|
end
|
3608
4887
|
|
3609
|
-
#
|
4888
|
+
# Amount of tax to be applied. This should be in the same currency and
|
4889
|
+
# denomination as the commit's invoice schedule
|
4890
|
+
sig { returns(Float) }
|
4891
|
+
attr_accessor :tax_amount
|
4892
|
+
|
4893
|
+
# Name of the tax to be applied. This may be used in an invoice line item
|
4894
|
+
# description.
|
4895
|
+
sig { returns(T.nilable(String)) }
|
4896
|
+
attr_reader :tax_name
|
4897
|
+
|
4898
|
+
sig { params(tax_name: String).void }
|
4899
|
+
attr_writer :tax_name
|
4900
|
+
|
4901
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
3610
4902
|
sig do
|
3611
|
-
returns(
|
3612
|
-
|
4903
|
+
params(tax_amount: Float, tax_name: String).returns(
|
4904
|
+
T.attached_class
|
3613
4905
|
)
|
3614
4906
|
end
|
3615
|
-
|
4907
|
+
def self.new(
|
4908
|
+
# Amount of tax to be applied. This should be in the same currency and
|
4909
|
+
# denomination as the commit's invoice schedule
|
4910
|
+
tax_amount:,
|
4911
|
+
# Name of the tax to be applied. This may be used in an invoice line item
|
4912
|
+
# description.
|
4913
|
+
tax_name: nil
|
4914
|
+
)
|
4915
|
+
end
|
3616
4916
|
|
3617
|
-
|
3618
|
-
|
3619
|
-
|
4917
|
+
sig { override.returns({ tax_amount: Float, tax_name: String }) }
|
4918
|
+
def to_hash
|
4919
|
+
end
|
4920
|
+
end
|
4921
|
+
|
4922
|
+
class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
|
4923
|
+
OrHash =
|
4924
|
+
T.type_alias do
|
4925
|
+
T.any(
|
4926
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig,
|
4927
|
+
MetronomeSDK::Internal::AnyHash
|
4928
|
+
)
|
4929
|
+
end
|
4930
|
+
|
4931
|
+
# If left blank, will default to INVOICE
|
4932
|
+
sig do
|
4933
|
+
returns(
|
4934
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol
|
4935
|
+
)
|
4936
|
+
end
|
4937
|
+
attr_accessor :payment_type
|
4938
|
+
|
4939
|
+
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
4940
|
+
# your payment type.
|
4941
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
4942
|
+
attr_reader :invoice_metadata
|
4943
|
+
|
4944
|
+
sig { params(invoice_metadata: T::Hash[Symbol, String]).void }
|
4945
|
+
attr_writer :invoice_metadata
|
4946
|
+
|
4947
|
+
# Only applicable if using STRIPE as your payment gate type.
|
4948
|
+
sig do
|
4949
|
+
params(
|
3620
4950
|
payment_type:
|
3621
|
-
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol
|
4951
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
4952
|
+
invoice_metadata: T::Hash[Symbol, String]
|
3622
4953
|
).returns(T.attached_class)
|
3623
4954
|
end
|
3624
4955
|
def self.new(
|
3625
4956
|
# If left blank, will default to INVOICE
|
3626
|
-
payment_type
|
4957
|
+
payment_type:,
|
4958
|
+
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
4959
|
+
# your payment type.
|
4960
|
+
invoice_metadata: nil
|
3627
4961
|
)
|
3628
4962
|
end
|
3629
4963
|
|
@@ -3631,7 +4965,8 @@ module MetronomeSDK
|
|
3631
4965
|
override.returns(
|
3632
4966
|
{
|
3633
4967
|
payment_type:
|
3634
|
-
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol
|
4968
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
4969
|
+
invoice_metadata: T::Hash[Symbol, String]
|
3635
4970
|
}
|
3636
4971
|
)
|
3637
4972
|
end
|
@@ -3699,6 +5034,16 @@ module MetronomeSDK
|
|
3699
5034
|
:STRIPE,
|
3700
5035
|
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
|
3701
5036
|
)
|
5037
|
+
ANROK =
|
5038
|
+
T.let(
|
5039
|
+
:ANROK,
|
5040
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
|
5041
|
+
)
|
5042
|
+
PRECALCULATED =
|
5043
|
+
T.let(
|
5044
|
+
:PRECALCULATED,
|
5045
|
+
MetronomeSDK::V1::ContractCreateParams::PrepaidBalanceThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
|
5046
|
+
)
|
3702
5047
|
|
3703
5048
|
sig do
|
3704
5049
|
override.returns(
|
@@ -3828,7 +5173,9 @@ module MetronomeSDK
|
|
3828
5173
|
end
|
3829
5174
|
attr_writer :access_amount
|
3830
5175
|
|
3831
|
-
#
|
5176
|
+
# Defines the length of the access schedule for each created commit/credit. The
|
5177
|
+
# value represents the number of units. Unit defaults to "PERIODS", where the
|
5178
|
+
# length of a period is determined by the recurrence_frequency.
|
3832
5179
|
sig do
|
3833
5180
|
returns(
|
3834
5181
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::CommitDuration
|
@@ -3955,7 +5302,7 @@ module MetronomeSDK
|
|
3955
5302
|
# The frequency at which the recurring commits will be created. If not provided: -
|
3956
5303
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
3957
5304
|
# period defined in the duration will correspond to this frequency. - Commits will
|
3958
|
-
# be created aligned with the recurring commit's
|
5305
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
3959
5306
|
# invoice dates.
|
3960
5307
|
sig do
|
3961
5308
|
returns(
|
@@ -3983,6 +5330,31 @@ module MetronomeSDK
|
|
3983
5330
|
sig { params(rollover_fraction: Float).void }
|
3984
5331
|
attr_writer :rollover_fraction
|
3985
5332
|
|
5333
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
5334
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
5335
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
5336
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
5337
|
+
sig do
|
5338
|
+
returns(
|
5339
|
+
T.nilable(
|
5340
|
+
T::Array[
|
5341
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Specifier
|
5342
|
+
]
|
5343
|
+
)
|
5344
|
+
)
|
5345
|
+
end
|
5346
|
+
attr_reader :specifiers
|
5347
|
+
|
5348
|
+
sig do
|
5349
|
+
params(
|
5350
|
+
specifiers:
|
5351
|
+
T::Array[
|
5352
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Specifier::OrHash
|
5353
|
+
]
|
5354
|
+
).void
|
5355
|
+
end
|
5356
|
+
attr_writer :specifiers
|
5357
|
+
|
3986
5358
|
# A temporary ID that can be used to reference the recurring commit for commit
|
3987
5359
|
# specific overrides.
|
3988
5360
|
sig { returns(T.nilable(String)) }
|
@@ -4015,13 +5387,19 @@ module MetronomeSDK
|
|
4015
5387
|
recurrence_frequency:
|
4016
5388
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::RecurrenceFrequency::OrSymbol,
|
4017
5389
|
rollover_fraction: Float,
|
5390
|
+
specifiers:
|
5391
|
+
T::Array[
|
5392
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Specifier::OrHash
|
5393
|
+
],
|
4018
5394
|
temporary_id: String
|
4019
5395
|
).returns(T.attached_class)
|
4020
5396
|
end
|
4021
5397
|
def self.new(
|
4022
5398
|
# The amount of commit to grant.
|
4023
5399
|
access_amount:,
|
4024
|
-
#
|
5400
|
+
# Defines the length of the access schedule for each created commit/credit. The
|
5401
|
+
# value represents the number of units. Unit defaults to "PERIODS", where the
|
5402
|
+
# length of a period is determined by the recurrence_frequency.
|
4025
5403
|
commit_duration:,
|
4026
5404
|
# Will be passed down to the individual commits
|
4027
5405
|
priority:,
|
@@ -4050,13 +5428,18 @@ module MetronomeSDK
|
|
4050
5428
|
# The frequency at which the recurring commits will be created. If not provided: -
|
4051
5429
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
4052
5430
|
# period defined in the duration will correspond to this frequency. - Commits will
|
4053
|
-
# be created aligned with the recurring commit's
|
5431
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
4054
5432
|
# invoice dates.
|
4055
5433
|
recurrence_frequency: nil,
|
4056
5434
|
# Will be passed down to the individual commits. This controls how much of an
|
4057
5435
|
# individual unexpired commit will roll over upon contract transition. Must be
|
4058
5436
|
# between 0 and 1.
|
4059
5437
|
rollover_fraction: nil,
|
5438
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
5439
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
5440
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
5441
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
5442
|
+
specifiers: nil,
|
4060
5443
|
# A temporary ID that can be used to reference the recurring commit for commit
|
4061
5444
|
# specific overrides.
|
4062
5445
|
temporary_id: nil
|
@@ -4088,6 +5471,10 @@ module MetronomeSDK
|
|
4088
5471
|
recurrence_frequency:
|
4089
5472
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::RecurrenceFrequency::OrSymbol,
|
4090
5473
|
rollover_fraction: Float,
|
5474
|
+
specifiers:
|
5475
|
+
T::Array[
|
5476
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Specifier
|
5477
|
+
],
|
4091
5478
|
temporary_id: String
|
4092
5479
|
}
|
4093
5480
|
)
|
@@ -4107,26 +5494,37 @@ module MetronomeSDK
|
|
4107
5494
|
sig { returns(String) }
|
4108
5495
|
attr_accessor :credit_type_id
|
4109
5496
|
|
4110
|
-
sig { returns(Float) }
|
4111
|
-
attr_accessor :quantity
|
4112
|
-
|
4113
5497
|
sig { returns(Float) }
|
4114
5498
|
attr_accessor :unit_price
|
4115
5499
|
|
5500
|
+
# This field is currently required. Upcoming recurring commit/credit configuration
|
5501
|
+
# options will allow it to be optional.
|
5502
|
+
sig { returns(T.nilable(Float)) }
|
5503
|
+
attr_reader :quantity
|
5504
|
+
|
5505
|
+
sig { params(quantity: Float).void }
|
5506
|
+
attr_writer :quantity
|
5507
|
+
|
4116
5508
|
# The amount of commit to grant.
|
4117
5509
|
sig do
|
4118
5510
|
params(
|
4119
5511
|
credit_type_id: String,
|
4120
|
-
|
4121
|
-
|
5512
|
+
unit_price: Float,
|
5513
|
+
quantity: Float
|
4122
5514
|
).returns(T.attached_class)
|
4123
5515
|
end
|
4124
|
-
def self.new(
|
5516
|
+
def self.new(
|
5517
|
+
credit_type_id:,
|
5518
|
+
unit_price:,
|
5519
|
+
# This field is currently required. Upcoming recurring commit/credit configuration
|
5520
|
+
# options will allow it to be optional.
|
5521
|
+
quantity: nil
|
5522
|
+
)
|
4125
5523
|
end
|
4126
5524
|
|
4127
5525
|
sig do
|
4128
5526
|
override.returns(
|
4129
|
-
{ credit_type_id: String,
|
5527
|
+
{ credit_type_id: String, unit_price: Float, quantity: Float }
|
4130
5528
|
)
|
4131
5529
|
end
|
4132
5530
|
def to_hash
|
@@ -4142,33 +5540,45 @@ module MetronomeSDK
|
|
4142
5540
|
)
|
4143
5541
|
end
|
4144
5542
|
|
5543
|
+
sig { returns(Float) }
|
5544
|
+
attr_accessor :value
|
5545
|
+
|
4145
5546
|
sig do
|
4146
5547
|
returns(
|
4147
|
-
|
5548
|
+
T.nilable(
|
5549
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::CommitDuration::Unit::OrSymbol
|
5550
|
+
)
|
4148
5551
|
)
|
4149
5552
|
end
|
4150
|
-
|
5553
|
+
attr_reader :unit
|
4151
5554
|
|
4152
|
-
sig
|
4153
|
-
|
5555
|
+
sig do
|
5556
|
+
params(
|
5557
|
+
unit:
|
5558
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::CommitDuration::Unit::OrSymbol
|
5559
|
+
).void
|
5560
|
+
end
|
5561
|
+
attr_writer :unit
|
4154
5562
|
|
4155
|
-
#
|
5563
|
+
# Defines the length of the access schedule for each created commit/credit. The
|
5564
|
+
# value represents the number of units. Unit defaults to "PERIODS", where the
|
5565
|
+
# length of a period is determined by the recurrence_frequency.
|
4156
5566
|
sig do
|
4157
5567
|
params(
|
5568
|
+
value: Float,
|
4158
5569
|
unit:
|
4159
|
-
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::CommitDuration::Unit::OrSymbol
|
4160
|
-
value: Float
|
5570
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::CommitDuration::Unit::OrSymbol
|
4161
5571
|
).returns(T.attached_class)
|
4162
5572
|
end
|
4163
|
-
def self.new(
|
5573
|
+
def self.new(value:, unit: nil)
|
4164
5574
|
end
|
4165
5575
|
|
4166
5576
|
sig do
|
4167
5577
|
override.returns(
|
4168
5578
|
{
|
5579
|
+
value: Float,
|
4169
5580
|
unit:
|
4170
|
-
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::CommitDuration::Unit::OrSymbol
|
4171
|
-
value: Float
|
5581
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::CommitDuration::Unit::OrSymbol
|
4172
5582
|
}
|
4173
5583
|
)
|
4174
5584
|
end
|
@@ -4327,7 +5737,7 @@ module MetronomeSDK
|
|
4327
5737
|
# The frequency at which the recurring commits will be created. If not provided: -
|
4328
5738
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
4329
5739
|
# period defined in the duration will correspond to this frequency. - Commits will
|
4330
|
-
# be created aligned with the recurring commit's
|
5740
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
4331
5741
|
# invoice dates.
|
4332
5742
|
module RecurrenceFrequency
|
4333
5743
|
extend MetronomeSDK::Internal::Type::Enum
|
@@ -4372,6 +5782,77 @@ module MetronomeSDK
|
|
4372
5782
|
def self.values
|
4373
5783
|
end
|
4374
5784
|
end
|
5785
|
+
|
5786
|
+
class Specifier < MetronomeSDK::Internal::Type::BaseModel
|
5787
|
+
OrHash =
|
5788
|
+
T.type_alias do
|
5789
|
+
T.any(
|
5790
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Specifier,
|
5791
|
+
MetronomeSDK::Internal::AnyHash
|
5792
|
+
)
|
5793
|
+
end
|
5794
|
+
|
5795
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
5796
|
+
attr_reader :presentation_group_values
|
5797
|
+
|
5798
|
+
sig do
|
5799
|
+
params(presentation_group_values: T::Hash[Symbol, String]).void
|
5800
|
+
end
|
5801
|
+
attr_writer :presentation_group_values
|
5802
|
+
|
5803
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
5804
|
+
attr_reader :pricing_group_values
|
5805
|
+
|
5806
|
+
sig { params(pricing_group_values: T::Hash[Symbol, String]).void }
|
5807
|
+
attr_writer :pricing_group_values
|
5808
|
+
|
5809
|
+
# If provided, the specifier will only apply to the product with the specified ID.
|
5810
|
+
sig { returns(T.nilable(String)) }
|
5811
|
+
attr_reader :product_id
|
5812
|
+
|
5813
|
+
sig { params(product_id: String).void }
|
5814
|
+
attr_writer :product_id
|
5815
|
+
|
5816
|
+
# If provided, the specifier will only apply to products with all the specified
|
5817
|
+
# tags.
|
5818
|
+
sig { returns(T.nilable(T::Array[String])) }
|
5819
|
+
attr_reader :product_tags
|
5820
|
+
|
5821
|
+
sig { params(product_tags: T::Array[String]).void }
|
5822
|
+
attr_writer :product_tags
|
5823
|
+
|
5824
|
+
sig do
|
5825
|
+
params(
|
5826
|
+
presentation_group_values: T::Hash[Symbol, String],
|
5827
|
+
pricing_group_values: T::Hash[Symbol, String],
|
5828
|
+
product_id: String,
|
5829
|
+
product_tags: T::Array[String]
|
5830
|
+
).returns(T.attached_class)
|
5831
|
+
end
|
5832
|
+
def self.new(
|
5833
|
+
presentation_group_values: nil,
|
5834
|
+
pricing_group_values: nil,
|
5835
|
+
# If provided, the specifier will only apply to the product with the specified ID.
|
5836
|
+
product_id: nil,
|
5837
|
+
# If provided, the specifier will only apply to products with all the specified
|
5838
|
+
# tags.
|
5839
|
+
product_tags: nil
|
5840
|
+
)
|
5841
|
+
end
|
5842
|
+
|
5843
|
+
sig do
|
5844
|
+
override.returns(
|
5845
|
+
{
|
5846
|
+
presentation_group_values: T::Hash[Symbol, String],
|
5847
|
+
pricing_group_values: T::Hash[Symbol, String],
|
5848
|
+
product_id: String,
|
5849
|
+
product_tags: T::Array[String]
|
5850
|
+
}
|
5851
|
+
)
|
5852
|
+
end
|
5853
|
+
def to_hash
|
5854
|
+
end
|
5855
|
+
end
|
4375
5856
|
end
|
4376
5857
|
|
4377
5858
|
class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
|
@@ -4399,7 +5880,9 @@ module MetronomeSDK
|
|
4399
5880
|
end
|
4400
5881
|
attr_writer :access_amount
|
4401
5882
|
|
4402
|
-
#
|
5883
|
+
# Defines the length of the access schedule for each created commit/credit. The
|
5884
|
+
# value represents the number of units. Unit defaults to "PERIODS", where the
|
5885
|
+
# length of a period is determined by the recurrence_frequency.
|
4403
5886
|
sig do
|
4404
5887
|
returns(
|
4405
5888
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::CommitDuration
|
@@ -4508,7 +5991,7 @@ module MetronomeSDK
|
|
4508
5991
|
# The frequency at which the recurring commits will be created. If not provided: -
|
4509
5992
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
4510
5993
|
# period defined in the duration will correspond to this frequency. - Commits will
|
4511
|
-
# be created aligned with the recurring commit's
|
5994
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
4512
5995
|
# invoice dates.
|
4513
5996
|
sig do
|
4514
5997
|
returns(
|
@@ -4536,6 +6019,31 @@ module MetronomeSDK
|
|
4536
6019
|
sig { params(rollover_fraction: Float).void }
|
4537
6020
|
attr_writer :rollover_fraction
|
4538
6021
|
|
6022
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
6023
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
6024
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
6025
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
6026
|
+
sig do
|
6027
|
+
returns(
|
6028
|
+
T.nilable(
|
6029
|
+
T::Array[
|
6030
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Specifier
|
6031
|
+
]
|
6032
|
+
)
|
6033
|
+
)
|
6034
|
+
end
|
6035
|
+
attr_reader :specifiers
|
6036
|
+
|
6037
|
+
sig do
|
6038
|
+
params(
|
6039
|
+
specifiers:
|
6040
|
+
T::Array[
|
6041
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Specifier::OrHash
|
6042
|
+
]
|
6043
|
+
).void
|
6044
|
+
end
|
6045
|
+
attr_writer :specifiers
|
6046
|
+
|
4539
6047
|
# A temporary ID that can be used to reference the recurring commit for commit
|
4540
6048
|
# specific overrides.
|
4541
6049
|
sig { returns(T.nilable(String)) }
|
@@ -4566,13 +6074,19 @@ module MetronomeSDK
|
|
4566
6074
|
recurrence_frequency:
|
4567
6075
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::RecurrenceFrequency::OrSymbol,
|
4568
6076
|
rollover_fraction: Float,
|
6077
|
+
specifiers:
|
6078
|
+
T::Array[
|
6079
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Specifier::OrHash
|
6080
|
+
],
|
4569
6081
|
temporary_id: String
|
4570
6082
|
).returns(T.attached_class)
|
4571
6083
|
end
|
4572
6084
|
def self.new(
|
4573
6085
|
# The amount of commit to grant.
|
4574
6086
|
access_amount:,
|
4575
|
-
#
|
6087
|
+
# Defines the length of the access schedule for each created commit/credit. The
|
6088
|
+
# value represents the number of units. Unit defaults to "PERIODS", where the
|
6089
|
+
# length of a period is determined by the recurrence_frequency.
|
4576
6090
|
commit_duration:,
|
4577
6091
|
# Will be passed down to the individual commits
|
4578
6092
|
priority:,
|
@@ -4599,13 +6113,18 @@ module MetronomeSDK
|
|
4599
6113
|
# The frequency at which the recurring commits will be created. If not provided: -
|
4600
6114
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
4601
6115
|
# period defined in the duration will correspond to this frequency. - Commits will
|
4602
|
-
# be created aligned with the recurring commit's
|
6116
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
4603
6117
|
# invoice dates.
|
4604
6118
|
recurrence_frequency: nil,
|
4605
6119
|
# Will be passed down to the individual commits. This controls how much of an
|
4606
6120
|
# individual unexpired commit will roll over upon contract transition. Must be
|
4607
6121
|
# between 0 and 1.
|
4608
6122
|
rollover_fraction: nil,
|
6123
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
6124
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
6125
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
6126
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
6127
|
+
specifiers: nil,
|
4609
6128
|
# A temporary ID that can be used to reference the recurring commit for commit
|
4610
6129
|
# specific overrides.
|
4611
6130
|
temporary_id: nil
|
@@ -4635,6 +6154,10 @@ module MetronomeSDK
|
|
4635
6154
|
recurrence_frequency:
|
4636
6155
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::RecurrenceFrequency::OrSymbol,
|
4637
6156
|
rollover_fraction: Float,
|
6157
|
+
specifiers:
|
6158
|
+
T::Array[
|
6159
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Specifier
|
6160
|
+
],
|
4638
6161
|
temporary_id: String
|
4639
6162
|
}
|
4640
6163
|
)
|
@@ -4654,26 +6177,37 @@ module MetronomeSDK
|
|
4654
6177
|
sig { returns(String) }
|
4655
6178
|
attr_accessor :credit_type_id
|
4656
6179
|
|
4657
|
-
sig { returns(Float) }
|
4658
|
-
attr_accessor :quantity
|
4659
|
-
|
4660
6180
|
sig { returns(Float) }
|
4661
6181
|
attr_accessor :unit_price
|
4662
6182
|
|
6183
|
+
# This field is currently required. Upcoming recurring commit/credit configuration
|
6184
|
+
# options will allow it to be optional.
|
6185
|
+
sig { returns(T.nilable(Float)) }
|
6186
|
+
attr_reader :quantity
|
6187
|
+
|
6188
|
+
sig { params(quantity: Float).void }
|
6189
|
+
attr_writer :quantity
|
6190
|
+
|
4663
6191
|
# The amount of commit to grant.
|
4664
6192
|
sig do
|
4665
6193
|
params(
|
4666
6194
|
credit_type_id: String,
|
4667
|
-
|
4668
|
-
|
6195
|
+
unit_price: Float,
|
6196
|
+
quantity: Float
|
4669
6197
|
).returns(T.attached_class)
|
4670
6198
|
end
|
4671
|
-
def self.new(
|
6199
|
+
def self.new(
|
6200
|
+
credit_type_id:,
|
6201
|
+
unit_price:,
|
6202
|
+
# This field is currently required. Upcoming recurring commit/credit configuration
|
6203
|
+
# options will allow it to be optional.
|
6204
|
+
quantity: nil
|
6205
|
+
)
|
4672
6206
|
end
|
4673
6207
|
|
4674
6208
|
sig do
|
4675
6209
|
override.returns(
|
4676
|
-
{ credit_type_id: String,
|
6210
|
+
{ credit_type_id: String, unit_price: Float, quantity: Float }
|
4677
6211
|
)
|
4678
6212
|
end
|
4679
6213
|
def to_hash
|
@@ -4689,33 +6223,45 @@ module MetronomeSDK
|
|
4689
6223
|
)
|
4690
6224
|
end
|
4691
6225
|
|
6226
|
+
sig { returns(Float) }
|
6227
|
+
attr_accessor :value
|
6228
|
+
|
4692
6229
|
sig do
|
4693
6230
|
returns(
|
4694
|
-
|
6231
|
+
T.nilable(
|
6232
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::CommitDuration::Unit::OrSymbol
|
6233
|
+
)
|
4695
6234
|
)
|
4696
6235
|
end
|
4697
|
-
|
6236
|
+
attr_reader :unit
|
4698
6237
|
|
4699
|
-
sig
|
4700
|
-
|
6238
|
+
sig do
|
6239
|
+
params(
|
6240
|
+
unit:
|
6241
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::CommitDuration::Unit::OrSymbol
|
6242
|
+
).void
|
6243
|
+
end
|
6244
|
+
attr_writer :unit
|
4701
6245
|
|
4702
|
-
#
|
6246
|
+
# Defines the length of the access schedule for each created commit/credit. The
|
6247
|
+
# value represents the number of units. Unit defaults to "PERIODS", where the
|
6248
|
+
# length of a period is determined by the recurrence_frequency.
|
4703
6249
|
sig do
|
4704
6250
|
params(
|
6251
|
+
value: Float,
|
4705
6252
|
unit:
|
4706
|
-
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::CommitDuration::Unit::OrSymbol
|
4707
|
-
value: Float
|
6253
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::CommitDuration::Unit::OrSymbol
|
4708
6254
|
).returns(T.attached_class)
|
4709
6255
|
end
|
4710
|
-
def self.new(
|
6256
|
+
def self.new(value:, unit: nil)
|
4711
6257
|
end
|
4712
6258
|
|
4713
6259
|
sig do
|
4714
6260
|
override.returns(
|
4715
6261
|
{
|
6262
|
+
value: Float,
|
4716
6263
|
unit:
|
4717
|
-
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::CommitDuration::Unit::OrSymbol
|
4718
|
-
value: Float
|
6264
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::CommitDuration::Unit::OrSymbol
|
4719
6265
|
}
|
4720
6266
|
)
|
4721
6267
|
end
|
@@ -4836,7 +6382,7 @@ module MetronomeSDK
|
|
4836
6382
|
# The frequency at which the recurring commits will be created. If not provided: -
|
4837
6383
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
4838
6384
|
# period defined in the duration will correspond to this frequency. - Commits will
|
4839
|
-
# be created aligned with the recurring commit's
|
6385
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
4840
6386
|
# invoice dates.
|
4841
6387
|
module RecurrenceFrequency
|
4842
6388
|
extend MetronomeSDK::Internal::Type::Enum
|
@@ -4881,6 +6427,77 @@ module MetronomeSDK
|
|
4881
6427
|
def self.values
|
4882
6428
|
end
|
4883
6429
|
end
|
6430
|
+
|
6431
|
+
class Specifier < MetronomeSDK::Internal::Type::BaseModel
|
6432
|
+
OrHash =
|
6433
|
+
T.type_alias do
|
6434
|
+
T.any(
|
6435
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Specifier,
|
6436
|
+
MetronomeSDK::Internal::AnyHash
|
6437
|
+
)
|
6438
|
+
end
|
6439
|
+
|
6440
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
6441
|
+
attr_reader :presentation_group_values
|
6442
|
+
|
6443
|
+
sig do
|
6444
|
+
params(presentation_group_values: T::Hash[Symbol, String]).void
|
6445
|
+
end
|
6446
|
+
attr_writer :presentation_group_values
|
6447
|
+
|
6448
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
6449
|
+
attr_reader :pricing_group_values
|
6450
|
+
|
6451
|
+
sig { params(pricing_group_values: T::Hash[Symbol, String]).void }
|
6452
|
+
attr_writer :pricing_group_values
|
6453
|
+
|
6454
|
+
# If provided, the specifier will only apply to the product with the specified ID.
|
6455
|
+
sig { returns(T.nilable(String)) }
|
6456
|
+
attr_reader :product_id
|
6457
|
+
|
6458
|
+
sig { params(product_id: String).void }
|
6459
|
+
attr_writer :product_id
|
6460
|
+
|
6461
|
+
# If provided, the specifier will only apply to products with all the specified
|
6462
|
+
# tags.
|
6463
|
+
sig { returns(T.nilable(T::Array[String])) }
|
6464
|
+
attr_reader :product_tags
|
6465
|
+
|
6466
|
+
sig { params(product_tags: T::Array[String]).void }
|
6467
|
+
attr_writer :product_tags
|
6468
|
+
|
6469
|
+
sig do
|
6470
|
+
params(
|
6471
|
+
presentation_group_values: T::Hash[Symbol, String],
|
6472
|
+
pricing_group_values: T::Hash[Symbol, String],
|
6473
|
+
product_id: String,
|
6474
|
+
product_tags: T::Array[String]
|
6475
|
+
).returns(T.attached_class)
|
6476
|
+
end
|
6477
|
+
def self.new(
|
6478
|
+
presentation_group_values: nil,
|
6479
|
+
pricing_group_values: nil,
|
6480
|
+
# If provided, the specifier will only apply to the product with the specified ID.
|
6481
|
+
product_id: nil,
|
6482
|
+
# If provided, the specifier will only apply to products with all the specified
|
6483
|
+
# tags.
|
6484
|
+
product_tags: nil
|
6485
|
+
)
|
6486
|
+
end
|
6487
|
+
|
6488
|
+
sig do
|
6489
|
+
override.returns(
|
6490
|
+
{
|
6491
|
+
presentation_group_values: T::Hash[Symbol, String],
|
6492
|
+
pricing_group_values: T::Hash[Symbol, String],
|
6493
|
+
product_id: String,
|
6494
|
+
product_tags: T::Array[String]
|
6495
|
+
}
|
6496
|
+
)
|
6497
|
+
end
|
6498
|
+
def to_hash
|
6499
|
+
end
|
6500
|
+
end
|
4884
6501
|
end
|
4885
6502
|
|
4886
6503
|
class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
|
@@ -5809,23 +7426,41 @@ module MetronomeSDK
|
|
5809
7426
|
end
|
5810
7427
|
attr_accessor :payment_gate_type
|
5811
7428
|
|
5812
|
-
# Only applicable if using
|
7429
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
5813
7430
|
sig do
|
5814
7431
|
returns(
|
5815
7432
|
T.nilable(
|
5816
|
-
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::
|
7433
|
+
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig
|
5817
7434
|
)
|
5818
7435
|
)
|
5819
7436
|
end
|
5820
|
-
attr_reader :
|
7437
|
+
attr_reader :precalculated_tax_config
|
5821
7438
|
|
5822
7439
|
sig do
|
5823
7440
|
params(
|
5824
|
-
|
5825
|
-
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::
|
7441
|
+
precalculated_tax_config:
|
7442
|
+
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig::OrHash
|
5826
7443
|
).void
|
5827
7444
|
end
|
5828
|
-
attr_writer :
|
7445
|
+
attr_writer :precalculated_tax_config
|
7446
|
+
|
7447
|
+
# Only applicable if using STRIPE as your payment gate type.
|
7448
|
+
sig do
|
7449
|
+
returns(
|
7450
|
+
T.nilable(
|
7451
|
+
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig
|
7452
|
+
)
|
7453
|
+
)
|
7454
|
+
end
|
7455
|
+
attr_reader :stripe_config
|
7456
|
+
|
7457
|
+
sig do
|
7458
|
+
params(
|
7459
|
+
stripe_config:
|
7460
|
+
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::OrHash
|
7461
|
+
).void
|
7462
|
+
end
|
7463
|
+
attr_writer :stripe_config
|
5829
7464
|
|
5830
7465
|
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
5831
7466
|
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
@@ -5851,6 +7486,8 @@ module MetronomeSDK
|
|
5851
7486
|
params(
|
5852
7487
|
payment_gate_type:
|
5853
7488
|
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::OrSymbol,
|
7489
|
+
precalculated_tax_config:
|
7490
|
+
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig::OrHash,
|
5854
7491
|
stripe_config:
|
5855
7492
|
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::OrHash,
|
5856
7493
|
tax_type:
|
@@ -5863,7 +7500,9 @@ module MetronomeSDK
|
|
5863
7500
|
# facilitate payment using your own payment integration. Select NONE if you do not
|
5864
7501
|
# wish to payment gate the commit balance.
|
5865
7502
|
payment_gate_type:,
|
5866
|
-
# Only applicable if using
|
7503
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
7504
|
+
precalculated_tax_config: nil,
|
7505
|
+
# Only applicable if using STRIPE as your payment gate type.
|
5867
7506
|
stripe_config: nil,
|
5868
7507
|
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
5869
7508
|
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
@@ -5877,6 +7516,8 @@ module MetronomeSDK
|
|
5877
7516
|
{
|
5878
7517
|
payment_gate_type:
|
5879
7518
|
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PaymentGateType::OrSymbol,
|
7519
|
+
precalculated_tax_config:
|
7520
|
+
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig,
|
5880
7521
|
stripe_config:
|
5881
7522
|
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig,
|
5882
7523
|
tax_type:
|
@@ -5930,6 +7571,49 @@ module MetronomeSDK
|
|
5930
7571
|
end
|
5931
7572
|
end
|
5932
7573
|
|
7574
|
+
class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
|
7575
|
+
OrHash =
|
7576
|
+
T.type_alias do
|
7577
|
+
T.any(
|
7578
|
+
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::PrecalculatedTaxConfig,
|
7579
|
+
MetronomeSDK::Internal::AnyHash
|
7580
|
+
)
|
7581
|
+
end
|
7582
|
+
|
7583
|
+
# Amount of tax to be applied. This should be in the same currency and
|
7584
|
+
# denomination as the commit's invoice schedule
|
7585
|
+
sig { returns(Float) }
|
7586
|
+
attr_accessor :tax_amount
|
7587
|
+
|
7588
|
+
# Name of the tax to be applied. This may be used in an invoice line item
|
7589
|
+
# description.
|
7590
|
+
sig { returns(T.nilable(String)) }
|
7591
|
+
attr_reader :tax_name
|
7592
|
+
|
7593
|
+
sig { params(tax_name: String).void }
|
7594
|
+
attr_writer :tax_name
|
7595
|
+
|
7596
|
+
# Only applicable if using PRECALCULATED as your tax type.
|
7597
|
+
sig do
|
7598
|
+
params(tax_amount: Float, tax_name: String).returns(
|
7599
|
+
T.attached_class
|
7600
|
+
)
|
7601
|
+
end
|
7602
|
+
def self.new(
|
7603
|
+
# Amount of tax to be applied. This should be in the same currency and
|
7604
|
+
# denomination as the commit's invoice schedule
|
7605
|
+
tax_amount:,
|
7606
|
+
# Name of the tax to be applied. This may be used in an invoice line item
|
7607
|
+
# description.
|
7608
|
+
tax_name: nil
|
7609
|
+
)
|
7610
|
+
end
|
7611
|
+
|
7612
|
+
sig { override.returns({ tax_amount: Float, tax_name: String }) }
|
7613
|
+
def to_hash
|
7614
|
+
end
|
7615
|
+
end
|
7616
|
+
|
5933
7617
|
class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
|
5934
7618
|
OrHash =
|
5935
7619
|
T.type_alias do
|
@@ -5947,16 +7631,28 @@ module MetronomeSDK
|
|
5947
7631
|
end
|
5948
7632
|
attr_accessor :payment_type
|
5949
7633
|
|
5950
|
-
#
|
7634
|
+
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
7635
|
+
# your payment type.
|
7636
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
7637
|
+
attr_reader :invoice_metadata
|
7638
|
+
|
7639
|
+
sig { params(invoice_metadata: T::Hash[Symbol, String]).void }
|
7640
|
+
attr_writer :invoice_metadata
|
7641
|
+
|
7642
|
+
# Only applicable if using STRIPE as your payment gate type.
|
5951
7643
|
sig do
|
5952
7644
|
params(
|
5953
7645
|
payment_type:
|
5954
|
-
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol
|
7646
|
+
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
7647
|
+
invoice_metadata: T::Hash[Symbol, String]
|
5955
7648
|
).returns(T.attached_class)
|
5956
7649
|
end
|
5957
7650
|
def self.new(
|
5958
7651
|
# If left blank, will default to INVOICE
|
5959
|
-
payment_type
|
7652
|
+
payment_type:,
|
7653
|
+
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
7654
|
+
# your payment type.
|
7655
|
+
invoice_metadata: nil
|
5960
7656
|
)
|
5961
7657
|
end
|
5962
7658
|
|
@@ -5964,7 +7660,8 @@ module MetronomeSDK
|
|
5964
7660
|
override.returns(
|
5965
7661
|
{
|
5966
7662
|
payment_type:
|
5967
|
-
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol
|
7663
|
+
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
7664
|
+
invoice_metadata: T::Hash[Symbol, String]
|
5968
7665
|
}
|
5969
7666
|
)
|
5970
7667
|
end
|
@@ -6032,6 +7729,16 @@ module MetronomeSDK
|
|
6032
7729
|
:STRIPE,
|
6033
7730
|
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
|
6034
7731
|
)
|
7732
|
+
ANROK =
|
7733
|
+
T.let(
|
7734
|
+
:ANROK,
|
7735
|
+
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
|
7736
|
+
)
|
7737
|
+
PRECALCULATED =
|
7738
|
+
T.let(
|
7739
|
+
:PRECALCULATED,
|
7740
|
+
MetronomeSDK::V1::ContractCreateParams::SpendThresholdConfiguration::PaymentGateConfig::TaxType::TaggedSymbol
|
7741
|
+
)
|
6035
7742
|
|
6036
7743
|
sig do
|
6037
7744
|
override.returns(
|
@@ -6046,6 +7753,383 @@ module MetronomeSDK
|
|
6046
7753
|
end
|
6047
7754
|
end
|
6048
7755
|
|
7756
|
+
class Subscription < MetronomeSDK::Internal::Type::BaseModel
|
7757
|
+
OrHash =
|
7758
|
+
T.type_alias do
|
7759
|
+
T.any(
|
7760
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription,
|
7761
|
+
MetronomeSDK::Internal::AnyHash
|
7762
|
+
)
|
7763
|
+
end
|
7764
|
+
|
7765
|
+
sig do
|
7766
|
+
returns(
|
7767
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::CollectionSchedule::OrSymbol
|
7768
|
+
)
|
7769
|
+
end
|
7770
|
+
attr_accessor :collection_schedule
|
7771
|
+
|
7772
|
+
# The initial quantity for the subscription. It must be non-negative value.
|
7773
|
+
sig { returns(Float) }
|
7774
|
+
attr_accessor :initial_quantity
|
7775
|
+
|
7776
|
+
sig do
|
7777
|
+
returns(
|
7778
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration
|
7779
|
+
)
|
7780
|
+
end
|
7781
|
+
attr_reader :proration
|
7782
|
+
|
7783
|
+
sig do
|
7784
|
+
params(
|
7785
|
+
proration:
|
7786
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::OrHash
|
7787
|
+
).void
|
7788
|
+
end
|
7789
|
+
attr_writer :proration
|
7790
|
+
|
7791
|
+
sig do
|
7792
|
+
returns(
|
7793
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate
|
7794
|
+
)
|
7795
|
+
end
|
7796
|
+
attr_reader :subscription_rate
|
7797
|
+
|
7798
|
+
sig do
|
7799
|
+
params(
|
7800
|
+
subscription_rate:
|
7801
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::OrHash
|
7802
|
+
).void
|
7803
|
+
end
|
7804
|
+
attr_writer :subscription_rate
|
7805
|
+
|
7806
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
7807
|
+
attr_reader :custom_fields
|
7808
|
+
|
7809
|
+
sig { params(custom_fields: T::Hash[Symbol, String]).void }
|
7810
|
+
attr_writer :custom_fields
|
7811
|
+
|
7812
|
+
sig { returns(T.nilable(String)) }
|
7813
|
+
attr_reader :description
|
7814
|
+
|
7815
|
+
sig { params(description: String).void }
|
7816
|
+
attr_writer :description
|
7817
|
+
|
7818
|
+
# Exclusive end time for the subscription. If not provided, subscription inherits
|
7819
|
+
# contract end date.
|
7820
|
+
sig { returns(T.nilable(Time)) }
|
7821
|
+
attr_reader :ending_before
|
7822
|
+
|
7823
|
+
sig { params(ending_before: Time).void }
|
7824
|
+
attr_writer :ending_before
|
7825
|
+
|
7826
|
+
sig { returns(T.nilable(String)) }
|
7827
|
+
attr_reader :name
|
7828
|
+
|
7829
|
+
sig { params(name: String).void }
|
7830
|
+
attr_writer :name
|
7831
|
+
|
7832
|
+
# Inclusive start time for the subscription. If not provided, defaults to contract
|
7833
|
+
# start date
|
7834
|
+
sig { returns(T.nilable(Time)) }
|
7835
|
+
attr_reader :starting_at
|
7836
|
+
|
7837
|
+
sig { params(starting_at: Time).void }
|
7838
|
+
attr_writer :starting_at
|
7839
|
+
|
7840
|
+
sig do
|
7841
|
+
params(
|
7842
|
+
collection_schedule:
|
7843
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::CollectionSchedule::OrSymbol,
|
7844
|
+
initial_quantity: Float,
|
7845
|
+
proration:
|
7846
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::OrHash,
|
7847
|
+
subscription_rate:
|
7848
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::OrHash,
|
7849
|
+
custom_fields: T::Hash[Symbol, String],
|
7850
|
+
description: String,
|
7851
|
+
ending_before: Time,
|
7852
|
+
name: String,
|
7853
|
+
starting_at: Time
|
7854
|
+
).returns(T.attached_class)
|
7855
|
+
end
|
7856
|
+
def self.new(
|
7857
|
+
collection_schedule:,
|
7858
|
+
# The initial quantity for the subscription. It must be non-negative value.
|
7859
|
+
initial_quantity:,
|
7860
|
+
proration:,
|
7861
|
+
subscription_rate:,
|
7862
|
+
custom_fields: nil,
|
7863
|
+
description: nil,
|
7864
|
+
# Exclusive end time for the subscription. If not provided, subscription inherits
|
7865
|
+
# contract end date.
|
7866
|
+
ending_before: nil,
|
7867
|
+
name: nil,
|
7868
|
+
# Inclusive start time for the subscription. If not provided, defaults to contract
|
7869
|
+
# start date
|
7870
|
+
starting_at: nil
|
7871
|
+
)
|
7872
|
+
end
|
7873
|
+
|
7874
|
+
sig do
|
7875
|
+
override.returns(
|
7876
|
+
{
|
7877
|
+
collection_schedule:
|
7878
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::CollectionSchedule::OrSymbol,
|
7879
|
+
initial_quantity: Float,
|
7880
|
+
proration:
|
7881
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration,
|
7882
|
+
subscription_rate:
|
7883
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate,
|
7884
|
+
custom_fields: T::Hash[Symbol, String],
|
7885
|
+
description: String,
|
7886
|
+
ending_before: Time,
|
7887
|
+
name: String,
|
7888
|
+
starting_at: Time
|
7889
|
+
}
|
7890
|
+
)
|
7891
|
+
end
|
7892
|
+
def to_hash
|
7893
|
+
end
|
7894
|
+
|
7895
|
+
module CollectionSchedule
|
7896
|
+
extend MetronomeSDK::Internal::Type::Enum
|
7897
|
+
|
7898
|
+
TaggedSymbol =
|
7899
|
+
T.type_alias do
|
7900
|
+
T.all(
|
7901
|
+
Symbol,
|
7902
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::CollectionSchedule
|
7903
|
+
)
|
7904
|
+
end
|
7905
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
7906
|
+
|
7907
|
+
ADVANCE =
|
7908
|
+
T.let(
|
7909
|
+
:ADVANCE,
|
7910
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::CollectionSchedule::TaggedSymbol
|
7911
|
+
)
|
7912
|
+
ARREARS =
|
7913
|
+
T.let(
|
7914
|
+
:ARREARS,
|
7915
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::CollectionSchedule::TaggedSymbol
|
7916
|
+
)
|
7917
|
+
|
7918
|
+
sig do
|
7919
|
+
override.returns(
|
7920
|
+
T::Array[
|
7921
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::CollectionSchedule::TaggedSymbol
|
7922
|
+
]
|
7923
|
+
)
|
7924
|
+
end
|
7925
|
+
def self.values
|
7926
|
+
end
|
7927
|
+
end
|
7928
|
+
|
7929
|
+
class Proration < MetronomeSDK::Internal::Type::BaseModel
|
7930
|
+
OrHash =
|
7931
|
+
T.type_alias do
|
7932
|
+
T.any(
|
7933
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration,
|
7934
|
+
MetronomeSDK::Internal::AnyHash
|
7935
|
+
)
|
7936
|
+
end
|
7937
|
+
|
7938
|
+
# Indicates how mid-period quantity adjustments are invoiced. If BILL_IMMEDIATELY
|
7939
|
+
# is selected, the quantity increase will be billed on the scheduled date. If
|
7940
|
+
# BILL_ON_NEXT_COLLECTION_DATE is selected, the quantity increase will be billed
|
7941
|
+
# for in-arrears at the end of the period.
|
7942
|
+
sig do
|
7943
|
+
returns(
|
7944
|
+
T.nilable(
|
7945
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior::OrSymbol
|
7946
|
+
)
|
7947
|
+
)
|
7948
|
+
end
|
7949
|
+
attr_reader :invoice_behavior
|
7950
|
+
|
7951
|
+
sig do
|
7952
|
+
params(
|
7953
|
+
invoice_behavior:
|
7954
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior::OrSymbol
|
7955
|
+
).void
|
7956
|
+
end
|
7957
|
+
attr_writer :invoice_behavior
|
7958
|
+
|
7959
|
+
# Indicates if the partial period will be prorated or charged a full amount.
|
7960
|
+
sig { returns(T.nilable(T::Boolean)) }
|
7961
|
+
attr_reader :is_prorated
|
7962
|
+
|
7963
|
+
sig { params(is_prorated: T::Boolean).void }
|
7964
|
+
attr_writer :is_prorated
|
7965
|
+
|
7966
|
+
sig do
|
7967
|
+
params(
|
7968
|
+
invoice_behavior:
|
7969
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior::OrSymbol,
|
7970
|
+
is_prorated: T::Boolean
|
7971
|
+
).returns(T.attached_class)
|
7972
|
+
end
|
7973
|
+
def self.new(
|
7974
|
+
# Indicates how mid-period quantity adjustments are invoiced. If BILL_IMMEDIATELY
|
7975
|
+
# is selected, the quantity increase will be billed on the scheduled date. If
|
7976
|
+
# BILL_ON_NEXT_COLLECTION_DATE is selected, the quantity increase will be billed
|
7977
|
+
# for in-arrears at the end of the period.
|
7978
|
+
invoice_behavior: nil,
|
7979
|
+
# Indicates if the partial period will be prorated or charged a full amount.
|
7980
|
+
is_prorated: nil
|
7981
|
+
)
|
7982
|
+
end
|
7983
|
+
|
7984
|
+
sig do
|
7985
|
+
override.returns(
|
7986
|
+
{
|
7987
|
+
invoice_behavior:
|
7988
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior::OrSymbol,
|
7989
|
+
is_prorated: T::Boolean
|
7990
|
+
}
|
7991
|
+
)
|
7992
|
+
end
|
7993
|
+
def to_hash
|
7994
|
+
end
|
7995
|
+
|
7996
|
+
# Indicates how mid-period quantity adjustments are invoiced. If BILL_IMMEDIATELY
|
7997
|
+
# is selected, the quantity increase will be billed on the scheduled date. If
|
7998
|
+
# BILL_ON_NEXT_COLLECTION_DATE is selected, the quantity increase will be billed
|
7999
|
+
# for in-arrears at the end of the period.
|
8000
|
+
module InvoiceBehavior
|
8001
|
+
extend MetronomeSDK::Internal::Type::Enum
|
8002
|
+
|
8003
|
+
TaggedSymbol =
|
8004
|
+
T.type_alias do
|
8005
|
+
T.all(
|
8006
|
+
Symbol,
|
8007
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior
|
8008
|
+
)
|
8009
|
+
end
|
8010
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
8011
|
+
|
8012
|
+
BILL_IMMEDIATELY =
|
8013
|
+
T.let(
|
8014
|
+
:BILL_IMMEDIATELY,
|
8015
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior::TaggedSymbol
|
8016
|
+
)
|
8017
|
+
BILL_ON_NEXT_COLLECTION_DATE =
|
8018
|
+
T.let(
|
8019
|
+
:BILL_ON_NEXT_COLLECTION_DATE,
|
8020
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior::TaggedSymbol
|
8021
|
+
)
|
8022
|
+
|
8023
|
+
sig do
|
8024
|
+
override.returns(
|
8025
|
+
T::Array[
|
8026
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior::TaggedSymbol
|
8027
|
+
]
|
8028
|
+
)
|
8029
|
+
end
|
8030
|
+
def self.values
|
8031
|
+
end
|
8032
|
+
end
|
8033
|
+
end
|
8034
|
+
|
8035
|
+
class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
|
8036
|
+
OrHash =
|
8037
|
+
T.type_alias do
|
8038
|
+
T.any(
|
8039
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate,
|
8040
|
+
MetronomeSDK::Internal::AnyHash
|
8041
|
+
)
|
8042
|
+
end
|
8043
|
+
|
8044
|
+
# Frequency to bill subscription with. Together with product_id, must match
|
8045
|
+
# existing rate on the rate card.
|
8046
|
+
sig do
|
8047
|
+
returns(
|
8048
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency::OrSymbol
|
8049
|
+
)
|
8050
|
+
end
|
8051
|
+
attr_accessor :billing_frequency
|
8052
|
+
|
8053
|
+
# Must be subscription type product
|
8054
|
+
sig { returns(String) }
|
8055
|
+
attr_accessor :product_id
|
8056
|
+
|
8057
|
+
sig do
|
8058
|
+
params(
|
8059
|
+
billing_frequency:
|
8060
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency::OrSymbol,
|
8061
|
+
product_id: String
|
8062
|
+
).returns(T.attached_class)
|
8063
|
+
end
|
8064
|
+
def self.new(
|
8065
|
+
# Frequency to bill subscription with. Together with product_id, must match
|
8066
|
+
# existing rate on the rate card.
|
8067
|
+
billing_frequency:,
|
8068
|
+
# Must be subscription type product
|
8069
|
+
product_id:
|
8070
|
+
)
|
8071
|
+
end
|
8072
|
+
|
8073
|
+
sig do
|
8074
|
+
override.returns(
|
8075
|
+
{
|
8076
|
+
billing_frequency:
|
8077
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency::OrSymbol,
|
8078
|
+
product_id: String
|
8079
|
+
}
|
8080
|
+
)
|
8081
|
+
end
|
8082
|
+
def to_hash
|
8083
|
+
end
|
8084
|
+
|
8085
|
+
# Frequency to bill subscription with. Together with product_id, must match
|
8086
|
+
# existing rate on the rate card.
|
8087
|
+
module BillingFrequency
|
8088
|
+
extend MetronomeSDK::Internal::Type::Enum
|
8089
|
+
|
8090
|
+
TaggedSymbol =
|
8091
|
+
T.type_alias do
|
8092
|
+
T.all(
|
8093
|
+
Symbol,
|
8094
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency
|
8095
|
+
)
|
8096
|
+
end
|
8097
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
8098
|
+
|
8099
|
+
MONTHLY =
|
8100
|
+
T.let(
|
8101
|
+
:MONTHLY,
|
8102
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency::TaggedSymbol
|
8103
|
+
)
|
8104
|
+
QUARTERLY =
|
8105
|
+
T.let(
|
8106
|
+
:QUARTERLY,
|
8107
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency::TaggedSymbol
|
8108
|
+
)
|
8109
|
+
ANNUAL =
|
8110
|
+
T.let(
|
8111
|
+
:ANNUAL,
|
8112
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency::TaggedSymbol
|
8113
|
+
)
|
8114
|
+
WEEKLY =
|
8115
|
+
T.let(
|
8116
|
+
:WEEKLY,
|
8117
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency::TaggedSymbol
|
8118
|
+
)
|
8119
|
+
|
8120
|
+
sig do
|
8121
|
+
override.returns(
|
8122
|
+
T::Array[
|
8123
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency::TaggedSymbol
|
8124
|
+
]
|
8125
|
+
)
|
8126
|
+
end
|
8127
|
+
def self.values
|
8128
|
+
end
|
8129
|
+
end
|
8130
|
+
end
|
8131
|
+
end
|
8132
|
+
|
6049
8133
|
class Transition < MetronomeSDK::Internal::Type::BaseModel
|
6050
8134
|
OrHash =
|
6051
8135
|
T.type_alias do
|