python-mope 0.0.6__py3-none-any.whl → 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
mope/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  from mope.client import Mope
2
2
 
3
- __all__ = ['Mope']
3
+ __all__ = ["Mope"]
mope/__version__.py CHANGED
@@ -1,2 +1,2 @@
1
- __author__ = 'lemuel@vokality.com'
2
- __version__ = '0.0.6'
1
+ __author__ = "lemuel@vokality.com"
2
+ __version__ = "0.3.0"
mope/client.py CHANGED
@@ -1,48 +1,80 @@
1
+ from collections.abc import Iterable, Mapping, Set
2
+ from typing import IO, Protocol, TypeAlias
1
3
  from urllib.parse import urljoin
2
4
 
3
5
  import requests
4
6
 
5
7
  from mope.__version__ import __version__
8
+ from mope.json import json_value
6
9
  from mope.resources.shop import ShopResource
7
10
 
8
- _user_agent = 'Python Mope %s' % __version__
11
+ QueryScalar: TypeAlias = str | bytes | int | float
12
+ QueryValue: TypeAlias = QueryScalar | Iterable[QueryScalar] | None
13
+
14
+
15
+ class QueryItems(Protocol):
16
+ def items(self) -> Set[tuple[QueryScalar, QueryValue]]: ...
17
+
18
+
19
+ QueryParams: TypeAlias = (
20
+ QueryItems | Iterable[tuple[QueryScalar, QueryValue]] | str | bytes
21
+ )
22
+ RequestData: TypeAlias = (
23
+ Mapping[str, object]
24
+ | list[tuple[str, object]]
25
+ | tuple[tuple[str, object], ...]
26
+ | Iterable[bytes]
27
+ | IO[str]
28
+ | IO[bytes]
29
+ | str
30
+ | bytes
31
+ )
32
+
33
+ _user_agent = f"Python Mope {__version__}"
9
34
 
10
35
 
11
36
  class Client:
12
- def __init__(self, token):
37
+ def __init__(self, token: str) -> None:
13
38
  self._token = token
14
39
  self._headers = {
15
- 'User-Agent': _user_agent,
16
- 'Content-Type': 'application/json',
17
- 'Authorization': 'Bearer %s' % token,
40
+ "User-Agent": _user_agent,
41
+ "Content-Type": "application/json",
42
+ "Authorization": f"Bearer {token}",
18
43
  }
19
- self._base_url = 'https://api.mope.sr/api'
44
+ self._base_url = "https://api.mope.sr/api"
20
45
 
21
- def call_api(self, method, endpoint, params=None, data=None, json=None):
46
+ def call_api(
47
+ self,
48
+ method: str,
49
+ endpoint: str,
50
+ params: QueryParams | None = None,
51
+ data: RequestData | None = None,
52
+ json: object = None,
53
+ ) -> requests.Response:
22
54
  url = urljoin(self._base_url, endpoint)
23
55
  return requests.request(
24
56
  method=method,
25
57
  url=url,
26
58
  params=params,
27
59
  data=data,
28
- json=json,
60
+ json=json_value(json, path="request"),
29
61
  headers=self._headers,
30
62
  )
31
63
 
32
64
 
33
65
  class Mope:
34
- def __init__(self, token=None):
66
+ def __init__(self, token: str) -> None:
35
67
  self._token = token
36
68
  self._headers = {
37
- 'User-Agent': _user_agent,
38
- 'Content-Type': 'application/json',
39
- 'Authorization': 'Bearer %s' % token,
69
+ "User-Agent": _user_agent,
70
+ "Content-Type": "application/json",
71
+ "Authorization": f"Bearer {token}",
40
72
  }
41
- self.base_url = 'https://api.mope.sr/api'
73
+ self.base_url = "https://api.mope.sr/api"
42
74
 
43
75
  self._client = Client(token)
44
76
 
45
77
  self.shop = ShopResource(self._client)
46
78
 
47
- def __str__(self):
79
+ def __str__(self) -> str:
48
80
  return _user_agent
mope/json.py ADDED
@@ -0,0 +1,49 @@
1
+ """JSON types and validation at the API boundary."""
2
+
3
+ from math import isfinite
4
+ from typing import TypeAlias
5
+
6
+ JsonValue: TypeAlias = (
7
+ str | int | float | bool | None | list["JsonValue"] | dict[str, "JsonValue"]
8
+ )
9
+ JsonObject: TypeAlias = dict[str, JsonValue]
10
+
11
+
12
+ def json_value(value: object, *, path: str = "response") -> JsonValue:
13
+ if value is None or isinstance(value, (str, bool, int)):
14
+ return value
15
+ if isinstance(value, float):
16
+ if not isfinite(value):
17
+ raise ValueError(f"{path} must contain a finite JSON number")
18
+ return value
19
+ if isinstance(value, list):
20
+ return [
21
+ json_value(item, path=f"{path}[{index}]")
22
+ for index, item in enumerate(value)
23
+ ]
24
+ if isinstance(value, dict):
25
+ return json_object(value, path=path)
26
+ raise TypeError(f"{path} must be a JSON value")
27
+
28
+
29
+ def json_object(value: object, *, path: str = "response") -> JsonObject:
30
+ if not isinstance(value, dict):
31
+ raise TypeError(f"{path} must be a JSON object")
32
+ result: JsonObject = {}
33
+ for key, item in value.items():
34
+ if not isinstance(key, str):
35
+ raise TypeError(f"{path} must have string keys")
36
+ result[key] = json_value(item, path=f"{path}.{key}")
37
+ return result
38
+
39
+
40
+ def json_string(value: object, *, path: str) -> str:
41
+ if not isinstance(value, str):
42
+ raise TypeError(f"{path} must be a string")
43
+ return value
44
+
45
+
46
+ def json_integer(value: object, *, path: str) -> int:
47
+ if isinstance(value, bool) or not isinstance(value, int):
48
+ raise TypeError(f"{path} must be an integer")
49
+ return value
mope/models/payments.py CHANGED
@@ -1,17 +1,57 @@
1
- from abc import abstractmethod
1
+ from abc import ABC, abstractmethod
2
2
  from dataclasses import asdict, dataclass
3
- from typing import Any, Dict, List
3
+ from typing import Literal, Self, TypeAlias, TypedDict
4
+
5
+ from mope.json import JsonValue, json_integer, json_object, json_string
6
+
7
+ CurrencyCode: TypeAlias = Literal["SRD", "EUR", "USD"]
8
+ PaymentStatus: TypeAlias = Literal["open", "scanned", "unconfirmed", "paid"]
9
+
10
+
11
+ class PaymentMetadata(TypedDict):
12
+ key: str
13
+ value: str
14
+
15
+
16
+ def _payment_status(value: object) -> PaymentStatus:
17
+ match value:
18
+ case "open":
19
+ return "open"
20
+ case "scanned":
21
+ return "scanned"
22
+ case "unconfirmed":
23
+ return "unconfirmed"
24
+ case "paid":
25
+ return "paid"
26
+ case _:
27
+ raise ValueError("status must be open, scanned, unconfirmed, or paid")
28
+
29
+
30
+ def _payment_metadata(value: object) -> list[PaymentMetadata]:
31
+ if not isinstance(value, list):
32
+ raise TypeError("meta_data must be an array")
33
+ result: list[PaymentMetadata] = []
34
+ for index, entry in enumerate(value):
35
+ path = f"meta_data[{index}]"
36
+ item = json_object(entry, path=path)
37
+ result.append(
38
+ PaymentMetadata(
39
+ key=json_string(item["key"], path=f"{path}.key"),
40
+ value=json_string(item["value"], path=f"{path}.value"),
41
+ )
42
+ )
43
+ return result
4
44
 
5
45
 
6
46
  @dataclass
7
- class BaseModel:
47
+ class BaseModel(ABC):
8
48
  @classmethod
9
49
  @abstractmethod
10
- def from_json(cls, data: Dict[str, Any]):
50
+ def from_json(cls, data: object) -> Self:
11
51
  pass
12
52
 
13
- def as_dict(self):
14
- return asdict(self)
53
+ def as_dict(self) -> dict[str, JsonValue]:
54
+ return json_object(asdict(self))
15
55
 
16
56
 
17
57
  @dataclass
@@ -20,8 +60,12 @@ class CreatePaymentResponse(BaseModel):
20
60
  url: str
21
61
 
22
62
  @classmethod
23
- def from_json(cls, data: Dict[str, Any]):
24
- return cls(id=data['id'], url=data['url'])
63
+ def from_json(cls, data: object) -> Self:
64
+ payload = json_object(data)
65
+ return cls(
66
+ id=json_string(payload["id"], path="id"),
67
+ url=json_string(payload["url"], path="url"),
68
+ )
25
69
 
26
70
 
27
71
  @dataclass
@@ -31,11 +75,12 @@ class Currency(BaseModel):
31
75
  symbol: str
32
76
 
33
77
  @classmethod
34
- def from_json(cls, data: Dict[str, str]):
78
+ def from_json(cls, data: object) -> Self:
79
+ payload = json_object(data, path="currency")
35
80
  return cls(
36
- name=data['name'],
37
- code=data['code'],
38
- symbol=data['symbol'],
81
+ name=json_string(payload["name"], path="currency.name"),
82
+ code=json_string(payload["code"], path="currency.code"),
83
+ symbol=json_string(payload["symbol"], path="currency.symbol"),
39
84
  )
40
85
 
41
86
 
@@ -47,18 +92,19 @@ class PaymentRequest(BaseModel):
47
92
  description: str
48
93
  expires_at: str
49
94
  currency: Currency
50
- status: str
51
- meta_data: List[Dict[str, Any]]
95
+ status: PaymentStatus
96
+ meta_data: list[PaymentMetadata]
52
97
 
53
98
  @classmethod
54
- def from_json(cls, data: Dict[str, Any]):
99
+ def from_json(cls, data: object) -> Self:
100
+ payload = json_object(data)
55
101
  return cls(
56
- id=data['id'],
57
- amount=data['amount'],
58
- created_at=data['created_at'],
59
- description=data['description'],
60
- expires_at=data['expires_at'],
61
- currency=Currency.from_json(data['currency']),
62
- status=data['status'],
63
- meta_data=data['meta_data'],
102
+ id=json_string(payload["id"], path="id"),
103
+ amount=json_integer(payload["amount"], path="amount"),
104
+ created_at=json_string(payload["created_at"], path="created_at"),
105
+ description=json_string(payload["description"], path="description"),
106
+ expires_at=json_string(payload["expires_at"], path="expires_at"),
107
+ currency=Currency.from_json(payload["currency"]),
108
+ status=_payment_status(payload["status"]),
109
+ meta_data=_payment_metadata(payload["meta_data"]),
64
110
  )
mope/py.typed ADDED
File without changes
mope/resources/shop.py CHANGED
@@ -1,29 +1,35 @@
1
- from mope.models.payments import CreatePaymentResponse, PaymentRequest
1
+ from mope.models.payments import CreatePaymentResponse, CurrencyCode, PaymentRequest
2
+ from mope.transport import ApiTransport
2
3
 
3
4
 
4
5
  class ShopResource:
5
- def __init__(self, client):
6
+ def __init__(self, client: ApiTransport) -> None:
6
7
  self._client = client
7
8
 
8
9
  def create_payment_request(
9
- self, amount: int,
10
- description: str,
11
- order_id: str,
12
- currency: str,
13
- redirect_url: str,
10
+ self,
11
+ amount: int,
12
+ description: str,
13
+ order_id: str,
14
+ currency: CurrencyCode,
15
+ redirect_url: str,
14
16
  ) -> CreatePaymentResponse:
15
17
  """
16
18
  makes a payment request
17
19
  """
18
20
 
19
- endpoint = 'shop/payment_request'
20
- response = self._client.call_api('POST', endpoint=endpoint, json={
21
- 'amount': amount,
22
- 'order_id': order_id,
23
- 'currency': currency,
24
- 'description': description,
25
- 'redirect_url': redirect_url,
26
- })
21
+ endpoint = "shop/payment_request"
22
+ response = self._client.call_api(
23
+ "POST",
24
+ endpoint=endpoint,
25
+ json={
26
+ "amount": amount,
27
+ "order_id": order_id,
28
+ "currency": currency,
29
+ "description": description,
30
+ "redirect_url": redirect_url,
31
+ },
32
+ )
27
33
  response.raise_for_status()
28
34
  return CreatePaymentResponse.from_json(response.json())
29
35
 
@@ -32,7 +38,7 @@ class ShopResource:
32
38
  fetches a payment request given a payment ID
33
39
  """
34
40
 
35
- endpoint = 'shop/payment_request/%s' % payment_id
36
- response = self._client.call_api('GET', endpoint=endpoint)
41
+ endpoint = f"shop/payment_request/{payment_id}"
42
+ response = self._client.call_api("GET", endpoint=endpoint)
37
43
  response.raise_for_status()
38
44
  return PaymentRequest.from_json(response.json())
mope/transport.py ADDED
@@ -0,0 +1,11 @@
1
+ from typing import Protocol
2
+
3
+ from requests import Response
4
+
5
+
6
+ class ApiTransport(Protocol):
7
+ """The HTTP operations required by API resources."""
8
+
9
+ def call_api(
10
+ self, method: str, endpoint: str, *, json: object = None
11
+ ) -> Response: ...
@@ -0,0 +1,114 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-mope
3
+ Version: 0.3.0
4
+ Summary: A client library for interacting with the Mopé Web Shop API
5
+ Author-email: Lemuel Boyce <lemuel@vokality.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/rhymiz/python-mope
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3 :: Only
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Classifier: Programming Language :: Python :: 3.15
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Development Status :: 6 - Mature
17
+ Classifier: Environment :: Web Environment
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Topic :: Office/Business :: Financial
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: requests<3,>=2.34.2
25
+ Dynamic: license-file
26
+
27
+ ![build](https://github.com/rhymiz/python-mope/workflows/build/badge.svg)
28
+ [![downloads](https://pepy.tech/badge/python-mope)](https://pepy.tech/project/python-mope)
29
+ [![Ruff](https://img.shields.io/badge/lint%20and%20format-Ruff-D7FF64.svg)](https://docs.astral.sh/ruff/)
30
+
31
+ # Python Mopé
32
+ Client library for Mopé by Hakrinbank
33
+
34
+ ### Token acquisition and API Docs
35
+ - [API Docs](https://api.mope.sr/integration/doc)
36
+ - Instructions for [acquiring a token](https://drive.google.com/file/d/10fWqgpl2Ip9JIacl0pwzUDi_HV6WLbCi/view?usp=sharing)
37
+
38
+
39
+ ### Requirements
40
+ - Python 3.11 or newer
41
+ - Mopé API Token
42
+
43
+ ### Getting Started
44
+ First, install from PyPi by running `pip install python-mope`
45
+
46
+ Example usage:
47
+
48
+ ```python
49
+ from mope import Mope
50
+
51
+ mope = Mope(token="test_123")
52
+ mope.shop.get_payment_request(payment_id="123")
53
+ ```
54
+
55
+ ### Development
56
+
57
+ Install [uv](https://docs.astral.sh/uv/getting-started/installation/), then run:
58
+
59
+ ```sh
60
+ uv sync --locked
61
+ uv run --locked ruff check .
62
+ uv run --locked ruff format --check .
63
+ uv run --locked ty check
64
+ uv run --locked pytest
65
+ uv build --no-sources
66
+ ```
67
+
68
+ Development uses Python 3.15.2 from `.python-version`; uv installs it when needed.
69
+ The library supports Python 3.11+, and CI tests the built wheel on Python 3.11,
70
+ 3.12, 3.13, 3.14, and 3.15. Ruff and ty target Python 3.11 compatibility.
71
+ Run `uv run ruff format .` to format code. Commit `uv.lock` after changing
72
+ dependencies; use `uv lock --upgrade` to refresh their locked versions.
73
+
74
+ The package includes inline types and a `py.typed` marker. API responses are
75
+ validated before creating models: invalid field types raise `TypeError`, invalid
76
+ status values raise `ValueError`, and missing required fields raise `KeyError`.
77
+ Values are not coerced. Payment metadata remains a list of dictionaries with
78
+ string `key` and `value` fields, as defined by the
79
+ [Mopé API schema](https://api.mope.sr/integration/paths/GetPaymentRequest.yaml).
80
+
81
+ ### Publishing
82
+
83
+ To release, update `mope/__version__.py`, run `uv lock`, and commit the changes.
84
+ Publish a GitHub release whose tag is the package version or `v` followed by that
85
+ version. The workflow checks the tag, runs lint, formatting and type checks,
86
+ builds the source distribution and wheel, and tests the installed wheel across
87
+ all supported Python versions before uploading those same artifacts to PyPI.
88
+
89
+ ### Resources
90
+ #### shop
91
+
92
+ *Methods*
93
+
94
+ ##### `shop.create_payment_request`
95
+
96
+ | Argument | Type | Required |
97
+ | --- |--- | --- |
98
+ |amount | int | yes |
99
+ |description | string | yes |
100
+ |order_id | string | yes |
101
+ |currency | enum (USD, SRD, EUR) | yes |
102
+ |redirect_url| string | yes |
103
+
104
+
105
+ return type: `mope.models.payments.CreatePaymentResponse`
106
+
107
+ ##### `shop.get_payment_request`
108
+
109
+ | Argument | Type | Required |
110
+ |--- |--- |--- |
111
+ |payment_id | string | yes |
112
+
113
+
114
+ return type: `mope.models.payments.PaymentRequest`
@@ -0,0 +1,15 @@
1
+ mope/__init__.py,sha256=3nuq9PuAWTDZz6Ejg_737iQ5JRSC44uW_n5NPdHUscU,49
2
+ mope/__version__.py,sha256=m1lfA5cU5lKTRV_7jofTAXIaBSOm8FGd8VLnnfV4jug,57
3
+ mope/client.py,sha256=WK8IPinJu84GsxsDC3vDzGB3c8wcjFEisMtaCq8IID8,2074
4
+ mope/json.py,sha256=kj03cwke1AXfd3LjFygapfYeopavF_e6YuasRMLamRE,1625
5
+ mope/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ mope/transport.py,sha256=AuN6SaKZG13d8ujVNOzMrSNMttH3P6Gl6x9hfznfoew,255
7
+ mope/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ mope/models/payments.py,sha256=oKovsudX6OvaTib4ya-GikuMDwvQVkDB-0pvSQyF-6I,3204
9
+ mope/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ mope/resources/shop.py,sha256=qQfDCbOOFJmIbii6bqpUOlg4npjUiJFqEd7nLeKu4Hc,1340
11
+ python_mope-0.3.0.dist-info/licenses/LICENSE,sha256=H1HkxgxLo4v8voMaHpZVRh5Ao8jUezeLzSHpp182his,1069
12
+ python_mope-0.3.0.dist-info/METADATA,sha256=JPw6Ao0bgzNLk3sPKznoSw3nK_G9VjKq8_Vuhf7TOLc,4046
13
+ python_mope-0.3.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
14
+ python_mope-0.3.0.dist-info/top_level.txt,sha256=KNJibHVOvmp47d34dVOoxczy3_oafEiKZ4szVTOW6AA,5
15
+ python_mope-0.3.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.37.1)
2
+ Generator: setuptools (84.2.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Lemuel Boyce
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
mope/compat.py DELETED
@@ -1,6 +0,0 @@
1
- import sys
2
-
3
-
4
- PYTHON36 = (3, 6) == (sys.version_info.major, sys.version_info.minor)
5
-
6
-
@@ -1,77 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: python-mope
3
- Version: 0.0.6
4
- Summary: A client library for interacting with the Mopé Web Shop API
5
- Home-page: https://github.com/rhymiz/python-mope
6
- Author: Lemuel Boyce
7
- Author-email: lemuel@vokality.com
8
- License: MIT
9
- Platform: UNKNOWN
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.6
12
- Classifier: Programming Language :: Python :: 3.7
13
- Classifier: Programming Language :: Python :: 3.8
14
- Classifier: Programming Language :: Python :: 3.9
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: License :: OSI Approved :: MIT License
17
- Classifier: Operating System :: OS Independent
18
- Requires-Python: >=3.6,<=3.10
19
- Description-Content-Type: text/markdown
20
- Requires-Dist: requests
21
-
22
- ![build](https://github.com/rhymiz/python-mope/workflows/build/badge.svg)
23
- [![downloads](https://pepy.tech/badge/python-mope)](https://pepy.tech/project/python-mope)
24
-
25
- # Python Mopé
26
- Client library for Mopé by Hakrinbank
27
-
28
- ### Token acquisition and API Docs
29
- - [API Docs](https://api.mope.sr/integration/doc)
30
- - Instructions for [acquiring a token](https://drive.google.com/file/d/10fWqgpl2Ip9JIacl0pwzUDi_HV6WLbCi/view?usp=sharing)
31
-
32
-
33
- ### Requirements
34
- - Python >= 3.6,<=3.10
35
- - requests (currently not sure what the min required version is)
36
- - Mopé API Tokens
37
-
38
- ### Getting Started
39
- First, you can install from PyPi by running `pip install python-mope`
40
-
41
- Example usage:
42
-
43
- ```python
44
- from mope import Mope
45
-
46
- mope = Mope(token='test_123')
47
- mope.shop.get_payment_request(payment_id='123')
48
- ```
49
-
50
- ### Resources
51
- #### shop
52
-
53
- *Methods*
54
-
55
- ##### `shop.create_payment_request`
56
-
57
- | Argument | Type | Required |
58
- | --- |--- | --- |
59
- |amount | int | yes |
60
- |description | string | yes |
61
- |order_id | string | yes |
62
- |currency | enum (USD, SRD, EU) | yes |
63
- |redirect_url| string | yes |
64
-
65
-
66
- return type: `mope.models.payments.CreatePaymentResponse`
67
-
68
- ##### `shop.get_payment_request`
69
-
70
- | Argument | Type | Required |
71
- |--- |--- |--- |
72
- |payment_id | string | yes |
73
-
74
-
75
- return type: `mope.models.payments.PaymentRequest`
76
-
77
-
@@ -1,13 +0,0 @@
1
- mope/__init__.py,sha256=vM-Cnel4iQRdmkKS1BnMzp7LV0LC64EP41tUcTolFdQ,49
2
- mope/__version__.py,sha256=vfckUV6h4zg2DzidIltQ_EcOxJ_Q0_LKnP-tphZwcu0,57
3
- mope/client.py,sha256=3k74ds63xV5KkRO-GNPMuIwKGdhfRm_2NGPIbQ4qgEo,1245
4
- mope/compat.py,sha256=sKm3lkFrhODxeHcCkjVxSI4Y6EdlHogiDX5EAOXkYgQ,85
5
- mope/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- mope/models/payments.py,sha256=sQfD1Tp3ouJwB64eKTYNK-kfmK21tAElgFuCRHEDKtE,1386
7
- mope/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- mope/resources/shop.py,sha256=9ujFRxswCsSgCkzvKFNhuhPZWBEuRMZccHdqJCTRKNE,1198
9
- python_mope-0.0.6.dist-info/METADATA,sha256=pCischpcvoGU7APggof_vO2ewQWjzRwinZrwf-MoeCw,2193
10
- python_mope-0.0.6.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
11
- python_mope-0.0.6.dist-info/top_level.txt,sha256=KNJibHVOvmp47d34dVOoxczy3_oafEiKZ4szVTOW6AA,5
12
- python_mope-0.0.6.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
13
- python_mope-0.0.6.dist-info/RECORD,,
@@ -1 +0,0 @@
1
-