-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
mhrheaume
commented
Jan 28, 2025
- CreateOffer for creating a new offer with the specified parameters.
- PayOffer for paying an offer.
scripts/create_offer.go
Outdated
import "github.com/lightsparkdev/go-sdk/objects" | ||
|
||
const CREATE_OFFER_MUTATION = ` | ||
mutation CreateInvoice( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CreateOffer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good bot.
- CreateOffer for creating a new offer with the specified parameters. - PayOffer for paying an offer.
47aade1
to
06a1204
Compare
var offer objects.Offer | ||
offerJson, err := json.Marshal(output["offer"].(map[string]interface{})) | ||
if err != nil { | ||
return nil, errors.New(("error parsing offer")) |
There was a problem hiding this comment.
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.
Merge activity
|