Module: MangoApi::ClientWallets
- Extended by:
- UriProvider
- Defined in:
- lib/mangopay/api/service/client_wallets.rb
Overview
Provides API method delegates concerning the ClientWallet
entity
Class Method Summary collapse
-
.all {|filter_request = FilterRequest.new| ... } ⇒ Array
Retrieves client wallet entities.
-
.get(funds_type, currency) ⇒ ClientWallet
Retrieves a client wallet entity.
-
.of_funds_type(funds_type) {|filter_request = FilterRequest.new| ... } ⇒ Array
Retrieves client wallet entities of a certain funds type.
Methods included from UriProvider
Class Method Details
.all {|filter_request = FilterRequest.new| ... } ⇒ Array
Retrieves client wallet entities. Allows configuration of paging and sorting parameters by yielding a filtering object to a provided block. When no filters are specified, will retrieve the first page of 10 newest results.
Allowed FilterRequest
params:
-
page
-
per_page
-
sort_field and sort_direction
corresponding to provided filters
35 36 37 38 39 40 41 |
# File 'lib/mangopay/api/service/client_wallets.rb', line 35 def all uri = provide_uri(:get_client_wallets) filter_request = nil yield filter_request = FilterRequest.new if block_given? results = HttpClient.get(uri, filter_request) parse_results results end |
.get(funds_type, currency) ⇒ ClientWallet
Retrieves a client wallet entity. Client wallet entity of provided funds’ type and currency will be created if it does not yet exist.
17 18 19 20 21 |
# File 'lib/mangopay/api/service/client_wallets.rb', line 17 def get(funds_type, currency) uri = provide_uri(:get_client_wallet, funds_type, currency) response = HttpClient.get(uri) parse response end |
.of_funds_type(funds_type) {|filter_request = FilterRequest.new| ... } ⇒ Array
Retrieves client wallet entities of a certain funds type. Allows configuration of paging and sorting parameters by yielding a filtering object to a provided block. When no filters are specified, will retrieve the first page of 10 newest results.
Allowed FilterRequest
params:
-
page
-
per_page
-
sort_field and sort_direction
wallets to retrieve corresponding to provided filters
58 59 60 61 62 63 64 |
# File 'lib/mangopay/api/service/client_wallets.rb', line 58 def of_funds_type(funds_type) uri = provide_uri(:get_client_wallets_funds_type, funds_type) filter_request = nil yield filter_request = FilterRequest.new if block_given? results = HttpClient.get(uri, filter_request) parse_results results end |