• 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/marketpayaccount/AbstractOpenApiSchema.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.lang.reflect.Type;
18
import java.util.Map;
19
import jakarta.ws.rs.core.GenericType;
20

21
import com.fasterxml.jackson.annotation.JsonValue;
22

23
/**
24
 * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
25
 */
26

27
public abstract class AbstractOpenApiSchema {
28

29
    // store the actual instance of the schema/object
30
    private Object instance;
31

32
    // is nullable
33
    private Boolean isNullable;
34

35
    // schema type (e.g. oneOf, anyOf)
36
    private final String schemaType;
37

38
    public AbstractOpenApiSchema(String schemaType, Boolean isNullable) {
×
39
        this.schemaType = schemaType;
×
40
        this.isNullable = isNullable;
×
41
    }
×
42

43
    /**
44
     * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object
45
     *
46
     * @return an instance of the actual schema/object
47
     */
48
    public abstract Map<String, GenericType> getSchemas();
49

50
    /**
51
     * Get the actual instance
52
     *
53
     * @return an instance of the actual schema/object
54
     */
55
    @JsonValue
56
    public Object getActualInstance() {return instance;}
×
57

58
    /**
59
     * Set the actual instance
60
     *
61
     * @param instance the actual instance of the schema/object
62
     */
63
    public void setActualInstance(Object instance) {this.instance = instance;}
×
64

65
    /**
66
     * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well
67
     *
68
     * @return an instance of the actual schema/object
69
     */
70
    public Object getActualInstanceRecursively() {
71
        return getActualInstanceRecursively(this);
×
72
    }
73

74
    private Object getActualInstanceRecursively(AbstractOpenApiSchema object) {
75
        if (object.getActualInstance() == null) {
×
76
            return null;
×
77
        } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) {
×
78
            return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance());
×
79
        } else {
80
            return object.getActualInstance();
×
81
        }
82
    }
83

84
    /**
85
     * Get the schema type (e.g. anyOf, oneOf)
86
     *
87
     * @return the schema type
88
     */
89
    public String getSchemaType() {
90
        return schemaType;
×
91
    }
92

93
    @Override
94
    public String toString() {
95
        StringBuilder sb = new StringBuilder();
×
96
        sb.append("class ").append(getClass()).append(" {\n");
×
97
        sb.append("    instance: ").append(toIndentedString(instance)).append("\n");
×
98
        sb.append("    isNullable: ").append(toIndentedString(isNullable)).append("\n");
×
99
        sb.append("    schemaType: ").append(toIndentedString(schemaType)).append("\n");
×
100
        sb.append("}");
×
101
        return sb.toString();
×
102
    }
103

104
    /**
105
     * Convert the given object to string with each line indented by 4 spaces
106
     * (except the first line).
107
     */
108
    private String toIndentedString(Object o) {
109
        if (o == null) {
×
110
            return "null";
×
111
        }
112
        return o.toString().replace("\n", "\n    ");
×
113
    }
114

115
    public boolean equals(Object o) {
116
        if (this == o) {
×
117
            return true;
×
118
        }
119
        if (o == null || getClass() != o.getClass()) {
×
120
            return false;
×
121
        }
122
        AbstractOpenApiSchema a = (AbstractOpenApiSchema) o;
×
123
        return Objects.equals(this.instance, a.instance) &&
×
124
            Objects.equals(this.isNullable, a.isNullable) &&
×
125
            Objects.equals(this.schemaType, a.schemaType);
×
126
    }
127

128
    @Override
129
    public int hashCode() {
130
        return Objects.hash(instance, isNullable, schemaType);
×
131
    }
132

133
    /**
134
     * Is nullable
135
     *
136
     * @return true if it's nullable
137
     */
138
    public Boolean isNullable() {
139
        if (Boolean.TRUE.equals(isNullable)) {
×
140
            return Boolean.TRUE;
×
141
        } else {
142
            return Boolean.FALSE;
×
143
        }
144
    }
145

146

147

148
}
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