Class: MetronomeSDK::Models::V1::ContractAmendParams::Commit

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

Defined Under Namespace

Modules: RateType, Type Classes: AccessSchedule, InvoiceSchedule, PaymentGateConfig

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(timestamp: , amount: nil, quantity: nil, unit_price: nil) ⇒ Object

Some parameter documentations has been truncated, see MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::ScheduleItem for more details.

Parameters:

  • timestamp (Time) (defaults to: )

    timestamp of the scheduled event

  • amount (Float) (defaults to: nil)

    Amount for the charge. Can be provided instead of unit_price and quantity. If am

  • quantity (Float) (defaults to: nil)

    Quantity for the charge. Will be multiplied by unit_price to determine the amoun

  • unit_price (Float) (defaults to: nil)

    Unit price for the charge. Will be multiplied by quantity to determine the amoun



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
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
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 129

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

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

  # @!attribute access_schedule
  #   Required: Schedule for distributing the commit to the customer. For "POSTPAID"
  #   commits only one schedule item is allowed and amount must match invoice_schedule
  #   total.
  #
  #   @return [MetronomeSDK::Models::V1::ContractAmendParams::Commit::AccessSchedule, nil]
  optional :access_schedule, -> { MetronomeSDK::V1::ContractAmendParams::Commit::AccessSchedule }

  # @!attribute amount
  #   (DEPRECATED) Use access_schedule and invoice_schedule instead.
  #
  #   @return [Float, nil]
  optional :amount, Float

  # @!attribute applicable_product_ids
  #   Which products the commit applies to. If applicable_product_ids,
  #   applicable_product_tags or specifiers are not provided, the commit applies to
  #   all products.
  #
  #   @return [Array<String>, nil]
  optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

  # @!attribute applicable_product_tags
  #   Which tags the commit applies to. If applicable_product_ids,
  #   applicable_product_tags or specifiers are not provided, the commit applies to
  #   all products.
  #
  #   @return [Array<String>, nil]
  optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

  # @!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
  #   Used only in UI/API. It is not exposed to end customers.
  #
  #   @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_schedule
  #   Required for "POSTPAID" commits: the true up invoice will be generated at this
  #   time and only one schedule item is allowed; the total must match access_schedule
  #   amount. Optional for "PREPAID" commits: if not provided, this will be a
  #   "complimentary" commit with no invoice.
  #
  #   @return [MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule, nil]
  optional :invoice_schedule, -> { MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule }

  # @!attribute name
  #   displayed on invoices
  #
  #   @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 payment_gate_config
  #   optionally payment gate this commit
  #
  #   @return [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig, nil]
  optional :payment_gate_config, -> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig }

  # @!attribute priority
  #   If multiple 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::V1::ContractAmendParams::Commit::RateType, nil]
  optional :rate_type, enum: -> { MetronomeSDK::V1::ContractAmendParams::Commit::RateType }

  # @!attribute rollover_fraction
  #   Fraction of unused segments that will be rolled over. Must be between 0 and 1.
  #
  #   @return [Float, nil]
  optional :rollover_fraction, Float

  # @!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. This field cannot
  #   be used together with `applicable_product_ids` or `applicable_product_tags`.
  #
  #   @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
  optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }

  # @!attribute temporary_id
  #   A temporary ID for the commit that can be used to reference the commit for
  #   commit specific overrides.
  #
  #   @return [String, nil]
  optional :temporary_id, String

  # @!method initialize(product_id:, type:, access_schedule: nil, amount: nil, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, payment_gate_config: nil, priority: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil, temporary_id: nil)
  #   Some parameter documentations has been truncated, see
  #   {MetronomeSDK::Models::V1::ContractAmendParams::Commit} for more details.
  #
  #   @param product_id [String]
  #
  #   @param type [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::Type]
  #
  #   @param access_schedule [MetronomeSDK::Models::V1::ContractAmendParams::Commit::AccessSchedule] Required: Schedule for distributing the commit to the customer. For "POSTPAID" c
  #
  #   @param amount [Float] (DEPRECATED) Use access_schedule and invoice_schedule instead.
  #
  #   @param applicable_product_ids [Array<String>] Which products the commit applies to. If applicable_product_ids, applicable_prod
  #
  #   @param applicable_product_tags [Array<String>] Which tags the commit applies to. If applicable*product_ids, applicable_product*
  #
  #   @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
  #
  #   @param description [String] Used only in UI/API. It is not exposed to end customers.
  #
  #   @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
  #
  #   @param invoice_schedule [MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule] Required for "POSTPAID" commits: the true up invoice will be generated at this t
  #
  #   @param name [String] displayed on invoices
  #
  #   @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
  #
  #   @param payment_gate_config [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig] optionally payment gate this commit
  #
  #   @param priority [Float] If multiple commits are applicable, the one with the lower priority will apply f
  #
  #   @param rate_type [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::RateType]
  #
  #   @param rollover_fraction [Float] Fraction of unused segments that will be rolled over. Must be between 0 and 1.
  #
  #   @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
  #
  #   @param temporary_id [String] A temporary ID for the commit that can be used to reference the commit for commi

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

    PREPAID = :PREPAID
    POSTPAID = :POSTPAID

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

  # @see MetronomeSDK::Models::V1::ContractAmendParams::Commit#access_schedule
  class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute schedule_items
    #
    #   @return [Array<MetronomeSDK::Models::V1::ContractAmendParams::Commit::AccessSchedule::ScheduleItem>]
    required :schedule_items,
             -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractAmendParams::Commit::AccessSchedule::ScheduleItem] }

    # @!attribute credit_type_id
    #   Defaults to USD (cents) if not passed
    #
    #   @return [String, nil]
    optional :credit_type_id, String

    # @!method initialize(schedule_items:, credit_type_id: nil)
    #   Required: Schedule for distributing the commit to the customer. For "POSTPAID"
    #   commits only one schedule item is allowed and amount must match invoice_schedule
    #   total.
    #
    #   @param schedule_items [Array<MetronomeSDK::Models::V1::ContractAmendParams::Commit::AccessSchedule::ScheduleItem>]
    #
    #   @param credit_type_id [String] Defaults to USD (cents) if not passed

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

      # @!attribute ending_before
      #   RFC 3339 timestamp (exclusive)
      #
      #   @return [Time]
      required :ending_before, Time

      # @!attribute starting_at
      #   RFC 3339 timestamp (inclusive)
      #
      #   @return [Time]
      required :starting_at, Time

      # @!method initialize(amount:, ending_before:, starting_at:)
      #   @param amount [Float]
      #
      #   @param ending_before [Time] RFC 3339 timestamp (exclusive)
      #
      #   @param starting_at [Time] RFC 3339 timestamp (inclusive)
    end
  end

  # @see MetronomeSDK::Models::V1::ContractAmendParams::Commit#invoice_schedule
  class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute credit_type_id
    #   Defaults to USD (cents) if not passed.
    #
    #   @return [String, nil]
    optional :credit_type_id, String

    # @!attribute do_not_invoice
    #   This field is only applicable to commit invoice schedules. If true, this
    #   schedule will not generate an invoice.
    #
    #   @return [Boolean, nil]
    optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean

    # @!attribute recurring_schedule
    #   Enter the unit price and quantity for the charge or instead only send the
    #   amount. If amount is sent, the unit price is assumed to be the amount and
    #   quantity is inferred to be 1.
    #
    #   @return [MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule, nil]
    optional :recurring_schedule,
             -> { MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule }

    # @!attribute schedule_items
    #   Either provide amount or provide both unit_price and quantity.
    #
    #   @return [Array<MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::ScheduleItem>, nil]
    optional :schedule_items,
             -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule::ScheduleItem] }

    # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
    #   Some parameter documentations has been truncated, see
    #   {MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule} for
    #   more details.
    #
    #   Required for "POSTPAID" commits: the true up invoice will be generated at this
    #   time and only one schedule item is allowed; the total must match access_schedule
    #   amount. Optional for "PREPAID" commits: if not provided, this will be a
    #   "complimentary" commit with no invoice.
    #
    #   @param credit_type_id [String] Defaults to USD (cents) if not passed.
    #
    #   @param do_not_invoice [Boolean] This field is only applicable to commit invoice schedules. If true, this schedul
    #
    #   @param recurring_schedule [MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule] Enter the unit price and quantity for the charge or instead only send the amount
    #
    #   @param schedule_items [Array<MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::ScheduleItem>] Either provide amount or provide both unit_price and quantity.

    # @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule#recurring_schedule
    class RecurringSchedule < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute amount_distribution
      #
      #   @return [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule::AmountDistribution]
      required :amount_distribution,
               enum: -> { MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule::AmountDistribution }

      # @!attribute ending_before
      #   RFC 3339 timestamp (exclusive).
      #
      #   @return [Time]
      required :ending_before, Time

      # @!attribute frequency
      #
      #   @return [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule::Frequency]
      required :frequency,
               enum: -> { MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule::Frequency }

      # @!attribute starting_at
      #   RFC 3339 timestamp (inclusive).
      #
      #   @return [Time]
      required :starting_at, Time

      # @!attribute amount
      #   Amount for the charge. Can be provided instead of unit_price and quantity. If
      #   amount is sent, the unit_price is assumed to be the amount and quantity is
      #   inferred to be 1.
      #
      #   @return [Float, nil]
      optional :amount, Float

      # @!attribute quantity
      #   Quantity for the charge. Will be multiplied by unit_price to determine the
      #   amount and must be specified with unit_price. If specified amount cannot be
      #   provided.
      #
      #   @return [Float, nil]
      optional :quantity, Float

      # @!attribute unit_price
      #   Unit price for the charge. Will be multiplied by quantity to determine the
      #   amount and must be specified with quantity. If specified amount cannot be
      #   provided.
      #
      #   @return [Float, nil]
      optional :unit_price, Float

      # @!method initialize(amount_distribution:, ending_before:, frequency:, starting_at:, amount: nil, quantity: nil, unit_price: nil)
      #   Some parameter documentations has been truncated, see
      #   {MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule}
      #   for more details.
      #
      #   Enter the unit price and quantity for the charge or instead only send the
      #   amount. If amount is sent, the unit price is assumed to be the amount and
      #   quantity is inferred to be 1.
      #
      #   @param amount_distribution [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule::AmountDistribution]
      #
      #   @param ending_before [Time] RFC 3339 timestamp (exclusive).
      #
      #   @param frequency [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule::Frequency]
      #
      #   @param starting_at [Time] RFC 3339 timestamp (inclusive).
      #
      #   @param amount [Float] Amount for the charge. Can be provided instead of unit_price and quantity. If am
      #
      #   @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
      #
      #   @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun

      # @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule#amount_distribution
      module AmountDistribution
        extend MetronomeSDK::Internal::Type::Enum

        DIVIDED = :DIVIDED
        DIVIDED_ROUNDED = :DIVIDED_ROUNDED
        EACH = :EACH

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

      # @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule#frequency
      module Frequency
        extend MetronomeSDK::Internal::Type::Enum

        MONTHLY = :MONTHLY
        QUARTERLY = :QUARTERLY
        SEMI_ANNUAL = :SEMI_ANNUAL
        ANNUAL = :ANNUAL

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

    class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute timestamp
      #   timestamp of the scheduled event
      #
      #   @return [Time]
      required :timestamp, Time

      # @!attribute amount
      #   Amount for the charge. Can be provided instead of unit_price and quantity. If
      #   amount is sent, the unit_price is assumed to be the amount and quantity is
      #   inferred to be 1.
      #
      #   @return [Float, nil]
      optional :amount, Float

      # @!attribute quantity
      #   Quantity for the charge. Will be multiplied by unit_price to determine the
      #   amount and must be specified with unit_price. If specified amount cannot be
      #   provided.
      #
      #   @return [Float, nil]
      optional :quantity, Float

      # @!attribute unit_price
      #   Unit price for the charge. Will be multiplied by quantity to determine the
      #   amount and must be specified with quantity. If specified amount cannot be
      #   provided.
      #
      #   @return [Float, nil]
      optional :unit_price, Float

      # @!method initialize(timestamp:, amount: nil, quantity: nil, unit_price: nil)
      #   Some parameter documentations has been truncated, see
      #   {MetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule::ScheduleItem}
      #   for more details.
      #
      #   @param timestamp [Time] timestamp of the scheduled event
      #
      #   @param amount [Float] Amount for the charge. Can be provided instead of unit_price and quantity. If am
      #
      #   @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
      #
      #   @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun
    end
  end

  # @see MetronomeSDK::Models::V1::ContractAmendParams::Commit#payment_gate_config
  class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute payment_gate_type
    #   Gate access to the commit balance based on successful collection of payment.
    #   Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
    #   facilitate payment using your own payment integration. Select NONE if you do not
    #   wish to payment gate the commit balance.
    #
    #   @return [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType]
    required :payment_gate_type,
             enum: -> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType }

    # @!attribute precalculated_tax_config
    #   Only applicable if using PRECALCULATED as your tax type.
    #
    #   @return [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig, nil]
    optional :precalculated_tax_config,
             -> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig }

    # @!attribute stripe_config
    #   Only applicable if using STRIPE as your payment gate type.
    #
    #   @return [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig, nil]
    optional :stripe_config,
             -> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig }

    # @!attribute tax_type
    #   Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
    #   not wish Metronome to calculate tax on your behalf. Leaving this field blank
    #   will default to NONE.
    #
    #   @return [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType, nil]
    optional :tax_type, enum: -> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType }

    # @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
    #   Some parameter documentations has been truncated, see
    #   {MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig} for
    #   more details.
    #
    #   optionally payment gate this commit
    #
    #   @param payment_gate_type [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
    #
    #   @param precalculated_tax_config [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
    #
    #   @param stripe_config [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gate type.
    #
    #   @param tax_type [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n

    # Gate access to the commit balance based on successful collection of payment.
    # Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
    # facilitate payment using your own payment integration. Select NONE if you do not
    # wish to payment gate the commit balance.
    #
    # @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig#payment_gate_type
    module PaymentGateType
      extend MetronomeSDK::Internal::Type::Enum

      NONE = :NONE
      STRIPE = :STRIPE
      EXTERNAL = :EXTERNAL

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

    # @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig#precalculated_tax_config
    class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute tax_amount
      #   Amount of tax to be applied. This should be in the same currency and
      #   denomination as the commit's invoice schedule
      #
      #   @return [Float]
      required :tax_amount, Float

      # @!attribute tax_name
      #   Name of the tax to be applied. This may be used in an invoice line item
      #   description.
      #
      #   @return [String, nil]
      optional :tax_name, String

      # @!method initialize(tax_amount:, tax_name: nil)
      #   Some parameter documentations has been truncated, see
      #   {MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig}
      #   for more details.
      #
      #   Only applicable if using PRECALCULATED as your tax type.
      #
      #   @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
      #
      #   @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
    end

    # @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig#stripe_config
    class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute payment_type
      #   If left blank, will default to INVOICE
      #
      #   @return [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType]
      required :payment_type,
               enum: -> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType }

      # @!attribute invoice_metadata
      #   Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
      #   your payment type.
      #
      #   @return [Hash{Symbol=>String}, nil]
      optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]

      # @!attribute on_session_payment
      #   If true, the payment will be made assuming the customer is present (i.e. on
      #   session).
      #
      #   If false, the payment will be made assuming the customer is not present (i.e.
      #   off session). For cardholders from a country with an e-mandate requirement (e.g.
      #   India), the payment may be declined.
      #
      #   If left blank, will default to false.
      #
      #   @return [Boolean, nil]
      optional :on_session_payment, MetronomeSDK::Internal::Type::Boolean

      # @!method initialize(payment_type:, invoice_metadata: nil, on_session_payment: nil)
      #   Some parameter documentations has been truncated, see
      #   {MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig}
      #   for more details.
      #
      #   Only applicable if using STRIPE as your payment gate type.
      #
      #   @param payment_type [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
      #
      #   @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
      #
      #   @param on_session_payment [Boolean] If true, the payment will be made assuming the customer is present (i.e. on sess

      # If left blank, will default to INVOICE
      #
      # @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig#payment_type
      module PaymentType
        extend MetronomeSDK::Internal::Type::Enum

        INVOICE = :INVOICE
        PAYMENT_INTENT = :PAYMENT_INTENT

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

    # Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
    # not wish Metronome to calculate tax on your behalf. Leaving this field blank
    # will default to NONE.
    #
    # @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig#tax_type
    module TaxType
      extend MetronomeSDK::Internal::Type::Enum

      NONE = :NONE
      STRIPE = :STRIPE
      ANROK = :ANROK
      AVALARA = :AVALARA
      PRECALCULATED = :PRECALCULATED

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

  # @see MetronomeSDK::Models::V1::ContractAmendParams::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
end

Instance Attribute Details

#access_scheduleMetronomeSDK::Models::V1::ContractAmendParams::Commit::AccessSchedule?

Required: Schedule for distributing the commit to the customer. For “POSTPAID” commits only one schedule item is allowed and amount must match invoice_schedule total.



146
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 146

optional :access_schedule, -> { MetronomeSDK::V1::ContractAmendParams::Commit::AccessSchedule }

#amountFloat?

(DEPRECATED) Use access_schedule and invoice_schedule instead.

Returns:

  • (Float, nil)


152
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 152

optional :amount, Float

#applicable_product_idsArray<String>?

Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

Returns:

  • (Array<String>, nil)


160
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 160

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

#applicable_product_tagsArray<String>?

Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

Returns:

  • (Array<String>, nil)


168
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 168

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

#custom_fieldsHash{Symbol=>String}?

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

Returns:

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


174
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 174

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

#descriptionString?

Used only in UI/API. It is not exposed to end customers.

Returns:

  • (String, nil)


180
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 180

optional :description, String

#hierarchy_configurationMetronomeSDK::Models::CommitHierarchyConfiguration?

Optional configuration for commit hierarchy access control



186
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 186

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

#invoice_scheduleMetronomeSDK::Models::V1::ContractAmendParams::Commit::InvoiceSchedule?

Required for “POSTPAID” commits: the true up invoice will be generated at this time and only one schedule item is allowed; the total must match access_schedule amount. Optional for “PREPAID” commits: if not provided, this will be a “complimentary” commit with no invoice.



195
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 195

optional :invoice_schedule, -> { MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule }

#nameString?

displayed on invoices

Returns:

  • (String, nil)


201
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 201

optional :name, String

#netsuite_sales_order_idString?

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

Returns:

  • (String, nil)


207
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 207

optional :netsuite_sales_order_id, String

#payment_gate_configMetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig?

optionally payment gate this commit



213
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 213

optional :payment_gate_config, -> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig }

#priorityFloat?

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

Returns:

  • (Float, nil)


220
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 220

optional :priority, Float

#product_idString

Returns:

  • (String)


133
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 133

required :product_id, String

#rate_typeSymbol, ...



225
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 225

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

#rollover_fractionFloat?

Fraction of unused segments that will be rolled over. Must be between 0 and 1.

Returns:

  • (Float, nil)


231
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 231

optional :rollover_fraction, Float

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

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. This field cannot be used together with ‘applicable_product_ids` or `applicable_product_tags`.



240
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 240

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

#temporary_idString?

A temporary ID for the commit that can be used to reference the commit for commit specific overrides.

Returns:

  • (String, nil)


247
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 247

optional :temporary_id, String

#typeSymbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::Type



138
# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 138

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/v1/contract_amend_params.rb', line 296