shopify-sdk icon indicating copy to clipboard operation
shopify-sdk copied to clipboard

Implementing missing API Endpoints

Open Executioner1939 opened this issue 3 years ago • 6 comments

Description of Changes I am adding in a number of missing API endpoints that I need, I previously used this SDK in conjunction with my own code to make up for the missing features, but would prefer to use the SDK alone and remove redundant code in my codebase.

I am adding in:

  • Customer Metafield Routes (list, create, update, delete)
  • Product Metafield Routes (update, delete)
  • Variant Metafield Routes (update, delete)
  • Create a new Variant against an already existing Product
  • Creating Order Transactions

Executioner1939 avatar Aug 28 '22 19:08 Executioner1939

How would I go about getting the IDs required for the Integration tests? I need the Metafield ID for the Customer Metafield for the below:

ShopifyCustomerMetafieldUpdateRequest
  .newBuilder()
  .withCustomerId("6780238412")
  .withMetafieldId("") // <----------------
  .withValue("test_update")
  .withValueType(MetafieldType.SINGLE_LINE_TEXT)
  .build();

Executioner1939 avatar Aug 28 '22 19:08 Executioner1939

@Executioner1939

How would I go about getting the IDs required for the Integration tests? I need the Metafield ID for the Customer Metafield for the below:

For the driver test it actually hits shopify. You need to specify the accesstoken and shopifySubdomain environment variables and you should be able to run on your shopify dev store with the values there. Note this is not run during the CI process and more for just a sanity check on the developers when we add these new interfaces. The values currently in the file are arbitrary.

For the unit test, you can just mock out the values like we are in the other tests. This is run during the CI process and new code should be covered in there.

ryankazokas avatar Aug 29 '22 14:08 ryankazokas

@ryankazokas thanks for the clarification, I was under the impression that the integration tests were run as apart of the CI. I will run mine locally and then add unit tests.

Executioner1939 avatar Aug 29 '22 16:08 Executioner1939

@ryankazokas this is ready for review so long.

Executioner1939 avatar Aug 30 '22 13:08 Executioner1939

Please note I have published this to my local Github Packages repo, as I need the updates to continue my work.

Executioner1939 avatar Sep 02 '22 09:09 Executioner1939

Thanks, can you switch the target to develop branch

ryankazokas avatar Sep 02 '22 11:09 ryankazokas