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

Adyen / adyen-java-api-library / #2661

22 Sep 2023 11:24AM UTC coverage: 12.611%. First build
#2661

push

web-flow
Merge 251f6ff51 into 9e36e9c01

9262 of 9262 new or added lines in 142 files covered. (100.0%)

11033 of 87486 relevant lines covered (12.61%)

0.13 hits per line

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

0.0
/src/main/java/com/adyen/model/marketpayaccount/UploadDocumentRequest.java
1
/*
2
 * Account API
3
 * This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead.  The Account API provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. The management operations include actions such as creation, retrieval, updating, and deletion of them.  For more information, refer to our [documentation](https://docs.adyen.com/marketplaces-and-platforms/classic). ## Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an `X-API-Key` header with the API key as the value, for example:   ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: YOUR_API_KEY\" \\ ... ```  Alternatively, you can use the username and password to connect to the API using basic authentication. For example:  ``` curl -U \"ws@MarketPlace.YOUR_PLATFORM_ACCOUNT\":\"YOUR_WS_PASSWORD\" \\ -H \"Content-Type: application/json\" \\ ... ``` When going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints).  ## Versioning The Account API supports [versioning](https://docs.adyen.com/development-resources/versioning) using a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number.  For example: ``` https://cal-test.adyen.com/cal/services/Account/v6/createAccountHolder ```
4
 *
5
 * The version of the OpenAPI document: 6
6
 * 
7
 *
8
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
 * https://openapi-generator.tech
10
 * Do not edit the class manually.
11
 */
12

13

14
package com.adyen.model.marketpayaccount;
15

16
import java.util.Objects;
17
import java.util.Arrays;
18
import java.util.Map;
19
import java.util.HashMap;
20
import com.adyen.model.marketpayaccount.DocumentDetail;
21
import com.fasterxml.jackson.annotation.JsonInclude;
22
import com.fasterxml.jackson.annotation.JsonProperty;
23
import com.fasterxml.jackson.annotation.JsonCreator;
24
import com.fasterxml.jackson.annotation.JsonTypeName;
25
import com.fasterxml.jackson.annotation.JsonValue;
26
import io.swagger.annotations.ApiModel;
27
import io.swagger.annotations.ApiModelProperty;
28
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
29
import com.fasterxml.jackson.core.JsonProcessingException;
30

31

32
/**
33
 * UploadDocumentRequest
34
 */
35
@JsonPropertyOrder({
36
  UploadDocumentRequest.JSON_PROPERTY_DOCUMENT_CONTENT,
37
  UploadDocumentRequest.JSON_PROPERTY_DOCUMENT_DETAIL
38
})
39

40
public class UploadDocumentRequest {
41
  public static final String JSON_PROPERTY_DOCUMENT_CONTENT = "documentContent";
42
  private byte[] documentContent;
43

44
  public static final String JSON_PROPERTY_DOCUMENT_DETAIL = "documentDetail";
45
  private DocumentDetail documentDetail;
46

47
  public UploadDocumentRequest() { 
×
48
  }
×
49

50
  public UploadDocumentRequest documentContent(byte[] documentContent) {
51
    this.documentContent = documentContent;
×
52
    return this;
×
53
  }
54

55
   /**
56
   * The content of the document, in Base64-encoded string format.  To learn about document requirements, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks).
57
   * @return documentContent
58
  **/
59
  @ApiModelProperty(required = true, value = "The content of the document, in Base64-encoded string format.  To learn about document requirements, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks).")
60
  @JsonProperty(JSON_PROPERTY_DOCUMENT_CONTENT)
61
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
62

63
  public byte[] getDocumentContent() {
64
    return documentContent;
×
65
  }
66

67

68
  @JsonProperty(JSON_PROPERTY_DOCUMENT_CONTENT)
69
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
70
  public void setDocumentContent(byte[] documentContent) {
71
    this.documentContent = documentContent;
×
72
  }
×
73

74

75
  public UploadDocumentRequest documentDetail(DocumentDetail documentDetail) {
76
    this.documentDetail = documentDetail;
×
77
    return this;
×
78
  }
79

80
   /**
81
   * Get documentDetail
82
   * @return documentDetail
83
  **/
84
  @ApiModelProperty(required = true, value = "")
85
  @JsonProperty(JSON_PROPERTY_DOCUMENT_DETAIL)
86
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
87

88
  public DocumentDetail getDocumentDetail() {
89
    return documentDetail;
×
90
  }
91

92

93
  @JsonProperty(JSON_PROPERTY_DOCUMENT_DETAIL)
94
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
95
  public void setDocumentDetail(DocumentDetail documentDetail) {
96
    this.documentDetail = documentDetail;
×
97
  }
×
98

99

100
  /**
101
   * Return true if this UploadDocumentRequest object is equal to o.
102
   */
103
  @Override
104
  public boolean equals(Object o) {
105
    if (this == o) {
×
106
      return true;
×
107
    }
108
    if (o == null || getClass() != o.getClass()) {
×
109
      return false;
×
110
    }
111
    UploadDocumentRequest uploadDocumentRequest = (UploadDocumentRequest) o;
×
112
    return Arrays.equals(this.documentContent, uploadDocumentRequest.documentContent) &&
×
113
        Objects.equals(this.documentDetail, uploadDocumentRequest.documentDetail);
×
114
  }
115

116
  @Override
117
  public int hashCode() {
118
    return Objects.hash(Arrays.hashCode(documentContent), documentDetail);
×
119
  }
120

121
  @Override
122
  public String toString() {
123
    StringBuilder sb = new StringBuilder();
×
124
    sb.append("class UploadDocumentRequest {\n");
×
125
    sb.append("    documentContent: ").append(toIndentedString(documentContent)).append("\n");
×
126
    sb.append("    documentDetail: ").append(toIndentedString(documentDetail)).append("\n");
×
127
    sb.append("}");
×
128
    return sb.toString();
×
129
  }
130

131
  /**
132
   * Convert the given object to string with each line indented by 4 spaces
133
   * (except the first line).
134
   */
135
  private String toIndentedString(Object o) {
136
    if (o == null) {
×
137
      return "null";
×
138
    }
139
    return o.toString().replace("\n", "\n    ");
×
140
  }
141

142
/**
143
   * Create an instance of UploadDocumentRequest given an JSON string
144
   *
145
   * @param jsonString JSON string
146
   * @return An instance of UploadDocumentRequest
147
   * @throws JsonProcessingException if the JSON string is invalid with respect to UploadDocumentRequest
148
   */
149
  public static UploadDocumentRequest fromJson(String jsonString) throws JsonProcessingException {
150
    return JSON.getMapper().readValue(jsonString, UploadDocumentRequest.class);
×
151
  }
152
/**
153
  * Convert an instance of UploadDocumentRequest to an JSON string
154
  *
155
  * @return JSON string
156
  */
157
  public String toJson() throws JsonProcessingException {
158
    return JSON.getMapper().writeValueAsString(this);
×
159
  }
160
}
161

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

© 2025 Coveralls, Inc