@commercelayer/sdk 4.24.1 → 4.26.0
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/lib/cjs/api.d.ts +6 -2
- package/lib/cjs/api.js +15 -3
- package/lib/cjs/commercelayer.d.ts +6 -2
- package/lib/cjs/commercelayer.js +5 -1
- package/lib/cjs/model.d.ts +4 -0
- package/lib/cjs/resources/axerve_gateways.d.ts +43 -0
- package/lib/cjs/resources/axerve_gateways.js +41 -0
- package/lib/cjs/resources/axerve_payments.d.ts +46 -0
- package/lib/cjs/resources/axerve_payments.js +41 -0
- package/lib/cjs/resources/customer_payment_sources.d.ts +11 -3
- package/lib/cjs/resources/manual_gateways.d.ts +0 -3
- package/lib/cjs/resources/orders.d.ts +11 -3
- package/lib/cjs/resources/payment_methods.d.ts +11 -0
- package/lib/cjs/resources/satispay_gateways.d.ts +39 -0
- package/lib/cjs/resources/satispay_gateways.js +41 -0
- package/lib/cjs/resources/satispay_payments.d.ts +43 -0
- package/lib/cjs/resources/satispay_payments.js +41 -0
- package/lib/esm/api.d.ts +6 -2
- package/lib/esm/api.js +8 -0
- package/lib/esm/commercelayer.d.ts +6 -2
- package/lib/esm/commercelayer.js +5 -1
- package/lib/esm/model.d.ts +4 -0
- package/lib/esm/resources/axerve_gateways.d.ts +43 -0
- package/lib/esm/resources/axerve_gateways.js +39 -0
- package/lib/esm/resources/axerve_payments.d.ts +46 -0
- package/lib/esm/resources/axerve_payments.js +39 -0
- package/lib/esm/resources/customer_payment_sources.d.ts +11 -3
- package/lib/esm/resources/manual_gateways.d.ts +0 -3
- package/lib/esm/resources/orders.d.ts +11 -3
- package/lib/esm/resources/payment_methods.d.ts +11 -0
- package/lib/esm/resources/satispay_gateways.d.ts +39 -0
- package/lib/esm/resources/satispay_gateways.js +39 -0
- package/lib/esm/resources/satispay_payments.d.ts +43 -0
- package/lib/esm/resources/satispay_payments.js +39 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
package/lib/cjs/api.d.ts
CHANGED
@@ -9,6 +9,8 @@ export { default as Applications } from './resources/application';
|
|
9
9
|
export { default as Attachments } from './resources/attachments';
|
10
10
|
export { default as Authorizations } from './resources/authorizations';
|
11
11
|
export { default as AvalaraAccounts } from './resources/avalara_accounts';
|
12
|
+
export { default as AxerveGateways } from './resources/axerve_gateways';
|
13
|
+
export { default as AxervePayments } from './resources/axerve_payments';
|
12
14
|
export { default as BillingInfoValidationRules } from './resources/billing_info_validation_rules';
|
13
15
|
export { default as BingGeocoders } from './resources/bing_geocoders';
|
14
16
|
export { default as BraintreeGateways } from './resources/braintree_gateways';
|
@@ -80,6 +82,8 @@ export { default as Promotions } from './resources/promotions';
|
|
80
82
|
export { default as Refunds } from './resources/refunds';
|
81
83
|
export { default as ReturnLineItems } from './resources/return_line_items';
|
82
84
|
export { default as Returns } from './resources/returns';
|
85
|
+
export { default as SatispayGateways } from './resources/satispay_gateways';
|
86
|
+
export { default as SatispayPayments } from './resources/satispay_payments';
|
83
87
|
export { default as Shipments } from './resources/shipments';
|
84
88
|
export { default as ShippingCategories } from './resources/shipping_categories';
|
85
89
|
export { default as ShippingMethodTiers } from './resources/shipping_method_tiers';
|
@@ -105,5 +109,5 @@ export { default as Transactions } from './resources/transactions';
|
|
105
109
|
export { default as Voids } from './resources/voids';
|
106
110
|
export { default as Webhooks } from './resources/webhooks';
|
107
111
|
export { default as WireTransfers } from './resources/wire_transfers';
|
108
|
-
export type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'events' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | 'return_line_items' | 'returns' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
|
109
|
-
export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "events", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "refunds", "return_line_items", "returns", "shipments", "shipping_categories", "shipping_method_tiers", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_transfers", "stripe_gateways", "stripe_payments", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
|
112
|
+
export type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'axerve_gateways' | 'axerve_payments' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'cleanups' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'events' | 'exports' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_lists' | 'price_tiers' | 'price_volume_tiers' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | 'return_line_items' | 'returns' | 'satispay_gateways' | 'satispay_payments' | 'shipments' | 'shipping_categories' | 'shipping_method_tiers' | 'shipping_methods' | 'shipping_weight_tiers' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
|
113
|
+
export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "axerve_gateways", "axerve_payments", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "cleanups", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "events", "exports", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_lists", "price_tiers", "price_volume_tiers", "prices", "promotion_rules", "promotions", "refunds", "return_line_items", "returns", "satispay_gateways", "satispay_payments", "shipments", "shipping_categories", "shipping_method_tiers", "shipping_methods", "shipping_weight_tiers", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_transfers", "stripe_gateways", "stripe_payments", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
|
package/lib/cjs/api.js
CHANGED
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.
|
7
|
-
exports.
|
8
|
-
exports.resourceList = exports.WireTransfers = exports.Webhooks = exports.Voids = exports.Transactions = void 0;
|
6
|
+
exports.InventoryStockLocations = exports.InventoryReturnLocations = exports.InventoryModels = exports.InStockSubscriptions = exports.Imports = exports.GoogleGeocoders = exports.GiftCards = exports.GiftCardRecipients = exports.Geocoders = exports.FreeShippingPromotions = exports.FreeGiftPromotions = exports.FixedPricePromotions = exports.FixedAmountPromotions = exports.ExternalTaxCalculators = exports.ExternalPromotions = exports.ExternalPayments = exports.ExternalGateways = exports.Exports = exports.Events = exports.EventCallbacks = exports.DeliveryLeadTimes = exports.Customers = exports.CustomerSubscriptions = exports.CustomerPaymentSources = exports.CustomerPasswordResets = exports.CustomerGroups = exports.CustomerAddresses = exports.Coupons = exports.CouponRecipients = exports.CouponCodesPromotionRules = exports.Cleanups = exports.CheckoutComPayments = exports.CheckoutComGateways = exports.CarrierAccounts = exports.Captures = exports.Bundles = exports.BraintreePayments = exports.BraintreeGateways = exports.BingGeocoders = exports.BillingInfoValidationRules = exports.AxervePayments = exports.AxerveGateways = exports.AvalaraAccounts = exports.Authorizations = exports.Attachments = exports.Applications = exports.AdyenPayments = exports.AdyenGateways = exports.Adjustments = exports.Addresses = void 0;
|
7
|
+
exports.StripePayments = exports.StripeGateways = exports.StockTransfers = exports.StockLocations = exports.StockLineItems = exports.StockItems = exports.Skus = exports.SkuOptions = exports.SkuLists = exports.SkuListPromotionRules = exports.SkuListItems = exports.ShippingZones = exports.ShippingWeightTiers = exports.ShippingMethods = exports.ShippingMethodTiers = exports.ShippingCategories = exports.Shipments = exports.SatispayPayments = exports.SatispayGateways = exports.Returns = exports.ReturnLineItems = exports.Refunds = exports.Promotions = exports.PromotionRules = exports.Prices = exports.PriceVolumeTiers = exports.PriceTiers = exports.PriceLists = exports.PercentageDiscountPromotions = exports.PaypalPayments = exports.PaypalGateways = exports.PaymentMethods = exports.PaymentGateways = exports.Parcels = exports.ParcelLineItems = exports.Packages = exports.Organizations = exports.Orders = exports.OrderValidationRules = exports.OrderSubscriptions = exports.OrderCopies = exports.OrderAmountPromotionRules = exports.Merchants = exports.Markets = exports.ManualTaxCalculators = exports.ManualGateways = exports.LineItems = exports.LineItemOptions = exports.KlarnaPayments = exports.KlarnaGateways = void 0;
|
8
|
+
exports.resourceList = exports.WireTransfers = exports.Webhooks = exports.Voids = exports.Transactions = exports.TaxjarAccounts = exports.TaxRules = exports.TaxCategories = exports.TaxCalculators = void 0;
|
9
9
|
// ##__API_RESOURCES_START__##
|
10
10
|
// ##__API_RESOURCES_TEMPLATE:: export { default as ##__RESOURCE_CLASS__## } from './resources/##__RESOURCE_TYPE__##'
|
11
11
|
/**
|
@@ -27,6 +27,10 @@ var authorizations_1 = require("./resources/authorizations");
|
|
27
27
|
Object.defineProperty(exports, "Authorizations", { enumerable: true, get: function () { return __importDefault(authorizations_1).default; } });
|
28
28
|
var avalara_accounts_1 = require("./resources/avalara_accounts");
|
29
29
|
Object.defineProperty(exports, "AvalaraAccounts", { enumerable: true, get: function () { return __importDefault(avalara_accounts_1).default; } });
|
30
|
+
var axerve_gateways_1 = require("./resources/axerve_gateways");
|
31
|
+
Object.defineProperty(exports, "AxerveGateways", { enumerable: true, get: function () { return __importDefault(axerve_gateways_1).default; } });
|
32
|
+
var axerve_payments_1 = require("./resources/axerve_payments");
|
33
|
+
Object.defineProperty(exports, "AxervePayments", { enumerable: true, get: function () { return __importDefault(axerve_payments_1).default; } });
|
30
34
|
var billing_info_validation_rules_1 = require("./resources/billing_info_validation_rules");
|
31
35
|
Object.defineProperty(exports, "BillingInfoValidationRules", { enumerable: true, get: function () { return __importDefault(billing_info_validation_rules_1).default; } });
|
32
36
|
var bing_geocoders_1 = require("./resources/bing_geocoders");
|
@@ -169,6 +173,10 @@ var return_line_items_1 = require("./resources/return_line_items");
|
|
169
173
|
Object.defineProperty(exports, "ReturnLineItems", { enumerable: true, get: function () { return __importDefault(return_line_items_1).default; } });
|
170
174
|
var returns_1 = require("./resources/returns");
|
171
175
|
Object.defineProperty(exports, "Returns", { enumerable: true, get: function () { return __importDefault(returns_1).default; } });
|
176
|
+
var satispay_gateways_1 = require("./resources/satispay_gateways");
|
177
|
+
Object.defineProperty(exports, "SatispayGateways", { enumerable: true, get: function () { return __importDefault(satispay_gateways_1).default; } });
|
178
|
+
var satispay_payments_1 = require("./resources/satispay_payments");
|
179
|
+
Object.defineProperty(exports, "SatispayPayments", { enumerable: true, get: function () { return __importDefault(satispay_payments_1).default; } });
|
172
180
|
var shipments_1 = require("./resources/shipments");
|
173
181
|
Object.defineProperty(exports, "Shipments", { enumerable: true, get: function () { return __importDefault(shipments_1).default; } });
|
174
182
|
var shipping_categories_1 = require("./resources/shipping_categories");
|
@@ -230,6 +238,8 @@ exports.resourceList = [
|
|
230
238
|
'attachments',
|
231
239
|
'authorizations',
|
232
240
|
'avalara_accounts',
|
241
|
+
'axerve_gateways',
|
242
|
+
'axerve_payments',
|
233
243
|
'billing_info_validation_rules',
|
234
244
|
'bing_geocoders',
|
235
245
|
'braintree_gateways',
|
@@ -301,6 +311,8 @@ exports.resourceList = [
|
|
301
311
|
'refunds',
|
302
312
|
'return_line_items',
|
303
313
|
'returns',
|
314
|
+
'satispay_gateways',
|
315
|
+
'satispay_payments',
|
304
316
|
'shipments',
|
305
317
|
'shipping_categories',
|
306
318
|
'shipping_method_tiers',
|
@@ -2,7 +2,7 @@ import * as api from './api';
|
|
2
2
|
import { ApiError } from './error';
|
3
3
|
import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
|
4
4
|
import { ResourcesInitConfig } from './resource';
|
5
|
-
declare const OPEN_API_SCHEMA_VERSION = "
|
5
|
+
declare const OPEN_API_SCHEMA_VERSION = "4.0.1";
|
6
6
|
export { OPEN_API_SCHEMA_VERSION };
|
7
7
|
type SdkConfig = {};
|
8
8
|
type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
@@ -10,7 +10,7 @@ type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
|
10
10
|
declare class CommerceLayerClient {
|
11
11
|
#private;
|
12
12
|
static get openApiSchemaVersion(): string;
|
13
|
-
readonly openApiSchemaVersion = "
|
13
|
+
readonly openApiSchemaVersion = "4.0.1";
|
14
14
|
addresses: api.Addresses;
|
15
15
|
adjustments: api.Adjustments;
|
16
16
|
adyen_gateways: api.AdyenGateways;
|
@@ -19,6 +19,8 @@ declare class CommerceLayerClient {
|
|
19
19
|
attachments: api.Attachments;
|
20
20
|
authorizations: api.Authorizations;
|
21
21
|
avalara_accounts: api.AvalaraAccounts;
|
22
|
+
axerve_gateways: api.AxerveGateways;
|
23
|
+
axerve_payments: api.AxervePayments;
|
22
24
|
billing_info_validation_rules: api.BillingInfoValidationRules;
|
23
25
|
bing_geocoders: api.BingGeocoders;
|
24
26
|
braintree_gateways: api.BraintreeGateways;
|
@@ -90,6 +92,8 @@ declare class CommerceLayerClient {
|
|
90
92
|
refunds: api.Refunds;
|
91
93
|
return_line_items: api.ReturnLineItems;
|
92
94
|
returns: api.Returns;
|
95
|
+
satispay_gateways: api.SatispayGateways;
|
96
|
+
satispay_payments: api.SatispayPayments;
|
93
97
|
shipments: api.Shipments;
|
94
98
|
shipping_categories: api.ShippingCategories;
|
95
99
|
shipping_method_tiers: api.ShippingMethodTiers;
|
package/lib/cjs/commercelayer.js
CHANGED
@@ -45,7 +45,7 @@ const resource_1 = __importDefault(require("./resource"));
|
|
45
45
|
const debug_1 = __importDefault(require("./debug"));
|
46
46
|
const debug = (0, debug_1.default)('commercelayer');
|
47
47
|
// Autogenerated schema version number, do not remove this line
|
48
|
-
const OPEN_API_SCHEMA_VERSION = '
|
48
|
+
const OPEN_API_SCHEMA_VERSION = '4.0.1';
|
49
49
|
exports.OPEN_API_SCHEMA_VERSION = OPEN_API_SCHEMA_VERSION;
|
50
50
|
class CommerceLayerClient {
|
51
51
|
static get openApiSchemaVersion() { return OPEN_API_SCHEMA_VERSION; }
|
@@ -67,6 +67,8 @@ class CommerceLayerClient {
|
|
67
67
|
this.attachments = new api.Attachments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
68
68
|
this.authorizations = new api.Authorizations(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
69
69
|
this.avalara_accounts = new api.AvalaraAccounts(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
70
|
+
this.axerve_gateways = new api.AxerveGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
71
|
+
this.axerve_payments = new api.AxervePayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
70
72
|
this.billing_info_validation_rules = new api.BillingInfoValidationRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
71
73
|
this.bing_geocoders = new api.BingGeocoders(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
72
74
|
this.braintree_gateways = new api.BraintreeGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
@@ -138,6 +140,8 @@ class CommerceLayerClient {
|
|
138
140
|
this.refunds = new api.Refunds(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
139
141
|
this.return_line_items = new api.ReturnLineItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
140
142
|
this.returns = new api.Returns(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
143
|
+
this.satispay_gateways = new api.SatispayGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
144
|
+
this.satispay_payments = new api.SatispayPayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
141
145
|
this.shipments = new api.Shipments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
142
146
|
this.shipping_categories = new api.ShippingCategories(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
143
147
|
this.shipping_method_tiers = new api.ShippingMethodTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
|
package/lib/cjs/model.d.ts
CHANGED
@@ -9,6 +9,8 @@ export type { Application } from './resources/application';
|
|
9
9
|
export type { Attachment, AttachmentCreate, AttachmentUpdate } from './resources/attachments';
|
10
10
|
export type { Authorization, AuthorizationUpdate } from './resources/authorizations';
|
11
11
|
export type { AvalaraAccount, AvalaraAccountCreate, AvalaraAccountUpdate } from './resources/avalara_accounts';
|
12
|
+
export type { AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate } from './resources/axerve_gateways';
|
13
|
+
export type { AxervePayment, AxervePaymentCreate, AxervePaymentUpdate } from './resources/axerve_payments';
|
12
14
|
export type { BillingInfoValidationRule, BillingInfoValidationRuleCreate, BillingInfoValidationRuleUpdate } from './resources/billing_info_validation_rules';
|
13
15
|
export type { BingGeocoder, BingGeocoderCreate, BingGeocoderUpdate } from './resources/bing_geocoders';
|
14
16
|
export type { BraintreeGateway, BraintreeGatewayCreate, BraintreeGatewayUpdate } from './resources/braintree_gateways';
|
@@ -80,6 +82,8 @@ export type { Promotion } from './resources/promotions';
|
|
80
82
|
export type { Refund } from './resources/refunds';
|
81
83
|
export type { ReturnLineItem, ReturnLineItemCreate, ReturnLineItemUpdate } from './resources/return_line_items';
|
82
84
|
export type { Return, ReturnCreate, ReturnUpdate } from './resources/returns';
|
85
|
+
export type { SatispayGateway, SatispayGatewayCreate, SatispayGatewayUpdate } from './resources/satispay_gateways';
|
86
|
+
export type { SatispayPayment, SatispayPaymentCreate, SatispayPaymentUpdate } from './resources/satispay_payments';
|
83
87
|
export type { Shipment, ShipmentUpdate } from './resources/shipments';
|
84
88
|
export type { ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate } from './resources/shipping_categories';
|
85
89
|
export type { ShippingMethodTier } from './resources/shipping_method_tiers';
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { PaymentMethod } from './payment_methods';
|
4
|
+
import type { AxervePayment } from './axerve_payments';
|
5
|
+
type AxerveGatewayRel = ResourceRel & {
|
6
|
+
type: typeof AxerveGateways.TYPE;
|
7
|
+
};
|
8
|
+
type AxervePaymentRel = ResourceRel & {
|
9
|
+
type: 'axerve_payments';
|
10
|
+
};
|
11
|
+
interface AxerveGateway extends Resource {
|
12
|
+
name?: string;
|
13
|
+
login?: string;
|
14
|
+
payment_methods?: PaymentMethod[];
|
15
|
+
axerve_payments?: AxervePayment[];
|
16
|
+
}
|
17
|
+
interface AxerveGatewayCreate extends ResourceCreate {
|
18
|
+
name: string;
|
19
|
+
login: string;
|
20
|
+
api_key: string;
|
21
|
+
axerve_payments?: AxervePaymentRel[];
|
22
|
+
}
|
23
|
+
interface AxerveGatewayUpdate extends ResourceUpdate {
|
24
|
+
name?: string;
|
25
|
+
login?: string;
|
26
|
+
api_key?: string;
|
27
|
+
axerve_payments?: AxervePaymentRel[];
|
28
|
+
}
|
29
|
+
declare class AxerveGateways extends ApiResource {
|
30
|
+
static readonly TYPE: 'axerve_gateways';
|
31
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxerveGateway>>;
|
32
|
+
create(resource: AxerveGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
33
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
34
|
+
update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxerveGateway>;
|
35
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
36
|
+
payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
37
|
+
axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>>;
|
38
|
+
isAxerveGateway(resource: any): resource is AxerveGateway;
|
39
|
+
relationship(id: string | ResourceId | null): AxerveGatewayRel;
|
40
|
+
type(): string;
|
41
|
+
}
|
42
|
+
export default AxerveGateways;
|
43
|
+
export { AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate };
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const resource_1 = require("../resource");
|
4
|
+
class AxerveGateways extends resource_1.ApiResource {
|
5
|
+
// static readonly PATH = 'axerve_gateways'
|
6
|
+
async list(params, options) {
|
7
|
+
return this.resources.list({ type: AxerveGateways.TYPE }, params, options);
|
8
|
+
}
|
9
|
+
async create(resource, params, options) {
|
10
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: AxerveGateways.TYPE }), params, options);
|
11
|
+
}
|
12
|
+
async retrieve(id, params, options) {
|
13
|
+
return this.resources.retrieve({ type: AxerveGateways.TYPE, id }, params, options);
|
14
|
+
}
|
15
|
+
async update(resource, params, options) {
|
16
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: AxerveGateways.TYPE }), params, options);
|
17
|
+
}
|
18
|
+
async delete(id, options) {
|
19
|
+
await this.resources.delete({ type: AxerveGateways.TYPE, id }, options);
|
20
|
+
}
|
21
|
+
async payment_methods(axerveGatewayId, params, options) {
|
22
|
+
const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
|
23
|
+
return this.resources.fetch({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options);
|
24
|
+
}
|
25
|
+
async axerve_payments(axerveGatewayId, params, options) {
|
26
|
+
const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId;
|
27
|
+
return this.resources.fetch({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_payments`, params, options);
|
28
|
+
}
|
29
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
30
|
+
isAxerveGateway(resource) {
|
31
|
+
return resource.type && (resource.type === AxerveGateways.TYPE);
|
32
|
+
}
|
33
|
+
relationship(id) {
|
34
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: AxerveGateways.TYPE } : { id: id.id, type: AxerveGateways.TYPE };
|
35
|
+
}
|
36
|
+
type() {
|
37
|
+
return AxerveGateways.TYPE;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
AxerveGateways.TYPE = 'axerve_gateways';
|
41
|
+
exports.default = AxerveGateways;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { Order } from './orders';
|
4
|
+
import type { PaymentGateway } from './payment_gateways';
|
5
|
+
type AxervePaymentRel = ResourceRel & {
|
6
|
+
type: typeof AxervePayments.TYPE;
|
7
|
+
};
|
8
|
+
type OrderRel = ResourceRel & {
|
9
|
+
type: 'orders';
|
10
|
+
};
|
11
|
+
interface AxervePayment extends Resource {
|
12
|
+
login?: string;
|
13
|
+
return_url?: string;
|
14
|
+
payment_request_data?: object;
|
15
|
+
mismatched_amounts?: boolean;
|
16
|
+
intent_amount_cents?: number;
|
17
|
+
intent_amount_float?: number;
|
18
|
+
formatted_intent_amount?: string;
|
19
|
+
payment_instrument?: object;
|
20
|
+
order?: Order;
|
21
|
+
payment_gateway?: PaymentGateway;
|
22
|
+
}
|
23
|
+
interface AxervePaymentCreate extends ResourceCreate {
|
24
|
+
return_url: string;
|
25
|
+
order: OrderRel;
|
26
|
+
}
|
27
|
+
interface AxervePaymentUpdate extends ResourceUpdate {
|
28
|
+
payment_request_data?: object;
|
29
|
+
_update?: boolean;
|
30
|
+
order?: OrderRel;
|
31
|
+
}
|
32
|
+
declare class AxervePayments extends ApiResource {
|
33
|
+
static readonly TYPE: 'axerve_payments';
|
34
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>>;
|
35
|
+
create(resource: AxervePaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxervePayment>;
|
36
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxervePayment>;
|
37
|
+
update(resource: AxervePaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AxervePayment>;
|
38
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
39
|
+
order(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
|
40
|
+
payment_gateway(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
|
41
|
+
isAxervePayment(resource: any): resource is AxervePayment;
|
42
|
+
relationship(id: string | ResourceId | null): AxervePaymentRel;
|
43
|
+
type(): string;
|
44
|
+
}
|
45
|
+
export default AxervePayments;
|
46
|
+
export { AxervePayment, AxervePaymentCreate, AxervePaymentUpdate };
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const resource_1 = require("../resource");
|
4
|
+
class AxervePayments extends resource_1.ApiResource {
|
5
|
+
// static readonly PATH = 'axerve_payments'
|
6
|
+
async list(params, options) {
|
7
|
+
return this.resources.list({ type: AxervePayments.TYPE }, params, options);
|
8
|
+
}
|
9
|
+
async create(resource, params, options) {
|
10
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: AxervePayments.TYPE }), params, options);
|
11
|
+
}
|
12
|
+
async retrieve(id, params, options) {
|
13
|
+
return this.resources.retrieve({ type: AxervePayments.TYPE, id }, params, options);
|
14
|
+
}
|
15
|
+
async update(resource, params, options) {
|
16
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: AxervePayments.TYPE }), params, options);
|
17
|
+
}
|
18
|
+
async delete(id, options) {
|
19
|
+
await this.resources.delete({ type: AxervePayments.TYPE, id }, options);
|
20
|
+
}
|
21
|
+
async order(axervePaymentId, params, options) {
|
22
|
+
const _axervePaymentId = axervePaymentId.id || axervePaymentId;
|
23
|
+
return this.resources.fetch({ type: 'orders' }, `axerve_payments/${_axervePaymentId}/order`, params, options);
|
24
|
+
}
|
25
|
+
async payment_gateway(axervePaymentId, params, options) {
|
26
|
+
const _axervePaymentId = axervePaymentId.id || axervePaymentId;
|
27
|
+
return this.resources.fetch({ type: 'payment_gateways' }, `axerve_payments/${_axervePaymentId}/payment_gateway`, params, options);
|
28
|
+
}
|
29
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
30
|
+
isAxervePayment(resource) {
|
31
|
+
return resource.type && (resource.type === AxervePayments.TYPE);
|
32
|
+
}
|
33
|
+
relationship(id) {
|
34
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: AxervePayments.TYPE } : { id: id.id, type: AxervePayments.TYPE };
|
35
|
+
}
|
36
|
+
type() {
|
37
|
+
return AxervePayments.TYPE;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
AxervePayments.TYPE = 'axerve_payments';
|
41
|
+
exports.default = AxervePayments;
|
@@ -2,11 +2,13 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import type { Customer } from './customers';
|
4
4
|
import type { AdyenPayment } from './adyen_payments';
|
5
|
+
import type { AxervePayment } from './axerve_payments';
|
5
6
|
import type { BraintreePayment } from './braintree_payments';
|
6
7
|
import type { CheckoutComPayment } from './checkout_com_payments';
|
7
8
|
import type { ExternalPayment } from './external_payments';
|
8
9
|
import type { KlarnaPayment } from './klarna_payments';
|
9
10
|
import type { PaypalPayment } from './paypal_payments';
|
11
|
+
import type { SatispayPayment } from './satispay_payments';
|
10
12
|
import type { StripePayment } from './stripe_payments';
|
11
13
|
import type { WireTransfer } from './wire_transfers';
|
12
14
|
type CustomerPaymentSourceRel = ResourceRel & {
|
@@ -18,6 +20,9 @@ type CustomerRel = ResourceRel & {
|
|
18
20
|
type AdyenPaymentRel = ResourceRel & {
|
19
21
|
type: 'adyen_payments';
|
20
22
|
};
|
23
|
+
type AxervePaymentRel = ResourceRel & {
|
24
|
+
type: 'axerve_payments';
|
25
|
+
};
|
21
26
|
type BraintreePaymentRel = ResourceRel & {
|
22
27
|
type: 'braintree_payments';
|
23
28
|
};
|
@@ -33,6 +38,9 @@ type KlarnaPaymentRel = ResourceRel & {
|
|
33
38
|
type PaypalPaymentRel = ResourceRel & {
|
34
39
|
type: 'paypal_payments';
|
35
40
|
};
|
41
|
+
type SatispayPaymentRel = ResourceRel & {
|
42
|
+
type: 'satispay_payments';
|
43
|
+
};
|
36
44
|
type StripePaymentRel = ResourceRel & {
|
37
45
|
type: 'stripe_payments';
|
38
46
|
};
|
@@ -44,15 +52,15 @@ interface CustomerPaymentSource extends Resource {
|
|
44
52
|
customer_token?: string;
|
45
53
|
payment_source_token?: string;
|
46
54
|
customer?: Customer;
|
47
|
-
payment_source?: AdyenPayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | StripePayment | WireTransfer;
|
55
|
+
payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer;
|
48
56
|
}
|
49
57
|
interface CustomerPaymentSourceCreate extends ResourceCreate {
|
50
58
|
customer: CustomerRel;
|
51
|
-
payment_source: AdyenPaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | StripePaymentRel | WireTransferRel;
|
59
|
+
payment_source: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel;
|
52
60
|
}
|
53
61
|
interface CustomerPaymentSourceUpdate extends ResourceUpdate {
|
54
62
|
customer?: CustomerRel;
|
55
|
-
payment_source?: AdyenPaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | StripePaymentRel | WireTransferRel;
|
63
|
+
payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel;
|
56
64
|
}
|
57
65
|
declare class CustomerPaymentSources extends ApiResource {
|
58
66
|
static readonly TYPE: 'customer_payment_sources';
|
@@ -6,16 +6,13 @@ type ManualGatewayRel = ResourceRel & {
|
|
6
6
|
};
|
7
7
|
interface ManualGateway extends Resource {
|
8
8
|
name?: string;
|
9
|
-
require_capture?: boolean;
|
10
9
|
payment_methods?: PaymentMethod[];
|
11
10
|
}
|
12
11
|
interface ManualGatewayCreate extends ResourceCreate {
|
13
12
|
name: string;
|
14
|
-
require_capture?: boolean;
|
15
13
|
}
|
16
14
|
interface ManualGatewayUpdate extends ResourceUpdate {
|
17
15
|
name?: string;
|
18
|
-
require_capture?: boolean;
|
19
16
|
}
|
20
17
|
declare class ManualGateways extends ApiResource {
|
21
18
|
static readonly TYPE: 'manual_gateways';
|
@@ -8,11 +8,13 @@ import type { CustomerPaymentSource } from './customer_payment_sources';
|
|
8
8
|
import type { Sku } from './skus';
|
9
9
|
import type { Bundle } from './bundles';
|
10
10
|
import type { AdyenPayment } from './adyen_payments';
|
11
|
+
import type { AxervePayment } from './axerve_payments';
|
11
12
|
import type { BraintreePayment } from './braintree_payments';
|
12
13
|
import type { CheckoutComPayment } from './checkout_com_payments';
|
13
14
|
import type { ExternalPayment } from './external_payments';
|
14
15
|
import type { KlarnaPayment } from './klarna_payments';
|
15
16
|
import type { PaypalPayment } from './paypal_payments';
|
17
|
+
import type { SatispayPayment } from './satispay_payments';
|
16
18
|
import type { StripePayment } from './stripe_payments';
|
17
19
|
import type { WireTransfer } from './wire_transfers';
|
18
20
|
import type { LineItem } from './line_items';
|
@@ -44,6 +46,9 @@ type PaymentMethodRel = ResourceRel & {
|
|
44
46
|
type AdyenPaymentRel = ResourceRel & {
|
45
47
|
type: 'adyen_payments';
|
46
48
|
};
|
49
|
+
type AxervePaymentRel = ResourceRel & {
|
50
|
+
type: 'axerve_payments';
|
51
|
+
};
|
47
52
|
type BraintreePaymentRel = ResourceRel & {
|
48
53
|
type: 'braintree_payments';
|
49
54
|
};
|
@@ -59,6 +64,9 @@ type KlarnaPaymentRel = ResourceRel & {
|
|
59
64
|
type PaypalPaymentRel = ResourceRel & {
|
60
65
|
type: 'paypal_payments';
|
61
66
|
};
|
67
|
+
type SatispayPaymentRel = ResourceRel & {
|
68
|
+
type: 'satispay_payments';
|
69
|
+
};
|
62
70
|
type StripePaymentRel = ResourceRel & {
|
63
71
|
type: 'stripe_payments';
|
64
72
|
};
|
@@ -173,7 +181,7 @@ interface Order extends Resource {
|
|
173
181
|
available_free_skus?: Sku[];
|
174
182
|
available_free_bundles?: Bundle[];
|
175
183
|
payment_method?: PaymentMethod;
|
176
|
-
payment_source?: AdyenPayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | StripePayment | WireTransfer;
|
184
|
+
payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer;
|
177
185
|
line_items?: LineItem[];
|
178
186
|
shipments?: Shipment[];
|
179
187
|
transactions?: Array<Authorization | Void | Capture | Refund>;
|
@@ -206,7 +214,7 @@ interface OrderCreate extends ResourceCreate {
|
|
206
214
|
shipping_address?: AddressRel;
|
207
215
|
billing_address?: AddressRel;
|
208
216
|
payment_method?: PaymentMethodRel;
|
209
|
-
payment_source?: AdyenPaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | StripePaymentRel | WireTransferRel;
|
217
|
+
payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel;
|
210
218
|
}
|
211
219
|
interface OrderUpdate extends ResourceUpdate {
|
212
220
|
autorefresh?: boolean;
|
@@ -251,7 +259,7 @@ interface OrderUpdate extends ResourceUpdate {
|
|
251
259
|
shipping_address?: AddressRel;
|
252
260
|
billing_address?: AddressRel;
|
253
261
|
payment_method?: PaymentMethodRel;
|
254
|
-
payment_source?: AdyenPaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | StripePaymentRel | WireTransferRel;
|
262
|
+
payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel;
|
255
263
|
}
|
256
264
|
declare class Orders extends ApiResource {
|
257
265
|
static readonly TYPE: 'orders';
|
@@ -17,10 +17,15 @@ interface PaymentMethod extends Resource {
|
|
17
17
|
name?: string;
|
18
18
|
currency_code?: string;
|
19
19
|
moto?: boolean;
|
20
|
+
require_capture?: boolean;
|
21
|
+
auto_capture?: boolean;
|
20
22
|
disabled_at?: string;
|
21
23
|
price_amount_cents?: number;
|
22
24
|
price_amount_float?: number;
|
23
25
|
formatted_price_amount?: string;
|
26
|
+
auto_capture_max_amount_cents?: number;
|
27
|
+
auto_capture_max_amount_float?: number;
|
28
|
+
formatted_auto_capture_max_amount?: string;
|
24
29
|
market?: Market;
|
25
30
|
payment_gateway?: PaymentGateway;
|
26
31
|
attachments?: Attachment[];
|
@@ -29,7 +34,10 @@ interface PaymentMethodCreate extends ResourceCreate {
|
|
29
34
|
payment_source_type: string;
|
30
35
|
currency_code?: string;
|
31
36
|
moto?: boolean;
|
37
|
+
require_capture?: boolean;
|
38
|
+
auto_capture?: boolean;
|
32
39
|
price_amount_cents: number;
|
40
|
+
auto_capture_max_amount_cents?: number;
|
33
41
|
market?: MarketRel;
|
34
42
|
payment_gateway: PaymentGatewayRel;
|
35
43
|
}
|
@@ -37,9 +45,12 @@ interface PaymentMethodUpdate extends ResourceUpdate {
|
|
37
45
|
payment_source_type?: string;
|
38
46
|
currency_code?: string;
|
39
47
|
moto?: boolean;
|
48
|
+
require_capture?: boolean;
|
49
|
+
auto_capture?: boolean;
|
40
50
|
_disable?: boolean;
|
41
51
|
_enable?: boolean;
|
42
52
|
price_amount_cents?: number;
|
53
|
+
auto_capture_max_amount_cents?: number;
|
43
54
|
market?: MarketRel;
|
44
55
|
payment_gateway?: PaymentGatewayRel;
|
45
56
|
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import type { PaymentMethod } from './payment_methods';
|
4
|
+
import type { SatispayPayment } from './satispay_payments';
|
5
|
+
type SatispayGatewayRel = ResourceRel & {
|
6
|
+
type: typeof SatispayGateways.TYPE;
|
7
|
+
};
|
8
|
+
type SatispayPaymentRel = ResourceRel & {
|
9
|
+
type: 'satispay_payments';
|
10
|
+
};
|
11
|
+
interface SatispayGateway extends Resource {
|
12
|
+
name?: string;
|
13
|
+
webhook_endpoint_url?: string;
|
14
|
+
payment_methods?: PaymentMethod[];
|
15
|
+
satispay_payments?: SatispayPayment[];
|
16
|
+
}
|
17
|
+
interface SatispayGatewayCreate extends ResourceCreate {
|
18
|
+
name: string;
|
19
|
+
satispay_payments?: SatispayPaymentRel[];
|
20
|
+
}
|
21
|
+
interface SatispayGatewayUpdate extends ResourceUpdate {
|
22
|
+
name?: string;
|
23
|
+
satispay_payments?: SatispayPaymentRel[];
|
24
|
+
}
|
25
|
+
declare class SatispayGateways extends ApiResource {
|
26
|
+
static readonly TYPE: 'satispay_gateways';
|
27
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SatispayGateway>>;
|
28
|
+
create(resource: SatispayGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayGateway>;
|
29
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayGateway>;
|
30
|
+
update(resource: SatispayGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SatispayGateway>;
|
31
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
32
|
+
payment_methods(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
|
33
|
+
satispay_payments(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SatispayPayment>>;
|
34
|
+
isSatispayGateway(resource: any): resource is SatispayGateway;
|
35
|
+
relationship(id: string | ResourceId | null): SatispayGatewayRel;
|
36
|
+
type(): string;
|
37
|
+
}
|
38
|
+
export default SatispayGateways;
|
39
|
+
export { SatispayGateway, SatispayGatewayCreate, SatispayGatewayUpdate };
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const resource_1 = require("../resource");
|
4
|
+
class SatispayGateways extends resource_1.ApiResource {
|
5
|
+
// static readonly PATH = 'satispay_gateways'
|
6
|
+
async list(params, options) {
|
7
|
+
return this.resources.list({ type: SatispayGateways.TYPE }, params, options);
|
8
|
+
}
|
9
|
+
async create(resource, params, options) {
|
10
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: SatispayGateways.TYPE }), params, options);
|
11
|
+
}
|
12
|
+
async retrieve(id, params, options) {
|
13
|
+
return this.resources.retrieve({ type: SatispayGateways.TYPE, id }, params, options);
|
14
|
+
}
|
15
|
+
async update(resource, params, options) {
|
16
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: SatispayGateways.TYPE }), params, options);
|
17
|
+
}
|
18
|
+
async delete(id, options) {
|
19
|
+
await this.resources.delete({ type: SatispayGateways.TYPE, id }, options);
|
20
|
+
}
|
21
|
+
async payment_methods(satispayGatewayId, params, options) {
|
22
|
+
const _satispayGatewayId = satispayGatewayId.id || satispayGatewayId;
|
23
|
+
return this.resources.fetch({ type: 'payment_methods' }, `satispay_gateways/${_satispayGatewayId}/payment_methods`, params, options);
|
24
|
+
}
|
25
|
+
async satispay_payments(satispayGatewayId, params, options) {
|
26
|
+
const _satispayGatewayId = satispayGatewayId.id || satispayGatewayId;
|
27
|
+
return this.resources.fetch({ type: 'satispay_payments' }, `satispay_gateways/${_satispayGatewayId}/satispay_payments`, params, options);
|
28
|
+
}
|
29
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
30
|
+
isSatispayGateway(resource) {
|
31
|
+
return resource.type && (resource.type === SatispayGateways.TYPE);
|
32
|
+
}
|
33
|
+
relationship(id) {
|
34
|
+
return ((id === null) || (typeof id === 'string')) ? { id, type: SatispayGateways.TYPE } : { id: id.id, type: SatispayGateways.TYPE };
|
35
|
+
}
|
36
|
+
type() {
|
37
|
+
return SatispayGateways.TYPE;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
SatispayGateways.TYPE = 'satispay_gateways';
|
41
|
+
exports.default = SatispayGateways;
|