Skip to content

Ordersv2026-01-01#108

Merged
Sanjjay Mahalingam (sanjjaymahalingam) merged 4 commits intomasterfrom
Ordersv2026-01-01
Mar 19, 2026
Merged

Ordersv2026-01-01#108
Sanjjay Mahalingam (sanjjaymahalingam) merged 4 commits intomasterfrom
Ordersv2026-01-01

Conversation

@sanjjaymahalingam
Copy link
Copy Markdown
Contributor

This pull request introduces support for the new Orders API version v2026-01-01 and updates the gem version to 2.6.0. The main changes include adding a new client for the Orders API v2026-01-01, updating documentation and changelogs, and adding comprehensive tests and fixtures for the new API endpoints.

Support for Orders API v2026-01-01:

  • Added a new client class MuffinMan::Orders::V20260101 with methods for search_orders and get_order, supporting the latest query parameters and endpoint structure.
  • Registered the new Orders API client in the main lib/muffin_man.rb file for easy access.

Documentation and versioning:

  • Updated README.md to remove the outdated list of supported APIs, making the documentation more maintainable.
  • Added a changelog entry for version 2.6.0, highlighting the Orders v2026-01-01 support.
  • Bumped the gem version to 2.6.0 in lib/muffin_man/version.rb.

Testing and fixtures:

  • Added a spec file for MuffinMan::Orders::V20260101 with tests for both search_orders and get_order endpoints.
  • Included new fixture JSON files for realistic responses from the Orders v2026-01-01 API. [1] [2]

Copilot AI review requested due to automatic review settings March 17, 2026 19:16
@wiz-55ccc8b716
Copy link
Copy Markdown

wiz-55ccc8b716 bot commented Mar 17, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data 1 Medium 1 Low 1 Info
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 1 Medium 1 Low 1 Info

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial support (client + fixtures + specs) for the Amazon SP-API Orders API 2026-01-01, and bumps the gem version/changelog accordingly.

Changes:

  • Introduces MuffinMan::Orders::V20260101 with search_orders and get_order.
  • Adds JSON fixtures and a basic RSpec file for the new Orders version.
  • Bumps gem version to 2.6.0 and updates CHANGELOG.md (and removes an API-support list from README.md).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/muffin_man/orders/v20260101.rb New client for Orders API 2026-01-01 endpoints.
lib/muffin_man.rb Requires the new Orders client.
spec/muffin_man/orders/v20260101_spec.rb Adds tests for search_orders / get_order (currently broken due to stubbing).
spec/support/orders/v20260101_search_orders.json Fixture for search_orders response.
spec/support/orders/v20260101_get_order.json Fixture for get_order response.
lib/muffin_man/version.rb Version bump to 2.6.0.
CHANGELOG.md Changelog entry for 2.6.0.
README.md Removes the “supported APIs” list section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.


def get_order(order_id, included_data: [])
@local_var_path = "/orders/2026-01-01/orders/#{order_id}"
@query_params = { "includedData" => included_data.join(",") } if included_data.any?
Comment on lines +7 to +10
it "returns orders" do
stub_request(:get, canonical_uri)
.to_return(status: 200, body: File.read("./spec/support/orders/v20260101_search_orders.json"))

Comment on lines +20 to +23
stub_request(:get, canonical_uri)
.to_return(status: 200, body: File.read("./spec/support/orders/v20260101_get_order.json"))

order_id = "202-1234567-8901234"
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces support for the Amazon SP-API Orders API v2026-01-01 in the MuffinMan client, including fixtures/specs, and bumps the gem version for release.

Changes:

  • Added MuffinMan::Orders::V20260101 client with search_orders and get_order.
  • Added RSpec coverage and JSON fixtures for the new Orders API version.
  • Bumped gem version to 2.6.0 and updated CHANGELOG.md (and removed the supported-APIs list from README.md).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
spec/support/orders/v20260101_search_orders.json Adds fixture response for search_orders in Orders v2026-01-01.
spec/support/orders/v20260101_get_order.json Adds fixture response for get_order in Orders v2026-01-01.
spec/muffin_man/orders/v20260101_spec.rb Adds basic request/response specs for the new Orders v2026-01-01 client.
README.md Removes the enumerated list of supported APIs from the README.
lib/muffin_man/version.rb Bumps gem version from 2.5.1 to 2.6.0.
lib/muffin_man/orders/v20260101.rb Implements the new Orders v2026-01-01 API client methods.
lib/muffin_man.rb Requires the new Orders v2026-01-01 client.
CHANGELOG.md Documents the new release entry for 2.6.0 / Orders v2026-01-01.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.


def get_order(order_id, included_data: [])
@local_var_path = "/orders/2026-01-01/orders/#{order_id}"
@query_params = { "includedData" => included_data.join(",") } if included_data.any?
Comment on lines +8 to +31
describe "#search_orders" do
it "returns orders" do
stub_request(:get, "https://#{hostname}/orders/2026-01-01/orders")
.to_return(status: 200, body: File.read("./spec/support/orders/v20260101_search_orders.json"))

response = orders_client.search_orders

expect(response).to be_success
expect(JSON.parse(response.body)["orders"]).to be_an(Array)
end
end

describe "#get_order" do
it "returns the order" do
order_id = "202-1234567-8901234"

stub_request(:get, "https://#{hostname}/orders/2026-01-01/orders/#{order_id}")
.to_return(status: 200, body: File.read("./spec/support/orders/v20260101_get_order.json"))

response = orders_client.get_order(order_id)

expect(response).to be_success
expect(JSON.parse(response.body).dig("order", "orderId")).to eq(order_id)
end
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for the Orders API 2026-01-01 to the MuffinMan SP-API client, including a new client class and basic request specs/fixtures, along with a version bump and changelog entry.

Changes:

  • Introduce MuffinMan::Orders::V20260101 with search_orders and get_order methods.
  • Add RSpec coverage and JSON fixtures for the new Orders endpoints.
  • Bump gem version to 2.6.0, update CHANGELOG.md, and wire the new client into lib/muffin_man.rb.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/muffin_man/orders/v20260101.rb New Orders 2026-01-01 client implementation.
lib/muffin_man.rb Requires the new Orders client.
spec/muffin_man/orders/v20260101_spec.rb Adds request specs for search_orders and get_order.
spec/support/orders/v20260101_search_orders.json Fixture for search_orders response.
spec/support/orders/v20260101_get_order.json Fixture for get_order response.
lib/muffin_man/version.rb Version bump to 2.6.0.
CHANGELOG.md Adds 2.6.0 entry for Orders 2026-01-01.
README.md Removes the supported-APIs list section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +26 to +31
def get_order(order_id, included_data: [])
@local_var_path = "/orders/2026-01-01/orders/#{order_id}"
@query_params = {}
@query_params["includedData"] = included_data.join(",") if included_data.any?
@request_type = "GET"
call_api
Comment on lines +16 to +21
includedData
].freeze

def search_orders(query_params: {})
@local_var_path = "/orders/2026-01-01/orders"
@query_params = query_params.slice(*SEARCH_ORDERS_QUERY_PARAMS)
Comment on lines +23 to +36
describe "#get_order" do
it "returns the order" do
order_id = "202-1234567-8901234"
included_data = ["BUYER", "RECIPIENT"]

stub_request(:get, "https://#{hostname}/orders/2026-01-01/orders/#{order_id}")
.with(query: { "includedData" => included_data.join(",") })
.to_return(status: 200, body: File.read("./spec/support/orders/v20260101_get_order.json"))

response = orders_client.get_order(order_id, included_data: included_data)

expect(response).to be_success
expect(JSON.parse(response.body).dig("order", "orderId")).to eq(order_id)
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sanjjaymahalingam Sanjjay Mahalingam (sanjjaymahalingam) merged commit d7a2f41 into master Mar 19, 2026
13 checks passed
@sanjjaymahalingam Sanjjay Mahalingam (sanjjaymahalingam) deleted the Ordersv2026-01-01 branch March 19, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants