Last active
December 29, 2017 15:06
-
-
Save avidas/60497628415e3c11574ae7ea493349ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
def cancel_price_escalation(account, location) | |
TenantService.switch_tenant_with_location_uuid(location.uuid) | |
prs = account.primary_reservations.active.select { |res| res.location_id == location.id } | |
prs.map{ |res| res.update_attributes(annual_escalator_rate: nil, escalation_date: nil) } | |
end | |
account = Account.find_by_short_code('2XL9P8') | |
raise 'Incorrect Account' unless account.name == 'IAIelta' | |
location = Location.find(62) | |
raise 'Incorrect Location' unless location.name == 'Be\'er Sheva' | |
cancel_price_escalation(account, location) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍