module MusicTodayApiWrapper
Attributes
configuration[RW]
Public Class Methods
checkout(address, items)
click to toggle source
# File lib/music_today_api_wrapper.rb, line 31 def self.checkout(address, items) checkout_services = Services::CheckoutServices.new checkout_services.checkout(address, items) end
configure() { |configuration| ... }
click to toggle source
# File lib/music_today_api_wrapper.rb, line 11 def self.configure self.configuration ||= Configuration.new yield(configuration) end
find_product(id)
click to toggle source
# File lib/music_today_api_wrapper.rb, line 21 def self.find_product(id) product_services = Services::ProductServices.new product_services.find_product(id) end
products(per_page = 1000, page_number = nil)
click to toggle source
# File lib/music_today_api_wrapper.rb, line 16 def self.products(per_page = 1000, page_number = nil) product_services = Services::ProductServices.new product_services.all_products(per_page, page_number) end
purchase(order, check_price = true)
click to toggle source
# File lib/music_today_api_wrapper.rb, line 36 def self.purchase(order, check_price = true) checkout_services = Services::CheckoutServices.new return checkout_services.only_purchase(order) unless check_price checkout_services.confirm_and_purchase(order) if check_price end
shipping_options(address, items)
click to toggle source
# File lib/music_today_api_wrapper.rb, line 26 def self.shipping_options(address, items) shipping_services = Services::ShippingServices.new shipping_services.options(address, items) end