Skip to content

Commit

Permalink
Minor changes to config project
Browse files Browse the repository at this point in the history
  • Loading branch information
MrLightful committed Jan 11, 2024
1 parent a8566f6 commit c8ae217
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 47 deletions.
41 changes: 0 additions & 41 deletions .editorconfig

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 tMalaca
Copyright (c) 2024 Roman Sirokov <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
11 changes: 7 additions & 4 deletions braspag_sdk/utils/base_request.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import json
import uuid
from typing import Dict

from future.utils import raise_with_traceback
from requests import Request, Session

from braspag_sdk.apps.payments.data import MerchantCredentials


class Base(object):

def __init__(self, authorization_headers):
def __init__(self, authorization_headers: Dict):
self.authorization_headers = authorization_headers

def send_request(self, method, uri, data=None, params=None):
Expand Down Expand Up @@ -55,17 +58,17 @@ def send_request(self, method, uri, data=None, params=None):

class ApiBase(Base):

def __init__(self, credentials):
def __init__(self, credentials: MerchantCredentials):
authorization_headers = {
'MerchantId': credentials._merchant_id,
'MerchantId': credentials.merchant_id,
'MerchantKey': credentials.merchant_key,
}
super().__init__(authorization_headers=authorization_headers)


class ApiOauthBase(Base):

def __init__(self, access_token):
def __init__(self, access_token: str):
authorization_headers = {
'Authorization': 'Bearer ' + access_token,
}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [
homepage = "https://github.com/romatallinn/braspagSdk-python"
repository = "https://github.com/romatallinn/braspagSdk-python"
readme = "README.md"
keywords = ["braspag", "sdk", "python", "cielo", "api", "ecommerce", "brazil"]
keywords = ["braspag", "sdk", "python", "cielo", "api", "ecommerce", "brazil", "payments"]
packages = [{include = "braspag_sdk"}]
classifiers = [
'Development Status :: 3 - Alpha',
Expand Down

0 comments on commit c8ae217

Please sign in to comment.