Class: DocFox::KycApplication::UnapproveService
- Inherits:
-
BaseService
- Object
- BaseService
- DocFox::KycApplication::UnapproveService
- Defined in:
- lib/doc_fox/kyc_application/unapprove_service.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#call ⇒ Object
Unapprove a KYC application.
-
#initialize(id:, reason:) ⇒ UnapproveService
constructor
A new instance of UnapproveService.
Constructor Details
#initialize(id:, reason:) ⇒ UnapproveService
Returns a new instance of UnapproveService.
12 13 14 15 |
# File 'lib/doc_fox/kyc_application/unapprove_service.rb', line 12 def initialize(id:, reason:) @id = id @reason = reason end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/doc_fox/kyc_application/unapprove_service.rb', line 4 def id @id end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
4 5 6 |
# File 'lib/doc_fox/kyc_application/unapprove_service.rb', line 4 def reason @reason end |
Instance Method Details
#call ⇒ Object
Unapprove a KYC application.
Examples
service = DocFox::KycApplication::UnapproveService.call(id: '', reason: '')
service.success? # => true
service.errors # => #<ActiveModel::Errors []>
service.response # => #<Faraday::Response ...>
service.response.status # => 200
service.response.body # => {}
service.facade # => #<DocFox::KycApplication::Facade ...>
service.facade.id
service.id
PATCH /api/v2/kyc_applications/:id/unapprove
37 38 39 |
# File 'lib/doc_fox/kyc_application/unapprove_service.rb', line 37 def call connection.patch("kyc_applications/#{id}/unapprove", **params) end |