Skip to content

Commit

Permalink
Revert "Updated visibility of initializers"
Browse files Browse the repository at this point in the history
This reverts commit f05a20c.
  • Loading branch information
Christian König committed Dec 10, 2015
1 parent f05a20c commit e60971c
Show file tree
Hide file tree
Showing 24 changed files with 63 additions and 57 deletions.
64 changes: 35 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,37 @@ Applications that would like to access the figo Connect have to register with us
Website: [http://figo.io](http://figo.io)


## Installation
## Credits

### Manually
The Figo Framework uses the following 3rd-party utilities, but is not exporting their symbols:

- [DaveWoodCom/XCGLogger](https://github.com/DaveWoodCom/XCGLogger)
- [JohnSundell/Unbox](https://github.com/JohnSundell/Unbox)


## Usage

Take a look at the test cases to see more examples of interaction with the API.

### Retrieve all accounts
Figo.retrieveAccounts() { accounts, _ in
if let accounts = accounts {
for account in accounts {
print(account.account_id)
}
}
}
### Retrieve a single account
Figo.retrieveAccount("A1.1") { account, _ in
if let account = account {
print(account.account_id)
}
}

## Installation

* Add Figo as a git submodule by running the following command:

`$ git submodule add https://github.com/figome/ios-sdk.git`
* Open the new folder and drag the Figo.xcodeproj into the Project Navigator of your application's Xcode project.
* Select the Figo.xcodeproj in the Project Navigator and verify the deployment target matches that of your application target.
* Add the Figo.framework to your target(s) in the "Embedded Binaries" sections

### Carthage

Expand Down Expand Up @@ -67,32 +88,17 @@ Website: [http://figo.io](http://figo.io)
`$(SRCROOT)/Carthage/Build/iOS/Figo.framework`


### CocoaPods


## Usage

Take a look at the test cases to see more examples of interaction with the API.
### Manually

### Retrieve all accounts
Figo.retrieveAccounts() { accounts, _ in
if let accounts = accounts {
for account in accounts {
print(account.account_id)
}
}
}
### Retrieve a single account
Figo.retrieveAccount("A1.1") { account, _ in
if let account = account {
print(account.account_id)
}
}
* Add Figo as a git submodule by running the following command:

## Credits
`$ git submodule add https://github.com/figome/ios-sdk.git`
* Open the new folder and drag the Figo.xcodeproj into the Project Navigator of your application's Xcode project.
* Select the Figo.xcodeproj in the Project Navigator and verify the deployment target matches that of your application target.
* Add the Figo.framework to your target(s) in the "Embedded Binaries" sections

The Figo Framework uses the following 3rd-party utilities:

- [DaveWoodCom/XCGLogger](https://github.com/DaveWoodCom/XCGLogger)
- [JohnSundell/Unbox](https://github.com/JohnSundell/Unbox)

6 changes: 3 additions & 3 deletions Source/Date.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Foundation
/// Provides a NSDate representation for the server's timestamps
public struct Date: UnboxableByTransform, CustomStringConvertible {

public typealias UnboxRawValueType = String
internal typealias UnboxRawValueType = String

public let date: NSDate
public let timestamp: String
Expand All @@ -35,11 +35,11 @@ public struct Date: UnboxableByTransform, CustomStringConvertible {
}
}

public static func transformUnboxedValue(unboxedValue: String) -> Date? {
static func transformUnboxedValue(unboxedValue: String) -> Date? {
return Date(timestamp: unboxedValue)
}

public static func unboxFallbackValue() -> Date {
static func unboxFallbackValue() -> Date {
return Date()
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation

public enum Error: ErrorType, CustomStringConvertible, Unboxable {

public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
let error: String = unboxer.unbox("error")
let error_description: String = unboxer.unbox("error_description")
self = .ServerErrorWithDescrition(error: error, description: error_description)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public enum SecuritySinceType: String, UnboxableEnum {
case Modified = "modified"


public static func unboxFallbackValue() -> SecuritySinceType {
static func unboxFallbackValue() -> SecuritySinceType {
return .Traded
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public enum TransactionSinceType: String, UnboxableEnum {
case Modified = "modified"


public static func unboxFallbackValue() -> TransactionSinceType {
static func unboxFallbackValue() -> TransactionSinceType {
return .Booked
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/Account.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public struct Account: Unboxable {
return formatter
}

public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
accountID = unboxer.unbox("account_id")
accountNumber = unboxer.unbox("account_number")
additionalIcons = unboxer.unbox("additional_icons")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/AccountType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public enum AccountType: String, UnboxableEnum {
case Depot = "Depot"
case Unknown = "Unknown"

public static func unboxFallbackValue() -> AccountType {
static func unboxFallbackValue() -> AccountType {
return .Unknown
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Types/Address.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct Address: Unboxable {
public let vat: Float?
public let bill: Bool?

public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
city = unboxer.unbox("city")
company = unboxer.unbox("company")
postalCode = unboxer.unbox("postal_code")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/Balance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public struct Balance: Unboxable {
public let status: SyncStatus?


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
balance = unboxer.unbox("balance")
balanceDate = unboxer.unbox("balance_date")
creditLine = unboxer.unbox("credit_line")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/Challenge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public struct Challenge: Unboxable {
public let data: String?


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
title = unboxer.unbox("title")
label = unboxer.unbox("label")
format = unboxer.unbox("format")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/LoginCredentials.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public struct LoginCredentials: Unboxable {
public let optional: Bool?


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
label = unboxer.unbox("label")
masked = unboxer.unbox("masked")
optional = unboxer.unbox("optional")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/LoginSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public struct LoginSettings: Unboxable {
public let advice: String?


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
bankName = unboxer.unbox("bank_name")
supported = unboxer.unbox("supported")
icon = unboxer.unbox("icon")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/Payment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public struct Payment: Unboxable {
public var notificationRecipient: String?


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
paymentID = unboxer.unbox("payment_id")
accountID = unboxer.unbox("account_id")
type = unboxer.unbox("type")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/PaymentParameters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public struct PaymentParameters: Unboxable {
public let supportedFileFormats: [String]
public let supportedTextKeys: [Int]

public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
allowedRecipients = unboxer.unbox("allowed_recipients")
canBeRecurring = unboxer.unbox("can_be_recurring")
canBeScheduled = unboxer.unbox("can_be_scheduled")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/PaymentProposal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public struct PaymentProposal: Unboxable {
public let additionalIcons: [String: String]?
public let icon: String

public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
accountNumber = unboxer.unbox("account_number")
bankCode = unboxer.unbox("bank_code")
name = unboxer.unbox("name")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/PaymentType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public enum PaymentType: String, UnboxableEnum {
case SEPAStandingOrder = "SEPA standing order"
case ModifySEPAStandingOrder = "Modify SEPA standing order"

public static func unboxFallbackValue() -> PaymentType {
static func unboxFallbackValue() -> PaymentType {
return .Unknown
}

Expand Down
4 changes: 2 additions & 2 deletions Source/Types/Security.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public struct SecurityListEnvelope: Unboxable {
public let deleted: [Security]
public let status: SyncStatus

public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
securities = unboxer.unbox("securities")
deleted = unboxer.unbox("deleted")
status = unboxer.unbox("status")
Expand Down Expand Up @@ -109,7 +109,7 @@ public struct Security: Unboxable {
}


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
securityID = unboxer.unbox("security_id")
accountID = unboxer.unbox("account_id")
name = unboxer.unbox("name")
Expand Down
4 changes: 2 additions & 2 deletions Source/Types/StandingOrder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public enum StandingOrderInterval: String, UnboxableEnum {
case HalfYearly = "half yearly"
case Yearly = "yearly"

public static func unboxFallbackValue() -> StandingOrderInterval {
static func unboxFallbackValue() -> StandingOrderInterval {
return .Monthly
}

Expand Down Expand Up @@ -101,7 +101,7 @@ public struct StandingOrder: Unboxable {
let modificationDate: Date?


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
standingOrderID = unboxer.unbox("standing_order_id")
accountID = unboxer.unbox("account_id")
firstExecutionDate = unboxer.unbox("first_execution_date")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/SupportedBank.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public struct SupportedBank: Unboxable {
public let advice: String


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
bankName = unboxer.unbox("bank_name")
bankCode = unboxer.unbox("bank_code")
bic = unboxer.unbox("bic")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/SupportedService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public struct SupportedService: Unboxable {
public let icon: String


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
name = unboxer.unbox("name")
bankCode = unboxer.unbox("bank_code")
additionalIcons = unboxer.unbox("additional_icons")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/SyncStatus.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public struct SyncStatus: Unboxable {
public let syncDate: Date


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
code = unboxer.unbox("code")
message = unboxer.unbox("message")
successDate = unboxer.unbox("success_timestamp")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/TANScheme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public struct TANScheme: Unboxable {
public let TANSchemeID: String


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
mediumName = unboxer.unbox("medium_name")
name = unboxer.unbox("name")
TANSchemeID = unboxer.unbox("tan_scheme_id")
Expand Down
4 changes: 2 additions & 2 deletions Source/Types/Transaction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public struct TransactionListEnvelope: Unboxable {
public let statistics: [String: AnyObject]
public let status: SyncStatus

public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
transactions = unboxer.unbox("transactions")
deleted = unboxer.unbox("deleted")
statistics = unboxer.unbox("statistics")
Expand Down Expand Up @@ -114,7 +114,7 @@ public struct Transaction: Unboxable {
public let additionalInfo: [String: AnyObject]?


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
accountID = unboxer.unbox("account_id")
accountNumber = unboxer.unbox("account_number")
amount = unboxer.unbox("amount")
Expand Down
2 changes: 1 addition & 1 deletion Source/Types/User.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public struct User: Unboxable {
public let filters: [AnyObject]?


public init(unboxer: Unboxer) {
init(unboxer: Unboxer) {
userID = unboxer.unbox("user_id")
name = unboxer.unbox("name")
email = unboxer.unbox("email")
Expand Down

0 comments on commit e60971c

Please sign in to comment.