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

Support property deletion #82

Merged
merged 5 commits into from
Aug 12, 2013
Merged

Support property deletion #82

merged 5 commits into from
Aug 12, 2013

Conversation

metcalf
Copy link
Contributor

@metcalf metcalf commented Aug 6, 2013

Changes to support property deletion in the API (e.g. deleting description on customer)

  • Setting attributes to nil passes an empty string to the API, leading to legal properties being deleted
  • Setting an attribute to an empty string is an error to avoid accidental unsets
  • Setting permanent attributes (e.g. id) throws NoMethodError

c = Stripe::Charge.new("test_charge")
c.refresh
assert_raises ArgumentError do
c.mnemonic = ""
Copy link
Contributor

Choose a reason for hiding this comment

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

s/mnemonic/description/?

metcalf added a commit that referenced this pull request Aug 12, 2013
@metcalf metcalf merged commit ac70a81 into master Aug 12, 2013
@metcalf metcalf deleted the am-property-deletion branch August 12, 2013 16:01
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.

3 participants