• 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

25.81
/src/main/java/com/adyen/model/marketpayfund/Amount.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.fasterxml.jackson.annotation.JsonInclude;
21
import com.fasterxml.jackson.annotation.JsonProperty;
22
import com.fasterxml.jackson.annotation.JsonCreator;
23
import com.fasterxml.jackson.annotation.JsonTypeName;
24
import com.fasterxml.jackson.annotation.JsonValue;
25
import io.swagger.annotations.ApiModel;
26
import io.swagger.annotations.ApiModelProperty;
27
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
28
import com.fasterxml.jackson.core.JsonProcessingException;
29

30

31
/**
32
 * Amount
33
 */
34
@JsonPropertyOrder({
35
  Amount.JSON_PROPERTY_CURRENCY,
36
  Amount.JSON_PROPERTY_VALUE
37
})
38

39
public class Amount {
40
  public static final String JSON_PROPERTY_CURRENCY = "currency";
41
  private String currency;
42

43
  public static final String JSON_PROPERTY_VALUE = "value";
44
  private Long value;
45

46
  public Amount() { 
1✔
47
  }
1✔
48

49
  public Amount currency(String currency) {
50
    this.currency = currency;
×
51
    return this;
×
52
  }
53

54
   /**
55
   * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
56
   * @return currency
57
  **/
58
  @ApiModelProperty(required = true, value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).")
59
  @JsonProperty(JSON_PROPERTY_CURRENCY)
60
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
61

62
  public String getCurrency() {
63
    return currency;
1✔
64
  }
65

66

67
  @JsonProperty(JSON_PROPERTY_CURRENCY)
68
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
69
  public void setCurrency(String currency) {
70
    this.currency = currency;
1✔
71
  }
1✔
72

73

74
  public Amount value(Long value) {
75
    this.value = value;
×
76
    return this;
×
77
  }
78

79
   /**
80
   * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
81
   * @return value
82
  **/
83
  @ApiModelProperty(required = true, value = "The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).")
84
  @JsonProperty(JSON_PROPERTY_VALUE)
85
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
86

87
  public Long getValue() {
88
    return value;
1✔
89
  }
90

91

92
  @JsonProperty(JSON_PROPERTY_VALUE)
93
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
94
  public void setValue(Long value) {
95
    this.value = value;
1✔
96
  }
1✔
97

98

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

115
  @Override
116
  public int hashCode() {
117
    return Objects.hash(currency, value);
×
118
  }
119

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

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

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

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