Skip to content

Create order — API operation via OrderService #38

Description

@rammrain

Summary

Add a create method to OrderService that sends a POST /orders request with a CreateOrderRequest and returns a CreateOrderResponse.

Context

Issue #16 added OrderService.get(uuid) for retrieving orders. The CreateOrderRequest and CreateOrderResponse models already exist from #14. This issue covers wiring them through the service layer.

Requirements

  • OrderService.create(CreateOrderRequest request)CreateOrderResponse
  • Validate request is not null before making the HTTP call
  • Delegate to MontonioHttpClient.post("/orders", request, CreateOrderResponse.class)
  • Unit tests with stubbed HTTP layer

Refs

  • CreateOrderRequestee.bitweb.montonio.sdk.order.request
  • CreateOrderResponseee.bitweb.montonio.sdk.order.response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions