package me.pagarme.factory;

import java.util.HashMap;
import java.util.Map;
import me.pagar.model.Customer;
import me.pagar.model.Subscription;

public class SubscriptionFactory {
    private final Map<String, Object> METADATA =  new HashMap<String, Object>();
    private final String SOFTDESCRIPTOR = "some description";

    public Subscription createCreditCardSubscription(String planId, String cardId, Customer customer){
        Subscription subscription = new Subscription();
        subscription.setCreditCardSubscriptionWithCardId(planId, cardId, customer);
        METADATA.put("some_metadata", "123456");
        subscription.setMetadata(METADATA);
        subscription.setSoftDescriptor(SOFTDESCRIPTOR);
        return subscription;
    }

    public Subscription createBoletoSubscription(String planId, Customer customer){
        Subscription subscription = new Subscription();
        subscription.setBoletoSubscription(planId, customer);
        return subscription;
    }
}

@@ -304,22 +304,15 @@
  %22so
-me description
+ft_test
 %22;%0A%0A

Fix soft descriptor test