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

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

23 Oct 2023 01:52PM UTC coverage: 12.821%. First build
#2748

push

web-flow
Merge c6d37d76d into c99ba89a9

2931 of 2931 new or added lines in 118 files covered. (100.0%)

12345 of 96286 relevant lines covered (12.82%)

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/management/Payment.java
1
/*
2
 * Management API
3
 *
4
 * The version of the OpenAPI document: 3
5
 * 
6
 *
7
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
 * https://openapi-generator.tech
9
 * Do not edit the class manually.
10
 */
11

12

13
package com.adyen.model.management;
14

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

31

32
/**
33
 * Payment
34
 */
35
@JsonPropertyOrder({
36
  Payment.JSON_PROPERTY_CONTACTLESS_CURRENCY,
37
  Payment.JSON_PROPERTY_HIDE_MINOR_UNITS_IN_CURRENCIES
38
})
39

40
public class Payment {
41
  public static final String JSON_PROPERTY_CONTACTLESS_CURRENCY = "contactlessCurrency";
42
  private String contactlessCurrency;
43

44
  public static final String JSON_PROPERTY_HIDE_MINOR_UNITS_IN_CURRENCIES = "hideMinorUnitsInCurrencies";
45
  private List<String> hideMinorUnitsInCurrencies = null;
×
46

47
  public Payment() { 
×
48
  }
×
49

50
  public Payment contactlessCurrency(String contactlessCurrency) {
51
    this.contactlessCurrency = contactlessCurrency;
×
52
    return this;
×
53
  }
54

55
   /**
56
   * The default currency for contactless payments on the payment terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
57
   * @return contactlessCurrency
58
  **/
59
  @ApiModelProperty(value = "The default currency for contactless payments on the payment terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.")
60
  @JsonProperty(JSON_PROPERTY_CONTACTLESS_CURRENCY)
61
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
62

63
  public String getContactlessCurrency() {
64
    return contactlessCurrency;
×
65
  }
66

67

68
  @JsonProperty(JSON_PROPERTY_CONTACTLESS_CURRENCY)
69
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
70
  public void setContactlessCurrency(String contactlessCurrency) {
71
    this.contactlessCurrency = contactlessCurrency;
×
72
  }
×
73

74

75
  public Payment hideMinorUnitsInCurrencies(List<String> hideMinorUnitsInCurrencies) {
76
    this.hideMinorUnitsInCurrencies = hideMinorUnitsInCurrencies;
×
77
    return this;
×
78
  }
79

80
  public Payment addHideMinorUnitsInCurrenciesItem(String hideMinorUnitsInCurrenciesItem) {
81
    if (this.hideMinorUnitsInCurrencies == null) {
×
82
      this.hideMinorUnitsInCurrencies = new ArrayList<>();
×
83
    }
84
    this.hideMinorUnitsInCurrencies.add(hideMinorUnitsInCurrenciesItem);
×
85
    return this;
×
86
  }
87

88
   /**
89
   * Hides the minor units for the listed [ISO currency codes](https://en.wikipedia.org/wiki/ISO_4217).
90
   * @return hideMinorUnitsInCurrencies
91
  **/
92
  @ApiModelProperty(value = "Hides the minor units for the listed [ISO currency codes](https://en.wikipedia.org/wiki/ISO_4217).")
93
  @JsonProperty(JSON_PROPERTY_HIDE_MINOR_UNITS_IN_CURRENCIES)
94
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
95

96
  public List<String> getHideMinorUnitsInCurrencies() {
97
    return hideMinorUnitsInCurrencies;
×
98
  }
99

100

101
  @JsonProperty(JSON_PROPERTY_HIDE_MINOR_UNITS_IN_CURRENCIES)
102
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
103
  public void setHideMinorUnitsInCurrencies(List<String> hideMinorUnitsInCurrencies) {
104
    this.hideMinorUnitsInCurrencies = hideMinorUnitsInCurrencies;
×
105
  }
×
106

107

108
  /**
109
   * Return true if this Payment object is equal to o.
110
   */
111
  @Override
112
  public boolean equals(Object o) {
113
    if (this == o) {
×
114
      return true;
×
115
    }
116
    if (o == null || getClass() != o.getClass()) {
×
117
      return false;
×
118
    }
119
    Payment payment = (Payment) o;
×
120
    return Objects.equals(this.contactlessCurrency, payment.contactlessCurrency) &&
×
121
        Objects.equals(this.hideMinorUnitsInCurrencies, payment.hideMinorUnitsInCurrencies);
×
122
  }
123

124
  @Override
125
  public int hashCode() {
126
    return Objects.hash(contactlessCurrency, hideMinorUnitsInCurrencies);
×
127
  }
128

129
  @Override
130
  public String toString() {
131
    StringBuilder sb = new StringBuilder();
×
132
    sb.append("class Payment {\n");
×
133
    sb.append("    contactlessCurrency: ").append(toIndentedString(contactlessCurrency)).append("\n");
×
134
    sb.append("    hideMinorUnitsInCurrencies: ").append(toIndentedString(hideMinorUnitsInCurrencies)).append("\n");
×
135
    sb.append("}");
×
136
    return sb.toString();
×
137
  }
138

139
  /**
140
   * Convert the given object to string with each line indented by 4 spaces
141
   * (except the first line).
142
   */
143
  private String toIndentedString(Object o) {
144
    if (o == null) {
×
145
      return "null";
×
146
    }
147
    return o.toString().replace("\n", "\n    ");
×
148
  }
149

150
/**
151
   * Create an instance of Payment given an JSON string
152
   *
153
   * @param jsonString JSON string
154
   * @return An instance of Payment
155
   * @throws JsonProcessingException if the JSON string is invalid with respect to Payment
156
   */
157
  public static Payment fromJson(String jsonString) throws JsonProcessingException {
158
    return JSON.getMapper().readValue(jsonString, Payment.class);
×
159
  }
160
/**
161
  * Convert an instance of Payment to an JSON string
162
  *
163
  * @return JSON string
164
  */
165
  public String toJson() throws JsonProcessingException {
166
    return JSON.getMapper().writeValueAsString(this);
×
167
  }
168
}
169

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