Skip to content

Commit 34f4333

Browse files
authored
Merge pull request #43 from payjp/sdk-update-2026-03-25-7c129f0
fix: Update SDK from generator (2026-03-25)
2 parents a47234e + 72a6ce5 commit 34f4333

7 files changed

Lines changed: 23 additions & 10 deletions

File tree

client/client/utils.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export const mergeHeaders = (
204204
mergedHeaders.append(key, v as string);
205205
}
206206
} else if (value !== undefined) {
207-
// assume object headers are meant to be JSON stringified, i.e. their
207+
// assume object headers are meant to be JSON stringified, i.e., their
208208
// content value in OpenAPI specification is 'application/json'
209209
mergedHeaders.set(
210210
key,

client/core/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export interface Config {
8080
requestValidator?: (data: unknown) => Promise<unknown>;
8181
/**
8282
* A function transforming response data before it's returned. This is useful
83-
* for post-processing data, e.g. converting ISO strings into Date objects.
83+
* for post-processing data, e.g., converting ISO strings into Date objects.
8484
*/
8585
responseTransformer?: (data: unknown) => Promise<unknown>;
8686
/**

client/core/utils.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export function getValidRequestBody(options: {
126126
return hasSerializedBody ? options.serializedBody : null;
127127
}
128128

129-
// not all clients implement a serializedBody property (i.e. client-axios)
129+
// not all clients implement a serializedBody property (i.e., client-axios)
130130
return options.body !== '' ? options.body : null;
131131
}
132132

client/types.gen.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ export type PaymentFlowResponse = {
15711571
*/
15721572
payment_method_types: Array<PaymentMethodTypes>;
15731573
/**
1574-
* この PaymentFlow のステータス。<a href="https://docs.pay.jp/v2/payment_flows#status" target="_blank">ステータスの詳細についてはこちらをご覧ください。</a>
1574+
* この PaymentFlow のステータス。
15751575
*
15761576
* | 値 |
15771577
* |:---|
@@ -3951,6 +3951,10 @@ export type CreatePaymentMethodData = {
39513951
};
39523952

39533953
export type CreatePaymentMethodErrors = {
3954+
/**
3955+
* Invalid Apple Pay Token<br>Unacceptable Brand On Apple Pay
3956+
*/
3957+
400: ErrorResponse;
39543958
/**
39553959
* Not Found
39563960
*/
@@ -4747,7 +4751,7 @@ export type CreatePaymentFlowData = {
47474751

47484752
export type CreatePaymentFlowErrors = {
47494753
/**
4750-
* Detached Payment Method Not Usable<br>Payment Method Not Owned By Customer<br>Payment Method Type Not Allowed
4754+
* Missing Payment Method<br>Detached Payment Method Not Usable<br>Payment Method Not Owned By Customer<br>Payment Method Type Not Allowed<br>Apple Pay Disabled In Livemode<br>Invalid Apple Pay Token<br>Unacceptable Brand On Apple Pay
47514755
*/
47524756
400: ErrorResponse;
47534757
/**
@@ -4878,7 +4882,7 @@ export type ConfirmPaymentFlowData = {
48784882

48794883
export type ConfirmPaymentFlowErrors = {
48804884
/**
4881-
* Invalid Status<br>Missing Payment Method<br>Detached Payment Method Not Usable<br>Payment Method Not Owned By Customer<br>Customer Required For Payment Method<br>Payment Method Type Not Allowed
4885+
* Invalid Status<br>Missing Payment Method<br>Detached Payment Method Not Usable<br>Payment Method Not Owned By Customer<br>Customer Required For Payment Method<br>Payment Method Type Not Allowed<br>Apple Pay Disabled In Livemode<br>Invalid Apple Pay Token<br>Unacceptable Brand On Apple Pay
48824886
*/
48834887
400: ErrorResponse;
48844888
/**
@@ -5342,7 +5346,7 @@ export type CreateSetupFlowData = {
53425346

53435347
export type CreateSetupFlowErrors = {
53445348
/**
5345-
* Detached Payment Method Not Usable<br>Unsupported Payment Method Type<br>Invalid Request
5349+
* Invalid Request
53465350
*/
53475351
400: ErrorResponse;
53485352
/**
@@ -6115,7 +6119,7 @@ export type CreateCustomerData = {
61156119

61166120
export type CreateCustomerErrors = {
61176121
/**
6118-
* Already Exists ID<br>Unsupported Payment Method Type
6122+
* Already Exists ID<br>Unsupported Payment Method Type<br>Payment Method Already Attached<br>Payment Method Customer Mismatch
61196123
*/
61206124
400: ErrorResponse;
61216125
/**
@@ -6485,6 +6489,10 @@ export type GetAllPaymentTransactionsErrors = {
64856489
* Resource Missing
64866490
*/
64876491
400: ErrorResponse;
6492+
/**
6493+
* Not Found
6494+
*/
6495+
404: ErrorResponse;
64886496
/**
64896497
* Validation Error
64906498
*/

examples/example.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ async function run() {
3636
body: {
3737
email: "test@example.com",
3838
description: "Test customer from Node.js SDK",
39+
metadata: { key1: "value1", key2: 123, key3: true },
3940
},
4041
headers: {
4142
"Idempotency-Key": idempotencyKey,
@@ -50,6 +51,7 @@ async function run() {
5051
const customerId = createResult.data!.id!;
5152
console.log("Created customer:", customerId);
5253
console.log("Email:", createResult.data!.email);
54+
console.log("Metadata:", JSON.stringify(createResult.data!.metadata));
5355
console.log();
5456

5557
// 2. Get Customer
@@ -69,6 +71,7 @@ async function run() {
6971
console.log("Retrieved customer:", getResult.data!.id);
7072
console.log("Email:", getResult.data!.email);
7173
console.log("Description:", getResult.data!.description ?? "(none)");
74+
console.log("Metadata:", JSON.stringify(getResult.data!.metadata));
7275
console.log();
7376

7477
// 3. Update Customer
@@ -81,6 +84,7 @@ async function run() {
8184
body: {
8285
email: "updated@example.com",
8386
description: "Updated description from Node.js SDK",
87+
metadata: { key1: "updated_value", key4: 456 },
8488
},
8589
});
8690

@@ -92,6 +96,7 @@ async function run() {
9296
console.log("Updated customer:", updateResult.data!.id);
9397
console.log("New email:", updateResult.data!.email);
9498
console.log("New description:", updateResult.data!.description ?? "(none)");
99+
console.log("Metadata:", JSON.stringify(updateResult.data!.metadata));
95100
console.log();
96101

97102
// 4. List Customers

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@payjp/payjpv2",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"type": "module",
55
"main": "dist/index.cjs",
66
"module": "dist/index.mjs",

payjpv2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
type Client,
66
} from "./client/client";
77

8-
const BINDINGS_VERSION = '1.0.7';
8+
const BINDINGS_VERSION = '1.0.8';
99
const DEFAULT_BASE_URL = "https://api.pay.jp";
1010

1111
export interface ClientConfig {

0 commit comments

Comments
 (0)