Class: MetronomeSDK::Models::V1::Customers::Invoice::LineItem
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- MetronomeSDK::Models::V1::Customers::Invoice::LineItem
- Defined in:
- lib/metronome_sdk/models/v1/customers/invoice.rb
Defined Under Namespace
Modules: ResellerType Classes: AppliedCommitOrCredit, Origin, PostpaidCommit, SubLineItem, Tier
Instance Attribute Summary collapse
-
#applied_commit_or_credit ⇒ MetronomeSDK::Models::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit?
Details about the credit or commit that was applied to this line item.
-
#commit_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg.
-
#commit_id ⇒ String?
For line items with product of ‘USAGE`, `SUBSCRIPTION`, or `COMPOSITE` types, the ID of the credit or commit that was applied to this line item.
- #commit_netsuite_item_id ⇒ String?
- #commit_netsuite_sales_order_id ⇒ String?
- #commit_segment_id ⇒ String?
-
#commit_type ⇒ String?
‘PrepaidCommit` (for commit types `PREPAID` and `CREDIT`) or `PostpaidCommit` (for commit type `POSTPAID`).
- #credit_type ⇒ MetronomeSDK::Models::CreditTypeData
-
#custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg.
-
#discount_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg.
-
#discount_id ⇒ String?
ID of the discount applied to this line item.
-
#ending_before ⇒ Time?
The line item’s end date (exclusive).
- #group_key ⇒ String?
- #group_value ⇒ String?
-
#is_prorated ⇒ Boolean?
Indicates whether the line item is prorated for ‘SUBSCRIPTION` type product.
-
#list_price ⇒ MetronomeSDK::Models::Rate?
Only present for contract invoices and when the ‘include_list_prices` query parameter is set to true.
- #metadata ⇒ String?
- #name ⇒ String
-
#netsuite_invoice_billing_end ⇒ Time?
The end date for the billing period on the invoice.
-
#netsuite_invoice_billing_start ⇒ Time?
The start date for the billing period on the invoice.
- #netsuite_item_id ⇒ String?
-
#origin ⇒ MetronomeSDK::Models::V1::Customers::Invoice::LineItem::Origin?
Account hierarchy M3 - Present on line items from invoices with type USAGE_CONSOLIDATED.
-
#postpaid_commit ⇒ MetronomeSDK::Models::V1::Customers::Invoice::LineItem::PostpaidCommit?
Only present for line items paying for a postpaid commit true-up.
-
#presentation_group_values ⇒ Hash{Symbol=>String, nil}?
Includes the presentation group values associated with this line item if presentation group keys are used.
-
#pricing_group_values ⇒ Hash{Symbol=>String}?
Includes the pricing group values associated with this line item if dimensional pricing is used.
-
#product_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg.
-
#product_id ⇒ String?
ID of the product associated with the line item.
-
#product_tags ⇒ Array<String>?
The current product tags associated with the line item’s ‘product_id`.
-
#product_type ⇒ String?
The type of the line item’s product.
-
#professional_service_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg.
- #professional_service_id ⇒ String?
-
#quantity ⇒ Float?
The quantity associated with the line item.
- #reseller_type ⇒ Symbol, ...
-
#scheduled_charge_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg.
-
#scheduled_charge_id ⇒ String?
ID of scheduled charge.
-
#starting_at ⇒ Time?
The line item’s start date (inclusive).
- #sub_line_items ⇒ Array<MetronomeSDK::Models::V1::Customers::Invoice::LineItem::SubLineItem>?
-
#subscription_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg.
-
#tier ⇒ MetronomeSDK::Models::V1::Customers::Invoice::LineItem::Tier?
Populated if the line item has a tiered price.
- #total ⇒ Float
-
#type ⇒ String
The type of line item.
-
#unit_price ⇒ Float?
The unit price associated with the line item.
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(price: , quantity: , starting_at: , subtotal: ) ⇒ Object
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 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 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 242 class LineItem < MetronomeSDK::Internal::Type::BaseModel # @!attribute credit_type # # @return [MetronomeSDK::Models::CreditTypeData] required :credit_type, -> { MetronomeSDK::CreditTypeData } # @!attribute name # # @return [String] required :name, String # @!attribute total # # @return [Float] required :total, Float # @!attribute type # The type of line item. # # - `scheduled`: Line item is associated with a scheduled charge. View the # scheduled_charge_id on the line item. # - `commit_purchase`: Line item is associated with a payment for a prepaid # commit. View the commit_id on the line item. # - `usage`: Line item is associated with a usage product or composite product. # View the product_id on the line item to determine which product. # - `subscription`: Line item is associated with a subscription. e.g. monthly # recurring payment for an in-advance subscription. # - `applied_commit_or_credit`: On metronome invoices, applied commits and credits # are associated with their own line items. These line items have negative # totals. Use the applied_commit_or_credit object on the line item to understand # the id of the applied commit or credit, and its type. Note that the # application of a postpaid commit is associated with a line item, but the total # on the line item is not included in the invoice's total as postpaid commits # are paid in-arrears. # - `cpu_conversion`: Line item converting between a custom pricing unit and fiat # currency, using the conversion rate set on the rate card. This line item will # appear when there are products priced in custom pricing units, and there is # insufficient prepaid commit/credit in that custom pricing unit to fully cover # the spend. Then, the outstanding spend in custom pricing units will be # converted to fiat currency using a cpu_conversion line item. # # @return [String] required :type, String # @!attribute applied_commit_or_credit # Details about the credit or commit that was applied to this line item. Only # present on line items with product of `USAGE`, `SUBSCRIPTION` or `COMPOSITE` # types. # # @return [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit, nil] optional :applied_commit_or_credit, -> { MetronomeSDK::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit } # @!attribute commit_custom_fields # Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @return [Hash{Symbol=>String}, nil] optional :commit_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] # @!attribute commit_id # For line items with product of `USAGE`, `SUBSCRIPTION`, or `COMPOSITE` types, # the ID of the credit or commit that was applied to this line item. For line # items with product type of `FIXED`, the ID of the prepaid or postpaid commit # that is being paid for. # # @return [String, nil] optional :commit_id, String # @!attribute commit_netsuite_item_id # # @return [String, nil] optional :commit_netsuite_item_id, String # @!attribute commit_netsuite_sales_order_id # # @return [String, nil] optional :commit_netsuite_sales_order_id, String # @!attribute commit_segment_id # # @return [String, nil] optional :commit_segment_id, String # @!attribute commit_type # `PrepaidCommit` (for commit types `PREPAID` and `CREDIT`) or `PostpaidCommit` # (for commit type `POSTPAID`). # # @return [String, nil] optional :commit_type, 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 discount_custom_fields # Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @return [Hash{Symbol=>String}, nil] optional :discount_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] # @!attribute discount_id # ID of the discount applied to this line item. # # @return [String, nil] optional :discount_id, String # @!attribute ending_before # The line item's end date (exclusive). # # @return [Time, nil] optional :ending_before, Time # @!attribute group_key # # @return [String, nil] optional :group_key, String # @!attribute group_value # # @return [String, nil] optional :group_value, String, nil?: true # @!attribute is_prorated # Indicates whether the line item is prorated for `SUBSCRIPTION` type product. # # @return [Boolean, nil] optional :is_prorated, MetronomeSDK::Internal::Type::Boolean # @!attribute list_price # Only present for contract invoices and when the `include_list_prices` query # parameter is set to true. This will include the list rate for the charge if # applicable. Only present for usage and subscription line items. # # @return [MetronomeSDK::Models::Rate, nil] optional :list_price, -> { MetronomeSDK::Rate } # @!attribute metadata # # @return [String, nil] optional :metadata, String # @!attribute netsuite_invoice_billing_end # The end date for the billing period on the invoice. # # @return [Time, nil] optional :netsuite_invoice_billing_end, Time # @!attribute netsuite_invoice_billing_start # The start date for the billing period on the invoice. # # @return [Time, nil] optional :netsuite_invoice_billing_start, Time # @!attribute netsuite_item_id # # @return [String, nil] optional :netsuite_item_id, String # @!attribute origin # Account hierarchy M3 - Present on line items from invoices with type # USAGE_CONSOLIDATED. Indicates the original customer, contract, invoice and line # item from which this line item was copied. # # @return [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::Origin, nil] optional :origin, -> { MetronomeSDK::V1::Customers::Invoice::LineItem::Origin } # @!attribute postpaid_commit # Only present for line items paying for a postpaid commit true-up. # # @return [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::PostpaidCommit, nil] optional :postpaid_commit, -> { MetronomeSDK::V1::Customers::Invoice::LineItem::PostpaidCommit } # @!attribute presentation_group_values # Includes the presentation group values associated with this line item if # presentation group keys are used. # # @return [Hash{Symbol=>String, nil}, nil] optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String, nil?: true] # @!attribute pricing_group_values # Includes the pricing group values associated with this line item if dimensional # pricing is used. # # @return [Hash{Symbol=>String}, nil] optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String] # @!attribute product_custom_fields # Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @return [Hash{Symbol=>String}, nil] optional :product_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] # @!attribute product_id # ID of the product associated with the line item. # # @return [String, nil] optional :product_id, String # @!attribute product_tags # The current product tags associated with the line item's `product_id`. # # @return [Array<String>, nil] optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String] # @!attribute product_type # The type of the line item's product. Possible values are `FixedProductListItem` # (for `FIXED` type products), `UsageProductListItem` (for `USAGE` type products), # `SubscriptionProductListItem` (for `SUBSCRIPTION` type products) or # `CompositeProductListItem` (for `COMPOSITE` type products). For scheduled # charges, commit and credit payments, the value is `FixedProductListItem`. # # @return [String, nil] optional :product_type, String # @!attribute professional_service_custom_fields # Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @return [Hash{Symbol=>String}, nil] optional :professional_service_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] # @!attribute professional_service_id # # @return [String, nil] optional :professional_service_id, String # @!attribute quantity # The quantity associated with the line item. # # @return [Float, nil] optional :quantity, Float # @!attribute reseller_type # # @return [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::LineItem::ResellerType, nil] optional :reseller_type, enum: -> { MetronomeSDK::V1::Customers::Invoice::LineItem::ResellerType } # @!attribute scheduled_charge_custom_fields # Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @return [Hash{Symbol=>String}, nil] optional :scheduled_charge_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] # @!attribute scheduled_charge_id # ID of scheduled charge. # # @return [String, nil] optional :scheduled_charge_id, String # @!attribute starting_at # The line item's start date (inclusive). # # @return [Time, nil] optional :starting_at, Time # @!attribute sub_line_items # # @return [Array<MetronomeSDK::Models::V1::Customers::Invoice::LineItem::SubLineItem>, nil] optional :sub_line_items, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::Invoice::LineItem::SubLineItem] } # @!attribute subscription_custom_fields # Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @return [Hash{Symbol=>String}, nil] optional :subscription_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] # @!attribute tier # Populated if the line item has a tiered price. # # @return [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::Tier, nil] optional :tier, -> { MetronomeSDK::V1::Customers::Invoice::LineItem::Tier } # @!attribute unit_price # The unit price associated with the line item. # # @return [Float, nil] optional :unit_price, Float # @!method initialize(credit_type:, name:, total:, type:, applied_commit_or_credit: nil, commit_custom_fields: nil, commit_id: nil, commit_netsuite_item_id: nil, commit_netsuite_sales_order_id: nil, commit_segment_id: nil, commit_type: nil, custom_fields: nil, discount_custom_fields: nil, discount_id: nil, ending_before: nil, group_key: nil, group_value: nil, is_prorated: nil, list_price: nil, metadata: nil, netsuite_invoice_billing_end: nil, netsuite_invoice_billing_start: nil, netsuite_item_id: nil, origin: nil, postpaid_commit: nil, presentation_group_values: nil, pricing_group_values: nil, product_custom_fields: nil, product_id: nil, product_tags: nil, product_type: nil, professional_service_custom_fields: nil, professional_service_id: nil, quantity: nil, reseller_type: nil, scheduled_charge_custom_fields: nil, scheduled_charge_id: nil, starting_at: nil, sub_line_items: nil, subscription_custom_fields: nil, tier: nil, unit_price: nil) # Some parameter documentations has been truncated, see # {MetronomeSDK::Models::V1::Customers::Invoice::LineItem} for more details. # # @param credit_type [MetronomeSDK::Models::CreditTypeData] # # @param name [String] # # @param total [Float] # # @param type [String] The type of line item. # # @param applied_commit_or_credit [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit] Details about the credit or commit that was applied to this line item. Only pres # # @param commit_custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @param commit_id [String] For line items with product of `USAGE`, `SUBSCRIPTION`, or `COMPOSITE` types, th # # @param commit_netsuite_item_id [String] # # @param commit_netsuite_sales_order_id [String] # # @param commit_segment_id [String] # # @param commit_type [String] `PrepaidCommit` (for commit types `PREPAID` and `CREDIT`) or `PostpaidCommit` (f # # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @param discount_custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @param discount_id [String] ID of the discount applied to this line item. # # @param ending_before [Time] The line item's end date (exclusive). # # @param group_key [String] # # @param group_value [String, nil] # # @param is_prorated [Boolean] Indicates whether the line item is prorated for `SUBSCRIPTION` type product. # # @param list_price [MetronomeSDK::Models::Rate] Only present for contract invoices and when the `include_list_prices` query para # # @param metadata [String] # # @param netsuite_invoice_billing_end [Time] The end date for the billing period on the invoice. # # @param netsuite_invoice_billing_start [Time] The start date for the billing period on the invoice. # # @param netsuite_item_id [String] # # @param origin [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::Origin] Account hierarchy M3 - Present on line items from invoices with type USAGE_CONSO # # @param postpaid_commit [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::PostpaidCommit] Only present for line items paying for a postpaid commit true-up. # # @param presentation_group_values [Hash{Symbol=>String, nil}] Includes the presentation group values associated with this line item if present # # @param pricing_group_values [Hash{Symbol=>String}] Includes the pricing group values associated with this line item if dimensional # # @param product_custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @param product_id [String] ID of the product associated with the line item. # # @param product_tags [Array<String>] The current product tags associated with the line item's `product_id`. # # @param product_type [String] The type of the line item's product. Possible values are `FixedProductListItem` # # @param professional_service_custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @param professional_service_id [String] # # @param quantity [Float] The quantity associated with the line item. # # @param reseller_type [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::LineItem::ResellerType] # # @param scheduled_charge_custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @param scheduled_charge_id [String] ID of scheduled charge. # # @param starting_at [Time] The line item's start date (inclusive). # # @param sub_line_items [Array<MetronomeSDK::Models::V1::Customers::Invoice::LineItem::SubLineItem>] # # @param subscription_custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @param tier [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::Tier] Populated if the line item has a tiered price. # # @param unit_price [Float] The unit price associated with the line item. # @see MetronomeSDK::Models::V1::Customers::Invoice::LineItem#applied_commit_or_credit class AppliedCommitOrCredit < MetronomeSDK::Internal::Type::BaseModel # @!attribute id # # @return [String] required :id, String # @!attribute type # # @return [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit::Type] required :type, enum: -> { MetronomeSDK::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit::Type } # @!method initialize(id:, type:) # Details about the credit or commit that was applied to this line item. Only # present on line items with product of `USAGE`, `SUBSCRIPTION` or `COMPOSITE` # types. # # @param id [String] # @param type [Symbol, MetronomeSDK::Models::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit::Type] # @see MetronomeSDK::Models::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit#type module Type extend MetronomeSDK::Internal::Type::Enum PREPAID = :PREPAID POSTPAID = :POSTPAID CREDIT = :CREDIT # @!method self.values # @return [Array<Symbol>] end end # @see MetronomeSDK::Models::V1::Customers::Invoice::LineItem#origin class Origin < MetronomeSDK::Internal::Type::BaseModel # @!attribute contract_id # # @return [String] required :contract_id, String # @!attribute customer_id # # @return [String] required :customer_id, String # @!attribute invoice_id # # @return [String] required :invoice_id, String # @!attribute line_item_id # # @return [String] required :line_item_id, String # @!method initialize(contract_id:, customer_id:, invoice_id:, line_item_id:) # Account hierarchy M3 - Present on line items from invoices with type # USAGE_CONSOLIDATED. Indicates the original customer, contract, invoice and line # item from which this line item was copied. # # @param contract_id [String] # @param customer_id [String] # @param invoice_id [String] # @param line_item_id [String] end # @see MetronomeSDK::Models::V1::Customers::Invoice::LineItem#postpaid_commit class PostpaidCommit < MetronomeSDK::Internal::Type::BaseModel # @!attribute id # # @return [String] required :id, String # @!method initialize(id:) # Only present for line items paying for a postpaid commit true-up. # # @param id [String] end # @see MetronomeSDK::Models::V1::Customers::Invoice::LineItem#reseller_type module ResellerType extend MetronomeSDK::Internal::Type::Enum AWS = :AWS AWS_PRO_SERVICE = :AWS_PRO_SERVICE GCP = :GCP GCP_PRO_SERVICE = :GCP_PRO_SERVICE # @!method self.values # @return [Array<Symbol>] end class SubLineItem < MetronomeSDK::Internal::Type::BaseModel # @!attribute custom_fields # Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @return [Hash{Symbol=>String}] required :custom_fields, MetronomeSDK::Internal::Type::HashOf[String] # @!attribute name # # @return [String] required :name, String # @!attribute quantity # # @return [Float] required :quantity, Float # @!attribute subtotal # # @return [Float] required :subtotal, Float # @!attribute charge_id # # @return [String, nil] optional :charge_id, String # @!attribute credit_grant_id # # @return [String, nil] optional :credit_grant_id, String # @!attribute end_date # The end date for the charge (for seats charges only). # # @return [Time, nil] optional :end_date, Time # @!attribute price # the unit price for this charge, present only if the charge is not tiered and the # quantity is nonzero # # @return [Float, nil] optional :price, Float # @!attribute start_date # The start date for the charge (for seats charges only). # # @return [Time, nil] optional :start_date, Time # @!attribute tier_period # when the current tier started and ends (for tiered charges only) # # @return [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::SubLineItem::TierPeriod, nil] optional :tier_period, -> { MetronomeSDK::V1::Customers::Invoice::LineItem::SubLineItem::TierPeriod } # @!attribute tiers # # @return [Array<MetronomeSDK::Models::V1::Customers::Invoice::LineItem::SubLineItem::Tier>, nil] optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::Invoice::LineItem::SubLineItem::Tier] } # @!method initialize(custom_fields:, name:, quantity:, subtotal:, charge_id: nil, credit_grant_id: nil, end_date: nil, price: nil, start_date: nil, tier_period: nil, tiers: nil) # Some parameter documentations has been truncated, see # {MetronomeSDK::Models::V1::Customers::Invoice::LineItem::SubLineItem} for more # details. # # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" } # # @param name [String] # # @param quantity [Float] # # @param subtotal [Float] # # @param charge_id [String] # # @param credit_grant_id [String] # # @param end_date [Time] The end date for the charge (for seats charges only). # # @param price [Float] the unit price for this charge, present only if the charge is not tiered and the # # @param start_date [Time] The start date for the charge (for seats charges only). # # @param tier_period [MetronomeSDK::Models::V1::Customers::Invoice::LineItem::SubLineItem::TierPeriod] when the current tier started and ends (for tiered charges only) # # @param tiers [Array<MetronomeSDK::Models::V1::Customers::Invoice::LineItem::SubLineItem::Tier>] # @see MetronomeSDK::Models::V1::Customers::Invoice::LineItem::SubLineItem#tier_period class TierPeriod < MetronomeSDK::Internal::Type::BaseModel # @!attribute starting_at # # @return [Time] required :starting_at, Time # @!attribute ending_before # # @return [Time, nil] optional :ending_before, Time # @!method initialize(starting_at:, ending_before: nil) # when the current tier started and ends (for tiered charges only) # # @param starting_at [Time] # @param ending_before [Time] end class Tier < MetronomeSDK::Internal::Type::BaseModel # @!attribute price # # @return [Float] required :price, Float # @!attribute quantity # # @return [Float] required :quantity, Float # @!attribute starting_at # at what metric amount this tier begins # # @return [Float] required :starting_at, Float # @!attribute subtotal # # @return [Float] required :subtotal, Float # @!method initialize(price:, quantity:, starting_at:, subtotal:) # @param price [Float] # # @param quantity [Float] # # @param starting_at [Float] at what metric amount this tier begins # # @param subtotal [Float] end end # @see MetronomeSDK::Models::V1::Customers::Invoice::LineItem#tier class Tier < MetronomeSDK::Internal::Type::BaseModel # @!attribute level # # @return [Float] required :level, Float # @!attribute starting_at # # @return [String] required :starting_at, String # @!attribute size # # @return [String, nil] optional :size, String, nil?: true # @!method initialize(level:, starting_at:, size: nil) # Populated if the line item has a tiered price. # # @param level [Float] # @param starting_at [String] # @param size [String, nil] end end |
Instance Attribute Details
#applied_commit_or_credit ⇒ MetronomeSDK::Models::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit?
Details about the credit or commit that was applied to this line item. Only present on line items with product of ‘USAGE`, `SUBSCRIPTION` or `COMPOSITE` types.
292 293 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 292 optional :applied_commit_or_credit, -> { MetronomeSDK::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit } |
#commit_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }
299 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 299 optional :commit_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] |
#commit_id ⇒ String?
For line items with product of ‘USAGE`, `SUBSCRIPTION`, or `COMPOSITE` types, the ID of the credit or commit that was applied to this line item. For line items with product type of `FIXED`, the ID of the prepaid or postpaid commit that is being paid for.
308 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 308 optional :commit_id, String |
#commit_netsuite_item_id ⇒ String?
313 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 313 optional :commit_netsuite_item_id, String |
#commit_netsuite_sales_order_id ⇒ String?
318 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 318 optional :commit_netsuite_sales_order_id, String |
#commit_segment_id ⇒ String?
323 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 323 optional :commit_segment_id, String |
#commit_type ⇒ String?
‘PrepaidCommit` (for commit types `PREPAID` and `CREDIT`) or `PostpaidCommit` (for commit type `POSTPAID`).
330 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 330 optional :commit_type, String |
#credit_type ⇒ MetronomeSDK::Models::CreditTypeData
246 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 246 required :credit_type, -> { MetronomeSDK::CreditTypeData } |
#custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }
336 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 336 optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String] |
#discount_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }
342 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 342 optional :discount_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] |
#discount_id ⇒ String?
ID of the discount applied to this line item.
348 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 348 optional :discount_id, String |
#ending_before ⇒ Time?
The line item’s end date (exclusive).
354 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 354 optional :ending_before, Time |
#group_key ⇒ String?
359 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 359 optional :group_key, String |
#group_value ⇒ String?
364 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 364 optional :group_value, String, nil?: true |
#is_prorated ⇒ Boolean?
Indicates whether the line item is prorated for ‘SUBSCRIPTION` type product.
370 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 370 optional :is_prorated, MetronomeSDK::Internal::Type::Boolean |
#list_price ⇒ MetronomeSDK::Models::Rate?
Only present for contract invoices and when the ‘include_list_prices` query parameter is set to true. This will include the list rate for the charge if applicable. Only present for usage and subscription line items.
378 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 378 optional :list_price, -> { MetronomeSDK::Rate } |
#metadata ⇒ String?
383 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 383 optional :metadata, String |
#name ⇒ String
251 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 251 required :name, String |
#netsuite_invoice_billing_end ⇒ Time?
The end date for the billing period on the invoice.
389 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 389 optional :netsuite_invoice_billing_end, Time |
#netsuite_invoice_billing_start ⇒ Time?
The start date for the billing period on the invoice.
395 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 395 optional :netsuite_invoice_billing_start, Time |
#netsuite_item_id ⇒ String?
400 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 400 optional :netsuite_item_id, String |
#origin ⇒ MetronomeSDK::Models::V1::Customers::Invoice::LineItem::Origin?
Account hierarchy M3 - Present on line items from invoices with type USAGE_CONSOLIDATED. Indicates the original customer, contract, invoice and line item from which this line item was copied.
408 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 408 optional :origin, -> { MetronomeSDK::V1::Customers::Invoice::LineItem::Origin } |
#postpaid_commit ⇒ MetronomeSDK::Models::V1::Customers::Invoice::LineItem::PostpaidCommit?
Only present for line items paying for a postpaid commit true-up.
414 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 414 optional :postpaid_commit, -> { MetronomeSDK::V1::Customers::Invoice::LineItem::PostpaidCommit } |
#presentation_group_values ⇒ Hash{Symbol=>String, nil}?
Includes the presentation group values associated with this line item if presentation group keys are used.
421 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 421 optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String, nil?: true] |
#pricing_group_values ⇒ Hash{Symbol=>String}?
Includes the pricing group values associated with this line item if dimensional pricing is used.
428 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 428 optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String] |
#product_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }
434 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 434 optional :product_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] |
#product_id ⇒ String?
ID of the product associated with the line item.
440 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 440 optional :product_id, String |
#product_tags ⇒ Array<String>?
The current product tags associated with the line item’s ‘product_id`.
446 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 446 optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String] |
#product_type ⇒ String?
The type of the line item’s product. Possible values are ‘FixedProductListItem` (for `FIXED` type products), `UsageProductListItem` (for `USAGE` type products), `SubscriptionProductListItem` (for `SUBSCRIPTION` type products) or `CompositeProductListItem` (for `COMPOSITE` type products). For scheduled charges, commit and credit payments, the value is `FixedProductListItem`.
456 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 456 optional :product_type, String |
#professional_service_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }
462 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 462 optional :professional_service_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] |
#professional_service_id ⇒ String?
467 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 467 optional :professional_service_id, String |
#quantity ⇒ Float?
The quantity associated with the line item.
473 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 473 optional :quantity, Float |
#reseller_type ⇒ Symbol, ...
478 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 478 optional :reseller_type, enum: -> { MetronomeSDK::V1::Customers::Invoice::LineItem::ResellerType } |
#scheduled_charge_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }
484 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 484 optional :scheduled_charge_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] |
#scheduled_charge_id ⇒ String?
ID of scheduled charge.
490 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 490 optional :scheduled_charge_id, String |
#starting_at ⇒ Time?
The line item’s start date (inclusive).
496 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 496 optional :starting_at, Time |
#sub_line_items ⇒ Array<MetronomeSDK::Models::V1::Customers::Invoice::LineItem::SubLineItem>?
501 502 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 501 optional :sub_line_items, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::Invoice::LineItem::SubLineItem] } |
#subscription_custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }
508 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 508 optional :subscription_custom_fields, MetronomeSDK::Internal::Type::HashOf[String] |
#tier ⇒ MetronomeSDK::Models::V1::Customers::Invoice::LineItem::Tier?
Populated if the line item has a tiered price.
514 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 514 optional :tier, -> { MetronomeSDK::V1::Customers::Invoice::LineItem::Tier } |
#total ⇒ Float
256 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 256 required :total, Float |
#type ⇒ String
The type of line item.
-
‘scheduled`: Line item is associated with a scheduled charge. View the scheduled_charge_id on the line item.
-
‘commit_purchase`: Line item is associated with a payment for a prepaid commit. View the commit_id on the line item.
-
‘usage`: Line item is associated with a usage product or composite product. View the product_id on the line item to determine which product.
-
‘subscription`: Line item is associated with a subscription. e.g. monthly recurring payment for an in-advance subscription.
-
‘applied_commit_or_credit`: On metronome invoices, applied commits and credits are associated with their own line items. These line items have negative totals. Use the applied_commit_or_credit object on the line item to understand the id of the applied commit or credit, and its type. Note that the application of a postpaid commit is associated with a line item, but the total on the line item is not included in the invoice’s total as postpaid commits are paid in-arrears.
-
‘cpu_conversion`: Line item converting between a custom pricing unit and fiat currency, using the conversion rate set on the rate card. This line item will appear when there are products priced in custom pricing units, and there is insufficient prepaid commit/credit in that custom pricing unit to fully cover the spend. Then, the outstanding spend in custom pricing units will be converted to fiat currency using a cpu_conversion line item.
284 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 284 required :type, String |
#unit_price ⇒ Float?
The unit price associated with the line item.
520 |
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 520 optional :unit_price, Float |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/metronome_sdk/models/v1/customers/invoice.rb', line 638
|