-
Notifications
You must be signed in to change notification settings - Fork 6
rdt-for-vdf #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rdt-for-vdf #102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces support for Restricted Data Token (RDT) requirements in Amazon Vendor Direct Fulfillment API client methods. The changes centralize RDT handling in the base SpApiClient class and ensure RDT is requested for specific endpoints that require it.
- Centralized RDT support in the base
SpApiClientclass with a newrequires_rdtattribute - Updated vendor direct fulfillment endpoints to enable RDT for order retrieval, shipping labels, invoices, and packing slips
- Modified API parameter structures for consistency with Amazon's API expectations
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/muffin_man/sp_api_client.rb | Added requires_rdt attribute and updated headers method to use RDT when flag is set |
| lib/muffin_man/vendor_direct_fulfillment_orders/v20211228.rb | Enabled RDT for order retrieval methods |
| lib/muffin_man/vendor_direct_fulfillment_shipping/v20211228.rb | Enabled RDT for shipping-related methods and made containers parameter required |
| lib/muffin_man/vendor_direct_fulfillment_inventory/v1.rb | Updated parameter structure to accept selling_party_id and wrap it in proper hash format |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| end | ||
|
|
||
| def create_shipping_labels(purchase_order_number, selling_party, ship_from_party, containers: nil) | ||
| def create_shipping_labels(purchase_order_number, selling_party, ship_from_party, containers) |
Copilot
AI
Sep 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making the containers parameter required is a breaking change. Consider adding a deprecation warning or making it optional with a default empty array to maintain backward compatibility.
| def create_shipping_labels(purchase_order_number, selling_party, ship_from_party, containers) | |
| def create_shipping_labels(purchase_order_number, selling_party, ship_from_party, containers = []) |
This pull request introduces a new restrictive data token (RDT) requirement for the Vendor Direct Fulfillment Shipping API's
createShippingLabelsendpoint, updates the API client to support this, and bumps the gem version to 2.5.0. The changes ensure that requests to this endpoint use the appropriate access token for sensitive data and clarify the method's required parameters.Vendor Direct Fulfillment Shipping API changes:
create_shipping_labelsmethod inlib/muffin_man/vendor_direct_fulfillment_shipping/v20211228.rbnow requires thecontainersparameter and always includes it in the request body. It also sets@requires_rdt = trueto ensure the restrictive data token is used.spec/muffin_man/vendor_direct_fulfillment_shipping/v20211228_spec.rbis updated to stub the RDT token and pass an empty array forcontainers.SP API Client enhancements:
SpApiClientclass now has arequires_rdtattribute, initialized tofalse, and theheadersmethod checks this flag to determine if an RDT token is needed for requests. [1] [2] [3]Versioning and documentation:
2.5.0inlib/muffin_man/version.rb.CHANGELOG.mddocuments the new restrictive data token requirement for the Vendor Direct Fulfillment Shipping API.