Skip to content

Instantly share code, notes, and snippets.

@jakelear
Created May 22, 2019 16:50
Show Gist options
  • Select an option

  • Save jakelear/21dc68c68a8be53ac3ed5e827eadded9 to your computer and use it in GitHub Desktop.

Select an option

Save jakelear/21dc68c68a8be53ac3ed5e827eadded9 to your computer and use it in GitHub Desktop.
diff --git a/src/models/public-user.js b/src/models/public-user.js
index 276f831..7f1902b 100644
--- a/src/models/public-user.js
+++ b/src/models/public-user.js
@@ -12,6 +12,21 @@ class PublicUser extends Model {
}
}
+ updateCreditCard ({ id, input }) {
+ const route = `/payment_methods/${id}/card`;
+ return this.jabiruAPI.put(route, input);
+ }
+
+ deletePaymentMethod ({ id }) {
+ const route = `/payment_methods/${id}`;
+ return this.jabiruAPI.delete(route);
+ }
+
+ updateAccountPaymentMethod ({ id }) {
+ const route = `/accounts/${id}/payment`;
+ return this.jabiruAPI.put(route);
+ }
+
updateAccountKWh({ accountId, input }) {
const route = `/accounts/${accountId}/kwh`;
return this.jabiruAPI.put(route, input);
@@ -41,6 +56,11 @@ class PublicUser extends Model {
const route = `/accounts/${accountId}/premium`;
return this.jabiruAPI.put(route);
}
+
+ delayStatementPayment ({ id }) {
+ const route = `/utility_statements/${id}/delay`;
+ return this.jabiruAPI.put(route);
+ }
}
module.exports = PublicUser;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment