This repository has been archived by the owner on Sep 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* inicia alguns exemplos * adiciona webhook * adiciona exemplos * adiciona alguns testes! * altera um pouco os exemplos! * altera exemplos * fmt * corrige formatação e black
- Loading branch information
1 parent
8c5dbe9
commit 528d48d
Showing
25 changed files
with
239 additions
and
28 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
|
||
response = client.address.get_by_document(document) | ||
|
||
print(response) | ||
print(response.data) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
client = ImopayWrapper() | ||
|
||
c = { | ||
data = { | ||
"email": "[email protected]", | ||
"phone": "+55 74 99572 8196", | ||
"cnpj": "13415795551619", | ||
|
@@ -13,4 +13,6 @@ | |
} | ||
|
||
|
||
response = client.company.create(c) | ||
response = client.company.create(data) | ||
|
||
print(response.data) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from imopay_wrapper import ImopayWrapper | ||
|
||
client = ImopayWrapper() | ||
|
||
cnpj = "foo" | ||
|
||
response = client.company.retrieve(cnpj) | ||
|
||
print(response.data) |
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 |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
|
||
client = ImopayWrapper() | ||
|
||
id = "foo" | ||
imopay_id = "foo" | ||
|
||
c = { | ||
data = { | ||
"email": "[email protected]", | ||
"phone": "+55 74 99572 8196", | ||
"cnpj": "13415795551619", | ||
|
@@ -14,4 +14,6 @@ | |
"website": "https://horton-black.info/", | ||
} | ||
|
||
response = client.company.update(id, c) | ||
response = client.company.update(imopay_id, data) | ||
|
||
print(response.data) |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
client = ImopayWrapper() | ||
|
||
p = { | ||
data = { | ||
"email": "[email protected]", | ||
"phone": "+55 (019) 92498 1907", | ||
"first_name": "William", | ||
|
@@ -12,4 +12,6 @@ | |
"mobile_phone": "+55 60 97852 2366", | ||
} | ||
|
||
response = client.person.create(p) | ||
response = client.person.create(data) | ||
|
||
print(response.data) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from imopay_wrapper import ImopayWrapper | ||
|
||
client = ImopayWrapper() | ||
|
||
cpf = "foo" | ||
|
||
response = client.person.retrieve(cpf) | ||
|
||
print(response.data) |
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 |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
|
||
client = ImopayWrapper() | ||
|
||
id = "foo" | ||
imopay_id = "foo" | ||
|
||
p = { | ||
data = { | ||
"email": "[email protected]", | ||
"phone": "+55 (019) 92498 1907", | ||
"first_name": "William", | ||
|
@@ -14,4 +14,6 @@ | |
"mobile_phone": "+55 60 97852 2366", | ||
} | ||
|
||
response = client.person.update(id, p) | ||
response = client.person.update(imopay_id, data) | ||
|
||
print(response.data) |
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from imopay_wrapper import ImopayWrapper | ||
|
||
|
||
client = ImopayWrapper() | ||
|
||
data = { | ||
"url": "http://494830363d1d.ngrok.io", | ||
"event": "t", | ||
"description": "webhook de teste", | ||
} | ||
|
||
response = client.webhook.create(data) | ||
|
||
print(response.data) |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from imopay_wrapper import ImopayWrapper | ||
|
||
|
||
client = ImopayWrapper() | ||
|
||
imopay_imopay_id = "foo" | ||
|
||
response = client.webhook.destroy(imopay_imopay_id) | ||
|
||
print(response.data) |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from dataclasses import dataclass | ||
|
||
from .base import BaseImopayObj | ||
|
||
|
||
@dataclass | ||
class Webhook(BaseImopayObj): | ||
event: str | ||
url: str | ||
description: str |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from .base import BaseImopayWrapper, CreateMixin, DestroyMixin | ||
from ..models.webhook import Webhook | ||
|
||
|
||
class WebhookWrapper(BaseImopayWrapper, CreateMixin, DestroyMixin): | ||
""" | ||
Wrapper para os métodos de webhooks | ||
""" | ||
|
||
@property | ||
def action(self): | ||
return "webhooks" | ||
|
||
@property | ||
def model(self): | ||
return Webhook |
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.