Comparing version 2.1.4 to 2.2.0
@@ -12,2 +12,4 @@ import Accounts from './account'; | ||
import Statements from './statement'; | ||
import Terms from "./term"; | ||
import Balances from "./balance"; | ||
declare namespace Payjp { | ||
@@ -31,2 +33,4 @@ export interface PayjpStatic { | ||
statements: Statements; | ||
terms: Terms; | ||
balances: Balances; | ||
} | ||
@@ -40,5 +44,7 @@ export interface PayjpOptions { | ||
} | ||
export interface ListOptions { | ||
export interface PaginationOptions { | ||
limit?: number; | ||
offset?: number; | ||
} | ||
export interface ListOptions extends PaginationOptions { | ||
since?: number; | ||
@@ -75,2 +81,21 @@ until?: number; | ||
} | ||
export interface StatementListOptions extends ListOptions { | ||
owner?: "merchant" | "tenant"; | ||
source_transfer?: string; | ||
tenant?: string; | ||
term?: string; | ||
type?: "sales" | "service_fee" | "transfer_fee"; | ||
} | ||
export interface TermListOptions extends PaginationOptions { | ||
since_start_at?: number; | ||
until_start_at?: number; | ||
} | ||
export interface BalanceListOptions extends ListOptions { | ||
since_due_date?: number; | ||
until_due_date?: number; | ||
state?: "collecting" | "transfer" | "claim"; | ||
closed?: boolean; | ||
owner?: "merchant" | "tenant"; | ||
tenant?: string; | ||
} | ||
interface OptionsMetadata { | ||
@@ -211,2 +236,3 @@ [x: string]: string | number; | ||
three_d_secure_status: string | null; | ||
term_id: string | null; | ||
} | ||
@@ -335,2 +361,3 @@ export interface Customer { | ||
merchant: Merchant; | ||
team_id: string; | ||
} | ||
@@ -380,3 +407,10 @@ export interface Merchant { | ||
object: "statement"; | ||
items: List<StatementItems>; | ||
title: string; | ||
tenant_id: string; | ||
type: "sales" | "service_fee" | "transfer_fee"; | ||
net: number; | ||
term: Term | null; | ||
balance_id: string; | ||
items: StatementItems[]; | ||
updated: number; | ||
} | ||
@@ -412,2 +446,33 @@ export interface StatementItems { | ||
} | ||
export interface Term { | ||
id: string; | ||
livemode: boolean; | ||
object: "term"; | ||
charge_count: number; | ||
refund_count: number; | ||
dispute_count: number; | ||
end_at: number; | ||
start_at: number; | ||
} | ||
export interface BankInfo { | ||
bank_code: string; | ||
bank_branch_code: string; | ||
bank_account_type: string; | ||
bank_account_number: string; | ||
bank_account_holder_name: string; | ||
bank_account_status: "success" | "failed" | "pending"; | ||
} | ||
export interface Balance { | ||
created: number; | ||
id: string; | ||
livemode: boolean; | ||
net: number; | ||
object: "balance"; | ||
state: "collecting" | "transfer" | "claim"; | ||
statements: Statement[]; | ||
closed: boolean; | ||
due_date: null | number; | ||
tenant_id: string; | ||
bank_info: null | BankInfo; | ||
} | ||
export interface Deleted { | ||
@@ -414,0 +479,0 @@ deleted: boolean; |
@@ -13,2 +13,4 @@ "use strict"; | ||
const statement_1 = require("./statement"); | ||
const term_1 = require("./term"); | ||
const balance_1 = require("./balance"); | ||
const Payjp = function (apikey, options = {}) { | ||
@@ -46,4 +48,6 @@ if (!apikey) { | ||
statements: new statement_1.default(payjpConfig), | ||
terms: new term_1.default(payjpConfig), | ||
balances: new balance_1.default(payjpConfig), | ||
}; | ||
}; | ||
module.exports = Payjp; |
@@ -6,5 +6,5 @@ import Resource from './resource'; | ||
constructor(payjp: any); | ||
list(query?: I.TenantTransferListOptions): Promise<I.List<I.Statement>>; | ||
list(query?: I.StatementListOptions): Promise<I.List<I.Statement>>; | ||
retrieve(id: string): Promise<I.Statement>; | ||
statementUrls(id: string, query?: I.StatementUrlOptions): Promise<I.StatementUrl>; | ||
} |
{ | ||
"name": "payjp", | ||
"version": "2.1.4", | ||
"version": "2.2.0", | ||
"description": "PAY.JP node.js bindings", | ||
@@ -5,0 +5,0 @@ "main": "built/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42477
39
1155