@@ -7,6 +7,7 @@ Create expense datasets and upload receipts.
77### Available Operations
88
99* [ create_expense_dataset] ( #create_expense_dataset ) - Create expense-transactions
10+ * [ update_expense_dataset] ( #update_expense_dataset ) - Update expense-transactions
1011* [ upload_attachment] ( #upload_attachment ) - Upload attachment
1112
1213## create_expense_dataset
@@ -307,6 +308,133 @@ if res.create_expense_response is not None:
307308** [ operations.CreateExpenseDatasetResponse] ( ../../models/operations/createexpensedatasetresponse.md ) **
308309
309310
311+ ## update_expense_dataset
312+
313+ Update an expense transaction
314+
315+ ### Example Usage
316+
317+ ``` python
318+ import codatsyncexpenses
319+ from codatsyncexpenses.models import operations, shared
320+
321+ s = codatsyncexpenses.CodatSyncExpenses(
322+ security = shared.Security(
323+ auth_header = " Basic BASE_64_ENCODED(API_KEY)" ,
324+ ),
325+ )
326+
327+ req = operations.UpdateExpenseDatasetRequest(
328+ update_expense_request = shared.UpdateExpenseRequest(
329+ currency = ' GBP' ,
330+ issue_date = ' 2022-06-28T00:00:00.000Z' ,
331+ lines = [
332+ shared.ExpenseTransactionLine(
333+ account_ref = shared.RecordRef(
334+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
335+ ),
336+ net_amount = 110.42 ,
337+ tax_amount = 14.43 ,
338+ tax_rate_ref = shared.RecordRef(
339+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
340+ ),
341+ tracking_refs = [
342+ shared.RecordRef(
343+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
344+ ),
345+ shared.RecordRef(
346+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
347+ ),
348+ shared.RecordRef(
349+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
350+ ),
351+ ],
352+ ),
353+ shared.ExpenseTransactionLine(
354+ account_ref = shared.RecordRef(
355+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
356+ ),
357+ net_amount = 110.42 ,
358+ tax_amount = 14.43 ,
359+ tax_rate_ref = shared.RecordRef(
360+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
361+ ),
362+ tracking_refs = [
363+ shared.RecordRef(
364+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
365+ ),
366+ shared.RecordRef(
367+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
368+ ),
369+ ],
370+ ),
371+ shared.ExpenseTransactionLine(
372+ account_ref = shared.RecordRef(
373+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
374+ ),
375+ net_amount = 110.42 ,
376+ tax_amount = 14.43 ,
377+ tax_rate_ref = shared.RecordRef(
378+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
379+ ),
380+ tracking_refs = [
381+ shared.RecordRef(
382+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
383+ ),
384+ shared.RecordRef(
385+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
386+ ),
387+ shared.RecordRef(
388+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
389+ ),
390+ ],
391+ ),
392+ shared.ExpenseTransactionLine(
393+ account_ref = shared.RecordRef(
394+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
395+ ),
396+ net_amount = 110.42 ,
397+ tax_amount = 14.43 ,
398+ tax_rate_ref = shared.RecordRef(
399+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
400+ ),
401+ tracking_refs = [
402+ shared.RecordRef(
403+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
404+ ),
405+ shared.RecordRef(
406+ id = ' 40e3e57c-2322-4898-966c-ca41adfd23fd' ,
407+ ),
408+ ],
409+ ),
410+ ],
411+ merchant_name = ' Amazon UK' ,
412+ notes = ' APPLE.COM/BILL - 09001077498 - Card Ending: 4590' ,
413+ type = ' recusandae' ,
414+ ),
415+ company_id = ' 8a210b68-6988-11ed-a1eb-0242ac120002' ,
416+ transaction_id = ' 336694d8-2dca-4cb5-a28d-3ccb83e55eee' ,
417+ )
418+
419+ res = s.expenses.update_expense_dataset(req)
420+
421+ if res.update_expense_dataset_202_application_json_object is not None :
422+ # handle response
423+ ```
424+
425+ ### Parameters
426+
427+ | Parameter | Type | Required | Description |
428+ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
429+ | ` request ` | [ operations.UpdateExpenseDatasetRequest] ( ../../models/operations/updateexpensedatasetrequest.md ) | :heavy_check_mark : | The request object to use for the request. |
430+ | ` retries ` | [ Optional[ utils.RetryConfig]] ( ../../models/utils/retryconfig.md ) | :heavy_minus_sign : | Configuration to override the default retry behavior of the client. |
431+
432+
433+ ### Response
434+
435+ ** [ operations.UpdateExpenseDatasetResponse] ( ../../models/operations/updateexpensedatasetresponse.md ) **
436+
437+
310438## upload_attachment
311439
312440Creates an attachment in the accounting software against the given transactionId
@@ -325,8 +453,8 @@ s = codatsyncexpenses.CodatSyncExpenses(
325453
326454req = operations.UploadAttachmentRequest(
327455 request_body = operations.UploadAttachmentRequestBody(
328- content = ' placeat ' .encode(),
329- request_body = ' voluptatum ' ,
456+ content = ' temporibus ' .encode(),
457+ request_body = ' ab ' ,
330458 ),
331459 company_id = ' 8a210b68-6988-11ed-a1eb-0242ac120002' ,
332460 sync_id = ' 6fb40d5e-b13e-11ed-afa1-0242ac120002' ,
0 commit comments