xero-python icon indicating copy to clipboard operation
xero-python copied to clipboard

Create Purchase Orders: Address Type error

Open NateJones5150 opened this issue 4 years ago • 0 comments

Hi,

When executing create_purchase_orders, the PO is successfully being put through to my Xero account (API history shows as successful too), however I'm receiving the below error on the backend:

ValueError: Invalid value for address_type (), must be one of ['POBOX', 'STREET', 'None']

See my workings below for reference: purchase_order = PurchaseOrder( contact=contact, line_items=line_item, delivery_date=delivery_date, status=status, ) purchase_orders = PurchaseOrders(purchase_orders=[purchase_order]) create_purchase_order = accounting_api.create_purchase_orders(xero_tenant_id, purchase_orders)

Also I tried using Address() to add delivery details but got a JSON type error (which Ive not received for other times I've used Address(), eg: adding contacts/etc)

Any thoughts?

NateJones5150 avatar Oct 26 '21 02:10 NateJones5150