You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creates a new company that can be used to assign connections to.
19
-
19
+
20
20
If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`.
Copy file name to clipboardExpand all lines: common/src/codatcommon/models/shared/company.py
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,9 @@
13
13
@dataclasses.dataclass
14
14
classCompany:
15
15
r"""In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/codat-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data.
16
-
16
+
17
17
Typically each company is one of your customers.
18
-
18
+
19
19
When you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company.
r"""The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company."""
r"""In Codat's data model, dates and times are represented using the <a class=\\"external\\" href=\\"https://en.wikipedia.org/wiki/ISO_8601\\" target=\\"_blank\\">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
29
-
29
+
30
30
```
31
31
2020-10-08T22:40:50Z
32
32
2021-01-01T00:00:00
33
33
```
34
-
35
-
36
-
34
+
35
+
36
+
37
37
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
38
-
38
+
39
39
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
40
40
- Unqualified local time: `2021-11-15T01:00:00`
41
41
- UTC time offsets: `2021-11-15T01:00:00-05:00`
42
-
42
+
43
43
> Time zones
44
44
>
45
45
> Not all dates from Codat will contain information about time zones.
@@ -51,20 +51,20 @@ class Company:
51
51
r"""Additional information about the company. This can be used to store foreign IDs, references, etc."""
r"""In Codat's data model, dates and times are represented using the <a class=\\"external\\" href=\\"https://en.wikipedia.org/wiki/ISO_8601\\" target=\\"_blank\\">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
54
-
54
+
55
55
```
56
56
2020-10-08T22:40:50Z
57
57
2021-01-01T00:00:00
58
58
```
59
-
60
-
61
-
59
+
60
+
61
+
62
62
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
63
-
63
+
64
64
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
65
65
- Unqualified local time: `2021-11-15T01:00:00`
66
66
- UTC time offsets: `2021-11-15T01:00:00-05:00`
67
-
67
+
68
68
> Time zones
69
69
>
70
70
> Not all dates from Codat will contain information about time zones.
Copy file name to clipboardExpand all lines: common/src/codatcommon/models/shared/connection.py
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -15,32 +15,32 @@
15
15
@dataclasses.dataclass
16
16
classConnection:
17
17
r"""A connection represents a [company's](https://docs.codat.io/codat-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.
18
-
18
+
19
19
A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to:
20
-
20
+
21
21
- [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection.
22
22
- [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections.
23
23
- [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections.
24
24
Any combination of accounting, banking, and commerce data connections is allowed.
25
-
25
+
26
26
Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview).
r"""In Codat's data model, dates and times are represented using the <a class=\\"external\\" href=\\"https://en.wikipedia.org/wiki/ISO_8601\\" target=\\"_blank\\">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
30
-
30
+
31
31
```
32
32
2020-10-08T22:40:50Z
33
33
2021-01-01T00:00:00
34
34
```
35
-
36
-
37
-
35
+
36
+
37
+
38
38
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
39
-
39
+
40
40
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
41
41
- Unqualified local time: `2021-11-15T01:00:00`
42
42
- UTC time offsets: `2021-11-15T01:00:00-05:00`
43
-
43
+
44
44
> Time zones
45
45
>
46
46
> Not all dates from Codat will contain information about time zones.
r"""In Codat's data model, dates and times are represented using the <a class=\\"external\\" href=\\"https://en.wikipedia.org/wiki/ISO_8601\\" target=\\"_blank\\">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
68
-
68
+
69
69
```
70
70
2020-10-08T22:40:50Z
71
71
2021-01-01T00:00:00
72
72
```
73
-
74
-
75
-
73
+
74
+
75
+
76
76
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
77
-
77
+
78
78
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
79
79
- Unqualified local time: `2021-11-15T01:00:00`
80
80
- UTC time offsets: `2021-11-15T01:00:00-05:00`
81
-
81
+
82
82
> Time zones
83
83
>
84
84
> Not all dates from Codat will contain information about time zones.
r"""In Codat's data model, dates and times are represented using the <a class=\\"external\\" href=\\"https://en.wikipedia.org/wiki/ISO_8601\\" target=\\"_blank\\">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
16
-
16
+
17
17
```
18
18
2020-10-08T22:40:50Z
19
19
2021-01-01T00:00:00
20
20
```
21
-
22
-
23
-
21
+
22
+
23
+
24
24
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
25
-
25
+
26
26
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
27
27
- Unqualified local time: `2021-11-15T01:00:00`
28
28
- UTC time offsets: `2021-11-15T01:00:00-05:00`
29
-
29
+
30
30
> Time zones
31
31
>
32
32
> Not all dates from Codat will contain information about time zones.
r"""In Codat's data model, dates and times are represented using the <a class=\\"external\\" href=\\"https://en.wikipedia.org/wiki/ISO_8601\\" target=\\"_blank\\">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
19
-
19
+
20
20
```
21
21
2020-10-08T22:40:50Z
22
22
2021-01-01T00:00:00
23
23
```
24
-
25
-
26
-
24
+
25
+
26
+
27
27
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
28
-
28
+
29
29
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
30
30
- Unqualified local time: `2021-11-15T01:00:00`
31
31
- UTC time offsets: `2021-11-15T01:00:00-05:00`
32
-
32
+
33
33
> Time zones
34
34
>
35
35
> Not all dates from Codat will contain information about time zones.
r"""In Codat's data model, dates and times are represented using the <a class=\\"external\\" href=\\"https://en.wikipedia.org/wiki/ISO_8601\\" target=\\"_blank\\">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
51
-
51
+
52
52
```
53
53
2020-10-08T22:40:50Z
54
54
2021-01-01T00:00:00
55
55
```
56
-
57
-
58
-
56
+
57
+
58
+
59
59
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
60
-
60
+
61
61
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
62
62
- Unqualified local time: `2021-11-15T01:00:00`
63
63
- UTC time offsets: `2021-11-15T01:00:00-05:00`
64
-
64
+
65
65
> Time zones
66
66
>
67
67
> Not all dates from Codat will contain information about time zones.
0 commit comments