Skip to content

Commit

Permalink
added report types enum
Browse files Browse the repository at this point in the history
  • Loading branch information
saleweaver committed Feb 8, 2021
1 parent 1ddbee0 commit a30e2d9
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 19 deletions.
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-sp-api',
version='0.2.1',
version='0.2.2',
install_requires=[
"requests",
"six~=1.15.0",
Expand Down
68 changes: 51 additions & 17 deletions sp_api/base/reportTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,55 @@

class ReportType(str, Enum):
GET_FLAT_FILE_OPEN_LISTINGS_DATA = 'GET_FLAT_FILE_OPEN_LISTINGS_DATA'
GET_MERCHANT_LISTINGS_ALL_DATA = 'GET_MERCHANT_LISTINGS_ALL_DATA'
GET_MERCHANT_LISTINGS_DATA = 'GET_MERCHANT_LISTINGS_DATA'
GET_MERCHANT_LISTINGS_INACTIVE_DATA = 'GET_MERCHANT_LISTINGS_INACTIVE_DATA'
GET_MERCHANT_LISTINGS_DATA_BACK_COMPAT = 'GET_MERCHANT_LISTINGS_DATA_BACK_COMPAT'
GET_MERCHANT_LISTINGS_DATA_LITE = 'GET_MERCHANT_LISTINGS_DATA_LITE'
GET_MERCHANT_LISTINGS_DATA_LITER = 'GET_MERCHANT_LISTINGS_DATA_LITER'
GET_MERCHANT_CANCELLED_LISTINGS_DATA = 'GET_MERCHANT_CANCELLED_LISTINGS_DATA'
GET_CONVERGED_FLAT_FILE_SOLD_LISTINGS_DATA = 'GET_CONVERGED_FLAT_FILE_SOLD_LISTINGS_DATA'
GET_MERCHANT_LISTINGS_DEFECT_DATA = 'GET_MERCHANT_LISTINGS_DEFECT_DATA'
GET_FLAT_FILE_ACTIONABLE_ORDER_DATA = 'GET_FLAT_FILE_ACTIONABLE_ORDER_DATA'
GET_ORDERS_DATA = 'GET_ORDERS_DATA'
GET_FLAT_FILE_ORDERS_DATA = 'GET_FLAT_FILE_ORDERS_DATA'
GET_CONVERGED_FLAT_FILE_ORDER_REPORT_DATA = 'GET_CONVERGED_FLAT_FILE_ORDER_REPORT_DATA'
GET_PAN_EU_OFFER_STATUS = 'GET_PAN_EU_OFFER_STATUS'
GET_MFN_PAN_EU_OFFER_STATUS = 'GET_MFN_PAN_EU_OFFER_STATUS'
GET_FLAT_FILE_GEO_OPPORTUNITIES = 'GET_FLAT_FILE_GEO_OPPORTUNITIES'
GET_REFERRAL_FEE_PREVIEW_REPORT = 'GET_REFERRAL_FEE_PREVIEW_REPORT'
GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_SHIPPING = 'GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_SHIPPING'
GET_ORDER_REPORT_DATA_INVOICING = 'GET_ORDER_REPORT_DATA_INVOICING'
GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING = 'GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING'
GET_ORDER_REPORT_DATA_TAX = 'GET_ORDER_REPORT_DATA_TAX'
GET_FLAT_FILE_ORDER_REPORT_DATA_TAX = 'GET_FLAT_FILE_ORDER_REPORT_DATA_TAX'
GET_ORDER_REPORT_DATA_SHIPPING = 'GET_ORDER_REPORT_DATA_SHIPPING'
GET_FLAT_FILE_ORDER_REPORT_DATA_SHIPPING = 'GET_FLAT_FILE_ORDER_REPORT_DATA_SHIPPING'
GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL = 'GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL'
GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL = 'GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL'
GET_FLAT_FILE_ARCHIVED_ORDERS_DATA_BY_ORDER_DATE = 'GET_FLAT_FILE_ARCHIVED_ORDERS_DATA_BY_ORDER_DATE'
GET_XML_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL = 'GET_XML_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL'
GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL = 'GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL'
GET_FLAT_FILE_PENDING_ORDERS_DATA = 'GET_FLAT_FILE_PENDING_ORDERS_DATA'
GET_PENDING_ORDERS_DATA = 'GET_PENDING_ORDERS_DATA'
GET_CONVERGED_FLAT_FILE_PENDING_ORDERS_DATA = 'GET_CONVERGED_FLAT_FILE_PENDING_ORDERS_DATA'
GET_XML_RETURNS_DATA_BY_RETURN_DATE = 'GET_XML_RETURNS_DATA_BY_RETURN_DATE'
GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE = 'GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE'
GET_XML_MFN_PRIME_RETURNS_REPORT = 'GET_XML_MFN_PRIME_RETURNS_REPORT'
GET_CSV_MFN_PRIME_RETURNS_REPORT = 'GET_CSV_MFN_PRIME_RETURNS_REPORT'
GET_XML_MFN_SKU_RETURN_ATTRIBUTES_REPORT = 'GET_XML_MFN_SKU_RETURN_ATTRIBUTES_REPORT'
GET_FLAT_FILE_MFN_SKU_RETURN_ATTRIBUTES_REPORT = 'GET_FLAT_FILE_MFN_SKU_RETURN_ATTRIBUTES_REPORT'
GET_SELLER_FEEDBACK_DATA = 'GET_SELLER_FEEDBACK_DATA'
GET_V1_SELLER_PERFORMANCE_REPORT = 'GET_V1_SELLER_PERFORMANCE_REPORT'
GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE = 'GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE'
GET_V2_SETTLEMENT_REPORT_DATA_XML = 'GET_V2_SETTLEMENT_REPORT_DATA_XML'
GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2 = 'GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2'
GET_FLAT_FILE_SALES_TAX_DATA = 'GET_FLAT_FILE_SALES_TAX_DATA'
SC_VAT_TAX_REPORT = 'SC_VAT_TAX_REPORT'
GET_VAT_TRANSACTION_DATA = 'GET_VAT_TRANSACTION_DATA'
GET_XML_BROWSE_TREE_DATA = 'GET_XML_BROWSE_TREE_DATA'
GET_AMAZON_FULFILLED_SHIPMENTS_DATA = 'GET_AMAZON_FULFILLED_SHIPMENTS_DATA'
FEE_DISCOUNTS_REPORT = 'FEE_DISCOUNTS_REPORT'
GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE = 'GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE'
GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE = 'GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE'
GET_XML_ALL_ORDERS_DATA_BY_LAST_UPDATE = 'GET_XML_ALL_ORDERS_DATA_BY_LAST_UPDATE'
GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE = 'GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE'
GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL = 'GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL'
GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING = 'GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING'
GET_AMAZON_FULFILLED_SHIPMENTS_DATA_TAX = 'GET_AMAZON_FULFILLED_SHIPMENTS_DATA_TAX'
GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_SALES_DATA = 'GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_SALES_DATA'
GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_PROMOTION_DATA = 'GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_PROMOTION_DATA'
GET_FBA_FULFILLMENT_CUSTOMER_TAXES_DATA = 'GET_FBA_FULFILLMENT_CUSTOMER_TAXES_DATA'
GET_REMOTE_FULFILLMENT_ELIGIBILITY = 'GET_REMOTE_FULFILLMENT_ELIGIBILITY'
GET_AFN_INVENTORY_DATA = 'GET_AFN_INVENTORY_DATA'
GET_AFN_INVENTORY_DATA_BY_COUNTRY = 'GET_AFN_INVENTORY_DATA_BY_COUNTRY'
GET_LEDGER_SUMMARY_VIEW_DATA = 'GET_LEDGER_SUMMARY_VIEW_DATA'
GET_LEDGER_DETAIL_VIEW_DATA = 'GET_LEDGER_DETAIL_VIEW_DATA'
GET_FBA_FULFILLMENT_CURRENT_INVENTORY_DATA = 'GET_FBA_FULFILLMENT_CURRENT_INVENTORY_DATA'
GET_FBA_FULFILLMENT_MONTHLY_INVENTORY_DATA = 'GET_FBA_FULFILLMENT_MONTHLY_INVENTORY_DATA'
GET_FBA_FULFILLMENT_INVENTORY_RECEIPTS_DATA = 'GET_FBA_FULFILLMENT_INVENTORY_RECEIPTS_DATA'
Expand All @@ -44,16 +61,33 @@ class ReportType(str, Enum):
GET_FBA_FULFILLMENT_INVENTORY_HEALTH_DATA = 'GET_FBA_FULFILLMENT_INVENTORY_HEALTH_DATA'
GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA = 'GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA'
GET_FBA_MYI_ALL_INVENTORY_DATA = 'GET_FBA_MYI_ALL_INVENTORY_DATA'
GET_FBA_FULFILLMENT_CROSS_BORDER_INVENTORY_MOVEMENT_DATA = 'GET_FBA_FULFILLMENT_CROSS_BORDER_INVENTORY_MOVEMENT_DATA'
GET_RESTOCK_INVENTORY_RECOMMENDATIONS_REPORT = 'GET_RESTOCK_INVENTORY_RECOMMENDATIONS_REPORT'
GET_FBA_FULFILLMENT_INBOUND_NONCOMPLIANCE_DATA = 'GET_FBA_FULFILLMENT_INBOUND_NONCOMPLIANCE_DATA'
GET_STRANDED_INVENTORY_UI_DATA = 'GET_STRANDED_INVENTORY_UI_DATA'
GET_STRANDED_INVENTORY_LOADER_DATA = 'GET_STRANDED_INVENTORY_LOADER_DATA'
POST_FLAT_FILE_INVLOADER_DATA = 'POST_FLAT_FILE_INVLOADER_DATA'
GET_FBA_INVENTORY_AGED_DATA = 'GET_FBA_INVENTORY_AGED_DATA'
GET_EXCESS_INVENTORY_DATA = 'GET_EXCESS_INVENTORY_DATA'
GET_FBA_STORAGE_FEE_CHARGES_DATA = 'GET_FBA_STORAGE_FEE_CHARGES_DATA'
GET_PRODUCT_EXCHANGE_DATA = 'GET_PRODUCT_EXCHANGE_DATA'
GET_FBA_ESTIMATED_FBA_FEES_TXT_DATA = 'GET_FBA_ESTIMATED_FBA_FEES_TXT_DATA'
GET_FBA_REIMBURSEMENTS_DATA = 'GET_FBA_REIMBURSEMENTS_DATA'
GET_FBA_FULFILLMENT_LONGTERM_STORAGE_FEE_CHARGES_DATA = 'GET_FBA_FULFILLMENT_LONGTERM_STORAGE_FEE_CHARGES_DATA'
GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA = 'GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA'
GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_REPLACEMENT_DATA = 'GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_REPLACEMENT_DATA'
GET_FBA_RECOMMENDED_REMOVAL_DATA = 'GET_FBA_RECOMMENDED_REMOVAL_DATA'
GET_FBA_FULFILLMENT_REMOVAL_ORDER_DETAIL_DATA = 'GET_FBA_FULFILLMENT_REMOVAL_ORDER_DETAIL_DATA'
GET_FBA_FULFILLMENT_REMOVAL_SHIPMENT_DETAIL_DATA = 'GET_FBA_FULFILLMENT_REMOVAL_SHIPMENT_DETAIL_DATA'

GET_FBA_UNO_INVENTORY_DATA = 'GET_FBA_UNO_INVENTORY_DATA'
GET_FLAT_FILE_SALES_TAX_DATA = 'GET_FLAT_FILE_SALES_TAX_DATA'
SC_VAT_TAX_REPORT = 'SC_VAT_TAX_REPORT'
GET_VAT_TRANSACTION_DATA = 'GET_VAT_TRANSACTION_DATA'
GET_GST_MTR_B2B_CUSTOM = 'GET_GST_MTR_B2B_CUSTOM'
GET_GST_MTR_B2C_CUSTOM = 'GET_GST_MTR_B2C_CUSTOM'
GET_XML_BROWSE_TREE_DATA = 'GET_XML_BROWSE_TREE_DATA'
GET_EASYSHIP_DOCUMENTS = 'GET_EASYSHIP_DOCUMENTS'
GET_EASYSHIP_PICKEDUP = 'GET_EASYSHIP_PICKEDUP'
GET_EASYSHIP_WAITING_FOR_PICKUP = 'GET_EASYSHIP_WAITING_FOR_PICKUP'
RFQD_BULK_DOWNLOAD = 'RFQD_BULK_DOWNLOAD'
FEE_DISCOUNTS_REPORT = 'FEE_DISCOUNTS_REPORT'
GET_FLAT_FILE_OFFAMAZONPAYMENTS_SANDBOX_SETTLEMENT_DATA = 'GET_FLAT_FILE_OFFAMAZONPAYMENTS_SANDBOX_SETTLEMENT_DATA'
2 changes: 1 addition & 1 deletion tests/api/reports/test_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def test_create_report():
res = Reports().create_report(
reportType='GET_MERCHANT_LISTINGS_ALL_DATA',
reportType=ReportType.GET_MERCHANT_LISTINGS_ALL_DATA,
dataStartTime='2019-12-10T20:11:24.000Z',
marketplaceIds=[
"A1PA6795UKMFR9",
Expand Down

0 comments on commit a30e2d9

Please sign in to comment.