Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions robosystems_client/api/robo_ledger_setup/link_bank_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def sync_detailed(
books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines
still in the inbox move with it (across an entity change their suggestion is resolved again on the
new chart, and a classification that named the old entity's account is dropped); posted entries stay
where they were posted. An account another connection already feeds is refused. An account the feed
where they were posted. An account another connection already feeds is refused, as is an entity
whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed
created and then left stays on its chart as an ordinary account. A sync already in flight when the
link moves can still land a line or two on the old account; running this again moves them. Read the
group's accounts with the `bankAccounts` GraphQL field.
Expand Down Expand Up @@ -172,7 +173,8 @@ def sync(
books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines
still in the inbox move with it (across an entity change their suggestion is resolved again on the
new chart, and a classification that named the old entity's account is dropped); posted entries stay
where they were posted. An account another connection already feeds is refused. An account the feed
where they were posted. An account another connection already feeds is refused, as is an entity
whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed
created and then left stays on its chart as an ordinary account. A sync already in flight when the
link moves can still land a line or two on the old account; running this again moves them. Read the
group's accounts with the `bankAccounts` GraphQL field.
Expand Down Expand Up @@ -221,7 +223,8 @@ async def asyncio_detailed(
books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines
still in the inbox move with it (across an entity change their suggestion is resolved again on the
new chart, and a classification that named the old entity's account is dropped); posted entries stay
where they were posted. An account another connection already feeds is refused. An account the feed
where they were posted. An account another connection already feeds is refused, as is an entity
whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed
created and then left stays on its chart as an ordinary account. A sync already in flight when the
link moves can still land a line or two on the old account; running this again moves them. Read the
group's accounts with the `bankAccounts` GraphQL field.
Expand Down Expand Up @@ -273,7 +276,8 @@ async def asyncio(
books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines
still in the inbox move with it (across an entity change their suggestion is resolved again on the
new chart, and a classification that named the old entity's account is dropped); posted entries stay
where they were posted. An account another connection already feeds is refused. An account the feed
where they were posted. An account another connection already feeds is refused, as is an entity
whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed
created and then left stays on its chart as an ordinary account. A sync already in flight when the
link moves can still land a line or two on the old account; running this again moves them. Read the
group's accounts with the `bankAccounts` GraphQL field.
Expand Down
22 changes: 22 additions & 0 deletions robosystems_client/models/mercury_connection_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ class MercuryConnectionConfig:
include_treasury (bool | Unset): Capture treasury-account activity alongside checking/savings. Default: True.
api_key (None | str | Unset): A personal read-only Mercury API token, for deployments that allow the api_key
credential mode. Omit to connect over OAuth.
entity_id (None | str | Unset): The entity whose books the feed's accounts land on: a subsidiary's id, or omit
for the group parent. Required when QuickBooks keeps the parent's books. Each account can be moved to another
entity later with `link-bank-account`.
"""

since_date: datetime.date | None | Unset = UNSET
include_treasury: bool | Unset = True
api_key: None | str | Unset = UNSET
entity_id: None | str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
Expand All @@ -54,6 +58,12 @@ def to_dict(self) -> dict[str, Any]:
else:
api_key = self.api_key

entity_id: None | str | Unset
if isinstance(self.entity_id, Unset):
entity_id = UNSET
else:
entity_id = self.entity_id

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
Expand All @@ -63,6 +73,8 @@ def to_dict(self) -> dict[str, Any]:
field_dict["include_treasury"] = include_treasury
if api_key is not UNSET:
field_dict["api_key"] = api_key
if entity_id is not UNSET:
field_dict["entity_id"] = entity_id

return field_dict

Expand Down Expand Up @@ -98,10 +110,20 @@ def _parse_api_key(data: object) -> None | str | Unset:

api_key = _parse_api_key(d.pop("api_key", UNSET))

def _parse_entity_id(data: object) -> None | str | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(None | str | Unset, data)

entity_id = _parse_entity_id(d.pop("entity_id", UNSET))

mercury_connection_config = cls(
since_date=since_date,
include_treasury=include_treasury,
api_key=api_key,
entity_id=entity_id,
)

mercury_connection_config.additional_properties = d
Expand Down
31 changes: 27 additions & 4 deletions robosystems_client/models/plaid_connection_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,24 @@
class PlaidConnectionConfig:
"""Plaid bank-feed connection configuration.

A bank feed is native accounting: the graph must already have a chart of
accounts and no live QuickBooks connection. The connection is created
`pending_oauth`; `POST /oauth/init` returns a `link_token` for Plaid
Link, and the `public_token` Link hands back completes it through
A bank feed is native accounting: the entity its accounts land on must
already have a chart of accounts and must not be the one QuickBooks keeps
(the group parent, while QuickBooks is connected). The connection is
created `pending_oauth`; `POST /oauth/init` returns a `link_token` for
Plaid Link, and the `public_token` Link hands back completes it through
`POST /oauth/callback/plaid` (as `code`). One connection per institution
login; a graph can hold several.

Attributes:
since_date (datetime.date | None | Unset): First day of the backfill (ISO 8601), and how much history Plaid is
asked to pull for the new Item (at most two years). Defaults to 1 January of last year.
entity_id (None | str | Unset): The entity whose books the feed's accounts land on: a subsidiary's id, or omit
for the group parent. Required when QuickBooks keeps the parent's books. Each account can be moved to another
entity later with `link-bank-account`.
"""

since_date: datetime.date | None | Unset = UNSET
entity_id: None | str | Unset = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> dict[str, Any]:
Expand All @@ -40,11 +45,19 @@ def to_dict(self) -> dict[str, Any]:
else:
since_date = self.since_date

entity_id: None | str | Unset
if isinstance(self.entity_id, Unset):
entity_id = UNSET
else:
entity_id = self.entity_id

field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if since_date is not UNSET:
field_dict["since_date"] = since_date
if entity_id is not UNSET:
field_dict["entity_id"] = entity_id

return field_dict

Expand All @@ -69,8 +82,18 @@ def _parse_since_date(data: object) -> datetime.date | None | Unset:

since_date = _parse_since_date(d.pop("since_date", UNSET))

def _parse_entity_id(data: object) -> None | str | Unset:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(None | str | Unset, data)

entity_id = _parse_entity_id(d.pop("entity_id", UNSET))

plaid_connection_config = cls(
since_date=since_date,
entity_id=entity_id,
)

plaid_connection_config.additional_properties = d
Expand Down
Loading