Class: DocFox::KycApplication::ListService

Inherits:
BaseService
  • Object
show all
Includes:
Enumerable
Defined in:
lib/doc_fox/kyc_application/list_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Enumerable

#call, #each

Constructor Details

#initialize(page: 1, per_page: Float::INFINITY, search_term: nil) ⇒ ListService

List KYC applications.

https://www.docfoxapp.com/api/v2/documentation#tag/KYC-Applications/paths/~1api~1v2~1kyc_applications/get

Examples

service = DocFox::KycApplication::ListService.call.first
service.id
service.status

If you don't provide the per_page argument, multiple API requests will be made untill all records have been returned. You could be rate limited, so use wisely.

DocFox::KycApplication::ListService.call(page: 1, per_page: 10).map { _1 }

Filter by names, numbers contact information or external refs.

DocFox::KycApplication::ListService.call(search_term: '[email protected]').map { _1 }

GET /api/v2/kyc_applications



28
29
30
31
32
33
34
35
36
37
# File 'lib/doc_fox/kyc_application/list_service.rb', line 28

def initialize(page: 1, per_page: Float::INFINITY, search_term: nil)
  @search_term = search_term

  super(
    path:         'kyc_applications',
    facade_klass: DocFox::KycApplication::Facade,
    page:         page,
    per_page:     per_page
  )
end

Instance Attribute Details

#search_termObject (readonly)

Returns the value of attribute search_term.



6
7
8
# File 'lib/doc_fox/kyc_application/list_service.rb', line 6

def search_term
  @search_term
end