Skip to content

Commit

Permalink
v0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
denisneuf committed Oct 18, 2023
1 parent a9388c0 commit ab28198
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 7 deletions.
41 changes: 40 additions & 1 deletion ad_api/api/billing.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,43 @@ def list_billing_notifications(self, **kwargs) -> ApiResponse:
headers = {'Content-Type': request_contentType, 'Accept': accept_contentType}

body = Utils.convert_body(kwargs.pop('body'))
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)



@sp_endpoint('/billing/paymentMethods/list', method='POST')
def get_customer_payment_methods(self, **kwargs) -> ApiResponse:
r"""
"""
accept_contentType = 'application/vnd.paymentmethods.v1+json'
headers = {'Accept': accept_contentType}
return self._request(kwargs.pop('path'), params=kwargs, headers=headers)



@sp_endpoint('/billing/invoices/pay', method='POST')
def pay_invoices(self, **kwargs) -> ApiResponse:
r"""
"""
accept_contentType = 'application/vnd.invoices.v1+json'
headers = {'Accept': accept_contentType}
body = Utils.convert_body(kwargs.pop('body'), False)
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)

@sp_endpoint('/billing/paymentAgreements/list', method='POST')
def get_payment_agreements(self, **kwargs) -> ApiResponse:
r"""
"""
accept_contentType = 'application/vnd.paymentagreements.v1+json'
headers = {'Accept': accept_contentType}
return self._request(kwargs.pop('path'), params=kwargs, headers=headers)


@sp_endpoint('/billing/paymentAgreements', method='POST')
def create_payment_agreements(self, **kwargs) -> ApiResponse:
r"""
"""
accept_contentType = 'application/vnd.paymentagreements.v1+json'
headers = {'Accept': accept_contentType}
body = Utils.convert_body(kwargs.pop('body'), False)
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
8 changes: 5 additions & 3 deletions ad_api/api/sb/negative_keywords.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils

class NegativeKeywords(Client):
"""
Expand Down Expand Up @@ -47,7 +47,8 @@ def edit_negative_keywords(self, **kwargs) -> ApiResponse:
ApiResponse
"""
return self._request(kwargs.pop('path'), data=kwargs.pop('body'), params=kwargs)
body = Utils.convert_body(kwargs.pop('body'), wrap=False)
return self._request(kwargs.pop('path'), data=body, params=kwargs)

@sp_endpoint('/sb/negativeKeywords', method='POST')
def create_negative_keywords(self, **kwargs) -> ApiResponse:
Expand All @@ -73,7 +74,8 @@ def create_negative_keywords(self, **kwargs) -> ApiResponse:
ApiResponse
"""
return self._request(kwargs.pop('path'), data=kwargs.pop('body'), params=kwargs)
body = Utils.convert_body(kwargs.pop('body'), wrap=False)
return self._request(kwargs.pop('path'), data=body, params=kwargs)

@sp_endpoint('/sb/negativeKeywords/{}', method='GET')
def get_negative_keyword(self, keywordId, **kwargs) -> ApiResponse:
Expand Down
2 changes: 1 addition & 1 deletion ad_api/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.5.1"
__version__ = "0.5.2"
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = python-amazon-ad-api
version = 0.5.1
version = 0.5.2
author = Daniel Alvaro
author_email = [email protected]
description = Python wrapper for the Amazon Advertising API
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='python-amazon-ad-api',
version='0.5.1',
version='0.5.2',
install_requires=[
"requests>=2.27.1,<2.32.0",
"six~=1.16.0",
Expand Down

0 comments on commit ab28198

Please sign in to comment.