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

Add reserve model #14

Merged
merged 3 commits into from
Nov 10, 2015
Merged

Add reserve model #14

merged 3 commits into from
Nov 10, 2015

Conversation

diogoguimaraes
Copy link
Contributor

This pull request adds the reserve model and the reserve service methods to the Uphold client.

@diogoguimaraes diogoguimaraes self-assigned this Nov 6, 2015
@diogoguimaraes diogoguimaraes force-pushed the feature/add-reserve branch 2 times, most recently from c303043 to 73bad8b Compare November 6, 2015 16:44
@diogoguimaraes
Copy link
Contributor Author

R=@SandroMachado

}

/**
Gets the public view of any transaction.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to Gets the information of any transaction.?


- parameter type: The type of the deposit.
- parameter out: The deposit out movement.
- parameter `in`: The deposit in movement.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the backticks from the in parameter in the documentation.

reserve.adapter = MockRestAdapter(body: json)

reserve.getStatistics().then { (statistics: [ReserveStatistics]) -> () in
XCTAssertEqual(statistics[0].currency, "FOO", "Failed: Currency didn't match.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sort.

"\"assets\": \"foobar\"," +
"\"liabilities\": \"foobiz\"" +
"}" +
"}, {" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the indentation.

- parameter transactionId: The id of the transaction.
- parameter type: The type of the deposit.
*/
public init(createdAt: String, input: DepositMovement, out: DepositMovement, transactionId: String, type: String) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update from out to output.

@diogoguimaraes
Copy link
Contributor Author

Updated @SandroMachado .

let expectation = expectationWithDescription("Reserve test.")
let json: String = "[{ \"id\": \"foobar\" }, { \"id\": \"foobiz\" }]"
let reserve = UpholdClient().getReserve()
reserve.adapter = MockRestAdapter(body: json)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT of adding a new line before reserve.adapter = MockRestAdapter(body: json)?

@diogoguimaraes
Copy link
Contributor Author

Updated @SandroMachado .


let json: String = "[" +
"{" +
let json: String = "[{" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the indentation.

SandroMachado added a commit that referenced this pull request Nov 10, 2015
@SandroMachado SandroMachado merged commit 5c086b5 into master Nov 10, 2015
@SandroMachado SandroMachado deleted the feature/add-reserve branch November 10, 2015 15:20
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

Successfully merging this pull request may close these issues.

2 participants