lib/vncpost_api/resources/order.rb in vncpost_api-0.1.0 vs lib/vncpost_api/resources/order.rb in vncpost_api-0.2.0
- old
+ new
@@ -45,23 +45,17 @@
}
self.prefix = "/Order/Add"
self.element_name = ""
- def self.track(code)
- new(code: code).track
- end
-
def initialize(attributes = {}, persisted = false)
attributes = DEFAULT_ATTRS.merge(attributes)
super
end
def track
- puts "#track only available in production environment"
- self.class.retrieve_token
tracking_number = @attributes[:returned_code] || @attributes[:code]
- get("Track/#{tracking_number}")
+ Tracking.find(tracking_number)
end
private
def load_attributes_from_response(response)