Class: DocFox::KycEntityTemplate::ListService

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

Instance Method Summary collapse

Methods included from Enumerable

#call, #each

Constructor Details

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

List KYC entity templates.

https://www.docfoxapp.com/api/v2/documentation#tag/KYC-Entity-Templates/paths/~1api~1v2~1kyc_entity_templates/get

Examples

service = DocFox::KycEntityTemplate::ListService.call.first
service.id
service.kyc_entity_type_name

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::KycEntityTemplate::ListService.call(page: 1, per_page: 10).map { _1 }

GET /api/v2/kyc_entity_templates



22
23
24
25
26
27
28
29
# File 'lib/doc_fox/kyc_entity_template/list_service.rb', line 22

def initialize(page: 1, per_page: Float::INFINITY)
  super(
    path:         'kyc_entity_templates',
    facade_klass: DocFox::KycEntityTemplate::Facade,
    page:         page,
    per_page:     per_page
  )
end