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

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

02 Oct 2023 02:08PM UTC coverage: 12.623%. First build
#2676

push

web-flow
Merge 8c2a459f7 into 9e36e9c01

9362 of 9362 new or added lines in 164 files covered. (100.0%)

11051 of 87544 relevant lines covered (12.62%)

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/marketpayfund/TransferFundsRequest.java
1
/*
2
 * Fund 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 Fund API provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account.  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 Fund 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/Fund/v6/accountHolderBalance ```
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.marketpayfund;
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.marketpayfund.Amount;
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
 * TransferFundsRequest
34
 */
35
@JsonPropertyOrder({
36
  TransferFundsRequest.JSON_PROPERTY_AMOUNT,
37
  TransferFundsRequest.JSON_PROPERTY_DESTINATION_ACCOUNT_CODE,
38
  TransferFundsRequest.JSON_PROPERTY_MERCHANT_REFERENCE,
39
  TransferFundsRequest.JSON_PROPERTY_SOURCE_ACCOUNT_CODE,
40
  TransferFundsRequest.JSON_PROPERTY_TRANSFER_CODE
41
})
42

43
public class TransferFundsRequest {
44
  public static final String JSON_PROPERTY_AMOUNT = "amount";
45
  private Amount amount;
46

47
  public static final String JSON_PROPERTY_DESTINATION_ACCOUNT_CODE = "destinationAccountCode";
48
  private String destinationAccountCode;
49

50
  public static final String JSON_PROPERTY_MERCHANT_REFERENCE = "merchantReference";
51
  private String merchantReference;
52

53
  public static final String JSON_PROPERTY_SOURCE_ACCOUNT_CODE = "sourceAccountCode";
54
  private String sourceAccountCode;
55

56
  public static final String JSON_PROPERTY_TRANSFER_CODE = "transferCode";
57
  private String transferCode;
58

59
  public TransferFundsRequest() { 
×
60
  }
×
61

62
  public TransferFundsRequest amount(Amount amount) {
63
    this.amount = amount;
×
64
    return this;
×
65
  }
66

67
   /**
68
   * Get amount
69
   * @return amount
70
  **/
71
  @ApiModelProperty(required = true, value = "")
72
  @JsonProperty(JSON_PROPERTY_AMOUNT)
73
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
74

75
  public Amount getAmount() {
76
    return amount;
×
77
  }
78

79

80
  @JsonProperty(JSON_PROPERTY_AMOUNT)
81
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
82
  public void setAmount(Amount amount) {
83
    this.amount = amount;
×
84
  }
×
85

86

87
  public TransferFundsRequest destinationAccountCode(String destinationAccountCode) {
88
    this.destinationAccountCode = destinationAccountCode;
×
89
    return this;
×
90
  }
91

92
   /**
93
   * The code of the account to which the funds are to be credited. >The state of the Account Holder of this account must be Active.
94
   * @return destinationAccountCode
95
  **/
96
  @ApiModelProperty(required = true, value = "The code of the account to which the funds are to be credited. >The state of the Account Holder of this account must be Active.")
97
  @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT_CODE)
98
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
99

100
  public String getDestinationAccountCode() {
101
    return destinationAccountCode;
×
102
  }
103

104

105
  @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT_CODE)
106
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
107
  public void setDestinationAccountCode(String destinationAccountCode) {
108
    this.destinationAccountCode = destinationAccountCode;
×
109
  }
×
110

111

112
  public TransferFundsRequest merchantReference(String merchantReference) {
113
    this.merchantReference = merchantReference;
×
114
    return this;
×
115
  }
116

117
   /**
118
   * A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another.
119
   * @return merchantReference
120
  **/
121
  @ApiModelProperty(value = "A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another.")
122
  @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE)
123
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
124

125
  public String getMerchantReference() {
126
    return merchantReference;
×
127
  }
128

129

130
  @JsonProperty(JSON_PROPERTY_MERCHANT_REFERENCE)
131
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
132
  public void setMerchantReference(String merchantReference) {
133
    this.merchantReference = merchantReference;
×
134
  }
×
135

136

137
  public TransferFundsRequest sourceAccountCode(String sourceAccountCode) {
138
    this.sourceAccountCode = sourceAccountCode;
×
139
    return this;
×
140
  }
141

142
   /**
143
   * The code of the account from which the funds are to be debited. >The state of the Account Holder of this account must be Active and allow payouts.
144
   * @return sourceAccountCode
145
  **/
146
  @ApiModelProperty(required = true, value = "The code of the account from which the funds are to be debited. >The state of the Account Holder of this account must be Active and allow payouts.")
147
  @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT_CODE)
148
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
149

150
  public String getSourceAccountCode() {
151
    return sourceAccountCode;
×
152
  }
153

154

155
  @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT_CODE)
156
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
157
  public void setSourceAccountCode(String sourceAccountCode) {
158
    this.sourceAccountCode = sourceAccountCode;
×
159
  }
×
160

161

162
  public TransferFundsRequest transferCode(String transferCode) {
163
    this.transferCode = transferCode;
×
164
    return this;
×
165
  }
166

167
   /**
168
   * The code related to the type of transfer being performed. >The permitted codes differ for each platform account and are defined in their service level agreement.
169
   * @return transferCode
170
  **/
171
  @ApiModelProperty(required = true, value = "The code related to the type of transfer being performed. >The permitted codes differ for each platform account and are defined in their service level agreement.")
172
  @JsonProperty(JSON_PROPERTY_TRANSFER_CODE)
173
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
174

175
  public String getTransferCode() {
176
    return transferCode;
×
177
  }
178

179

180
  @JsonProperty(JSON_PROPERTY_TRANSFER_CODE)
181
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
182
  public void setTransferCode(String transferCode) {
183
    this.transferCode = transferCode;
×
184
  }
×
185

186

187
  /**
188
   * Return true if this TransferFundsRequest object is equal to o.
189
   */
190
  @Override
191
  public boolean equals(Object o) {
192
    if (this == o) {
×
193
      return true;
×
194
    }
195
    if (o == null || getClass() != o.getClass()) {
×
196
      return false;
×
197
    }
198
    TransferFundsRequest transferFundsRequest = (TransferFundsRequest) o;
×
199
    return Objects.equals(this.amount, transferFundsRequest.amount) &&
×
200
        Objects.equals(this.destinationAccountCode, transferFundsRequest.destinationAccountCode) &&
×
201
        Objects.equals(this.merchantReference, transferFundsRequest.merchantReference) &&
×
202
        Objects.equals(this.sourceAccountCode, transferFundsRequest.sourceAccountCode) &&
×
203
        Objects.equals(this.transferCode, transferFundsRequest.transferCode);
×
204
  }
205

206
  @Override
207
  public int hashCode() {
208
    return Objects.hash(amount, destinationAccountCode, merchantReference, sourceAccountCode, transferCode);
×
209
  }
210

211
  @Override
212
  public String toString() {
213
    StringBuilder sb = new StringBuilder();
×
214
    sb.append("class TransferFundsRequest {\n");
×
215
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
×
216
    sb.append("    destinationAccountCode: ").append(toIndentedString(destinationAccountCode)).append("\n");
×
217
    sb.append("    merchantReference: ").append(toIndentedString(merchantReference)).append("\n");
×
218
    sb.append("    sourceAccountCode: ").append(toIndentedString(sourceAccountCode)).append("\n");
×
219
    sb.append("    transferCode: ").append(toIndentedString(transferCode)).append("\n");
×
220
    sb.append("}");
×
221
    return sb.toString();
×
222
  }
223

224
  /**
225
   * Convert the given object to string with each line indented by 4 spaces
226
   * (except the first line).
227
   */
228
  private String toIndentedString(Object o) {
229
    if (o == null) {
×
230
      return "null";
×
231
    }
232
    return o.toString().replace("\n", "\n    ");
×
233
  }
234

235
/**
236
   * Create an instance of TransferFundsRequest given an JSON string
237
   *
238
   * @param jsonString JSON string
239
   * @return An instance of TransferFundsRequest
240
   * @throws JsonProcessingException if the JSON string is invalid with respect to TransferFundsRequest
241
   */
242
  public static TransferFundsRequest fromJson(String jsonString) throws JsonProcessingException {
243
    return JSON.getMapper().readValue(jsonString, TransferFundsRequest.class);
×
244
  }
245
/**
246
  * Convert an instance of TransferFundsRequest to an JSON string
247
  *
248
  * @return JSON string
249
  */
250
  public String toJson() throws JsonProcessingException {
251
    return JSON.getMapper().writeValueAsString(this);
×
252
  }
253
}
254

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