How to use the mws.Orders function in mws

To help you get started, we’ve selected a few mws examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tchoedak / anoti / anoti / api.py View on Github external
from __future__ import absolute_import
import mws
import time
from datetime import datetime, timedelta
from . import config
from . import util
from . import queries


orders_api = mws.Orders(
    access_key=config.access_key,
    secret_key=config.secret_key,
    account_id=config.seller_id,
    auth_token=config.mws_auth_token,
    region='US' or config.country_code,
)

yesterday = datetime.now() - timedelta(hours=24)


def get_order_id(order):
    return order.get('AmazonOrderId').get('value')


def parse_order_safely(order):
    if order.parsed.Orders:
github tchoedak / anoti / anoti / orders.py View on Github external
from __future__ import absolute_import
import mws
from . import config
from . import util

orders_api = mws.Orders(
    access_key=config.access_key,
    secret_key=config.secret_key,
    account_id=config.seller_id,
    region='US' or config.country_code,
)


def get_order_id(order):
    return order.get('AmazonOrderId').get('value')


class Orders(object):
    def __init__(self, last_updated_after, marketplace_id=None):
        self.api = orders_api
        self.marketplace_id = marketplace_id or config.marketplace_id
        self.last_updated_after = last_updated_after

mws

Python library for interacting with the Amazon MWS API

Unlicense
Latest version published 3 years ago

Package Health Score

55 / 100
Full package analysis

Similar packages