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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/internal/type/array_of.rb +1 -0
  5. data/lib/metronome_sdk/internal/type/base_model.rb +3 -1
  6. data/lib/metronome_sdk/internal/type/converter.rb +27 -0
  7. data/lib/metronome_sdk/internal/type/hash_of.rb +1 -0
  8. data/lib/metronome_sdk/internal/type/union.rb +9 -7
  9. data/lib/metronome_sdk/models/schedule_point_in_time.rb +14 -1
  10. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +54 -5
  11. data/lib/metronome_sdk/models/v1/contract_create_params.rb +60 -11
  12. data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +8 -1
  13. data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +10 -1
  14. data/lib/metronome_sdk/models/v1/customers/invoice.rb +13 -1
  15. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +10 -1
  16. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +10 -1
  17. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +76 -13
  18. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +34 -3
  19. data/lib/metronome_sdk/resources/v1/contracts/products.rb +3 -1
  20. data/lib/metronome_sdk/resources/v2/contracts.rb +6 -2
  21. data/lib/metronome_sdk/version.rb +1 -1
  22. data/rbi/metronome_sdk/internal/type/converter.rbi +58 -0
  23. data/rbi/metronome_sdk/internal/type/union.rbi +9 -2
  24. data/rbi/metronome_sdk/models/schedule_point_in_time.rbi +17 -1
  25. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +76 -3
  26. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +84 -11
  27. data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +9 -0
  28. data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +13 -0
  29. data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +16 -0
  30. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +10 -0
  31. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +10 -0
  32. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +96 -11
  33. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +33 -0
  34. data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +2 -0
  35. data/rbi/metronome_sdk/resources/v2/contracts.rbi +8 -0
  36. data/sig/metronome_sdk/internal/type/converter.rbs +17 -0
  37. data/sig/metronome_sdk/internal/type/union.rbs +2 -2
  38. data/sig/metronome_sdk/models/schedule_point_in_time.rbs +7 -0
  39. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +38 -3
  40. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +38 -3
  41. data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +7 -0
  42. data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +7 -0
  43. data/sig/metronome_sdk/models/v1/customers/invoice.rbs +5 -0
  44. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +5 -0
  45. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +5 -0
  46. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +48 -3
  47. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +17 -0
  48. data/sig/metronome_sdk/resources/v1/contracts/products.rbs +1 -0
  49. data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
  50. metadata +2 -2
@@ -52,6 +52,13 @@ module MetronomeSDK
52
52
  # @return [MetronomeSDK::Models::V2::ContractEditCommitParams::InvoiceSchedule, nil]
53
53
  optional :invoice_schedule, -> { MetronomeSDK::V2::ContractEditCommitParams::InvoiceSchedule }
54
54
 
55
+ # @!attribute priority
56
+ # If multiple commits are applicable, the one with the lower priority will apply
57
+ # first.
58
+ #
59
+ # @return [Float, nil]
60
+ optional :priority, Float, nil?: true
61
+
55
62
  # @!attribute product_id
56
63
  #
57
64
  # @return [String, nil]
@@ -72,7 +79,7 @@ module MetronomeSDK
72
79
  },
73
80
  nil?: true
74
81
 
75
- # @!method initialize(commit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, invoice_contract_id: nil, invoice_schedule: nil, product_id: nil, specifiers: nil, request_options: {})
82
+ # @!method initialize(commit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, invoice_contract_id: nil, invoice_schedule: nil, priority: nil, product_id: nil, specifiers: nil, request_options: {})
76
83
  # Some parameter documentations has been truncated, see
77
84
  # {MetronomeSDK::Models::V2::ContractEditCommitParams} for more details.
78
85
  #
@@ -90,6 +97,8 @@ module MetronomeSDK
90
97
  #
91
98
  # @param invoice_schedule [MetronomeSDK::Models::V2::ContractEditCommitParams::InvoiceSchedule]
92
99
  #
100
+ # @param priority [Float, nil] If multiple commits are applicable, the one with the lower priority will apply f
101
+ #
93
102
  # @param product_id [String]
94
103
  #
95
104
  # @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditCommitParams::Specifier>, nil] List of filters that determine what kind of customer usage draws down a commit o
@@ -39,6 +39,13 @@ module MetronomeSDK
39
39
  # @return [Array<String>, nil]
40
40
  optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
41
41
 
42
+ # @!attribute priority
43
+ # If multiple commits are applicable, the one with the lower priority will apply
44
+ # first.
45
+ #
46
+ # @return [Float, nil]
47
+ optional :priority, Float, nil?: true
48
+
42
49
  # @!attribute product_id
43
50
  #
44
51
  # @return [String, nil]
@@ -59,7 +66,7 @@ module MetronomeSDK
59
66
  },
60
67
  nil?: true
61
68
 
62
- # @!method initialize(credit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, product_id: nil, specifiers: nil, request_options: {})
69
+ # @!method initialize(credit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, priority: nil, product_id: nil, specifiers: nil, request_options: {})
63
70
  # Some parameter documentations has been truncated, see
64
71
  # {MetronomeSDK::Models::V2::ContractEditCreditParams} for more details.
65
72
  #
@@ -73,6 +80,8 @@ module MetronomeSDK
73
80
  #
74
81
  # @param applicable_product_tags [Array<String>, nil] Which tags the credit applies to. If both applicable*product_ids and applicable*
75
82
  #
83
+ # @param priority [Float, nil] If multiple commits are applicable, the one with the lower priority will apply f
84
+ #
76
85
  # @param product_id [String]
77
86
  #
78
87
  # @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditCreditParams::Specifier>, nil] List of filters that determine what kind of customer usage draws down a commit o
@@ -649,6 +649,13 @@ module MetronomeSDK
649
649
  # @return [String, nil]
650
650
  optional :credit_type_id, String
651
651
 
652
+ # @!attribute do_not_invoice
653
+ # This field is only applicable to commit invoice schedules. If true, this
654
+ # schedule will not generate an invoice.
655
+ #
656
+ # @return [Boolean, nil]
657
+ optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean
658
+
652
659
  # @!attribute recurring_schedule
653
660
  # Enter the unit price and quantity for the charge or instead only send the
654
661
  # amount. If amount is sent, the unit price is assumed to be the amount and
@@ -669,7 +676,7 @@ module MetronomeSDK
669
676
  MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule::ScheduleItem]
670
677
  }
671
678
 
672
- # @!method initialize(credit_type_id: nil, recurring_schedule: nil, schedule_items: nil)
679
+ # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
673
680
  # Some parameter documentations has been truncated, see
674
681
  # {MetronomeSDK::Models::V2::ContractEditParams::AddCommit::InvoiceSchedule} for
675
682
  # more details.
@@ -681,6 +688,8 @@ module MetronomeSDK
681
688
  #
682
689
  # @param credit_type_id [String] Defaults to USD (cents) if not passed.
683
690
  #
691
+ # @param do_not_invoice [Boolean] This field is only applicable to commit invoice schedules. If true, this schedul
692
+ #
684
693
  # @param recurring_schedule [MetronomeSDK::Models::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule] Enter the unit price and quantity for the charge or instead only send the amount
685
694
  #
686
695
  # @param schedule_items [Array<MetronomeSDK::Models::V2::ContractEditParams::AddCommit::InvoiceSchedule::ScheduleItem>] Either provide amount or provide both unit_price and quantity.
@@ -952,7 +961,20 @@ module MetronomeSDK
952
961
  # @return [Hash{Symbol=>String}, nil]
953
962
  optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
954
963
 
955
- # @!method initialize(payment_type:, invoice_metadata: nil)
964
+ # @!attribute on_session_payment
965
+ # If true, the payment will be made assuming the customer is present (i.e. on
966
+ # session).
967
+ #
968
+ # If false, the payment will be made assuming the customer is not present (i.e.
969
+ # off session). For cardholders from a country with an e-mandate requirement (e.g.
970
+ # India), the payment may be declined.
971
+ #
972
+ # If left blank, will default to false.
973
+ #
974
+ # @return [Boolean, nil]
975
+ optional :on_session_payment, MetronomeSDK::Internal::Type::Boolean
976
+
977
+ # @!method initialize(payment_type:, invoice_metadata: nil, on_session_payment: nil)
956
978
  # Some parameter documentations has been truncated, see
957
979
  # {MetronomeSDK::Models::V2::ContractEditParams::AddCommit::PaymentGateConfig::StripeConfig}
958
980
  # for more details.
@@ -962,6 +984,8 @@ module MetronomeSDK
962
984
  # @param payment_type [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddCommit::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
963
985
  #
964
986
  # @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
987
+ #
988
+ # @param on_session_payment [Boolean] If true, the payment will be made assuming the customer is present (i.e. on sess
965
989
 
966
990
  # If left blank, will default to INVOICE
967
991
  #
@@ -1412,6 +1436,13 @@ module MetronomeSDK
1412
1436
  # @return [String, nil]
1413
1437
  optional :credit_type_id, String
1414
1438
 
1439
+ # @!attribute do_not_invoice
1440
+ # This field is only applicable to commit invoice schedules. If true, this
1441
+ # schedule will not generate an invoice.
1442
+ #
1443
+ # @return [Boolean, nil]
1444
+ optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean
1445
+
1415
1446
  # @!attribute recurring_schedule
1416
1447
  # Enter the unit price and quantity for the charge or instead only send the
1417
1448
  # amount. If amount is sent, the unit price is assumed to be the amount and
@@ -1430,7 +1461,7 @@ module MetronomeSDK
1430
1461
  MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddDiscount::Schedule::ScheduleItem]
1431
1462
  }
1432
1463
 
1433
- # @!method initialize(credit_type_id: nil, recurring_schedule: nil, schedule_items: nil)
1464
+ # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
1434
1465
  # Some parameter documentations has been truncated, see
1435
1466
  # {MetronomeSDK::Models::V2::ContractEditParams::AddDiscount::Schedule} for more
1436
1467
  # details.
@@ -1439,6 +1470,8 @@ module MetronomeSDK
1439
1470
  #
1440
1471
  # @param credit_type_id [String] Defaults to USD (cents) if not passed.
1441
1472
  #
1473
+ # @param do_not_invoice [Boolean] This field is only applicable to commit invoice schedules. If true, this schedul
1474
+ #
1442
1475
  # @param recurring_schedule [MetronomeSDK::Models::V2::ContractEditParams::AddDiscount::Schedule::RecurringSchedule] Enter the unit price and quantity for the charge or instead only send the amount
1443
1476
  #
1444
1477
  # @param schedule_items [Array<MetronomeSDK::Models::V2::ContractEditParams::AddDiscount::Schedule::ScheduleItem>] Either provide amount or provide both unit_price and quantity.
@@ -2547,8 +2580,8 @@ module MetronomeSDK
2547
2580
  required :unit_price, Float
2548
2581
 
2549
2582
  # @!attribute quantity
2550
- # This field is currently required. Upcoming recurring commit/credit configuration
2551
- # options will allow it to be optional.
2583
+ # This field is required unless a subscription is attached via
2584
+ # `subscription_config`.
2552
2585
  #
2553
2586
  # @return [Float, nil]
2554
2587
  optional :quantity, Float
@@ -2564,7 +2597,7 @@ module MetronomeSDK
2564
2597
  #
2565
2598
  # @param unit_price [Float]
2566
2599
  #
2567
- # @param quantity [Float] This field is currently required. Upcoming recurring commit/credit configuration
2600
+ # @param quantity [Float] This field is required unless a subscription is attached via `subscription_confi
2568
2601
  end
2569
2602
 
2570
2603
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit#commit_duration
@@ -3083,8 +3116,8 @@ module MetronomeSDK
3083
3116
  required :unit_price, Float
3084
3117
 
3085
3118
  # @!attribute quantity
3086
- # This field is currently required. Upcoming recurring commit/credit configuration
3087
- # options will allow it to be optional.
3119
+ # This field is required unless a subscription is attached via
3120
+ # `subscription_config`.
3088
3121
  #
3089
3122
  # @return [Float, nil]
3090
3123
  optional :quantity, Float
@@ -3100,7 +3133,7 @@ module MetronomeSDK
3100
3133
  #
3101
3134
  # @param unit_price [Float]
3102
3135
  #
3103
- # @param quantity [Float] This field is currently required. Upcoming recurring commit/credit configuration
3136
+ # @param quantity [Float] This field is required unless a subscription is attached via `subscription_confi
3104
3137
  end
3105
3138
 
3106
3139
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit#commit_duration
@@ -3536,6 +3569,11 @@ module MetronomeSDK
3536
3569
  # @return [MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge::Schedule]
3537
3570
  required :schedule, -> { MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule }
3538
3571
 
3572
+ # @!attribute custom_fields
3573
+ #
3574
+ # @return [Hash{Symbol=>String}, nil]
3575
+ optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
3576
+
3539
3577
  # @!attribute name
3540
3578
  # displayed on invoices
3541
3579
  #
@@ -3548,11 +3586,13 @@ module MetronomeSDK
3548
3586
  # @return [String, nil]
3549
3587
  optional :netsuite_sales_order_id, String
3550
3588
 
3551
- # @!method initialize(product_id:, schedule:, name: nil, netsuite_sales_order_id: nil)
3589
+ # @!method initialize(product_id:, schedule:, custom_fields: nil, name: nil, netsuite_sales_order_id: nil)
3552
3590
  # @param product_id [String]
3553
3591
  #
3554
3592
  # @param schedule [MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge::Schedule] Must provide either schedule_items or recurring_schedule.
3555
3593
  #
3594
+ # @param custom_fields [Hash{Symbol=>String}]
3595
+ #
3556
3596
  # @param name [String] displayed on invoices
3557
3597
  #
3558
3598
  # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
@@ -3565,6 +3605,13 @@ module MetronomeSDK
3565
3605
  # @return [String, nil]
3566
3606
  optional :credit_type_id, String
3567
3607
 
3608
+ # @!attribute do_not_invoice
3609
+ # This field is only applicable to commit invoice schedules. If true, this
3610
+ # schedule will not generate an invoice.
3611
+ #
3612
+ # @return [Boolean, nil]
3613
+ optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean
3614
+
3568
3615
  # @!attribute recurring_schedule
3569
3616
  # Enter the unit price and quantity for the charge or instead only send the
3570
3617
  # amount. If amount is sent, the unit price is assumed to be the amount and
@@ -3585,7 +3632,7 @@ module MetronomeSDK
3585
3632
  MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::ScheduleItem]
3586
3633
  }
3587
3634
 
3588
- # @!method initialize(credit_type_id: nil, recurring_schedule: nil, schedule_items: nil)
3635
+ # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
3589
3636
  # Some parameter documentations has been truncated, see
3590
3637
  # {MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge::Schedule} for
3591
3638
  # more details.
@@ -3594,6 +3641,8 @@ module MetronomeSDK
3594
3641
  #
3595
3642
  # @param credit_type_id [String] Defaults to USD (cents) if not passed.
3596
3643
  #
3644
+ # @param do_not_invoice [Boolean] This field is only applicable to commit invoice schedules. If true, this schedul
3645
+ #
3597
3646
  # @param recurring_schedule [MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule] Enter the unit price and quantity for the charge or instead only send the amount
3598
3647
  #
3599
3648
  # @param schedule_items [Array<MetronomeSDK::Models::V2::ContractEditParams::AddScheduledCharge::Schedule::ScheduleItem>] Either provide amount or provide both unit_price and quantity.
@@ -4265,6 +4314,11 @@ module MetronomeSDK
4265
4314
  # @return [String, nil]
4266
4315
  optional :netsuite_sales_order_id, String, nil?: true
4267
4316
 
4317
+ # @!attribute priority
4318
+ #
4319
+ # @return [Float, nil]
4320
+ optional :priority, Float, nil?: true
4321
+
4268
4322
  # @!attribute product_id
4269
4323
  #
4270
4324
  # @return [String, nil]
@@ -4275,7 +4329,7 @@ module MetronomeSDK
4275
4329
  # @return [Float, nil]
4276
4330
  optional :rollover_fraction, Float, nil?: true
4277
4331
 
4278
- # @!method initialize(commit_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, invoice_schedule: nil, netsuite_sales_order_id: nil, product_id: nil, rollover_fraction: nil)
4332
+ # @!method initialize(commit_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, invoice_schedule: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil, rollover_fraction: nil)
4279
4333
  # Some parameter documentations has been truncated, see
4280
4334
  # {MetronomeSDK::Models::V2::ContractEditParams::UpdateCommit} for more details.
4281
4335
  #
@@ -4293,6 +4347,8 @@ module MetronomeSDK
4293
4347
  #
4294
4348
  # @param netsuite_sales_order_id [String, nil]
4295
4349
  #
4350
+ # @param priority [Float, nil]
4351
+ #
4296
4352
  # @param product_id [String]
4297
4353
  #
4298
4354
  # @param rollover_fraction [Float, nil]
@@ -4644,12 +4700,17 @@ module MetronomeSDK
4644
4700
  # @return [String, nil]
4645
4701
  optional :netsuite_sales_order_id, String, nil?: true
4646
4702
 
4703
+ # @!attribute priority
4704
+ #
4705
+ # @return [Float, nil]
4706
+ optional :priority, Float, nil?: true
4707
+
4647
4708
  # @!attribute product_id
4648
4709
  #
4649
4710
  # @return [String, nil]
4650
4711
  optional :product_id, String
4651
4712
 
4652
- # @!method initialize(credit_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, netsuite_sales_order_id: nil, product_id: nil)
4713
+ # @!method initialize(credit_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil)
4653
4714
  # Some parameter documentations has been truncated, see
4654
4715
  # {MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit} for more details.
4655
4716
  #
@@ -4665,6 +4726,8 @@ module MetronomeSDK
4665
4726
  #
4666
4727
  # @param netsuite_sales_order_id [String, nil]
4667
4728
  #
4729
+ # @param priority [Float, nil]
4730
+ #
4668
4731
  # @param product_id [String]
4669
4732
 
4670
4733
  # @see MetronomeSDK::Models::V2::ContractEditParams::UpdateCredit#access_schedule
@@ -3217,6 +3217,13 @@ module MetronomeSDK
3217
3217
  # @return [String, nil]
3218
3218
  optional :netsuite_sales_order_id, String, nil?: true
3219
3219
 
3220
+ # @!attribute priority
3221
+ # If multiple commits are applicable, the one with the lower priority will apply
3222
+ # first.
3223
+ #
3224
+ # @return [Float, nil]
3225
+ optional :priority, Float, nil?: true
3226
+
3220
3227
  # @!attribute product_id
3221
3228
  #
3222
3229
  # @return [String, nil]
@@ -3240,7 +3247,7 @@ module MetronomeSDK
3240
3247
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::Specifier] },
3241
3248
  nil?: true
3242
3249
 
3243
- # @!method initialize(id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, product_id: nil, rollover_fraction: nil, specifiers: nil)
3250
+ # @!method initialize(id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil, rollover_fraction: nil, specifiers: nil)
3244
3251
  # Some parameter documentations has been truncated, see
3245
3252
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit}
3246
3253
  # for more details.
@@ -3261,6 +3268,8 @@ module MetronomeSDK
3261
3268
  #
3262
3269
  # @param netsuite_sales_order_id [String, nil]
3263
3270
  #
3271
+ # @param priority [Float, nil] If multiple commits are applicable, the one with the lower priority will apply f
3272
+ #
3264
3273
  # @param product_id [String]
3265
3274
  #
3266
3275
  # @param rollover_fraction [Float, nil]
@@ -3649,12 +3658,23 @@ module MetronomeSDK
3649
3658
  # @return [String, nil]
3650
3659
  optional :netsuite_sales_order_id, String, nil?: true
3651
3660
 
3661
+ # @!attribute priority
3662
+ # If multiple credits are applicable, the one with the lower priority will apply
3663
+ # first.
3664
+ #
3665
+ # @return [Float, nil]
3666
+ optional :priority, Float, nil?: true
3667
+
3652
3668
  # @!attribute rollover_fraction
3653
3669
  #
3654
3670
  # @return [Float, nil]
3655
3671
  optional :rollover_fraction, Float, nil?: true
3656
3672
 
3657
- # @!method initialize(id:, access_schedule: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, rollover_fraction: nil)
3673
+ # @!method initialize(id:, access_schedule: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rollover_fraction: nil)
3674
+ # Some parameter documentations has been truncated, see
3675
+ # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit}
3676
+ # for more details.
3677
+ #
3658
3678
  # @param id [String]
3659
3679
  #
3660
3680
  # @param access_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::AccessSchedule]
@@ -3665,6 +3685,8 @@ module MetronomeSDK
3665
3685
  #
3666
3686
  # @param netsuite_sales_order_id [String, nil]
3667
3687
  #
3688
+ # @param priority [Float, nil] If multiple credits are applicable, the one with the lower priority will apply f
3689
+ #
3668
3690
  # @param rollover_fraction [Float, nil]
3669
3691
 
3670
3692
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit#access_schedule
@@ -3919,6 +3941,13 @@ module MetronomeSDK
3919
3941
  # @return [String, nil]
3920
3942
  optional :credit_type_id, String
3921
3943
 
3944
+ # @!attribute do_not_invoice
3945
+ # This field is only applicable to commit invoice schedules. If true, this
3946
+ # schedule will not generate an invoice.
3947
+ #
3948
+ # @return [Boolean, nil]
3949
+ optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean
3950
+
3922
3951
  # @!attribute recurring_schedule
3923
3952
  # Enter the unit price and quantity for the charge or instead only send the
3924
3953
  # amount. If amount is sent, the unit price is assumed to be the amount and
@@ -3935,7 +3964,7 @@ module MetronomeSDK
3935
3964
  optional :schedule_items,
3936
3965
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::ScheduleItem] }
3937
3966
 
3938
- # @!method initialize(credit_type_id: nil, recurring_schedule: nil, schedule_items: nil)
3967
+ # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
3939
3968
  # Some parameter documentations has been truncated, see
3940
3969
  # {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule}
3941
3970
  # for more details.
@@ -3944,6 +3973,8 @@ module MetronomeSDK
3944
3973
  #
3945
3974
  # @param credit_type_id [String] Defaults to USD (cents) if not passed.
3946
3975
  #
3976
+ # @param do_not_invoice [Boolean] This field is only applicable to commit invoice schedules. If true, this schedul
3977
+ #
3947
3978
  # @param recurring_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule] Enter the unit price and quantity for the charge or instead only send the amount
3948
3979
  #
3949
3980
  # @param schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::ScheduleItem>] Either provide amount or provide both unit_price and quantity.
@@ -10,7 +10,7 @@ module MetronomeSDK
10
10
  #
11
11
  # Create a new product
12
12
  #
13
- # @overload create(name:, type:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, exclude_free_usage: nil, is_refundable: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, tags: nil, request_options: {})
13
+ # @overload create(name:, type:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, custom_fields: nil, exclude_free_usage: nil, is_refundable: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, tags: nil, request_options: {})
14
14
  #
15
15
  # @param name [String] displayed on invoices
16
16
  #
@@ -22,6 +22,8 @@ module MetronomeSDK
22
22
  #
23
23
  # @param composite_tags [Array<String>] Required for COMPOSITE products
24
24
  #
25
+ # @param custom_fields [Hash{Symbol=>String}]
26
+ #
25
27
  # @param exclude_free_usage [Boolean] Beta feature only available for composite products. If true, products with $0 wi
26
28
  #
27
29
  # @param is_refundable [Boolean] This field's availability is dependent on your client's configuration. Defaults
@@ -161,7 +161,7 @@ module MetronomeSDK
161
161
  # Edit a customer or contract commit. Contract commits can only be edited using
162
162
  # this endpoint if contract editing is enabled.
163
163
  #
164
- # @overload edit_commit(commit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, invoice_contract_id: nil, invoice_schedule: nil, product_id: nil, specifiers: nil, request_options: {})
164
+ # @overload edit_commit(commit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, invoice_contract_id: nil, invoice_schedule: nil, priority: nil, product_id: nil, specifiers: nil, request_options: {})
165
165
  #
166
166
  # @param commit_id [String] ID of the commit to edit
167
167
  #
@@ -177,6 +177,8 @@ module MetronomeSDK
177
177
  #
178
178
  # @param invoice_schedule [MetronomeSDK::Models::V2::ContractEditCommitParams::InvoiceSchedule]
179
179
  #
180
+ # @param priority [Float, nil] If multiple commits are applicable, the one with the lower priority will apply f
181
+ #
180
182
  # @param product_id [String]
181
183
  #
182
184
  # @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditCommitParams::Specifier>, nil] List of filters that determine what kind of customer usage draws down a commit o
@@ -203,7 +205,7 @@ module MetronomeSDK
203
205
  # Edit a customer or contract credit. Contract credits can only be edited using
204
206
  # this endpoint if contract editing is enabled.
205
207
  #
206
- # @overload edit_credit(credit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, product_id: nil, specifiers: nil, request_options: {})
208
+ # @overload edit_credit(credit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, priority: nil, product_id: nil, specifiers: nil, request_options: {})
207
209
  #
208
210
  # @param credit_id [String] ID of the credit to edit
209
211
  #
@@ -215,6 +217,8 @@ module MetronomeSDK
215
217
  #
216
218
  # @param applicable_product_tags [Array<String>, nil] Which tags the credit applies to. If both applicable*product_ids and applicable*
217
219
  #
220
+ # @param priority [Float, nil] If multiple commits are applicable, the one with the lower priority will apply f
221
+ #
218
222
  # @param product_id [String]
219
223
  #
220
224
  # @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditCreditParams::Specifier>, nil] List of filters that determine what kind of customer usage draws down a commit o
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MetronomeSDK
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
@@ -92,6 +92,64 @@ module MetronomeSDK
92
92
  def self.type_info(spec)
93
93
  end
94
94
 
95
+ # @api private
96
+ sig do
97
+ params(
98
+ type_info:
99
+ T.any(
100
+ {
101
+ const:
102
+ T.nilable(
103
+ T.any(NilClass, T::Boolean, Integer, Float, Symbol)
104
+ ),
105
+ enum:
106
+ T.nilable(
107
+ T.proc.returns(
108
+ MetronomeSDK::Internal::Type::Converter::Input
109
+ )
110
+ ),
111
+ union:
112
+ T.nilable(
113
+ T.proc.returns(
114
+ MetronomeSDK::Internal::Type::Converter::Input
115
+ )
116
+ )
117
+ },
118
+ T.proc.returns(
119
+ MetronomeSDK::Internal::Type::Converter::Input
120
+ ),
121
+ MetronomeSDK::Internal::Type::Converter::Input
122
+ ),
123
+ spec:
124
+ T.any(
125
+ {
126
+ const:
127
+ T.nilable(
128
+ T.any(NilClass, T::Boolean, Integer, Float, Symbol)
129
+ ),
130
+ enum:
131
+ T.nilable(
132
+ T.proc.returns(
133
+ MetronomeSDK::Internal::Type::Converter::Input
134
+ )
135
+ ),
136
+ union:
137
+ T.nilable(
138
+ T.proc.returns(
139
+ MetronomeSDK::Internal::Type::Converter::Input
140
+ )
141
+ )
142
+ },
143
+ T.proc.returns(
144
+ MetronomeSDK::Internal::Type::Converter::Input
145
+ ),
146
+ MetronomeSDK::Internal::Type::Converter::Input
147
+ )
148
+ ).returns(MetronomeSDK::Internal::AnyHash)
149
+ end
150
+ def self.meta_info(type_info, spec)
151
+ end
152
+
95
153
  # @api private
96
154
  sig do
97
155
  params(translate_names: T::Boolean).returns(
@@ -16,7 +16,8 @@ module MetronomeSDK
16
16
  T::Array[
17
17
  [
18
18
  T.nilable(Symbol),
19
- T.proc.returns(MetronomeSDK::Internal::Type::Converter::Input)
19
+ T.proc.returns(MetronomeSDK::Internal::Type::Converter::Input),
20
+ MetronomeSDK::Internal::AnyHash
20
21
  ]
21
22
  ]
22
23
  )
@@ -25,7 +26,13 @@ module MetronomeSDK
25
26
  end
26
27
 
27
28
  # @api private
28
- sig { returns(T::Array[[T.nilable(Symbol), T.anything]]) }
29
+ sig do
30
+ returns(
31
+ T::Array[
32
+ [T.nilable(Symbol), T.anything, MetronomeSDK::Internal::AnyHash]
33
+ ]
34
+ )
35
+ end
29
36
  protected def derefed_variants
30
37
  end
31
38
 
@@ -17,6 +17,14 @@ module MetronomeSDK
17
17
  sig { params(credit_type: MetronomeSDK::CreditTypeData::OrHash).void }
18
18
  attr_writer :credit_type
19
19
 
20
+ # This field is only applicable to commit invoice schedules. If true, this
21
+ # schedule will not generate an invoice.
22
+ sig { returns(T.nilable(T::Boolean)) }
23
+ attr_reader :do_not_invoice
24
+
25
+ sig { params(do_not_invoice: T::Boolean).void }
26
+ attr_writer :do_not_invoice
27
+
20
28
  sig do
21
29
  returns(
22
30
  T.nilable(T::Array[MetronomeSDK::SchedulePointInTime::ScheduleItem])
@@ -35,17 +43,25 @@ module MetronomeSDK
35
43
  sig do
36
44
  params(
37
45
  credit_type: MetronomeSDK::CreditTypeData::OrHash,
46
+ do_not_invoice: T::Boolean,
38
47
  schedule_items:
39
48
  T::Array[MetronomeSDK::SchedulePointInTime::ScheduleItem::OrHash]
40
49
  ).returns(T.attached_class)
41
50
  end
42
- def self.new(credit_type: nil, schedule_items: nil)
51
+ def self.new(
52
+ credit_type: nil,
53
+ # This field is only applicable to commit invoice schedules. If true, this
54
+ # schedule will not generate an invoice.
55
+ do_not_invoice: nil,
56
+ schedule_items: nil
57
+ )
43
58
  end
44
59
 
45
60
  sig do
46
61
  override.returns(
47
62
  {
48
63
  credit_type: MetronomeSDK::CreditTypeData,
64
+ do_not_invoice: T::Boolean,
49
65
  schedule_items:
50
66
  T::Array[MetronomeSDK::SchedulePointInTime::ScheduleItem]
51
67
  }