Skip to content

Instantly share code, notes, and snippets.

@avidas
Created December 29, 2017 17:47
Show Gist options
  • Save avidas/d52de68541843d1d5c58ffc6cead714f to your computer and use it in GitHub Desktop.
Save avidas/d52de68541843d1d5c58ffc6cead714f to your computer and use it in GitHub Desktop.
begin
TenantService.switch_to_rest_of_world_tenant
account = Account.find_by_short_code '7MY9PT'
primary_reservations = account.primary_reservations.active.where(description: ['2132', '2133', '2134', '2135', '2137'])
# Set commitment terms
start_date = Date.today.next_month.beginning_of_year
months = 6
primary_reservations.map{|res| CommitmentTermService.new(res).create(months, start_date) }
end
@edohring
Copy link

👍

@ianguffy
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment