metronome-sdk 3.1.0 → 3.2.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 +30 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/internal/util.rb +32 -1
- data/lib/metronome_sdk/models/commit_rate.rb +29 -3
- data/lib/metronome_sdk/models/contract.rb +1 -9
- data/lib/metronome_sdk/models/contract_v2.rb +22 -1
- data/lib/metronome_sdk/models/overwrite_rate.rb +22 -1
- data/lib/metronome_sdk/models/payment_gate_config.rb +0 -1
- data/lib/metronome_sdk/models/payment_gate_config_v2.rb +0 -1
- data/lib/metronome_sdk/models/rate.rb +22 -1
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +23 -2
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +24 -11
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +23 -1
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +21 -1
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +10 -1
- data/lib/metronome_sdk/models/v1/package_archive_params.rb +24 -0
- data/lib/metronome_sdk/models/v1/package_archive_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/package_create_params.rb +2719 -0
- data/lib/metronome_sdk/models/v1/package_create_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/package_list_contracts_on_package_params.rb +69 -0
- data/lib/metronome_sdk/models/v1/package_list_contracts_on_package_response.rb +42 -0
- data/lib/metronome_sdk/models/v1/package_list_params.rb +52 -0
- data/lib/metronome_sdk/models/v1/package_list_response.rb +2446 -0
- data/lib/metronome_sdk/models/v1/package_retrieve_params.rb +22 -0
- data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +2479 -0
- data/lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb +39 -2
- data/lib/metronome_sdk/models/v1/usage_list_with_groups_response.rb +27 -3
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +23 -2
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +23 -1
- data/lib/metronome_sdk/resources/v1/alerts.rb +5 -0
- data/lib/metronome_sdk/resources/v1/audit_logs.rb +4 -1
- data/lib/metronome_sdk/resources/v1/billable_metrics.rb +5 -1
- data/lib/metronome_sdk/resources/v1/contracts/named_schedules.rb +2 -0
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +4 -2
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/named_schedules.rb +2 -0
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb +1 -0
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +7 -3
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +10 -3
- data/lib/metronome_sdk/resources/v1/contracts.rb +8 -5
- data/lib/metronome_sdk/resources/v1/credit_grants.rb +9 -4
- data/lib/metronome_sdk/resources/v1/custom_fields.rb +6 -2
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +8 -2
- data/lib/metronome_sdk/resources/v1/customers/billing_config.rb +4 -0
- data/lib/metronome_sdk/resources/v1/customers/commits.rb +1 -0
- data/lib/metronome_sdk/resources/v1/customers/credits.rb +1 -0
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +10 -3
- data/lib/metronome_sdk/resources/v1/customers/named_schedules.rb +2 -0
- data/lib/metronome_sdk/resources/v1/customers/plans.rb +8 -2
- data/lib/metronome_sdk/resources/v1/customers.rb +27 -3
- data/lib/metronome_sdk/resources/v1/dashboards.rb +4 -0
- data/lib/metronome_sdk/resources/v1/invoices.rb +4 -0
- data/lib/metronome_sdk/resources/v1/packages.rb +269 -0
- data/lib/metronome_sdk/resources/v1/plans.rb +10 -3
- data/lib/metronome_sdk/resources/v1/pricing_units.rb +4 -1
- data/lib/metronome_sdk/resources/v1/services.rb +2 -0
- data/lib/metronome_sdk/resources/v1/settings/billing_providers.rb +2 -0
- data/lib/metronome_sdk/resources/v1/settings.rb +4 -0
- data/lib/metronome_sdk/resources/v1/usage.rb +26 -13
- data/lib/metronome_sdk/resources/v1.rb +41 -0
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +11 -0
- data/rbi/metronome_sdk/internal/util.rbi +21 -1
- data/rbi/metronome_sdk/models/commit_rate.rbi +43 -2
- data/rbi/metronome_sdk/models/contract.rbi +0 -11
- data/rbi/metronome_sdk/models/contract_v2.rbi +46 -0
- data/rbi/metronome_sdk/models/overwrite_rate.rbi +37 -0
- data/rbi/metronome_sdk/models/payment_gate_config.rbi +0 -5
- data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +0 -5
- data/rbi/metronome_sdk/models/rate.rbi +35 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +46 -5
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +46 -16
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +46 -0
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +46 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/package_archive_params.rbi +48 -0
- data/rbi/metronome_sdk/models/v1/package_archive_response.rbi +31 -0
- data/rbi/metronome_sdk/models/v1/package_create_params.rbi +6362 -0
- data/rbi/metronome_sdk/models/v1/package_create_response.rbi +31 -0
- data/rbi/metronome_sdk/models/v1/package_list_contracts_on_package_params.rbi +105 -0
- data/rbi/metronome_sdk/models/v1/package_list_contracts_on_package_response.rbi +70 -0
- data/rbi/metronome_sdk/models/v1/package_list_params.rbi +123 -0
- data/rbi/metronome_sdk/models/v1/package_list_response.rbi +5796 -0
- data/rbi/metronome_sdk/models/v1/package_retrieve_params.rbi +43 -0
- data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +5864 -0
- data/rbi/metronome_sdk/models/v1/usage_list_with_groups_params.rbi +52 -0
- data/rbi/metronome_sdk/models/v1/usage_list_with_groups_response.rbi +24 -3
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +46 -5
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +46 -0
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +5 -0
- data/rbi/metronome_sdk/resources/v1/audit_logs.rbi +2 -0
- data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +3 -0
- data/rbi/metronome_sdk/resources/v1/contracts/named_schedules.rbi +2 -0
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +1 -0
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/named_schedules.rbi +2 -0
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rbi +1 -0
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +5 -0
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +5 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +4 -3
- data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +3 -0
- data/rbi/metronome_sdk/resources/v1/custom_fields.rbi +3 -0
- data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +5 -0
- data/rbi/metronome_sdk/resources/v1/customers/billing_config.rbi +4 -0
- data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +1 -0
- data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +1 -0
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +4 -0
- data/rbi/metronome_sdk/resources/v1/customers/named_schedules.rbi +2 -0
- data/rbi/metronome_sdk/resources/v1/customers/plans.rbi +4 -0
- data/rbi/metronome_sdk/resources/v1/customers.rbi +21 -0
- data/rbi/metronome_sdk/resources/v1/dashboards.rbi +4 -0
- data/rbi/metronome_sdk/resources/v1/invoices.rbi +4 -0
- data/rbi/metronome_sdk/resources/v1/packages.rbi +268 -0
- data/rbi/metronome_sdk/resources/v1/plans.rbi +4 -0
- data/rbi/metronome_sdk/resources/v1/pricing_units.rbi +2 -0
- data/rbi/metronome_sdk/resources/v1/services.rbi +2 -0
- data/rbi/metronome_sdk/resources/v1/settings/billing_providers.rbi +2 -0
- data/rbi/metronome_sdk/resources/v1/settings.rbi +4 -0
- data/rbi/metronome_sdk/resources/v1/usage.rbi +35 -8
- data/rbi/metronome_sdk/resources/v1.rbi +40 -0
- data/sig/metronome_sdk/internal/util.rbs +10 -0
- data/sig/metronome_sdk/models/commit_rate.rbs +19 -0
- data/sig/metronome_sdk/models/contract.rbs +0 -7
- data/sig/metronome_sdk/models/contract_v2.rbs +19 -0
- data/sig/metronome_sdk/models/overwrite_rate.rbs +19 -0
- data/sig/metronome_sdk/models/payment_gate_config.rbs +1 -2
- data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +1 -2
- data/sig/metronome_sdk/models/rate.rbs +19 -0
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +20 -2
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +20 -9
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +19 -0
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +19 -0
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +7 -0
- data/sig/metronome_sdk/models/v1/package_archive_params.rbs +26 -0
- data/sig/metronome_sdk/models/v1/package_archive_response.rbs +15 -0
- data/sig/metronome_sdk/models/v1/package_create_params.rbs +2532 -0
- data/sig/metronome_sdk/models/v1/package_create_response.rbs +15 -0
- data/sig/metronome_sdk/models/v1/package_list_contracts_on_package_params.rbs +63 -0
- data/sig/metronome_sdk/models/v1/package_list_contracts_on_package_response.rbs +46 -0
- data/sig/metronome_sdk/models/v1/package_list_params.rbs +58 -0
- data/sig/metronome_sdk/models/v1/package_list_response.rbs +2441 -0
- data/sig/metronome_sdk/models/v1/package_retrieve_params.rbs +26 -0
- data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +2467 -0
- data/sig/metronome_sdk/models/v1/usage_list_with_groups_params.rbs +16 -0
- data/sig/metronome_sdk/models/v1/usage_list_with_groups_response.rbs +10 -3
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +20 -2
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +19 -0
- data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +0 -1
- data/sig/metronome_sdk/resources/v1/packages.rbs +63 -0
- data/sig/metronome_sdk/resources/v1/usage.rbs +2 -0
- data/sig/metronome_sdk/resources/v1.rbs +2 -0
- metadata +35 -2
|
@@ -0,0 +1,2719 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see MetronomeSDK::Resources::V1::Packages#create
|
|
7
|
+
class PackageCreateParams < MetronomeSDK::Internal::Type::BaseModel
|
|
8
|
+
extend MetronomeSDK::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include MetronomeSDK::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute name
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :name, String
|
|
15
|
+
|
|
16
|
+
# @!attribute aliases
|
|
17
|
+
# Reference this alias when creating a contract. If the same alias is assigned to
|
|
18
|
+
# multiple packages, it will reference the package to which it was most recently
|
|
19
|
+
# assigned. It is not exposed to end customers.
|
|
20
|
+
#
|
|
21
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::Alias>, nil]
|
|
22
|
+
optional :aliases,
|
|
23
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::Alias] }
|
|
24
|
+
|
|
25
|
+
# @!attribute billing_anchor_date
|
|
26
|
+
#
|
|
27
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingAnchorDate, nil]
|
|
28
|
+
optional :billing_anchor_date, enum: -> { MetronomeSDK::V1::PackageCreateParams::BillingAnchorDate }
|
|
29
|
+
|
|
30
|
+
# @!attribute billing_provider
|
|
31
|
+
#
|
|
32
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingProvider, nil]
|
|
33
|
+
optional :billing_provider, enum: -> { MetronomeSDK::V1::PackageCreateParams::BillingProvider }
|
|
34
|
+
|
|
35
|
+
# @!attribute commits
|
|
36
|
+
#
|
|
37
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::Commit>, nil]
|
|
38
|
+
optional :commits,
|
|
39
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::Commit] }
|
|
40
|
+
|
|
41
|
+
# @!attribute contract_name
|
|
42
|
+
#
|
|
43
|
+
# @return [String, nil]
|
|
44
|
+
optional :contract_name, String
|
|
45
|
+
|
|
46
|
+
# @!attribute credits
|
|
47
|
+
#
|
|
48
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::Credit>, nil]
|
|
49
|
+
optional :credits,
|
|
50
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::Credit] }
|
|
51
|
+
|
|
52
|
+
# @!attribute delivery_method
|
|
53
|
+
#
|
|
54
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::DeliveryMethod, nil]
|
|
55
|
+
optional :delivery_method, enum: -> { MetronomeSDK::V1::PackageCreateParams::DeliveryMethod }
|
|
56
|
+
|
|
57
|
+
# @!attribute duration
|
|
58
|
+
#
|
|
59
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Duration, nil]
|
|
60
|
+
optional :duration, -> { MetronomeSDK::V1::PackageCreateParams::Duration }
|
|
61
|
+
|
|
62
|
+
# @!attribute multiplier_override_prioritization
|
|
63
|
+
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
64
|
+
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
65
|
+
# each multiplier; the one with the lowest priority value will be prioritized
|
|
66
|
+
# first. If tiered overrides are used, prioritization must be explicit.
|
|
67
|
+
#
|
|
68
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::MultiplierOverridePrioritization, nil]
|
|
69
|
+
optional :multiplier_override_prioritization,
|
|
70
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::MultiplierOverridePrioritization }
|
|
71
|
+
|
|
72
|
+
# @!attribute net_payment_terms_days
|
|
73
|
+
#
|
|
74
|
+
# @return [Float, nil]
|
|
75
|
+
optional :net_payment_terms_days, Float
|
|
76
|
+
|
|
77
|
+
# @!attribute overrides
|
|
78
|
+
#
|
|
79
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::Override>, nil]
|
|
80
|
+
optional :overrides,
|
|
81
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::Override] }
|
|
82
|
+
|
|
83
|
+
# @!attribute prepaid_balance_threshold_configuration
|
|
84
|
+
#
|
|
85
|
+
# @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration, nil]
|
|
86
|
+
optional :prepaid_balance_threshold_configuration,
|
|
87
|
+
-> { MetronomeSDK::PrepaidBalanceThresholdConfiguration }
|
|
88
|
+
|
|
89
|
+
# @!attribute rate_card_alias
|
|
90
|
+
# Selects the rate card linked to the specified alias as of the contract's start
|
|
91
|
+
# date.
|
|
92
|
+
#
|
|
93
|
+
# @return [String, nil]
|
|
94
|
+
optional :rate_card_alias, String
|
|
95
|
+
|
|
96
|
+
# @!attribute rate_card_id
|
|
97
|
+
#
|
|
98
|
+
# @return [String, nil]
|
|
99
|
+
optional :rate_card_id, String
|
|
100
|
+
|
|
101
|
+
# @!attribute recurring_commits
|
|
102
|
+
#
|
|
103
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit>, nil]
|
|
104
|
+
optional :recurring_commits,
|
|
105
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::RecurringCommit] }
|
|
106
|
+
|
|
107
|
+
# @!attribute recurring_credits
|
|
108
|
+
#
|
|
109
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit>, nil]
|
|
110
|
+
optional :recurring_credits,
|
|
111
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::RecurringCredit] }
|
|
112
|
+
|
|
113
|
+
# @!attribute scheduled_charges
|
|
114
|
+
#
|
|
115
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge>, nil]
|
|
116
|
+
optional :scheduled_charges,
|
|
117
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::ScheduledCharge] }
|
|
118
|
+
|
|
119
|
+
# @!attribute scheduled_charges_on_usage_invoices
|
|
120
|
+
# Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
121
|
+
# usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
122
|
+
# `ending_before` date for consolidation to occur. This field cannot be modified
|
|
123
|
+
# after a Contract has been created. If this field is omitted, charges will appear
|
|
124
|
+
# on a separate invoice from usage charges.
|
|
125
|
+
#
|
|
126
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::ScheduledChargesOnUsageInvoices, nil]
|
|
127
|
+
optional :scheduled_charges_on_usage_invoices,
|
|
128
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::ScheduledChargesOnUsageInvoices }
|
|
129
|
+
|
|
130
|
+
# @!attribute spend_threshold_configuration
|
|
131
|
+
#
|
|
132
|
+
# @return [MetronomeSDK::Models::SpendThresholdConfiguration, nil]
|
|
133
|
+
optional :spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfiguration }
|
|
134
|
+
|
|
135
|
+
# @!attribute subscriptions
|
|
136
|
+
#
|
|
137
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::Subscription>, nil]
|
|
138
|
+
optional :subscriptions,
|
|
139
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::Subscription] }
|
|
140
|
+
|
|
141
|
+
# @!attribute uniqueness_key
|
|
142
|
+
# Prevents the creation of duplicates. If a request to create a record is made
|
|
143
|
+
# with a previously used uniqueness key, a new record will not be created and the
|
|
144
|
+
# request will fail with a 409 error.
|
|
145
|
+
#
|
|
146
|
+
# @return [String, nil]
|
|
147
|
+
optional :uniqueness_key, String
|
|
148
|
+
|
|
149
|
+
# @!attribute usage_statement_schedule
|
|
150
|
+
#
|
|
151
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule, nil]
|
|
152
|
+
optional :usage_statement_schedule, -> { MetronomeSDK::V1::PackageCreateParams::UsageStatementSchedule }
|
|
153
|
+
|
|
154
|
+
# @!method initialize(name:, aliases: nil, billing_anchor_date: 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, subscriptions: nil, uniqueness_key: nil, usage_statement_schedule: nil, request_options: {})
|
|
155
|
+
# Some parameter documentations has been truncated, see
|
|
156
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams} for more details.
|
|
157
|
+
#
|
|
158
|
+
# @param name [String]
|
|
159
|
+
#
|
|
160
|
+
# @param aliases [Array<MetronomeSDK::Models::V1::PackageCreateParams::Alias>] Reference this alias when creating a contract. If the same alias is assigned to
|
|
161
|
+
#
|
|
162
|
+
# @param billing_anchor_date [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingAnchorDate]
|
|
163
|
+
#
|
|
164
|
+
# @param billing_provider [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingProvider]
|
|
165
|
+
#
|
|
166
|
+
# @param commits [Array<MetronomeSDK::Models::V1::PackageCreateParams::Commit>]
|
|
167
|
+
#
|
|
168
|
+
# @param contract_name [String]
|
|
169
|
+
#
|
|
170
|
+
# @param credits [Array<MetronomeSDK::Models::V1::PackageCreateParams::Credit>]
|
|
171
|
+
#
|
|
172
|
+
# @param delivery_method [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::DeliveryMethod]
|
|
173
|
+
#
|
|
174
|
+
# @param duration [MetronomeSDK::Models::V1::PackageCreateParams::Duration]
|
|
175
|
+
#
|
|
176
|
+
# @param multiplier_override_prioritization [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::MultiplierOverridePrioritization] Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list price
|
|
177
|
+
#
|
|
178
|
+
# @param net_payment_terms_days [Float]
|
|
179
|
+
#
|
|
180
|
+
# @param overrides [Array<MetronomeSDK::Models::V1::PackageCreateParams::Override>]
|
|
181
|
+
#
|
|
182
|
+
# @param prepaid_balance_threshold_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration]
|
|
183
|
+
#
|
|
184
|
+
# @param rate_card_alias [String] Selects the rate card linked to the specified alias as of the contract's start d
|
|
185
|
+
#
|
|
186
|
+
# @param rate_card_id [String]
|
|
187
|
+
#
|
|
188
|
+
# @param recurring_commits [Array<MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit>]
|
|
189
|
+
#
|
|
190
|
+
# @param recurring_credits [Array<MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit>]
|
|
191
|
+
#
|
|
192
|
+
# @param scheduled_charges [Array<MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge>]
|
|
193
|
+
#
|
|
194
|
+
# @param scheduled_charges_on_usage_invoices [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::ScheduledChargesOnUsageInvoices] Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
195
|
+
#
|
|
196
|
+
# @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfiguration]
|
|
197
|
+
#
|
|
198
|
+
# @param subscriptions [Array<MetronomeSDK::Models::V1::PackageCreateParams::Subscription>]
|
|
199
|
+
#
|
|
200
|
+
# @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
|
|
201
|
+
#
|
|
202
|
+
# @param usage_statement_schedule [MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule]
|
|
203
|
+
#
|
|
204
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
205
|
+
|
|
206
|
+
class Alias < MetronomeSDK::Internal::Type::BaseModel
|
|
207
|
+
# @!attribute name
|
|
208
|
+
#
|
|
209
|
+
# @return [String]
|
|
210
|
+
required :name, String
|
|
211
|
+
|
|
212
|
+
# @!attribute ending_before
|
|
213
|
+
#
|
|
214
|
+
# @return [Time, nil]
|
|
215
|
+
optional :ending_before, Time
|
|
216
|
+
|
|
217
|
+
# @!attribute starting_at
|
|
218
|
+
#
|
|
219
|
+
# @return [Time, nil]
|
|
220
|
+
optional :starting_at, Time
|
|
221
|
+
|
|
222
|
+
# @!method initialize(name:, ending_before: nil, starting_at: nil)
|
|
223
|
+
# @param name [String]
|
|
224
|
+
# @param ending_before [Time]
|
|
225
|
+
# @param starting_at [Time]
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
module BillingAnchorDate
|
|
229
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
230
|
+
|
|
231
|
+
CONTRACT_START_DATE = :contract_start_date
|
|
232
|
+
FIRST_BILLING_PERIOD = :first_billing_period
|
|
233
|
+
|
|
234
|
+
# @!method self.values
|
|
235
|
+
# @return [Array<Symbol>]
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
module BillingProvider
|
|
239
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
240
|
+
|
|
241
|
+
AWS_MARKETPLACE = :aws_marketplace
|
|
242
|
+
AZURE_MARKETPLACE = :azure_marketplace
|
|
243
|
+
GCP_MARKETPLACE = :gcp_marketplace
|
|
244
|
+
STRIPE = :stripe
|
|
245
|
+
NETSUITE = :netsuite
|
|
246
|
+
|
|
247
|
+
# @!method self.values
|
|
248
|
+
# @return [Array<Symbol>]
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
class Commit < MetronomeSDK::Internal::Type::BaseModel
|
|
252
|
+
# @!attribute access_schedule
|
|
253
|
+
# Required: Schedule for distributing the commit to the customer. For "POSTPAID"
|
|
254
|
+
# commits only one schedule item is allowed and amount must match invoice_schedule
|
|
255
|
+
# total.
|
|
256
|
+
#
|
|
257
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule]
|
|
258
|
+
required :access_schedule, -> { MetronomeSDK::V1::PackageCreateParams::Commit::AccessSchedule }
|
|
259
|
+
|
|
260
|
+
# @!attribute product_id
|
|
261
|
+
#
|
|
262
|
+
# @return [String]
|
|
263
|
+
required :product_id, String
|
|
264
|
+
|
|
265
|
+
# @!attribute type
|
|
266
|
+
#
|
|
267
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::Type]
|
|
268
|
+
required :type, enum: -> { MetronomeSDK::V1::PackageCreateParams::Commit::Type }
|
|
269
|
+
|
|
270
|
+
# @!attribute applicable_product_ids
|
|
271
|
+
# Which products the commit applies to. If applicable_product_ids,
|
|
272
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
|
273
|
+
# all products.
|
|
274
|
+
#
|
|
275
|
+
# @return [Array<String>, nil]
|
|
276
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
277
|
+
|
|
278
|
+
# @!attribute applicable_product_tags
|
|
279
|
+
# Which tags the commit applies to. If applicable_product_ids,
|
|
280
|
+
# applicable_product_tags or specifiers are not provided, the commit applies to
|
|
281
|
+
# all products.
|
|
282
|
+
#
|
|
283
|
+
# @return [Array<String>, nil]
|
|
284
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
285
|
+
|
|
286
|
+
# @!attribute custom_fields
|
|
287
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
288
|
+
#
|
|
289
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
290
|
+
optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
|
|
291
|
+
|
|
292
|
+
# @!attribute description
|
|
293
|
+
# Used only in UI/API. It is not exposed to end customers.
|
|
294
|
+
#
|
|
295
|
+
# @return [String, nil]
|
|
296
|
+
optional :description, String
|
|
297
|
+
|
|
298
|
+
# @!attribute invoice_schedule
|
|
299
|
+
# Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
300
|
+
# time and only one schedule item is allowed; the total must match access_schedule
|
|
301
|
+
# amount. Optional for "PREPAID" commits: if not provided, this will be a
|
|
302
|
+
# "complimentary" commit with no invoice.
|
|
303
|
+
#
|
|
304
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule, nil]
|
|
305
|
+
optional :invoice_schedule, -> { MetronomeSDK::V1::PackageCreateParams::Commit::InvoiceSchedule }
|
|
306
|
+
|
|
307
|
+
# @!attribute name
|
|
308
|
+
# displayed on invoices
|
|
309
|
+
#
|
|
310
|
+
# @return [String, nil]
|
|
311
|
+
optional :name, String
|
|
312
|
+
|
|
313
|
+
# @!attribute priority
|
|
314
|
+
# If multiple commits are applicable, the one with the lower priority will apply
|
|
315
|
+
# first.
|
|
316
|
+
#
|
|
317
|
+
# @return [Float, nil]
|
|
318
|
+
optional :priority, Float
|
|
319
|
+
|
|
320
|
+
# @!attribute rate_type
|
|
321
|
+
#
|
|
322
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::RateType, nil]
|
|
323
|
+
optional :rate_type, enum: -> { MetronomeSDK::V1::PackageCreateParams::Commit::RateType }
|
|
324
|
+
|
|
325
|
+
# @!attribute rollover_fraction
|
|
326
|
+
# Fraction of unused segments that will be rolled over. Must be between 0 and 1.
|
|
327
|
+
#
|
|
328
|
+
# @return [Float, nil]
|
|
329
|
+
optional :rollover_fraction, Float
|
|
330
|
+
|
|
331
|
+
# @!attribute specifiers
|
|
332
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
|
333
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
334
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
335
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
336
|
+
#
|
|
337
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
|
|
338
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
|
|
339
|
+
|
|
340
|
+
# @!attribute temporary_id
|
|
341
|
+
# A temporary ID for the commit that can be used to reference the commit for
|
|
342
|
+
# commit specific overrides.
|
|
343
|
+
#
|
|
344
|
+
# @return [String, nil]
|
|
345
|
+
optional :temporary_id, String
|
|
346
|
+
|
|
347
|
+
# @!method initialize(access_schedule:, product_id:, type:, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, invoice_schedule: nil, name: nil, priority: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil, temporary_id: nil)
|
|
348
|
+
# Some parameter documentations has been truncated, see
|
|
349
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Commit} for more details.
|
|
350
|
+
#
|
|
351
|
+
# @param access_schedule [MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule] Required: Schedule for distributing the commit to the customer. For "POSTPAID" c
|
|
352
|
+
#
|
|
353
|
+
# @param product_id [String]
|
|
354
|
+
#
|
|
355
|
+
# @param type [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::Type]
|
|
356
|
+
#
|
|
357
|
+
# @param applicable_product_ids [Array<String>] Which products the commit applies to. If applicable_product_ids, applicable_prod
|
|
358
|
+
#
|
|
359
|
+
# @param applicable_product_tags [Array<String>] Which tags the commit applies to. If applicable*product_ids, applicable_product*
|
|
360
|
+
#
|
|
361
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
362
|
+
#
|
|
363
|
+
# @param description [String] Used only in UI/API. It is not exposed to end customers.
|
|
364
|
+
#
|
|
365
|
+
# @param invoice_schedule [MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule] Required for "POSTPAID" commits: the true up invoice will be generated at this t
|
|
366
|
+
#
|
|
367
|
+
# @param name [String] displayed on invoices
|
|
368
|
+
#
|
|
369
|
+
# @param priority [Float] If multiple commits are applicable, the one with the lower priority will apply f
|
|
370
|
+
#
|
|
371
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::RateType]
|
|
372
|
+
#
|
|
373
|
+
# @param rollover_fraction [Float] Fraction of unused segments that will be rolled over. Must be between 0 and 1.
|
|
374
|
+
#
|
|
375
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
|
|
376
|
+
#
|
|
377
|
+
# @param temporary_id [String] A temporary ID for the commit that can be used to reference the commit for commi
|
|
378
|
+
|
|
379
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Commit#access_schedule
|
|
380
|
+
class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
|
|
381
|
+
# @!attribute schedule_items
|
|
382
|
+
#
|
|
383
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem>]
|
|
384
|
+
required :schedule_items,
|
|
385
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem] }
|
|
386
|
+
|
|
387
|
+
# @!attribute credit_type_id
|
|
388
|
+
# Defaults to USD (cents) if not passed
|
|
389
|
+
#
|
|
390
|
+
# @return [String, nil]
|
|
391
|
+
optional :credit_type_id, String
|
|
392
|
+
|
|
393
|
+
# @!method initialize(schedule_items:, credit_type_id: nil)
|
|
394
|
+
# Required: Schedule for distributing the commit to the customer. For "POSTPAID"
|
|
395
|
+
# commits only one schedule item is allowed and amount must match invoice_schedule
|
|
396
|
+
# total.
|
|
397
|
+
#
|
|
398
|
+
# @param schedule_items [Array<MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem>]
|
|
399
|
+
#
|
|
400
|
+
# @param credit_type_id [String] Defaults to USD (cents) if not passed
|
|
401
|
+
|
|
402
|
+
class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
|
|
403
|
+
# @!attribute amount
|
|
404
|
+
#
|
|
405
|
+
# @return [Float]
|
|
406
|
+
required :amount, Float
|
|
407
|
+
|
|
408
|
+
# @!attribute duration
|
|
409
|
+
# Offset relative to the start of this segment indicating when it should end.
|
|
410
|
+
#
|
|
411
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::Duration]
|
|
412
|
+
required :duration,
|
|
413
|
+
-> { MetronomeSDK::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::Duration }
|
|
414
|
+
|
|
415
|
+
# @!attribute starting_at_offset
|
|
416
|
+
# Date relative to the contract start date indicating the start of this schedule
|
|
417
|
+
# segment.
|
|
418
|
+
#
|
|
419
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::StartingAtOffset]
|
|
420
|
+
required :starting_at_offset,
|
|
421
|
+
-> { MetronomeSDK::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::StartingAtOffset }
|
|
422
|
+
|
|
423
|
+
# @!method initialize(amount:, duration:, starting_at_offset:)
|
|
424
|
+
# Some parameter documentations has been truncated, see
|
|
425
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem}
|
|
426
|
+
# for more details.
|
|
427
|
+
#
|
|
428
|
+
# @param amount [Float]
|
|
429
|
+
#
|
|
430
|
+
# @param duration [MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::Duration] Offset relative to the start of this segment indicating when it should end.
|
|
431
|
+
#
|
|
432
|
+
# @param starting_at_offset [MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::StartingAtOffset] Date relative to the contract start date indicating the start of this schedule s
|
|
433
|
+
|
|
434
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem#duration
|
|
435
|
+
class Duration < MetronomeSDK::Internal::Type::BaseModel
|
|
436
|
+
# @!attribute unit
|
|
437
|
+
#
|
|
438
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::Duration::Unit]
|
|
439
|
+
required :unit,
|
|
440
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::Duration::Unit }
|
|
441
|
+
|
|
442
|
+
# @!attribute value
|
|
443
|
+
#
|
|
444
|
+
# @return [Integer]
|
|
445
|
+
required :value, Integer
|
|
446
|
+
|
|
447
|
+
# @!method initialize(unit:, value:)
|
|
448
|
+
# Offset relative to the start of this segment indicating when it should end.
|
|
449
|
+
#
|
|
450
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::Duration::Unit]
|
|
451
|
+
# @param value [Integer]
|
|
452
|
+
|
|
453
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::Duration#unit
|
|
454
|
+
module Unit
|
|
455
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
456
|
+
|
|
457
|
+
DAYS = :DAYS
|
|
458
|
+
WEEKS = :WEEKS
|
|
459
|
+
MONTHS = :MONTHS
|
|
460
|
+
YEARS = :YEARS
|
|
461
|
+
|
|
462
|
+
# @!method self.values
|
|
463
|
+
# @return [Array<Symbol>]
|
|
464
|
+
end
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem#starting_at_offset
|
|
468
|
+
class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
|
|
469
|
+
# @!attribute unit
|
|
470
|
+
#
|
|
471
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit]
|
|
472
|
+
required :unit,
|
|
473
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit }
|
|
474
|
+
|
|
475
|
+
# @!attribute value
|
|
476
|
+
#
|
|
477
|
+
# @return [Integer]
|
|
478
|
+
required :value, Integer
|
|
479
|
+
|
|
480
|
+
# @!method initialize(unit:, value:)
|
|
481
|
+
# Date relative to the contract start date indicating the start of this schedule
|
|
482
|
+
# segment.
|
|
483
|
+
#
|
|
484
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit]
|
|
485
|
+
# @param value [Integer]
|
|
486
|
+
|
|
487
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Commit::AccessSchedule::ScheduleItem::StartingAtOffset#unit
|
|
488
|
+
module Unit
|
|
489
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
490
|
+
|
|
491
|
+
DAYS = :DAYS
|
|
492
|
+
WEEKS = :WEEKS
|
|
493
|
+
MONTHS = :MONTHS
|
|
494
|
+
YEARS = :YEARS
|
|
495
|
+
|
|
496
|
+
# @!method self.values
|
|
497
|
+
# @return [Array<Symbol>]
|
|
498
|
+
end
|
|
499
|
+
end
|
|
500
|
+
end
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Commit#type
|
|
504
|
+
module Type
|
|
505
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
506
|
+
|
|
507
|
+
PREPAID = :PREPAID
|
|
508
|
+
POSTPAID = :POSTPAID
|
|
509
|
+
|
|
510
|
+
# @!method self.values
|
|
511
|
+
# @return [Array<Symbol>]
|
|
512
|
+
end
|
|
513
|
+
|
|
514
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Commit#invoice_schedule
|
|
515
|
+
class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
|
|
516
|
+
# @!attribute schedule_items
|
|
517
|
+
# Either provide amount or provide both unit_price and quantity.
|
|
518
|
+
#
|
|
519
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem>]
|
|
520
|
+
required :schedule_items,
|
|
521
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem] }
|
|
522
|
+
|
|
523
|
+
# @!attribute credit_type_id
|
|
524
|
+
# Defaults to USD (cents) if not passed.
|
|
525
|
+
#
|
|
526
|
+
# @return [String, nil]
|
|
527
|
+
optional :credit_type_id, String
|
|
528
|
+
|
|
529
|
+
# @!attribute do_not_invoice
|
|
530
|
+
# If true, this schedule will not generate an invoice.
|
|
531
|
+
#
|
|
532
|
+
# @return [Boolean, nil]
|
|
533
|
+
optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean
|
|
534
|
+
|
|
535
|
+
# @!method initialize(schedule_items:, credit_type_id: nil, do_not_invoice: nil)
|
|
536
|
+
# Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
537
|
+
# time and only one schedule item is allowed; the total must match access_schedule
|
|
538
|
+
# amount. Optional for "PREPAID" commits: if not provided, this will be a
|
|
539
|
+
# "complimentary" commit with no invoice.
|
|
540
|
+
#
|
|
541
|
+
# @param schedule_items [Array<MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem>] Either provide amount or provide both unit_price and quantity.
|
|
542
|
+
#
|
|
543
|
+
# @param credit_type_id [String] Defaults to USD (cents) if not passed.
|
|
544
|
+
#
|
|
545
|
+
# @param do_not_invoice [Boolean] If true, this schedule will not generate an invoice.
|
|
546
|
+
|
|
547
|
+
class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
|
|
548
|
+
# @!attribute date_offset
|
|
549
|
+
# Date relative to the contract start date.
|
|
550
|
+
#
|
|
551
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem::DateOffset]
|
|
552
|
+
required :date_offset,
|
|
553
|
+
-> { MetronomeSDK::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem::DateOffset }
|
|
554
|
+
|
|
555
|
+
# @!attribute quantity
|
|
556
|
+
# Quantity for the charge. Will be multiplied by unit_price to determine the
|
|
557
|
+
# amount.
|
|
558
|
+
#
|
|
559
|
+
# @return [Float]
|
|
560
|
+
required :quantity, Float
|
|
561
|
+
|
|
562
|
+
# @!attribute unit_price
|
|
563
|
+
# Unit price for the charge. Will be multiplied by quantity to determine the
|
|
564
|
+
# amount.
|
|
565
|
+
#
|
|
566
|
+
# @return [Float]
|
|
567
|
+
required :unit_price, Float
|
|
568
|
+
|
|
569
|
+
# @!method initialize(date_offset:, quantity:, unit_price:)
|
|
570
|
+
# Some parameter documentations has been truncated, see
|
|
571
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem}
|
|
572
|
+
# for more details.
|
|
573
|
+
#
|
|
574
|
+
# @param date_offset [MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem::DateOffset] Date relative to the contract start date.
|
|
575
|
+
#
|
|
576
|
+
# @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
|
|
577
|
+
#
|
|
578
|
+
# @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun
|
|
579
|
+
|
|
580
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem#date_offset
|
|
581
|
+
class DateOffset < MetronomeSDK::Internal::Type::BaseModel
|
|
582
|
+
# @!attribute unit
|
|
583
|
+
#
|
|
584
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem::DateOffset::Unit]
|
|
585
|
+
required :unit,
|
|
586
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem::DateOffset::Unit }
|
|
587
|
+
|
|
588
|
+
# @!attribute value
|
|
589
|
+
#
|
|
590
|
+
# @return [Integer]
|
|
591
|
+
required :value, Integer
|
|
592
|
+
|
|
593
|
+
# @!method initialize(unit:, value:)
|
|
594
|
+
# Date relative to the contract start date.
|
|
595
|
+
#
|
|
596
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem::DateOffset::Unit]
|
|
597
|
+
# @param value [Integer]
|
|
598
|
+
|
|
599
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Commit::InvoiceSchedule::ScheduleItem::DateOffset#unit
|
|
600
|
+
module Unit
|
|
601
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
602
|
+
|
|
603
|
+
DAYS = :DAYS
|
|
604
|
+
WEEKS = :WEEKS
|
|
605
|
+
MONTHS = :MONTHS
|
|
606
|
+
YEARS = :YEARS
|
|
607
|
+
|
|
608
|
+
# @!method self.values
|
|
609
|
+
# @return [Array<Symbol>]
|
|
610
|
+
end
|
|
611
|
+
end
|
|
612
|
+
end
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Commit#rate_type
|
|
616
|
+
module RateType
|
|
617
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
618
|
+
|
|
619
|
+
COMMIT_RATE = :COMMIT_RATE
|
|
620
|
+
LIST_RATE = :LIST_RATE
|
|
621
|
+
|
|
622
|
+
# @!method self.values
|
|
623
|
+
# @return [Array<Symbol>]
|
|
624
|
+
end
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
class Credit < MetronomeSDK::Internal::Type::BaseModel
|
|
628
|
+
# @!attribute access_schedule
|
|
629
|
+
# Schedule for distributing the credit to the customer.
|
|
630
|
+
#
|
|
631
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule]
|
|
632
|
+
required :access_schedule, -> { MetronomeSDK::V1::PackageCreateParams::Credit::AccessSchedule }
|
|
633
|
+
|
|
634
|
+
# @!attribute product_id
|
|
635
|
+
#
|
|
636
|
+
# @return [String]
|
|
637
|
+
required :product_id, String
|
|
638
|
+
|
|
639
|
+
# @!attribute applicable_product_ids
|
|
640
|
+
# Which products the credit applies to. If both applicable_product_ids and
|
|
641
|
+
# applicable_product_tags are not provided, the credit applies to all products.
|
|
642
|
+
#
|
|
643
|
+
# @return [Array<String>, nil]
|
|
644
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
645
|
+
|
|
646
|
+
# @!attribute applicable_product_tags
|
|
647
|
+
# Which tags the credit applies to. If both applicable_product_ids and
|
|
648
|
+
# applicable_product_tags are not provided, the credit applies to all products.
|
|
649
|
+
#
|
|
650
|
+
# @return [Array<String>, nil]
|
|
651
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
652
|
+
|
|
653
|
+
# @!attribute custom_fields
|
|
654
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
655
|
+
#
|
|
656
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
657
|
+
optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
|
|
658
|
+
|
|
659
|
+
# @!attribute description
|
|
660
|
+
# Used only in UI/API. It is not exposed to end customers.
|
|
661
|
+
#
|
|
662
|
+
# @return [String, nil]
|
|
663
|
+
optional :description, String
|
|
664
|
+
|
|
665
|
+
# @!attribute name
|
|
666
|
+
# displayed on invoices
|
|
667
|
+
#
|
|
668
|
+
# @return [String, nil]
|
|
669
|
+
optional :name, String
|
|
670
|
+
|
|
671
|
+
# @!attribute priority
|
|
672
|
+
# If multiple credits are applicable, the one with the lower priority will apply
|
|
673
|
+
# first.
|
|
674
|
+
#
|
|
675
|
+
# @return [Float, nil]
|
|
676
|
+
optional :priority, Float
|
|
677
|
+
|
|
678
|
+
# @!attribute rate_type
|
|
679
|
+
#
|
|
680
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Credit::RateType, nil]
|
|
681
|
+
optional :rate_type, enum: -> { MetronomeSDK::V1::PackageCreateParams::Credit::RateType }
|
|
682
|
+
|
|
683
|
+
# @!attribute specifiers
|
|
684
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
|
685
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
686
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
687
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
688
|
+
#
|
|
689
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
|
|
690
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
|
|
691
|
+
|
|
692
|
+
# @!method initialize(access_schedule:, product_id:, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, name: nil, priority: nil, rate_type: nil, specifiers: nil)
|
|
693
|
+
# Some parameter documentations has been truncated, see
|
|
694
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Credit} for more details.
|
|
695
|
+
#
|
|
696
|
+
# @param access_schedule [MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule] Schedule for distributing the credit to the customer.
|
|
697
|
+
#
|
|
698
|
+
# @param product_id [String]
|
|
699
|
+
#
|
|
700
|
+
# @param applicable_product_ids [Array<String>] Which products the credit applies to. If both applicable_product_ids and applica
|
|
701
|
+
#
|
|
702
|
+
# @param applicable_product_tags [Array<String>] Which tags the credit applies to. If both applicable*product_ids and applicable*
|
|
703
|
+
#
|
|
704
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
705
|
+
#
|
|
706
|
+
# @param description [String] Used only in UI/API. It is not exposed to end customers.
|
|
707
|
+
#
|
|
708
|
+
# @param name [String] displayed on invoices
|
|
709
|
+
#
|
|
710
|
+
# @param priority [Float] If multiple credits are applicable, the one with the lower priority will apply f
|
|
711
|
+
#
|
|
712
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Credit::RateType]
|
|
713
|
+
#
|
|
714
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
|
|
715
|
+
|
|
716
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Credit#access_schedule
|
|
717
|
+
class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
|
|
718
|
+
# @!attribute schedule_items
|
|
719
|
+
#
|
|
720
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem>]
|
|
721
|
+
required :schedule_items,
|
|
722
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem] }
|
|
723
|
+
|
|
724
|
+
# @!attribute credit_type_id
|
|
725
|
+
# Defaults to USD (cents) if not passed
|
|
726
|
+
#
|
|
727
|
+
# @return [String, nil]
|
|
728
|
+
optional :credit_type_id, String
|
|
729
|
+
|
|
730
|
+
# @!method initialize(schedule_items:, credit_type_id: nil)
|
|
731
|
+
# Schedule for distributing the credit to the customer.
|
|
732
|
+
#
|
|
733
|
+
# @param schedule_items [Array<MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem>]
|
|
734
|
+
#
|
|
735
|
+
# @param credit_type_id [String] Defaults to USD (cents) if not passed
|
|
736
|
+
|
|
737
|
+
class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
|
|
738
|
+
# @!attribute amount
|
|
739
|
+
#
|
|
740
|
+
# @return [Float]
|
|
741
|
+
required :amount, Float
|
|
742
|
+
|
|
743
|
+
# @!attribute duration
|
|
744
|
+
# Offset relative to the start of this segment indicating when it should end.
|
|
745
|
+
#
|
|
746
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::Duration]
|
|
747
|
+
required :duration,
|
|
748
|
+
-> { MetronomeSDK::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::Duration }
|
|
749
|
+
|
|
750
|
+
# @!attribute starting_at_offset
|
|
751
|
+
# Date relative to the contract start date indicating the start of this schedule
|
|
752
|
+
# segment.
|
|
753
|
+
#
|
|
754
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::StartingAtOffset]
|
|
755
|
+
required :starting_at_offset,
|
|
756
|
+
-> { MetronomeSDK::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::StartingAtOffset }
|
|
757
|
+
|
|
758
|
+
# @!method initialize(amount:, duration:, starting_at_offset:)
|
|
759
|
+
# Some parameter documentations has been truncated, see
|
|
760
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem}
|
|
761
|
+
# for more details.
|
|
762
|
+
#
|
|
763
|
+
# @param amount [Float]
|
|
764
|
+
#
|
|
765
|
+
# @param duration [MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::Duration] Offset relative to the start of this segment indicating when it should end.
|
|
766
|
+
#
|
|
767
|
+
# @param starting_at_offset [MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::StartingAtOffset] Date relative to the contract start date indicating the start of this schedule s
|
|
768
|
+
|
|
769
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem#duration
|
|
770
|
+
class Duration < MetronomeSDK::Internal::Type::BaseModel
|
|
771
|
+
# @!attribute unit
|
|
772
|
+
#
|
|
773
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::Duration::Unit]
|
|
774
|
+
required :unit,
|
|
775
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::Duration::Unit }
|
|
776
|
+
|
|
777
|
+
# @!attribute value
|
|
778
|
+
#
|
|
779
|
+
# @return [Integer]
|
|
780
|
+
required :value, Integer
|
|
781
|
+
|
|
782
|
+
# @!method initialize(unit:, value:)
|
|
783
|
+
# Offset relative to the start of this segment indicating when it should end.
|
|
784
|
+
#
|
|
785
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::Duration::Unit]
|
|
786
|
+
# @param value [Integer]
|
|
787
|
+
|
|
788
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::Duration#unit
|
|
789
|
+
module Unit
|
|
790
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
791
|
+
|
|
792
|
+
DAYS = :DAYS
|
|
793
|
+
WEEKS = :WEEKS
|
|
794
|
+
MONTHS = :MONTHS
|
|
795
|
+
YEARS = :YEARS
|
|
796
|
+
|
|
797
|
+
# @!method self.values
|
|
798
|
+
# @return [Array<Symbol>]
|
|
799
|
+
end
|
|
800
|
+
end
|
|
801
|
+
|
|
802
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem#starting_at_offset
|
|
803
|
+
class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
|
|
804
|
+
# @!attribute unit
|
|
805
|
+
#
|
|
806
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit]
|
|
807
|
+
required :unit,
|
|
808
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit }
|
|
809
|
+
|
|
810
|
+
# @!attribute value
|
|
811
|
+
#
|
|
812
|
+
# @return [Integer]
|
|
813
|
+
required :value, Integer
|
|
814
|
+
|
|
815
|
+
# @!method initialize(unit:, value:)
|
|
816
|
+
# Date relative to the contract start date indicating the start of this schedule
|
|
817
|
+
# segment.
|
|
818
|
+
#
|
|
819
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit]
|
|
820
|
+
# @param value [Integer]
|
|
821
|
+
|
|
822
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Credit::AccessSchedule::ScheduleItem::StartingAtOffset#unit
|
|
823
|
+
module Unit
|
|
824
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
825
|
+
|
|
826
|
+
DAYS = :DAYS
|
|
827
|
+
WEEKS = :WEEKS
|
|
828
|
+
MONTHS = :MONTHS
|
|
829
|
+
YEARS = :YEARS
|
|
830
|
+
|
|
831
|
+
# @!method self.values
|
|
832
|
+
# @return [Array<Symbol>]
|
|
833
|
+
end
|
|
834
|
+
end
|
|
835
|
+
end
|
|
836
|
+
end
|
|
837
|
+
|
|
838
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Credit#rate_type
|
|
839
|
+
module RateType
|
|
840
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
841
|
+
|
|
842
|
+
COMMIT_RATE = :COMMIT_RATE
|
|
843
|
+
LIST_RATE = :LIST_RATE
|
|
844
|
+
|
|
845
|
+
# @!method self.values
|
|
846
|
+
# @return [Array<Symbol>]
|
|
847
|
+
end
|
|
848
|
+
end
|
|
849
|
+
|
|
850
|
+
module DeliveryMethod
|
|
851
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
852
|
+
|
|
853
|
+
DIRECT_TO_BILLING_PROVIDER = :direct_to_billing_provider
|
|
854
|
+
AWS_SQS = :aws_sqs
|
|
855
|
+
TACKLE = :tackle
|
|
856
|
+
AWS_SNS = :aws_sns
|
|
857
|
+
|
|
858
|
+
# @!method self.values
|
|
859
|
+
# @return [Array<Symbol>]
|
|
860
|
+
end
|
|
861
|
+
|
|
862
|
+
class Duration < MetronomeSDK::Internal::Type::BaseModel
|
|
863
|
+
# @!attribute unit
|
|
864
|
+
#
|
|
865
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Duration::Unit]
|
|
866
|
+
required :unit, enum: -> { MetronomeSDK::V1::PackageCreateParams::Duration::Unit }
|
|
867
|
+
|
|
868
|
+
# @!attribute value
|
|
869
|
+
#
|
|
870
|
+
# @return [Integer]
|
|
871
|
+
required :value, Integer
|
|
872
|
+
|
|
873
|
+
# @!method initialize(unit:, value:)
|
|
874
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Duration::Unit]
|
|
875
|
+
# @param value [Integer]
|
|
876
|
+
|
|
877
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Duration#unit
|
|
878
|
+
module Unit
|
|
879
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
880
|
+
|
|
881
|
+
DAYS = :DAYS
|
|
882
|
+
WEEKS = :WEEKS
|
|
883
|
+
MONTHS = :MONTHS
|
|
884
|
+
YEARS = :YEARS
|
|
885
|
+
|
|
886
|
+
# @!method self.values
|
|
887
|
+
# @return [Array<Symbol>]
|
|
888
|
+
end
|
|
889
|
+
end
|
|
890
|
+
|
|
891
|
+
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
892
|
+
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
893
|
+
# each multiplier; the one with the lowest priority value will be prioritized
|
|
894
|
+
# first. If tiered overrides are used, prioritization must be explicit.
|
|
895
|
+
module MultiplierOverridePrioritization
|
|
896
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
897
|
+
|
|
898
|
+
LOWEST_MULTIPLIER = :LOWEST_MULTIPLIER
|
|
899
|
+
EXPLICIT = :EXPLICIT
|
|
900
|
+
|
|
901
|
+
# @!method self.values
|
|
902
|
+
# @return [Array<Symbol>]
|
|
903
|
+
end
|
|
904
|
+
|
|
905
|
+
class Override < MetronomeSDK::Internal::Type::BaseModel
|
|
906
|
+
# @!attribute override_specifiers
|
|
907
|
+
# Specifies which products the override will apply to.
|
|
908
|
+
#
|
|
909
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::Override::OverrideSpecifier>]
|
|
910
|
+
required :override_specifiers,
|
|
911
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::Override::OverrideSpecifier] }
|
|
912
|
+
|
|
913
|
+
# @!attribute starting_at_offset
|
|
914
|
+
# Offset relative to contract start date indicating when the override will start
|
|
915
|
+
# applying (inclusive)
|
|
916
|
+
#
|
|
917
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Override::StartingAtOffset]
|
|
918
|
+
required :starting_at_offset, -> { MetronomeSDK::V1::PackageCreateParams::Override::StartingAtOffset }
|
|
919
|
+
|
|
920
|
+
# @!attribute duration
|
|
921
|
+
# Offset relative to override start indicating when the override will stop
|
|
922
|
+
# applying (exclusive)
|
|
923
|
+
#
|
|
924
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Override::Duration, nil]
|
|
925
|
+
optional :duration, -> { MetronomeSDK::V1::PackageCreateParams::Override::Duration }
|
|
926
|
+
|
|
927
|
+
# @!attribute entitled
|
|
928
|
+
#
|
|
929
|
+
# @return [Boolean, nil]
|
|
930
|
+
optional :entitled, MetronomeSDK::Internal::Type::Boolean
|
|
931
|
+
|
|
932
|
+
# @!attribute is_commit_specific
|
|
933
|
+
# Indicates whether the override should only apply to commits. Defaults to
|
|
934
|
+
# `false`. If `true`, you can specify relevant commits in `override_specifiers` by
|
|
935
|
+
# passing `commit_ids`. if you do not specify `commit_ids`, then the override will
|
|
936
|
+
# apply when consuming any prepaid or postpaid commit.
|
|
937
|
+
#
|
|
938
|
+
# @return [Boolean, nil]
|
|
939
|
+
optional :is_commit_specific, MetronomeSDK::Internal::Type::Boolean
|
|
940
|
+
|
|
941
|
+
# @!attribute multiplier
|
|
942
|
+
# Required for MULTIPLIER type. Must be >=0.
|
|
943
|
+
#
|
|
944
|
+
# @return [Float, nil]
|
|
945
|
+
optional :multiplier, Float
|
|
946
|
+
|
|
947
|
+
# @!attribute overwrite_rate
|
|
948
|
+
# Required for OVERWRITE type.
|
|
949
|
+
#
|
|
950
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Override::OverwriteRate, nil]
|
|
951
|
+
optional :overwrite_rate, -> { MetronomeSDK::V1::PackageCreateParams::Override::OverwriteRate }
|
|
952
|
+
|
|
953
|
+
# @!attribute priority
|
|
954
|
+
# Required for EXPLICIT multiplier prioritization scheme and all TIERED overrides.
|
|
955
|
+
# Under EXPLICIT prioritization, overwrites are prioritized first, and then tiered
|
|
956
|
+
# and multiplier overrides are prioritized by their priority value (lowest first).
|
|
957
|
+
# Must be > 0.
|
|
958
|
+
#
|
|
959
|
+
# @return [Float, nil]
|
|
960
|
+
optional :priority, Float
|
|
961
|
+
|
|
962
|
+
# @!attribute target
|
|
963
|
+
# Indicates whether the override applies to commit rates or list rates. Can only
|
|
964
|
+
# be used for overrides that have `is_commit_specific` set to `true`. Defaults to
|
|
965
|
+
# `"LIST_RATE"`.
|
|
966
|
+
#
|
|
967
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::Target, nil]
|
|
968
|
+
optional :target, enum: -> { MetronomeSDK::V1::PackageCreateParams::Override::Target }
|
|
969
|
+
|
|
970
|
+
# @!attribute tiers
|
|
971
|
+
# Required for TIERED type. Must have at least one tier.
|
|
972
|
+
#
|
|
973
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::Override::Tier>, nil]
|
|
974
|
+
optional :tiers,
|
|
975
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::Override::Tier] }
|
|
976
|
+
|
|
977
|
+
# @!attribute type
|
|
978
|
+
# Overwrites are prioritized over multipliers and tiered overrides.
|
|
979
|
+
#
|
|
980
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::Type, nil]
|
|
981
|
+
optional :type, enum: -> { MetronomeSDK::V1::PackageCreateParams::Override::Type }
|
|
982
|
+
|
|
983
|
+
# @!method initialize(override_specifiers:, starting_at_offset:, duration: nil, entitled: nil, is_commit_specific: nil, multiplier: nil, overwrite_rate: nil, priority: nil, target: nil, tiers: nil, type: nil)
|
|
984
|
+
# Some parameter documentations has been truncated, see
|
|
985
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Override} for more details.
|
|
986
|
+
#
|
|
987
|
+
# @param override_specifiers [Array<MetronomeSDK::Models::V1::PackageCreateParams::Override::OverrideSpecifier>] Specifies which products the override will apply to.
|
|
988
|
+
#
|
|
989
|
+
# @param starting_at_offset [MetronomeSDK::Models::V1::PackageCreateParams::Override::StartingAtOffset] Offset relative to contract start date indicating when the override will start a
|
|
990
|
+
#
|
|
991
|
+
# @param duration [MetronomeSDK::Models::V1::PackageCreateParams::Override::Duration] Offset relative to override start indicating when the override will stop applyin
|
|
992
|
+
#
|
|
993
|
+
# @param entitled [Boolean]
|
|
994
|
+
#
|
|
995
|
+
# @param is_commit_specific [Boolean] Indicates whether the override should only apply to commits. Defaults to `false`
|
|
996
|
+
#
|
|
997
|
+
# @param multiplier [Float] Required for MULTIPLIER type. Must be >=0.
|
|
998
|
+
#
|
|
999
|
+
# @param overwrite_rate [MetronomeSDK::Models::V1::PackageCreateParams::Override::OverwriteRate] Required for OVERWRITE type.
|
|
1000
|
+
#
|
|
1001
|
+
# @param priority [Float] Required for EXPLICIT multiplier prioritization scheme and all TIERED overrides.
|
|
1002
|
+
#
|
|
1003
|
+
# @param target [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::Target] Indicates whether the override applies to commit rates or list rates. Can only b
|
|
1004
|
+
#
|
|
1005
|
+
# @param tiers [Array<MetronomeSDK::Models::V1::PackageCreateParams::Override::Tier>] Required for TIERED type. Must have at least one tier.
|
|
1006
|
+
#
|
|
1007
|
+
# @param type [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::Type] Overwrites are prioritized over multipliers and tiered overrides.
|
|
1008
|
+
|
|
1009
|
+
class OverrideSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
1010
|
+
# @!attribute billing_frequency
|
|
1011
|
+
#
|
|
1012
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::OverrideSpecifier::BillingFrequency, nil]
|
|
1013
|
+
optional :billing_frequency,
|
|
1014
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::Override::OverrideSpecifier::BillingFrequency }
|
|
1015
|
+
|
|
1016
|
+
# @!attribute commit_ids
|
|
1017
|
+
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1018
|
+
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
1019
|
+
# `presentation_group_values`. If provided, the override will only apply to the
|
|
1020
|
+
# specified commits. If not provided, the override will apply to all commits.
|
|
1021
|
+
#
|
|
1022
|
+
# @return [Array<String>, nil]
|
|
1023
|
+
optional :commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
1024
|
+
|
|
1025
|
+
# @!attribute presentation_group_values
|
|
1026
|
+
# A map of group names to values. The override will only apply to line items with
|
|
1027
|
+
# the specified presentation group values.
|
|
1028
|
+
#
|
|
1029
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
1030
|
+
optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]
|
|
1031
|
+
|
|
1032
|
+
# @!attribute pricing_group_values
|
|
1033
|
+
# A map of pricing group names to values. The override will only apply to products
|
|
1034
|
+
# with the specified pricing group values.
|
|
1035
|
+
#
|
|
1036
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
1037
|
+
optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
|
|
1038
|
+
|
|
1039
|
+
# @!attribute product_id
|
|
1040
|
+
# If provided, the override will only apply to the product with the specified ID.
|
|
1041
|
+
#
|
|
1042
|
+
# @return [String, nil]
|
|
1043
|
+
optional :product_id, String
|
|
1044
|
+
|
|
1045
|
+
# @!attribute product_tags
|
|
1046
|
+
# If provided, the override will only apply to products with all the specified
|
|
1047
|
+
# tags.
|
|
1048
|
+
#
|
|
1049
|
+
# @return [Array<String>, nil]
|
|
1050
|
+
optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
1051
|
+
|
|
1052
|
+
# @!attribute recurring_commit_ids
|
|
1053
|
+
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1054
|
+
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
1055
|
+
# `presentation_group_values`. If provided, the override will only apply to
|
|
1056
|
+
# commits created by the specified recurring commit ids.
|
|
1057
|
+
#
|
|
1058
|
+
# @return [Array<String>, nil]
|
|
1059
|
+
optional :recurring_commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
1060
|
+
|
|
1061
|
+
# @!attribute recurring_credit_ids
|
|
1062
|
+
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1063
|
+
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
1064
|
+
# `presentation_group_values`. If provided, the override will only apply to
|
|
1065
|
+
# credits created by the specified recurring credit ids.
|
|
1066
|
+
#
|
|
1067
|
+
# @return [Array<String>, nil]
|
|
1068
|
+
optional :recurring_credit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
1069
|
+
|
|
1070
|
+
# @!method initialize(billing_frequency: nil, commit_ids: nil, presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil, recurring_commit_ids: nil, recurring_credit_ids: nil)
|
|
1071
|
+
# Some parameter documentations has been truncated, see
|
|
1072
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Override::OverrideSpecifier} for
|
|
1073
|
+
# more details.
|
|
1074
|
+
#
|
|
1075
|
+
# @param billing_frequency [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::OverrideSpecifier::BillingFrequency]
|
|
1076
|
+
#
|
|
1077
|
+
# @param commit_ids [Array<String>] Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1078
|
+
#
|
|
1079
|
+
# @param presentation_group_values [Hash{Symbol=>String}] A map of group names to values. The override will only apply to line items with
|
|
1080
|
+
#
|
|
1081
|
+
# @param pricing_group_values [Hash{Symbol=>String}] A map of pricing group names to values. The override will only apply to products
|
|
1082
|
+
#
|
|
1083
|
+
# @param product_id [String] If provided, the override will only apply to the product with the specified ID.
|
|
1084
|
+
#
|
|
1085
|
+
# @param product_tags [Array<String>] If provided, the override will only apply to products with all the specified tag
|
|
1086
|
+
#
|
|
1087
|
+
# @param recurring_commit_ids [Array<String>] Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1088
|
+
#
|
|
1089
|
+
# @param recurring_credit_ids [Array<String>] Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1090
|
+
|
|
1091
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Override::OverrideSpecifier#billing_frequency
|
|
1092
|
+
module BillingFrequency
|
|
1093
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1094
|
+
|
|
1095
|
+
MONTHLY = :MONTHLY
|
|
1096
|
+
QUARTERLY = :QUARTERLY
|
|
1097
|
+
ANNUAL = :ANNUAL
|
|
1098
|
+
WEEKLY = :WEEKLY
|
|
1099
|
+
|
|
1100
|
+
# @!method self.values
|
|
1101
|
+
# @return [Array<Symbol>]
|
|
1102
|
+
end
|
|
1103
|
+
end
|
|
1104
|
+
|
|
1105
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Override#starting_at_offset
|
|
1106
|
+
class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
|
|
1107
|
+
# @!attribute unit
|
|
1108
|
+
#
|
|
1109
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::StartingAtOffset::Unit]
|
|
1110
|
+
required :unit, enum: -> { MetronomeSDK::V1::PackageCreateParams::Override::StartingAtOffset::Unit }
|
|
1111
|
+
|
|
1112
|
+
# @!attribute value
|
|
1113
|
+
#
|
|
1114
|
+
# @return [Integer]
|
|
1115
|
+
required :value, Integer
|
|
1116
|
+
|
|
1117
|
+
# @!method initialize(unit:, value:)
|
|
1118
|
+
# Offset relative to contract start date indicating when the override will start
|
|
1119
|
+
# applying (inclusive)
|
|
1120
|
+
#
|
|
1121
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::StartingAtOffset::Unit]
|
|
1122
|
+
# @param value [Integer]
|
|
1123
|
+
|
|
1124
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Override::StartingAtOffset#unit
|
|
1125
|
+
module Unit
|
|
1126
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1127
|
+
|
|
1128
|
+
DAYS = :DAYS
|
|
1129
|
+
WEEKS = :WEEKS
|
|
1130
|
+
MONTHS = :MONTHS
|
|
1131
|
+
YEARS = :YEARS
|
|
1132
|
+
|
|
1133
|
+
# @!method self.values
|
|
1134
|
+
# @return [Array<Symbol>]
|
|
1135
|
+
end
|
|
1136
|
+
end
|
|
1137
|
+
|
|
1138
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Override#duration
|
|
1139
|
+
class Duration < MetronomeSDK::Internal::Type::BaseModel
|
|
1140
|
+
# @!attribute unit
|
|
1141
|
+
#
|
|
1142
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::Duration::Unit]
|
|
1143
|
+
required :unit, enum: -> { MetronomeSDK::V1::PackageCreateParams::Override::Duration::Unit }
|
|
1144
|
+
|
|
1145
|
+
# @!attribute value
|
|
1146
|
+
#
|
|
1147
|
+
# @return [Integer]
|
|
1148
|
+
required :value, Integer
|
|
1149
|
+
|
|
1150
|
+
# @!method initialize(unit:, value:)
|
|
1151
|
+
# Offset relative to override start indicating when the override will stop
|
|
1152
|
+
# applying (exclusive)
|
|
1153
|
+
#
|
|
1154
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::Duration::Unit]
|
|
1155
|
+
# @param value [Integer]
|
|
1156
|
+
|
|
1157
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Override::Duration#unit
|
|
1158
|
+
module Unit
|
|
1159
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1160
|
+
|
|
1161
|
+
DAYS = :DAYS
|
|
1162
|
+
WEEKS = :WEEKS
|
|
1163
|
+
MONTHS = :MONTHS
|
|
1164
|
+
YEARS = :YEARS
|
|
1165
|
+
|
|
1166
|
+
# @!method self.values
|
|
1167
|
+
# @return [Array<Symbol>]
|
|
1168
|
+
end
|
|
1169
|
+
end
|
|
1170
|
+
|
|
1171
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Override#overwrite_rate
|
|
1172
|
+
class OverwriteRate < MetronomeSDK::Internal::Type::BaseModel
|
|
1173
|
+
# @!attribute rate_type
|
|
1174
|
+
#
|
|
1175
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::OverwriteRate::RateType]
|
|
1176
|
+
required :rate_type, enum: -> { MetronomeSDK::V1::PackageCreateParams::Override::OverwriteRate::RateType }
|
|
1177
|
+
|
|
1178
|
+
# @!attribute credit_type_id
|
|
1179
|
+
#
|
|
1180
|
+
# @return [String, nil]
|
|
1181
|
+
optional :credit_type_id, String
|
|
1182
|
+
|
|
1183
|
+
# @!attribute custom_rate
|
|
1184
|
+
# Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1185
|
+
# processors.
|
|
1186
|
+
#
|
|
1187
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
1188
|
+
optional :custom_rate, MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown]
|
|
1189
|
+
|
|
1190
|
+
# @!attribute is_prorated
|
|
1191
|
+
# Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1192
|
+
# set to true.
|
|
1193
|
+
#
|
|
1194
|
+
# @return [Boolean, nil]
|
|
1195
|
+
optional :is_prorated, MetronomeSDK::Internal::Type::Boolean
|
|
1196
|
+
|
|
1197
|
+
# @!attribute minimum_config
|
|
1198
|
+
# Only set for TIERED_PERCENTAGE or PERCENTAGE rate_type.
|
|
1199
|
+
#
|
|
1200
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Override::OverwriteRate::MinimumConfig, nil]
|
|
1201
|
+
optional :minimum_config,
|
|
1202
|
+
-> { MetronomeSDK::V1::PackageCreateParams::Override::OverwriteRate::MinimumConfig }
|
|
1203
|
+
|
|
1204
|
+
# @!attribute price
|
|
1205
|
+
# Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
1206
|
+
# this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
1207
|
+
#
|
|
1208
|
+
# @return [Float, nil]
|
|
1209
|
+
optional :price, Float
|
|
1210
|
+
|
|
1211
|
+
# @!attribute quantity
|
|
1212
|
+
# Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
1213
|
+
#
|
|
1214
|
+
# @return [Float, nil]
|
|
1215
|
+
optional :quantity, Float
|
|
1216
|
+
|
|
1217
|
+
# @!attribute tiers
|
|
1218
|
+
# Only set for TIERED rate_type.
|
|
1219
|
+
#
|
|
1220
|
+
# @return [Array<MetronomeSDK::Models::Tier>, nil]
|
|
1221
|
+
optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] }
|
|
1222
|
+
|
|
1223
|
+
# @!method initialize(rate_type:, credit_type_id: nil, custom_rate: nil, is_prorated: nil, minimum_config: nil, price: nil, quantity: nil, tiers: nil)
|
|
1224
|
+
# Some parameter documentations has been truncated, see
|
|
1225
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Override::OverwriteRate} for
|
|
1226
|
+
# more details.
|
|
1227
|
+
#
|
|
1228
|
+
# Required for OVERWRITE type.
|
|
1229
|
+
#
|
|
1230
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::OverwriteRate::RateType]
|
|
1231
|
+
#
|
|
1232
|
+
# @param credit_type_id [String]
|
|
1233
|
+
#
|
|
1234
|
+
# @param custom_rate [Hash{Symbol=>Object}] Only set for CUSTOM rate_type. This field is interpreted by custom rate processo
|
|
1235
|
+
#
|
|
1236
|
+
# @param is_prorated [Boolean] Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1237
|
+
#
|
|
1238
|
+
# @param minimum_config [MetronomeSDK::Models::V1::PackageCreateParams::Override::OverwriteRate::MinimumConfig] Only set for TIERED_PERCENTAGE or PERCENTAGE rate_type.
|
|
1239
|
+
#
|
|
1240
|
+
# @param price [Float] Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, t
|
|
1241
|
+
#
|
|
1242
|
+
# @param quantity [Float] Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
1243
|
+
#
|
|
1244
|
+
# @param tiers [Array<MetronomeSDK::Models::Tier>] Only set for TIERED rate_type.
|
|
1245
|
+
|
|
1246
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Override::OverwriteRate#rate_type
|
|
1247
|
+
module RateType
|
|
1248
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1249
|
+
|
|
1250
|
+
FLAT = :FLAT
|
|
1251
|
+
PERCENTAGE = :PERCENTAGE
|
|
1252
|
+
SUBSCRIPTION = :SUBSCRIPTION
|
|
1253
|
+
TIERED = :TIERED
|
|
1254
|
+
TIERED_PERCENTAGE = :TIERED_PERCENTAGE
|
|
1255
|
+
CUSTOM = :CUSTOM
|
|
1256
|
+
|
|
1257
|
+
# @!method self.values
|
|
1258
|
+
# @return [Array<Symbol>]
|
|
1259
|
+
end
|
|
1260
|
+
|
|
1261
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Override::OverwriteRate#minimum_config
|
|
1262
|
+
class MinimumConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
1263
|
+
# @!attribute minimum
|
|
1264
|
+
#
|
|
1265
|
+
# @return [Float]
|
|
1266
|
+
required :minimum, Float
|
|
1267
|
+
|
|
1268
|
+
# @!method initialize(minimum:)
|
|
1269
|
+
# Only set for TIERED_PERCENTAGE or PERCENTAGE rate_type.
|
|
1270
|
+
#
|
|
1271
|
+
# @param minimum [Float]
|
|
1272
|
+
end
|
|
1273
|
+
end
|
|
1274
|
+
|
|
1275
|
+
# Indicates whether the override applies to commit rates or list rates. Can only
|
|
1276
|
+
# be used for overrides that have `is_commit_specific` set to `true`. Defaults to
|
|
1277
|
+
# `"LIST_RATE"`.
|
|
1278
|
+
#
|
|
1279
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Override#target
|
|
1280
|
+
module Target
|
|
1281
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1282
|
+
|
|
1283
|
+
COMMIT_RATE = :COMMIT_RATE
|
|
1284
|
+
LIST_RATE = :LIST_RATE
|
|
1285
|
+
|
|
1286
|
+
# @!method self.values
|
|
1287
|
+
# @return [Array<Symbol>]
|
|
1288
|
+
end
|
|
1289
|
+
|
|
1290
|
+
class Tier < MetronomeSDK::Internal::Type::BaseModel
|
|
1291
|
+
# @!attribute multiplier
|
|
1292
|
+
#
|
|
1293
|
+
# @return [Float]
|
|
1294
|
+
required :multiplier, Float
|
|
1295
|
+
|
|
1296
|
+
# @!attribute size
|
|
1297
|
+
#
|
|
1298
|
+
# @return [Float, nil]
|
|
1299
|
+
optional :size, Float
|
|
1300
|
+
|
|
1301
|
+
# @!method initialize(multiplier:, size: nil)
|
|
1302
|
+
# @param multiplier [Float]
|
|
1303
|
+
# @param size [Float]
|
|
1304
|
+
end
|
|
1305
|
+
|
|
1306
|
+
# Overwrites are prioritized over multipliers and tiered overrides.
|
|
1307
|
+
#
|
|
1308
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Override#type
|
|
1309
|
+
module Type
|
|
1310
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1311
|
+
|
|
1312
|
+
OVERWRITE = :OVERWRITE
|
|
1313
|
+
MULTIPLIER = :MULTIPLIER
|
|
1314
|
+
TIERED = :TIERED
|
|
1315
|
+
|
|
1316
|
+
# @!method self.values
|
|
1317
|
+
# @return [Array<Symbol>]
|
|
1318
|
+
end
|
|
1319
|
+
end
|
|
1320
|
+
|
|
1321
|
+
class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
|
|
1322
|
+
# @!attribute access_amount
|
|
1323
|
+
# The amount of commit to grant.
|
|
1324
|
+
#
|
|
1325
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::AccessAmount]
|
|
1326
|
+
required :access_amount, -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::AccessAmount }
|
|
1327
|
+
|
|
1328
|
+
# @!attribute commit_duration
|
|
1329
|
+
# Defines the length of the access schedule for each created commit/credit. The
|
|
1330
|
+
# value represents the number of units. Unit defaults to "PERIODS", where the
|
|
1331
|
+
# length of a period is determined by the recurrence_frequency.
|
|
1332
|
+
#
|
|
1333
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::CommitDuration]
|
|
1334
|
+
required :commit_duration, -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::CommitDuration }
|
|
1335
|
+
|
|
1336
|
+
# @!attribute priority
|
|
1337
|
+
# Will be passed down to the individual commits
|
|
1338
|
+
#
|
|
1339
|
+
# @return [Float]
|
|
1340
|
+
required :priority, Float
|
|
1341
|
+
|
|
1342
|
+
# @!attribute product_id
|
|
1343
|
+
#
|
|
1344
|
+
# @return [String]
|
|
1345
|
+
required :product_id, String
|
|
1346
|
+
|
|
1347
|
+
# @!attribute starting_at_offset
|
|
1348
|
+
# Offset relative to the contract start date that determines the start time for
|
|
1349
|
+
# the first commit
|
|
1350
|
+
#
|
|
1351
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::StartingAtOffset]
|
|
1352
|
+
required :starting_at_offset,
|
|
1353
|
+
-> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::StartingAtOffset }
|
|
1354
|
+
|
|
1355
|
+
# @!attribute applicable_product_ids
|
|
1356
|
+
# Will be passed down to the individual commits
|
|
1357
|
+
#
|
|
1358
|
+
# @return [Array<String>, nil]
|
|
1359
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
1360
|
+
|
|
1361
|
+
# @!attribute applicable_product_tags
|
|
1362
|
+
# Will be passed down to the individual commits
|
|
1363
|
+
#
|
|
1364
|
+
# @return [Array<String>, nil]
|
|
1365
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
1366
|
+
|
|
1367
|
+
# @!attribute description
|
|
1368
|
+
# Will be passed down to the individual commits
|
|
1369
|
+
#
|
|
1370
|
+
# @return [String, nil]
|
|
1371
|
+
optional :description, String
|
|
1372
|
+
|
|
1373
|
+
# @!attribute duration
|
|
1374
|
+
# Offset relative to the recurring credit start that determines when the contract
|
|
1375
|
+
# will stop creating recurring commits. optional
|
|
1376
|
+
#
|
|
1377
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::Duration, nil]
|
|
1378
|
+
optional :duration, -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::Duration }
|
|
1379
|
+
|
|
1380
|
+
# @!attribute invoice_amount
|
|
1381
|
+
# The amount the customer should be billed for the commit. Not required.
|
|
1382
|
+
#
|
|
1383
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::InvoiceAmount, nil]
|
|
1384
|
+
optional :invoice_amount, -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::InvoiceAmount }
|
|
1385
|
+
|
|
1386
|
+
# @!attribute name
|
|
1387
|
+
# displayed on invoices. will be passed through to the individual commits
|
|
1388
|
+
#
|
|
1389
|
+
# @return [String, nil]
|
|
1390
|
+
optional :name, String
|
|
1391
|
+
|
|
1392
|
+
# @!attribute proration
|
|
1393
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
1394
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1395
|
+
#
|
|
1396
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::Proration, nil]
|
|
1397
|
+
optional :proration, enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::Proration }
|
|
1398
|
+
|
|
1399
|
+
# @!attribute rate_type
|
|
1400
|
+
# Whether the created commits will use the commit rate or list rate
|
|
1401
|
+
#
|
|
1402
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::RateType, nil]
|
|
1403
|
+
optional :rate_type, enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::RateType }
|
|
1404
|
+
|
|
1405
|
+
# @!attribute recurrence_frequency
|
|
1406
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1407
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1408
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
1409
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
1410
|
+
# invoice dates.
|
|
1411
|
+
#
|
|
1412
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::RecurrenceFrequency, nil]
|
|
1413
|
+
optional :recurrence_frequency,
|
|
1414
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::RecurrenceFrequency }
|
|
1415
|
+
|
|
1416
|
+
# @!attribute rollover_fraction
|
|
1417
|
+
# Will be passed down to the individual commits. This controls how much of an
|
|
1418
|
+
# individual unexpired commit will roll over upon contract transition. Must be
|
|
1419
|
+
# between 0 and 1.
|
|
1420
|
+
#
|
|
1421
|
+
# @return [Float, nil]
|
|
1422
|
+
optional :rollover_fraction, Float
|
|
1423
|
+
|
|
1424
|
+
# @!attribute specifiers
|
|
1425
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
|
1426
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1427
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1428
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1429
|
+
#
|
|
1430
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
|
|
1431
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
|
|
1432
|
+
|
|
1433
|
+
# @!attribute subscription_config
|
|
1434
|
+
# Attach a subscription to the recurring commit/credit.
|
|
1435
|
+
#
|
|
1436
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig, nil]
|
|
1437
|
+
optional :subscription_config,
|
|
1438
|
+
-> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig }
|
|
1439
|
+
|
|
1440
|
+
# @!attribute temporary_id
|
|
1441
|
+
# A temporary ID that can be used to reference the recurring commit for commit
|
|
1442
|
+
# specific overrides.
|
|
1443
|
+
#
|
|
1444
|
+
# @return [String, nil]
|
|
1445
|
+
optional :temporary_id, String
|
|
1446
|
+
|
|
1447
|
+
# @!method initialize(access_amount:, commit_duration:, priority:, product_id:, starting_at_offset:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, duration: nil, invoice_amount: nil, name: nil, proration: nil, rate_type: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil, temporary_id: nil)
|
|
1448
|
+
# Some parameter documentations has been truncated, see
|
|
1449
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit} for more
|
|
1450
|
+
# details.
|
|
1451
|
+
#
|
|
1452
|
+
# @param access_amount [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::AccessAmount] The amount of commit to grant.
|
|
1453
|
+
#
|
|
1454
|
+
# @param commit_duration [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::CommitDuration] Defines the length of the access schedule for each created commit/credit. The va
|
|
1455
|
+
#
|
|
1456
|
+
# @param priority [Float] Will be passed down to the individual commits
|
|
1457
|
+
#
|
|
1458
|
+
# @param product_id [String]
|
|
1459
|
+
#
|
|
1460
|
+
# @param starting_at_offset [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::StartingAtOffset] Offset relative to the contract start date that determines the start time for th
|
|
1461
|
+
#
|
|
1462
|
+
# @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
|
|
1463
|
+
#
|
|
1464
|
+
# @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
|
|
1465
|
+
#
|
|
1466
|
+
# @param description [String] Will be passed down to the individual commits
|
|
1467
|
+
#
|
|
1468
|
+
# @param duration [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::Duration] Offset relative to the recurring credit start that determines when the contract
|
|
1469
|
+
#
|
|
1470
|
+
# @param invoice_amount [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
|
|
1471
|
+
#
|
|
1472
|
+
# @param name [String] displayed on invoices. will be passed through to the individual commits
|
|
1473
|
+
#
|
|
1474
|
+
# @param proration [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
|
|
1475
|
+
#
|
|
1476
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::RateType] Whether the created commits will use the commit rate or list rate
|
|
1477
|
+
#
|
|
1478
|
+
# @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
|
|
1479
|
+
#
|
|
1480
|
+
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
|
1481
|
+
#
|
|
1482
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
|
|
1483
|
+
#
|
|
1484
|
+
# @param subscription_config [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
|
|
1485
|
+
#
|
|
1486
|
+
# @param temporary_id [String] A temporary ID that can be used to reference the recurring commit for commit spe
|
|
1487
|
+
|
|
1488
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit#access_amount
|
|
1489
|
+
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
1490
|
+
# @!attribute credit_type_id
|
|
1491
|
+
#
|
|
1492
|
+
# @return [String]
|
|
1493
|
+
required :credit_type_id, String
|
|
1494
|
+
|
|
1495
|
+
# @!attribute unit_price
|
|
1496
|
+
#
|
|
1497
|
+
# @return [Float]
|
|
1498
|
+
required :unit_price, Float
|
|
1499
|
+
|
|
1500
|
+
# @!attribute quantity
|
|
1501
|
+
# This field is required unless a subscription is attached via
|
|
1502
|
+
# `subscription_config`.
|
|
1503
|
+
#
|
|
1504
|
+
# @return [Float, nil]
|
|
1505
|
+
optional :quantity, Float
|
|
1506
|
+
|
|
1507
|
+
# @!method initialize(credit_type_id:, unit_price:, quantity: nil)
|
|
1508
|
+
# Some parameter documentations has been truncated, see
|
|
1509
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::AccessAmount}
|
|
1510
|
+
# for more details.
|
|
1511
|
+
#
|
|
1512
|
+
# The amount of commit to grant.
|
|
1513
|
+
#
|
|
1514
|
+
# @param credit_type_id [String]
|
|
1515
|
+
#
|
|
1516
|
+
# @param unit_price [Float]
|
|
1517
|
+
#
|
|
1518
|
+
# @param quantity [Float] This field is required unless a subscription is attached via `subscription_confi
|
|
1519
|
+
end
|
|
1520
|
+
|
|
1521
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit#commit_duration
|
|
1522
|
+
class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
|
|
1523
|
+
# @!attribute value
|
|
1524
|
+
#
|
|
1525
|
+
# @return [Float]
|
|
1526
|
+
required :value, Float
|
|
1527
|
+
|
|
1528
|
+
# @!attribute unit
|
|
1529
|
+
#
|
|
1530
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::CommitDuration::Unit, nil]
|
|
1531
|
+
optional :unit, enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::CommitDuration::Unit }
|
|
1532
|
+
|
|
1533
|
+
# @!method initialize(value:, unit: nil)
|
|
1534
|
+
# Defines the length of the access schedule for each created commit/credit. The
|
|
1535
|
+
# value represents the number of units. Unit defaults to "PERIODS", where the
|
|
1536
|
+
# length of a period is determined by the recurrence_frequency.
|
|
1537
|
+
#
|
|
1538
|
+
# @param value [Float]
|
|
1539
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::CommitDuration::Unit]
|
|
1540
|
+
|
|
1541
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::CommitDuration#unit
|
|
1542
|
+
module Unit
|
|
1543
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1544
|
+
|
|
1545
|
+
PERIODS = :PERIODS
|
|
1546
|
+
|
|
1547
|
+
# @!method self.values
|
|
1548
|
+
# @return [Array<Symbol>]
|
|
1549
|
+
end
|
|
1550
|
+
end
|
|
1551
|
+
|
|
1552
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit#starting_at_offset
|
|
1553
|
+
class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
|
|
1554
|
+
# @!attribute unit
|
|
1555
|
+
#
|
|
1556
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::StartingAtOffset::Unit]
|
|
1557
|
+
required :unit,
|
|
1558
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::StartingAtOffset::Unit }
|
|
1559
|
+
|
|
1560
|
+
# @!attribute value
|
|
1561
|
+
#
|
|
1562
|
+
# @return [Integer]
|
|
1563
|
+
required :value, Integer
|
|
1564
|
+
|
|
1565
|
+
# @!method initialize(unit:, value:)
|
|
1566
|
+
# Offset relative to the contract start date that determines the start time for
|
|
1567
|
+
# the first commit
|
|
1568
|
+
#
|
|
1569
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::StartingAtOffset::Unit]
|
|
1570
|
+
# @param value [Integer]
|
|
1571
|
+
|
|
1572
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::StartingAtOffset#unit
|
|
1573
|
+
module Unit
|
|
1574
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1575
|
+
|
|
1576
|
+
DAYS = :DAYS
|
|
1577
|
+
WEEKS = :WEEKS
|
|
1578
|
+
MONTHS = :MONTHS
|
|
1579
|
+
YEARS = :YEARS
|
|
1580
|
+
|
|
1581
|
+
# @!method self.values
|
|
1582
|
+
# @return [Array<Symbol>]
|
|
1583
|
+
end
|
|
1584
|
+
end
|
|
1585
|
+
|
|
1586
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit#duration
|
|
1587
|
+
class Duration < MetronomeSDK::Internal::Type::BaseModel
|
|
1588
|
+
# @!attribute unit
|
|
1589
|
+
#
|
|
1590
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::Duration::Unit]
|
|
1591
|
+
required :unit, enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::Duration::Unit }
|
|
1592
|
+
|
|
1593
|
+
# @!attribute value
|
|
1594
|
+
#
|
|
1595
|
+
# @return [Integer]
|
|
1596
|
+
required :value, Integer
|
|
1597
|
+
|
|
1598
|
+
# @!method initialize(unit:, value:)
|
|
1599
|
+
# Offset relative to the recurring credit start that determines when the contract
|
|
1600
|
+
# will stop creating recurring commits. optional
|
|
1601
|
+
#
|
|
1602
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::Duration::Unit]
|
|
1603
|
+
# @param value [Integer]
|
|
1604
|
+
|
|
1605
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::Duration#unit
|
|
1606
|
+
module Unit
|
|
1607
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1608
|
+
|
|
1609
|
+
DAYS = :DAYS
|
|
1610
|
+
WEEKS = :WEEKS
|
|
1611
|
+
MONTHS = :MONTHS
|
|
1612
|
+
YEARS = :YEARS
|
|
1613
|
+
|
|
1614
|
+
# @!method self.values
|
|
1615
|
+
# @return [Array<Symbol>]
|
|
1616
|
+
end
|
|
1617
|
+
end
|
|
1618
|
+
|
|
1619
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit#invoice_amount
|
|
1620
|
+
class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
1621
|
+
# @!attribute credit_type_id
|
|
1622
|
+
#
|
|
1623
|
+
# @return [String]
|
|
1624
|
+
required :credit_type_id, String
|
|
1625
|
+
|
|
1626
|
+
# @!attribute quantity
|
|
1627
|
+
#
|
|
1628
|
+
# @return [Float]
|
|
1629
|
+
required :quantity, Float
|
|
1630
|
+
|
|
1631
|
+
# @!attribute unit_price
|
|
1632
|
+
#
|
|
1633
|
+
# @return [Float]
|
|
1634
|
+
required :unit_price, Float
|
|
1635
|
+
|
|
1636
|
+
# @!method initialize(credit_type_id:, quantity:, unit_price:)
|
|
1637
|
+
# The amount the customer should be billed for the commit. Not required.
|
|
1638
|
+
#
|
|
1639
|
+
# @param credit_type_id [String]
|
|
1640
|
+
# @param quantity [Float]
|
|
1641
|
+
# @param unit_price [Float]
|
|
1642
|
+
end
|
|
1643
|
+
|
|
1644
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
1645
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1646
|
+
#
|
|
1647
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit#proration
|
|
1648
|
+
module Proration
|
|
1649
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1650
|
+
|
|
1651
|
+
NONE = :NONE
|
|
1652
|
+
FIRST = :FIRST
|
|
1653
|
+
LAST = :LAST
|
|
1654
|
+
FIRST_AND_LAST = :FIRST_AND_LAST
|
|
1655
|
+
|
|
1656
|
+
# @!method self.values
|
|
1657
|
+
# @return [Array<Symbol>]
|
|
1658
|
+
end
|
|
1659
|
+
|
|
1660
|
+
# Whether the created commits will use the commit rate or list rate
|
|
1661
|
+
#
|
|
1662
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit#rate_type
|
|
1663
|
+
module RateType
|
|
1664
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1665
|
+
|
|
1666
|
+
COMMIT_RATE = :COMMIT_RATE
|
|
1667
|
+
LIST_RATE = :LIST_RATE
|
|
1668
|
+
|
|
1669
|
+
# @!method self.values
|
|
1670
|
+
# @return [Array<Symbol>]
|
|
1671
|
+
end
|
|
1672
|
+
|
|
1673
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1674
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1675
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
1676
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
1677
|
+
# invoice dates.
|
|
1678
|
+
#
|
|
1679
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit#recurrence_frequency
|
|
1680
|
+
module RecurrenceFrequency
|
|
1681
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1682
|
+
|
|
1683
|
+
MONTHLY = :MONTHLY
|
|
1684
|
+
QUARTERLY = :QUARTERLY
|
|
1685
|
+
ANNUAL = :ANNUAL
|
|
1686
|
+
WEEKLY = :WEEKLY
|
|
1687
|
+
|
|
1688
|
+
# @!method self.values
|
|
1689
|
+
# @return [Array<Symbol>]
|
|
1690
|
+
end
|
|
1691
|
+
|
|
1692
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit#subscription_config
|
|
1693
|
+
class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
1694
|
+
# @!attribute apply_seat_increase_config
|
|
1695
|
+
#
|
|
1696
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
|
|
1697
|
+
required :apply_seat_increase_config,
|
|
1698
|
+
-> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig }
|
|
1699
|
+
|
|
1700
|
+
# @!attribute subscription_id
|
|
1701
|
+
# ID of the subscription to configure on the recurring commit/credit.
|
|
1702
|
+
#
|
|
1703
|
+
# @return [String]
|
|
1704
|
+
required :subscription_id, String
|
|
1705
|
+
|
|
1706
|
+
# @!attribute allocation
|
|
1707
|
+
# If set to POOLED, allocation added per seat is pooled across the account. If set
|
|
1708
|
+
# to INDIVIDUAL, each seat in the subscription will have its own allocation.
|
|
1709
|
+
#
|
|
1710
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig::Allocation, nil]
|
|
1711
|
+
optional :allocation,
|
|
1712
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig::Allocation }
|
|
1713
|
+
|
|
1714
|
+
# @!method initialize(apply_seat_increase_config:, subscription_id:, allocation: nil)
|
|
1715
|
+
# Some parameter documentations has been truncated, see
|
|
1716
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig}
|
|
1717
|
+
# for more details.
|
|
1718
|
+
#
|
|
1719
|
+
# Attach a subscription to the recurring commit/credit.
|
|
1720
|
+
#
|
|
1721
|
+
# @param apply_seat_increase_config [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
|
|
1722
|
+
#
|
|
1723
|
+
# @param subscription_id [String] ID of the subscription to configure on the recurring commit/credit.
|
|
1724
|
+
#
|
|
1725
|
+
# @param allocation [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig::Allocation] If set to POOLED, allocation added per seat is pooled across the account. If set
|
|
1726
|
+
|
|
1727
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig#apply_seat_increase_config
|
|
1728
|
+
class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
1729
|
+
# @!attribute is_prorated
|
|
1730
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
|
1731
|
+
#
|
|
1732
|
+
# @return [Boolean]
|
|
1733
|
+
required :is_prorated, MetronomeSDK::Internal::Type::Boolean
|
|
1734
|
+
|
|
1735
|
+
# @!method initialize(is_prorated:)
|
|
1736
|
+
# @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
|
|
1737
|
+
end
|
|
1738
|
+
|
|
1739
|
+
# If set to POOLED, allocation added per seat is pooled across the account. If set
|
|
1740
|
+
# to INDIVIDUAL, each seat in the subscription will have its own allocation.
|
|
1741
|
+
#
|
|
1742
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::SubscriptionConfig#allocation
|
|
1743
|
+
module Allocation
|
|
1744
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1745
|
+
|
|
1746
|
+
INDIVIDUAL = :INDIVIDUAL
|
|
1747
|
+
POOLED = :POOLED
|
|
1748
|
+
|
|
1749
|
+
# @!method self.values
|
|
1750
|
+
# @return [Array<Symbol>]
|
|
1751
|
+
end
|
|
1752
|
+
end
|
|
1753
|
+
end
|
|
1754
|
+
|
|
1755
|
+
class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
|
|
1756
|
+
# @!attribute access_amount
|
|
1757
|
+
# The amount of commit to grant.
|
|
1758
|
+
#
|
|
1759
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::AccessAmount]
|
|
1760
|
+
required :access_amount, -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::AccessAmount }
|
|
1761
|
+
|
|
1762
|
+
# @!attribute commit_duration
|
|
1763
|
+
# Defines the length of the access schedule for each created commit/credit. The
|
|
1764
|
+
# value represents the number of units. Unit defaults to "PERIODS", where the
|
|
1765
|
+
# length of a period is determined by the recurrence_frequency.
|
|
1766
|
+
#
|
|
1767
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::CommitDuration]
|
|
1768
|
+
required :commit_duration, -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::CommitDuration }
|
|
1769
|
+
|
|
1770
|
+
# @!attribute priority
|
|
1771
|
+
# Will be passed down to the individual commits
|
|
1772
|
+
#
|
|
1773
|
+
# @return [Float]
|
|
1774
|
+
required :priority, Float
|
|
1775
|
+
|
|
1776
|
+
# @!attribute product_id
|
|
1777
|
+
#
|
|
1778
|
+
# @return [String]
|
|
1779
|
+
required :product_id, String
|
|
1780
|
+
|
|
1781
|
+
# @!attribute starting_at_offset
|
|
1782
|
+
# Offset relative to the contract start date that determines the start time for
|
|
1783
|
+
# the first commit
|
|
1784
|
+
#
|
|
1785
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::StartingAtOffset]
|
|
1786
|
+
required :starting_at_offset,
|
|
1787
|
+
-> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::StartingAtOffset }
|
|
1788
|
+
|
|
1789
|
+
# @!attribute applicable_product_ids
|
|
1790
|
+
# Will be passed down to the individual commits
|
|
1791
|
+
#
|
|
1792
|
+
# @return [Array<String>, nil]
|
|
1793
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
1794
|
+
|
|
1795
|
+
# @!attribute applicable_product_tags
|
|
1796
|
+
# Will be passed down to the individual commits
|
|
1797
|
+
#
|
|
1798
|
+
# @return [Array<String>, nil]
|
|
1799
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
1800
|
+
|
|
1801
|
+
# @!attribute description
|
|
1802
|
+
# Will be passed down to the individual commits
|
|
1803
|
+
#
|
|
1804
|
+
# @return [String, nil]
|
|
1805
|
+
optional :description, String
|
|
1806
|
+
|
|
1807
|
+
# @!attribute duration
|
|
1808
|
+
# Offset relative to the recurring credit start that determines when the contract
|
|
1809
|
+
# will stop creating recurring commits. optional
|
|
1810
|
+
#
|
|
1811
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::Duration, nil]
|
|
1812
|
+
optional :duration, -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::Duration }
|
|
1813
|
+
|
|
1814
|
+
# @!attribute name
|
|
1815
|
+
# displayed on invoices. will be passed through to the individual commits
|
|
1816
|
+
#
|
|
1817
|
+
# @return [String, nil]
|
|
1818
|
+
optional :name, String
|
|
1819
|
+
|
|
1820
|
+
# @!attribute proration
|
|
1821
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
1822
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1823
|
+
#
|
|
1824
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::Proration, nil]
|
|
1825
|
+
optional :proration, enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::Proration }
|
|
1826
|
+
|
|
1827
|
+
# @!attribute rate_type
|
|
1828
|
+
# Whether the created commits will use the commit rate or list rate
|
|
1829
|
+
#
|
|
1830
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::RateType, nil]
|
|
1831
|
+
optional :rate_type, enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::RateType }
|
|
1832
|
+
|
|
1833
|
+
# @!attribute recurrence_frequency
|
|
1834
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1835
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1836
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
1837
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
1838
|
+
# invoice dates.
|
|
1839
|
+
#
|
|
1840
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::RecurrenceFrequency, nil]
|
|
1841
|
+
optional :recurrence_frequency,
|
|
1842
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::RecurrenceFrequency }
|
|
1843
|
+
|
|
1844
|
+
# @!attribute rollover_fraction
|
|
1845
|
+
# Will be passed down to the individual commits. This controls how much of an
|
|
1846
|
+
# individual unexpired commit will roll over upon contract transition. Must be
|
|
1847
|
+
# between 0 and 1.
|
|
1848
|
+
#
|
|
1849
|
+
# @return [Float, nil]
|
|
1850
|
+
optional :rollover_fraction, Float
|
|
1851
|
+
|
|
1852
|
+
# @!attribute specifiers
|
|
1853
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
|
1854
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1855
|
+
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1856
|
+
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1857
|
+
#
|
|
1858
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
|
|
1859
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
|
|
1860
|
+
|
|
1861
|
+
# @!attribute subscription_config
|
|
1862
|
+
# Attach a subscription to the recurring commit/credit.
|
|
1863
|
+
#
|
|
1864
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig, nil]
|
|
1865
|
+
optional :subscription_config,
|
|
1866
|
+
-> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig }
|
|
1867
|
+
|
|
1868
|
+
# @!attribute temporary_id
|
|
1869
|
+
# A temporary ID that can be used to reference the recurring commit for commit
|
|
1870
|
+
# specific overrides.
|
|
1871
|
+
#
|
|
1872
|
+
# @return [String, nil]
|
|
1873
|
+
optional :temporary_id, String
|
|
1874
|
+
|
|
1875
|
+
# @!method initialize(access_amount:, commit_duration:, priority:, product_id:, starting_at_offset:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, duration: nil, name: nil, proration: nil, rate_type: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil, temporary_id: nil)
|
|
1876
|
+
# Some parameter documentations has been truncated, see
|
|
1877
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit} for more
|
|
1878
|
+
# details.
|
|
1879
|
+
#
|
|
1880
|
+
# @param access_amount [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::AccessAmount] The amount of commit to grant.
|
|
1881
|
+
#
|
|
1882
|
+
# @param commit_duration [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::CommitDuration] Defines the length of the access schedule for each created commit/credit. The va
|
|
1883
|
+
#
|
|
1884
|
+
# @param priority [Float] Will be passed down to the individual commits
|
|
1885
|
+
#
|
|
1886
|
+
# @param product_id [String]
|
|
1887
|
+
#
|
|
1888
|
+
# @param starting_at_offset [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::StartingAtOffset] Offset relative to the contract start date that determines the start time for th
|
|
1889
|
+
#
|
|
1890
|
+
# @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
|
|
1891
|
+
#
|
|
1892
|
+
# @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
|
|
1893
|
+
#
|
|
1894
|
+
# @param description [String] Will be passed down to the individual commits
|
|
1895
|
+
#
|
|
1896
|
+
# @param duration [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::Duration] Offset relative to the recurring credit start that determines when the contract
|
|
1897
|
+
#
|
|
1898
|
+
# @param name [String] displayed on invoices. will be passed through to the individual commits
|
|
1899
|
+
#
|
|
1900
|
+
# @param proration [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
|
|
1901
|
+
#
|
|
1902
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::RateType] Whether the created commits will use the commit rate or list rate
|
|
1903
|
+
#
|
|
1904
|
+
# @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
|
|
1905
|
+
#
|
|
1906
|
+
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
|
1907
|
+
#
|
|
1908
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
|
|
1909
|
+
#
|
|
1910
|
+
# @param subscription_config [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
|
|
1911
|
+
#
|
|
1912
|
+
# @param temporary_id [String] A temporary ID that can be used to reference the recurring commit for commit spe
|
|
1913
|
+
|
|
1914
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit#access_amount
|
|
1915
|
+
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
1916
|
+
# @!attribute credit_type_id
|
|
1917
|
+
#
|
|
1918
|
+
# @return [String]
|
|
1919
|
+
required :credit_type_id, String
|
|
1920
|
+
|
|
1921
|
+
# @!attribute unit_price
|
|
1922
|
+
#
|
|
1923
|
+
# @return [Float]
|
|
1924
|
+
required :unit_price, Float
|
|
1925
|
+
|
|
1926
|
+
# @!attribute quantity
|
|
1927
|
+
# This field is required unless a subscription is attached via
|
|
1928
|
+
# `subscription_config`.
|
|
1929
|
+
#
|
|
1930
|
+
# @return [Float, nil]
|
|
1931
|
+
optional :quantity, Float
|
|
1932
|
+
|
|
1933
|
+
# @!method initialize(credit_type_id:, unit_price:, quantity: nil)
|
|
1934
|
+
# Some parameter documentations has been truncated, see
|
|
1935
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::AccessAmount}
|
|
1936
|
+
# for more details.
|
|
1937
|
+
#
|
|
1938
|
+
# The amount of commit to grant.
|
|
1939
|
+
#
|
|
1940
|
+
# @param credit_type_id [String]
|
|
1941
|
+
#
|
|
1942
|
+
# @param unit_price [Float]
|
|
1943
|
+
#
|
|
1944
|
+
# @param quantity [Float] This field is required unless a subscription is attached via `subscription_confi
|
|
1945
|
+
end
|
|
1946
|
+
|
|
1947
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit#commit_duration
|
|
1948
|
+
class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
|
|
1949
|
+
# @!attribute value
|
|
1950
|
+
#
|
|
1951
|
+
# @return [Float]
|
|
1952
|
+
required :value, Float
|
|
1953
|
+
|
|
1954
|
+
# @!attribute unit
|
|
1955
|
+
#
|
|
1956
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::CommitDuration::Unit, nil]
|
|
1957
|
+
optional :unit, enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::CommitDuration::Unit }
|
|
1958
|
+
|
|
1959
|
+
# @!method initialize(value:, unit: nil)
|
|
1960
|
+
# Defines the length of the access schedule for each created commit/credit. The
|
|
1961
|
+
# value represents the number of units. Unit defaults to "PERIODS", where the
|
|
1962
|
+
# length of a period is determined by the recurrence_frequency.
|
|
1963
|
+
#
|
|
1964
|
+
# @param value [Float]
|
|
1965
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::CommitDuration::Unit]
|
|
1966
|
+
|
|
1967
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::CommitDuration#unit
|
|
1968
|
+
module Unit
|
|
1969
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1970
|
+
|
|
1971
|
+
PERIODS = :PERIODS
|
|
1972
|
+
|
|
1973
|
+
# @!method self.values
|
|
1974
|
+
# @return [Array<Symbol>]
|
|
1975
|
+
end
|
|
1976
|
+
end
|
|
1977
|
+
|
|
1978
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit#starting_at_offset
|
|
1979
|
+
class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
|
|
1980
|
+
# @!attribute unit
|
|
1981
|
+
#
|
|
1982
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::StartingAtOffset::Unit]
|
|
1983
|
+
required :unit,
|
|
1984
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::StartingAtOffset::Unit }
|
|
1985
|
+
|
|
1986
|
+
# @!attribute value
|
|
1987
|
+
#
|
|
1988
|
+
# @return [Integer]
|
|
1989
|
+
required :value, Integer
|
|
1990
|
+
|
|
1991
|
+
# @!method initialize(unit:, value:)
|
|
1992
|
+
# Offset relative to the contract start date that determines the start time for
|
|
1993
|
+
# the first commit
|
|
1994
|
+
#
|
|
1995
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::StartingAtOffset::Unit]
|
|
1996
|
+
# @param value [Integer]
|
|
1997
|
+
|
|
1998
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::StartingAtOffset#unit
|
|
1999
|
+
module Unit
|
|
2000
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2001
|
+
|
|
2002
|
+
DAYS = :DAYS
|
|
2003
|
+
WEEKS = :WEEKS
|
|
2004
|
+
MONTHS = :MONTHS
|
|
2005
|
+
YEARS = :YEARS
|
|
2006
|
+
|
|
2007
|
+
# @!method self.values
|
|
2008
|
+
# @return [Array<Symbol>]
|
|
2009
|
+
end
|
|
2010
|
+
end
|
|
2011
|
+
|
|
2012
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit#duration
|
|
2013
|
+
class Duration < MetronomeSDK::Internal::Type::BaseModel
|
|
2014
|
+
# @!attribute unit
|
|
2015
|
+
#
|
|
2016
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::Duration::Unit]
|
|
2017
|
+
required :unit, enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::Duration::Unit }
|
|
2018
|
+
|
|
2019
|
+
# @!attribute value
|
|
2020
|
+
#
|
|
2021
|
+
# @return [Integer]
|
|
2022
|
+
required :value, Integer
|
|
2023
|
+
|
|
2024
|
+
# @!method initialize(unit:, value:)
|
|
2025
|
+
# Offset relative to the recurring credit start that determines when the contract
|
|
2026
|
+
# will stop creating recurring commits. optional
|
|
2027
|
+
#
|
|
2028
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::Duration::Unit]
|
|
2029
|
+
# @param value [Integer]
|
|
2030
|
+
|
|
2031
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::Duration#unit
|
|
2032
|
+
module Unit
|
|
2033
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2034
|
+
|
|
2035
|
+
DAYS = :DAYS
|
|
2036
|
+
WEEKS = :WEEKS
|
|
2037
|
+
MONTHS = :MONTHS
|
|
2038
|
+
YEARS = :YEARS
|
|
2039
|
+
|
|
2040
|
+
# @!method self.values
|
|
2041
|
+
# @return [Array<Symbol>]
|
|
2042
|
+
end
|
|
2043
|
+
end
|
|
2044
|
+
|
|
2045
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
2046
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
2047
|
+
#
|
|
2048
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit#proration
|
|
2049
|
+
module Proration
|
|
2050
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2051
|
+
|
|
2052
|
+
NONE = :NONE
|
|
2053
|
+
FIRST = :FIRST
|
|
2054
|
+
LAST = :LAST
|
|
2055
|
+
FIRST_AND_LAST = :FIRST_AND_LAST
|
|
2056
|
+
|
|
2057
|
+
# @!method self.values
|
|
2058
|
+
# @return [Array<Symbol>]
|
|
2059
|
+
end
|
|
2060
|
+
|
|
2061
|
+
# Whether the created commits will use the commit rate or list rate
|
|
2062
|
+
#
|
|
2063
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit#rate_type
|
|
2064
|
+
module RateType
|
|
2065
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2066
|
+
|
|
2067
|
+
COMMIT_RATE = :COMMIT_RATE
|
|
2068
|
+
LIST_RATE = :LIST_RATE
|
|
2069
|
+
|
|
2070
|
+
# @!method self.values
|
|
2071
|
+
# @return [Array<Symbol>]
|
|
2072
|
+
end
|
|
2073
|
+
|
|
2074
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
2075
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
2076
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
2077
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
2078
|
+
# invoice dates.
|
|
2079
|
+
#
|
|
2080
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit#recurrence_frequency
|
|
2081
|
+
module RecurrenceFrequency
|
|
2082
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2083
|
+
|
|
2084
|
+
MONTHLY = :MONTHLY
|
|
2085
|
+
QUARTERLY = :QUARTERLY
|
|
2086
|
+
ANNUAL = :ANNUAL
|
|
2087
|
+
WEEKLY = :WEEKLY
|
|
2088
|
+
|
|
2089
|
+
# @!method self.values
|
|
2090
|
+
# @return [Array<Symbol>]
|
|
2091
|
+
end
|
|
2092
|
+
|
|
2093
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit#subscription_config
|
|
2094
|
+
class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
2095
|
+
# @!attribute apply_seat_increase_config
|
|
2096
|
+
#
|
|
2097
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
|
|
2098
|
+
required :apply_seat_increase_config,
|
|
2099
|
+
-> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig }
|
|
2100
|
+
|
|
2101
|
+
# @!attribute subscription_id
|
|
2102
|
+
# ID of the subscription to configure on the recurring commit/credit.
|
|
2103
|
+
#
|
|
2104
|
+
# @return [String]
|
|
2105
|
+
required :subscription_id, String
|
|
2106
|
+
|
|
2107
|
+
# @!attribute allocation
|
|
2108
|
+
# If set to POOLED, allocation added per seat is pooled across the account. If set
|
|
2109
|
+
# to INDIVIDUAL, each seat in the subscription will have its own allocation.
|
|
2110
|
+
#
|
|
2111
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig::Allocation, nil]
|
|
2112
|
+
optional :allocation,
|
|
2113
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig::Allocation }
|
|
2114
|
+
|
|
2115
|
+
# @!method initialize(apply_seat_increase_config:, subscription_id:, allocation: nil)
|
|
2116
|
+
# Some parameter documentations has been truncated, see
|
|
2117
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig}
|
|
2118
|
+
# for more details.
|
|
2119
|
+
#
|
|
2120
|
+
# Attach a subscription to the recurring commit/credit.
|
|
2121
|
+
#
|
|
2122
|
+
# @param apply_seat_increase_config [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
|
|
2123
|
+
#
|
|
2124
|
+
# @param subscription_id [String] ID of the subscription to configure on the recurring commit/credit.
|
|
2125
|
+
#
|
|
2126
|
+
# @param allocation [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig::Allocation] If set to POOLED, allocation added per seat is pooled across the account. If set
|
|
2127
|
+
|
|
2128
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig#apply_seat_increase_config
|
|
2129
|
+
class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
2130
|
+
# @!attribute is_prorated
|
|
2131
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
|
2132
|
+
#
|
|
2133
|
+
# @return [Boolean]
|
|
2134
|
+
required :is_prorated, MetronomeSDK::Internal::Type::Boolean
|
|
2135
|
+
|
|
2136
|
+
# @!method initialize(is_prorated:)
|
|
2137
|
+
# @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
|
|
2138
|
+
end
|
|
2139
|
+
|
|
2140
|
+
# If set to POOLED, allocation added per seat is pooled across the account. If set
|
|
2141
|
+
# to INDIVIDUAL, each seat in the subscription will have its own allocation.
|
|
2142
|
+
#
|
|
2143
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::SubscriptionConfig#allocation
|
|
2144
|
+
module Allocation
|
|
2145
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2146
|
+
|
|
2147
|
+
INDIVIDUAL = :INDIVIDUAL
|
|
2148
|
+
POOLED = :POOLED
|
|
2149
|
+
|
|
2150
|
+
# @!method self.values
|
|
2151
|
+
# @return [Array<Symbol>]
|
|
2152
|
+
end
|
|
2153
|
+
end
|
|
2154
|
+
end
|
|
2155
|
+
|
|
2156
|
+
class ScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
|
|
2157
|
+
# @!attribute product_id
|
|
2158
|
+
#
|
|
2159
|
+
# @return [String]
|
|
2160
|
+
required :product_id, String
|
|
2161
|
+
|
|
2162
|
+
# @!attribute schedule
|
|
2163
|
+
# Must provide schedule_items.
|
|
2164
|
+
#
|
|
2165
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge::Schedule]
|
|
2166
|
+
required :schedule, -> { MetronomeSDK::V1::PackageCreateParams::ScheduledCharge::Schedule }
|
|
2167
|
+
|
|
2168
|
+
# @!attribute custom_fields
|
|
2169
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2170
|
+
#
|
|
2171
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
2172
|
+
optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
|
|
2173
|
+
|
|
2174
|
+
# @!attribute name
|
|
2175
|
+
# displayed on invoices
|
|
2176
|
+
#
|
|
2177
|
+
# @return [String, nil]
|
|
2178
|
+
optional :name, String
|
|
2179
|
+
|
|
2180
|
+
# @!method initialize(product_id:, schedule:, custom_fields: nil, name: nil)
|
|
2181
|
+
# @param product_id [String]
|
|
2182
|
+
#
|
|
2183
|
+
# @param schedule [MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge::Schedule] Must provide schedule_items.
|
|
2184
|
+
#
|
|
2185
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2186
|
+
#
|
|
2187
|
+
# @param name [String] displayed on invoices
|
|
2188
|
+
|
|
2189
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge#schedule
|
|
2190
|
+
class Schedule < MetronomeSDK::Internal::Type::BaseModel
|
|
2191
|
+
# @!attribute schedule_items
|
|
2192
|
+
# Either provide amount or provide both unit_price and quantity.
|
|
2193
|
+
#
|
|
2194
|
+
# @return [Array<MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem>]
|
|
2195
|
+
required :schedule_items,
|
|
2196
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem] }
|
|
2197
|
+
|
|
2198
|
+
# @!attribute credit_type_id
|
|
2199
|
+
# Defaults to USD (cents) if not passed.
|
|
2200
|
+
#
|
|
2201
|
+
# @return [String, nil]
|
|
2202
|
+
optional :credit_type_id, String
|
|
2203
|
+
|
|
2204
|
+
# @!method initialize(schedule_items:, credit_type_id: nil)
|
|
2205
|
+
# Must provide schedule_items.
|
|
2206
|
+
#
|
|
2207
|
+
# @param schedule_items [Array<MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem>] Either provide amount or provide both unit_price and quantity.
|
|
2208
|
+
#
|
|
2209
|
+
# @param credit_type_id [String] Defaults to USD (cents) if not passed.
|
|
2210
|
+
|
|
2211
|
+
class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
|
|
2212
|
+
# @!attribute date_offset
|
|
2213
|
+
# Date relative to the contract start date.
|
|
2214
|
+
#
|
|
2215
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem::DateOffset]
|
|
2216
|
+
required :date_offset,
|
|
2217
|
+
-> { MetronomeSDK::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem::DateOffset }
|
|
2218
|
+
|
|
2219
|
+
# @!attribute quantity
|
|
2220
|
+
# Quantity for the charge. Will be multiplied by unit_price to determine the
|
|
2221
|
+
# amount.
|
|
2222
|
+
#
|
|
2223
|
+
# @return [Float]
|
|
2224
|
+
required :quantity, Float
|
|
2225
|
+
|
|
2226
|
+
# @!attribute unit_price
|
|
2227
|
+
# Unit price for the charge. Will be multiplied by quantity to determine the
|
|
2228
|
+
# amount.
|
|
2229
|
+
#
|
|
2230
|
+
# @return [Float]
|
|
2231
|
+
required :unit_price, Float
|
|
2232
|
+
|
|
2233
|
+
# @!method initialize(date_offset:, quantity:, unit_price:)
|
|
2234
|
+
# Some parameter documentations has been truncated, see
|
|
2235
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem}
|
|
2236
|
+
# for more details.
|
|
2237
|
+
#
|
|
2238
|
+
# @param date_offset [MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem::DateOffset] Date relative to the contract start date.
|
|
2239
|
+
#
|
|
2240
|
+
# @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
|
|
2241
|
+
#
|
|
2242
|
+
# @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun
|
|
2243
|
+
|
|
2244
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem#date_offset
|
|
2245
|
+
class DateOffset < MetronomeSDK::Internal::Type::BaseModel
|
|
2246
|
+
# @!attribute unit
|
|
2247
|
+
#
|
|
2248
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem::DateOffset::Unit]
|
|
2249
|
+
required :unit,
|
|
2250
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem::DateOffset::Unit }
|
|
2251
|
+
|
|
2252
|
+
# @!attribute value
|
|
2253
|
+
#
|
|
2254
|
+
# @return [Integer]
|
|
2255
|
+
required :value, Integer
|
|
2256
|
+
|
|
2257
|
+
# @!method initialize(unit:, value:)
|
|
2258
|
+
# Date relative to the contract start date.
|
|
2259
|
+
#
|
|
2260
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem::DateOffset::Unit]
|
|
2261
|
+
# @param value [Integer]
|
|
2262
|
+
|
|
2263
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::ScheduledCharge::Schedule::ScheduleItem::DateOffset#unit
|
|
2264
|
+
module Unit
|
|
2265
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2266
|
+
|
|
2267
|
+
DAYS = :DAYS
|
|
2268
|
+
WEEKS = :WEEKS
|
|
2269
|
+
MONTHS = :MONTHS
|
|
2270
|
+
YEARS = :YEARS
|
|
2271
|
+
|
|
2272
|
+
# @!method self.values
|
|
2273
|
+
# @return [Array<Symbol>]
|
|
2274
|
+
end
|
|
2275
|
+
end
|
|
2276
|
+
end
|
|
2277
|
+
end
|
|
2278
|
+
end
|
|
2279
|
+
|
|
2280
|
+
# Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
2281
|
+
# usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
2282
|
+
# `ending_before` date for consolidation to occur. This field cannot be modified
|
|
2283
|
+
# after a Contract has been created. If this field is omitted, charges will appear
|
|
2284
|
+
# on a separate invoice from usage charges.
|
|
2285
|
+
module ScheduledChargesOnUsageInvoices
|
|
2286
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2287
|
+
|
|
2288
|
+
ALL = :ALL
|
|
2289
|
+
|
|
2290
|
+
# @!method self.values
|
|
2291
|
+
# @return [Array<Symbol>]
|
|
2292
|
+
end
|
|
2293
|
+
|
|
2294
|
+
class Subscription < MetronomeSDK::Internal::Type::BaseModel
|
|
2295
|
+
# @!attribute collection_schedule
|
|
2296
|
+
#
|
|
2297
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::CollectionSchedule]
|
|
2298
|
+
required :collection_schedule,
|
|
2299
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::Subscription::CollectionSchedule }
|
|
2300
|
+
|
|
2301
|
+
# @!attribute proration
|
|
2302
|
+
#
|
|
2303
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration]
|
|
2304
|
+
required :proration, -> { MetronomeSDK::V1::PackageCreateParams::Subscription::Proration }
|
|
2305
|
+
|
|
2306
|
+
# @!attribute subscription_rate
|
|
2307
|
+
#
|
|
2308
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::SubscriptionRate]
|
|
2309
|
+
required :subscription_rate, -> { MetronomeSDK::V1::PackageCreateParams::Subscription::SubscriptionRate }
|
|
2310
|
+
|
|
2311
|
+
# @!attribute custom_fields
|
|
2312
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2313
|
+
#
|
|
2314
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
2315
|
+
optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
|
|
2316
|
+
|
|
2317
|
+
# @!attribute description
|
|
2318
|
+
#
|
|
2319
|
+
# @return [String, nil]
|
|
2320
|
+
optional :description, String
|
|
2321
|
+
|
|
2322
|
+
# @!attribute duration
|
|
2323
|
+
# Lifetime of the subscription from its start. If not provided, subscription
|
|
2324
|
+
# inherits contract end date.
|
|
2325
|
+
#
|
|
2326
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Duration, nil]
|
|
2327
|
+
optional :duration, -> { MetronomeSDK::V1::PackageCreateParams::Subscription::Duration }
|
|
2328
|
+
|
|
2329
|
+
# @!attribute initial_quantity
|
|
2330
|
+
# The initial quantity for the subscription. It must be non-negative value.
|
|
2331
|
+
# Required if quantity_management_mode is QUANTITY_ONLY.
|
|
2332
|
+
#
|
|
2333
|
+
# @return [Float, nil]
|
|
2334
|
+
optional :initial_quantity, Float
|
|
2335
|
+
|
|
2336
|
+
# @!attribute name
|
|
2337
|
+
#
|
|
2338
|
+
# @return [String, nil]
|
|
2339
|
+
optional :name, String
|
|
2340
|
+
|
|
2341
|
+
# @!attribute quantity_management_mode
|
|
2342
|
+
# Determines how the subscription's quantity is controlled. Defaults to
|
|
2343
|
+
# QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
2344
|
+
# directly on the subscription. `initial_quantity` must be provided with this
|
|
2345
|
+
# option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
2346
|
+
# **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
|
|
2347
|
+
# user_123) to increment and decrement a subscription quantity, rather than
|
|
2348
|
+
# directly providing the quantity. You must use a **SEAT_BASED** subscription to
|
|
2349
|
+
# use a linked recurring credit with an allocation per seat. `seat_config` must be
|
|
2350
|
+
# provided with this option.
|
|
2351
|
+
#
|
|
2352
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::QuantityManagementMode, nil]
|
|
2353
|
+
optional :quantity_management_mode,
|
|
2354
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::Subscription::QuantityManagementMode }
|
|
2355
|
+
|
|
2356
|
+
# @!attribute seat_config
|
|
2357
|
+
#
|
|
2358
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::SeatConfig, nil]
|
|
2359
|
+
optional :seat_config, -> { MetronomeSDK::V1::PackageCreateParams::Subscription::SeatConfig }
|
|
2360
|
+
|
|
2361
|
+
# @!attribute starting_at_offset
|
|
2362
|
+
# Relative date from contract start date corresponding to the inclusive start time
|
|
2363
|
+
# for the subscription. If not provided, defaults to contract start date
|
|
2364
|
+
#
|
|
2365
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::StartingAtOffset, nil]
|
|
2366
|
+
optional :starting_at_offset, -> { MetronomeSDK::V1::PackageCreateParams::Subscription::StartingAtOffset }
|
|
2367
|
+
|
|
2368
|
+
# @!attribute temporary_id
|
|
2369
|
+
# A temporary ID used to reference the subscription in recurring commit/credit
|
|
2370
|
+
# subscription configs created within the same payload.
|
|
2371
|
+
#
|
|
2372
|
+
# @return [String, nil]
|
|
2373
|
+
optional :temporary_id, String
|
|
2374
|
+
|
|
2375
|
+
# @!method initialize(collection_schedule:, proration:, subscription_rate:, custom_fields: nil, description: nil, duration: nil, initial_quantity: nil, name: nil, quantity_management_mode: nil, seat_config: nil, starting_at_offset: nil, temporary_id: nil)
|
|
2376
|
+
# Some parameter documentations has been truncated, see
|
|
2377
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Subscription} for more details.
|
|
2378
|
+
#
|
|
2379
|
+
# @param collection_schedule [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::CollectionSchedule]
|
|
2380
|
+
#
|
|
2381
|
+
# @param proration [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration]
|
|
2382
|
+
#
|
|
2383
|
+
# @param subscription_rate [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::SubscriptionRate]
|
|
2384
|
+
#
|
|
2385
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
2386
|
+
#
|
|
2387
|
+
# @param description [String]
|
|
2388
|
+
#
|
|
2389
|
+
# @param duration [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Duration] Lifetime of the subscription from its start. If not provided, subscription inher
|
|
2390
|
+
#
|
|
2391
|
+
# @param initial_quantity [Float] The initial quantity for the subscription. It must be non-negative value. Requir
|
|
2392
|
+
#
|
|
2393
|
+
# @param name [String]
|
|
2394
|
+
#
|
|
2395
|
+
# @param quantity_management_mode [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::QuantityManagementMode] Determines how the subscription's quantity is controlled. Defaults to QUANTITY_O
|
|
2396
|
+
#
|
|
2397
|
+
# @param seat_config [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::SeatConfig]
|
|
2398
|
+
#
|
|
2399
|
+
# @param starting_at_offset [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::StartingAtOffset] Relative date from contract start date corresponding to the inclusive start time
|
|
2400
|
+
#
|
|
2401
|
+
# @param temporary_id [String] A temporary ID used to reference the subscription in recurring commit/credit sub
|
|
2402
|
+
|
|
2403
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription#collection_schedule
|
|
2404
|
+
module CollectionSchedule
|
|
2405
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2406
|
+
|
|
2407
|
+
ADVANCE = :ADVANCE
|
|
2408
|
+
ARREARS = :ARREARS
|
|
2409
|
+
|
|
2410
|
+
# @!method self.values
|
|
2411
|
+
# @return [Array<Symbol>]
|
|
2412
|
+
end
|
|
2413
|
+
|
|
2414
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription#proration
|
|
2415
|
+
class Proration < MetronomeSDK::Internal::Type::BaseModel
|
|
2416
|
+
# @!attribute invoice_behavior
|
|
2417
|
+
# Indicates how mid-period quantity adjustments are invoiced.
|
|
2418
|
+
# **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
|
|
2419
|
+
# quantity increase will be billed immediately on the scheduled date.
|
|
2420
|
+
# **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
|
|
2421
|
+
# in-arrears at the end of the period.
|
|
2422
|
+
#
|
|
2423
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration::InvoiceBehavior, nil]
|
|
2424
|
+
optional :invoice_behavior,
|
|
2425
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::InvoiceBehavior }
|
|
2426
|
+
|
|
2427
|
+
# @!attribute is_prorated
|
|
2428
|
+
# Indicates if the partial period will be prorated or charged a full amount.
|
|
2429
|
+
#
|
|
2430
|
+
# @return [Boolean, nil]
|
|
2431
|
+
optional :is_prorated, MetronomeSDK::Internal::Type::Boolean
|
|
2432
|
+
|
|
2433
|
+
# @!method initialize(invoice_behavior: nil, is_prorated: nil)
|
|
2434
|
+
# Some parameter documentations has been truncated, see
|
|
2435
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration} for
|
|
2436
|
+
# more details.
|
|
2437
|
+
#
|
|
2438
|
+
# @param invoice_behavior [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration::InvoiceBehavior] Indicates how mid-period quantity adjustments are invoiced.
|
|
2439
|
+
#
|
|
2440
|
+
# @param is_prorated [Boolean] Indicates if the partial period will be prorated or charged a full amount.
|
|
2441
|
+
|
|
2442
|
+
# Indicates how mid-period quantity adjustments are invoiced.
|
|
2443
|
+
# **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
|
|
2444
|
+
# quantity increase will be billed immediately on the scheduled date.
|
|
2445
|
+
# **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
|
|
2446
|
+
# in-arrears at the end of the period.
|
|
2447
|
+
#
|
|
2448
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration#invoice_behavior
|
|
2449
|
+
module InvoiceBehavior
|
|
2450
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2451
|
+
|
|
2452
|
+
BILL_IMMEDIATELY = :BILL_IMMEDIATELY
|
|
2453
|
+
BILL_ON_NEXT_COLLECTION_DATE = :BILL_ON_NEXT_COLLECTION_DATE
|
|
2454
|
+
|
|
2455
|
+
# @!method self.values
|
|
2456
|
+
# @return [Array<Symbol>]
|
|
2457
|
+
end
|
|
2458
|
+
end
|
|
2459
|
+
|
|
2460
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription#subscription_rate
|
|
2461
|
+
class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
|
|
2462
|
+
# @!attribute billing_frequency
|
|
2463
|
+
# Frequency to bill subscription with. Together with product_id, must match
|
|
2464
|
+
# existing rate on the rate card.
|
|
2465
|
+
#
|
|
2466
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::SubscriptionRate::BillingFrequency]
|
|
2467
|
+
required :billing_frequency,
|
|
2468
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::Subscription::SubscriptionRate::BillingFrequency }
|
|
2469
|
+
|
|
2470
|
+
# @!attribute product_id
|
|
2471
|
+
# Must be subscription type product
|
|
2472
|
+
#
|
|
2473
|
+
# @return [String]
|
|
2474
|
+
required :product_id, String
|
|
2475
|
+
|
|
2476
|
+
# @!method initialize(billing_frequency:, product_id:)
|
|
2477
|
+
# Some parameter documentations has been truncated, see
|
|
2478
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Subscription::SubscriptionRate}
|
|
2479
|
+
# for more details.
|
|
2480
|
+
#
|
|
2481
|
+
# @param billing_frequency [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::SubscriptionRate::BillingFrequency] Frequency to bill subscription with. Together with product_id, must match existi
|
|
2482
|
+
#
|
|
2483
|
+
# @param product_id [String] Must be subscription type product
|
|
2484
|
+
|
|
2485
|
+
# Frequency to bill subscription with. Together with product_id, must match
|
|
2486
|
+
# existing rate on the rate card.
|
|
2487
|
+
#
|
|
2488
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription::SubscriptionRate#billing_frequency
|
|
2489
|
+
module BillingFrequency
|
|
2490
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2491
|
+
|
|
2492
|
+
MONTHLY = :MONTHLY
|
|
2493
|
+
QUARTERLY = :QUARTERLY
|
|
2494
|
+
ANNUAL = :ANNUAL
|
|
2495
|
+
WEEKLY = :WEEKLY
|
|
2496
|
+
|
|
2497
|
+
# @!method self.values
|
|
2498
|
+
# @return [Array<Symbol>]
|
|
2499
|
+
end
|
|
2500
|
+
end
|
|
2501
|
+
|
|
2502
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription#duration
|
|
2503
|
+
class Duration < MetronomeSDK::Internal::Type::BaseModel
|
|
2504
|
+
# @!attribute unit
|
|
2505
|
+
#
|
|
2506
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Duration::Unit]
|
|
2507
|
+
required :unit, enum: -> { MetronomeSDK::V1::PackageCreateParams::Subscription::Duration::Unit }
|
|
2508
|
+
|
|
2509
|
+
# @!attribute value
|
|
2510
|
+
#
|
|
2511
|
+
# @return [Integer]
|
|
2512
|
+
required :value, Integer
|
|
2513
|
+
|
|
2514
|
+
# @!method initialize(unit:, value:)
|
|
2515
|
+
# Lifetime of the subscription from its start. If not provided, subscription
|
|
2516
|
+
# inherits contract end date.
|
|
2517
|
+
#
|
|
2518
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Duration::Unit]
|
|
2519
|
+
# @param value [Integer]
|
|
2520
|
+
|
|
2521
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Duration#unit
|
|
2522
|
+
module Unit
|
|
2523
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2524
|
+
|
|
2525
|
+
DAYS = :DAYS
|
|
2526
|
+
WEEKS = :WEEKS
|
|
2527
|
+
MONTHS = :MONTHS
|
|
2528
|
+
YEARS = :YEARS
|
|
2529
|
+
|
|
2530
|
+
# @!method self.values
|
|
2531
|
+
# @return [Array<Symbol>]
|
|
2532
|
+
end
|
|
2533
|
+
end
|
|
2534
|
+
|
|
2535
|
+
# Determines how the subscription's quantity is controlled. Defaults to
|
|
2536
|
+
# QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
2537
|
+
# directly on the subscription. `initial_quantity` must be provided with this
|
|
2538
|
+
# option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
2539
|
+
# **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
|
|
2540
|
+
# user_123) to increment and decrement a subscription quantity, rather than
|
|
2541
|
+
# directly providing the quantity. You must use a **SEAT_BASED** subscription to
|
|
2542
|
+
# use a linked recurring credit with an allocation per seat. `seat_config` must be
|
|
2543
|
+
# provided with this option.
|
|
2544
|
+
#
|
|
2545
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription#quantity_management_mode
|
|
2546
|
+
module QuantityManagementMode
|
|
2547
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2548
|
+
|
|
2549
|
+
SEAT_BASED = :SEAT_BASED
|
|
2550
|
+
QUANTITY_ONLY = :QUANTITY_ONLY
|
|
2551
|
+
|
|
2552
|
+
# @!method self.values
|
|
2553
|
+
# @return [Array<Symbol>]
|
|
2554
|
+
end
|
|
2555
|
+
|
|
2556
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription#seat_config
|
|
2557
|
+
class SeatConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
2558
|
+
# @!attribute seat_group_key
|
|
2559
|
+
# The property name, sent on usage events, that identifies the seat ID associated
|
|
2560
|
+
# with the usage event. For example, the property name might be seat_id or
|
|
2561
|
+
# user_id. The property must be set as a group key on billable metrics and a
|
|
2562
|
+
# presentation/pricing group key on contract products. This allows linked
|
|
2563
|
+
# recurring credits with an allocation per seat to be consumed by only one seat's
|
|
2564
|
+
# usage.
|
|
2565
|
+
#
|
|
2566
|
+
# @return [String]
|
|
2567
|
+
required :seat_group_key, String
|
|
2568
|
+
|
|
2569
|
+
# @!attribute initial_unassigned_seats
|
|
2570
|
+
# The initial amount of unassigned seats on this subscription.
|
|
2571
|
+
#
|
|
2572
|
+
# @return [Float, nil]
|
|
2573
|
+
optional :initial_unassigned_seats, Float
|
|
2574
|
+
|
|
2575
|
+
# @!method initialize(seat_group_key:, initial_unassigned_seats: nil)
|
|
2576
|
+
# Some parameter documentations has been truncated, see
|
|
2577
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::Subscription::SeatConfig} for
|
|
2578
|
+
# more details.
|
|
2579
|
+
#
|
|
2580
|
+
# @param seat_group_key [String] The property name, sent on usage events, that identifies the seat ID associated
|
|
2581
|
+
#
|
|
2582
|
+
# @param initial_unassigned_seats [Float] The initial amount of unassigned seats on this subscription.
|
|
2583
|
+
end
|
|
2584
|
+
|
|
2585
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription#starting_at_offset
|
|
2586
|
+
class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
|
|
2587
|
+
# @!attribute unit
|
|
2588
|
+
#
|
|
2589
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::StartingAtOffset::Unit]
|
|
2590
|
+
required :unit, enum: -> { MetronomeSDK::V1::PackageCreateParams::Subscription::StartingAtOffset::Unit }
|
|
2591
|
+
|
|
2592
|
+
# @!attribute value
|
|
2593
|
+
#
|
|
2594
|
+
# @return [Integer]
|
|
2595
|
+
required :value, Integer
|
|
2596
|
+
|
|
2597
|
+
# @!method initialize(unit:, value:)
|
|
2598
|
+
# Relative date from contract start date corresponding to the inclusive start time
|
|
2599
|
+
# for the subscription. If not provided, defaults to contract start date
|
|
2600
|
+
#
|
|
2601
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::StartingAtOffset::Unit]
|
|
2602
|
+
# @param value [Integer]
|
|
2603
|
+
|
|
2604
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription::StartingAtOffset#unit
|
|
2605
|
+
module Unit
|
|
2606
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2607
|
+
|
|
2608
|
+
DAYS = :DAYS
|
|
2609
|
+
WEEKS = :WEEKS
|
|
2610
|
+
MONTHS = :MONTHS
|
|
2611
|
+
YEARS = :YEARS
|
|
2612
|
+
|
|
2613
|
+
# @!method self.values
|
|
2614
|
+
# @return [Array<Symbol>]
|
|
2615
|
+
end
|
|
2616
|
+
end
|
|
2617
|
+
end
|
|
2618
|
+
|
|
2619
|
+
class UsageStatementSchedule < MetronomeSDK::Internal::Type::BaseModel
|
|
2620
|
+
# @!attribute frequency
|
|
2621
|
+
#
|
|
2622
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule::Frequency]
|
|
2623
|
+
required :frequency, enum: -> { MetronomeSDK::V1::PackageCreateParams::UsageStatementSchedule::Frequency }
|
|
2624
|
+
|
|
2625
|
+
# @!attribute day
|
|
2626
|
+
# If not provided, defaults to the first day of the month.
|
|
2627
|
+
#
|
|
2628
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule::Day, nil]
|
|
2629
|
+
optional :day, enum: -> { MetronomeSDK::V1::PackageCreateParams::UsageStatementSchedule::Day }
|
|
2630
|
+
|
|
2631
|
+
# @!attribute invoice_generation_starting_at_offset
|
|
2632
|
+
# The offset at which Metronome should start generating usage invoices, relative
|
|
2633
|
+
# to the contract start date. If unspecified, contract start date will be used.
|
|
2634
|
+
# This is useful to set if you want to import historical invoices via our 'Create
|
|
2635
|
+
# Historical Invoices' API rather than having Metronome automatically generate
|
|
2636
|
+
# them.
|
|
2637
|
+
#
|
|
2638
|
+
# @return [MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule::InvoiceGenerationStartingAtOffset, nil]
|
|
2639
|
+
optional :invoice_generation_starting_at_offset,
|
|
2640
|
+
-> { MetronomeSDK::V1::PackageCreateParams::UsageStatementSchedule::InvoiceGenerationStartingAtOffset }
|
|
2641
|
+
|
|
2642
|
+
# @!method initialize(frequency:, day: nil, invoice_generation_starting_at_offset: nil)
|
|
2643
|
+
# Some parameter documentations has been truncated, see
|
|
2644
|
+
# {MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule} for more
|
|
2645
|
+
# details.
|
|
2646
|
+
#
|
|
2647
|
+
# @param frequency [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule::Frequency]
|
|
2648
|
+
#
|
|
2649
|
+
# @param day [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule::Day] If not provided, defaults to the first day of the month.
|
|
2650
|
+
#
|
|
2651
|
+
# @param invoice_generation_starting_at_offset [MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule::InvoiceGenerationStartingAtOffset] The offset at which Metronome should start generating usage invoices, relative t
|
|
2652
|
+
|
|
2653
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule#frequency
|
|
2654
|
+
module Frequency
|
|
2655
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2656
|
+
|
|
2657
|
+
MONTHLY = :MONTHLY
|
|
2658
|
+
QUARTERLY = :QUARTERLY
|
|
2659
|
+
ANNUAL = :ANNUAL
|
|
2660
|
+
WEEKLY = :WEEKLY
|
|
2661
|
+
|
|
2662
|
+
# @!method self.values
|
|
2663
|
+
# @return [Array<Symbol>]
|
|
2664
|
+
end
|
|
2665
|
+
|
|
2666
|
+
# If not provided, defaults to the first day of the month.
|
|
2667
|
+
#
|
|
2668
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule#day
|
|
2669
|
+
module Day
|
|
2670
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2671
|
+
|
|
2672
|
+
FIRST_OF_MONTH = :FIRST_OF_MONTH
|
|
2673
|
+
CONTRACT_START = :CONTRACT_START
|
|
2674
|
+
|
|
2675
|
+
# @!method self.values
|
|
2676
|
+
# @return [Array<Symbol>]
|
|
2677
|
+
end
|
|
2678
|
+
|
|
2679
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule#invoice_generation_starting_at_offset
|
|
2680
|
+
class InvoiceGenerationStartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
|
|
2681
|
+
# @!attribute unit
|
|
2682
|
+
#
|
|
2683
|
+
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule::InvoiceGenerationStartingAtOffset::Unit]
|
|
2684
|
+
required :unit,
|
|
2685
|
+
enum: -> { MetronomeSDK::V1::PackageCreateParams::UsageStatementSchedule::InvoiceGenerationStartingAtOffset::Unit }
|
|
2686
|
+
|
|
2687
|
+
# @!attribute value
|
|
2688
|
+
#
|
|
2689
|
+
# @return [Integer]
|
|
2690
|
+
required :value, Integer
|
|
2691
|
+
|
|
2692
|
+
# @!method initialize(unit:, value:)
|
|
2693
|
+
# The offset at which Metronome should start generating usage invoices, relative
|
|
2694
|
+
# to the contract start date. If unspecified, contract start date will be used.
|
|
2695
|
+
# This is useful to set if you want to import historical invoices via our 'Create
|
|
2696
|
+
# Historical Invoices' API rather than having Metronome automatically generate
|
|
2697
|
+
# them.
|
|
2698
|
+
#
|
|
2699
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule::InvoiceGenerationStartingAtOffset::Unit]
|
|
2700
|
+
# @param value [Integer]
|
|
2701
|
+
|
|
2702
|
+
# @see MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule::InvoiceGenerationStartingAtOffset#unit
|
|
2703
|
+
module Unit
|
|
2704
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2705
|
+
|
|
2706
|
+
DAYS = :DAYS
|
|
2707
|
+
WEEKS = :WEEKS
|
|
2708
|
+
MONTHS = :MONTHS
|
|
2709
|
+
YEARS = :YEARS
|
|
2710
|
+
|
|
2711
|
+
# @!method self.values
|
|
2712
|
+
# @return [Array<Symbol>]
|
|
2713
|
+
end
|
|
2714
|
+
end
|
|
2715
|
+
end
|
|
2716
|
+
end
|
|
2717
|
+
end
|
|
2718
|
+
end
|
|
2719
|
+
end
|