paypal-rest
Advanced tools
Comparing version 1.2.1-ALPHA to 1.3.0-ALPHA
@@ -21,2 +21,1 @@ import { BillingCycleProps, BillingCycleTenureType } from "../types/BillingCycle"; | ||
} | ||
//# sourceMappingURL=BillingCycleBuilder.d.ts.map |
@@ -11,2 +11,1 @@ import { FrequencyBuilderJSON, FrequencyBuilderProps, IntervalUnit } from "../types/Frequency"; | ||
} | ||
//# sourceMappingURL=FrequencyBuilder.d.ts.map |
@@ -20,2 +20,1 @@ import { Amount, CategoryType, ItemsBuilderJSON, ItemsBuilderProps } from "../types/Order"; | ||
} | ||
//# sourceMappingURL=ItemsBuilder.d.ts.map |
@@ -17,2 +17,1 @@ import { PaymentPreferencesFeeFailureAction, PaymentPreferencesProps } from "../types/PaymentPreferences"; | ||
} | ||
//# sourceMappingURL=PaymentPreferencesBuilder.d.ts.map |
@@ -16,2 +16,1 @@ import { PricingModel, PricingSchemeBuilderProps, PricingSchemeJSON, PricingSchemeTiers } from "../types/PricingScheme"; | ||
} | ||
//# sourceMappingURL=PricingSchemeBuilder.d.ts.map |
@@ -21,2 +21,1 @@ import { ProductBuilderProps, ProductCategory, ProductType } from "../types/Product"; | ||
} | ||
//# sourceMappingURL=ProductBuilder.d.ts.map |
@@ -13,2 +13,1 @@ import { GetProductDetailsJSON, ProductCategory } from "../types/Product"; | ||
} | ||
//# sourceMappingURL=ProductUpdateBuilder.d.ts.map |
@@ -17,2 +17,1 @@ import { acceptedCurrencyCodes, Amount, CurrencyCodes, PurchaseUnitBuilderJSON } from "../types/Order"; | ||
} | ||
//# sourceMappingURL=PurchaseUnitBuilder.d.ts.map |
import UnitBuilder from "./UnitBuilder"; | ||
import { ApplicationContext, SubscriptionsBuilderProps } from "../types/Subscriptions"; | ||
import { ApplicationContext, SubscriptionsBuilderProps, SubscriptionsInlinePlanBuilderProps } from "../types/Subscriptions"; | ||
import { PurchaseUnitBuilderProps } from "../types/Order"; | ||
import SubscriptionInlinePlanBuilder from "./SubscriptionInlinePlanBuilder"; | ||
export default class SubscriptionBuilder { | ||
@@ -11,2 +12,3 @@ private plan_id?; | ||
private application_context?; | ||
private plan?; | ||
constructor(data?: SubscriptionsBuilderProps); | ||
@@ -19,2 +21,3 @@ setPlanId(id: string): this; | ||
setApplicationContext(context: ApplicationContext): this; | ||
setPlan(plan: SubscriptionInlinePlanBuilder | SubscriptionsInlinePlanBuilderProps): this; | ||
toJSON(): Readonly<SubscriptionsBuilderProps<'JSON'>>; | ||
@@ -24,2 +27,1 @@ private validate; | ||
} | ||
//# sourceMappingURL=SubscriptionBuilder.d.ts.map |
@@ -5,2 +5,3 @@ "use strict"; | ||
const Errors_1 = require("../Manager/Errors"); | ||
const SubscriptionInlinePlanBuilder_1 = require("./SubscriptionInlinePlanBuilder"); | ||
const ALLOWED_SHIPPING_PREFERENCE = ['GET_FROM_FILE', 'NO_SHIPPING', 'SET_PROVIDED_ADDRESS']; | ||
@@ -18,2 +19,4 @@ const ALLOWED_USER_ACTIONS = ['CONTINUE', 'SUBSCRIBE_NOW']; | ||
this.application_context = data === null || data === void 0 ? void 0 : data.application_context; | ||
if (data === null || data === void 0 ? void 0 : data.plan) | ||
this.plan = data.plan instanceof SubscriptionInlinePlanBuilder_1.default ? data.plan : new SubscriptionInlinePlanBuilder_1.default(data.plan); | ||
} | ||
@@ -53,4 +56,8 @@ setPlanId(id) { | ||
} | ||
setPlan(plan) { | ||
this.plan = plan instanceof SubscriptionInlinePlanBuilder_1.default ? plan : new SubscriptionInlinePlanBuilder_1.default(plan); | ||
return this; | ||
} | ||
toJSON() { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
this.validate(); | ||
@@ -63,3 +70,4 @@ return Object.freeze({ | ||
shipping_amount: (_b = this.shipping_amount) === null || _b === void 0 ? void 0 : _b.toJSON(), | ||
application_context: this.application_context | ||
application_context: this.application_context, | ||
plan: (_c = this.plan) === null || _c === void 0 ? void 0 : _c.toJSON() | ||
}); | ||
@@ -79,2 +87,4 @@ } | ||
this.verifyApplicationContextValues(this.application_context); | ||
if (this.plan) | ||
this.plan.toJSON(); | ||
(_a = this.shipping_amount) === null || _a === void 0 ? void 0 : _a.toJSON(); | ||
@@ -81,0 +91,0 @@ } |
@@ -1,17 +0,11 @@ | ||
import { SubscriptionsPlanBuilderProps, SubscriptionsPlanJSON, SubscriptionsStatus, Taxes } from "../types/Subscriptions"; | ||
import { SubscriptionsPlanBuilderProps, SubscriptionsPlanJSON, SubscriptionsStatus } from "../types/Subscriptions"; | ||
import ProductBuilder from "./ProductBuilder"; | ||
import BillingCycleBuilder from "./BillingCycleBuilder"; | ||
import PaymentPreferencesBuilder from "./PaymentPreferencesBuilder"; | ||
import { BillingCycleProps } from "../types/BillingCycle"; | ||
import { PaymentPreferencesProps } from "../types/PaymentPreferences"; | ||
import { ProductUpdateBuilder } from "./ProductUpdateBuilder"; | ||
export default class SubscriptionPlanBuilder { | ||
import SubscriptionInlinePlanBuilder from "./SubscriptionInlinePlanBuilder"; | ||
export default class SubscriptionPlanBuilder extends SubscriptionInlinePlanBuilder { | ||
private product_id?; | ||
private name?; | ||
private billing_cycles; | ||
private payment_preferences?; | ||
private status?; | ||
private description?; | ||
private quantity_supported?; | ||
private taxes?; | ||
constructor(data?: Partial<SubscriptionsPlanBuilderProps>); | ||
@@ -23,10 +17,5 @@ setProductId(product_id: string | ProductBuilder | ProductUpdateBuilder): SubscriptionPlanBuilder; | ||
setQuantitySupported(quantity_supported: boolean): SubscriptionPlanBuilder; | ||
setTaxes(taxes: Taxes): SubscriptionPlanBuilder; | ||
addBillingCycle(...billing_cycle: (BillingCycleBuilder | BillingCycleProps)[]): SubscriptionPlanBuilder; | ||
setBillingCycles(...billing_cycles: (BillingCycleBuilder | BillingCycleProps)[]): SubscriptionPlanBuilder; | ||
setPaymentPreferences(payment_preferences: PaymentPreferencesBuilder | PaymentPreferencesProps): SubscriptionPlanBuilder; | ||
create(): Promise<SubscriptionsPlanJSON>; | ||
toJSON(): Readonly<SubscriptionsPlanBuilderProps<'JSON'>>; | ||
private validate; | ||
protected validate(): void; | ||
} | ||
//# sourceMappingURL=SubscriptionPlanBuilder.d.ts.map |
@@ -13,11 +13,10 @@ "use strict"; | ||
const ProductBuilder_1 = require("./ProductBuilder"); | ||
const BillingCycleBuilder_1 = require("./BillingCycleBuilder"); | ||
const PaymentPreferencesBuilder_1 = require("./PaymentPreferencesBuilder"); | ||
const Errors_1 = require("../Manager/Errors"); | ||
const ProductUpdateBuilder_1 = require("./ProductUpdateBuilder"); | ||
const Subscriptions_1 = require("../Functions/Subscriptions"); | ||
const SubscriptionInlinePlanBuilder_1 = require("./SubscriptionInlinePlanBuilder"); | ||
const ALLOWS_STATUS = ["ACTIVE", "INACTIVE", "CREATED"]; | ||
class SubscriptionPlanBuilder { | ||
class SubscriptionPlanBuilder extends SubscriptionInlinePlanBuilder_1.default { | ||
constructor(data) { | ||
var _a; | ||
super(data); | ||
if (data === null || data === void 0 ? void 0 : data.product_id) { | ||
@@ -27,10 +26,5 @@ this.product_id = (data.product_id instanceof ProductBuilder_1.default) || (data.product_id instanceof ProductUpdateBuilder_1.ProductUpdateBuilder) ? data.product_id.toJSON().id : data.product_id; | ||
this.name = data === null || data === void 0 ? void 0 : data.name; | ||
this.billing_cycles = ((_a = data === null || data === void 0 ? void 0 : data.billing_cycles) === null || _a === void 0 ? void 0 : _a.map(billingCycle => { | ||
return (billingCycle instanceof BillingCycleBuilder_1.default) ? billingCycle : new BillingCycleBuilder_1.default(billingCycle); | ||
})) || []; | ||
this.payment_preferences = ((data === null || data === void 0 ? void 0 : data.payment_preferences) instanceof PaymentPreferencesBuilder_1.default) ? data.payment_preferences : new PaymentPreferencesBuilder_1.default(data === null || data === void 0 ? void 0 : data.payment_preferences); | ||
this.status = data === null || data === void 0 ? void 0 : data.status; | ||
this.description = data === null || data === void 0 ? void 0 : data.description; | ||
this.quantity_supported = data === null || data === void 0 ? void 0 : data.quantity_supported; | ||
this.taxes = data === null || data === void 0 ? void 0 : data.taxes; | ||
} | ||
@@ -66,26 +60,2 @@ setProductId(product_id) { | ||
} | ||
setTaxes(taxes) { | ||
this.taxes = taxes; | ||
return this; | ||
} | ||
addBillingCycle(...billing_cycle) { | ||
if (billing_cycle.length + this.billing_cycles.length > 12) | ||
throw new Errors_1.default("Invalid billing_cycle the length must be less than 12."); | ||
this.billing_cycles.push(...billing_cycle.map(billingCycle => { | ||
return (billingCycle instanceof BillingCycleBuilder_1.default) ? billingCycle : new BillingCycleBuilder_1.default(billingCycle); | ||
})); | ||
return this; | ||
} | ||
setBillingCycles(...billing_cycles) { | ||
if (billing_cycles.length > 12) | ||
throw new Errors_1.default("Invalid billing_cycle the length must be less than 12."); | ||
this.billing_cycles = billing_cycles.map(billingCycle => { | ||
return (billingCycle instanceof BillingCycleBuilder_1.default) ? billingCycle : new BillingCycleBuilder_1.default(billingCycle); | ||
}); | ||
return this; | ||
} | ||
setPaymentPreferences(payment_preferences) { | ||
this.payment_preferences = (payment_preferences instanceof PaymentPreferencesBuilder_1.default) ? payment_preferences : new PaymentPreferencesBuilder_1.default(payment_preferences); | ||
return this; | ||
} | ||
create() { | ||
@@ -102,9 +72,9 @@ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { | ||
status: this.status, | ||
billing_cycles: this.billing_cycles.map(billingCycle => { | ||
billing_cycles: super.billing_cycles.map(billingCycle => { | ||
return billingCycle.toJSON(); | ||
}), | ||
payment_preferences: this.payment_preferences.toJSON(), | ||
payment_preferences: super.payment_preferences.toJSON(), | ||
description: this.description, | ||
quantity_supported: this.quantity_supported, | ||
taxes: this.taxes | ||
taxes: super.taxes | ||
}; | ||
@@ -118,12 +88,7 @@ } | ||
throw new Errors_1.default("Invalid name the length must be between 1 and 127 characters."); | ||
if (!this.billing_cycles.length) | ||
super.validate(); | ||
if (!super.billing_cycles.length) | ||
throw new Errors_1.default("billing_cycle are required."); | ||
if (this.billing_cycles.length > 12) | ||
throw new Errors_1.default("Invalid billing_cycle the length must be less than 12."); | ||
if (!this.payment_preferences) | ||
if (!super.payment_preferences) | ||
throw new Errors_1.default("payment_preferences are required."); | ||
this.payment_preferences.toJSON(); | ||
this.billing_cycles.forEach(billingCycle => { | ||
billingCycle.toJSON(); | ||
}); | ||
if (this.status && !ALLOWS_STATUS.includes(this.status)) | ||
@@ -135,8 +100,4 @@ throw new Errors_1.default(`Invalid status the status must be one of the following: ${ALLOWS_STATUS.join(", ")}`); | ||
throw new Errors_1.default("Invalid quantity_supported the quantity_supported must be a boolean."); | ||
if (this.taxes) { | ||
if (!this.taxes.percentage || !/^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$/.test(this.taxes.percentage.toString())) | ||
throw new Errors_1.default("Invalid taxes.percentage the taxes.percentage must be a number."); | ||
} | ||
} | ||
} | ||
exports.default = SubscriptionPlanBuilder; |
@@ -12,2 +12,1 @@ import { CurrencyCodes, PurchaseUnitBuilderProps, UnitBuilderJSON, acceptedCurrencyCodes } from "../types/Order"; | ||
} | ||
//# sourceMappingURL=UnitBuilder.d.ts.map |
@@ -13,3 +13,3 @@ "use strict"; | ||
setPrice(price) { | ||
if (!price || isNaN(price) || price < 0) | ||
if (typeof price !== 'number' || isNaN(price) || price < 0) | ||
throw new Errors_1.default("The value field is required and should be a positive number."); | ||
@@ -16,0 +16,0 @@ if (this.currency_code && floatingCurrency.includes(this.currency_code) && |
export default function auth(): Promise<boolean>; | ||
//# sourceMappingURL=Auth.d.ts.map |
@@ -13,2 +13,1 @@ import { ConfigProps } from "../types/Config"; | ||
export declare function setAccessToken(access_token: string, expireIn: number): void; | ||
//# sourceMappingURL=Config.d.ts.map |
import { OrderManagerResponse, OrderProps } from "../types/Order"; | ||
export declare function order({ purchase_units, intent, paypal }: OrderProps): Promise<OrderManagerResponse>; | ||
export declare function captureOrder(id: string): Promise<unknown>; | ||
//# sourceMappingURL=Order.d.ts.map |
@@ -8,2 +8,1 @@ import ProductBuilder from "../Builders/ProductBuilder"; | ||
export declare function updateProductDetails(productId: string, lastProduct: UpdateProductType, newProduct: UpdateProductType): Promise<unknown>; | ||
//# sourceMappingURL=Products.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { SubscriptionsBuilderProps, SubscriptionsPlanBuilderProps, SubscriptionsPlanJSON, SubscriptionsPlansListJSON, SubscriptionsPlansListProps } from "../types/Subscriptions"; | ||
import { SubscriptionFieldResponse, SubscriptionsBuilderProps, SubscriptionsPlanBuilderProps, SubscriptionsPlanJSON, SubscriptionsPlansListJSON, SubscriptionsPlansListProps } from "../types/Subscriptions"; | ||
import SubscriptionBuilder from "../Builders/SubscriptionBuilder"; | ||
@@ -7,2 +7,2 @@ export declare function createSubscriptionPlan(subscription: SubscriptionsPlanBuilderProps<'JSON'>): Promise<SubscriptionsPlanJSON>; | ||
export declare function createSubscription(subscription: SubscriptionsBuilderProps<'JSON'> | SubscriptionBuilder): Promise<any>; | ||
//# sourceMappingURL=Subscriptions.d.ts.map | ||
export declare function getSubscription(subscriptionId: string, fields?: SubscriptionFieldResponse): Promise<any>; |
@@ -12,3 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createSubscription = exports.getSubscriptionPlan = exports.listSubscriptionPlan = exports.createSubscriptionPlan = void 0; | ||
exports.getSubscription = exports.createSubscription = exports.getSubscriptionPlan = exports.listSubscriptionPlan = exports.createSubscriptionPlan = void 0; | ||
const RequestManager_1 = require("../Manager/RequestManager"); | ||
@@ -99,1 +99,22 @@ const Errors_1 = require("../Manager/Errors"); | ||
exports.createSubscription = createSubscription; | ||
function getSubscription(subscriptionId, fields) { | ||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { | ||
if (typeof subscriptionId !== 'string') | ||
throw new Errors_1.default('Invalid subscription ID provided.'); | ||
if (fields && fields !== 'last_failed_payment' && fields !== 'plan') | ||
throw new Errors_1.default('Invalid fields provided. Allowed values: last_failed_payment, plan'); | ||
try { | ||
const res = yield (0, RequestManager_1.default)('v1/billing/subscriptions/' + subscriptionId + (fields ? '?fields=' + fields : ''), { | ||
method: 'GET', | ||
headers: { | ||
'Content-Type': 'application/json' | ||
} | ||
}); | ||
return resolve(res); | ||
} | ||
catch (error) { | ||
reject(error); | ||
} | ||
})); | ||
} | ||
exports.getSubscription = getSubscription; |
@@ -12,7 +12,8 @@ import auth from './Functions/Auth'; | ||
import PaymentPreferencesBuilder from './Builders/PaymentPreferencesBuilder'; | ||
import { createSubscription, createSubscriptionPlan, getSubscriptionPlan, listSubscriptionPlan } from "./Functions/Subscriptions"; | ||
import { createSubscription, createSubscriptionPlan, getSubscriptionPlan, getSubscription, listSubscriptionPlan } from "./Functions/Subscriptions"; | ||
import SubscriptionPlanBuilder from './Builders/SubscriptionPlanBuilder'; | ||
import PricingSchemeBuilder from "./Builders/PricingSchemeBuilder"; | ||
import SubscriptionBuilder from "./Builders/SubscriptionBuilder"; | ||
export { config, auth, PurchaseUnitBuilder, UnitBuilder, ItemsBuilder, ProductBuilder, CurrencyCodes, SubscriptionPlanBuilder, BillingCycleBuilder, PaymentPreferencesBuilder, PricingSchemeBuilder, SubscriptionBuilder }; | ||
import SubscriptionInlinePlanBuilder from './Builders/SubscriptionInlinePlanBuilder'; | ||
export { config, auth, PurchaseUnitBuilder, UnitBuilder, ItemsBuilder, ProductBuilder, CurrencyCodes, SubscriptionPlanBuilder, SubscriptionInlinePlanBuilder, BillingCycleBuilder, PaymentPreferencesBuilder, PricingSchemeBuilder, SubscriptionBuilder }; | ||
export declare const order: { | ||
@@ -35,3 +36,3 @@ create: typeof createOrder; | ||
create: typeof createSubscription; | ||
get: typeof getSubscription; | ||
}; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.subscriptions = exports.plan = exports.product = exports.order = exports.SubscriptionBuilder = exports.PricingSchemeBuilder = exports.PaymentPreferencesBuilder = exports.BillingCycleBuilder = exports.SubscriptionPlanBuilder = exports.CurrencyCodes = exports.ProductBuilder = exports.ItemsBuilder = exports.UnitBuilder = exports.PurchaseUnitBuilder = exports.auth = exports.config = void 0; | ||
exports.subscriptions = exports.plan = exports.product = exports.order = exports.SubscriptionBuilder = exports.PricingSchemeBuilder = exports.PaymentPreferencesBuilder = exports.BillingCycleBuilder = exports.SubscriptionInlinePlanBuilder = exports.SubscriptionPlanBuilder = exports.CurrencyCodes = exports.ProductBuilder = exports.ItemsBuilder = exports.UnitBuilder = exports.PurchaseUnitBuilder = exports.auth = exports.config = void 0; | ||
const Auth_1 = require("./Functions/Auth"); | ||
@@ -31,2 +31,4 @@ exports.auth = Auth_1.default; | ||
exports.SubscriptionBuilder = SubscriptionBuilder_1.default; | ||
const SubscriptionInlinePlanBuilder_1 = require("./Builders/SubscriptionInlinePlanBuilder"); | ||
exports.SubscriptionInlinePlanBuilder = SubscriptionInlinePlanBuilder_1.default; | ||
exports.order = { | ||
@@ -48,3 +50,4 @@ create: Order_1.order, | ||
exports.subscriptions = { | ||
create: Subscriptions_1.createSubscription | ||
create: Subscriptions_1.createSubscription, | ||
get: Subscriptions_1.getSubscription | ||
}; |
@@ -7,2 +7,1 @@ export declare function configError(): void; | ||
} | ||
//# sourceMappingURL=Errors.d.ts.map |
import { RequestManagerProps } from "../types/RequestManagerTypes"; | ||
export default function requestManager(url: string, data: RequestManagerProps, isAuth?: boolean): Promise<any>; | ||
//# sourceMappingURL=RequestManager.d.ts.map |
@@ -13,2 +13,1 @@ import PricingSchemeBuilder from "../Builders/PricingSchemeBuilder"; | ||
} | ||
//# sourceMappingURL=BillingCycle.d.ts.map |
@@ -16,2 +16,1 @@ interface ConfigMode { | ||
export {}; | ||
//# sourceMappingURL=Config.d.ts.map |
@@ -16,2 +16,1 @@ export type IntervalUnit = 'DAY' | 'WEEK' | 'MONTH' | 'YEAR'; | ||
} | ||
//# sourceMappingURL=Frequency.d.ts.map |
@@ -7,2 +7,1 @@ export type HTTP_METHOD = "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "CONNECT" | "OPTIONS" | "PATCH"; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
@@ -108,2 +108,1 @@ import UnitBuilder from "../Builders/UnitBuilder"; | ||
} | ||
//# sourceMappingURL=Order.d.ts.map |
@@ -10,2 +10,1 @@ import UnitBuilder from "../Builders/UnitBuilder"; | ||
} | ||
//# sourceMappingURL=PaymentPreferences.d.ts.map |
@@ -24,2 +24,1 @@ import UnitBuilder from "../Builders/UnitBuilder"; | ||
} | ||
//# sourceMappingURL=PricingScheme.d.ts.map |
@@ -71,2 +71,1 @@ import { LinksData } from "./index"; | ||
export {}; | ||
//# sourceMappingURL=Product.d.ts.map |
@@ -13,2 +13,1 @@ import { HTTP_METHOD } from "./index"; | ||
}; | ||
//# sourceMappingURL=RequestManagerTypes.d.ts.map |
@@ -10,2 +10,4 @@ import BillingCycleBuilder from "../Builders/BillingCycleBuilder"; | ||
import UnitBuilder from "../Builders/UnitBuilder"; | ||
import SubscriptionInlinePlanBuilder from "../Builders/SubscriptionInlinePlanBuilder"; | ||
export type SubscriptionFieldResponse = 'last_failed_payment' | 'plan'; | ||
export type SubscriptionsStatus = "ACTIVE" | "INACTIVE" | "CREATED"; | ||
@@ -19,11 +21,13 @@ export interface Taxes { | ||
}; | ||
export interface SubscriptionsPlanBuilderProps<T extends 'Props' | 'JSON' = 'Props'> { | ||
export interface SubscriptionsInlinePlanBuilderProps<T extends 'Props' | 'JSON' = 'Props'> { | ||
billing_cycles: T extends 'Props' ? (BillingCycleBuilder | BillingCycleProps)[] : (BillingCycleProps<T>)[]; | ||
payment_preferences: T extends 'Props' ? (PaymentPreferencesBuilder | PaymentPreferencesProps) : PaymentPreferencesProps<T>; | ||
taxes?: T extends 'Props' ? Taxes : JSONTaxes; | ||
} | ||
export interface SubscriptionsPlanBuilderProps<T extends 'Props' | 'JSON' = 'Props'> extends SubscriptionsInlinePlanBuilderProps<T> { | ||
product_id: T extends 'Props' ? string | ProductBuilder | ProductUpdateBuilder : string; | ||
name: string; | ||
billing_cycles: T extends 'Props' ? (BillingCycleBuilder | BillingCycleProps)[] : (BillingCycleProps<T>)[]; | ||
payment_preferences: T extends 'Props' ? (PaymentPreferencesBuilder | PaymentPreferencesProps) : PaymentPreferencesProps<T>; | ||
status?: SubscriptionsStatus; | ||
description?: string; | ||
quantity_supported?: boolean; | ||
taxes?: T extends 'Props' ? Taxes : JSONTaxes; | ||
} | ||
@@ -73,3 +77,3 @@ export interface SubscriptionsPlanJSON { | ||
application_context?: ApplicationContext; | ||
plan?: T extends 'Props' ? SubscriptionInlinePlanBuilder | SubscriptionsInlinePlanBuilderProps : Partial<SubscriptionsInlinePlanBuilderProps<'JSON'>>; | ||
} | ||
//# sourceMappingURL=Subscriptions.d.ts.map |
{ | ||
"name": "paypal-rest", | ||
"version": "1.2.1-ALPHA", | ||
"version": "1.3.0-ALPHA", | ||
"description": "SDK for REST PayPal API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -6,3 +6,2 @@ { | ||
"declaration": true, | ||
"declarationMap": true, | ||
"outDir": "./dist", | ||
@@ -9,0 +8,0 @@ "skipLibCheck": true, |
112738
65
2109