@hyperse/paypal-node-sdk
Version:
NodeJS SDK for PayPal Checkout APIs
27 lines (26 loc) • 1.3 kB
TypeScript
import { HttpRequestBase } from '../core/HttpRequestBase.js';
import { type BaseOrderHeaders, type PaymentSource } from '../types/type-order.js';
export type OrdersAuthorizeRequestBody = {
payment_source: PaymentSource;
};
export interface OrdersAuthorizeRequestHeaders extends BaseOrderHeaders {
'PayPal-Client-Metadata-Id'?: string;
'PayPal-Request-Id'?: string;
Prefer?: string;
}
/**
* Authorizes payment for an order. The response shows authorization details.
* @see {@link https://developer.paypal.com/api/orders/v2/#orders_authorize}
*/
export declare class OrdersAuthorizeRequest extends HttpRequestBase<OrdersAuthorizeRequestHeaders, OrdersAuthorizeRequestBody> {
constructor(orderId: string);
payPalClientMetadataId(payPalClientMetadataId: string): this;
payPalRequestId(payPalRequestId: string): this;
/**
* 1. return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
* 2. return=representation. The server returns a complete resource representation, including the current state of the resource.
* @default `return=minimal`
*/
prefer(prefer: string): this;
requestBody(orderActionRequest: any): this;
}