• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-java / #16380

30 Aug 2024 07:54PM UTC coverage: 12.882% (-0.004%) from 12.886%
#16380

push

github

web-flow
Merge from master after the changes to not pass api_mode from individual methods (#1857)

* Generate SDK for OpenAPI spec version 1230 (#1856)

* Bump version to 26.9.0

* No need for APIMode to be passed around from individual API methods (#1855)

* Generated code

* Update the code around raw request

* Update the v2 tests to use v2 path

16 of 23 new or added lines in 7 files covered. (69.57%)

706 existing lines in 213 files now uncovered.

18468 of 143365 relevant lines covered (12.88%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

30.77
/src/main/java/com/stripe/model/LoginLink.java
1
// File generated from our OpenAPI spec
2
package com.stripe.model;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.exception.StripeException;
6
import com.stripe.net.ApiRequest;
7
import com.stripe.net.ApiRequestParams;
8
import com.stripe.net.ApiResource;
9
import com.stripe.net.BaseAddress;
10
import com.stripe.net.RequestOptions;
11
import com.stripe.param.LoginLinkCreateOnAccountParams;
12
import java.util.Map;
13
import lombok.EqualsAndHashCode;
14
import lombok.Getter;
15
import lombok.Setter;
16

17
/**
18
 * Login Links are single-use URLs for a connected account to access the Express Dashboard. The
19
 * connected account's <a
20
 * href="https://stripe.com/api/accounts/object#account_object-controller-stripe_dashboard-type">account.controller.stripe_dashboard.type</a>
21
 * must be {@code express} to have access to the Express Dashboard.
22
 */
23
@Getter
24
@Setter
25
@EqualsAndHashCode(callSuper = false)
26
public class LoginLink extends ApiResource {
1✔
27
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
28
  @SerializedName("created")
29
  Long created;
30

31
  /**
32
   * String representing the object's type. Objects of the same type share the same value.
33
   *
34
   * <p>Equal to {@code login_link}.
35
   */
36
  @SerializedName("object")
37
  String object;
38

39
  /** The URL for the login link. */
40
  @SerializedName("url")
41
  String url;
42

43
  /**
44
   * Creates a single-use login link for a connected account to access the Express Dashboard.
45
   *
46
   * <p><strong>You can only create login links for accounts that use the <a
47
   * href="https://stripe.com/connect/express-dashboard">Express Dashboard</a> and are connected to
48
   * your platform</strong>.
49
   */
50
  public static LoginLink createOnAccount(String account) throws StripeException {
51
    return createOnAccount(account, (Map<String, Object>) null, (RequestOptions) null);
×
52
  }
53

54
  /**
55
   * Creates a single-use login link for a connected account to access the Express Dashboard.
56
   *
57
   * <p><strong>You can only create login links for accounts that use the <a
58
   * href="https://stripe.com/connect/express-dashboard">Express Dashboard</a> and are connected to
59
   * your platform</strong>.
60
   */
61
  public static LoginLink createOnAccount(String account, RequestOptions options)
62
      throws StripeException {
63
    return createOnAccount(account, (Map<String, Object>) null, options);
×
64
  }
65

66
  /**
67
   * Creates a single-use login link for a connected account to access the Express Dashboard.
68
   *
69
   * <p><strong>You can only create login links for accounts that use the <a
70
   * href="https://stripe.com/connect/express-dashboard">Express Dashboard</a> and are connected to
71
   * your platform</strong>.
72
   */
73
  public static LoginLink createOnAccount(String account, Map<String, Object> params)
74
      throws StripeException {
75
    return createOnAccount(account, params, (RequestOptions) null);
×
76
  }
77

78
  /**
79
   * Creates a single-use login link for a connected account to access the Express Dashboard.
80
   *
81
   * <p><strong>You can only create login links for accounts that use the <a
82
   * href="https://stripe.com/connect/express-dashboard">Express Dashboard</a> and are connected to
83
   * your platform</strong>.
84
   */
85
  public static LoginLink createOnAccount(
86
      String account, Map<String, Object> params, RequestOptions options) throws StripeException {
87
    String path = String.format("/v1/accounts/%s/login_links", ApiResource.urlEncodeId(account));
1✔
88
    ApiRequest request =
1✔
89
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
90
    return getGlobalResponseGetter().request(request, LoginLink.class);
1✔
91
  }
92

93
  /**
94
   * Creates a single-use login link for a connected account to access the Express Dashboard.
95
   *
96
   * <p><strong>You can only create login links for accounts that use the <a
97
   * href="https://stripe.com/connect/express-dashboard">Express Dashboard</a> and are connected to
98
   * your platform</strong>.
99
   */
100
  public static LoginLink createOnAccount(String account, LoginLinkCreateOnAccountParams params)
101
      throws StripeException {
102
    return createOnAccount(account, params, (RequestOptions) null);
×
103
  }
104

105
  /**
106
   * Creates a single-use login link for a connected account to access the Express Dashboard.
107
   *
108
   * <p><strong>You can only create login links for accounts that use the <a
109
   * href="https://stripe.com/connect/express-dashboard">Express Dashboard</a> and are connected to
110
   * your platform</strong>.
111
   */
112
  public static LoginLink createOnAccount(
113
      String account, LoginLinkCreateOnAccountParams params, RequestOptions options)
114
      throws StripeException {
115
    String path = String.format("/v1/accounts/%s/login_links", ApiResource.urlEncodeId(account));
×
116
    ApiResource.checkNullTypedParams(path, params);
×
117
    ApiRequest request =
×
118
        new ApiRequest(
119
            BaseAddress.API,
120
            ApiResource.RequestMethod.POST,
121
            path,
122
            ApiRequestParams.paramsToMap(params),
×
123
            options);
UNCOV
124
    return getGlobalResponseGetter().request(request, LoginLink.class);
×
125
  }
126
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc