예제 #1
0
func (c Client) New(params *stripe.ApplePayDomainParams) (*stripe.ApplePayDomain, error) {
	body := &stripe.RequestValues{}
	body.Add("domain_name", params.DomainName)

	params.AppendTo(body)

	domain := &stripe.ApplePayDomain{}
	err := c.B.Call("POST", "/apple_pay/domains", c.Key, body, &params.Params, domain)
	return domain, err
}
예제 #2
0
func (c Client) Get(id string, params *stripe.ApplePayDomainParams) (*stripe.ApplePayDomain, error) {
	var body *stripe.RequestValues
	var commonParams *stripe.Params

	if params != nil {
		body = &stripe.RequestValues{}
		commonParams = &params.Params
		params.AppendTo(body)
	}

	domain := &stripe.ApplePayDomain{}
	err := c.B.Call("GET", "/apple_pay/domains/"+id, c.Key, body, commonParams, domain)

	return domain, err
}