Skip to content

Add costs to client#12

Merged
jacobo merged 6 commits intomasterfrom
costs
Jul 20, 2015
Merged

Add costs to client#12
jacobo merged 6 commits intomasterfrom
costs

Conversation

@emachnic
Copy link
Copy Markdown
Contributor

This exposes costs from the API for an account. Given an account, you should be able to get the array of costs for that account.

Example:

costs = account.costs.all

If you have the costs array, you should then be able to select any costs that fit your needs:

costs.select { |c| c.level == 'final' }

@jacobo
Copy link
Copy Markdown
Contributor

jacobo commented Jul 20, 2015

LGTM, although note: you could just request the costs where level: 'total' instead of requesting all and then selecting the 'total' ones

Comment thread lib/ey-core/requests/get_costs.rb Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

params["id"]

jacobo added a commit that referenced this pull request Jul 20, 2015
@jacobo jacobo merged commit 8c50ef5 into master Jul 20, 2015
@jacobo jacobo deleted the costs branch July 20, 2015 23:29
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.

3 participants