Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DONTMERGE - fix: rework Stripe Google Pay using the payment request button (testing build) #133

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,054 changes: 4,054 additions & 0 deletions dist/_baseClone.c22e5907.mjs

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions dist/account.d991b136.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
function methods(request) {
return {
state: null,

async requestStateChange(method, url, id, data) {
const result = await request(method, url, id, data);
if (result && result.errors) {
return result;
}
return (this.state = result);
},

get(query) {
return this.requestStateChange('get', '/account', query);
},

create(data) {
return this.requestStateChange('post', '/account', data);
},

update(data) {
return this.requestStateChange('put', '/account', data);
},

login(email, password) {
if (password && password.password_token) {
return this.requestStateChange('post', '/account/login', {
email,
password_token: password.password_token,
});
}
return this.requestStateChange('post', '/account/login', {
email,
password,
});
},

logout() {
this.state = null;
return request('post', '/account/logout');
},

recover(data) {
return request('post', '/account/recover', data);
},

listAddresses(query) {
return request('get', '/account/addresses', query);
},

createAddress(data) {
return request('post', '/account/addresses', data);
},

updateAddress(id, data) {
return request('put', `/account/addresses/${id}`, data);
},

deleteAddress(id) {
return request('delete', `/account/addresses/${id}`);
},

listCards(query) {
return request('get', '/account/cards', query);
},

createCard(data) {
return request('post', '/account/cards', data);
},

updateCard(id, data) {
return request('put', `/account/cards/${id}`, data);
},

deleteCard(id) {
return request('delete', `/account/cards/${id}`);
},

listOrders(query) {
return request('get', `/account/orders`, query);
},

getOrder(id) {
return request('get', `/account/orders/${id}`);
},

// Deprecated methods
getAddresses(query) {
return request('get', '/account/addresses', query);
},
getCards(query) {
return request('get', '/account/cards', query);
},
getOrders(query) {
return request('get', `/account/orders`, query);
},
};
}

export { methods as m };
1 change: 1 addition & 0 deletions dist/account.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { m as default } from './account.d991b136.mjs';
Loading