func (c Client) Get(id string, params *stripe.DisputeParams) (*stripe.Dispute, error) { var body *stripe.RequestValues var commonParams *stripe.Params if params != nil { commonParams = ¶ms.Params body = &stripe.RequestValues{} params.AppendTo(body) } dispute := &stripe.Dispute{} err := c.B.Call("GET", "/disputes/"+id, c.Key, body, commonParams, dispute) return dispute, err }
func (c Client) Update(id string, params *stripe.DisputeParams) (*stripe.Dispute, error) { var body *stripe.RequestValues var commonParams *stripe.Params if params != nil { commonParams = ¶ms.Params body = &stripe.RequestValues{} if params.Evidence != nil { params.Evidence.AppendDetails(body) } params.AppendTo(body) } dispute := &stripe.Dispute{} err := c.B.Call("POST", fmt.Sprintf("/disputes/%v", id), c.Key, body, commonParams, dispute) return dispute, err }