'use strict';

const StripeResource = require('../StripeResource');
const stripeMethod = StripeResource.method;

module.exports = StripeResource.extend({
  path: 'customers',

  includeBasic: ['create', 'del', 'list', 'retrieve', 'update'],

  deleteDiscount: stripeMethod({
    method: 'DELETE',
    path: '/{customer}/discount',
  }),

  updateSource: stripeMethod({
    method: 'POST',
    path: '/{customer}/sources/{id}',
  }),

  deleteSource: stripeMethod({
    method: 'DELETE',
    path: '/{customer}/sources/{id}',
  }),

  verifySource: stripeMethod({
    method: 'POST',
    path: '/{customer}/sources/{sourceId}/verify',
  }),

  createSource: stripeMethod({
    method: 'POST',
    path: '/{customer}/sources',
  }),

  listSources: stripeMethod({
    method: 'GET',
    path: '/{customer}/sources',
    methodType: 'list',
  }),

  retrieveSource: stripeMethod({
    method: 'GET',
    path: '/{customer}/sources/{id}',
  }),

  createTaxId: stripeMethod({
    method: 'POST',
    path: '/{customer}/tax_ids',
  }),

  deleteTaxId: stripeMethod({
    method: 'DELETE',
    path: '/{customer}/tax_ids/{id}',
  }),

  listTaxIds: stripeMethod({
    method: 'GET',
    path: '/{customer}/tax_ids',
    methodType: 'list',
  }),

  retrieveTaxId: stripeMethod({
    method: 'GET',
    path: '/{customer}/tax_ids/{id}',
  }),

  createBalanceTransaction: stripeMethod({
    method: 'POST',
    path: '/{customer}/balance_transactions',
  }),

  listBalanceTransactions: stripeMethod({
    method: 'GET',
    path: '/{customer}/balance_transactions',
    methodType: 'list',
  }),

  retrieveBalanceTransaction: stripeMethod({
    method: 'GET',
    path: '/{customer}/balance_transactions/{id}',
  }),

  updateBalanceTransaction: stripeMethod({
    method: 'POST',
    path: '/{customer}/balance_transactions/{id}',
  }),
});

@@ -626,32 +626,547 @@
 verify',%0A  %7D),%0A%0A
+  createBalanceTransaction: stripeMethod(%7B%0A    method: 'POST',%0A    path: '/%7Bcustomer%7D/balance_transactions',%0A  %7D),%0A%0A  listBalanceTransactions: stripeMethod(%7B%0A    method: 'GET',%0A    path: '/%7Bcustomer%7D/balance_transactions',%0A    methodType: 'list',%0A  %7D),%0A%0A  retrieveBalanceTransaction: stripeMethod(%7B%0A    method: 'GET',%0A    path: '/%7Bcustomer%7D/balance_transactions/%7Btransaction%7D',%0A  %7D),%0A%0A  updateBalanceTransaction: stripeMethod(%7B%0A    method: 'POST',%0A    path: '/%7Bcustomer%7D/balance_transactions/%7Btransaction%7D',%0A  %7D),%0A%0A
   createSource: 
@@ -1847,505 +1847,8 @@
  %7D),
-%0A%0A  createBalanceTransaction: stripeMethod(%7B%0A    method: 'POST',%0A    path: '/%7Bcustomer%7D/balance_transactions',%0A  %7D),%0A%0A  listBalanceTransactions: stripeMethod(%7B%0A    method: 'GET',%0A    path: '/%7Bcustomer%7D/balance_transactions',%0A    methodType: 'list',%0A  %7D),%0A%0A  retrieveBalanceTransaction: stripeMethod(%7B%0A    method: 'GET',%0A    path: '/%7Bcustomer%7D/balance_transactions/%7Bid%7D',%0A  %7D),%0A%0A  updateBalanceTransaction: stripeMethod(%7B%0A    method: 'POST',%0A    path: '/%7Bcustomer%7D/balance_transactions/%7Bid%7D',%0A  %7D),
 %0A%7D);

Reorder customer methods for codegen (#653)