代码拉取完成,页面将自动刷新
package stripe
import "encoding/json"
// EphemeralKeyParams is the set of parameters that can be used when creating
// an ephemeral key.
// For more details see https://stripe.com/docs/api#ephemeral_keys.
type EphemeralKeyParams struct {
Params `form:"*"`
Customer *string `form:"customer"`
StripeVersion *string `form:"-"` // This goes in the `Stripe-Version` header
}
// EphemeralKey is the resource representing a Stripe ephemeral key.
// For more details see https://stripe.com/docs/api#ephemeral_keys.
type EphemeralKey struct {
AssociatedObjects []struct {
ID string `json:"id"`
Type string `json:"type"`
} `json:"associated_objects"`
Created int64 `json:"created"`
Expires int64 `json:"expires"`
ID string `json:"id"`
Livemode bool `json:"livemode"`
// RawJSON is provided so that it may be passed back to the frontend
// unchanged. Ephemeral keys are issued on behalf of another client which
// may be running a different version of the bindings and thus expect a
// different JSON structure. This ensures that if the structure differs
// from the version of these bindings, we can still pass back a compatible
// key.
RawJSON []byte `json:"-"`
}
// UnmarshalJSON handles deserialization of an EphemeralKey.
// This custom unmarshaling is needed because we need to store the
// raw JSON on the object so it may be passed back to the frontend.
func (e *EphemeralKey) UnmarshalJSON(data []byte) error {
type ephemeralKey EphemeralKey
var ee ephemeralKey
err := json.Unmarshal(data, &ee)
if err == nil {
*e = EphemeralKey(ee)
}
e.RawJSON = data
return nil
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。