Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adicionado opção de parcalamento #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Basta importar a classe do MoIP e sair brincando :-)
moip.set_valor('12345')
moip.set_data_vencimento('yyyy-mm-dd')
moip.set_id_proprio('abc123')
moip.set_parcelamento('2', '6', '0')
moip.envia()

print moip.get_resposta() # {sucesso:'Sucesso','token':'KJHSDASKD392847293AHFJKDSAH'}
Expand Down
7 changes: 7 additions & 0 deletions moipy/moip.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ def set_data_vencimento(self,data):
return self


def set_parcelamento(self, minimo_parcelas, maximo_parcelas, juros):

self._monta_xml(self.xml_node, unique=True, InstrucaoUnica=dict(Parcelamentos=dict(Parcelamento=dict(MinimoParcelas=minimo_parcelas, MaximoParcelas=maximo_parcelas, Juros=juros))))

return self


def set_recebedor(self,login_moip,email,apelido):

self._monta_xml(self.xml_node, unique=True, InstrucaoUnica=dict(Recebedor=dict(LoginMoip=login_moip, Email=email, Apelido=apelido)))
Expand Down