@inkress/admin-sdk 1.1.44 → 1.1.45
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/README.md +11 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -128,7 +128,7 @@ const products = await inkress.public.getMerchantProducts('merchant-username', {
|
|
|
128
128
|
|
|
129
129
|
// Get merchant fees
|
|
130
130
|
const fees = await inkress.public.getMerchantFees('merchant-username', {
|
|
131
|
-
|
|
131
|
+
currency_code: 'JMD', // JMD = 1, USD = 2
|
|
132
132
|
total: 1000
|
|
133
133
|
});
|
|
134
134
|
```
|
|
@@ -142,8 +142,8 @@ The SDK automatically translates human-readable strings to API integers:
|
|
|
142
142
|
const order = await inkress.orders.create({
|
|
143
143
|
total: 99.99,
|
|
144
144
|
currency_code: 'USD',
|
|
145
|
-
status: 'pending',
|
|
146
|
-
kind: 'online',
|
|
145
|
+
status: 'pending',
|
|
146
|
+
kind: 'online',
|
|
147
147
|
customer: {
|
|
148
148
|
email: 'customer@example.com',
|
|
149
149
|
first_name: 'John',
|
|
@@ -154,19 +154,16 @@ const order = await inkress.orders.create({
|
|
|
154
154
|
|
|
155
155
|
// Update merchant with contextual values
|
|
156
156
|
const merchant = await inkress.merchants.update(123, {
|
|
157
|
-
status: 'approved',
|
|
158
|
-
platform_fee_structure: 'customer_pay',
|
|
157
|
+
status: 'approved',
|
|
158
|
+
platform_fee_structure: 'customer_pay',
|
|
159
159
|
provider_fee_structure: 'merchant_absorb'
|
|
160
160
|
});
|
|
161
161
|
|
|
162
|
-
// Create user
|
|
162
|
+
// Create user
|
|
163
163
|
const user = await inkress.users.create({
|
|
164
164
|
email: 'user@example.com',
|
|
165
165
|
first_name: 'John',
|
|
166
166
|
last_name: 'Doe',
|
|
167
|
-
password: 'secure-password',
|
|
168
|
-
status: 'pending', // SDK converts to account_pending integer
|
|
169
|
-
kind: 'organisation' // SDK converts to user_organisation integer
|
|
170
167
|
});
|
|
171
168
|
```
|
|
172
169
|
|
|
@@ -180,7 +177,7 @@ const orders = await inkress.orders.query({
|
|
|
180
177
|
status: ['confirmed', 'shipped'], // Array → IN query
|
|
181
178
|
total: { min: 100, max: 1000 }, // Range query
|
|
182
179
|
reference_id: { contains: 'VIP' }, // String search
|
|
183
|
-
inserted_at: {
|
|
180
|
+
inserted_at: { min: '2024-01-01' },
|
|
184
181
|
page: 1,
|
|
185
182
|
page_size: 20
|
|
186
183
|
});
|
|
@@ -554,7 +551,7 @@ await inkress.billingPlans.get(planId);
|
|
|
554
551
|
await inkress.billingPlans.create({
|
|
555
552
|
name: 'Premium Plan',
|
|
556
553
|
amount: 29.99,
|
|
557
|
-
|
|
554
|
+
currency_code: 'USD', // JMD = 1, USD = 2
|
|
558
555
|
kind: 'subscription', // Contextual
|
|
559
556
|
status: 'active'
|
|
560
557
|
});
|
|
@@ -674,7 +671,7 @@ await inkress.paymentLinks.list({ status: 'active' });
|
|
|
674
671
|
await inkress.paymentLinks.create({
|
|
675
672
|
title: 'Product Payment',
|
|
676
673
|
amount: 99.99,
|
|
677
|
-
|
|
674
|
+
currency_code: 'USD', // JMD = 1, USD = 2
|
|
678
675
|
status: 'active'
|
|
679
676
|
});
|
|
680
677
|
|
|
@@ -695,7 +692,7 @@ await inkress.financialAccounts.list();
|
|
|
695
692
|
await inkress.financialAccounts.create({
|
|
696
693
|
name: 'Main Account',
|
|
697
694
|
type: 'checking',
|
|
698
|
-
|
|
695
|
+
currency_code: 'USD' // JMD = 1, USD = 2
|
|
699
696
|
});
|
|
700
697
|
|
|
701
698
|
// Update account
|
|
@@ -807,7 +804,7 @@ await inkress.public.getMerchantProducts('merchant-name', {
|
|
|
807
804
|
|
|
808
805
|
// Get merchant fees (fully typed)
|
|
809
806
|
const fees = await inkress.public.getMerchantFees('merchant-name', {
|
|
810
|
-
|
|
807
|
+
currency_code: 'USD', // JMD = 1, USD = 2
|
|
811
808
|
total: 100
|
|
812
809
|
});
|
|
813
810
|
// Returns: PublicMerchantFees
|