fix typing close #234 (#235)

This commit is contained in:
uwevil 2022-02-25 09:08:14 +01:00 committed by GitHub
parent bf9103c70e
commit fc3ffe5b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ type (
SharedListResponse SharedListResponse
} }
CaptureReqeust struct { CaptureRequest struct {
Note string `json:"note"` Note string `json:"note"`
CaptureType CaptureType `json:"capture_type"` CaptureType CaptureType `json:"capture_type"`
Amount Money `json:"amount"` Amount Money `json:"amount"`
@ -151,7 +151,7 @@ func (c *Client) CancelSubscription(ctx context.Context, subscriptionId, cancelR
// Captures an authorized payment from the subscriber on the subscription. // Captures an authorized payment from the subscriber on the subscription.
// Doc: https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions_capture // Doc: https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions_capture
// Endpoint: POST /v1/billing/subscriptions/{id}/capture // Endpoint: POST /v1/billing/subscriptions/{id}/capture
func (c *Client) CaptureSubscription(ctx context.Context, subscriptionId string, request CaptureReqeust) (*SubscriptionCaptureResponse, error) { func (c *Client) CaptureSubscription(ctx context.Context, subscriptionId string, request CaptureRequest) (*SubscriptionCaptureResponse, error) {
req, err := c.NewRequest(ctx, http.MethodPost, fmt.Sprintf("%s/v1/billing/subscriptions/%s/capture", c.APIBase, subscriptionId), request) req, err := c.NewRequest(ctx, http.MethodPost, fmt.Sprintf("%s/v1/billing/subscriptions/%s/capture", c.APIBase, subscriptionId), request)
response := &SubscriptionCaptureResponse{} response := &SubscriptionCaptureResponse{}
if err != nil { if err != nil {