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 get wallets for user #92

Merged
merged 1 commit into from Sep 18, 2018
Merged

Add get wallets for user #92

merged 1 commit into from Sep 18, 2018

Conversation

mederic-p
Copy link
Contributor

Closes #87

Overview

This PR adds the ability to retrieve the list of wallets for a user given his id or providerUserId

Changes

  • Refactor paginated collection listing
  • Add new api endpoint

Usage

        let paginationParams: PaginatedListParams<Wallet> = PaginatedListParams<Wallet>(page: 1, perPage: 10, sortBy: .address, sortDirection: .ascending)
        let params = WalletListForUserParams(paginatedListParams: paginationParams, userId: "usr_01cq97a3hgm49h8tw28evv5bg2")
        Wallet.getForUser(using: self.apiClient, params: params) { result in
            switch result {
            case let .success(data: paginatedWallets):
                let wallets = paginatedWallets.data
                print(wallets)
            case let .fail(error: error): print(error)
            }
        }

@ghost ghost added the s2/wip 🚧 This is still being worked on label Sep 17, 2018
@mederic-p mederic-p changed the base branch from 86-get-wallet to master September 18, 2018 04:49
@mederic-p mederic-p merged commit c2e171e into master Sep 18, 2018
@ghost ghost removed the s2/wip 🚧 This is still being worked on label Sep 18, 2018
@mederic-p mederic-p deleted the 87-get-user-wallet branch September 18, 2018 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants