metronome-sdk 0.2.0 → 0.3.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 +25 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/internal/type/array_of.rb +1 -0
- data/lib/metronome_sdk/internal/type/base_model.rb +3 -1
- data/lib/metronome_sdk/internal/type/converter.rb +27 -0
- data/lib/metronome_sdk/internal/type/hash_of.rb +1 -0
- data/lib/metronome_sdk/internal/type/union.rb +9 -7
- data/lib/metronome_sdk/models/schedule_point_in_time.rb +14 -1
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +54 -5
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +60 -11
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +8 -1
- data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +13 -1
- data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +10 -1
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +10 -1
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +76 -13
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +34 -3
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +3 -1
- data/lib/metronome_sdk/resources/v2/contracts.rb +6 -2
- data/lib/metronome_sdk/version.rb +1 -1
- data/rbi/metronome_sdk/internal/type/converter.rbi +58 -0
- data/rbi/metronome_sdk/internal/type/union.rbi +9 -2
- data/rbi/metronome_sdk/models/schedule_point_in_time.rbi +17 -1
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +76 -3
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +84 -11
- data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +9 -0
- data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +16 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +10 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +10 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +96 -11
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +33 -0
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +2 -0
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +8 -0
- data/sig/metronome_sdk/internal/type/converter.rbs +17 -0
- data/sig/metronome_sdk/internal/type/union.rbs +2 -2
- data/sig/metronome_sdk/models/schedule_point_in_time.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +38 -3
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +38 -3
- data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +5 -0
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +5 -0
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +5 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +48 -3
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +17 -0
- data/sig/metronome_sdk/resources/v1/contracts/products.rbs +1 -0
- data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
- metadata +2 -2
@@ -1031,6 +1031,14 @@ module MetronomeSDK
|
|
1031
1031
|
sig { params(credit_type_id: String).void }
|
1032
1032
|
attr_writer :credit_type_id
|
1033
1033
|
|
1034
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
1035
|
+
# schedule will not generate an invoice.
|
1036
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1037
|
+
attr_reader :do_not_invoice
|
1038
|
+
|
1039
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
1040
|
+
attr_writer :do_not_invoice
|
1041
|
+
|
1034
1042
|
# Enter the unit price and quantity for the charge or instead only send the
|
1035
1043
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
1036
1044
|
# quantity is inferred to be 1.
|
@@ -1080,6 +1088,7 @@ module MetronomeSDK
|
|
1080
1088
|
sig do
|
1081
1089
|
params(
|
1082
1090
|
credit_type_id: String,
|
1091
|
+
do_not_invoice: T::Boolean,
|
1083
1092
|
recurring_schedule:
|
1084
1093
|
MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule::OrHash,
|
1085
1094
|
schedule_items:
|
@@ -1091,6 +1100,9 @@ module MetronomeSDK
|
|
1091
1100
|
def self.new(
|
1092
1101
|
# Defaults to USD (cents) if not passed.
|
1093
1102
|
credit_type_id: nil,
|
1103
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
1104
|
+
# schedule will not generate an invoice.
|
1105
|
+
do_not_invoice: nil,
|
1094
1106
|
# Enter the unit price and quantity for the charge or instead only send the
|
1095
1107
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
1096
1108
|
# quantity is inferred to be 1.
|
@@ -1104,6 +1116,7 @@ module MetronomeSDK
|
|
1104
1116
|
override.returns(
|
1105
1117
|
{
|
1106
1118
|
credit_type_id: String,
|
1119
|
+
do_not_invoice: T::Boolean,
|
1107
1120
|
recurring_schedule:
|
1108
1121
|
MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule,
|
1109
1122
|
schedule_items:
|
@@ -1629,12 +1642,27 @@ module MetronomeSDK
|
|
1629
1642
|
sig { params(invoice_metadata: T::Hash[Symbol, String]).void }
|
1630
1643
|
attr_writer :invoice_metadata
|
1631
1644
|
|
1645
|
+
# If true, the payment will be made assuming the customer is present (i.e. on
|
1646
|
+
# session).
|
1647
|
+
#
|
1648
|
+
# If false, the payment will be made assuming the customer is not present (i.e.
|
1649
|
+
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
1650
|
+
# India), the payment may be declined.
|
1651
|
+
#
|
1652
|
+
# If left blank, will default to false.
|
1653
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1654
|
+
attr_reader :on_session_payment
|
1655
|
+
|
1656
|
+
sig { params(on_session_payment: T::Boolean).void }
|
1657
|
+
attr_writer :on_session_payment
|
1658
|
+
|
1632
1659
|
# Only applicable if using STRIPE as your payment gate type.
|
1633
1660
|
sig do
|
1634
1661
|
params(
|
1635
1662
|
payment_type:
|
1636
1663
|
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
1637
|
-
invoice_metadata: T::Hash[Symbol, String]
|
1664
|
+
invoice_metadata: T::Hash[Symbol, String],
|
1665
|
+
on_session_payment: T::Boolean
|
1638
1666
|
).returns(T.attached_class)
|
1639
1667
|
end
|
1640
1668
|
def self.new(
|
@@ -1642,7 +1670,16 @@ module MetronomeSDK
|
|
1642
1670
|
payment_type:,
|
1643
1671
|
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
1644
1672
|
# your payment type.
|
1645
|
-
invoice_metadata: nil
|
1673
|
+
invoice_metadata: nil,
|
1674
|
+
# If true, the payment will be made assuming the customer is present (i.e. on
|
1675
|
+
# session).
|
1676
|
+
#
|
1677
|
+
# If false, the payment will be made assuming the customer is not present (i.e.
|
1678
|
+
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
1679
|
+
# India), the payment may be declined.
|
1680
|
+
#
|
1681
|
+
# If left blank, will default to false.
|
1682
|
+
on_session_payment: nil
|
1646
1683
|
)
|
1647
1684
|
end
|
1648
1685
|
|
@@ -1651,7 +1688,8 @@ module MetronomeSDK
|
|
1651
1688
|
{
|
1652
1689
|
payment_type:
|
1653
1690
|
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
1654
|
-
invoice_metadata: T::Hash[Symbol, String]
|
1691
|
+
invoice_metadata: T::Hash[Symbol, String],
|
1692
|
+
on_session_payment: T::Boolean
|
1655
1693
|
}
|
1656
1694
|
)
|
1657
1695
|
end
|
@@ -2650,6 +2688,14 @@ module MetronomeSDK
|
|
2650
2688
|
sig { params(credit_type_id: String).void }
|
2651
2689
|
attr_writer :credit_type_id
|
2652
2690
|
|
2691
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
2692
|
+
# schedule will not generate an invoice.
|
2693
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2694
|
+
attr_reader :do_not_invoice
|
2695
|
+
|
2696
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
2697
|
+
attr_writer :do_not_invoice
|
2698
|
+
|
2653
2699
|
# Enter the unit price and quantity for the charge or instead only send the
|
2654
2700
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
2655
2701
|
# quantity is inferred to be 1.
|
@@ -2696,6 +2742,7 @@ module MetronomeSDK
|
|
2696
2742
|
sig do
|
2697
2743
|
params(
|
2698
2744
|
credit_type_id: String,
|
2745
|
+
do_not_invoice: T::Boolean,
|
2699
2746
|
recurring_schedule:
|
2700
2747
|
MetronomeSDK::V1::ContractAmendParams::Discount::Schedule::RecurringSchedule::OrHash,
|
2701
2748
|
schedule_items:
|
@@ -2707,6 +2754,9 @@ module MetronomeSDK
|
|
2707
2754
|
def self.new(
|
2708
2755
|
# Defaults to USD (cents) if not passed.
|
2709
2756
|
credit_type_id: nil,
|
2757
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
2758
|
+
# schedule will not generate an invoice.
|
2759
|
+
do_not_invoice: nil,
|
2710
2760
|
# Enter the unit price and quantity for the charge or instead only send the
|
2711
2761
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
2712
2762
|
# quantity is inferred to be 1.
|
@@ -2720,6 +2770,7 @@ module MetronomeSDK
|
|
2720
2770
|
override.returns(
|
2721
2771
|
{
|
2722
2772
|
credit_type_id: String,
|
2773
|
+
do_not_invoice: T::Boolean,
|
2723
2774
|
recurring_schedule:
|
2724
2775
|
MetronomeSDK::V1::ContractAmendParams::Discount::Schedule::RecurringSchedule,
|
2725
2776
|
schedule_items:
|
@@ -4140,6 +4191,12 @@ module MetronomeSDK
|
|
4140
4191
|
end
|
4141
4192
|
attr_writer :schedule
|
4142
4193
|
|
4194
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
4195
|
+
attr_reader :custom_fields
|
4196
|
+
|
4197
|
+
sig { params(custom_fields: T::Hash[Symbol, String]).void }
|
4198
|
+
attr_writer :custom_fields
|
4199
|
+
|
4143
4200
|
# displayed on invoices
|
4144
4201
|
sig { returns(T.nilable(String)) }
|
4145
4202
|
attr_reader :name
|
@@ -4159,6 +4216,7 @@ module MetronomeSDK
|
|
4159
4216
|
product_id: String,
|
4160
4217
|
schedule:
|
4161
4218
|
MetronomeSDK::V1::ContractAmendParams::ScheduledCharge::Schedule::OrHash,
|
4219
|
+
custom_fields: T::Hash[Symbol, String],
|
4162
4220
|
name: String,
|
4163
4221
|
netsuite_sales_order_id: String
|
4164
4222
|
).returns(T.attached_class)
|
@@ -4167,6 +4225,7 @@ module MetronomeSDK
|
|
4167
4225
|
product_id:,
|
4168
4226
|
# Must provide either schedule_items or recurring_schedule.
|
4169
4227
|
schedule:,
|
4228
|
+
custom_fields: nil,
|
4170
4229
|
# displayed on invoices
|
4171
4230
|
name: nil,
|
4172
4231
|
# This field's availability is dependent on your client's configuration.
|
@@ -4180,6 +4239,7 @@ module MetronomeSDK
|
|
4180
4239
|
product_id: String,
|
4181
4240
|
schedule:
|
4182
4241
|
MetronomeSDK::V1::ContractAmendParams::ScheduledCharge::Schedule,
|
4242
|
+
custom_fields: T::Hash[Symbol, String],
|
4183
4243
|
name: String,
|
4184
4244
|
netsuite_sales_order_id: String
|
4185
4245
|
}
|
@@ -4204,6 +4264,14 @@ module MetronomeSDK
|
|
4204
4264
|
sig { params(credit_type_id: String).void }
|
4205
4265
|
attr_writer :credit_type_id
|
4206
4266
|
|
4267
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
4268
|
+
# schedule will not generate an invoice.
|
4269
|
+
sig { returns(T.nilable(T::Boolean)) }
|
4270
|
+
attr_reader :do_not_invoice
|
4271
|
+
|
4272
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
4273
|
+
attr_writer :do_not_invoice
|
4274
|
+
|
4207
4275
|
# Enter the unit price and quantity for the charge or instead only send the
|
4208
4276
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
4209
4277
|
# quantity is inferred to be 1.
|
@@ -4250,6 +4318,7 @@ module MetronomeSDK
|
|
4250
4318
|
sig do
|
4251
4319
|
params(
|
4252
4320
|
credit_type_id: String,
|
4321
|
+
do_not_invoice: T::Boolean,
|
4253
4322
|
recurring_schedule:
|
4254
4323
|
MetronomeSDK::V1::ContractAmendParams::ScheduledCharge::Schedule::RecurringSchedule::OrHash,
|
4255
4324
|
schedule_items:
|
@@ -4261,6 +4330,9 @@ module MetronomeSDK
|
|
4261
4330
|
def self.new(
|
4262
4331
|
# Defaults to USD (cents) if not passed.
|
4263
4332
|
credit_type_id: nil,
|
4333
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
4334
|
+
# schedule will not generate an invoice.
|
4335
|
+
do_not_invoice: nil,
|
4264
4336
|
# Enter the unit price and quantity for the charge or instead only send the
|
4265
4337
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
4266
4338
|
# quantity is inferred to be 1.
|
@@ -4274,6 +4346,7 @@ module MetronomeSDK
|
|
4274
4346
|
override.returns(
|
4275
4347
|
{
|
4276
4348
|
credit_type_id: String,
|
4349
|
+
do_not_invoice: T::Boolean,
|
4277
4350
|
recurring_schedule:
|
4278
4351
|
MetronomeSDK::V1::ContractAmendParams::ScheduledCharge::Schedule::RecurringSchedule,
|
4279
4352
|
schedule_items:
|
@@ -1583,6 +1583,14 @@ module MetronomeSDK
|
|
1583
1583
|
sig { params(credit_type_id: String).void }
|
1584
1584
|
attr_writer :credit_type_id
|
1585
1585
|
|
1586
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
1587
|
+
# schedule will not generate an invoice.
|
1588
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1589
|
+
attr_reader :do_not_invoice
|
1590
|
+
|
1591
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
1592
|
+
attr_writer :do_not_invoice
|
1593
|
+
|
1586
1594
|
# Enter the unit price and quantity for the charge or instead only send the
|
1587
1595
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
1588
1596
|
# quantity is inferred to be 1.
|
@@ -1632,6 +1640,7 @@ module MetronomeSDK
|
|
1632
1640
|
sig do
|
1633
1641
|
params(
|
1634
1642
|
credit_type_id: String,
|
1643
|
+
do_not_invoice: T::Boolean,
|
1635
1644
|
recurring_schedule:
|
1636
1645
|
MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule::OrHash,
|
1637
1646
|
schedule_items:
|
@@ -1643,6 +1652,9 @@ module MetronomeSDK
|
|
1643
1652
|
def self.new(
|
1644
1653
|
# Defaults to USD (cents) if not passed.
|
1645
1654
|
credit_type_id: nil,
|
1655
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
1656
|
+
# schedule will not generate an invoice.
|
1657
|
+
do_not_invoice: nil,
|
1646
1658
|
# Enter the unit price and quantity for the charge or instead only send the
|
1647
1659
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
1648
1660
|
# quantity is inferred to be 1.
|
@@ -1656,6 +1668,7 @@ module MetronomeSDK
|
|
1656
1668
|
override.returns(
|
1657
1669
|
{
|
1658
1670
|
credit_type_id: String,
|
1671
|
+
do_not_invoice: T::Boolean,
|
1659
1672
|
recurring_schedule:
|
1660
1673
|
MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule,
|
1661
1674
|
schedule_items:
|
@@ -2181,12 +2194,27 @@ module MetronomeSDK
|
|
2181
2194
|
sig { params(invoice_metadata: T::Hash[Symbol, String]).void }
|
2182
2195
|
attr_writer :invoice_metadata
|
2183
2196
|
|
2197
|
+
# If true, the payment will be made assuming the customer is present (i.e. on
|
2198
|
+
# session).
|
2199
|
+
#
|
2200
|
+
# If false, the payment will be made assuming the customer is not present (i.e.
|
2201
|
+
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
2202
|
+
# India), the payment may be declined.
|
2203
|
+
#
|
2204
|
+
# If left blank, will default to false.
|
2205
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2206
|
+
attr_reader :on_session_payment
|
2207
|
+
|
2208
|
+
sig { params(on_session_payment: T::Boolean).void }
|
2209
|
+
attr_writer :on_session_payment
|
2210
|
+
|
2184
2211
|
# Only applicable if using STRIPE as your payment gate type.
|
2185
2212
|
sig do
|
2186
2213
|
params(
|
2187
2214
|
payment_type:
|
2188
2215
|
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
2189
|
-
invoice_metadata: T::Hash[Symbol, String]
|
2216
|
+
invoice_metadata: T::Hash[Symbol, String],
|
2217
|
+
on_session_payment: T::Boolean
|
2190
2218
|
).returns(T.attached_class)
|
2191
2219
|
end
|
2192
2220
|
def self.new(
|
@@ -2194,7 +2222,16 @@ module MetronomeSDK
|
|
2194
2222
|
payment_type:,
|
2195
2223
|
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
2196
2224
|
# your payment type.
|
2197
|
-
invoice_metadata: nil
|
2225
|
+
invoice_metadata: nil,
|
2226
|
+
# If true, the payment will be made assuming the customer is present (i.e. on
|
2227
|
+
# session).
|
2228
|
+
#
|
2229
|
+
# If false, the payment will be made assuming the customer is not present (i.e.
|
2230
|
+
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
2231
|
+
# India), the payment may be declined.
|
2232
|
+
#
|
2233
|
+
# If left blank, will default to false.
|
2234
|
+
on_session_payment: nil
|
2198
2235
|
)
|
2199
2236
|
end
|
2200
2237
|
|
@@ -2203,7 +2240,8 @@ module MetronomeSDK
|
|
2203
2240
|
{
|
2204
2241
|
payment_type:
|
2205
2242
|
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
2206
|
-
invoice_metadata: T::Hash[Symbol, String]
|
2243
|
+
invoice_metadata: T::Hash[Symbol, String],
|
2244
|
+
on_session_payment: T::Boolean
|
2207
2245
|
}
|
2208
2246
|
)
|
2209
2247
|
end
|
@@ -3202,6 +3240,14 @@ module MetronomeSDK
|
|
3202
3240
|
sig { params(credit_type_id: String).void }
|
3203
3241
|
attr_writer :credit_type_id
|
3204
3242
|
|
3243
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
3244
|
+
# schedule will not generate an invoice.
|
3245
|
+
sig { returns(T.nilable(T::Boolean)) }
|
3246
|
+
attr_reader :do_not_invoice
|
3247
|
+
|
3248
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
3249
|
+
attr_writer :do_not_invoice
|
3250
|
+
|
3205
3251
|
# Enter the unit price and quantity for the charge or instead only send the
|
3206
3252
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
3207
3253
|
# quantity is inferred to be 1.
|
@@ -3248,6 +3294,7 @@ module MetronomeSDK
|
|
3248
3294
|
sig do
|
3249
3295
|
params(
|
3250
3296
|
credit_type_id: String,
|
3297
|
+
do_not_invoice: T::Boolean,
|
3251
3298
|
recurring_schedule:
|
3252
3299
|
MetronomeSDK::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule::OrHash,
|
3253
3300
|
schedule_items:
|
@@ -3259,6 +3306,9 @@ module MetronomeSDK
|
|
3259
3306
|
def self.new(
|
3260
3307
|
# Defaults to USD (cents) if not passed.
|
3261
3308
|
credit_type_id: nil,
|
3309
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
3310
|
+
# schedule will not generate an invoice.
|
3311
|
+
do_not_invoice: nil,
|
3262
3312
|
# Enter the unit price and quantity for the charge or instead only send the
|
3263
3313
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
3264
3314
|
# quantity is inferred to be 1.
|
@@ -3272,6 +3322,7 @@ module MetronomeSDK
|
|
3272
3322
|
override.returns(
|
3273
3323
|
{
|
3274
3324
|
credit_type_id: String,
|
3325
|
+
do_not_invoice: T::Boolean,
|
3275
3326
|
recurring_schedule:
|
3276
3327
|
MetronomeSDK::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule,
|
3277
3328
|
schedule_items:
|
@@ -5545,8 +5596,8 @@ module MetronomeSDK
|
|
5545
5596
|
sig { returns(Float) }
|
5546
5597
|
attr_accessor :unit_price
|
5547
5598
|
|
5548
|
-
# This field is
|
5549
|
-
#
|
5599
|
+
# This field is required unless a subscription is attached via
|
5600
|
+
# `subscription_config`.
|
5550
5601
|
sig { returns(T.nilable(Float)) }
|
5551
5602
|
attr_reader :quantity
|
5552
5603
|
|
@@ -5564,8 +5615,8 @@ module MetronomeSDK
|
|
5564
5615
|
def self.new(
|
5565
5616
|
credit_type_id:,
|
5566
5617
|
unit_price:,
|
5567
|
-
# This field is
|
5568
|
-
#
|
5618
|
+
# This field is required unless a subscription is attached via
|
5619
|
+
# `subscription_config`.
|
5569
5620
|
quantity: nil
|
5570
5621
|
)
|
5571
5622
|
end
|
@@ -6687,8 +6738,8 @@ module MetronomeSDK
|
|
6687
6738
|
sig { returns(Float) }
|
6688
6739
|
attr_accessor :unit_price
|
6689
6740
|
|
6690
|
-
# This field is
|
6691
|
-
#
|
6741
|
+
# This field is required unless a subscription is attached via
|
6742
|
+
# `subscription_config`.
|
6692
6743
|
sig { returns(T.nilable(Float)) }
|
6693
6744
|
attr_reader :quantity
|
6694
6745
|
|
@@ -6706,8 +6757,8 @@ module MetronomeSDK
|
|
6706
6757
|
def self.new(
|
6707
6758
|
credit_type_id:,
|
6708
6759
|
unit_price:,
|
6709
|
-
# This field is
|
6710
|
-
#
|
6760
|
+
# This field is required unless a subscription is attached via
|
6761
|
+
# `subscription_config`.
|
6711
6762
|
quantity: nil
|
6712
6763
|
)
|
6713
6764
|
end
|
@@ -7721,6 +7772,12 @@ module MetronomeSDK
|
|
7721
7772
|
end
|
7722
7773
|
attr_writer :schedule
|
7723
7774
|
|
7775
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
7776
|
+
attr_reader :custom_fields
|
7777
|
+
|
7778
|
+
sig { params(custom_fields: T::Hash[Symbol, String]).void }
|
7779
|
+
attr_writer :custom_fields
|
7780
|
+
|
7724
7781
|
# displayed on invoices
|
7725
7782
|
sig { returns(T.nilable(String)) }
|
7726
7783
|
attr_reader :name
|
@@ -7740,6 +7797,7 @@ module MetronomeSDK
|
|
7740
7797
|
product_id: String,
|
7741
7798
|
schedule:
|
7742
7799
|
MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::OrHash,
|
7800
|
+
custom_fields: T::Hash[Symbol, String],
|
7743
7801
|
name: String,
|
7744
7802
|
netsuite_sales_order_id: String
|
7745
7803
|
).returns(T.attached_class)
|
@@ -7748,6 +7806,7 @@ module MetronomeSDK
|
|
7748
7806
|
product_id:,
|
7749
7807
|
# Must provide either schedule_items or recurring_schedule.
|
7750
7808
|
schedule:,
|
7809
|
+
custom_fields: nil,
|
7751
7810
|
# displayed on invoices
|
7752
7811
|
name: nil,
|
7753
7812
|
# This field's availability is dependent on your client's configuration.
|
@@ -7761,6 +7820,7 @@ module MetronomeSDK
|
|
7761
7820
|
product_id: String,
|
7762
7821
|
schedule:
|
7763
7822
|
MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule,
|
7823
|
+
custom_fields: T::Hash[Symbol, String],
|
7764
7824
|
name: String,
|
7765
7825
|
netsuite_sales_order_id: String
|
7766
7826
|
}
|
@@ -7785,6 +7845,14 @@ module MetronomeSDK
|
|
7785
7845
|
sig { params(credit_type_id: String).void }
|
7786
7846
|
attr_writer :credit_type_id
|
7787
7847
|
|
7848
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
7849
|
+
# schedule will not generate an invoice.
|
7850
|
+
sig { returns(T.nilable(T::Boolean)) }
|
7851
|
+
attr_reader :do_not_invoice
|
7852
|
+
|
7853
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
7854
|
+
attr_writer :do_not_invoice
|
7855
|
+
|
7788
7856
|
# Enter the unit price and quantity for the charge or instead only send the
|
7789
7857
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
7790
7858
|
# quantity is inferred to be 1.
|
@@ -7831,6 +7899,7 @@ module MetronomeSDK
|
|
7831
7899
|
sig do
|
7832
7900
|
params(
|
7833
7901
|
credit_type_id: String,
|
7902
|
+
do_not_invoice: T::Boolean,
|
7834
7903
|
recurring_schedule:
|
7835
7904
|
MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule::OrHash,
|
7836
7905
|
schedule_items:
|
@@ -7842,6 +7911,9 @@ module MetronomeSDK
|
|
7842
7911
|
def self.new(
|
7843
7912
|
# Defaults to USD (cents) if not passed.
|
7844
7913
|
credit_type_id: nil,
|
7914
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
7915
|
+
# schedule will not generate an invoice.
|
7916
|
+
do_not_invoice: nil,
|
7845
7917
|
# Enter the unit price and quantity for the charge or instead only send the
|
7846
7918
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
7847
7919
|
# quantity is inferred to be 1.
|
@@ -7855,6 +7927,7 @@ module MetronomeSDK
|
|
7855
7927
|
override.returns(
|
7856
7928
|
{
|
7857
7929
|
credit_type_id: String,
|
7930
|
+
do_not_invoice: T::Boolean,
|
7858
7931
|
recurring_schedule:
|
7859
7932
|
MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule,
|
7860
7933
|
schedule_items:
|
@@ -48,6 +48,12 @@ module MetronomeSDK
|
|
48
48
|
sig { params(composite_tags: T::Array[String]).void }
|
49
49
|
attr_writer :composite_tags
|
50
50
|
|
51
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
52
|
+
attr_reader :custom_fields
|
53
|
+
|
54
|
+
sig { params(custom_fields: T::Hash[Symbol, String]).void }
|
55
|
+
attr_writer :custom_fields
|
56
|
+
|
51
57
|
# Beta feature only available for composite products. If true, products with $0
|
52
58
|
# will not be included when computing composite usage. Defaults to false
|
53
59
|
sig { returns(T.nilable(T::Boolean)) }
|
@@ -150,6 +156,7 @@ module MetronomeSDK
|
|
150
156
|
billable_metric_id: String,
|
151
157
|
composite_product_ids: T::Array[String],
|
152
158
|
composite_tags: T::Array[String],
|
159
|
+
custom_fields: T::Hash[Symbol, String],
|
153
160
|
exclude_free_usage: T::Boolean,
|
154
161
|
is_refundable: T::Boolean,
|
155
162
|
netsuite_internal_item_id: String,
|
@@ -178,6 +185,7 @@ module MetronomeSDK
|
|
178
185
|
composite_product_ids: nil,
|
179
186
|
# Required for COMPOSITE products
|
180
187
|
composite_tags: nil,
|
188
|
+
custom_fields: nil,
|
181
189
|
# Beta feature only available for composite products. If true, products with $0
|
182
190
|
# will not be included when computing composite usage. Defaults to false
|
183
191
|
exclude_free_usage: nil,
|
@@ -224,6 +232,7 @@ module MetronomeSDK
|
|
224
232
|
billable_metric_id: String,
|
225
233
|
composite_product_ids: T::Array[String],
|
226
234
|
composite_tags: T::Array[String],
|
235
|
+
custom_fields: T::Hash[Symbol, String],
|
227
236
|
exclude_free_usage: T::Boolean,
|
228
237
|
is_refundable: T::Boolean,
|
229
238
|
netsuite_internal_item_id: String,
|
@@ -469,6 +469,14 @@ module MetronomeSDK
|
|
469
469
|
sig { params(credit_type_id: String).void }
|
470
470
|
attr_writer :credit_type_id
|
471
471
|
|
472
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
473
|
+
# schedule will not generate an invoice.
|
474
|
+
sig { returns(T.nilable(T::Boolean)) }
|
475
|
+
attr_reader :do_not_invoice
|
476
|
+
|
477
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
478
|
+
attr_writer :do_not_invoice
|
479
|
+
|
472
480
|
# Enter the unit price and quantity for the charge or instead only send the
|
473
481
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
474
482
|
# quantity is inferred to be 1.
|
@@ -518,6 +526,7 @@ module MetronomeSDK
|
|
518
526
|
sig do
|
519
527
|
params(
|
520
528
|
credit_type_id: String,
|
529
|
+
do_not_invoice: T::Boolean,
|
521
530
|
recurring_schedule:
|
522
531
|
MetronomeSDK::V1::Customers::CommitCreateParams::InvoiceSchedule::RecurringSchedule::OrHash,
|
523
532
|
schedule_items:
|
@@ -529,6 +538,9 @@ module MetronomeSDK
|
|
529
538
|
def self.new(
|
530
539
|
# Defaults to USD (cents) if not passed.
|
531
540
|
credit_type_id: nil,
|
541
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
542
|
+
# schedule will not generate an invoice.
|
543
|
+
do_not_invoice: nil,
|
532
544
|
# Enter the unit price and quantity for the charge or instead only send the
|
533
545
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
534
546
|
# quantity is inferred to be 1.
|
@@ -542,6 +554,7 @@ module MetronomeSDK
|
|
542
554
|
override.returns(
|
543
555
|
{
|
544
556
|
credit_type_id: String,
|
557
|
+
do_not_invoice: T::Boolean,
|
545
558
|
recurring_schedule:
|
546
559
|
MetronomeSDK::V1::Customers::CommitCreateParams::InvoiceSchedule::RecurringSchedule,
|
547
560
|
schedule_items:
|
@@ -384,6 +384,14 @@ module MetronomeSDK
|
|
384
384
|
sig { returns(Float) }
|
385
385
|
attr_accessor :total
|
386
386
|
|
387
|
+
# The type of line item. Possible values are 'aws_royalty',
|
388
|
+
# 'applied_commit_or_credit', 'scheduled', 'commit_purchase', 'cpu_conversion',
|
389
|
+
# 'discount', 'gcp_royalty', 'postpaid_trueup', 'professional_services',
|
390
|
+
# 'subscription', 'usage', 'legacy', 'minimum', 'product_charge',
|
391
|
+
# 'trial_discount', 'rollover', 'seat', 'grouped_charge'.
|
392
|
+
sig { returns(String) }
|
393
|
+
attr_accessor :type
|
394
|
+
|
387
395
|
# Details about the credit or commit that was applied to this line item. Only
|
388
396
|
# present on line items with product of `USAGE`, `SUBSCRIPTION` or `COMPOSITE`
|
389
397
|
# types.
|
@@ -713,6 +721,7 @@ module MetronomeSDK
|
|
713
721
|
credit_type: MetronomeSDK::CreditTypeData::OrHash,
|
714
722
|
name: String,
|
715
723
|
total: Float,
|
724
|
+
type: String,
|
716
725
|
applied_commit_or_credit:
|
717
726
|
MetronomeSDK::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit::OrHash,
|
718
727
|
commit_custom_fields: T::Hash[Symbol, String],
|
@@ -763,6 +772,12 @@ module MetronomeSDK
|
|
763
772
|
credit_type:,
|
764
773
|
name:,
|
765
774
|
total:,
|
775
|
+
# The type of line item. Possible values are 'aws_royalty',
|
776
|
+
# 'applied_commit_or_credit', 'scheduled', 'commit_purchase', 'cpu_conversion',
|
777
|
+
# 'discount', 'gcp_royalty', 'postpaid_trueup', 'professional_services',
|
778
|
+
# 'subscription', 'usage', 'legacy', 'minimum', 'product_charge',
|
779
|
+
# 'trial_discount', 'rollover', 'seat', 'grouped_charge'.
|
780
|
+
type:,
|
766
781
|
# Details about the credit or commit that was applied to this line item. Only
|
767
782
|
# present on line items with product of `USAGE`, `SUBSCRIPTION` or `COMPOSITE`
|
768
783
|
# types.
|
@@ -843,6 +858,7 @@ module MetronomeSDK
|
|
843
858
|
credit_type: MetronomeSDK::CreditTypeData,
|
844
859
|
name: String,
|
845
860
|
total: Float,
|
861
|
+
type: String,
|
846
862
|
applied_commit_or_credit:
|
847
863
|
MetronomeSDK::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit,
|
848
864
|
commit_custom_fields: T::Hash[Symbol, String],
|
@@ -76,6 +76,11 @@ module MetronomeSDK
|
|
76
76
|
end
|
77
77
|
attr_writer :invoice_schedule
|
78
78
|
|
79
|
+
# If multiple commits are applicable, the one with the lower priority will apply
|
80
|
+
# first.
|
81
|
+
sig { returns(T.nilable(Float)) }
|
82
|
+
attr_accessor :priority
|
83
|
+
|
79
84
|
sig { returns(T.nilable(String)) }
|
80
85
|
attr_reader :product_id
|
81
86
|
|
@@ -108,6 +113,7 @@ module MetronomeSDK
|
|
108
113
|
invoice_contract_id: String,
|
109
114
|
invoice_schedule:
|
110
115
|
MetronomeSDK::V2::ContractEditCommitParams::InvoiceSchedule::OrHash,
|
116
|
+
priority: T.nilable(Float),
|
111
117
|
product_id: String,
|
112
118
|
specifiers:
|
113
119
|
T.nilable(
|
@@ -135,6 +141,9 @@ module MetronomeSDK
|
|
135
141
|
# ID of contract to use for invoicing
|
136
142
|
invoice_contract_id: nil,
|
137
143
|
invoice_schedule: nil,
|
144
|
+
# If multiple commits are applicable, the one with the lower priority will apply
|
145
|
+
# first.
|
146
|
+
priority: nil,
|
138
147
|
product_id: nil,
|
139
148
|
# List of filters that determine what kind of customer usage draws down a commit
|
140
149
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
@@ -159,6 +168,7 @@ module MetronomeSDK
|
|
159
168
|
invoice_contract_id: String,
|
160
169
|
invoice_schedule:
|
161
170
|
MetronomeSDK::V2::ContractEditCommitParams::InvoiceSchedule,
|
171
|
+
priority: T.nilable(Float),
|
162
172
|
product_id: String,
|
163
173
|
specifiers:
|
164
174
|
T.nilable(
|
@@ -50,6 +50,11 @@ module MetronomeSDK
|
|
50
50
|
sig { returns(T.nilable(T::Array[String])) }
|
51
51
|
attr_accessor :applicable_product_tags
|
52
52
|
|
53
|
+
# If multiple commits are applicable, the one with the lower priority will apply
|
54
|
+
# first.
|
55
|
+
sig { returns(T.nilable(Float)) }
|
56
|
+
attr_accessor :priority
|
57
|
+
|
53
58
|
sig { returns(T.nilable(String)) }
|
54
59
|
attr_reader :product_id
|
55
60
|
|
@@ -79,6 +84,7 @@ module MetronomeSDK
|
|
79
84
|
MetronomeSDK::V2::ContractEditCreditParams::AccessSchedule::OrHash,
|
80
85
|
applicable_product_ids: T.nilable(T::Array[String]),
|
81
86
|
applicable_product_tags: T.nilable(T::Array[String]),
|
87
|
+
priority: T.nilable(Float),
|
82
88
|
product_id: String,
|
83
89
|
specifiers:
|
84
90
|
T.nilable(
|
@@ -101,6 +107,9 @@ module MetronomeSDK
|
|
101
107
|
# Which tags the credit applies to. If both applicable_product_ids and
|
102
108
|
# applicable_product_tags are not provided, the credit applies to all products.
|
103
109
|
applicable_product_tags: nil,
|
110
|
+
# If multiple commits are applicable, the one with the lower priority will apply
|
111
|
+
# first.
|
112
|
+
priority: nil,
|
104
113
|
product_id: nil,
|
105
114
|
# List of filters that determine what kind of customer usage draws down a commit
|
106
115
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
@@ -122,6 +131,7 @@ module MetronomeSDK
|
|
122
131
|
MetronomeSDK::V2::ContractEditCreditParams::AccessSchedule,
|
123
132
|
applicable_product_ids: T.nilable(T::Array[String]),
|
124
133
|
applicable_product_tags: T.nilable(T::Array[String]),
|
134
|
+
priority: T.nilable(Float),
|
125
135
|
product_id: String,
|
126
136
|
specifiers:
|
127
137
|
T.nilable(
|