metronome-sdk 3.5.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +53 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/client.rb +15 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +2 -0
- data/lib/metronome_sdk/internal/type/enum.rb +0 -25
- data/lib/metronome_sdk/models/commit.rb +27 -1
- data/lib/metronome_sdk/models/contract.rb +140 -1
- data/lib/metronome_sdk/models/contract_v2.rb +530 -6
- data/lib/metronome_sdk/models/contract_without_amendments.rb +142 -1
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +105 -2
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +103 -2
- data/lib/metronome_sdk/models/spend_threshold_configuration.rb +33 -1
- data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +33 -1
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +29 -177
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +147 -180
- data/lib/metronome_sdk/models/v1/contract_create_response.rb +1134 -3
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +119 -0
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_response.rb +315 -0
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/contracts/product_update_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +1 -0
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +8 -1
- data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +29 -1
- data/lib/metronome_sdk/models/v1/package_create_params.rb +115 -18
- data/lib/metronome_sdk/models/v1/package_list_response.rb +110 -1
- data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +114 -1
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +303 -5
- data/lib/metronome_sdk/models/v2/contract_edit_response.rb +3862 -3
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +507 -6
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +6 -2
- data/lib/metronome_sdk/resources/v1/contracts.rb +72 -3
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +5 -1
- data/lib/metronome_sdk/resources/v1/packages.rb +6 -7
- data/lib/metronome_sdk/resources/v1.rb +0 -4
- data/lib/metronome_sdk/resources/v2/contracts.rb +5 -1
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +2 -8
- data/rbi/metronome_sdk/models/commit.rbi +48 -0
- data/rbi/metronome_sdk/models/contract.rbi +354 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +1172 -4
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +368 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +289 -6
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +283 -6
- data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +78 -3
- data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -3
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +54 -396
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +370 -398
- data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +2448 -4
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +179 -0
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_response.rbi +714 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +74 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_update_params.rbi +74 -0
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +9 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +75 -0
- data/rbi/metronome_sdk/models/v1/package_create_params.rbi +310 -56
- data/rbi/metronome_sdk/models/v1/package_list_response.rbi +307 -0
- data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +307 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +734 -11
- data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +8612 -4
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1355 -219
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +18 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +88 -3
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +7 -0
- data/rbi/metronome_sdk/resources/v1/packages.rbi +8 -7
- data/rbi/metronome_sdk/resources/v1.rbi +0 -3
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +10 -0
- data/sig/metronome_sdk/models/commit.rbs +19 -0
- data/sig/metronome_sdk/models/contract.rbs +151 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +494 -6
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +151 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +116 -6
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +116 -6
- data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +31 -3
- data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +31 -3
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +3 -1
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +19 -137
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +134 -137
- data/sig/metronome_sdk/models/v1/contract_create_response.rbs +1045 -4
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +96 -0
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_response.rbs +299 -0
- data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/contracts/product_update_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +3 -1
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +29 -1
- data/sig/metronome_sdk/models/v1/package_create_params.rbs +115 -20
- data/sig/metronome_sdk/models/v1/package_list_response.rbs +115 -0
- data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +115 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +283 -9
- data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +3792 -4
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +461 -15
- data/sig/metronome_sdk/resources/v1/contracts/products.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +16 -0
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/packages.rbs +1 -1
- data/sig/metronome_sdk/resources/v1.rbs +0 -2
- data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
- metadata +8 -26
- data/lib/metronome_sdk/models/v1/payment.rb +0 -196
- data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +0 -28
- data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +0 -18
- data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +0 -28
- data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +0 -18
- data/lib/metronome_sdk/models/v1/payment_list_params.rb +0 -53
- data/lib/metronome_sdk/models/v1/payment_status.rb +0 -19
- data/lib/metronome_sdk/resources/v1/payments.rb +0 -102
- data/rbi/metronome_sdk/models/v1/payment.rbi +0 -403
- data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +0 -48
- data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +0 -35
- data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +0 -48
- data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +0 -35
- data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +0 -91
- data/rbi/metronome_sdk/models/v1/payment_status.rbi +0 -33
- data/rbi/metronome_sdk/resources/v1/payments.rbi +0 -72
- data/sig/metronome_sdk/models/v1/payment.rbs +0 -243
- data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +0 -30
- data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +0 -15
- data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +0 -30
- data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +0 -15
- data/sig/metronome_sdk/models/v1/payment_list_params.rbs +0 -56
- data/sig/metronome_sdk/models/v1/payment_status.rbs +0 -19
- data/sig/metronome_sdk/resources/v1/payments.rbs +0 -30
|
@@ -22,8 +22,8 @@ module MetronomeSDK
|
|
|
22
22
|
#
|
|
23
23
|
# Contracts define a customer's products, pricing, discounts, access duration, and
|
|
24
24
|
# billing configuration. Contracts serve as the central billing agreement for both
|
|
25
|
-
# PLG and Enterprise customers
|
|
26
|
-
# products and services directly from your product or CRM.
|
|
25
|
+
# PLG and Enterprise customers. You can automatically grant customers access to
|
|
26
|
+
# your products and services directly from your product or CRM.
|
|
27
27
|
#
|
|
28
28
|
# ### Use this endpoint to:
|
|
29
29
|
#
|
|
@@ -144,7 +144,7 @@ module MetronomeSDK
|
|
|
144
144
|
# `usage_filters` to route the correct usage to each contract.
|
|
145
145
|
# [Read more about usage filters](https://docs.metronome.com/manage-product-access/provision-customer/#create-a-usage-filter).
|
|
146
146
|
#
|
|
147
|
-
# @overload create(customer_id:, starting_at:, billing_provider_configuration: nil, commits: nil, credits: nil, custom_fields: nil, discounts: nil, ending_before: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, overrides: nil, package_alias: nil, package_id: nil, prepaid_balance_threshold_configuration: nil, professional_services: nil, rate_card_alias: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, reseller_royalties: nil, revenue_system_configuration: nil, salesforce_opportunity_id: nil, scheduled_charges: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, subscriptions: nil, total_contract_value: nil, transition: nil, uniqueness_key: nil, usage_filter: nil, usage_statement_schedule: nil, request_options: {})
|
|
147
|
+
# @overload create(customer_id:, starting_at:, billing_provider_configuration: nil, commits: nil, credits: nil, custom_fields: nil, discounts: nil, ending_before: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, overrides: nil, package_alias: nil, package_id: nil, prepaid_balance_threshold_configuration: nil, professional_services: nil, rate_card_alias: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, reseller_royalties: nil, revenue_system_configuration: nil, salesforce_opportunity_id: nil, scheduled_charges: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, spend_trackers: nil, subscriptions: nil, total_contract_value: nil, transition: nil, uniqueness_key: nil, usage_filter: nil, usage_statement_schedule: nil, request_options: {})
|
|
148
148
|
#
|
|
149
149
|
# @param customer_id [String]
|
|
150
150
|
#
|
|
@@ -202,6 +202,8 @@ module MetronomeSDK
|
|
|
202
202
|
#
|
|
203
203
|
# @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfiguration]
|
|
204
204
|
#
|
|
205
|
+
# @param spend_trackers [Array<MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker>] Spend trackers to attach to this contract. Aliases must be unique within a contr
|
|
206
|
+
#
|
|
205
207
|
# @param subscriptions [Array<MetronomeSDK::Models::V1::ContractCreateParams::Subscription>] Optional list of [subscriptions](https://docs.metronome.com/manage-product-acces
|
|
206
208
|
#
|
|
207
209
|
# @param total_contract_value [Float] This field's availability is dependent on your client's configuration.
|
|
@@ -650,6 +652,73 @@ module MetronomeSDK
|
|
|
650
652
|
)
|
|
651
653
|
end
|
|
652
654
|
|
|
655
|
+
# Some parameter documentations has been truncated, see
|
|
656
|
+
# {MetronomeSDK::Models::V1::ContractListSeatBalancesParams} for more details.
|
|
657
|
+
#
|
|
658
|
+
# Retrieve detailed balance for seat-based credits and commits from the contract's
|
|
659
|
+
# subscriptions, broken down by individual seats.
|
|
660
|
+
#
|
|
661
|
+
# ### Use this endpoint to:
|
|
662
|
+
#
|
|
663
|
+
# - Display per-seat balance information in customer dashboards
|
|
664
|
+
# - Filter balance data by subscription or specific seats
|
|
665
|
+
#
|
|
666
|
+
# ### Key response fields:
|
|
667
|
+
#
|
|
668
|
+
# An array of seat balance objects containing:
|
|
669
|
+
#
|
|
670
|
+
# - Seat id
|
|
671
|
+
# - Balance: current total balance across all commits and credits
|
|
672
|
+
#
|
|
673
|
+
# ### Usage guidelines:
|
|
674
|
+
#
|
|
675
|
+
# - Date filtering: use `covering_date` OR `starting_at`/`ending_before` to filter
|
|
676
|
+
# balance data by time range
|
|
677
|
+
# - Set `include_credits_and_commits=true` for detailed commits and credits
|
|
678
|
+
# breakdown per seat
|
|
679
|
+
# - Set `include_ledgers=true` for detailed transaction history per commit/credit
|
|
680
|
+
# per seat
|
|
681
|
+
#
|
|
682
|
+
# @overload list_seat_balances(contract_id:, customer_id:, covering_date: nil, cursor: nil, effective_before: nil, include_credits_and_commits: nil, include_ledgers: nil, limit: nil, seat_ids: nil, starting_at: nil, subscription_ids: nil, request_options: {})
|
|
683
|
+
#
|
|
684
|
+
# @param contract_id [String] The contract ID to retrieve seat balances for
|
|
685
|
+
#
|
|
686
|
+
# @param customer_id [String] The customer ID to retrieve seat balances for
|
|
687
|
+
#
|
|
688
|
+
# @param covering_date [Time] Include only commits or credits with access that cover this specific date (canno
|
|
689
|
+
#
|
|
690
|
+
# @param cursor [String] Page token from a previous response to retrieve the next page
|
|
691
|
+
#
|
|
692
|
+
# @param effective_before [Time] Include only commits or credits with access effective on or before this date (ca
|
|
693
|
+
#
|
|
694
|
+
# @param include_credits_and_commits [Boolean] Include credits and commits in the response
|
|
695
|
+
#
|
|
696
|
+
# @param include_ledgers [Boolean] Include ledger entries for each commit and commit. `include_credits_and_commits`
|
|
697
|
+
#
|
|
698
|
+
# @param limit [Integer] Maximum number of seats to return. Range: 1-100. Default: 25.
|
|
699
|
+
#
|
|
700
|
+
# @param seat_ids [Array<String>] Optional filter to only include specific seats.
|
|
701
|
+
#
|
|
702
|
+
# @param starting_at [Time] Include only commits or credits with access effective on or after this date (can
|
|
703
|
+
#
|
|
704
|
+
# @param subscription_ids [Array<String>] Optional filter to only include seats from specific subscriptions. If subscripti
|
|
705
|
+
#
|
|
706
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
707
|
+
#
|
|
708
|
+
# @return [MetronomeSDK::Models::V1::ContractListSeatBalancesResponse]
|
|
709
|
+
#
|
|
710
|
+
# @see MetronomeSDK::Models::V1::ContractListSeatBalancesParams
|
|
711
|
+
def list_seat_balances(params)
|
|
712
|
+
parsed, options = MetronomeSDK::V1::ContractListSeatBalancesParams.dump_request(params)
|
|
713
|
+
@client.request(
|
|
714
|
+
method: :post,
|
|
715
|
+
path: "v1/contracts/seatBalances/list",
|
|
716
|
+
body: parsed,
|
|
717
|
+
model: MetronomeSDK::Models::V1::ContractListSeatBalancesResponse,
|
|
718
|
+
options: options
|
|
719
|
+
)
|
|
720
|
+
end
|
|
721
|
+
|
|
653
722
|
# Some parameter documentations has been truncated, see
|
|
654
723
|
# {MetronomeSDK::Models::V1::ContractRetrieveRateScheduleParams} for more details.
|
|
655
724
|
#
|
|
@@ -136,10 +136,12 @@ module MetronomeSDK
|
|
|
136
136
|
# - Voided invoices are included in results by default unless filtered out by
|
|
137
137
|
# status
|
|
138
138
|
#
|
|
139
|
-
# @overload list(customer_id:, credit_type_id: nil, ending_before: nil, limit: nil, next_page: nil, skip_zero_qty_line_items: nil, sort: nil, starting_on: nil, status: nil, request_options: {})
|
|
139
|
+
# @overload list(customer_id:, contract_id: nil, credit_type_id: nil, ending_before: nil, limit: nil, next_page: nil, skip_zero_qty_line_items: nil, sort: nil, starting_on: nil, status: nil, type: nil, request_options: {})
|
|
140
140
|
#
|
|
141
141
|
# @param customer_id [String] Path param
|
|
142
142
|
#
|
|
143
|
+
# @param contract_id [String] Query param: Only return invoices for the specified contract
|
|
144
|
+
#
|
|
143
145
|
# @param credit_type_id [String] Query param: Only return invoices for the specified credit type
|
|
144
146
|
#
|
|
145
147
|
# @param ending_before [Time] Query param: RFC 3339 timestamp (exclusive). Invoices will only be returned for
|
|
@@ -156,6 +158,8 @@ module MetronomeSDK
|
|
|
156
158
|
#
|
|
157
159
|
# @param status [String] Query param: Invoice status, e.g. DRAFT, FINALIZED, or VOID
|
|
158
160
|
#
|
|
161
|
+
# @param type [Symbol, MetronomeSDK::Models::V1::Customers::InvoiceListParams::Type] Query param: Filter invoices by type. Defaults to returning all invoice types.
|
|
162
|
+
#
|
|
159
163
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
160
164
|
#
|
|
161
165
|
# @return [MetronomeSDK::Internal::CursorPage<MetronomeSDK::Models::V1::Customers::Invoice>]
|
|
@@ -58,14 +58,12 @@ module MetronomeSDK
|
|
|
58
58
|
# provisioning with a package. Edited contracts will still be associated with
|
|
59
59
|
# the package used during provisioning.
|
|
60
60
|
#
|
|
61
|
-
# @overload create(name:, aliases: nil,
|
|
61
|
+
# @overload create(name:, aliases: nil, billing_provider: nil, commits: nil, contract_name: nil, credits: nil, delivery_method: nil, duration: nil, multiplier_override_prioritization: nil, net_payment_terms_days: nil, overrides: nil, prepaid_balance_threshold_configuration: nil, rate_card_alias: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, scheduled_charges: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, spend_trackers: nil, subscriptions: nil, uniqueness_key: nil, usage_statement_schedule: nil, request_options: {})
|
|
62
62
|
#
|
|
63
63
|
# @param name [String]
|
|
64
64
|
#
|
|
65
65
|
# @param aliases [Array<MetronomeSDK::Models::V1::PackageCreateParams::Alias>] Reference this alias when creating a contract. If the same alias is assigned to
|
|
66
66
|
#
|
|
67
|
-
# @param billing_anchor_date [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingAnchorDate]
|
|
68
|
-
#
|
|
69
67
|
# @param billing_provider [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingProvider]
|
|
70
68
|
#
|
|
71
69
|
# @param commits [Array<MetronomeSDK::Models::V1::PackageCreateParams::Commit>]
|
|
@@ -100,6 +98,8 @@ module MetronomeSDK
|
|
|
100
98
|
#
|
|
101
99
|
# @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfiguration]
|
|
102
100
|
#
|
|
101
|
+
# @param spend_trackers [Array<MetronomeSDK::Models::V1::PackageCreateParams::SpendTracker>]
|
|
102
|
+
#
|
|
103
103
|
# @param subscriptions [Array<MetronomeSDK::Models::V1::PackageCreateParams::Subscription>]
|
|
104
104
|
#
|
|
105
105
|
# @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
|
|
@@ -218,10 +218,9 @@ module MetronomeSDK
|
|
|
218
218
|
#
|
|
219
219
|
# ### **Usage guidelines:**
|
|
220
220
|
#
|
|
221
|
-
# Use the
|
|
222
|
-
#
|
|
223
|
-
#
|
|
224
|
-
# pass **`covering_date`** equal to the current time.
|
|
221
|
+
# Use the **`starting_at`**, **`covering_date`**, and **`include_archived`**
|
|
222
|
+
# parameters to filter the list of returned contracts. For example, to list only
|
|
223
|
+
# currently active contracts, pass **`covering_date`** equal to the current time.
|
|
225
224
|
#
|
|
226
225
|
# @overload list_contracts_on_package(package_id:, limit: nil, next_page: nil, covering_date: nil, include_archived: nil, starting_at: nil, request_options: {})
|
|
227
226
|
#
|
|
@@ -80,9 +80,6 @@ module MetronomeSDK
|
|
|
80
80
|
# @return [MetronomeSDK::Resources::V1::Packages]
|
|
81
81
|
attr_reader :packages
|
|
82
82
|
|
|
83
|
-
# @return [MetronomeSDK::Resources::V1::Payments]
|
|
84
|
-
attr_reader :payments
|
|
85
|
-
|
|
86
83
|
# Use these endpoints to configure a billing API key, a webhook secret, or invoice
|
|
87
84
|
# finalization behavior.
|
|
88
85
|
# @return [MetronomeSDK::Resources::V1::Settings]
|
|
@@ -107,7 +104,6 @@ module MetronomeSDK
|
|
|
107
104
|
@invoices = MetronomeSDK::Resources::V1::Invoices.new(client: client)
|
|
108
105
|
@contracts = MetronomeSDK::Resources::V1::Contracts.new(client: client)
|
|
109
106
|
@packages = MetronomeSDK::Resources::V1::Packages.new(client: client)
|
|
110
|
-
@payments = MetronomeSDK::Resources::V1::Payments.new(client: client)
|
|
111
107
|
@settings = MetronomeSDK::Resources::V1::Settings.new(client: client)
|
|
112
108
|
end
|
|
113
109
|
end
|
|
@@ -128,7 +128,7 @@ module MetronomeSDK
|
|
|
128
128
|
# - Contract editing must be enabled to use this endpoint. Reach out to your
|
|
129
129
|
# Metronome representative to learn more.
|
|
130
130
|
#
|
|
131
|
-
# @overload edit(contract_id:, customer_id:, add_billing_provider_configuration_update: nil, add_commits: nil, add_credits: nil, add_discounts: nil, add_overrides: nil, add_prepaid_balance_threshold_configuration: nil, add_professional_services: nil, add_recurring_commits: nil, add_recurring_credits: nil, add_reseller_royalties: nil, add_revenue_system_configuration_update: nil, add_scheduled_charges: nil, add_spend_threshold_configuration: nil, add_subscriptions: nil, allow_contract_ending_before_finalized_invoice: nil, archive_commits: nil, archive_credits: nil, archive_scheduled_charges: nil, remove_overrides: nil, uniqueness_key: nil, update_commits: nil, update_contract_end_date: nil, update_contract_name: nil, update_credits: nil, update_net_payment_terms_days: nil, update_prepaid_balance_threshold_configuration: nil, update_recurring_commits: nil, update_recurring_credits: nil, update_scheduled_charges: nil, update_spend_threshold_configuration: nil, update_subscriptions: nil, request_options: {})
|
|
131
|
+
# @overload edit(contract_id:, customer_id:, add_billing_provider_configuration_update: nil, add_commits: nil, add_credits: nil, add_discounts: nil, add_overrides: nil, add_prepaid_balance_threshold_configuration: nil, add_professional_services: nil, add_recurring_commits: nil, add_recurring_credits: nil, add_reseller_royalties: nil, add_revenue_system_configuration_update: nil, add_scheduled_charges: nil, add_spend_threshold_configuration: nil, add_spend_trackers: nil, add_subscriptions: nil, allow_contract_ending_before_finalized_invoice: nil, archive_commits: nil, archive_credits: nil, archive_scheduled_charges: nil, archive_spend_trackers: nil, remove_overrides: nil, uniqueness_key: nil, update_commits: nil, update_contract_end_date: nil, update_contract_name: nil, update_credits: nil, update_net_payment_terms_days: nil, update_prepaid_balance_threshold_configuration: nil, update_recurring_commits: nil, update_recurring_credits: nil, update_scheduled_charges: nil, update_spend_threshold_configuration: nil, update_subscriptions: nil, request_options: {})
|
|
132
132
|
#
|
|
133
133
|
# @param contract_id [String] ID of the contract being edited
|
|
134
134
|
#
|
|
@@ -160,6 +160,8 @@ module MetronomeSDK
|
|
|
160
160
|
#
|
|
161
161
|
# @param add_spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfigurationV2]
|
|
162
162
|
#
|
|
163
|
+
# @param add_spend_trackers [Array<MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker>] Spend trackers to add to this contract. Aliases must be unique within a contract
|
|
164
|
+
#
|
|
163
165
|
# @param add_subscriptions [Array<MetronomeSDK::Models::V2::ContractEditParams::AddSubscription>] Optional list of [subscriptions](https://docs.metronome.com/manage-product-acces
|
|
164
166
|
#
|
|
165
167
|
# @param allow_contract_ending_before_finalized_invoice [Boolean] If true, allows setting the contract end date earlier than the end_timestamp of
|
|
@@ -170,6 +172,8 @@ module MetronomeSDK
|
|
|
170
172
|
#
|
|
171
173
|
# @param archive_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractEditParams::ArchiveScheduledCharge>] IDs of scheduled charges to archive
|
|
172
174
|
#
|
|
175
|
+
# @param archive_spend_trackers [Array<String>] Aliases of spend trackers to archive.
|
|
176
|
+
#
|
|
173
177
|
# @param remove_overrides [Array<MetronomeSDK::Models::V2::ContractEditParams::RemoveOverride>] IDs of overrides to remove
|
|
174
178
|
#
|
|
175
179
|
# @param uniqueness_key [String] Optional uniqueness key to prevent duplicate contract edits.
|
data/lib/metronome_sdk.rb
CHANGED
|
@@ -121,6 +121,8 @@ require_relative "metronome_sdk/models/v1/contract_list_balances_params"
|
|
|
121
121
|
require_relative "metronome_sdk/models/v1/contract_list_balances_response"
|
|
122
122
|
require_relative "metronome_sdk/models/v1/contract_list_params"
|
|
123
123
|
require_relative "metronome_sdk/models/v1/contract_list_response"
|
|
124
|
+
require_relative "metronome_sdk/models/v1/contract_list_seat_balances_params"
|
|
125
|
+
require_relative "metronome_sdk/models/v1/contract_list_seat_balances_response"
|
|
124
126
|
require_relative "metronome_sdk/models/v1/contract_retrieve_params"
|
|
125
127
|
require_relative "metronome_sdk/models/v1/contract_retrieve_rate_schedule_params"
|
|
126
128
|
require_relative "metronome_sdk/models/v1/contract_retrieve_rate_schedule_response"
|
|
@@ -269,13 +271,6 @@ require_relative "metronome_sdk/models/v1/package_list_params"
|
|
|
269
271
|
require_relative "metronome_sdk/models/v1/package_list_response"
|
|
270
272
|
require_relative "metronome_sdk/models/v1/package_retrieve_params"
|
|
271
273
|
require_relative "metronome_sdk/models/v1/package_retrieve_response"
|
|
272
|
-
require_relative "metronome_sdk/models/v1/payment"
|
|
273
|
-
require_relative "metronome_sdk/models/v1/payment_attempt_params"
|
|
274
|
-
require_relative "metronome_sdk/models/v1/payment_attempt_response"
|
|
275
|
-
require_relative "metronome_sdk/models/v1/payment_cancel_params"
|
|
276
|
-
require_relative "metronome_sdk/models/v1/payment_cancel_response"
|
|
277
|
-
require_relative "metronome_sdk/models/v1/payment_list_params"
|
|
278
|
-
require_relative "metronome_sdk/models/v1/payment_status"
|
|
279
274
|
require_relative "metronome_sdk/models/v1/plan_detail"
|
|
280
275
|
require_relative "metronome_sdk/models/v1/plan_get_details_params"
|
|
281
276
|
require_relative "metronome_sdk/models/v1/plan_get_details_response"
|
|
@@ -341,7 +336,6 @@ require_relative "metronome_sdk/resources/v1/custom_fields"
|
|
|
341
336
|
require_relative "metronome_sdk/resources/v1/dashboards"
|
|
342
337
|
require_relative "metronome_sdk/resources/v1/invoices"
|
|
343
338
|
require_relative "metronome_sdk/resources/v1/packages"
|
|
344
|
-
require_relative "metronome_sdk/resources/v1/payments"
|
|
345
339
|
require_relative "metronome_sdk/resources/v1/plans"
|
|
346
340
|
require_relative "metronome_sdk/resources/v1/pricing_units"
|
|
347
341
|
require_relative "metronome_sdk/resources/v1/services"
|
|
@@ -237,6 +237,18 @@ module MetronomeSDK
|
|
|
237
237
|
end
|
|
238
238
|
attr_writer :specifiers
|
|
239
239
|
|
|
240
|
+
# Optional attributes controlling how this commit interacts with spend trackers.
|
|
241
|
+
sig { returns(T.nilable(MetronomeSDK::Commit::SpendTrackerAttributes)) }
|
|
242
|
+
attr_reader :spend_tracker_attributes
|
|
243
|
+
|
|
244
|
+
sig do
|
|
245
|
+
params(
|
|
246
|
+
spend_tracker_attributes:
|
|
247
|
+
MetronomeSDK::Commit::SpendTrackerAttributes::OrHash
|
|
248
|
+
).void
|
|
249
|
+
end
|
|
250
|
+
attr_writer :spend_tracker_attributes
|
|
251
|
+
|
|
240
252
|
# The subscription configuration for this commit, if it was generated from a
|
|
241
253
|
# recurring commit with a subscription attached.
|
|
242
254
|
sig { returns(T.nilable(MetronomeSDK::Commit::SubscriptionConfig)) }
|
|
@@ -307,6 +319,8 @@ module MetronomeSDK
|
|
|
307
319
|
rollover_fraction: Float,
|
|
308
320
|
salesforce_opportunity_id: String,
|
|
309
321
|
specifiers: T::Array[MetronomeSDK::CommitSpecifier::OrHash],
|
|
322
|
+
spend_tracker_attributes:
|
|
323
|
+
MetronomeSDK::Commit::SpendTrackerAttributes::OrHash,
|
|
310
324
|
subscription_config: MetronomeSDK::Commit::SubscriptionConfig::OrHash,
|
|
311
325
|
uniqueness_key: String
|
|
312
326
|
).returns(T.attached_class)
|
|
@@ -372,6 +386,8 @@ module MetronomeSDK
|
|
|
372
386
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
373
387
|
# specifiers to contribute to a commit's or credit's drawdown.
|
|
374
388
|
specifiers: nil,
|
|
389
|
+
# Optional attributes controlling how this commit interacts with spend trackers.
|
|
390
|
+
spend_tracker_attributes: nil,
|
|
375
391
|
# The subscription configuration for this commit, if it was generated from a
|
|
376
392
|
# recurring commit with a subscription attached.
|
|
377
393
|
subscription_config: nil,
|
|
@@ -413,6 +429,8 @@ module MetronomeSDK
|
|
|
413
429
|
rollover_fraction: Float,
|
|
414
430
|
salesforce_opportunity_id: String,
|
|
415
431
|
specifiers: T::Array[MetronomeSDK::CommitSpecifier],
|
|
432
|
+
spend_tracker_attributes:
|
|
433
|
+
MetronomeSDK::Commit::SpendTrackerAttributes,
|
|
416
434
|
subscription_config: MetronomeSDK::Commit::SubscriptionConfig,
|
|
417
435
|
uniqueness_key: String
|
|
418
436
|
}
|
|
@@ -1824,6 +1842,36 @@ module MetronomeSDK
|
|
|
1824
1842
|
end
|
|
1825
1843
|
end
|
|
1826
1844
|
|
|
1845
|
+
class SpendTrackerAttributes < MetronomeSDK::Internal::Type::BaseModel
|
|
1846
|
+
OrHash =
|
|
1847
|
+
T.type_alias do
|
|
1848
|
+
T.any(
|
|
1849
|
+
MetronomeSDK::Commit::SpendTrackerAttributes,
|
|
1850
|
+
MetronomeSDK::Internal::AnyHash
|
|
1851
|
+
)
|
|
1852
|
+
end
|
|
1853
|
+
|
|
1854
|
+
# If true, this commit is included in spend trackers with discounted set to
|
|
1855
|
+
# DISCOUNTED_ONLY
|
|
1856
|
+
sig { returns(T::Boolean) }
|
|
1857
|
+
attr_accessor :counts_as_discounted
|
|
1858
|
+
|
|
1859
|
+
# Optional attributes controlling how this commit interacts with spend trackers.
|
|
1860
|
+
sig do
|
|
1861
|
+
params(counts_as_discounted: T::Boolean).returns(T.attached_class)
|
|
1862
|
+
end
|
|
1863
|
+
def self.new(
|
|
1864
|
+
# If true, this commit is included in spend trackers with discounted set to
|
|
1865
|
+
# DISCOUNTED_ONLY
|
|
1866
|
+
counts_as_discounted:
|
|
1867
|
+
)
|
|
1868
|
+
end
|
|
1869
|
+
|
|
1870
|
+
sig { override.returns({ counts_as_discounted: T::Boolean }) }
|
|
1871
|
+
def to_hash
|
|
1872
|
+
end
|
|
1873
|
+
end
|
|
1874
|
+
|
|
1827
1875
|
class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
1828
1876
|
OrHash =
|
|
1829
1877
|
T.type_alias do
|