vtex-apps / store-graphql

GraphQL schema and resolvers for the VTEX Commerce Stores API
78 stars 45 forks source link

add `isDisposable` to address graphql #628

Closed lucvysk closed 2 years ago

lucvysk commented 2 years ago

What problem is this solving?

When adding an address with isDisposable: true the address is saved in MasterData anyways.v It was described here: https://github.com/vtex-apps/store-graphql/issues/541

How to test it?

curl --location --request PUT 'https://isdisposable--modeloramamx.vtexcommercestable.com.br/api/checkout/pub/orders' \
--header 'VtexIdclientAutCookie: ' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
  "items": [
    {
      "id": "49",
      "quantity": 1,
      "seller": "modeloramamxnorte"
    },
    {
      "id": "58",
      "quantity": 1,
      "seller": "1",
      "price": 0
    }
  ],
  "clientProfileData": {
    "email": "lucas.vysk@vtex.com",
    "firstName": "Lucas",
    "lastName": "v",
    "document": "00000",
    "documentType": "cedulamx",
    "phone": "+529999",
  },
  "shippingData": {
    "address": {
      "addressType": "residential",
      "receiverName": "Lucas v",
      "isDisposable": true,
      "postalCode": "03300",
      "city": "Ciudad de México",
      "state": "Ciudad de México",
      "country": "MEX",
      "street": "Avenida Presidentes",
      "number": "999",
      "neighborhood": "Portales Norte",
      "complement": "",
      "reference": null,
      "geoCoordinates": [-99.14809799999999, 19.3678483]
    },
    "logisticsInfo": [
      {
        "itemIndex": 0,
        "selectedSla": "Normal",
        "price": 0
      },
      {
        "itemIndex": 1,
        "selectedSla": "Normal",
        "price": 0
      }
    ]
  },
  "marketingData": {
    "coupon": "wp-2022"
  },
  "selectableGifts": [
    {
      "id": "f0bfe8eb-f578-47b1-bc5c-e9990d4d088f",
      "availableQuantity": 1,
      "availableGifts": [
        {
          "id": "58",
          "requestIndex": null,
          "quantity": 1,
          "seller": "1"
        }
      ]
    }
  ],
  "paymentData": {
    "payments": [
      {
        "paymentSystem": "201",
        "referenceValue": 0,
        "value": 0,
        "installments": 1
      }
    ]
  }
}'

Workspace

Related to / Depends on

https://github.com/vtex-apps/store-graphql/issues/541

How does this PR make you feel? :link:

ss

vtex-io-ci-cd[bot] commented 2 years ago

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

vtex-io-docs-bot[bot] commented 2 years ago

Beep boop :robot:

I noticed you didn't make any changes at the docs/ folder

In order to keep track, I'll create an issue if you decide now is not a good time

vtex-io-ci-cd[bot] commented 2 years ago

Your PR has been merged! App is being published. :rocket: Version 2.155.32 → 2.155.33

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy vtex.store-graphql@2.155.33

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. :book: