sticapi_client 3.1.0 → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71064ea717d186291b151247d71adb5af14fdf29098451e066682fcdbbfac7dd
4
- data.tar.gz: 4b59da6e346e94f1373b1b798234085cefcc5b0a706fcd5b64256fd62128e7f5
3
+ metadata.gz: d5db8859f80df496d77936de8d0bccaf603cec12218353ffac11a1ba565e41cb
4
+ data.tar.gz: 240b37c8caad43e2c476f5d71538b06eab62d8f04dc3ea991b3c53995e73c127
5
5
  SHA512:
6
- metadata.gz: 6e875b3bef1a6c1c280577900d0e7c5256d798beeb8d1cd24d475e5b8ac5c8140966283841073f4412502ef0f42c4376268d4aabc88fe096e5ea6793f7f466a2
7
- data.tar.gz: a679ce569b5f4d142b6b76d346d67326921e2676806b53eb23db7ef9ccb2fb5c79e8c78a9bf11ed982849184981f27bc5c23fc84bda0e3fb37a6405960436b17
6
+ metadata.gz: ad9301d98fe8b7e03386030a5a6e9feebcb7a6efed6a31ceb4b12952fea429f78a8fd525f1dfda2e5100b14a9b606b38169d0e780825cdaecc3dbda512381452
7
+ data.tar.gz: b569f45ebb45c621ce79e6b90d15a054b1c0fb44bd897fc05fe5a3303c1104f5cfd5f16cb98c7e29f9736bbd9b1c0ad928f51ad6df28ab9ac5e4178084e26049
@@ -32,5 +32,12 @@ module SticapiClient
32
32
  options[:kind] = 'get'
33
33
  Sticapi::SticapiClient.instance.sticapi_request("/sip/unidades_do_usuario", options)
34
34
  end
35
+
36
+ # Consulta os ids de documentos de um processo SEI
37
+ # Parâmetro processo [String] número do processo SEI
38
+ # Retorno [JSON] IDs dos documentos SEI
39
+ def self.processo_documentos(options = {})
40
+ Sticapi::SticapiClient.instance.sticapi_request("/sip/processo_documentos", options)
41
+ end
35
42
  end
36
43
  end
@@ -1,16 +1,7 @@
1
+ # This module is deprecated!!!
1
2
  module SticapiController
2
- def self.included(base)
3
- base.send(:before_action, :get_token)
4
- # base.send(:after_action, :update_token)
5
- end
6
-
7
3
  def initialize
8
4
  super
9
- @model_class = self.class
10
- return
11
- end
12
-
13
- def get_token
14
- Sticapi::SticapiClient.instance.get_token
5
+ ActiveSupport::Deprecation.warn("SticapiController module is deprecated!!!")
15
6
  end
16
7
  end
@@ -78,6 +78,15 @@ module SticapiClient
78
78
  def self.change_password(options = {})
79
79
  Sticapi::SticapiClient.instance.sticapi_request("/users/change_password", options)
80
80
  end
81
+
82
+ # Altera o email de um usuário no AD
83
+ # Parâmetro username [string] username
84
+ # Parâmetro email [String] novo email do usuário
85
+ # Retorno [JSON] Sucesso ou falha ao alterar o email do usuário
86
+ # user: { string }
87
+ def self.change_email(options = {})
88
+ Sticapi::SticapiClient.instance.sticapi_request("/users/change_email", options)
89
+ end
81
90
  end
82
91
  end
83
92
  end
@@ -1,3 +1,3 @@
1
1
  module SticapiClient
2
- VERSION = "3.1.0"
2
+ VERSION = "3.1.3"
3
3
  end
@@ -68,13 +68,14 @@ module Sticapi
68
68
  end
69
69
 
70
70
  def update_token(response)
71
- @access_token = response['access-token']
72
- @client = response['client']
73
- @uid = response['uid']
74
- @expiry = response['expiry']
71
+ @access_token = response['access-token'] if response['access-token']
72
+ @client = response['client'] if response['client']
73
+ @uid = response['uid'] if response['uid']
74
+ @expiry = response['expiry'] if response['expiry']
75
75
  end
76
76
 
77
77
  def sticapi_request(route, options = {})
78
+ get_token
78
79
  kind = options[:kind] || 'post'
79
80
  uri = URI.parse("#{self.uri}#{route}")
80
81
  http = Net::HTTP.new(uri.host, uri.port)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sticapi_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Viana
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-18 00:00:00.000000000 Z
11
+ date: 2023-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails