Class: DocFox::KycApplication::UnarchiveService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/doc_fox/kyc_application/unarchive_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, reason:) ⇒ UnarchiveService

Returns a new instance of UnarchiveService.



8
9
10
11
# File 'lib/doc_fox/kyc_application/unarchive_service.rb', line 8

def initialize(id:, reason:)
  @id     = id
  @reason = reason
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/doc_fox/kyc_application/unarchive_service.rb', line 4

def id
  @id
end

#reasonObject (readonly)

Returns the value of attribute reason.



4
5
6
# File 'lib/doc_fox/kyc_application/unarchive_service.rb', line 4

def reason
  @reason
end

Instance Method Details

#callObject

Unarchive a KYC application.

https://www.docfoxapp.com/api/v2/documentation#tag/KYC-Applications/paths/~1api~1v2~1kyc_applications~1%7Bkyc_application_id%7D~1unarchive/post

Examples

service = DocFox::KycApplication::UnarchiveService.call(id: '', reason: '')

service.success? # => true
service.errors # => #<ActiveModel::Errors []>

service.response # => #<Faraday::Response ...>
service.response.status # => 204
service.response.body # => ""

POST /api/v2/kyc_applications/:id/unarchive



29
30
31
# File 'lib/doc_fox/kyc_application/unarchive_service.rb', line 29

def call
  connection.post("kyc_applications/#{id}/unarchive", **params)
end