Class: ShopifyURL::Admin::DraftOrders

Inherits:
String
  • Object
show all
Defined in:
lib/shopify_url.rb

Instance Method Summary collapse

Constructor Details

#initialize(base, qs = nil) ⇒ DraftOrders

Returns a new instance of DraftOrders.



191
192
193
194
# File 'lib/shopify_url.rb', line 191

def initialize(base, qs = nil)
  super base + "/draft_orders"
  self << "?" << qs if qs
end

Instance Method Details

#new(params = nil) ⇒ Object



196
197
198
199
200
# File 'lib/shopify_url.rb', line 196

def new(params = nil)
  url = self + "/new"
  url << "?" << URI.encode_www_form(params.to_a) if params && params.any?
  url
end