コード例 #1
0
def test_sales_granularity_total():
    res = Sales().get_order_metrics(interval, Granularity.TOTAL, granularityTimeZone='US/Central')
    assert res.payload[0].get('unitCount') == 2
コード例 #2
0
def test_sales_granularity_day_by_asin():
    res = Sales().get_order_metrics(interval, Granularity.DAY, granularityTimeZone='US/Central', asin='B008OLKVEW')
    assert res.payload[0].get('unitCount') == 1
コード例 #3
0
def test_sales_granularity_year():
    s = Sales().get_order_metrics(interval,
                                  Granularity.YEAR,
                                  granularityTimeZone='US/Central')
    print(s)
コード例 #4
0
def test_sales_granularity_month():
    s = Sales().get_order_metrics(interval,
                                  Granularity.MONTH,
                                  granularityTimeZone='US/Central')
    print(s)
コード例 #5
0
def test_sales_granularity_week():
    s = Sales().get_order_metrics(interval,
                                  Granularity.WEEK,
                                  granularityTimeZone='US/Central')
    print(s)
コード例 #6
0
def test_sales_granularity_day():
    s = Sales(marketplace=Marketplaces.DE).get_order_metrics(
        interval, Granularity.DAY, granularityTimeZone='US/Central')
    print(s)
コード例 #7
0
def test_sales_granularity_hour():
    s = Sales().get_order_metrics(interval, Granularity.HOUR)
    print(s)