• 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

0.0
/src/main/java/com/stripe/model/terminal/ReaderCollectedData.java
1
// File generated from our OpenAPI spec
2
package com.stripe.model.terminal;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.exception.StripeException;
6
import com.stripe.model.HasId;
7
import com.stripe.model.StripeObject;
8
import com.stripe.net.ApiRequest;
9
import com.stripe.net.ApiRequestParams;
10
import com.stripe.net.ApiResource;
11
import com.stripe.net.BaseAddress;
12
import com.stripe.net.RequestOptions;
13
import com.stripe.net.StripeResponseGetter;
14
import com.stripe.param.terminal.ReaderCollectedDataRetrieveParams;
15
import java.util.Map;
16
import lombok.EqualsAndHashCode;
17
import lombok.Getter;
18
import lombok.Setter;
19

20
/** Returns data collected by Terminal readers. This data is only stored for 24 hours. */
21
@Getter
22
@Setter
23
@EqualsAndHashCode(callSuper = false)
24
public class ReaderCollectedData extends ApiResource implements HasId {
×
25
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
26
  @SerializedName("created")
27
  Long created;
28

29
  /** Unique identifier for the object. */
30
  @Getter(onMethod_ = {@Override})
31
  @SerializedName("id")
32
  String id;
33

34
  /**
35
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
36
   * object exists in test mode.
37
   */
38
  @SerializedName("livemode")
39
  Boolean livemode;
40

41
  /** The magstripe data collected by the reader. */
42
  @SerializedName("magstripe")
43
  Magstripe magstripe;
44

45
  /**
46
   * String representing the object's type. Objects of the same type share the same value.
47
   *
48
   * <p>Equal to {@code terminal.reader_collected_data}.
49
   */
50
  @SerializedName("object")
51
  String object;
52

53
  /**
54
   * The type of data collected by the reader.
55
   *
56
   * <p>Equal to {@code magstripe}.
57
   */
58
  @SerializedName("type")
59
  String type;
60

61
  /** Retrieve data collected using Reader hardware. */
62
  public static ReaderCollectedData retrieve(String readerCollectedData) throws StripeException {
63
    return retrieve(readerCollectedData, (Map<String, Object>) null, (RequestOptions) null);
×
64
  }
65

66
  /** Retrieve data collected using Reader hardware. */
67
  public static ReaderCollectedData retrieve(String readerCollectedData, RequestOptions options)
68
      throws StripeException {
69
    return retrieve(readerCollectedData, (Map<String, Object>) null, options);
×
70
  }
71

72
  /** Retrieve data collected using Reader hardware. */
73
  public static ReaderCollectedData retrieve(
74
      String readerCollectedData, Map<String, Object> params, RequestOptions options)
75
      throws StripeException {
76
    String path =
×
77
        String.format(
×
78
            "/v1/terminal/reader_collected_data/%s", ApiResource.urlEncodeId(readerCollectedData));
×
79
    ApiRequest request =
×
80
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
UNCOV
81
    return getGlobalResponseGetter().request(request, ReaderCollectedData.class);
×
82
  }
83

84
  /** Retrieve data collected using Reader hardware. */
85
  public static ReaderCollectedData retrieve(
86
      String readerCollectedData, ReaderCollectedDataRetrieveParams params, RequestOptions options)
87
      throws StripeException {
88
    String path =
×
89
        String.format(
×
90
            "/v1/terminal/reader_collected_data/%s", ApiResource.urlEncodeId(readerCollectedData));
×
91
    ApiResource.checkNullTypedParams(path, params);
×
92
    ApiRequest request =
×
93
        new ApiRequest(
94
            BaseAddress.API,
95
            ApiResource.RequestMethod.GET,
96
            path,
97
            ApiRequestParams.paramsToMap(params),
×
98
            options);
UNCOV
99
    return getGlobalResponseGetter().request(request, ReaderCollectedData.class);
×
100
  }
101

102
  /** Represents magstripe data collected by the reader. */
103
  @Getter
104
  @Setter
105
  @EqualsAndHashCode(callSuper = false)
106
  public static class Magstripe extends StripeObject {
×
107
    /** The raw magstripe data collected by the reader. */
108
    @SerializedName("data")
109
    String data;
110
  }
111

112
  @Override
113
  public void setResponseGetter(StripeResponseGetter responseGetter) {
114
    super.setResponseGetter(responseGetter);
×
115
    trySetResponseGetter(magstripe, responseGetter);
×
116
  }
×
117
}
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