001/*
002 *   Copyright 2024 Vonage
003 *
004 *   Licensed under the Apache License, Version 2.0 (the "License");
005 *   you may not use this file except in compliance with the License.
006 *   You may obtain a copy of the License at
007 *
008 *        http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *   Unless required by applicable law or agreed to in writing, software
011 *   distributed under the License is distributed on an "AS IS" BASIS,
012 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *   See the License for the specific language governing permissions and
014 *   limitations under the License.
015 */
016package com.vonage.client.account;
017
018import com.fasterxml.jackson.annotation.JsonProperty;
019import com.fasterxml.jackson.annotation.JsonUnwrapped;
020import com.vonage.client.Jsonable;
021import com.vonage.client.JsonableBaseObject;
022import java.math.BigDecimal;
023import java.util.List;
024
025/**
026 * Pricing information for a specific country.
027 */
028public class PricingResponse extends JsonableBaseObject {
029    private String dialingPrefix;
030    private BigDecimal defaultPrice;
031    private String currency;
032    @JsonUnwrapped private Country country;
033    private List<Network> networks;
034
035    @Deprecated
036    public PricingResponse() {
037    }
038
039    /**
040     * Dialing prefix for the country.
041     *
042     * @return The dialing prefix as a string.
043     */
044    @JsonProperty("dialingPrefix")
045    public String getDialingPrefix() {
046        return dialingPrefix;
047    }
048
049    /**
050     * Default price for the country.
051     *
052     * @return The default price.
053     */
054    @JsonProperty("defaultPrice")
055    public BigDecimal getDefaultPrice() {
056        return defaultPrice;
057    }
058
059    /**
060     * Currency that your account is being billed in (EUR by default).
061     *
062     * @return The billing currency code as a string.
063     */
064    @JsonProperty("currency")
065    public String getCurrency() {
066        return currency;
067    }
068
069    /**
070     * Details of the country this pricing information is for.
071     *
072     * @return The country.
073     */
074    @JsonProperty("country")
075    public Country getCountry() {
076        return country;
077    }
078
079    /**
080     * List of supported networks in the country.
081     *
082     * @return The list of networks.
083     */
084    @JsonProperty("networks")
085    public List<Network> getNetworks() {
086        return networks;
087    }
088
089    /**
090     * Creates an instance of this class from a JSON payload.
091     *
092     * @param json The JSON string to parse.
093     * @return An instance of this class with the fields populated, if present.
094     * @deprecated This will be removed in the next major release.
095     */
096    @Deprecated
097    public static PricingResponse fromJson(String json) {
098        return Jsonable.fromJson(json);
099    }
100}