-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from shipping7/issue-67
[issue-67] - Agrupa todas as Apis no CorreiosApi
- Loading branch information
Showing
19 changed files
with
115 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version=0.0.14-BETA | ||
version=0.0.16-BETA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,36 @@ | ||
package br.com.correios.api; | ||
|
||
import br.com.correios.api.etiqueta.CorreiosEtiquetaApi; | ||
import br.com.correios.api.etiqueta.EtiquetaApi; | ||
import br.com.correios.api.postagem.CorreiosPostagemApi; | ||
import br.com.correios.api.rastreio.service.CorreiosRastreioApi; | ||
import br.com.correios.credentials.CorreiosCredenciais; | ||
|
||
/** | ||
* Responsavel por ser uma ponte para todas as API's disponiveis pelo SDK. | ||
* | ||
* @since 0.0.13-BETA | ||
*/ | ||
public class CorreiosApi { | ||
|
||
public EtiquetaApi etiquetas(CorreiosCredenciais credenciais) { | ||
/** | ||
* API de rastreio de pacotes pelos seus respectivos codigos de rastreio. | ||
*/ | ||
public CorreiosRastreioApi rastreios(CorreiosCredenciais credenciais) { | ||
return new CorreiosRastreioApi(credenciais); | ||
} | ||
|
||
/** | ||
* API de solicitacao de etiquetas. | ||
*/ | ||
public CorreiosEtiquetaApi etiquetas(CorreiosCredenciais credenciais) { | ||
return new CorreiosEtiquetaApi(credenciais); | ||
} | ||
|
||
/** | ||
* API de detalhes de uma postagem(PLP). | ||
*/ | ||
public CorreiosPostagemApi postagens(CorreiosCredenciais credenciais) { | ||
return new CorreiosPostagemApi(credenciais); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
src/main/java/br/com/correios/api/postagem/PostagemApi.java
This file was deleted.
Oops, something went wrong.
4 changes: 1 addition & 3 deletions
4
src/main/java/br/com/correios/api/rastreio/model/CorreiosEscopoResultado.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 6 additions & 8 deletions
14
src/main/java/br/com/correios/api/rastreio/model/CorreiosTipoIdentificador.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
package br.com.correios.api.rastreio.model; | ||
|
||
/** | ||
* @author Alexandre Gama | ||
* | ||
* @description Definição de como a lista de identificadores de objetos deverá ser interpretada pelo servidor SRO. | ||
* L: lista de objetos. O servidor fará a consulta individual de cada identificador informado; | ||
* Definição de como a lista de identificadores de objetos deverá ser interpretada pelo servidor SRO. | ||
* L: lista de objetos. O servidor fará a consulta individual de cada identificador informado; | ||
* F: intervalo de objetos. O servidor fará a consulta sequencial do primeiro ao último objeto informado, | ||
* | ||
* | ||
* @since 0.0.1-BETA | ||
*/ | ||
public enum CorreiosTipoIdentificador { | ||
|
||
LISTA_DE_OBJETOS("L"), INTERVALO_DE_OBJETOS("F"); | ||
|
||
private String codigoInternoDosCorreios; | ||
|
||
CorreiosTipoIdentificador(String codigoInternoDosCorreios) { | ||
this.codigoInternoDosCorreios = codigoInternoDosCorreios; | ||
} | ||
|
||
public String getCodigoInternoDosCorreios() { | ||
return codigoInternoDosCorreios; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.