Class: MetronomeSDK::Models::ContractV2::Commit

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/contract_v2.rb

Defined Under Namespace

Modules: Ledger, RateType, Type Classes: Contract, InvoiceContract, Product, RolledOverFrom

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id: ) ⇒ Object

The contract that this commit will be billed on.

Parameters:

  • id (String) (defaults to: )


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
# File 'lib/metronome_sdk/models/contract_v2.rb', line 293

class Commit < MetronomeSDK::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [String]
  required :id, String

  # @!attribute created_at
  #   Timestamp of when the commit was created.
  #
  #   - Recurring commits: latter of commit service period date and parent commit
  #     start date
  #   - Rollover commits: when the new contract started
  #
  #   @return [Time]
  required :created_at, Time

  # @!attribute product
  #
  #   @return [MetronomeSDK::Models::ContractV2::Commit::Product]
  required :product, -> { MetronomeSDK::ContractV2::Commit::Product }

  # @!attribute type
  #
  #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Type]
  required :type, enum: -> { MetronomeSDK::ContractV2::Commit::Type }

  # @!attribute access_schedule
  #   The schedule that the customer will gain access to the credits purposed with
  #   this commit.
  #
  #   @return [MetronomeSDK::Models::ScheduleDuration, nil]
  optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }

  # @!attribute applicable_contract_ids
  #
  #   @return [Array<String>, nil]
  optional :applicable_contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

  # @!attribute applicable_product_ids
  #
  #   @return [Array<String>, nil]
  optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

  # @!attribute applicable_product_tags
  #
  #   @return [Array<String>, nil]
  optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

  # @!attribute archived_at
  #
  #   @return [Time, nil]
  optional :archived_at, Time

  # @!attribute balance
  #   The current balance of the credit or commit. This balance reflects the amount of
  #   credit or commit that the customer has access to use at this moment - thus,
  #   expired and upcoming credit or commit segments contribute 0 to the balance. The
  #   balance will match the sum of all ledger entries with the exception of the case
  #   where the sum of negative manual ledger entries exceeds the positive amount
  #   remaining on the credit or commit - in that case, the balance will be 0. All
  #   manual ledger entries associated with active credit or commit segments are
  #   included in the balance, including future-dated manual ledger entries.
  #
  #   @return [Float, nil]
  optional :balance, Float

  # @!attribute contract
  #
  #   @return [MetronomeSDK::Models::ContractV2::Commit::Contract, nil]
  optional :contract, -> { MetronomeSDK::ContractV2::Commit::Contract }

  # @!attribute custom_fields
  #   Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
  #
  #   @return [Hash{Symbol=>String}, nil]
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]

  # @!attribute description
  #
  #   @return [String, nil]
  optional :description, String

  # @!attribute hierarchy_configuration
  #   Optional configuration for commit hierarchy access control
  #
  #   @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
  optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }

  # @!attribute invoice_contract
  #   The contract that this commit will be billed on.
  #
  #   @return [MetronomeSDK::Models::ContractV2::Commit::InvoiceContract, nil]
  optional :invoice_contract, -> { MetronomeSDK::ContractV2::Commit::InvoiceContract }

  # @!attribute invoice_schedule
  #   The schedule that the customer will be invoiced for this commit.
  #
  #   @return [MetronomeSDK::Models::SchedulePointInTime, nil]
  optional :invoice_schedule, -> { MetronomeSDK::SchedulePointInTime }

  # @!attribute ledger
  #   A list of ordered events that impact the balance of a commit. For example, an
  #   invoice deduction or a rollover.
  #
  #   @return [Array<MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry>, nil]
  optional :ledger,
           -> { MetronomeSDK::Internal::Type::ArrayOf[union: MetronomeSDK::ContractV2::Commit::Ledger] }

  # @!attribute name
  #
  #   @return [String, nil]
  optional :name, String

  # @!attribute netsuite_sales_order_id
  #   This field's availability is dependent on your client's configuration.
  #
  #   @return [String, nil]
  optional :netsuite_sales_order_id, String

  # @!attribute priority
  #   If multiple credits or commits are applicable, the one with the lower priority
  #   will apply first.
  #
  #   @return [Float, nil]
  optional :priority, Float

  # @!attribute rate_type
  #
  #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::RateType, nil]
  optional :rate_type, enum: -> { MetronomeSDK::ContractV2::Commit::RateType }

  # @!attribute rolled_over_from
  #
  #   @return [MetronomeSDK::Models::ContractV2::Commit::RolledOverFrom, nil]
  optional :rolled_over_from, -> { MetronomeSDK::ContractV2::Commit::RolledOverFrom }

  # @!attribute rollover_fraction
  #
  #   @return [Float, nil]
  optional :rollover_fraction, Float

  # @!attribute salesforce_opportunity_id
  #   This field's availability is dependent on your client's configuration.
  #
  #   @return [String, nil]
  optional :salesforce_opportunity_id, String

  # @!attribute specifiers
  #   List of filters that determine what kind of customer usage draws down a commit
  #   or credit. A customer's usage needs to meet the condition of at least one of the
  #   specifiers to contribute to a commit's or credit's drawdown.
  #
  #   @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
  optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }

  # @!method initialize(id:, created_at:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_contract: nil, invoice_schedule: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rolled_over_from: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil)
  #   Some parameter documentations has been truncated, see
  #   {MetronomeSDK::Models::ContractV2::Commit} for more details.
  #
  #   @param id [String]
  #
  #   @param created_at [Time] Timestamp of when the commit was created.
  #
  #   @param product [MetronomeSDK::Models::ContractV2::Commit::Product]
  #
  #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Type]
  #
  #   @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits purposed with thi
  #
  #   @param applicable_contract_ids [Array<String>]
  #
  #   @param applicable_product_ids [Array<String>]
  #
  #   @param applicable_product_tags [Array<String>]
  #
  #   @param archived_at [Time]
  #
  #   @param balance [Float] The current balance of the credit or commit. This balance reflects the amount of
  #
  #   @param contract [MetronomeSDK::Models::ContractV2::Commit::Contract]
  #
  #   @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
  #
  #   @param description [String]
  #
  #   @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
  #
  #   @param invoice_contract [MetronomeSDK::Models::ContractV2::Commit::InvoiceContract] The contract that this commit will be billed on.
  #
  #   @param invoice_schedule [MetronomeSDK::Models::SchedulePointInTime] The schedule that the customer will be invoiced for this commit.
  #
  #   @param ledger [Array<MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry>] A list of ordered events that impact the balance of a commit. For example, an in
  #
  #   @param name [String]
  #
  #   @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
  #
  #   @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
  #
  #   @param rate_type [Symbol, MetronomeSDK::Models::ContractV2::Commit::RateType]
  #
  #   @param rolled_over_from [MetronomeSDK::Models::ContractV2::Commit::RolledOverFrom]
  #
  #   @param rollover_fraction [Float]
  #
  #   @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
  #
  #   @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o

  # @see MetronomeSDK::Models::ContractV2::Commit#product
  class Product < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!attribute name
    #
    #   @return [String]
    required :name, String

    # @!method initialize(id:, name:)
    #   @param id [String]
    #   @param name [String]
  end

  # @see MetronomeSDK::Models::ContractV2::Commit#type
  module Type
    extend MetronomeSDK::Internal::Type::Enum

    PREPAID = :PREPAID
    POSTPAID = :POSTPAID

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see MetronomeSDK::Models::ContractV2::Commit#contract
  class Contract < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!method initialize(id:)
    #   @param id [String]
  end

  # @see MetronomeSDK::Models::ContractV2::Commit#invoice_contract
  class InvoiceContract < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute id
    #
    #   @return [String]
    required :id, String

    # @!method initialize(id:)
    #   The contract that this commit will be billed on.
    #
    #   @param id [String]
  end

  module Ledger
    extend MetronomeSDK::Internal::Type::Union

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry }

    variant -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry }

    class PrepaidCommitSegmentStartLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute segment_id
      #
      #   @return [String]
      required :segment_id, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry::Type }

      # @!method initialize(amount:, segment_id:, timestamp:, type:)
      #   @param amount [Float]
      #   @param segment_id [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry::Type]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        PREPAID_COMMIT_SEGMENT_START = :PREPAID_COMMIT_SEGMENT_START

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PrepaidCommitAutomatedInvoiceDeductionLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute invoice_id
      #
      #   @return [String]
      required :invoice_id, String

      # @!attribute segment_id
      #
      #   @return [String]
      required :segment_id, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type }

      # @!attribute contract_id
      #
      #   @return [String, nil]
      optional :contract_id, String

      # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
      #   @param amount [Float]
      #   @param invoice_id [String]
      #   @param segment_id [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
      #   @param contract_id [String]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION = :PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PrepaidCommitRolloverLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute new_contract_id
      #
      #   @return [String]
      required :new_contract_id, String

      # @!attribute segment_id
      #
      #   @return [String]
      required :segment_id, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry::Type }

      # @!method initialize(amount:, new_contract_id:, segment_id:, timestamp:, type:)
      #   @param amount [Float]
      #   @param new_contract_id [String]
      #   @param segment_id [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry::Type]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        PREPAID_COMMIT_ROLLOVER = :PREPAID_COMMIT_ROLLOVER

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PrepaidCommitExpirationLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute segment_id
      #
      #   @return [String]
      required :segment_id, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry::Type }

      # @!method initialize(amount:, segment_id:, timestamp:, type:)
      #   @param amount [Float]
      #   @param segment_id [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry::Type]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        PREPAID_COMMIT_EXPIRATION = :PREPAID_COMMIT_EXPIRATION

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PrepaidCommitCanceledLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute invoice_id
      #
      #   @return [String]
      required :invoice_id, String

      # @!attribute segment_id
      #
      #   @return [String]
      required :segment_id, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type }

      # @!attribute contract_id
      #
      #   @return [String, nil]
      optional :contract_id, String

      # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
      #   @param amount [Float]
      #   @param invoice_id [String]
      #   @param segment_id [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type]
      #   @param contract_id [String]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        PREPAID_COMMIT_CANCELED = :PREPAID_COMMIT_CANCELED

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PrepaidCommitCreditedLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute invoice_id
      #
      #   @return [String]
      required :invoice_id, String

      # @!attribute segment_id
      #
      #   @return [String]
      required :segment_id, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type }

      # @!attribute contract_id
      #
      #   @return [String, nil]
      optional :contract_id, String

      # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
      #   @param amount [Float]
      #   @param invoice_id [String]
      #   @param segment_id [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type]
      #   @param contract_id [String]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        PREPAID_COMMIT_CREDITED = :PREPAID_COMMIT_CREDITED

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PrepaidCommitSeatBasedAdjustmentLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute segment_id
      #
      #   @return [String]
      required :segment_id, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry::Type }

      # @!method initialize(amount:, segment_id:, timestamp:, type:)
      #   @param amount [Float]
      #   @param segment_id [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry::Type]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT = :PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PostpaidCommitInitialBalanceLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry::Type }

      # @!method initialize(amount:, timestamp:, type:)
      #   @param amount [Float]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry::Type]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        POSTPAID_COMMIT_INITIAL_BALANCE = :POSTPAID_COMMIT_INITIAL_BALANCE

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PostpaidCommitAutomatedInvoiceDeductionLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute invoice_id
      #
      #   @return [String]
      required :invoice_id, String

      # @!attribute segment_id
      #
      #   @return [String]
      required :segment_id, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type }

      # @!attribute contract_id
      #
      #   @return [String, nil]
      optional :contract_id, String

      # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
      #   @param amount [Float]
      #   @param invoice_id [String]
      #   @param segment_id [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
      #   @param contract_id [String]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION = :POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PostpaidCommitRolloverLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute new_contract_id
      #
      #   @return [String]
      required :new_contract_id, String

      # @!attribute segment_id
      #
      #   @return [String]
      required :segment_id, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry::Type }

      # @!method initialize(amount:, new_contract_id:, segment_id:, timestamp:, type:)
      #   @param amount [Float]
      #   @param new_contract_id [String]
      #   @param segment_id [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry::Type]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        POSTPAID_COMMIT_ROLLOVER = :POSTPAID_COMMIT_ROLLOVER

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PostpaidCommitTrueupLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute invoice_id
      #
      #   @return [String]
      required :invoice_id, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type }

      # @!attribute contract_id
      #
      #   @return [String, nil]
      optional :contract_id, String

      # @!method initialize(amount:, invoice_id:, timestamp:, type:, contract_id: nil)
      #   @param amount [Float]
      #   @param invoice_id [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type]
      #   @param contract_id [String]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        POSTPAID_COMMIT_TRUEUP = :POSTPAID_COMMIT_TRUEUP

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PrepaidCommitManualLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute reason
      #
      #   @return [String]
      required :reason, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry::Type }

      # @!method initialize(amount:, reason:, timestamp:, type:)
      #   @param amount [Float]
      #   @param reason [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry::Type]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        PREPAID_COMMIT_MANUAL = :PREPAID_COMMIT_MANUAL

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PostpaidCommitManualLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute reason
      #
      #   @return [String]
      required :reason, String

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry::Type }

      # @!method initialize(amount:, reason:, timestamp:, type:)
      #   @param amount [Float]
      #   @param reason [String]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry::Type]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        POSTPAID_COMMIT_MANUAL = :POSTPAID_COMMIT_MANUAL

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class PostpaidCommitExpirationLedgerEntry < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount
      #
      #   @return [Float]
      required :amount, Float

      # @!attribute timestamp
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute type
      #
      #   @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry::Type]
      required :type,
               enum: -> { MetronomeSDK::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry::Type }

      # @!method initialize(amount:, timestamp:, type:)
      #   @param amount [Float]
      #   @param timestamp [Time]
      #   @param type [Symbol, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry::Type]

      # @see MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry#type
      module Type
        extend MetronomeSDK::Internal::Type::Enum

        POSTPAID_COMMIT_EXPIRATION = :POSTPAID_COMMIT_EXPIRATION

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    # @!method self.variants
    #   @return [Array(MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry)]
  end

  # @see MetronomeSDK::Models::ContractV2::Commit#rate_type
  module RateType
    extend MetronomeSDK::Internal::Type::Enum

    COMMIT_RATE = :COMMIT_RATE
    LIST_RATE = :LIST_RATE

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see MetronomeSDK::Models::ContractV2::Commit#rolled_over_from
  class RolledOverFrom < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute commit_id
    #
    #   @return [String]
    required :commit_id, String

    # @!attribute contract_id
    #
    #   @return [String]
    required :contract_id, String

    # @!method initialize(commit_id:, contract_id:)
    #   @param commit_id [String]
    #   @param contract_id [String]
  end
end

Instance Attribute Details

#access_scheduleMetronomeSDK::Models::ScheduleDuration?

The schedule that the customer will gain access to the credits purposed with this commit.



324
# File 'lib/metronome_sdk/models/contract_v2.rb', line 324

optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }

#applicable_contract_idsArray<String>?

Returns:

  • (Array<String>, nil)


329
# File 'lib/metronome_sdk/models/contract_v2.rb', line 329

optional :applicable_contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

#applicable_product_idsArray<String>?

Returns:

  • (Array<String>, nil)


334
# File 'lib/metronome_sdk/models/contract_v2.rb', line 334

optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

#applicable_product_tagsArray<String>?

Returns:

  • (Array<String>, nil)


339
# File 'lib/metronome_sdk/models/contract_v2.rb', line 339

optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

#archived_atTime?

Returns:

  • (Time, nil)


344
# File 'lib/metronome_sdk/models/contract_v2.rb', line 344

optional :archived_at, Time

#balanceFloat?

The current balance of the credit or commit. This balance reflects the amount of credit or commit that the customer has access to use at this moment - thus, expired and upcoming credit or commit segments contribute 0 to the balance. The balance will match the sum of all ledger entries with the exception of the case where the sum of negative manual ledger entries exceeds the positive amount remaining on the credit or commit - in that case, the balance will be 0. All manual ledger entries associated with active credit or commit segments are included in the balance, including future-dated manual ledger entries.

Returns:

  • (Float, nil)


357
# File 'lib/metronome_sdk/models/contract_v2.rb', line 357

optional :balance, Float

#contractMetronomeSDK::Models::ContractV2::Commit::Contract?



362
# File 'lib/metronome_sdk/models/contract_v2.rb', line 362

optional :contract, -> { MetronomeSDK::ContractV2::Commit::Contract }

#created_atTime

Timestamp of when the commit was created.

  • Recurring commits: latter of commit service period date and parent commit start date

  • Rollover commits: when the new contract started

Returns:

  • (Time)


307
# File 'lib/metronome_sdk/models/contract_v2.rb', line 307

required :created_at, Time

#custom_fieldsHash{Symbol=>String}?

Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }

Returns:

  • (Hash{Symbol=>String}, nil)


368
# File 'lib/metronome_sdk/models/contract_v2.rb', line 368

optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]

#descriptionString?

Returns:

  • (String, nil)


373
# File 'lib/metronome_sdk/models/contract_v2.rb', line 373

optional :description, String

#hierarchy_configurationMetronomeSDK::Models::CommitHierarchyConfiguration?

Optional configuration for commit hierarchy access control



379
# File 'lib/metronome_sdk/models/contract_v2.rb', line 379

optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }

#idString

Returns:

  • (String)


297
# File 'lib/metronome_sdk/models/contract_v2.rb', line 297

required :id, String

#invoice_contractMetronomeSDK::Models::ContractV2::Commit::InvoiceContract?

The contract that this commit will be billed on.



385
# File 'lib/metronome_sdk/models/contract_v2.rb', line 385

optional :invoice_contract, -> { MetronomeSDK::ContractV2::Commit::InvoiceContract }

#invoice_scheduleMetronomeSDK::Models::SchedulePointInTime?

The schedule that the customer will be invoiced for this commit.



391
# File 'lib/metronome_sdk/models/contract_v2.rb', line 391

optional :invoice_schedule, -> { MetronomeSDK::SchedulePointInTime }

#ledgerArray<MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry>?

A list of ordered events that impact the balance of a commit. For example, an invoice deduction or a rollover.



398
399
# File 'lib/metronome_sdk/models/contract_v2.rb', line 398

optional :ledger,
-> { MetronomeSDK::Internal::Type::ArrayOf[union: MetronomeSDK::ContractV2::Commit::Ledger] }

#nameString?

Returns:

  • (String, nil)


404
# File 'lib/metronome_sdk/models/contract_v2.rb', line 404

optional :name, String

#netsuite_sales_order_idString?

This field’s availability is dependent on your client’s configuration.

Returns:

  • (String, nil)


410
# File 'lib/metronome_sdk/models/contract_v2.rb', line 410

optional :netsuite_sales_order_id, String

#priorityFloat?

If multiple credits or commits are applicable, the one with the lower priority will apply first.

Returns:

  • (Float, nil)


417
# File 'lib/metronome_sdk/models/contract_v2.rb', line 417

optional :priority, Float

#productMetronomeSDK::Models::ContractV2::Commit::Product



312
# File 'lib/metronome_sdk/models/contract_v2.rb', line 312

required :product, -> { MetronomeSDK::ContractV2::Commit::Product }

#rate_typeSymbol, ...



422
# File 'lib/metronome_sdk/models/contract_v2.rb', line 422

optional :rate_type, enum: -> { MetronomeSDK::ContractV2::Commit::RateType }

#rolled_over_fromMetronomeSDK::Models::ContractV2::Commit::RolledOverFrom?



427
# File 'lib/metronome_sdk/models/contract_v2.rb', line 427

optional :rolled_over_from, -> { MetronomeSDK::ContractV2::Commit::RolledOverFrom }

#rollover_fractionFloat?

Returns:

  • (Float, nil)


432
# File 'lib/metronome_sdk/models/contract_v2.rb', line 432

optional :rollover_fraction, Float

#salesforce_opportunity_idString?

This field’s availability is dependent on your client’s configuration.

Returns:

  • (String, nil)


438
# File 'lib/metronome_sdk/models/contract_v2.rb', line 438

optional :salesforce_opportunity_id, String

#specifiersArray<MetronomeSDK::Models::CommitSpecifier>?

List of filters that determine what kind of customer usage draws down a commit or credit. A customer’s usage needs to meet the condition of at least one of the specifiers to contribute to a commit’s or credit’s drawdown.

Returns:



446
# File 'lib/metronome_sdk/models/contract_v2.rb', line 446

optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }

#typeSymbol, MetronomeSDK::Models::ContractV2::Commit::Type



317
# File 'lib/metronome_sdk/models/contract_v2.rb', line 317

required :type, enum: -> { MetronomeSDK::ContractV2::Commit::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/contract_v2.rb', line 526

.variantsArray(MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry, MetronomeSDK::Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry)



# File 'lib/metronome_sdk/models/contract_v2.rb', line 1185