Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refs/heads/release/1.4.8 #12

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,603 changes: 1,290 additions & 313 deletions docs/index.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pokepay/pokepay-partner-sdk",
"version": "1.4.7",
"version": "1.4.8",
"description": "Pokepay Partner SDK for NodeJS",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
1,280 changes: 1,166 additions & 114 deletions partner.yaml

Large diffs are not rendered by default.

12,285 changes: 8,011 additions & 4,274 deletions src/index.test.ts

Large diffs are not rendered by default.

22 changes: 21 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { PartnerRequestExpired } from "./response/PartnerRequestExpired";
import { PartnerDecryptionFailed } from "./response/PartnerDecryptionFailed";
import { PartnerClientNotFound } from "./response/PartnerClientNotFound";
import { BadRequest } from "./response/BadRequest";
import { PaginatedOrganizations } from "./response/PaginatedOrganizations";
import { PaginatedCoupons } from "./response/PaginatedCoupons";
import { CouponDetail } from "./response/CouponDetail";
import { Coupon } from "./response/Coupon";
Expand All @@ -33,12 +34,17 @@ import { PaginatedTransfersV2 } from "./response/PaginatedTransfersV2";
import { PaginatedTransfers } from "./response/PaginatedTransfers";
import { PaginatedTransactionV2 } from "./response/PaginatedTransactionV2";
import { PaginatedTransaction } from "./response/PaginatedTransaction";
import { Banks } from "./response/Banks";
import { Bank } from "./response/Bank";
import { BankRegisteringInfo } from "./response/BankRegisteringInfo";
import { UserDevice } from "./response/UserDevice";
import { UserStatsOperation } from "./response/UserStatsOperation";
import { PrivateMoneySummary } from "./response/PrivateMoneySummary";
import { PaginatedPrivateMoneyOrganizationSummaries } from "./response/PaginatedPrivateMoneyOrganizationSummaries";
import { PrivateMoneyOrganizationSummary } from "./response/PrivateMoneyOrganizationSummary";
import { OrganizationSummary } from "./response/OrganizationSummary";
import { Product } from "./response/Product";
import { ExternalTransactionDetail } from "./response/ExternalTransactionDetail";
import { ExternalTransaction } from "./response/ExternalTransaction";
import { Transfer } from "./response/Transfer";
import { AccountWithoutPrivateMoneyDetail } from "./response/AccountWithoutPrivateMoneyDetail";
Expand All @@ -56,6 +62,7 @@ import { CashtrayAttempt } from "./response/CashtrayAttempt";
import { CashtrayWithResult } from "./response/CashtrayWithResult";
import { Cashtray } from "./response/Cashtray";
import { CpmToken } from "./response/CpmToken";
import { PaginatedChecks } from "./response/PaginatedChecks";
import { Check } from "./response/Check";
import { Bill } from "./response/Bill";
import { AccountBalance } from "./response/AccountBalance";
Expand All @@ -68,8 +75,17 @@ import { AdminUserWithShopsAndPrivateMoneys } from "./response/AdminUserWithShop
import { Pagination } from "./response/Pagination";
import { Echo } from "./response/Echo";
import { Pong } from "./response/Pong";
import { UpdateCoupon } from "./request/UpdateCoupon";
import { GetCoupon } from "./request/GetCoupon";
import { CreateCoupon } from "./request/CreateCoupon";
import { ListCoupons } from "./request/ListCoupons";
import { CreateBankTopupTransaction } from "./request/CreateBankTopupTransaction";
import { ListBanks } from "./request/ListBanks";
import { CreateBank } from "./request/CreateBank";
import { ActivateUserDevice } from "./request/ActivateUserDevice";
import { GetUserDevice } from "./request/GetUserDevice";
import { CreateUserDevice } from "./request/CreateUserDevice";
import { DeleteWebhook } from "./request/DeleteWebhook";
import { UpdateWebhook } from "./request/UpdateWebhook";
import { ListWebhooks } from "./request/ListWebhooks";
import { CreateWebhook } from "./request/CreateWebhook";
Expand All @@ -94,6 +110,7 @@ import { CreateShopV2 } from "./request/CreateShopV2";
import { CreateShop } from "./request/CreateShop";
import { ListShops } from "./request/ListShops";
import { CreateOrganization } from "./request/CreateOrganization";
import { ListOrganizations } from "./request/ListOrganizations";
import { ListTransfersV2 } from "./request/ListTransfersV2";
import { ListTransfers } from "./request/ListTransfers";
import { RefundExternalTransaction } from "./request/RefundExternalTransaction";
Expand All @@ -112,6 +129,9 @@ import { ListTransactionsV2 } from "./request/ListTransactionsV2";
import { CreateTransaction } from "./request/CreateTransaction";
import { ListTransactions } from "./request/ListTransactions";
import { GetCpmToken } from "./request/GetCpmToken";
import { UpdateCheck } from "./request/UpdateCheck";
import { GetCheck } from "./request/GetCheck";
import { ListChecks } from "./request/ListChecks";
import { CreateCheck } from "./request/CreateCheck";
import { UpdateBill } from "./request/UpdateBill";
import { CreateBill } from "./request/CreateBill";
Expand All @@ -132,7 +152,7 @@ import { GetUser } from "./request/GetUser";
import { SendEcho } from "./request/SendEcho";
import { GetPing } from "./request/GetPing";

export { Client, VERSION, Request, Method, Response, UserStatsOperationServiceUnavailable, UnpermittedAdminUser, InvalidParameters, PartnerRequestAlreadyDone, PartnerRequestExpired, PartnerDecryptionFailed, PartnerClientNotFound, BadRequest, PaginatedCoupons, CouponDetail, Coupon, PaginatedOrganizationWorkerTaskWebhook, OrganizationWorkerTaskWebhook, AccountTransferSummary, AccountTransferSummaryElement, PaginatedCampaigns, Campaign, PaginatedPrivateMoneys, PaginatedBills, PaginatedShops, PaginatedAccountBalance, PaginatedAccountDetails, PaginatedAccountWithUsers, PaginatedAccounts, PaginatedTransfersV2, PaginatedTransfers, PaginatedTransactionV2, PaginatedTransaction, UserStatsOperation, PrivateMoneySummary, PaginatedPrivateMoneyOrganizationSummaries, PrivateMoneyOrganizationSummary, OrganizationSummary, Product, ExternalTransaction, Transfer, AccountWithoutPrivateMoneyDetail, PaginatedBulkTransactionJob, BulkTransactionJob, BulkTransaction, ShopWithAccounts, ShopWithMetadata, TransactionDetail, Transaction, Organization, PrivateMoney, User, CashtrayAttempt, CashtrayWithResult, Cashtray, CpmToken, Check, Bill, AccountBalance, AccountDeleted, ShopAccount, AccountDetail, AccountWithUser, Account, AdminUserWithShopsAndPrivateMoneys, Pagination, Echo, Pong, GetCoupon, ListCoupons, UpdateWebhook, ListWebhooks, CreateWebhook, RequestUserStats, UpdateCampaign, GetCampaign, ListCampaigns, CreateCampaign, UpdateCashtray, CancelCashtray, GetCashtray, CreateCashtray, ListBulkTransactionJobs, GetBulkTransaction, ListCustomerTransactions, GetPrivateMoneySummary, GetPrivateMoneyOrganizationSummaries, GetPrivateMoneys, UpdateShop, GetShop, CreateShopV2, CreateShop, ListShops, CreateOrganization, ListTransfersV2, ListTransfers, RefundExternalTransaction, CreateExternalTransaction, GetTransactionByRequestId, RefundTransaction, GetTransaction, BulkCreateTransaction, CreateExchangeTransaction, CreateTransferTransaction, CreateCpmTransaction, CreatePaymentTransaction, CreateTopupTransactionWithCheck, CreateTopupTransaction, ListTransactionsV2, CreateTransaction, ListTransactions, GetCpmToken, CreateCheck, UpdateBill, CreateBill, ListBills, GetShopAccounts, CreateCustomerAccount, GetCustomerAccounts, GetAccountTransferSummary, UpdateCustomerAccount, ListAccountExpiredBalances, ListAccountBalances, DeleteAccount, UpdateAccount, GetAccount, CreateUserAccount, ListUserAccounts, GetUser, SendEcho, GetPing };
export { Client, VERSION, Request, Method, Response, UserStatsOperationServiceUnavailable, UnpermittedAdminUser, InvalidParameters, PartnerRequestAlreadyDone, PartnerRequestExpired, PartnerDecryptionFailed, PartnerClientNotFound, BadRequest, PaginatedOrganizations, PaginatedCoupons, CouponDetail, Coupon, PaginatedOrganizationWorkerTaskWebhook, OrganizationWorkerTaskWebhook, AccountTransferSummary, AccountTransferSummaryElement, PaginatedCampaigns, Campaign, PaginatedPrivateMoneys, PaginatedBills, PaginatedShops, PaginatedAccountBalance, PaginatedAccountDetails, PaginatedAccountWithUsers, PaginatedAccounts, PaginatedTransfersV2, PaginatedTransfers, PaginatedTransactionV2, PaginatedTransaction, Banks, Bank, BankRegisteringInfo, UserDevice, UserStatsOperation, PrivateMoneySummary, PaginatedPrivateMoneyOrganizationSummaries, PrivateMoneyOrganizationSummary, OrganizationSummary, Product, ExternalTransactionDetail, ExternalTransaction, Transfer, AccountWithoutPrivateMoneyDetail, PaginatedBulkTransactionJob, BulkTransactionJob, BulkTransaction, ShopWithAccounts, ShopWithMetadata, TransactionDetail, Transaction, Organization, PrivateMoney, User, CashtrayAttempt, CashtrayWithResult, Cashtray, CpmToken, PaginatedChecks, Check, Bill, AccountBalance, AccountDeleted, ShopAccount, AccountDetail, AccountWithUser, Account, AdminUserWithShopsAndPrivateMoneys, Pagination, Echo, Pong, UpdateCoupon, GetCoupon, CreateCoupon, ListCoupons, CreateBankTopupTransaction, ListBanks, CreateBank, ActivateUserDevice, GetUserDevice, CreateUserDevice, DeleteWebhook, UpdateWebhook, ListWebhooks, CreateWebhook, RequestUserStats, UpdateCampaign, GetCampaign, ListCampaigns, CreateCampaign, UpdateCashtray, CancelCashtray, GetCashtray, CreateCashtray, ListBulkTransactionJobs, GetBulkTransaction, ListCustomerTransactions, GetPrivateMoneySummary, GetPrivateMoneyOrganizationSummaries, GetPrivateMoneys, UpdateShop, GetShop, CreateShopV2, CreateShop, ListShops, CreateOrganization, ListOrganizations, ListTransfersV2, ListTransfers, RefundExternalTransaction, CreateExternalTransaction, GetTransactionByRequestId, RefundTransaction, GetTransaction, BulkCreateTransaction, CreateExchangeTransaction, CreateTransferTransaction, CreateCpmTransaction, CreatePaymentTransaction, CreateTopupTransactionWithCheck, CreateTopupTransaction, ListTransactionsV2, CreateTransaction, ListTransactions, GetCpmToken, UpdateCheck, GetCheck, ListChecks, CreateCheck, UpdateBill, CreateBill, ListBills, GetShopAccounts, CreateCustomerAccount, GetCustomerAccounts, GetAccountTransferSummary, UpdateCustomerAccount, ListAccountExpiredBalances, ListAccountBalances, DeleteAccount, UpdateAccount, GetAccount, CreateUserAccount, ListUserAccounts, GetUser, SendEcho, GetPing };

async function example(): Promise<void> {
console.log(`Pokepay partner SDK ${VERSION} example.`);
Expand Down
20 changes: 20 additions & 0 deletions src/request/ActivateUserDevice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// DO NOT EDIT: File is generated by code generator.

import { Request, Method } from "./Request";
import { UserDevice } from "../response/UserDevice";

class ActivateUserDevice implements Request<UserDevice> {
public readonly __r: UserDevice | undefined;
public readonly method: Method = "POST";
public readonly path: string;
public readonly bodyParams: {};
public constructor(params: {
user_device_id: string
}) {
if (params.user_device_id === void 0) throw new Error('"user_device_id" is required');
this.path = "/user-devices" + "/" + params.user_device_id + "/activate";
this.bodyParams = {};
}
}

export { ActivateUserDevice };
40 changes: 40 additions & 0 deletions src/request/CreateBank.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// DO NOT EDIT: File is generated by code generator.

import { Request, Method } from "./Request";
import { BankRegisteringInfo } from "../response/BankRegisteringInfo";

class CreateBank implements Request<BankRegisteringInfo> {
public readonly __r: BankRegisteringInfo | undefined;
public readonly method: Method = "POST";
public readonly path: string;
public readonly bodyParams: {
private_money_id: string,
callback_url: string,
kana: string,
email?: string,
birthdate?: string
};
public constructor(params: {
user_device_id: string,
private_money_id: string,
callback_url: string,
kana: string,
email?: string,
birthdate?: string
}) {
if (params.user_device_id === void 0) throw new Error('"user_device_id" is required');
if (params.private_money_id === void 0) throw new Error('"private_money_id" is required');
if (params.callback_url === void 0) throw new Error('"callback_url" is required');
if (params.kana === void 0) throw new Error('"kana" is required');
this.path = "/user-devices" + "/" + params.user_device_id + "/banks";
this.bodyParams = {
private_money_id: params.private_money_id,
callback_url: params.callback_url,
kana: params.kana,
};
if (params.email !== void 0) this.bodyParams.email = params.email;
if (params.birthdate !== void 0) this.bodyParams.birthdate = params.birthdate;
}
}

export { CreateBank };
38 changes: 38 additions & 0 deletions src/request/CreateBankTopupTransaction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// DO NOT EDIT: File is generated by code generator.

import { Request, Method } from "./Request";
import { TransactionDetail } from "../response/TransactionDetail";

class CreateBankTopupTransaction implements Request<TransactionDetail> {
public readonly __r: TransactionDetail | undefined;
public readonly method: Method = "POST";
public readonly path: string;
public readonly bodyParams: {
private_money_id: string,
amount: number,
bank_id: string,
request_id: string
};
public constructor(params: {
user_device_id: string,
private_money_id: string,
amount: number,
bank_id: string,
request_id: string
}) {
if (params.user_device_id === void 0) throw new Error('"user_device_id" is required');
if (params.private_money_id === void 0) throw new Error('"private_money_id" is required');
if (params.amount === void 0) throw new Error('"amount" is required');
if (params.bank_id === void 0) throw new Error('"bank_id" is required');
if (params.request_id === void 0) throw new Error('"request_id" is required');
this.path = "/user-devices" + "/" + params.user_device_id + "/banks" + "/topup";
this.bodyParams = {
private_money_id: params.private_money_id,
amount: params.amount,
bank_id: params.bank_id,
request_id: params.request_id,
};
}
}

export { CreateBankTopupTransaction };
7 changes: 5 additions & 2 deletions src/request/CreateCampaign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class CreateCampaign implements Request<Campaign> {
max_point_amount?: number,
max_total_point_amount?: number,
dest_private_money_id?: string,
applicable_account_metadata?: Object
applicable_account_metadata?: Object,
budget_caps_amount?: number
};
public constructor(params: {
name: string,
Expand All @@ -57,7 +58,8 @@ class CreateCampaign implements Request<Campaign> {
max_point_amount?: number,
max_total_point_amount?: number,
dest_private_money_id?: string,
applicable_account_metadata?: Object
applicable_account_metadata?: Object,
budget_caps_amount?: number
}) {
if (params.name === void 0) throw new Error('"name" is required');
if (params.private_money_id === void 0) throw new Error('"private_money_id" is required');
Expand Down Expand Up @@ -92,6 +94,7 @@ class CreateCampaign implements Request<Campaign> {
if (params.max_total_point_amount !== void 0) this.bodyParams.max_total_point_amount = params.max_total_point_amount;
if (params.dest_private_money_id !== void 0) this.bodyParams.dest_private_money_id = params.dest_private_money_id;
if (params.applicable_account_metadata !== void 0) this.bodyParams.applicable_account_metadata = params.applicable_account_metadata;
if (params.budget_caps_amount !== void 0) this.bodyParams.budget_caps_amount = params.budget_caps_amount;
}
}

Expand Down
85 changes: 85 additions & 0 deletions src/request/CreateCoupon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// DO NOT EDIT: File is generated by code generator.

import { Request, Method } from "./Request";
import { CouponDetail } from "../response/CouponDetail";

class CreateCoupon implements Request<CouponDetail> {
public readonly __r: CouponDetail | undefined;
public readonly method: Method = "POST";
public readonly path: string;
public readonly bodyParams: {
private_money_id: string,
name: string,
description?: string,
discount_amount?: number,
discount_percentage?: number,
discount_upper_limit?: number,
starts_at: string,
ends_at: string,
display_starts_at?: string,
display_ends_at?: string,
is_disabled?: boolean,
is_hidden?: boolean,
is_public?: boolean,
code?: string,
usage_limit?: number,
min_amount?: number,
issued_shop_id: string,
is_shop_specified?: boolean,
available_shop_ids?: string[],
storage_id?: string
};
public constructor(params: {
private_money_id: string,
name: string,
description?: string,
discount_amount?: number,
discount_percentage?: number,
discount_upper_limit?: number,
starts_at: string,
ends_at: string,
display_starts_at?: string,
display_ends_at?: string,
is_disabled?: boolean,
is_hidden?: boolean,
is_public?: boolean,
code?: string,
usage_limit?: number,
min_amount?: number,
issued_shop_id: string,
is_shop_specified?: boolean,
available_shop_ids?: string[],
storage_id?: string
}) {
if (params.private_money_id === void 0) throw new Error('"private_money_id" is required');
if (params.name === void 0) throw new Error('"name" is required');
if (params.starts_at === void 0) throw new Error('"starts_at" is required');
if (params.ends_at === void 0) throw new Error('"ends_at" is required');
if (params.issued_shop_id === void 0) throw new Error('"issued_shop_id" is required');
this.path = "/coupons";
this.bodyParams = {
private_money_id: params.private_money_id,
name: params.name,
starts_at: params.starts_at,
ends_at: params.ends_at,
issued_shop_id: params.issued_shop_id,
};
if (params.description !== void 0) this.bodyParams.description = params.description;
if (params.discount_amount !== void 0) this.bodyParams.discount_amount = params.discount_amount;
if (params.discount_percentage !== void 0) this.bodyParams.discount_percentage = params.discount_percentage;
if (params.discount_upper_limit !== void 0) this.bodyParams.discount_upper_limit = params.discount_upper_limit;
if (params.display_starts_at !== void 0) this.bodyParams.display_starts_at = params.display_starts_at;
if (params.display_ends_at !== void 0) this.bodyParams.display_ends_at = params.display_ends_at;
if (params.is_disabled !== void 0) this.bodyParams.is_disabled = params.is_disabled;
if (params.is_hidden !== void 0) this.bodyParams.is_hidden = params.is_hidden;
if (params.is_public !== void 0) this.bodyParams.is_public = params.is_public;
if (params.code !== void 0) this.bodyParams.code = params.code;
if (params.usage_limit !== void 0) this.bodyParams.usage_limit = params.usage_limit;
if (params.min_amount !== void 0) this.bodyParams.min_amount = params.min_amount;
if (params.is_shop_specified !== void 0) this.bodyParams.is_shop_specified = params.is_shop_specified;
if (params.available_shop_ids !== void 0) this.bodyParams.available_shop_ids = params.available_shop_ids;
if (params.storage_id !== void 0) this.bodyParams.storage_id = params.storage_id;
}
}

export { CreateCoupon };
6 changes: 3 additions & 3 deletions src/request/CreateExternalTransaction.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// DO NOT EDIT: File is generated by code generator.

import { Request, Method } from "./Request";
import { ExternalTransaction } from "../response/ExternalTransaction";
import { ExternalTransactionDetail } from "../response/ExternalTransactionDetail";

class CreateExternalTransaction implements Request<ExternalTransaction> {
public readonly __r: ExternalTransaction | undefined;
class CreateExternalTransaction implements Request<ExternalTransactionDetail> {
public readonly __r: ExternalTransactionDetail | undefined;
public readonly method: Method = "POST";
public readonly path: string;
public readonly bodyParams: {
Expand Down
Loading
Loading