Class: Ecertic::API::OTPsService
- Inherits:
-
Service
- Object
- Service
- Ecertic::API::OTPsService
show all
- Defined in:
- lib/ecertic/api/otps_service.rb
Instance Attribute Summary
Attributes inherited from Service
#client
Instance Method Summary
collapse
Methods inherited from Service
#initialize
Instance Method Details
#create(attributes, options = {}) ⇒ Object
6
7
8
9
10
11
|
# File 'lib/ecertic/api/otps_service.rb', line 6
def create(attributes, options = {})
Ecertic::Utils.validate_mandatory_attributes(attributes, [:movil, :pdf_files])
attributes[:pdf_files] = Utils.encode_files(attributes[:pdf_files])
response = client.post("/sms", attributes, options)
Resource::OTP::Request.new(response.body)
end
|
#status(token, options = {}) ⇒ Object
13
14
15
16
17
|
# File 'lib/ecertic/api/otps_service.rb', line 13
def status(token, options = {})
attributes = { token: token }
response = client.post("/status", attributes, options)
Resource::OTP::Status.new(response.body)
end
|