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

RecurringApplicationCharge cannot update the usage cap to a decimal amount #37

Closed
umsu2 opened this issue Nov 16, 2018 · 2 comments
Closed
Labels
4.0 Will address this in the next major release, either because it's a breaking change or major effort.

Comments

@umsu2
Copy link

umsu2 commented Nov 16, 2018

func (r *RecurringApplicationChargeServiceOp) Update(chargeID, newCappedAmount int) (
	*RecurringApplicationCharge, error) {

	path := fmt.Sprintf("%s/%d/customize.json?recurring_application_charge[capped_amount]=%d",
		recurringApplicationChargesBasePath, chargeID, newCappedAmount)
	resource := &RecurringApplicationChargeResource{}
	err := r.client.Put(path, nil, resource)
	return resource.Charge, err
}

the newCappedAmount should be the type decimal instead of an int.
however the change would be break the original interface.

@oliver006
Copy link
Collaborator

Addressing this in #258

oliver006 added a commit to oliver006/go-shopify that referenced this issue Jan 22, 2024
@oliver006 oliver006 added the 4.0 Will address this in the next major release, either because it's a breaking change or major effort. label Jan 22, 2024
@oliver006
Copy link
Collaborator

v4.0.0 was released - this should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0 Will address this in the next major release, either because it's a breaking change or major effort.
Projects
None yet
Development

No branches or pull requests

2 participants