Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

paypal-rest-api

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paypal-rest-api - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

110

lib/api/types.d.ts

@@ -24,8 +24,2 @@ import { RequestOptions } from "../client";

}
export interface IFraudManagementFiltersDetails {
filter_type: string;
filter_id: string;
name: string;
description: string;
}
export interface IResponse {

@@ -37,7 +31,2 @@ readonly httpStatusCode: number;

}
export interface IFilterOptions {
page_size: number;
start_time: string;
end_time: string;
}
export interface IUpdateRequest {

@@ -48,19 +37,2 @@ op: string;

}
export interface IAmount {
currency: string;
total: string;
details?: {
subtotal?: string;
shipping?: string;
tax?: string;
handling_fee?: string;
shipping_discout?: string;
insurance?: string;
gift_wrap?: string;
};
}
export interface ICurrency {
currency: string;
value: string;
}
export interface ILink {

@@ -71,83 +43,1 @@ href: string;

}
export interface IPayee {
email: string;
merchant_id: string;
payee_display_metadata?: {
email?: string;
display_phone?: IPhone;
brand_name?: string;
};
}
export interface IResource {
readonly id: string;
amount: IAmount;
readonly payment_mode?: string;
readonly state?: string;
readonly reason_code?: string;
readonly protection_eligibility?: string;
readonly protection_eligibility_type?: string;
readonly fmf_details?: IFraudManagementFiltersDetails;
readonly receipt_id?: string;
readonly parent_payment?: string;
readonly processor_response?: any;
readonly create_time?: string;
readonly update_time?: string;
readonly links?: ILink[];
}
export interface ISaleResource extends IResource {
readonly purchase_unit_reference_id?: string;
readonly clearing_time?: string;
readonly payment_hold_status?: string;
readonly payment_hold_reasons?: string[];
readonly transaction_fee?: ICurrency;
readonly exchange_rate?: string;
readonly billing_agreement_id?: string;
}
export interface IAuthorizationResource extends IResource {
readonly valid_until: string;
readonly update_time: string;
readonly reference_id?: string;
}
export interface ICaptureResource extends IResource {
is_final_capture?: boolean;
invoice_number?: string;
transaction_fee?: ICurrency;
}
export interface IRefundResource extends IResource {
reason?: string;
invoice_number?: string;
readonly sale_id?: string;
readonly capture_id?: string;
description?: string;
readonly reason_code?: string;
readonly refund_reason_code?: string;
readonly refund_funding_type?: string;
}
export interface Item {
currency: string;
name: string;
price: string;
quantity: number;
sku?: string;
description?: string;
tax?: string;
url?: string;
}
export interface IRefundRequest {
amount?: IAmount;
description?: string;
refund_source?: string;
reason?: string;
invoice_number?: string;
refund_advice?: boolean;
items?: Item[];
payer_info?: any;
supplementary_data?: any[];
}
export interface IRelatedResources {
sale?: ISaleResource;
authorization?: IAuthorizationResource;
order?: any;
capture?: ICaptureResource;
refund?: IRefundResource;
}

2

lib/index.d.ts

@@ -7,4 +7,6 @@ import { PayPalRestApi } from "./api";

export * from "./oauth";
export * from "./payment";
export * from "./sale";
export * from "./webhook";
export * from "./webhookEvent";
export default PayPalRestApi;

@@ -12,4 +12,6 @@ "use strict";

__export(require("./oauth"));
__export(require("./payment"));
__export(require("./sale"));
__export(require("./webhook"));
__export(require("./webhookEvent"));
exports.default = api_1.PayPalRestApi;

@@ -30,3 +30,3 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
const response = yield this.prototype.api.list(options);
const response = yield this.api.list(options);
return response.body.invoices.map((invoice) => {

@@ -33,0 +33,0 @@ return new this(invoice);

@@ -1,2 +0,3 @@

import { IAddress, ICurrency, ILink, IPhone } from "../../api/types";
import { IAddress, ILink, IPhone } from "../../api/types";
import { ICurrency } from "../../payment/types";
export interface IInvoice {

@@ -3,0 +4,0 @@ allow_tip?: boolean;

import { Schema } from "joi";
import { IApiSchemas } from "../../abstracts/api";
import { ICurrency } from "../../api/types";
import { ICurrency } from "../../payment/types";
export interface IInvoiceRequestSchemas extends IApiSchemas {

@@ -5,0 +5,0 @@ cancel: Schema;

@@ -1,3 +0,2 @@

import { ICurrency } from "../../api/types";
import { IResource } from "../../payment/types";
import { ICurrency, IResource } from "../../payment/types";
export interface ISale extends IResource {

@@ -4,0 +3,0 @@ readonly purchase_unit_reference_id?: string;

{
"name": "paypal-rest-api",
"version": "0.0.14",
"version": "0.0.15",
"description": "A typescript module for integrating with PayPal REST APIs.",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc