Class: BsellerRuby::Item
Constant Summary collapse
- PATH =
"itens"
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Class Method Summary collapse
-
.confirm_to_list!(params) ⇒ Object
<confirmaSN />: X(1), Informa se a consulta foi recebida e processada corretamente S – Recebida e processada corretamente N – Não foi recebida ou processada corretamente.
-
.find(id_item, interface = nil) ⇒ Object
<idItem />: X(50), Sim, Código do item.
-
.get_list(params) ⇒ Object
<maxReg />: 9(9), Quantidade máxima de registros a ser retornada.
-
.massive(params) ⇒ Object
Retorno: { “batchNumber”: 0, “content”: [ { “codigoDepartamento”: 0, “codigoItem”: “string”, “estoqueEstabelecimento”: [ { “codigoEstabelecimento”: 0, “dataDisponivel”: “2016-05-07T19:10:38.803Z”, “prazoDisponivel”: 0, “quantidade”: 0 } ] } ], “totalElements”: 0 }.
- .massive_confirm(batch: nil) ⇒ Object
Methods inherited from Base
call, collection_name, create, get, #initialize, post, put
Constructor Details
This class inherits a constructor from BsellerRuby::Base
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/bseller_ruby/item.rb', line 3 def response @response end |
Class Method Details
.confirm_to_list!(params) ⇒ Object
<confirmaSN />: X(1), Informa se a consulta foi recebida e processada corretamente
S – Recebida e processada corretamente
N – Não foi recebida ou processada corretamente. Na próxima
consulta os dados serão enviados novamente.
<tpInterface />: X(15), Interface cadastrada na ESEA0130. Se NULL
envia a interface padrão.
56 57 58 |
# File 'lib/bseller_ruby/item.rb', line 56 def self.confirm_to_list!(params) call(:confirma_consulta_itens, params).result end |
.find(id_item, interface = nil) ⇒ Object
<idItem />: X(50), Sim, Código do item
<tpInterface />: X(15), Não, Código do tipo de interface
63 64 65 |
# File 'lib/bseller_ruby/item.rb', line 63 def self.find(id_item, interface=nil) get("#{PATH}/#{id_item}", interface ? {tpInterface: interface} : ni) end |
.get_list(params) ⇒ Object
<maxReg />: 9(9), Quantidade máxima de registros a ser retornada.
Se nulo ou zero trás todos os registros disponíveis.
<confirmaSN />: X(1), Informa se vai chamar a interface confirmaConsultaItens
S – Irá chamar a interface confirmaConsultaItens
N – Não irá chamar a interface confirmaConsultaItens
Se não for informado, considera N
<tpInterface />: X(15), Interface cadastrada na ESEA0130. Se NULL
envia a interface padrão.
45 46 47 |
# File 'lib/bseller_ruby/item.rb', line 45 def self.get_list(params) call(:consulta_itens, params).result end |
.massive(params) ⇒ Object
Retorno: {
"batchNumber": 0,
"content": [
{
"codigoDepartamento": 0,
"codigoItem": "string",
"estoqueEstabelecimento": [
{
"codigoEstabelecimento": 0,
"dataDisponivel": "2016-05-07T19:10:38.803Z",
"prazoDisponivel": 0,
"quantidade": 0
}
]
}
],
"totalElements": 0
}
27 28 29 |
# File 'lib/bseller_ruby/item.rb', line 27 def self.massive(params) get("#{PATH}/massivo", params) end |
.massive_confirm(batch: nil) ⇒ Object
31 32 33 |
# File 'lib/bseller_ruby/item.rb', line 31 def self.massive_confirm(batch: nil) put("#{PATH}/massivo", batch, nil) end |