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(sc-57427): Support Opportunities API #153

Conversation

kamilpavlicko
Copy link
Contributor

closes ticket: https://app.shortcut.com/chartmogul/story/57427/support-opportunities-resource-ruby-client?vc_group_by=day&ct_workflow=all&cf_workflow=500105879

API document: https://www.notion.so/chartmogul/API-endpoints-for-Opportunities-a92323514bf44f89ad2f97ae30cee7f0#6f09cc7a71bc40e69ef65d8d0342d230

Background

  1. Create a opportunity
customer = ChartMogul::Customer.retrieve('cus_3819e09a-50a2-11ee-ada7-9fcf71cd4580')
customer.create_opportunity(
  ....
)

ChartMogul::Opportunity.create(data)
  1. Get all opportunities
customer = ChartMogul::Customer.retrieve('cus_3819e09a-50a2-11ee-ada7-9fcf71cd4580')
customer.opportunities

ChartMogul::Opportunity.all(customer_uuid: customer_uuid)
  1. Get an opportunity
opportunities = ChartMogul::Opportunity.retrieve('opportunity_uuid')
  1. Update an opportunity
updated_opportunity = ChartMogul::Opportunity.update(data)
  1. Delete an opportunity
ChartMogul::Opportunity.delete('opportunity_uuid') 

@kamilpavlicko kamilpavlicko requested review from SoeunSona and a team March 18, 2024 18:04
@kamilpavlicko kamilpavlicko self-assigned this Mar 18, 2024
@kamilpavlicko kamilpavlicko requested review from tudorpavel and swember and removed request for a team March 18, 2024 18:04
Copy link

This pull request has been linked to Shortcut Story #57427: Support Opportunities resource - Ruby client.

@kamilpavlicko kamilpavlicko force-pushed the kamilpavlicko/feat/sc-57427/support-opportunities-resource-ruby-client branch 5 times, most recently from 0040710 to 5ef95de Compare March 18, 2024 18:14
@kamilpavlicko kamilpavlicko force-pushed the kamilpavlicko/feat/sc-57427/support-opportunities-resource-ruby-client branch from 5ef95de to 2e5b695 Compare March 18, 2024 18:18
Copy link

codeclimate bot commented Mar 18, 2024

Code Climate has analyzed commit 2e5b695 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 98.5% (0.0% change).

View more on Code Climate.

@kamilpavlicko kamilpavlicko deleted the kamilpavlicko/feat/sc-57427/support-opportunities-resource-ruby-client branch March 18, 2024 18:19
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.

1 participant