@@ -14,9 +14,10 @@ def initialize(client:)
1414 # @return [Square::Types::GetInventoryAdjustmentResponse]
1515 def deprecated_get_adjustment ( request_options : { } , **params )
1616 _request = Square ::Internal ::JSON ::Request . new (
17- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
17+ base_url : request_options [ :base_url ] ,
1818 method : "GET" ,
19- path : "v2/inventory/adjustment/#{ params [ :adjustment_id ] } "
19+ path : "v2/inventory/adjustment/#{ params [ :adjustment_id ] } " ,
20+ request_options : request_options
2021 )
2122 begin
2223 _response = @client . send ( _request )
@@ -38,9 +39,10 @@ def deprecated_get_adjustment(request_options: {}, **params)
3839 # @return [Square::Types::GetInventoryAdjustmentResponse]
3940 def get_adjustment ( request_options : { } , **params )
4041 _request = Square ::Internal ::JSON ::Request . new (
41- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
42+ base_url : request_options [ :base_url ] ,
4243 method : "GET" ,
43- path : "v2/inventory/adjustments/#{ params [ :adjustment_id ] } "
44+ path : "v2/inventory/adjustments/#{ params [ :adjustment_id ] } " ,
45+ request_options : request_options
4446 )
4547 begin
4648 _response = @client . send ( _request )
@@ -62,10 +64,11 @@ def get_adjustment(request_options: {}, **params)
6264 # @return [Square::Types::BatchChangeInventoryResponse]
6365 def deprecated_batch_change ( request_options : { } , **params )
6466 _request = Square ::Internal ::JSON ::Request . new (
65- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
67+ base_url : request_options [ :base_url ] ,
6668 method : "POST" ,
6769 path : "v2/inventory/batch-change" ,
68- body : Square ::Types ::BatchChangeInventoryRequest . new ( params ) . to_h
70+ body : Square ::Types ::BatchChangeInventoryRequest . new ( params ) . to_h ,
71+ request_options : request_options
6972 )
7073 begin
7174 _response = @client . send ( _request )
@@ -87,10 +90,11 @@ def deprecated_batch_change(request_options: {}, **params)
8790 # @return [Square::Types::BatchGetInventoryChangesResponse]
8891 def deprecated_batch_get_changes ( request_options : { } , **params )
8992 _request = Square ::Internal ::JSON ::Request . new (
90- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
93+ base_url : request_options [ :base_url ] ,
9194 method : "POST" ,
9295 path : "v2/inventory/batch-retrieve-changes" ,
93- body : Square ::Types ::BatchRetrieveInventoryChangesRequest . new ( params ) . to_h
96+ body : Square ::Types ::BatchRetrieveInventoryChangesRequest . new ( params ) . to_h ,
97+ request_options : request_options
9498 )
9599 begin
96100 _response = @client . send ( _request )
@@ -112,10 +116,11 @@ def deprecated_batch_get_changes(request_options: {}, **params)
112116 # @return [Square::Types::BatchGetInventoryCountsResponse]
113117 def deprecated_batch_get_counts ( request_options : { } , **params )
114118 _request = Square ::Internal ::JSON ::Request . new (
115- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
119+ base_url : request_options [ :base_url ] ,
116120 method : "POST" ,
117121 path : "v2/inventory/batch-retrieve-counts" ,
118- body : Square ::Types ::BatchGetInventoryCountsRequest . new ( params ) . to_h
122+ body : Square ::Types ::BatchGetInventoryCountsRequest . new ( params ) . to_h ,
123+ request_options : request_options
119124 )
120125 begin
121126 _response = @client . send ( _request )
@@ -140,10 +145,11 @@ def deprecated_batch_get_counts(request_options: {}, **params)
140145 # @return [Square::Types::BatchChangeInventoryResponse]
141146 def batch_create_changes ( request_options : { } , **params )
142147 _request = Square ::Internal ::JSON ::Request . new (
143- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
148+ base_url : request_options [ :base_url ] ,
144149 method : "POST" ,
145150 path : "v2/inventory/changes/batch-create" ,
146- body : Square ::Types ::BatchChangeInventoryRequest . new ( params ) . to_h
151+ body : Square ::Types ::BatchChangeInventoryRequest . new ( params ) . to_h ,
152+ request_options : request_options
147153 )
148154 begin
149155 _response = @client . send ( _request )
@@ -177,10 +183,11 @@ def batch_get_changes(request_options: {}, **params)
177183 ) do |next_cursor |
178184 params [ :cursor ] = next_cursor
179185 _request = Square ::Internal ::JSON ::Request . new (
180- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
186+ base_url : request_options [ :base_url ] ,
181187 method : "POST" ,
182188 path : "v2/inventory/changes/batch-retrieve" ,
183- body : Square ::Types ::BatchRetrieveInventoryChangesRequest . new ( params ) . to_h
189+ body : Square ::Types ::BatchRetrieveInventoryChangesRequest . new ( params ) . to_h ,
190+ request_options : request_options
184191 )
185192 begin
186193 _response = @client . send ( _request )
@@ -218,10 +225,11 @@ def batch_get_counts(request_options: {}, **params)
218225 ) do |next_cursor |
219226 params [ :cursor ] = next_cursor
220227 _request = Square ::Internal ::JSON ::Request . new (
221- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
228+ base_url : request_options [ :base_url ] ,
222229 method : "POST" ,
223230 path : "v2/inventory/counts/batch-retrieve" ,
224- body : Square ::Types ::BatchGetInventoryCountsRequest . new ( params ) . to_h
231+ body : Square ::Types ::BatchGetInventoryCountsRequest . new ( params ) . to_h ,
232+ request_options : request_options
225233 )
226234 begin
227235 _response = @client . send ( _request )
@@ -244,9 +252,10 @@ def batch_get_counts(request_options: {}, **params)
244252 # @return [Square::Types::GetInventoryPhysicalCountResponse]
245253 def deprecated_get_physical_count ( request_options : { } , **params )
246254 _request = Square ::Internal ::JSON ::Request . new (
247- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
255+ base_url : request_options [ :base_url ] ,
248256 method : "GET" ,
249- path : "v2/inventory/physical-count/#{ params [ :physical_count_id ] } "
257+ path : "v2/inventory/physical-count/#{ params [ :physical_count_id ] } " ,
258+ request_options : request_options
250259 )
251260 begin
252261 _response = @client . send ( _request )
@@ -268,9 +277,10 @@ def deprecated_get_physical_count(request_options: {}, **params)
268277 # @return [Square::Types::GetInventoryPhysicalCountResponse]
269278 def get_physical_count ( request_options : { } , **params )
270279 _request = Square ::Internal ::JSON ::Request . new (
271- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
280+ base_url : request_options [ :base_url ] ,
272281 method : "GET" ,
273- path : "v2/inventory/physical-counts/#{ params [ :physical_count_id ] } "
282+ path : "v2/inventory/physical-counts/#{ params [ :physical_count_id ] } " ,
283+ request_options : request_options
274284 )
275285 begin
276286 _response = @client . send ( _request )
@@ -292,9 +302,10 @@ def get_physical_count(request_options: {}, **params)
292302 # @return [Square::Types::GetInventoryTransferResponse]
293303 def get_transfer ( request_options : { } , **params )
294304 _request = Square ::Internal ::JSON ::Request . new (
295- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
305+ base_url : request_options [ :base_url ] ,
296306 method : "GET" ,
297- path : "v2/inventory/transfers/#{ params [ :transfer_id ] } "
307+ path : "v2/inventory/transfers/#{ params [ :transfer_id ] } " ,
308+ request_options : request_options
298309 )
299310 begin
300311 _response = @client . send ( _request )
@@ -329,10 +340,11 @@ def get(request_options: {}, **params)
329340 ) do |next_cursor |
330341 _query [ :cursor ] = next_cursor
331342 _request = Square ::Internal ::JSON ::Request . new (
332- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
343+ base_url : request_options [ :base_url ] ,
333344 method : "GET" ,
334345 path : "v2/inventory/#{ params [ :catalog_object_id ] } " ,
335- query : _query
346+ query : _query ,
347+ request_options : request_options
336348 )
337349 begin
338350 _response = @client . send ( _request )
@@ -377,10 +389,11 @@ def changes(request_options: {}, **params)
377389 ) do |next_cursor |
378390 _query [ :cursor ] = next_cursor
379391 _request = Square ::Internal ::JSON ::Request . new (
380- base_url : request_options [ :base_url ] || Square :: Environment :: PRODUCTION ,
392+ base_url : request_options [ :base_url ] ,
381393 method : "GET" ,
382394 path : "v2/inventory/#{ params [ :catalog_object_id ] } /changes" ,
383- query : _query
395+ query : _query ,
396+ request_options : request_options
384397 )
385398 begin
386399 _response = @client . send ( _request )
0 commit comments