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

createAccount #24

Open
bonofiglio opened this issue Jan 24, 2023 · 0 comments
Open

createAccount #24

bonofiglio opened this issue Jan 24, 2023 · 0 comments
Assignees

Comments

@bonofiglio
Copy link
Contributor

Use to create a new customer account and attach it to the current session.

Returns the newly created account object.

Example

const account = createAccount(client, {
	email: "[email protected]",
	password: "thepassword",
});

API

const account = createAccount(client, accountData, requestOptions);
  • client: See SwellClient.
  • accountData (object, required): The account data to be used to create the account.
    • email (string, required): The customer's email address.
    • first_name (string, optional): The customer's first name.
    • last_name (string, optional): The customer's last name.
    • email_optin (boolean, optional): Whether the customer has opted in to receive marketing emails.
    • password (string, required): The customer's password.
  • requestOptions (object, optional): Overwrites the client options for the current request.
    • sessionToken (string, optional): The token from the session to be used.
@bonofiglio bonofiglio converted this from a draft issue Jan 24, 2023
@bonofiglio bonofiglio moved this to In Progress in Swell SDK Jan 24, 2023
@bonofiglio bonofiglio self-assigned this Jan 24, 2023
@bonofiglio bonofiglio added this to the @swell/js 0.4.0 milestone Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant