LOCATION_ID = "bson id from spreadsheet"
Location.where(LOCATION_ID).first_or_create!(mongo_location_id: LOCATION_ID)
note the location id, we will need it later.
cut and paste the contents of the oop.rb file containing the class OOP
prepare the parameters from the spreadsheet.
nomad_params = ['Brandibble (Direct Guest Platform)', 'Num Pang'] + %w[5626a569ada0cd000a000001 5626a575ada0cd000a000003 NoMad 5703efe850dc7d000a00002a 5ba14fde0e64d80065709c4d 5aeb8cf6541574003687cce8]
this array is created from the following columns in the spreadsheets
"SALIDO Integration Partner" "SALIDO Customer Org Name" Org ID Brand ID Location Name Location ID Location's Rev Center ID "Online Ordering Employee ID (1 per org)"
you can then create an instance of OOP, and confirm the param settings.
oop = OOP.new(*nomad_params)
pp oop.config
once you are satisfied with the config, run the setup
oop.run
pp oop.output
copy the output back into the spreadsheet
note the password may be empty if the user is not newly created. That's okay it probably means the parter/org employee already exists.
verification step
pp oop.acl
If you are setting up non-production online ordering integrations, there is an extra platform step.
locs = Platform::Location.where(:id.in => [])
365.times do |d|
day = d.days.from_now.beginning_of_day + 1.minute
locs.each { |l| l.business_day_for(day) }
end