@juhuu/sdk-ts 1.2.324 → 1.2.325
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +22 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.js +20 -0
- package/dist/index.mjs +20 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -179,7 +179,7 @@ interface SessionSettings {
|
|
|
179
179
|
interface EnvironmentSettings {
|
|
180
180
|
}
|
|
181
181
|
type PaymentMethod = "card" | "stripe_account" | "klarna" | "bancontact" | "eps" | "giropay" | "ideal" | "p24" | "sofort" | "unknown";
|
|
182
|
-
type PaymentReason = "session";
|
|
182
|
+
type PaymentReason = "custom" | "session";
|
|
183
183
|
type PaymentRefundReason = "requestedByUser" | "expiredUncapturedCharge" | "fraudulent" | "duplicate" | "unknown";
|
|
184
184
|
type SessionStatus = "waitingForPayment" | "waitingForReady" | "ready" | "completed";
|
|
185
185
|
type AutoRenewMode = "off" | "optIn" | "optOut" | "on";
|
|
@@ -215,6 +215,7 @@ interface PostingRow {
|
|
|
215
215
|
quantity: number;
|
|
216
216
|
unitPrice: number;
|
|
217
217
|
unitPriceIsFlexible: boolean;
|
|
218
|
+
taxPercentage?: number;
|
|
218
219
|
total: number;
|
|
219
220
|
}
|
|
220
221
|
interface Person {
|
|
@@ -1762,6 +1763,7 @@ declare class UsersService extends Service {
|
|
|
1762
1763
|
|
|
1763
1764
|
declare class PaymentsService extends Service {
|
|
1764
1765
|
constructor(config: JUHUU.SetupConfig);
|
|
1766
|
+
create(PaymentCreateParams: JUHUU.Payment.Create.Params, PaymentCreateOptions?: JUHUU.Payment.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Create.Response>>;
|
|
1765
1767
|
list(PaymentListParams: JUHUU.Payment.List.Params, PaymentListOptions?: JUHUU.Payment.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.List.Response>>;
|
|
1766
1768
|
retrieve(PaymentRetrieveParams: JUHUU.Payment.Retrieve.Params, PaymentRetrieveOptions?: JUHUU.Payment.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Retrieve.Response>>;
|
|
1767
1769
|
search(PaymentSearchParams: JUHUU.Payment.Search.Params, PaymentSearchOptions?: JUHUU.Payment.Search.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Search.Response>>;
|
|
@@ -3700,6 +3702,9 @@ declare namespace JUHUU {
|
|
|
3700
3702
|
automaticPayoutsEnabled: boolean;
|
|
3701
3703
|
payoutCurrencyCode: CurrencyCode;
|
|
3702
3704
|
timeZone: TimeZone;
|
|
3705
|
+
defaultServiceFeeMax: number;
|
|
3706
|
+
defaultServiceFeeMin: number;
|
|
3707
|
+
defaultServiceFeePercentage: number;
|
|
3703
3708
|
/**
|
|
3704
3709
|
* Used to charge the property
|
|
3705
3710
|
*/
|
|
@@ -4019,6 +4024,22 @@ declare namespace JUHUU {
|
|
|
4019
4024
|
property?: JUHUU.Property.Object;
|
|
4020
4025
|
};
|
|
4021
4026
|
}
|
|
4027
|
+
namespace Create {
|
|
4028
|
+
type Params = {
|
|
4029
|
+
accountingAreaId: string;
|
|
4030
|
+
amountWithoutServiceFee: number;
|
|
4031
|
+
currencyCode: string;
|
|
4032
|
+
propertyId: string;
|
|
4033
|
+
isOffSession: boolean;
|
|
4034
|
+
salesTaxPercentage: number;
|
|
4035
|
+
userId: string;
|
|
4036
|
+
postingRowArray: PostingRow[];
|
|
4037
|
+
};
|
|
4038
|
+
type Options = JUHUU.RequestOptions;
|
|
4039
|
+
type Response = {
|
|
4040
|
+
payout: JUHUU.Payment.Object;
|
|
4041
|
+
};
|
|
4042
|
+
}
|
|
4022
4043
|
namespace Search {
|
|
4023
4044
|
type Params = {
|
|
4024
4045
|
providerPaymentId?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -179,7 +179,7 @@ interface SessionSettings {
|
|
|
179
179
|
interface EnvironmentSettings {
|
|
180
180
|
}
|
|
181
181
|
type PaymentMethod = "card" | "stripe_account" | "klarna" | "bancontact" | "eps" | "giropay" | "ideal" | "p24" | "sofort" | "unknown";
|
|
182
|
-
type PaymentReason = "session";
|
|
182
|
+
type PaymentReason = "custom" | "session";
|
|
183
183
|
type PaymentRefundReason = "requestedByUser" | "expiredUncapturedCharge" | "fraudulent" | "duplicate" | "unknown";
|
|
184
184
|
type SessionStatus = "waitingForPayment" | "waitingForReady" | "ready" | "completed";
|
|
185
185
|
type AutoRenewMode = "off" | "optIn" | "optOut" | "on";
|
|
@@ -215,6 +215,7 @@ interface PostingRow {
|
|
|
215
215
|
quantity: number;
|
|
216
216
|
unitPrice: number;
|
|
217
217
|
unitPriceIsFlexible: boolean;
|
|
218
|
+
taxPercentage?: number;
|
|
218
219
|
total: number;
|
|
219
220
|
}
|
|
220
221
|
interface Person {
|
|
@@ -1762,6 +1763,7 @@ declare class UsersService extends Service {
|
|
|
1762
1763
|
|
|
1763
1764
|
declare class PaymentsService extends Service {
|
|
1764
1765
|
constructor(config: JUHUU.SetupConfig);
|
|
1766
|
+
create(PaymentCreateParams: JUHUU.Payment.Create.Params, PaymentCreateOptions?: JUHUU.Payment.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Create.Response>>;
|
|
1765
1767
|
list(PaymentListParams: JUHUU.Payment.List.Params, PaymentListOptions?: JUHUU.Payment.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.List.Response>>;
|
|
1766
1768
|
retrieve(PaymentRetrieveParams: JUHUU.Payment.Retrieve.Params, PaymentRetrieveOptions?: JUHUU.Payment.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Retrieve.Response>>;
|
|
1767
1769
|
search(PaymentSearchParams: JUHUU.Payment.Search.Params, PaymentSearchOptions?: JUHUU.Payment.Search.Options): Promise<JUHUU.HttpResponse<JUHUU.Payment.Search.Response>>;
|
|
@@ -3700,6 +3702,9 @@ declare namespace JUHUU {
|
|
|
3700
3702
|
automaticPayoutsEnabled: boolean;
|
|
3701
3703
|
payoutCurrencyCode: CurrencyCode;
|
|
3702
3704
|
timeZone: TimeZone;
|
|
3705
|
+
defaultServiceFeeMax: number;
|
|
3706
|
+
defaultServiceFeeMin: number;
|
|
3707
|
+
defaultServiceFeePercentage: number;
|
|
3703
3708
|
/**
|
|
3704
3709
|
* Used to charge the property
|
|
3705
3710
|
*/
|
|
@@ -4019,6 +4024,22 @@ declare namespace JUHUU {
|
|
|
4019
4024
|
property?: JUHUU.Property.Object;
|
|
4020
4025
|
};
|
|
4021
4026
|
}
|
|
4027
|
+
namespace Create {
|
|
4028
|
+
type Params = {
|
|
4029
|
+
accountingAreaId: string;
|
|
4030
|
+
amountWithoutServiceFee: number;
|
|
4031
|
+
currencyCode: string;
|
|
4032
|
+
propertyId: string;
|
|
4033
|
+
isOffSession: boolean;
|
|
4034
|
+
salesTaxPercentage: number;
|
|
4035
|
+
userId: string;
|
|
4036
|
+
postingRowArray: PostingRow[];
|
|
4037
|
+
};
|
|
4038
|
+
type Options = JUHUU.RequestOptions;
|
|
4039
|
+
type Response = {
|
|
4040
|
+
payout: JUHUU.Payment.Object;
|
|
4041
|
+
};
|
|
4042
|
+
}
|
|
4022
4043
|
namespace Search {
|
|
4023
4044
|
type Params = {
|
|
4024
4045
|
providerPaymentId?: string;
|
package/dist/index.js
CHANGED
|
@@ -1024,6 +1024,26 @@ var PaymentsService = class extends Service {
|
|
|
1024
1024
|
constructor(config) {
|
|
1025
1025
|
super(config);
|
|
1026
1026
|
}
|
|
1027
|
+
async create(PaymentCreateParams, PaymentCreateOptions) {
|
|
1028
|
+
return await super.sendRequest(
|
|
1029
|
+
{
|
|
1030
|
+
method: "POST",
|
|
1031
|
+
url: "payments",
|
|
1032
|
+
body: {
|
|
1033
|
+
accountingAreaId: PaymentCreateParams.accountingAreaId,
|
|
1034
|
+
amountWithoutServiceFee: PaymentCreateParams.amountWithoutServiceFee,
|
|
1035
|
+
currencyCode: PaymentCreateParams.currencyCode,
|
|
1036
|
+
propertyId: PaymentCreateParams.propertyId,
|
|
1037
|
+
isOffSession: PaymentCreateParams.isOffSession,
|
|
1038
|
+
salesTaxPercentage: PaymentCreateParams.salesTaxPercentage,
|
|
1039
|
+
userId: PaymentCreateParams.userId,
|
|
1040
|
+
postingRowArray: PaymentCreateParams.postingRowArray
|
|
1041
|
+
},
|
|
1042
|
+
authenticationNotOptional: true
|
|
1043
|
+
},
|
|
1044
|
+
PaymentCreateOptions
|
|
1045
|
+
);
|
|
1046
|
+
}
|
|
1027
1047
|
async list(PaymentListParams, PaymentListOptions) {
|
|
1028
1048
|
const queryArray = [];
|
|
1029
1049
|
if (PaymentListParams.userId !== void 0) {
|
package/dist/index.mjs
CHANGED
|
@@ -980,6 +980,26 @@ var PaymentsService = class extends Service {
|
|
|
980
980
|
constructor(config) {
|
|
981
981
|
super(config);
|
|
982
982
|
}
|
|
983
|
+
async create(PaymentCreateParams, PaymentCreateOptions) {
|
|
984
|
+
return await super.sendRequest(
|
|
985
|
+
{
|
|
986
|
+
method: "POST",
|
|
987
|
+
url: "payments",
|
|
988
|
+
body: {
|
|
989
|
+
accountingAreaId: PaymentCreateParams.accountingAreaId,
|
|
990
|
+
amountWithoutServiceFee: PaymentCreateParams.amountWithoutServiceFee,
|
|
991
|
+
currencyCode: PaymentCreateParams.currencyCode,
|
|
992
|
+
propertyId: PaymentCreateParams.propertyId,
|
|
993
|
+
isOffSession: PaymentCreateParams.isOffSession,
|
|
994
|
+
salesTaxPercentage: PaymentCreateParams.salesTaxPercentage,
|
|
995
|
+
userId: PaymentCreateParams.userId,
|
|
996
|
+
postingRowArray: PaymentCreateParams.postingRowArray
|
|
997
|
+
},
|
|
998
|
+
authenticationNotOptional: true
|
|
999
|
+
},
|
|
1000
|
+
PaymentCreateOptions
|
|
1001
|
+
);
|
|
1002
|
+
}
|
|
983
1003
|
async list(PaymentListParams, PaymentListOptions) {
|
|
984
1004
|
const queryArray = [];
|
|
985
1005
|
if (PaymentListParams.userId !== void 0) {
|