Skip to content

Add DELETE to allowed methods to enable management of WebHooks via the Subscriptions API #21

Description

    elif method == 'DELETE':
        request_params = {k:v for k,v in {
            "params": params,
            "headers": headers,
            "json": json,
            "data": body if json is None else None, }.items() if v != None}
        response = self.session.delete(url, **request_params)

this small patch to walmart.py in send_request can allow additional functionality

using it like this
r = w.send_request( 'DELETE',
'https://marketplace.walmartapis.com/v3/webhooks/subscriptions/{}'.format(subscription['subscriptionId']),
request_headers={"Content-type":"application/json","Accept":"application/json"})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions