Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ commerce:
taxonomy: "1.0.0"
notifications: "1.0.0"
catalog: "1_beta.1.0"
metadata: "1.0.0"
sell:
account: "1.1.0"
analytics: "1.0.0"
Expand Down
1 change: 0 additions & 1 deletion lib/ebay_api/operations/commerce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ class EbayAPI
require_relative "commerce/catalog"
require_relative "commerce/notification"
require_relative "commerce/taxonomy"
require_relative "commerce/metadata"
end
end
1 change: 1 addition & 0 deletions lib/ebay_api/operations/sell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ class EbayAPI
require_relative "sell/account"
require_relative "sell/inventory"
require_relative "sell/marketing"
require_relative "sell/metadata"
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# @see https://developer.ebay.com/api-docs/sell/metadata/overview.html
#
class EbayAPI
scope :commerce do
scope :sell do
scope :metadata do
path { "catalog/v#{EbayAPI::COMMERCE_METADATA_VERSION.split(/\s|\./).first}" }
path { "metadata/v#{EbayAPI::SELL_METADATA_VERSION.split(/\s|\./).first}" }

require_relative "metadata/marketplace"
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class EbayAPI
scope :commerce do
scope :sell do
scope :metadata do
scope :marketplace do
path { "marketplace/#{marketplace_id}" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @see https://developer.ebay.com/api-docs/sell/metadata/resources/marketplace/methods/getItemConditionPolicies

class EbayAPI
scope :commerce do
scope :sell do
scope :metadata do
scope :marketplace do
operation :get_item_condition_policies do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@

RSpec.describe EbayAPI, ".commerce.metadata.marketplace.get_item_condition_policies" do
RSpec.describe EbayAPI, ".sell.metadata.marketplace.get_item_condition_policies" do
let(:client) { described_class.new(**settings) }
let(:scope) { client.commerce.metadata.marketplace(marketplace_id: "EBAY_US") }
let(:scope) { client.sell.metadata.marketplace(marketplace_id: "EBAY_US") }
let(:settings) { yaml_fixture_file("settings.valid.yml") }
let(:url) do
"https://api.ebay.com/commerce/catalog/v1/marketplace/EBAY_US/get_item_condition_policies"
"https://api.ebay.com/sell/metadata/v1/marketplace/EBAY_US/get_item_condition_policies"
end

before { stub_request(:get, url).to_return(response) }
subject { scope.get_item_condition_policies }

context "success" do
let(:response) do
open_fixture_file "commerce/metadata/marketplace/get_item_condition_policies/success"
open_fixture_file "sell/metadata/marketplace/get_item_condition_policies/success"
end

it "sends a request" do
Expand Down