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

com.stripe.model.LoginLink Maven / Gradle / Ivy

There is a newer version: 26.13.0-beta.1
Show newest version
// Generated by delombok at Tue Sep 03 10:42:51 PDT 2019
// Generated by com.stripe.generator.entity.SdkBuilder
package com.stripe.model;

import com.google.gson.annotations.SerializedName;
import com.stripe.Stripe;
import com.stripe.exception.StripeException;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import com.stripe.param.LoginLinkCreateOnAccountParams;
import java.util.Map;

public class LoginLink extends ApiResource {
  /**
   * Time at which the object was created. Measured in seconds since the Unix epoch.
   */
  @SerializedName("created")
  Long created;
  /**
   * String representing the object's type. Objects of the same type share the same value.
   */
  @SerializedName("object")
  String object;
  /**
   * The URL for the login link.
   */
  @SerializedName("url")
  String url;

  /**
   * Creates a single-use login link for an Express account to access their Stripe dashboard.
   *
   * 

You may only create login links for Express * accounts connected to your platform. */ public static LoginLink createOnAccount(String account, Map params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s/login_links", ApiResource.urlEncodeId(account))); return request(ApiResource.RequestMethod.POST, url, params, LoginLink.class, options); } /** * Creates a single-use login link for an Express account to access their Stripe dashboard. * *

You may only create login links for Express * accounts connected to your platform. */ public static LoginLink createOnAccount(String account, LoginLinkCreateOnAccountParams params, RequestOptions options) throws StripeException { String url = String.format("%s%s", Stripe.getApiBase(), String.format("/v1/accounts/%s/login_links", ApiResource.urlEncodeId(account))); return request(ApiResource.RequestMethod.POST, url, params, LoginLink.class, options); } /** * Time at which the object was created. Measured in seconds since the Unix epoch. */ @java.lang.SuppressWarnings("all") @lombok.Generated public Long getCreated() { return this.created; } /** * String representing the object's type. Objects of the same type share the same value. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getObject() { return this.object; } /** * The URL for the login link. */ @java.lang.SuppressWarnings("all") @lombok.Generated public String getUrl() { return this.url; } /** * Time at which the object was created. Measured in seconds since the Unix epoch. */ @java.lang.SuppressWarnings("all") @lombok.Generated public void setCreated(final Long created) { this.created = created; } /** * String representing the object's type. Objects of the same type share the same value. */ @java.lang.SuppressWarnings("all") @lombok.Generated public void setObject(final String object) { this.object = object; } /** * The URL for the login link. */ @java.lang.SuppressWarnings("all") @lombok.Generated public void setUrl(final String url) { this.url = url; } @java.lang.Override @java.lang.SuppressWarnings("all") @lombok.Generated public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof LoginLink)) return false; final LoginLink other = (LoginLink) o; if (!other.canEqual((java.lang.Object) this)) return false; final java.lang.Object this$created = this.getCreated(); final java.lang.Object other$created = other.getCreated(); if (this$created == null ? other$created != null : !this$created.equals(other$created)) return false; final java.lang.Object this$object = this.getObject(); final java.lang.Object other$object = other.getObject(); if (this$object == null ? other$object != null : !this$object.equals(other$object)) return false; final java.lang.Object this$url = this.getUrl(); final java.lang.Object other$url = other.getUrl(); if (this$url == null ? other$url != null : !this$url.equals(other$url)) return false; return true; } @java.lang.SuppressWarnings("all") @lombok.Generated protected boolean canEqual(final java.lang.Object other) { return other instanceof LoginLink; } @java.lang.Override @java.lang.SuppressWarnings("all") @lombok.Generated public int hashCode() { final int PRIME = 59; int result = 1; final java.lang.Object $created = this.getCreated(); result = result * PRIME + ($created == null ? 43 : $created.hashCode()); final java.lang.Object $object = this.getObject(); result = result * PRIME + ($object == null ? 43 : $object.hashCode()); final java.lang.Object $url = this.getUrl(); result = result * PRIME + ($url == null ? 43 : $url.hashCode()); return result; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy