/// <summary> /// Get Subscription Get mobile number subscription for an account /// </summary> /// <exception cref="Telstra.Messaging.Client.ApiException">Thrown when fails to make API call</exception> /// <returns>Task of GetSubscriptionResponse</returns> public async System.Threading.Tasks.Task <GetSubscriptionResponse> GetSubscriptionAsync() { Telstra.Messaging.Client.ApiResponse <GetSubscriptionResponse> localVarResponse = await GetSubscriptionAsyncWithHttpInfo(); return(localVarResponse.Data); }
/// <summary> /// Get Subscription Get mobile number subscription for an account /// </summary> /// <exception cref="Telstra.Messaging.Client.ApiException">Thrown when fails to make API call</exception> /// <returns>GetSubscriptionResponse</returns> public GetSubscriptionResponse GetSubscription() { Telstra.Messaging.Client.ApiResponse <GetSubscriptionResponse> localVarResponse = GetSubscriptionWithHttpInfo(); return(localVarResponse.Data); }
/// <summary> /// Create Subscription Invoke the provisioning API to get a dedicated mobile number for an account or application. Note that Free Trial apps will have a 30-Day Limit for their provisioned number. If the Provisioning call is made several times within that 30-Day period, it will return the `expiryDate` in the Unix format and will not add any activeDays until after that `expiryDate`. After the `expiryDate`, you may make another Provisioning call to extend the activeDays by another 30-Days. For paid apps, a provisioned number can be allotted for a maximum of 5 years. If a Provisioning call is made which will result to activeDays > 1825, a 409 `Active Days Max` response will be returned to indicate that the provisioned number is already valid for more than 5 years and that no update to activeDays has been made. /// </summary> /// <exception cref="Telstra.Messaging.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">A JSON payload containing the required attributes</param> /// <returns>Task of ProvisionNumberResponse</returns> public async System.Threading.Tasks.Task <ProvisionNumberResponse> CreateSubscriptionAsync(ProvisionNumberRequest body) { Telstra.Messaging.Client.ApiResponse <ProvisionNumberResponse> localVarResponse = await CreateSubscriptionAsyncWithHttpInfo(body); return(localVarResponse.Data); }
/// <summary> /// Create Subscription Invoke the provisioning API to get a dedicated mobile number for an account or application. Note that Free Trial apps will have a 30-Day Limit for their provisioned number. If the Provisioning call is made several times within that 30-Day period, it will return the `expiryDate` in the Unix format and will not add any activeDays until after that `expiryDate`. After the `expiryDate`, you may make another Provisioning call to extend the activeDays by another 30-Days. For paid apps, a provisioned number can be allotted for a maximum of 5 years. If a Provisioning call is made which will result to activeDays > 1825, a 409 `Active Days Max` response will be returned to indicate that the provisioned number is already valid for more than 5 years and that no update to activeDays has been made. /// </summary> /// <exception cref="Telstra.Messaging.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">A JSON payload containing the required attributes</param> /// <returns>ProvisionNumberResponse</returns> public ProvisionNumberResponse CreateSubscription(ProvisionNumberRequest body) { Telstra.Messaging.Client.ApiResponse <ProvisionNumberResponse> localVarResponse = CreateSubscriptionWithHttpInfo(body); return(localVarResponse.Data); }
/// <summary> /// Generate OAuth2 token To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour. /// </summary> /// <exception cref="Telstra.Messaging.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="clientId"></param> /// <param name="clientSecret"></param> /// <param name="grantType"></param> /// <param name="scope">NSMS (optional)</param> /// <returns>Task of OAuthResponse</returns> public async System.Threading.Tasks.Task <OAuthResponse> AuthTokenAsync(string clientId, string clientSecret, string grantType, string scope = default(string)) { Telstra.Messaging.Client.ApiResponse <OAuthResponse> localVarResponse = await AuthTokenAsyncWithHttpInfo(clientId, clientSecret, grantType, scope); return(localVarResponse.Data); }
/// <summary> /// Generate OAuth2 token To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour. /// </summary> /// <exception cref="Telstra.Messaging.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="clientId"></param> /// <param name="clientSecret"></param> /// <param name="grantType"></param> /// <param name="scope">NSMS (optional)</param> /// <returns>OAuthResponse</returns> public OAuthResponse AuthToken(string clientId, string clientSecret, string grantType, string scope = default(string)) { Telstra.Messaging.Client.ApiResponse <OAuthResponse> localVarResponse = AuthTokenWithHttpInfo(clientId, clientSecret, grantType, scope); return(localVarResponse.Data); }