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

Added offer mutations to LightsparkClient. #159

Merged
merged 1 commit into from
Jan 28, 2025
Merged

Conversation

mhrheaume
Copy link
Contributor

  • CreateOffer for creating a new offer with the specified parameters.
  • PayOffer for paying an offer.

import "github.com/lightsparkdev/go-sdk/objects"

const CREATE_OFFER_MUTATION = `
mutation CreateInvoice(
Copy link

Choose a reason for hiding this comment

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

The mutation name CreateInvoice should be CreateOffer to accurately reflect that this mutation creates an offer, not an invoice. This ensures consistency between the operation name and its functionality.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor

Choose a reason for hiding this comment

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

CreateOffer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good bot.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@mhrheaume mhrheaume requested review from JasonCWang and a team January 28, 2025 18:18
- CreateOffer for creating a new offer with the specified parameters.
- PayOffer for paying an offer.
@mhrheaume mhrheaume force-pushed the mhr/offer_mutations branch from 47aade1 to 06a1204 Compare January 28, 2025 18:20
var offer objects.Offer
offerJson, err := json.Marshal(output["offer"].(map[string]interface{}))
if err != nil {
return nil, errors.New(("error parsing offer"))
Copy link

Choose a reason for hiding this comment

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

There are redundant parentheses in errors.New(("error parsing offer")). The correct syntax is errors.New("error parsing offer").

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@mhrheaume mhrheaume merged commit 5e90ea9 into main Jan 28, 2025
3 checks passed
Copy link
Contributor Author

Merge activity

  • Jan 28, 1:21 PM EST: A user merged this pull request with Graphite.

@mhrheaume mhrheaume deleted the mhr/offer_mutations branch January 28, 2025 18:21
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