<commit_before>package com.balancedpayments;

import java.util.Map;

import com.balancedpayments.core.ResourceCollection;
import com.balancedpayments.core.ResourceField;
import com.balancedpayments.core.ResourceQuery;
import com.balancedpayments.errors.FundingInstrumentNotCreditable;
import com.balancedpayments.errors.HTTPError;

public class Card extends FundingInstrument {

    public static final String resource_href = "/cards";

    // fields
    @ResourceField(mutable=true)
    public Map<String, String> address;

    @ResourceField(mutable=true, required=false)
    public String cvv;

    @ResourceField(mutable=true, required=true)
    public Integer expiration_month;

    @ResourceField(mutable=true, required=true)
    public Integer expiration_year;

    @ResourceField(mutable=true)
    public String name;

    @ResourceField(mutable=true, required=true)
    public String number;

    // attributes

    @ResourceField()
    public String avs_postal_match;

    @ResourceField()
    public String avs_result;

    @ResourceField()
    public String avs_street_match;

    @ResourceField()
    public String brand;

    @ResourceField()
    public String cvv_match;

    @ResourceField()
    public String cvv_result;

    @ResourceField()
    public String fingerprint;

    @ResourceField()
    public Boolean is_verified;

    @ResourceField(field="cards.card_holds")
    public CardHold.Collection card_holds;

    @ResourceField(field="cards.customer")
    public Customer customer;

    @ResourceField(field="cards.debits")
    public Debit.Collection debits;

    @ResourceField(field="cards.credits")
    public Credit.Collection credits;


    public static class Collection extends ResourceCollection<Card> {
        public Collection(String uri) {
            super(Card.class, uri);
        }

        @Override
        public Card create(Map<String, Object> payload) throws HTTPError {
            return super.create(payload);
        }
    }

    public Card() {
        super();
    }

    public Card(Map<String, Object> payload) throws HTTPError {
        super(payload);
    }

    public Card(String uri) throws HTTPError {
        super(uri);
    }

    public static ResourceQuery<Card> query() {
        return new ResourceQuery<Card>(Card.class, resource_href);
    }

    @Override
    public void save() throws HTTPError {
        if (id == null && href == null)
            href = resource_href;
        super.save();
    }

    public CardHold hold(Map<String, Object> payload) throws HTTPError {
        return card_holds.create(payload);
    }

    @Override
    public Credit credit(Map<String, Object> payload) throws HTTPError, FundingInstrumentNotCreditable {
        if (credits == null) {
            throw new FundingInstrumentNotCreditable();
        }
        return credits.create(payload);
    }

    @Override
    public Debit debit(Map<String, Object> payload) throws HTTPError {
        return debits.create(payload);
    }
}
<commit_msg>Add new Card resource fields<commit_after>package com.balancedpayments;

import java.util.Map;

import com.balancedpayments.core.ResourceCollection;
import com.balancedpayments.core.ResourceField;
import com.balancedpayments.core.ResourceQuery;
import com.balancedpayments.errors.FundingInstrumentNotCreditable;
import com.balancedpayments.errors.HTTPError;

public class Card extends FundingInstrument {

    public static final String resource_href = "/cards";

    // fields
    @ResourceField(mutable=true)
    public Map<String, String> address;

    @ResourceField(mutable=true, required=false)
    public String cvv;

    @ResourceField(mutable=true, required=true)
    public Integer expiration_month;

    @ResourceField(mutable=true, required=true)
    public Integer expiration_year;

    @ResourceField(mutable=true)
    public String name;

    @ResourceField(mutable=true, required=true)
    public String number;

    // attributes

    @ResourceField()
    public String avs_postal_match;

    @ResourceField()
    public String avs_result;

    @ResourceField()
    public String avs_street_match;

    @ResourceField()
    public String bank_name;

    @ResourceField()
    public String brand;

    @ResourceField()
    public Boolean can_credit;

    @ResourceField()
    public Boolean can_debit;

    @ResourceField()
    public String category;

    @ResourceField()
    public String cvv_match;

    @ResourceField()
    public String cvv_result;

    @ResourceField()
    public String fingerprint;

    @ResourceField()
    public Boolean is_verified;

    @ResourceField()
    public String type;

    @ResourceField(field="cards.card_holds")
    public CardHold.Collection card_holds;

    @ResourceField(field="cards.customer")
    public Customer customer;

    @ResourceField(field="cards.debits")
    public Debit.Collection debits;

    @ResourceField(field="cards.credits")
    public Credit.Collection credits;


    public static class Collection extends ResourceCollection<Card> {
        public Collection(String uri) {
            super(Card.class, uri);
        }

        @Override
        public Card create(Map<String, Object> payload) throws HTTPError {
            return super.create(payload);
        }
    }

    public Card() {
        super();
    }

    public Card(Map<String, Object> payload) throws HTTPError {
        super(payload);
    }

    public Card(String uri) throws HTTPError {
        super(uri);
    }

    public static ResourceQuery<Card> query() {
        return new ResourceQuery<Card>(Card.class, resource_href);
    }

    @Override
    public void save() throws HTTPError {
        if (id == null && href == null)
            href = resource_href;
        super.save();
    }

    public CardHold hold(Map<String, Object> payload) throws HTTPError {
        return card_holds.create(payload);
    }

    @Override
    public Credit credit(Map<String, Object> payload) throws HTTPError, FundingInstrumentNotCreditable {
        if (credits == null) {
            throw new FundingInstrumentNotCreditable();
        }
        return credits.create(payload);
    }

    @Override
    public Debit debit(Map<String, Object> payload) throws HTTPError {
        return debits.create(payload);
    }
}

{'fraction_non_alphanumeric': 0.09025673736246213, 'fraction_numerical': 0.0, 'mean_word_length': 3.1536423841059604, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '243519', 'n_tokens_mistral': 1770, 'n_tokens_neox': 1709, 'n_words': 422}