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

feat(chowly-api-client): send order to chowly ref #2778 #2

Merged
merged 1 commit into from
May 21, 2020

Conversation

tudormd
Copy link
Contributor

@tudormd tudormd commented May 20, 2020

No description provided.

@coveralls
Copy link

coveralls commented May 20, 2020

Pull Request Test Coverage Report for Build 111247423

  • 50 of 50 (100.0%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+2.0%) to 97.727%

Totals Coverage Status
Change from base Build 108197330: 2.0%
Covered Lines: 111
Relevant Lines: 111

💛 - Coveralls

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@tudormd tudormd force-pushed the feature/2778-send-order-to-chowly branch from 5d39d00 to e4363e8 Compare May 20, 2020 11:24
README.md Outdated Show resolved Hide resolved
@tudormd tudormd force-pushed the feature/2778-send-order-to-chowly branch from e4363e8 to ec25c14 Compare May 20, 2020 12:16
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@tudormd tudormd force-pushed the feature/2778-send-order-to-chowly branch from ec25c14 to e97262e Compare May 20, 2020 13:22
@tudormd tudormd requested a review from ddimitrioglo May 20, 2020 13:23
@tudormd tudormd force-pushed the feature/2778-send-order-to-chowly branch from e97262e to f79ae23 Compare May 20, 2020 13:56
@tudormd tudormd force-pushed the feature/2778-send-order-to-chowly branch 2 times, most recently from 07d761a to 7b8f33f Compare May 20, 2020 14:38

async createOrder(order: ICreateOrder): Promise<Order> {
const response: AxiosResponse<ICreateOrder> = await this.client.post<ICreateOrder>(`${this.basePrefix}/orders`, order, {
headers: { 'Content-Type': 'application/json' },
Copy link
Contributor

Choose a reason for hiding this comment

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

why this method have headers but getMenu is missing them?

Copy link
Contributor Author

@tudormd tudormd May 21, 2020

Choose a reason for hiding this comment

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

getMenu working without headers, but create Order and get Order not working without headers ( checked in postman).
status: 406
"msg": "Content-Type must be application/json"

'special-instructions': string;
'menu-choices': string;
'menu-choices-hash': IMenuChoice;
'customer-name': string | null;
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe 'customer-name'?: string?

Copy link
Contributor Author

@tudormd tudormd May 21, 2020

Choose a reason for hiding this comment

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

payload schema is string, but in postman is object and special-instructions when response is string , i dont know if is optional.

@tudormd tudormd requested a review from ddimitrioglo May 21, 2020 07:27
src/interface/get-order.interface.ts Outdated Show resolved Hide resolved
@tudormd tudormd force-pushed the feature/2778-send-order-to-chowly branch 2 times, most recently from ae3989c to d8bc27a Compare May 21, 2020 07:40
@tudormd tudormd requested a review from strdr4605 May 21, 2020 07:41
README.md Outdated Show resolved Hide resolved
@tudormd tudormd force-pushed the feature/2778-send-order-to-chowly branch from d8bc27a to ea4ce7a Compare May 21, 2020 08:17
@tudormd tudormd requested a review from ruscon May 21, 2020 08:18
@ruscon ruscon requested a review from dragosh1011 May 21, 2020 09:26
@ruscon ruscon merged commit 4e9e86e into master May 21, 2020
phone: string;
email: string | null;
address1?: string;
address2: string | null;
Copy link
Contributor

Choose a reason for hiding this comment

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

address1 is optional but address2 is required?

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

Successfully merging this pull request may close these issues.

None yet

6 participants