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

Implementing missing API Endpoints #91

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

Executioner1939
Copy link

@Executioner1939 Executioner1939 commented Aug 28, 2022

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 Executioner1939 changed the title Feature/customer metafields Metafields Aug 28, 2022
@Executioner1939
Copy link
Author

Executioner1939 commented Aug 28, 2022

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();

@ryankazokas
Copy link
Member

@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.

@Executioner1939
Copy link
Author

@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 Executioner1939 marked this pull request as ready for review August 30, 2022 13:21
@Executioner1939
Copy link
Author

@ryankazokas this is ready for review so long.

@Executioner1939
Copy link
Author

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

@ryankazokas
Copy link
Member

Thanks, can you switch the target to develop branch

@Executioner1939 Executioner1939 changed the base branch from master to develop September 2, 2022 12:33
@Executioner1939 Executioner1939 changed the title Metafields Implementing missing API Endpoints Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants