Skip to content

Commit

Permalink
Merge pull request softlayer#90 from thejohnlin/v3.0
Browse files Browse the repository at this point in the history
V3.0: Removing explicit receiver for private method calls in VirtualServerUpgradeOrder(verify, place_order!)
  • Loading branch information
SLsthompson committed Mar 25, 2015
2 parents e045720 + bd690a5 commit bb909d6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions lib/softlayer/VirtualServerUpgradeOrder.rb
Expand Up @@ -51,10 +51,9 @@ def initialize(virtual_server)
#
def verify()
if has_order_items?
order_object = self.order_object
order_object = yield order_object if block_given?

@virtual_server.softlayer_client[:Product_Order].verifyOrder(order_object)
order_template = order_object
order_template = yield order_object if block_given?
@virtual_server.softlayer_client[:Product_Order].verifyOrder(order_template)
end
end

Expand All @@ -67,10 +66,10 @@ def verify()
#
def place_order!()
if has_order_items?
order_object = self.order_object
order_object = yield order_object if block_given?
order_template = order_object
order_template = yield order_object if block_given?

@virtual_server.softlayer_client[:Product_Order].placeOrder(order_object)
@virtual_server.softlayer_client[:Product_Order].placeOrder(order_template)
end
end

Expand Down Expand Up @@ -113,7 +112,7 @@ def _item_prices_in_category(which_category)
# and whose capacity matches the value given. Returns the item_price or nil
#
def _item_price_with_capacity(which_category, capacity)
self._item_prices_in_category(which_category).find { |item_price| item_price['item']['capacity'].to_i == capacity}
_item_prices_in_category(which_category).find { |item_price| item_price['item']['capacity'].to_i == capacity}
end

##
Expand Down

0 comments on commit bb909d6

Please sign in to comment.