// Path: common/src/main/java/cz/gopay/api/v3/util/GPDateAdapter.java
// public class GPDateAdapter extends XmlAdapter<String, Date> {
// 
//     private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
// 
//     @Override
//     public String marshal(Date v) throws Exception {
//         return dateFormat.format(v);
//     }
// 
//     @Override
//     public Date unmarshal(String v) throws Exception {
//         return dateFormat.parse(v);
//     }
// 
// }


import java.util.Date;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import cz.gopay.api.v3.util.GPDateAdapter;
package cz.gopay.api.v3.model.payment.support;




/**
 *
 * @author Zbynek Novak novak.zbynek@gmail.com
 *
 */
@XmlRootElement
public class Recurrence {

    public enum RecurrenceState {
        REQUESTED,
        STARTED,
        STOPPED
    }

    @XmlElement(name = "recurrence_cycle")
    private RecurrenceCycle recurrenceCycle;

    @XmlElement(name = "recurrence_period")
    private Integer recurrencePeriod;

    @XmlElement(name = "recurrence_date_to")
// Path: common/src/main/java/cz/gopay/api/v3/util/GPDateAdapter.java
// public class GPDateAdapter extends XmlAdapter<String, Date> {
// 
//     private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
// 
//     @Override
//     public String marshal(Date v) throws Exception {
//         return dateFormat.format(v);
//     }
// 
//     @Override
//     public Date unmarshal(String v) throws Exception {
//         return dateFormat.parse(v);
//     }
// 
// }


// Path: common/src/main/java/cz/gopay/api/v3/model/payment/support/Recurrence.java
import java.util.Date;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import cz.gopay.api.v3.util.GPDateAdapter;

package cz.gopay.api.v3.model.payment.support;




/**
 *
 * @author Zbynek Novak novak.zbynek@gmail.com
 *
 */
@XmlRootElement
public class Recurrence {

    public enum RecurrenceState {
        REQUESTED,
        STARTED,
        STOPPED
    }

    @XmlElement(name = "recurrence_cycle")
    private RecurrenceCycle recurrenceCycle;

    @XmlElement(name = "recurrence_period")
    private Integer recurrencePeriod;

    @XmlElement(name = "recurrence_date_to")
    @XmlJavaTypeAdapter(GPDateAdapter.class)