added OptionalFulfillmentProgram optional param
@@ -10,6 +10,7 @@ class ProductFees(Client):
@sp_endpoint('/products/fees/v0/listings/{}/feesEstimate', method='POST')
def get_product_fees_estimate_for_sku(self, seller_sku, price: float, shipping_price=None, currency='USD',
is_fba=False, points: dict = None, marketplace_id: str = None,
+ optional_fulfillment_program: str = None,
**kwargs) -> ApiResponse:
"""
get_product_fees_estimate_for_sku(self, seller_sku, price: float, shipping_price=None, currency='USD', is_fba=False, points: dict = dict, **kwargs) -> ApiResponse
@@ -36,18 +37,20 @@ class ProductFees(Client):
is_fba:
points:
marketplace_id: str | Defaults to self.marketplace_id
+ optional_fulfillment_program:
**kwargs:
Returns:
ApiResponse:
"""
- kwargs.update(self._create_body(price, shipping_price, currency, is_fba, seller_sku, points, marketplace_id))
+ kwargs.update(self._create_body(price, shipping_price, currency, is_fba, seller_sku, points, marketplace_id, optional_fulfillment_program))
return self._request(fill_query_params(kwargs.pop('path'), seller_sku), data=kwargs)
@sp_endpoint('/products/fees/v0/items/{}/feesEstimate', method='POST')
def get_product_fees_estimate_for_asin(self, asin, price: float, currency='USD', shipping_price=None, is_fba=False,
points: dict = None, marketplace_id: str = None,
+ optional_fulfillment_program: str = None,
**kwargs) -> ApiResponse:
"""
get_product_fees_estimate_for_asin(self, asin, price: float, currency='USD', shipping_price=None, is_fba=False, points: dict = dict, **kwargs) -> ApiResponse
@@ -74,17 +77,18 @@ class ProductFees(Client):
is_fba:
points:
marketplace_id: str | Defaults to self.marketplace_id
+ optional_fulfillment_program:
**kwargs:
Returns:
ApiResponse:
"""
- kwargs.update(self._create_body(price, shipping_price, currency, is_fba, asin, points, marketplace_id))
+ kwargs.update(self._create_body(price, shipping_price, currency, is_fba, asin, points, marketplace_id, optional_fulfillment_program))
return self._request(fill_query_params(kwargs.pop('path'), asin), data=kwargs)
def _create_body(self, price, shipping_price=None, currency='USD', is_fba=False, identifier=None,
- points: dict = None, marketplace_id: str = None):
+ points: dict = None, marketplace_id: str = None, optional_fulfillment_program: str=None):
"""
Create request body
@@ -114,6 +118,7 @@ class ProductFees(Client):
'Points': points or None
},
'IsAmazonFulfilled': is_fba,
+ 'OptionalFulfillmentProgram': optional_fulfillment_program if is_fba is True and optional_fulfillment_program else None,
'MarketplaceId': marketplace_id or self.marketplace_id
}
}
