Class: DocFox::Profile::ListService
- Inherits:
-
BaseService
- Object
- BaseService
- DocFox::Profile::ListService
- Includes:
- Enumerable
- Defined in:
- lib/doc_fox/profile/list_service.rb
Instance Attribute Summary collapse
-
#kyc_application_id ⇒ Object
readonly
Returns the value of attribute kyc_application_id.
Instance Method Summary collapse
-
#initialize(kyc_application_id:, page: 1, per_page: Float::INFINITY) ⇒ ListService
constructor
List profiles.
Methods included from Enumerable
Constructor Details
#initialize(kyc_application_id:, page: 1, per_page: Float::INFINITY) ⇒ ListService
List profiles.
Examples
service = DocFox::Profile::ListService.call(kyc_application_id: '').first
service.id
service.created_at
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::Profile::ListService.call(kyc_application_id: '', page: 1, per_page: 10).map { _1 }
GET /api/v2/kyc_applications/:kyc_application_id/profiles
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/doc_fox/profile/list_service.rb', line 26 def initialize(kyc_application_id:, page: 1, per_page: Float::INFINITY) @kyc_application_id = kyc_application_id super( path: "kyc_applications/#{kyc_application_id}/profiles", facade_klass: DocFox::Profile::Facade, page: page, per_page: per_page ) end |
Instance Attribute Details
#kyc_application_id ⇒ Object (readonly)
Returns the value of attribute kyc_application_id.
6 7 8 |
# File 'lib/doc_fox/profile/list_service.rb', line 6 def kyc_application_id @kyc_application_id end |