<?php



namespace SensFRX\OAuth;



class OAuth {



	private $objAPI;



	public function __construct($objAPI) {



		$this->objAPI = $objAPI;



	}



	/**

	 * Send OTP via OAuth flow

	 * 

	 * @param array $data Email and platform information

	 * @return array Response from API

	 */

	public function oauthSendOtp($data) {



		return $this->objAPI->postOAuthApiFinal('/onboarding/oauth/send-otp', $data);



	}



	/**

	 * Verify OTP via OAuth flow

	 * 

	 * @param array $data Email and OTP

	 * @return array Response from API

	 */

	public function oauthVerifyOtp($data) {



		return $this->objAPI->postOAuthApiFinal('/onboarding/oauth/verify-otp', $data);



	}



	/**

	 * Resend OTP via OAuth flow

	 * 

	 * @param array $data Email

	 * @return array Response from API

	 */

	public function oauthResendOtp($data) {



		return $this->objAPI->postOAuthApiFinal('/onboarding/oauth/resend-otp', $data);



	}



	/**

	 * Register property and get credentials via OAuth flow

	 * 

	 * @param array $data Email, temp_token, and platform information

	 * @return array Response from API with propertyId and propertySecret

	 */

	public function oauthRegister($data) {



		return $this->objAPI->postOAuthApiFinal('/onboarding/oauth/register', $data);



	}



}



