paypal-rest-api
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -44,2 +44,3 @@ "use strict"; | ||
} | ||
options.uri = this.paths.create; | ||
options = this.schemaValidate(options, this.schemas.create); | ||
@@ -64,2 +65,3 @@ return this.client.request(options); | ||
} | ||
options.uri = this.paths.list; | ||
options = this.schemaValidate(options, this.schemas.list); | ||
@@ -73,2 +75,3 @@ return this.client.request(options); | ||
} | ||
options.uri = this.paths.search; | ||
options = this.schemaValidate(options, this.schemas.search); | ||
@@ -75,0 +78,0 @@ return this.client.request(options); |
@@ -20,3 +20,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const response = Model.api.get(id, options); | ||
const response = yield this.api.get(id, options); | ||
return new this(response.body); | ||
@@ -23,0 +23,0 @@ }); |
import { Client } from "../client"; | ||
import Invoice from "../invoice"; | ||
import Payment from "../payment"; | ||
import Webhook from "../webhook"; | ||
@@ -15,2 +16,3 @@ import WebhookEvent from "../webhookEvent"; | ||
readonly webhookEvent: typeof WebhookEvent; | ||
readonly payment: typeof Payment; | ||
} |
@@ -6,2 +6,3 @@ "use strict"; | ||
const invoice_1 = require("../invoice"); | ||
const payment_1 = require("../payment"); | ||
const webhook_1 = require("../webhook"); | ||
@@ -17,2 +18,3 @@ const webhookEvent_1 = require("../webhookEvent"); | ||
invoice_1.default.init(this.client); | ||
payment_1.default.init(this.client); | ||
} | ||
@@ -48,3 +50,6 @@ get config() { | ||
} | ||
get payment() { | ||
return payment_1.default; | ||
} | ||
} | ||
exports.PayPalRestApi = PayPalRestApi; |
@@ -63,20 +63,2 @@ import { RequestOptions } from "../client"; | ||
} | ||
export interface IQueryParameters { | ||
count?: number; | ||
start_id?: string; | ||
start_index?: number; | ||
start_time?: string; | ||
end_time?: string; | ||
payee_id?: string; | ||
sort_by?: string; | ||
sort_order?: string; | ||
anchor_type?: string; | ||
page_size?: number; | ||
transaction_id?: string; | ||
event_type?: string; | ||
webhook_id?: string; | ||
page?: number; | ||
total_count_required?: boolean; | ||
status?: string[]; | ||
} | ||
export interface ILink { | ||
@@ -87,25 +69,2 @@ href: string; | ||
} | ||
export interface ITransaction { | ||
reference_id?: string; | ||
amount: IAmount; | ||
description?: string; | ||
item_list?: { | ||
items: Item[]; | ||
shipping_address?: IAddress; | ||
shipping_method?: string; | ||
shipping_phone_number?: string; | ||
}; | ||
payee?: IPayee; | ||
note_to_payee?: string; | ||
custom?: string; | ||
invoice_number?: string; | ||
purchase_order?: string; | ||
soft_descriptor?: string; | ||
payment_options?: { | ||
allowed_payment_method: string; | ||
}; | ||
notify_url?: string; | ||
order_url?: string; | ||
readonly related_resources?: IRelatedResources; | ||
} | ||
export interface IPayee { | ||
@@ -120,23 +79,2 @@ email: string; | ||
} | ||
export interface IPayment { | ||
readonly id?: string; | ||
intent: string; | ||
payer: { | ||
payment_method: string; | ||
}; | ||
transactions: [ITransaction]; | ||
readonly state?: string; | ||
experience_profile_id?: string; | ||
note_to_payer?: string; | ||
redirect_urls?: { | ||
return_url?: string; | ||
cancel_url?: string; | ||
}; | ||
readonly failure_reason?: string; | ||
readonly create_time?: string; | ||
readonly update_time?: string; | ||
readonly links?: ILink[]; | ||
} | ||
export interface IPaymentResponse extends IPayment, IResponse { | ||
} | ||
export interface IResource { | ||
@@ -215,17 +153,1 @@ readonly id: string; | ||
} | ||
export interface IExecuteRequest { | ||
payer_id: string; | ||
} | ||
export interface ISaleResponse extends ISaleResource, IResponse { | ||
} | ||
export interface IAuthorizationResponse extends IAuthorizationResource, IResponse { | ||
} | ||
export interface ICaptureResponse extends ICaptureResource, IResponse { | ||
} | ||
export interface IRefundResponse extends IRefundResource, IResponse { | ||
} | ||
export interface IListResponse extends IResponse { | ||
payments: IPayment[]; | ||
count: number; | ||
next_id: string; | ||
} |
{ | ||
"name": "paypal-rest-api", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "A typescript module for integrating with PayPal REST APIs.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
130839
109
2854