Class: MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit

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

Defined Under Namespace

Modules: RateType, Type Classes: InvoiceSchedule, Product

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

Parameters:

  • id (String) (defaults to: )
  • timestamp (Time) (defaults to: )
  • amount (Float) (defaults to: nil)
  • invoice_id (String, nil) (defaults to: nil)
  • quantity (Float) (defaults to: nil)
  • unit_price (Float) (defaults to: nil)


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
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 277

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

  # @!attribute product
  #
  #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Product]
  required :product,
           -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Product }

  # @!attribute type
  #
  #   @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Type]
  required :type,
           enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::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_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 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_schedule
  #   The schedule that the customer will be invoiced for this commit.
  #
  #   @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule, nil]
  optional :invoice_schedule,
           -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule }

  # @!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::V2::ContractGetEditHistoryResponse::Data::AddCommit::RateType, nil]
  optional :rate_type,
           enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::RateType }

  # @!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. This field cannot
  #   be used together with `applicable_product_ids` or `applicable_product_tags`.
  #   Instead, to target usage by product or product tag, pass those values in the
  #   body of `specifiers`.
  #
  #   @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
  optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }

  # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil)
  #   Some parameter documentations has been truncated, see
  #   {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit} for
  #   more details.
  #
  #   @param id [String]
  #
  #   @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Product]
  #
  #   @param type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Type]
  #
  #   @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits purposed with thi
  #
  #   @param applicable_product_ids [Array<String>]
  #
  #   @param applicable_product_tags [Array<String>]
  #
  #   @param description [String]
  #
  #   @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
  #
  #   @param invoice_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule] The schedule that the customer will be invoiced for this commit.
  #
  #   @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::V2::ContractGetEditHistoryResponse::Data::AddCommit::RateType]
  #
  #   @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::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o

  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#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::V2::ContractGetEditHistoryResponse::Data::AddCommit#type
  module Type
    extend MetronomeSDK::Internal::Type::Enum

    PREPAID = :PREPAID
    POSTPAID = :POSTPAID

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

  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#invoice_schedule
  class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute credit_type
    #
    #   @return [MetronomeSDK::Models::CreditTypeData, nil]
    optional :credit_type, -> { MetronomeSDK::CreditTypeData }

    # @!attribute do_not_invoice
    #   If true, this schedule will not generate an invoice.
    #
    #   @return [Boolean, nil]
    optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean

    # @!attribute schedule_items
    #
    #   @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem>, nil]
    optional :schedule_items,
             -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem] }

    # @!method initialize(credit_type: nil, do_not_invoice: nil, schedule_items: nil)
    #   The schedule that the customer will be invoiced for this commit.
    #
    #   @param credit_type [MetronomeSDK::Models::CreditTypeData]
    #
    #   @param do_not_invoice [Boolean] If true, this schedule will not generate an invoice.
    #
    #   @param schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem>]

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

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

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

      # @!attribute invoice_id
      #
      #   @return [String, nil]
      optional :invoice_id, String, nil?: true

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

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

      # @!method initialize(id:, timestamp:, amount: nil, invoice_id: nil, quantity: nil, unit_price: nil)
      #   @param id [String]
      #   @param timestamp [Time]
      #   @param amount [Float]
      #   @param invoice_id [String, nil]
      #   @param quantity [Float]
      #   @param unit_price [Float]
    end
  end

  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#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::ScheduleDuration?

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



300
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 300

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

#applicable_product_idsArray<String>?

Returns:

  • (Array<String>, nil)


305
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 305

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

#applicable_product_tagsArray<String>?

Returns:

  • (Array<String>, nil)


310
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 310

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

#descriptionString?

Returns:

  • (String, nil)


315
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 315

optional :description, String

#hierarchy_configurationMetronomeSDK::Models::CommitHierarchyConfiguration?

Optional configuration for commit hierarchy access control



321
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 321

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

#idString

Returns:

  • (String)


281
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 281

required :id, String

#invoice_scheduleMetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule?

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



327
328
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 327

optional :invoice_schedule,
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule }

#nameString?

Returns:

  • (String, nil)


333
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 333

optional :name, String

#netsuite_sales_order_idString?

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

Returns:

  • (String, nil)


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

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)


346
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 346

optional :priority, Float

#productMetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Product



286
287
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 286

required :product,
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Product }

#rate_typeSymbol, ...



351
352
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 351

optional :rate_type,
enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::RateType }

#rollover_fractionFloat?

Returns:

  • (Float, nil)


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

optional :rollover_fraction, Float

#salesforce_opportunity_idString?

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

Returns:

  • (String, nil)


363
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 363

optional :salesforce_opportunity_id, String

#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`. Instead, to target usage by product or product tag, pass those values in the body of `specifiers`.



374
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 374

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

#typeSymbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Type



292
293
# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 292

required :type,
enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb', line 437