Sha256: d6182cdddc7ea0f9a06074482df07d87ba3e04c08f310026e9f143a3cb161854
Contents?: true
Size: 660 Bytes
Versions: 15
Compression:
Stored size: 660 Bytes
Contents
module Economic class PricingRepo < Economic::ProductRepo def self.currency_specific_sales_prices_for(product_or_product_number) id = product_or_product_number.product_number if product_or_product_number.respond_to? :product_number id ||= product_or_product_number end_point = [superclass.endpoint_url, id, "pricing", "currency-specific-sales-prices"].join("/") response = send_request(method: :get, url: URI.escape(end_point)) entry_hash = JSON.parse(response.body) pricings = [] entry_hash["collection"].each do |pricing| pricings.push Pricing.new(pricing) end pricings end end end
Version data entries
15 entries across 15 versions & 1 rubygems