diff --git a/lib/resources/Customers/Contests.js b/lib/resources/Customers/Contests.js new file mode 100644 index 0000000..60961fa --- /dev/null +++ b/lib/resources/Customers/Contests.js @@ -0,0 +1,13 @@ +'use strict'; + +const AifiResource = require('../../AifiResource'); +const aifiMethod = AifiResource.method; + +module.exports = AifiResource.extend({ + path: 'customers/v2/contests', + + create: aifiMethod({ + method: 'POST', + path: '', + }), +}); diff --git a/lib/resources/Customers/Customers.js b/lib/resources/Customers/Customers.js new file mode 100644 index 0000000..4204af3 --- /dev/null +++ b/lib/resources/Customers/Customers.js @@ -0,0 +1,13 @@ +'use strict'; + +const AifiResource = require('../../AifiResource'); +const aifiMethod = AifiResource.method; + +module.exports = AifiResource.extend({ + path: 'customers/v2/customers', + + create: aifiMethod({ + method: 'POST', + path: '', + }), +}); diff --git a/lib/resources/Customers/EntryCodes.js b/lib/resources/Customers/EntryCodes.js new file mode 100644 index 0000000..c82e1fd --- /dev/null +++ b/lib/resources/Customers/EntryCodes.js @@ -0,0 +1,38 @@ +'use strict'; + +const AifiResource = require('../../AifiResource'); +const aifiMethod = AifiResource.method; + +module.exports = AifiResource.extend({ + path: 'customers/v2/entry-codes', + + create: aifiMethod({ + method: 'POST', + path: '', + }), + + retrieve: aifiMethod({ + method: 'GET', + path: '/{customerId}', + }), + + list: aifiMethod({ + method: 'GET', + path: '', + }), + + update: aifiMethod({ + method: 'PATCH', + path: '/{customerId}', + }), + + remoteRegister: aifiMethod({ + method: 'POST', + path: '/remote-register', + }), + + createEntryCode: aifiMethod({ + method: 'POST', + path: '/{customerId}/entry-codes', + }), +}); diff --git a/lib/resources/Customers/Orders.js b/lib/resources/Customers/Orders.js new file mode 100644 index 0000000..8ee67b9 --- /dev/null +++ b/lib/resources/Customers/Orders.js @@ -0,0 +1,33 @@ +'use strict'; + +const AifiResource = require('../../AifiResource'); +const aifiMethod = AifiResource.method; + +module.exports = AifiResource.extend({ + path: 'customers/v2/orders', + + list: aifiMethod({ + method: 'GET', + path: '', + }), + + retrieve: aifiMethod({ + method: 'GET', + path: '/{orderId}', + }), + + payment: aifiMethod({ + method: 'POST', + path: '/{orderId}/payment', + }), + + listDraft: aifiMethod({ + method: 'PATCH', + path: 'draft', + }), + + retreiveDraft: aifiMethod({ + method: 'POST', + path: '/draft/{draftOrderID}', + }), +}); diff --git a/lib/resources/Customers/PasswordReset.js b/lib/resources/Customers/PasswordReset.js new file mode 100644 index 0000000..b558f2f --- /dev/null +++ b/lib/resources/Customers/PasswordReset.js @@ -0,0 +1,23 @@ +'use strict'; + +const AifiResource = require('../../AifiResource'); +const aifiMethod = AifiResource.method; + +module.exports = AifiResource.extend({ + path: 'customers/v2/password-reset', + + reset: aifiMethod({ + method: 'POST', + path: '', + }), + + set: aifiMethod({ + method: 'PATCH', + path: '', + }), + + verify: aifiMethod({ + method: 'GET', + path: '/verify', + }), +}); diff --git a/lib/resources/Customers/Payments.js b/lib/resources/Customers/Payments.js new file mode 100644 index 0000000..0c1a384 --- /dev/null +++ b/lib/resources/Customers/Payments.js @@ -0,0 +1,13 @@ +'use strict'; + +const AifiResource = require('../../AifiResource'); +const aifiMethod = AifiResource.method; + +module.exports = AifiResource.extend({ + path: 'customers/v2/payments', + + create: aifiMethod({ + method: 'GET', + path: '/methods/initialize', + }), +}); diff --git a/lib/resources/Customers/Products.js b/lib/resources/Customers/Products.js new file mode 100644 index 0000000..94dc9c6 --- /dev/null +++ b/lib/resources/Customers/Products.js @@ -0,0 +1,13 @@ +'use strict'; + +const AifiResource = require('../../AifiResource'); +const aifiMethod = AifiResource.method; + +module.exports = AifiResource.extend({ + path: 'customers/v2/products', + + retrieve: aifiMethod({ + method: 'GET', + path: '', + }), +}); diff --git a/lib/resources/Customers/Sessions.js b/lib/resources/Customers/Sessions.js new file mode 100644 index 0000000..3662c63 --- /dev/null +++ b/lib/resources/Customers/Sessions.js @@ -0,0 +1,23 @@ +'use strict'; + +const AifiResource = require('../../AifiResource'); +const aifiMethod = AifiResource.method; + +module.exports = AifiResource.extend({ + path: 'customers/v2/sessions', + + loginSession: aifiMethod({ + method: 'POST', + path: '', + }), + + deleteSessoin: aifiMethod({ + method: 'DELETE', + path: '/{customerId}', + }), + + refreshSession: aifiMethod({ + method: 'POST', + path: '/refresh', + }), +});