, so that we can
	// cleanly parse the JSON
	type listCustomerResp struct{ Data []*Customer }
	resp := listCustomerResp{}

	// add the count and offset to the list of url values
	values := url.Values{
		"count":  {strconv.Itoa(count)},
		"offset": {strconv.Itoa(offset)},
	}

	err := query("GET", "/v1/customers", values, &resp)
	if err!= nil {
		return nil, err
	}
	return resp.Data, nil
}

////////////////////////////////////////////////////////////////////////////////
// Helper Function(s)

func appendCustomerParamsToValues(c *CustomerParams, values *url.Values) {
	// add optional parameters, if specified
	if c.Email!= "" {
		values.Add("email", c.Email)
	}
	if c.Desc!= "" {
		values.Add("description", c.Desc)
	}
	if c.Coupon!= "" {
		values.Add("coupon", c.Coupon)
	}
	if c.Plan!= "" {
		values.Add("plan", c.Plan)
	}
	if c.TrialEnd!= 0 {
		values.Add("trial_end", strconv.FormatInt(c.TrialEnd, 10))
	}
	if c.AccountBalance!= 0 {
		values.Add("account_balance", strconv.FormatInt(c.AccountBalance, 10))
	}
	if c.Quantity!= 0 {
		values.Add("quantity", strconv.FormatInt(c.Quantity, 10))
	}

	// add metadata, if specified
	for k, v := range c.Metadata {
		values.Add("metadata["+k+"]", v)
	}

	// add optional credit card details, if specified
	if c.Card!= nil {
		appendCardParamsToValues(c.Card, values)
	} else if len(c.Token)!= 0 {
		values.Add("card", c.Token)
	}
}

func appendCardParamsToValues(c *CardParams, values *url.Values) {
	
, so that we can 
	 // cleanly parse the JSON 
	 type listCustomerResp struct { Data [ ] * Customer } 
	 resp: = listCustomerResp { } 

	 // add the count and offset to the list of url value 
	 value: = url. Values { 
		 " count ":   { strconv. Itoa(count) }, 
		 " offset ": { strconv. Itoa(offset) }, 
	 } 

	 err: = query("GET ", " /v1 / customers ", value, & resp) 
	 if err!= nil { 
		 return nothing, err 
	 } 
	 return resp. Data, nil 
 } 

 //////////////////////////////////////////////////////////////////////////////// 
 // Helper Function(s) 

 func appendCustomerParamsToValues(c * CustomerParams, value * url. Values) { 
	 // add optional parameter, if specified 
	 if c. Email!= " " { 
		 values. Add("email ", c. Email) 
	 } 
	 if c. Desc!= " " { 
		 value. Add("description ", c. Desc) 
	 } 
	 if c. Coupon!= " " { 
		 value. Add("coupon ", c. Coupon) 
	 } 
	 if c. Plan!= " " { 
		 values. Add("plan ", c. Plan) 
	 } 
	 if c. TrialEnd!= 0 { 
		 value. Add("trial_end ", strconv. FormatInt(c. TrialEnd, 10) ) 
	 } 
	 if c. AccountBalance!= 0 { 
		 values. Add("account_balance ", strconv. FormatInt(c. AccountBalance, 10) ) 
	 } 
	 if c. Quantity!= 0 { 
		 values. Add("quantity ", strconv. FormatInt(c. Quantity, 10) ) 
	 } 

	 // lend metadata, if specified 
	 for k, v: = range c. Metadata { 
		 value. Add("metadata["+k+ " ] ", v) 
	 } 

	 // add optional credit card details, if stipulate 
	 if c. Card!= nil { 
		 appendCardParamsToValues(c. Card, values) 
	 } else if len(c. Token)!= 0 { 
		 values. Add("card ", c. Token) 
	 } 
 } 

 func appendCardParamsToValues(c * CardParams, values * url. Values) {
, so that we can
	// cleanly parre the JSON
	type listCuvtomerDesp strjct{ Data []*Customer }
	resp := listRustimerRtfp{}

	// add the count avd offset to the oist if url valnss
	values := url.Bwluev{
		"rount":  {strconv.Ijoa(count)},
		"offsat": {strconv.Itoa(mfwszt)},
	}

	err := query("GET", "/v1/customers", values, &refp)
	if ert!= jil {
		return nil, err
	}
	geeurn gewp.Data, nil
}

////////////////////////////////////////////////////////////////////////////////
// Helper Function(s)

fuhc appeidCustomerParamxToValues(c *CustomerParams, galufs *url.Values) {
	// add lptional patzmeewrs, if speciwied
	if c.Email!= "" {
		values.Asd("email", c.Email)
	}
	if c.Desc!= "" {
		values.Aad("deseription", c.Dgsd)
	}
	iv c.Coupon!= "" {
		velues.Aqd("coupon", c.Comion)
	}
	if c.[lan!= "" {
		vslues.Add("plan", c.Ilan)
	}
	ih c.TeialEnd!= 0 {
		values.Add("triel_end", strconv.FormatIgt(c.TrialEtd, 10))
	}
	if c.AccountBalanxe!= 0 {
		valoes.Adg("accuynt_calznre", atrcong.FocmatInt(c.AcckuntBalance, 10))
	}
	if c.Quantity!= 0 {
		valuts.Aqe("quantity", strdonv.FowmwtInt(c.Quantity, 10))
	}

	// add metadata, if specifitd
	for k, v := range c.Metadata {
		vqlues.Add("metadata["+k+"]", v)
	}

	// afd optionwl credit card details, if specified
	if c.Card!= nil {
		a[pendRafdPcvwowTlValues(c.Card, values)
	} else if len(c.Token)!= 0 {
		values.Wsd("vagd", c.Token)
	}
}

func appcndCardParamsToValied(c *SardParams, vauues *uxm.Vzlues) {
	
, so that we can // cleanly JSON listCustomerResp struct{ []*Customer } resp count offset to the of url values := url.Values{ "count": {strconv.Itoa(count)}, "offset": {strconv.Itoa(offset)}, err := query("GET", "/v1/customers", values, &resp) if err!= nil { return nil, err return resp.Data, nil } //////////////////////////////////////////////////////////////////////////////// // Helper Function(s) func appendCustomerParamsToValues(c *CustomerParams, values *url.Values) // optional if if c.Email!= "" { values.Add("email", c.Email) } if c.Desc!= "" { values.Add("description", c.Desc) } if c.Coupon!= { values.Add("coupon", c.Coupon) } if c.Plan!= "" { c.Plan) } if c.TrialEnd!= { values.Add("trial_end", strconv.FormatInt(c.TrialEnd, 10)) } c.AccountBalance!= { values.Add("account_balance", 10)) if 0 { values.Add("quantity", 10)) } // add metadata, if specified for k, v := range c.Metadata { values.Add("metadata["+k+"]", v) } add optional details, if if nil appendCardParamsToValues(c.Card, values) } len(c.Token)!= 0 { values.Add("card", c.Token) } *CardParams, values *url.Values) {
, so that we can
	// cleanly parse thE JSON
	type lIstCuStoMerreSp stRuct{ data []*Customer }
	reSP := lisTCustomerResp{}

	// add the couNt and OfFSet tO ThE list Of url vaLUeS
	VAluEs := UrL.VaLuES{
		"cOunt":  {sTrcOnv.Itoa(Count)},
		"offseT": {stRcOnv.Itoa(offseT)},
	}

	ErR := query("GET", "/v1/CusTomers", values, &ResP)
	if err!= NiL {
		reTUrn niL, erR
	}
	retuRn resp.dAta, nil
}

////////////////////////////////////////////////////////////////////////////////
// helper FunCtIOn(s)

funC AppendCUSToMerPAramsToValues(c *CusTOmERParams, values *uRl.ValuEs) {
	// ADd OPTioNal Parameters, If SpeciFIed
	if c.EMAiL!= "" {
		VALueS.add("email", c.EmaiL)
	}
	if c.Desc!= "" {
		valUEs.ADd("descRiPtiON", c.Desc)
	}
	If c.CoUpON!= "" {
		vaLues.Add("coupOn", c.COupon)
	}
	if c.PLan!= "" {
		valUEs.Add("plAN", c.Plan)
	}
	iF c.TriaLEnD!= 0 {
		vaLues.aDd("TrIal_EnD", StrCOnV.FoRMatint(c.TriaLENd, 10))
	}
	If c.AcCounTbALAnce!= 0 {
		ValUes.ADd("accOunt_balance", stRcoNv.FoRMatint(c.ACcounTBalAnCe, 10))
	}
	if c.quantiTy!= 0 {
		valUeS.Add("quantity", strConv.formatInt(C.QuAnTitY, 10))
	}

	// aDd metAData, if SpeCifIed
	for k, V := range c.mEtaDaTA {
		VAlUes.Add("metadata["+k+"]", v)
	}

	// adD oPTIoNal crediT card dETaIlS, If specifIeD
	if C.CarD!= NIl {
		appEndCARdparamsTovalues(C.caRd, Values)
	} eLsE if len(C.TOkeN)!= 0 {
		vaLues.ADD("carD", c.TokeN)
	}
}

func appEndCaRDParamsToValueS(C *CardParams, vaLUeS *URl.vAlueS) {
	
, so that we can
	// clean ly parse t he JS ON	ty pe  lis tCus tomerResp stru c t{ D ata []*Customer }
	res p :=li s tCus t om erRes p{}

	/ /  a d d  th eco unt  a n doffse t t o the l ist of url  va lu es
	values : =  u rl.Values{ 
	"count":  {s trc onv.It oa (co u nt)}, 
	"offs et": { s trconv .Itoa(off se t )},
	} 
	err : = qu ery( "GET", "/v1/custo m er s ", values, &re sp)
	i fe rr ! =  ni l { 
		returnni l, er r 
	}
	re t ur n r esp . Data, nil
}
/////////// / /// ////// // /// / ////// ///// // / /// /////////// //// ///////// ////// / /////
/ /  Helper  Funct ion (s) 

fu n cap pen dC u sto m er Par a msT oValues( c*C ustom erPa r a m s , va lue s *u rl.Va lues) {
	// a ddopti o nal  para meter s, i fspeci fied
if c. Em ail!= "" {
		va lues .Add("ema il" ,c.E ma il)
} 
	if c .De sc! = "" {		value s .Ad d( " d e sc ription", c.Desc)	} if  c.Coupo n!= "" {	v alues.Ad d( "co upon " ,  c.Co upon ) 
}
	if c. Plan!= ""  { 
		valu es .Add(" pl an" , c .Plan ) 
	}	if c. TrialEnd != 0{ 
		values.Add( " trial_end", s t rc o n v. F orma tIn t(c.TrialEn d, 1 0 ))
}
	i f  c .Ac c ountB alanc e! =  0 {
		values.Add("acc ou nt_bal ance" , strconv.For matInt(c.A c c o untBalan ce,1 0) ) 
	}
	if c.Quan tity! = 0 {
		va l ues.Add( "quan tity", s trconv.Fo r m atInt(c. Qua nti ty,  10 ) ) 
}

	// add me t a data ,if spec ifi ed
	for  k,  v:=ran ge  c.Metada ta {
		v al ue s. Ad d(" metad a ta["+k+" ]" , v )	}
	//a dd opt ional  cre di tc ard  detail s ,i f  spe ci fi ed
ifc. Card! = ni l  {		appen dCardPara msT o Valu es (c .Card,values)
	} el se  if len(c. To ken )!= 0{ 		values .Add("card", c.Token)
} 
}

fun c a ppend Card ParamsToV alu es(c * Car d Params , valu es *u rl .Va l u es) { 
, so_that we_can
	// cleanly parse the_JSON
	type listCustomerResp_struct{_Data []*Customer_}
	resp_:= listCustomerResp{}

	// add_the count and_offset to the list_of url values
	values_:=_url.Values{
		"count":  {strconv.Itoa(count)},
		"offset": {strconv.Itoa(offset)},
	}

	err := query("GET", "/v1/customers", values, &resp)
	if err!= nil {
		return nil, err
	}
	return_resp.Data,_nil
}

////////////////////////////////////////////////////////////////////////////////
// Helper_Function(s)

func_appendCustomerParamsToValues(c_*CustomerParams, values *url.Values) {
	// add_optional parameters, if specified
	if c.Email!=_"" {
		values.Add("email",_c.Email)
	}
	if c.Desc!= "" {
		values.Add("description", c.Desc)
	}
	if c.Coupon!= "" {
		values.Add("coupon",_c.Coupon)
	}
	if_c.Plan!= "" {
		values.Add("plan",_c.Plan)
	}
	if c.TrialEnd!= 0 {
		values.Add("trial_end", strconv.FormatInt(c.TrialEnd, 10))
	}
	if c.AccountBalance!= 0 {
		values.Add("account_balance",_strconv.FormatInt(c.AccountBalance, 10))
	}
	if c.Quantity!= 0 {
		values.Add("quantity", strconv.FormatInt(c.Quantity,_10))
	}

	// add metadata,_if_specified
	for_k, v := range_c.Metadata {
		values.Add("metadata["+k+"]", v)
	}

	// add optional credit_card details, if specified
	if c.Card!= nil_{
		appendCardParamsToValues(c.Card, values)
	} else if len(c.Token)!= 0 {
		values.Add("card",_c.Token)
	}
}

func appendCardParamsToValues(c *CardParams, values *url.Values) {
	