Class: ModulePos::Fiscalization::Client::Scopes::Associate
- Defined in:
- lib/module_pos/fiscalization/client.rb
Overview
Associate actions scope
Instance Method Summary collapse
- #create(login:, secret:, client_id: nil) ⇒ ModulePos::V1::Entities::Secret
- #delete(username:, password:) ⇒ NilClass
Methods inherited from Base
Constructor Details
This class inherits a constructor from ModulePos::Fiscalization::Client::Scopes::Base
Instance Method Details
#create(login:, secret:, client_id: nil) ⇒ ModulePos::V1::Entities::Secret
31 32 33 34 35 36 37 38 39 |
# File 'lib/module_pos/fiscalization/client.rb', line 31 def create(login:, secret:, client_id: nil) resp = http.call(login, secret) do |conn| conn.post(path) do |req| req.params["clientId"] = client_id if client_id end end ModulePos::Fiscalization::Entities::Secret.new(resp) end |
#delete(username:, password:) ⇒ NilClass
44 45 46 47 |
# File 'lib/module_pos/fiscalization/client.rb', line 44 def delete(username:, password:) http.call(username, password) { |conn| conn.delete(path) } nil end |