Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing fails if no FI data #4

Open
jonlidgard opened this issue Apr 12, 2022 · 0 comments
Open

Parsing fails if no FI data #4

jonlidgard opened this issue Apr 12, 2022 · 0 comments

Comments

@jonlidgard
Copy link

Some ofx files do not include FI information (e.g. Barclays Bank). Following code in Finance.swift makes FI parsing optional
/// Information about the entity which provided the OFX file.
public struct Institute: Information {
static let label: String = "FI"

/// The name of the institution.
public var name: String = ""

/// An identifier for this specific institution.
public var id: Identifier = ""

init?(parent element: Element) {
if let element = element[Institute.label] {
name = element["ORG"]?.content ?? ""
id = element["FID"]?.content ?? ""
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant