<commit_before>package balanced

import (
	"encoding/json"
	"time"
)

type Verification struct {
	Attempts           int       `json:"attempts"`
	AttemptsRemaining  int       `json:"attempts_remaining"`
	CreatedAt          time.Time `json:"created_at"`
	DepositStatus      string    `json:"deposit_status"`
	ID                 string    `json:"id"`
	UpdatedAt          time.Time `json:"updated_at"`
	VerificationStatus string    `json:"verification_status"`
}

type verificationResponse struct {
	Verifications []*Verification `json:"bank_account_verifications"`
}

//Fetches the verification for a bank account.
func (v *Verification) Fetch() []*BalancedError {
	data, bErrors := apiRequest("GET", nil, "/verifications/"+v.ID)
	if len(bErrors) > 0 {
		return bErrors
	}

	var parsedResponse verificationResponse
	json.Unmarshal(data, &parsedResponse)
	*v = *parsedResponse.Verifications[0]
	return nil
}

//Confirm the trial deposit amounts that were sent to the bank account.
//Upon seeing the verification amounts on their bank account statement, the customer should return to a web form and enter the amounts.
//The amounts entered are compared to the amounts sent to assert valid ownership of the bank account.
//NOTE: If you're sending money to a bank account, known as issuing a credit, you do NOT need to verify the bank account
func (v *Verification) Confirm(amount1, amount2 float64) []*BalancedError {
	m := map[string]int{
		"amount_1": int(round(amount1)),
		"amount_2": int(round(amount2)),
	}
	jsonData, _ := json.Marshal(m)
	data, bErrors := apiRequest("PUT", jsonData, "/verifications/"+v.ID)
	if len(bErrors) > 0 {
		return bErrors
	}

	var parsedResponse verificationResponse
	json.Unmarshal(data, &parsedResponse)
	*v = *parsedResponse.Verifications[0]
	return nil
}
<commit_msg>add callbacks functionality<commit_after>package balanced

import (
	"encoding/json"
	"time"
)

type Verification struct {
	Attempts           int       `json:"attempts,omitempty"`
	AttemptsRemaining  int       `json:"attempts_remaining,omitempty"`
	CreatedAt          time.Time `json:"created_at,omitempty"`
	DepositStatus      string    `json:"deposit_status,omitempty"`
	ID                 string    `json:"id,omitempty"`
	UpdatedAt          time.Time `json:"updated_at,omitempty"`
	VerificationStatus string    `json:"verification_status,omitempty"`
}

type verificationResponse struct {
	Verifications []*Verification `json:"bank_account_verifications"`
}

//Fetches the verification for a bank account.
func (v *Verification) Fetch() []*BalancedError {
	data, bErrors := apiRequest("GET", nil, "/verifications/"+v.ID)
	if len(bErrors) > 0 {
		return bErrors
	}

	var parsedResponse verificationResponse
	json.Unmarshal(data, &parsedResponse)
	*v = *parsedResponse.Verifications[0]
	return nil
}

//Confirm the trial deposit amounts that were sent to the bank account.
//Upon seeing the verification amounts on their bank account statement, the customer should return to a web form and enter the amounts.
//The amounts entered are compared to the amounts sent to assert valid ownership of the bank account.
//NOTE: If you're sending money to a bank account, known as issuing a credit, you do NOT need to verify the bank account
func (v *Verification) Confirm(amount1, amount2 float64) []*BalancedError {
	m := map[string]int{
		"amount_1": int(round(amount1)),
		"amount_2": int(round(amount2)),
	}
	jsonData, _ := json.Marshal(m)
	data, bErrors := apiRequest("PUT", jsonData, "/verifications/"+v.ID)
	if len(bErrors) > 0 {
		return bErrors
	}

	var parsedResponse verificationResponse
	json.Unmarshal(data, &parsedResponse)
	*v = *parsedResponse.Verifications[0]
	return nil
}

{'fraction_non_alphanumeric': 0.10456273764258556, 'fraction_numerical': 0.006518196632265073, 'mean_word_length': 4.408223201174743, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 7, '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': '6294895', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1087, 'n_words': 350}