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

feat: Transition LineItemState on fulfillment #182

Merged
merged 6 commits into from
Apr 16, 2024

Conversation

JadeyOlivier
Copy link
Member

@JadeyOlivier JadeyOlivier commented Mar 8, 2024

Description

Created new LineItemStates in Commercetools with accompanying transitions to track fulfillment process. Coordinator triggers fulfillment on “Fulfillment Pending” events when a Commercetools message is received from the AWS Eventbridge. Based on fulfillment result, the LineItemState is also transitioned to a success or failure state. Initially transitioning the state to 'Fulfillment Pending' is handle in this PR in the Commercetools twou repo

JIRA

SONIC-270

@JadeyOlivier JadeyOlivier force-pushed the jolivier/SONIC-270/Line-Item-Fulfillment-State branch 3 times, most recently from bb9053a to d014069 Compare March 25, 2024 14:31
@JadeyOlivier JadeyOlivier force-pushed the jolivier/SONIC-270/Line-Item-Fulfillment-State branch from d014069 to 6834fdd Compare April 15, 2024 11:39
@JadeyOlivier JadeyOlivier force-pushed the jolivier/SONIC-270/Line-Item-Fulfillment-State branch from 6834fdd to 614c499 Compare April 16, 2024 11:42
@JadeyOlivier JadeyOlivier marked this pull request as ready for review April 16, 2024 12:51
@@ -240,6 +258,12 @@ def get_orders_for_customer(self, edx_lms_user_id: int, offset=0,
def get_customer_by_id(self, customer_id: str) -> CTCustomer:
return self.base_client.customers.get_by_id(customer_id) # pragma no cover

def get_state_by_id(self, state_id: str) -> CTLineItemState:
return self.base_client.states.get_by_id(state_id) # pragma no cover
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should test these in the future.


for state_draft in order_states:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for looping this

@grmartin grmartin merged commit 4a8a842 into main Apr 16, 2024
2 checks passed
@grmartin grmartin deleted the jolivier/SONIC-270/Line-Item-Fulfillment-State branch April 16, 2024 14:20
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