Skip to content

WPA-14526: aligning CLI with final panel api schema - #245

Draft
sgimpel-godaddy wants to merge 3 commits into
mainfrom
WPA-14526
Draft

WPA-14526: aligning CLI with final panel api schema#245
sgimpel-godaddy wants to merge 3 commits into
mainfrom
WPA-14526

Conversation

@sgimpel-godaddy

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread rust/src/email/client.rs Outdated
.bearer_auth(&self.token)
.header("x-request-id", Self::new_request_id());
for (key, value) in extra_headers {
req = req.header(*key, value);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgimpel-godaddy what is extra_headers?

assert_eq!(actions.len(), 2);
assert_eq!(actions[0].command, "gddy email create");
assert_eq!(actions[1].command, "gddy guide email-mailboxes");
assert_eq!(actions[1].command, "gddy guide email");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgimpel-godaddy here does it only say gddy email create or should it say gddy email create <args> and the args here is the email address

Comment thread rust/src/email/mod.rs Outdated
RuntimeGroupSpec::new(
GroupSpec::new("email", "Create, list, and inspect GoDaddy Email mailboxes").with_long(
"Manage GoDaddy Email mailboxes over panel-v3.\n\
"Manage GoDaddy Email mailboxes.\n\

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgimpel-godaddy can you name it Manage GoDaddy Business Emails

Comment thread rust/src/email/check_eligibility.rs Outdated
let mut create = next_action("email create", "Create a mailbox for this address")
let account_id = first_eligible_account_id(data);
let command = if account_id.is_some() {
"email create --email <email> --account-id <account-id>"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgimpel-godaddy for eligibility next best action, if requirementAgreements in returns from the eligibillity, then consents array must be passed for create. Else the api will fail

Comment thread rust/src/email/create.rs
};
let body = request_body(&args);
assert_eq!(body["email"], "someone@example.com");
assert_eq!(body["emailAddress"], "someone@example.com");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgimpel-godaddy you need to send the idempotency_key in the header because create endpoint needs it

Comment thread rust/src/email/check_eligibility.rs Outdated
let command = if account_id.is_some() {
"email create --email <email> --account-id <account-id>"
} else {
"email create --email <email>"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgimpel-godaddy this should not be in if;else because if there is no eligible account then they cannot create email. I am changing the api to return a 422 if ineligible instead of 200

Comment thread rust/src/email/create.rs
/// ID of an existing eligible account to provision this mailbox under,
/// from `check-eligibility`'s `eligibleAccounts[].accountId` (see
/// `gddy guide email-mailboxes`). Not a shopper/customer ID.
/// `gddy guide email`). Not a shopper/customer ID.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgimpel-godaddy we should have a eligibility_next_actions to call the GET by the id because after create they have to poll until the status is COMPLETED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants