@@ -23,11 +23,6 @@ module Orb
2323 sig { returns ( String ) }
2424 attr_accessor :invoice_id
2525
26- # The item name associated with this line item. If an item with the same name
27- # exists in Orb, that item will be associated with the line item.
28- sig { returns ( String ) }
29- attr_accessor :name
30-
3126 # The number of units on the line item
3227 sig { returns ( Float ) }
3328 attr_accessor :quantity
@@ -36,14 +31,31 @@ module Orb
3631 sig { returns ( Date ) }
3732 attr_accessor :start_date
3833
34+ # The id of the item to associate with this line item. If provided without `name`,
35+ # the item's name will be used for the price/line item. If provided with `name`,
36+ # the item will be associated but `name` will be used for the line item. At least
37+ # one of `name` or `item_id` must be provided.
38+ sig { returns ( T . nilable ( String ) ) }
39+ attr_accessor :item_id
40+
41+ # The name to use for the line item. If `item_id` is not provided, Orb will search
42+ # for an item with this name. If found, that item will be associated with the line
43+ # item. If not found, a new item will be created with this name. If `item_id` is
44+ # provided, this name will be used for the line item, but the item association
45+ # will be based on `item_id`. At least one of `name` or `item_id` must be
46+ # provided.
47+ sig { returns ( T . nilable ( String ) ) }
48+ attr_accessor :name
49+
3950 sig do
4051 params (
4152 amount : String ,
4253 end_date : Date ,
4354 invoice_id : String ,
44- name : String ,
4555 quantity : Float ,
4656 start_date : Date ,
57+ item_id : T . nilable ( String ) ,
58+ name : T . nilable ( String ) ,
4759 request_options : Orb ::RequestOptions ::OrHash
4860 ) . returns ( T . attached_class )
4961 end
@@ -54,13 +66,22 @@ module Orb
5466 end_date :,
5567 # The id of the Invoice to add this line item.
5668 invoice_id :,
57- # The item name associated with this line item. If an item with the same name
58- # exists in Orb, that item will be associated with the line item.
59- name :,
6069 # The number of units on the line item
6170 quantity :,
6271 # A date string to specify the line item's start date in the customer's timezone.
6372 start_date :,
73+ # The id of the item to associate with this line item. If provided without `name`,
74+ # the item's name will be used for the price/line item. If provided with `name`,
75+ # the item will be associated but `name` will be used for the line item. At least
76+ # one of `name` or `item_id` must be provided.
77+ item_id : nil ,
78+ # The name to use for the line item. If `item_id` is not provided, Orb will search
79+ # for an item with this name. If found, that item will be associated with the line
80+ # item. If not found, a new item will be created with this name. If `item_id` is
81+ # provided, this name will be used for the line item, but the item association
82+ # will be based on `item_id`. At least one of `name` or `item_id` must be
83+ # provided.
84+ name : nil ,
6485 request_options : { }
6586 )
6687 end
@@ -71,9 +92,10 @@ module Orb
7192 amount : String ,
7293 end_date : Date ,
7394 invoice_id : String ,
74- name : String ,
7595 quantity : Float ,
7696 start_date : Date ,
97+ item_id : T . nilable ( String ) ,
98+ name : T . nilable ( String ) ,
7799 request_options : Orb ::RequestOptions
78100 }
79101 )
0 commit comments