Method: Spaceship::Client#push_mode_from_masked_number

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

#push_mode_from_masked_number(phone_numbers, masked_number) ⇒ Object



302
303
304
305
306
307
308
309
# File 'spaceship/lib/spaceship/two_step_or_factor_client.rb', line 302

def push_mode_from_masked_number(phone_numbers, masked_number)
  phone_numbers.each do |phone|
    return phone['pushMode'] if phone['numberWithDialCode'] == masked_number
  end

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