Skip to content

Commit

Permalink
Find endpoint directly by selling region
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanensari committed Sep 26, 2024
1 parent abc1f24 commit 68bd3b0
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lib/peddler/marketplace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,9 @@ def find(country_code)
end
end

# @return [String]
def aws_region
case selling_region
when "North America"
"us-east-1"
when "Europe"
"eu-west-1"
when "Far East"
"us-west-2"
end
end

# @return [Peddler::Endpoint]
def endpoint
Endpoint.find(aws_region)
Endpoint.find_by_selling_region(selling_region)
end
end
end

0 comments on commit 68bd3b0

Please sign in to comment.