All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.univapay.sdk.builders.authentication.AbstractAuthenticationBuilders Maven / Gradle / Ivy

There is a newer version: 0.2.35
Show newest version
package com.univapay.sdk.builders.authentication;

import com.univapay.sdk.builders.RetrofitRequestBuilder;
import com.univapay.sdk.models.common.EmailAddress;
import com.univapay.sdk.models.common.Void;
import com.univapay.sdk.models.response.authentication.LoginTokenInfo;
import retrofit2.Retrofit;

public abstract class AbstractAuthenticationBuilders {

  public abstract static class AbstractLoginRequestBuilder<
          B extends AbstractLoginRequestBuilder, R, M extends LoginTokenInfo>
      extends RetrofitRequestBuilder {

    protected EmailAddress email;
    protected String password;

    protected String getEmail() {
      if (email == null) {
        return null;
      }
      return email.serialize();
    }

    protected String getPassword() {
      return password;
    }

    public AbstractLoginRequestBuilder(Retrofit retrofit, EmailAddress email, String password) {
      super(retrofit);
      this.email = email;
      this.password = password;
    }
  }

  public abstract static class AbstractLogoutRequestBuilder<
          B extends AbstractLogoutRequestBuilder, R>
      extends RetrofitRequestBuilder {

    public AbstractLogoutRequestBuilder(Retrofit retrofit) {
      super(retrofit);
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy