001/*
002 * Copyright 2018 The Billing Project, LLC
003 *
004 * The Billing Project licenses this file to you under the Apache License, version 2.0
005 * (the "License"); you may not use this file except in compliance with the
006 * License.  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, WITHOUT
012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
013 * License for the specific language governing permissions and limitations
014 * under the License.
015 */
016
017package com.ning.billing.recurly.model;
018
019import com.fasterxml.jackson.annotation.JsonIgnore;
020import com.fasterxml.jackson.annotation.JsonSetter;
021import com.fasterxml.jackson.databind.annotation.JsonSerialize;
022
023import javax.xml.bind.annotation.XmlRootElement;
024import javax.xml.bind.annotation.XmlTransient;
025
026@JsonSerialize(using = PlanCodesSerializer.class)
027@XmlRootElement(name = "plan_codes")
028public class PlanCodes extends RecurlyObjects<PlanCode> {
029
030    @XmlTransient
031    private static final String PROPERTY_NAME = "plan_code";
032
033    @JsonSetter(value = PROPERTY_NAME)
034    @Override
035    public void setRecurlyObject(final PlanCode value) {
036        super.setRecurlyObject(value);
037    }
038
039    @JsonIgnore
040    @Override
041    public PlanCodes getStart() {
042        return getStart(PlanCodes.class);
043    }
044
045    @JsonIgnore
046    @Override
047    public PlanCodes getNext() {
048        return getNext(PlanCodes.class);
049    }
050}