Skip to content

Commit

Permalink
Added active state for Item, Contact created and Tracking categories (#…
Browse files Browse the repository at this point in the history
…362)

* Added active state for Item, Contact created and Tracking categories

* Add active state for Tenant
  • Loading branch information
Hrishabh17 authored May 14, 2024
1 parent 63d103a commit 05fa3b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/xero/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def sync_tenants(self):
"display_name": "Tenant",
"value": tenant["tenantName"],
"destination_id": tenant["tenantId"],
"active": True
}
)

Expand Down Expand Up @@ -194,6 +195,7 @@ def sync_tax_codes(self):
"tax_rate": effective_tax_rate,
"tax_refs": tax_code["TaxComponents"],
},
"active": True
}
)

Expand Down Expand Up @@ -386,6 +388,7 @@ def sync_tracking_categories(self):
"display_name": tracking_category["Name"],
"value": option["Name"],
"destination_id": option["TrackingOptionID"],
"active": True if option["Status"] == "ACTIVE" else False,
}
)

Expand Down Expand Up @@ -419,6 +422,7 @@ def sync_items(self):
"display_name": "Item",
"value": item["Code"],
"destination_id": item["ItemID"],
"active": True
}
)
DestinationAttribute.bulk_create_or_update_destination_attributes(
Expand All @@ -438,6 +442,7 @@ def create_contact_destination_attribute(self, contact):
if "EmailAddress" in contact
else None
},
"active": True
},
self.workspace_id,
)
Expand Down

0 comments on commit 05fa3b8

Please sign in to comment.