Class: DocFox::KycApplication::DeleteService
- Inherits:
-
BaseService
- Object
- BaseService
- DocFox::KycApplication::DeleteService
- Defined in:
- lib/doc_fox/kyc_application/delete_service.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#call ⇒ Object
Delete a KYC application.
-
#initialize(id:) ⇒ DeleteService
constructor
A new instance of DeleteService.
Constructor Details
#initialize(id:) ⇒ DeleteService
Returns a new instance of DeleteService.
8 9 10 |
# File 'lib/doc_fox/kyc_application/delete_service.rb', line 8 def initialize(id:) @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/doc_fox/kyc_application/delete_service.rb', line 4 def id @id end |
Instance Method Details
#call ⇒ Object
Delete a KYC application.
Examples
service = DocFox::KycApplication::DeleteService.call(id: '')
service.success? # => true
service.errors # => #<ActiveModel::Errors []>
service.response # => #<Faraday::Response ...>
service.response.status # => 204
service.response.body # => ""
DELETE /api/v2/kyc_applications/:id
28 29 30 |
# File 'lib/doc_fox/kyc_application/delete_service.rb', line 28 def call connection.delete("kyc_applications/#{id}") end |