Method: Spaceship::Client#push_mode_from_number

Defined in:
spaceship/lib/spaceship/two_step_or_factor_client.rb

#push_mode_from_number(phone_numbers, phone_number) ⇒ Object



257
258
259
260
261
262
263
264
# File 'spaceship/lib/spaceship/two_step_or_factor_client.rb', line 257

def push_mode_from_number(phone_numbers, phone_number)
  phone_numbers.each do |phone|
    return phone['pushMode'] if match_phone_to_masked_phone(phone_number, phone['numberWithDialCode'])
  end

  # If no pushMode was supplied, assume sms
  return "sms"
end