metronome-sdk 3.6.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 +16 -0
- data/README.md +1 -1
- 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 +168 -2
- 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/contract_amend_params.rb +29 -1
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +146 -2
- data/lib/metronome_sdk/models/v1/contract_create_response.rb +1134 -3
- data/lib/metronome_sdk/models/v1/package_create_params.rb +115 -1
- 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 +145 -3
- data/lib/metronome_sdk/resources/v1/contracts.rb +3 -1
- data/lib/metronome_sdk/resources/v1/packages.rb +6 -5
- 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 +0 -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 +409 -0
- 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/contract_amend_params.rbi +54 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +368 -0
- data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +2448 -4
- data/rbi/metronome_sdk/models/v1/package_create_params.rbi +310 -0
- 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 +359 -11
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +7 -0
- data/rbi/metronome_sdk/resources/v1/packages.rbi +8 -4
- 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 +170 -0
- 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/contract_amend_params.rbs +19 -0
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +134 -0
- data/sig/metronome_sdk/models/v1/contract_create_response.rbs +1045 -4
- data/sig/metronome_sdk/models/v1/package_create_params.rbs +115 -0
- 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 +142 -9
- data/sig/metronome_sdk/resources/v1/contracts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/packages.rbs +1 -0
- data/sig/metronome_sdk/resources/v1.rbs +0 -2
- data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
- metadata +2 -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
|
@@ -104,6 +104,14 @@ module MetronomeSDK
|
|
|
104
104
|
# @return [MetronomeSDK::Models::SpendThresholdConfigurationV2, nil]
|
|
105
105
|
optional :add_spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfigurationV2 }
|
|
106
106
|
|
|
107
|
+
# @!attribute add_spend_trackers
|
|
108
|
+
# Spend trackers to add to this contract. Aliases must be unique within a
|
|
109
|
+
# contract.
|
|
110
|
+
#
|
|
111
|
+
# @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker>, nil]
|
|
112
|
+
optional :add_spend_trackers,
|
|
113
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddSpendTracker] }
|
|
114
|
+
|
|
107
115
|
# @!attribute add_subscriptions
|
|
108
116
|
# Optional list of
|
|
109
117
|
# [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
|
@@ -143,6 +151,12 @@ module MetronomeSDK
|
|
|
143
151
|
optional :archive_scheduled_charges,
|
|
144
152
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::ArchiveScheduledCharge] }
|
|
145
153
|
|
|
154
|
+
# @!attribute archive_spend_trackers
|
|
155
|
+
# Aliases of spend trackers to archive.
|
|
156
|
+
#
|
|
157
|
+
# @return [Array<String>, nil]
|
|
158
|
+
optional :archive_spend_trackers, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
159
|
+
|
|
146
160
|
# @!attribute remove_overrides
|
|
147
161
|
# IDs of overrides to remove
|
|
148
162
|
#
|
|
@@ -231,7 +245,7 @@ module MetronomeSDK
|
|
|
231
245
|
optional :update_subscriptions,
|
|
232
246
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::UpdateSubscription] }
|
|
233
247
|
|
|
234
|
-
# @!method initialize(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: {})
|
|
248
|
+
# @!method initialize(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: {})
|
|
235
249
|
# Some parameter documentations has been truncated, see
|
|
236
250
|
# {MetronomeSDK::Models::V2::ContractEditParams} for more details.
|
|
237
251
|
#
|
|
@@ -265,6 +279,8 @@ module MetronomeSDK
|
|
|
265
279
|
#
|
|
266
280
|
# @param add_spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfigurationV2]
|
|
267
281
|
#
|
|
282
|
+
# @param add_spend_trackers [Array<MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker>] Spend trackers to add to this contract. Aliases must be unique within a contract
|
|
283
|
+
#
|
|
268
284
|
# @param add_subscriptions [Array<MetronomeSDK::Models::V2::ContractEditParams::AddSubscription>] Optional list of [subscriptions](https://docs.metronome.com/manage-product-acces
|
|
269
285
|
#
|
|
270
286
|
# @param allow_contract_ending_before_finalized_invoice [Boolean] If true, allows setting the contract end date earlier than the end_timestamp of
|
|
@@ -275,6 +291,8 @@ module MetronomeSDK
|
|
|
275
291
|
#
|
|
276
292
|
# @param archive_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractEditParams::ArchiveScheduledCharge>] IDs of scheduled charges to archive
|
|
277
293
|
#
|
|
294
|
+
# @param archive_spend_trackers [Array<String>] Aliases of spend trackers to archive.
|
|
295
|
+
#
|
|
278
296
|
# @param remove_overrides [Array<MetronomeSDK::Models::V2::ContractEditParams::RemoveOverride>] IDs of overrides to remove
|
|
279
297
|
#
|
|
280
298
|
# @param uniqueness_key [String] Optional uniqueness key to prevent duplicate contract edits.
|
|
@@ -531,6 +549,13 @@ module MetronomeSDK
|
|
|
531
549
|
# @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
|
|
532
550
|
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
|
|
533
551
|
|
|
552
|
+
# @!attribute spend_tracker_attributes
|
|
553
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
554
|
+
#
|
|
555
|
+
# @return [MetronomeSDK::Models::V2::ContractEditParams::AddCommit::SpendTrackerAttributes, nil]
|
|
556
|
+
optional :spend_tracker_attributes,
|
|
557
|
+
-> { MetronomeSDK::V2::ContractEditParams::AddCommit::SpendTrackerAttributes }
|
|
558
|
+
|
|
534
559
|
# @!attribute temporary_id
|
|
535
560
|
# A temporary ID for the commit that can be used to reference the commit for
|
|
536
561
|
# commit specific overrides.
|
|
@@ -538,7 +563,7 @@ module MetronomeSDK
|
|
|
538
563
|
# @return [String, nil]
|
|
539
564
|
optional :temporary_id, String
|
|
540
565
|
|
|
541
|
-
# @!method initialize(product_id:, type:, access_schedule: nil, amount: nil, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, payment_gate_config: nil, priority: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil, temporary_id: nil)
|
|
566
|
+
# @!method initialize(product_id:, type:, access_schedule: nil, amount: nil, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, payment_gate_config: nil, priority: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil, spend_tracker_attributes: nil, temporary_id: nil)
|
|
542
567
|
# Some parameter documentations has been truncated, see
|
|
543
568
|
# {MetronomeSDK::Models::V2::ContractEditParams::AddCommit} for more details.
|
|
544
569
|
#
|
|
@@ -576,6 +601,8 @@ module MetronomeSDK
|
|
|
576
601
|
#
|
|
577
602
|
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
|
|
578
603
|
#
|
|
604
|
+
# @param spend_tracker_attributes [MetronomeSDK::Models::V2::ContractEditParams::AddCommit::SpendTrackerAttributes] Optional attributes for spend tracker integration. Immutable after creation.
|
|
605
|
+
#
|
|
579
606
|
# @param temporary_id [String] A temporary ID for the commit that can be used to reference the commit for commi
|
|
580
607
|
|
|
581
608
|
# @see MetronomeSDK::Models::V2::ContractEditParams::AddCommit#type
|
|
@@ -1011,6 +1038,25 @@ module MetronomeSDK
|
|
|
1011
1038
|
# @!method self.values
|
|
1012
1039
|
# @return [Array<Symbol>]
|
|
1013
1040
|
end
|
|
1041
|
+
|
|
1042
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::AddCommit#spend_tracker_attributes
|
|
1043
|
+
class SpendTrackerAttributes < MetronomeSDK::Internal::Type::BaseModel
|
|
1044
|
+
# @!attribute counts_as_discounted
|
|
1045
|
+
# If true, this commit will be included in spend trackers with discounted set to
|
|
1046
|
+
# DISCOUNTED_ONLY
|
|
1047
|
+
#
|
|
1048
|
+
# @return [Boolean]
|
|
1049
|
+
required :counts_as_discounted, MetronomeSDK::Internal::Type::Boolean
|
|
1050
|
+
|
|
1051
|
+
# @!method initialize(counts_as_discounted:)
|
|
1052
|
+
# Some parameter documentations has been truncated, see
|
|
1053
|
+
# {MetronomeSDK::Models::V2::ContractEditParams::AddCommit::SpendTrackerAttributes}
|
|
1054
|
+
# for more details.
|
|
1055
|
+
#
|
|
1056
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
1057
|
+
#
|
|
1058
|
+
# @param counts_as_discounted [Boolean] If true, this commit will be included in spend trackers with discounted set to D
|
|
1059
|
+
end
|
|
1014
1060
|
end
|
|
1015
1061
|
|
|
1016
1062
|
class AddCredit < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -3012,6 +3058,112 @@ module MetronomeSDK
|
|
|
3012
3058
|
end
|
|
3013
3059
|
end
|
|
3014
3060
|
|
|
3061
|
+
class AddSpendTracker < MetronomeSDK::Internal::Type::BaseModel
|
|
3062
|
+
# @!attribute alias_
|
|
3063
|
+
# Human-readable identifier, unique per contract.
|
|
3064
|
+
#
|
|
3065
|
+
# @return [String]
|
|
3066
|
+
required :alias_, String, api_name: :alias
|
|
3067
|
+
|
|
3068
|
+
# @!attribute applicable_spend_specifiers
|
|
3069
|
+
#
|
|
3070
|
+
# @return [Array<MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier>]
|
|
3071
|
+
required :applicable_spend_specifiers,
|
|
3072
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier] }
|
|
3073
|
+
|
|
3074
|
+
# @!attribute credit_type_id
|
|
3075
|
+
#
|
|
3076
|
+
# @return [String]
|
|
3077
|
+
required :credit_type_id, String
|
|
3078
|
+
|
|
3079
|
+
# @!attribute reset_frequency
|
|
3080
|
+
#
|
|
3081
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ResetFrequency]
|
|
3082
|
+
required :reset_frequency,
|
|
3083
|
+
enum: -> { MetronomeSDK::V2::ContractEditParams::AddSpendTracker::ResetFrequency }
|
|
3084
|
+
|
|
3085
|
+
# @!method initialize(alias_:, applicable_spend_specifiers:, credit_type_id:, reset_frequency:)
|
|
3086
|
+
# @param alias_ [String] Human-readable identifier, unique per contract.
|
|
3087
|
+
#
|
|
3088
|
+
# @param applicable_spend_specifiers [Array<MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier>]
|
|
3089
|
+
#
|
|
3090
|
+
# @param credit_type_id [String]
|
|
3091
|
+
#
|
|
3092
|
+
# @param reset_frequency [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ResetFrequency]
|
|
3093
|
+
|
|
3094
|
+
class ApplicableSpendSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
3095
|
+
# @!attribute sources
|
|
3096
|
+
#
|
|
3097
|
+
# @return [Array<Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier::Source>]
|
|
3098
|
+
required :sources,
|
|
3099
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[enum: MetronomeSDK::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier::Source] }
|
|
3100
|
+
|
|
3101
|
+
# @!attribute spend_type
|
|
3102
|
+
#
|
|
3103
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier::SpendType]
|
|
3104
|
+
required :spend_type,
|
|
3105
|
+
enum: -> { MetronomeSDK::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier::SpendType }
|
|
3106
|
+
|
|
3107
|
+
# @!attribute discounted
|
|
3108
|
+
# Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
3109
|
+
#
|
|
3110
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier::Discounted, nil]
|
|
3111
|
+
optional :discounted,
|
|
3112
|
+
enum: -> { MetronomeSDK::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier::Discounted }
|
|
3113
|
+
|
|
3114
|
+
# @!method initialize(sources:, spend_type:, discounted: nil)
|
|
3115
|
+
# @param sources [Array<Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier::Source>]
|
|
3116
|
+
#
|
|
3117
|
+
# @param spend_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier::SpendType]
|
|
3118
|
+
#
|
|
3119
|
+
# @param discounted [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier::Discounted] Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
3120
|
+
|
|
3121
|
+
module Source
|
|
3122
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3123
|
+
|
|
3124
|
+
THRESHOLD_RECHARGE = :THRESHOLD_RECHARGE
|
|
3125
|
+
MANUAL = :MANUAL
|
|
3126
|
+
|
|
3127
|
+
# @!method self.values
|
|
3128
|
+
# @return [Array<Symbol>]
|
|
3129
|
+
end
|
|
3130
|
+
|
|
3131
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier#spend_type
|
|
3132
|
+
module SpendType
|
|
3133
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3134
|
+
|
|
3135
|
+
COMMIT_PURCHASE = :COMMIT_PURCHASE
|
|
3136
|
+
|
|
3137
|
+
# @!method self.values
|
|
3138
|
+
# @return [Array<Symbol>]
|
|
3139
|
+
end
|
|
3140
|
+
|
|
3141
|
+
# Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
3142
|
+
#
|
|
3143
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker::ApplicableSpendSpecifier#discounted
|
|
3144
|
+
module Discounted
|
|
3145
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3146
|
+
|
|
3147
|
+
ANY = :ANY
|
|
3148
|
+
DISCOUNTED_ONLY = :DISCOUNTED_ONLY
|
|
3149
|
+
UNDISCOUNTED_ONLY = :UNDISCOUNTED_ONLY
|
|
3150
|
+
|
|
3151
|
+
# @!method self.values
|
|
3152
|
+
# @return [Array<Symbol>]
|
|
3153
|
+
end
|
|
3154
|
+
end
|
|
3155
|
+
|
|
3156
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::AddSpendTracker#reset_frequency
|
|
3157
|
+
module ResetFrequency
|
|
3158
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3159
|
+
|
|
3160
|
+
BILLING_PERIOD = :BILLING_PERIOD
|
|
3161
|
+
|
|
3162
|
+
# @!method self.values
|
|
3163
|
+
# @return [Array<Symbol>]
|
|
3164
|
+
end
|
|
3165
|
+
end
|
|
3166
|
+
|
|
3015
3167
|
class AddSubscription < MetronomeSDK::Internal::Type::BaseModel
|
|
3016
3168
|
# @!attribute collection_schedule
|
|
3017
3169
|
#
|
|
@@ -3877,7 +4029,18 @@ module MetronomeSDK
|
|
|
3877
4029
|
# @return [Float, nil]
|
|
3878
4030
|
optional :threshold_amount, Float
|
|
3879
4031
|
|
|
3880
|
-
# @!
|
|
4032
|
+
# @!attribute threshold_balance_specifiers
|
|
4033
|
+
#
|
|
4034
|
+
# @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier>, nil]
|
|
4035
|
+
optional :threshold_balance_specifiers,
|
|
4036
|
+
-> do
|
|
4037
|
+
MetronomeSDK::Internal::Type::ArrayOf[
|
|
4038
|
+
MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier
|
|
4039
|
+
]
|
|
4040
|
+
end,
|
|
4041
|
+
nil?: true
|
|
4042
|
+
|
|
4043
|
+
# @!method initialize(commit: nil, custom_credit_type_id: nil, discount_configuration: nil, is_enabled: nil, payment_gate_config: nil, recharge_to_amount: nil, threshold_amount: nil, threshold_balance_specifiers: nil)
|
|
3881
4044
|
# Some parameter documentations has been truncated, see
|
|
3882
4045
|
# {MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration}
|
|
3883
4046
|
# for more details.
|
|
@@ -3895,6 +4058,8 @@ module MetronomeSDK
|
|
|
3895
4058
|
# @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
|
|
3896
4059
|
#
|
|
3897
4060
|
# @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
|
|
4061
|
+
#
|
|
4062
|
+
# @param threshold_balance_specifiers [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier>, nil]
|
|
3898
4063
|
|
|
3899
4064
|
# @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration#commit
|
|
3900
4065
|
class Commit < MetronomeSDK::Models::UpdateBaseThresholdCommit
|
|
@@ -3940,6 +4105,16 @@ module MetronomeSDK
|
|
|
3940
4105
|
|
|
3941
4106
|
# @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration#discount_configuration
|
|
3942
4107
|
class DiscountConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
|
4108
|
+
# @!attribute cap
|
|
4109
|
+
# Update the discount cap. Set to null to remove an existing cap.
|
|
4110
|
+
#
|
|
4111
|
+
# @return [MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap, nil]
|
|
4112
|
+
optional :cap,
|
|
4113
|
+
-> {
|
|
4114
|
+
MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap
|
|
4115
|
+
},
|
|
4116
|
+
nil?: true
|
|
4117
|
+
|
|
3943
4118
|
# @!attribute payment_fraction
|
|
3944
4119
|
# The fraction of the original amount that the customer pays after applying the
|
|
3945
4120
|
# discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
@@ -3948,12 +4123,101 @@ module MetronomeSDK
|
|
|
3948
4123
|
# @return [Float, nil]
|
|
3949
4124
|
optional :payment_fraction, Float, nil?: true
|
|
3950
4125
|
|
|
3951
|
-
# @!method initialize(payment_fraction: nil)
|
|
4126
|
+
# @!method initialize(cap: nil, payment_fraction: nil)
|
|
3952
4127
|
# Some parameter documentations has been truncated, see
|
|
3953
4128
|
# {MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration}
|
|
3954
4129
|
# for more details.
|
|
3955
4130
|
#
|
|
4131
|
+
# @param cap [MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap, nil] Update the discount cap. Set to null to remove an existing cap.
|
|
4132
|
+
#
|
|
3956
4133
|
# @param payment_fraction [Float, nil] The fraction of the original amount that the customer pays after applying the di
|
|
4134
|
+
|
|
4135
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration#cap
|
|
4136
|
+
class Cap < MetronomeSDK::Internal::Type::BaseModel
|
|
4137
|
+
# @!attribute amount
|
|
4138
|
+
# Accumulated spend ceiling above which the discount stops applying.
|
|
4139
|
+
#
|
|
4140
|
+
# @return [Float]
|
|
4141
|
+
required :amount, Float
|
|
4142
|
+
|
|
4143
|
+
# @!attribute spend_tracker_alias
|
|
4144
|
+
# Alias of the spend tracker this cap is measured against.
|
|
4145
|
+
#
|
|
4146
|
+
# @return [String]
|
|
4147
|
+
required :spend_tracker_alias, String
|
|
4148
|
+
|
|
4149
|
+
# @!method initialize(amount:, spend_tracker_alias:)
|
|
4150
|
+
# Update the discount cap. Set to null to remove an existing cap.
|
|
4151
|
+
#
|
|
4152
|
+
# @param amount [Float] Accumulated spend ceiling above which the discount stops applying.
|
|
4153
|
+
#
|
|
4154
|
+
# @param spend_tracker_alias [String] Alias of the spend tracker this cap is measured against.
|
|
4155
|
+
end
|
|
4156
|
+
end
|
|
4157
|
+
|
|
4158
|
+
class ThresholdBalanceSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
4159
|
+
# @!attribute exclude
|
|
4160
|
+
#
|
|
4161
|
+
# @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude>]
|
|
4162
|
+
required :exclude,
|
|
4163
|
+
-> do
|
|
4164
|
+
MetronomeSDK::Internal::Type::ArrayOf[
|
|
4165
|
+
MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude
|
|
4166
|
+
]
|
|
4167
|
+
end
|
|
4168
|
+
|
|
4169
|
+
# @!method initialize(exclude:)
|
|
4170
|
+
# @param exclude [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude>]
|
|
4171
|
+
|
|
4172
|
+
class Exclude < MetronomeSDK::Internal::Type::BaseModel
|
|
4173
|
+
# @!attribute custom_field_filters
|
|
4174
|
+
#
|
|
4175
|
+
# @return [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter>]
|
|
4176
|
+
required :custom_field_filters,
|
|
4177
|
+
-> do
|
|
4178
|
+
MetronomeSDK::Internal::Type::ArrayOf[
|
|
4179
|
+
MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter
|
|
4180
|
+
]
|
|
4181
|
+
end
|
|
4182
|
+
|
|
4183
|
+
# @!method initialize(custom_field_filters:)
|
|
4184
|
+
# @param custom_field_filters [Array<MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter>]
|
|
4185
|
+
|
|
4186
|
+
class CustomFieldFilter < MetronomeSDK::Internal::Type::BaseModel
|
|
4187
|
+
# @!attribute entity
|
|
4188
|
+
#
|
|
4189
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity]
|
|
4190
|
+
required :entity,
|
|
4191
|
+
enum: -> { MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity }
|
|
4192
|
+
|
|
4193
|
+
# @!attribute key
|
|
4194
|
+
#
|
|
4195
|
+
# @return [String]
|
|
4196
|
+
required :key, String
|
|
4197
|
+
|
|
4198
|
+
# @!attribute value
|
|
4199
|
+
#
|
|
4200
|
+
# @return [String]
|
|
4201
|
+
required :value, String
|
|
4202
|
+
|
|
4203
|
+
# @!method initialize(entity:, key:, value:)
|
|
4204
|
+
# @param entity [Symbol, MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity]
|
|
4205
|
+
# @param key [String]
|
|
4206
|
+
# @param value [String]
|
|
4207
|
+
|
|
4208
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter#entity
|
|
4209
|
+
module Entity
|
|
4210
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
4211
|
+
|
|
4212
|
+
COMMIT = :Commit
|
|
4213
|
+
CONTRACT_CREDIT = :ContractCredit
|
|
4214
|
+
CONTRACT_CREDIT_OR_COMMIT = :ContractCreditOrCommit
|
|
4215
|
+
|
|
4216
|
+
# @!method self.values
|
|
4217
|
+
# @return [Array<Symbol>]
|
|
4218
|
+
end
|
|
4219
|
+
end
|
|
4220
|
+
end
|
|
3957
4221
|
end
|
|
3958
4222
|
end
|
|
3959
4223
|
|
|
@@ -4291,6 +4555,16 @@ module MetronomeSDK
|
|
|
4291
4555
|
|
|
4292
4556
|
# @see MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration#discount_configuration
|
|
4293
4557
|
class DiscountConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
|
4558
|
+
# @!attribute cap
|
|
4559
|
+
# Update the discount cap. Set to null to remove an existing cap.
|
|
4560
|
+
#
|
|
4561
|
+
# @return [MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::DiscountConfiguration::Cap, nil]
|
|
4562
|
+
optional :cap,
|
|
4563
|
+
-> {
|
|
4564
|
+
MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::DiscountConfiguration::Cap
|
|
4565
|
+
},
|
|
4566
|
+
nil?: true
|
|
4567
|
+
|
|
4294
4568
|
# @!attribute payment_fraction
|
|
4295
4569
|
# The fraction of the original amount that the customer pays after applying the
|
|
4296
4570
|
# discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
@@ -4299,12 +4573,36 @@ module MetronomeSDK
|
|
|
4299
4573
|
# @return [Float, nil]
|
|
4300
4574
|
optional :payment_fraction, Float, nil?: true
|
|
4301
4575
|
|
|
4302
|
-
# @!method initialize(payment_fraction: nil)
|
|
4576
|
+
# @!method initialize(cap: nil, payment_fraction: nil)
|
|
4303
4577
|
# Some parameter documentations has been truncated, see
|
|
4304
4578
|
# {MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::DiscountConfiguration}
|
|
4305
4579
|
# for more details.
|
|
4306
4580
|
#
|
|
4581
|
+
# @param cap [MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::DiscountConfiguration::Cap, nil] Update the discount cap. Set to null to remove an existing cap.
|
|
4582
|
+
#
|
|
4307
4583
|
# @param payment_fraction [Float, nil] The fraction of the original amount that the customer pays after applying the di
|
|
4584
|
+
|
|
4585
|
+
# @see MetronomeSDK::Models::V2::ContractEditParams::UpdateSpendThresholdConfiguration::DiscountConfiguration#cap
|
|
4586
|
+
class Cap < MetronomeSDK::Internal::Type::BaseModel
|
|
4587
|
+
# @!attribute amount
|
|
4588
|
+
# Accumulated spend ceiling above which the discount stops applying.
|
|
4589
|
+
#
|
|
4590
|
+
# @return [Float]
|
|
4591
|
+
required :amount, Float
|
|
4592
|
+
|
|
4593
|
+
# @!attribute spend_tracker_alias
|
|
4594
|
+
# Alias of the spend tracker this cap is measured against.
|
|
4595
|
+
#
|
|
4596
|
+
# @return [String]
|
|
4597
|
+
required :spend_tracker_alias, String
|
|
4598
|
+
|
|
4599
|
+
# @!method initialize(amount:, spend_tracker_alias:)
|
|
4600
|
+
# Update the discount cap. Set to null to remove an existing cap.
|
|
4601
|
+
#
|
|
4602
|
+
# @param amount [Float] Accumulated spend ceiling above which the discount stops applying.
|
|
4603
|
+
#
|
|
4604
|
+
# @param spend_tracker_alias [String] Alias of the spend tracker this cap is measured against.
|
|
4605
|
+
end
|
|
4308
4606
|
end
|
|
4309
4607
|
end
|
|
4310
4608
|
|