Skip to content

NGanip/hanifm-anyx-test

Repository files navigation

hanifm-anyx-test

test project for anyMind group

Project Spec:

  • Lang: Java 8
  • Framework: Spring Boot 2.7.5
  • Build Tool: Maven
  • API: GraphQL

How to run:

  1. with your favourite IDE, run this java class:

    HanifmAnyxTestApplication.java

  2. To try the application, choose one

    a. visit this url: localhost

    b. use Postman, import this Postman_Collection into Postman. Download Here if you don't have postman

  3. Query for calculate payment:

    • Query:
    mutation CalculatePayment($calculationRq: CalculationRq!) {
      calculatePayment(paymentRq: $calculationRq) {
        data {
          final_price
          points
        }
        error
      }
    }
    • Variable:
    {
      "calculationRq": {
        "price": "100",
        "price_modifier": 0.95,
        "payment_method": "CASH",
        "datetime": "2022-09-01T00:00:00Z"
      }
    }    
  4. Query for get Sales Log:

    • Query:
    query GetSalesLog($salesLogRq: SalesLogRq!) {
        GetSalesLog(SalesLogRq: $salesLogRq) {
            data {
                datetime
                sales
                points
            }
            error
        }
    } 
    • Variable:
    {
      "salesLogRq": {
        "startDateTime": "2022-09-01T00:00:00Z",
        "endDateTime": "2022-09-01T00:00:00Z"
      }
    }

About

test project for anyMind group

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages