lib/cloudapp/gift_card.rb in cloudapp_api-0.2.0 vs lib/cloudapp/gift_card.rb in cloudapp_api-0.2.1

- old
+ new

@@ -33,26 +33,16 @@ # Requires authentication. # # @param [String] code Gift card code # @return [CloudApp::GiftCard] def self.redeem(code) - res = put "/gift_cards/#{code}", :digest_auth => @@auth + res = put "/gift_cards/#{code}", {:body => {}, :digest_auth => @@auth} res.ok? ? GiftCard.new(res) : res end attr_reader :id, :code, :plan, :months, :href, :created_at, :updated_at, :redeemed_at, :effective_at, :expires_at - - # Create a new CloudApp::GiftCard object. - # - # Only used internally - # - # @param [Hash] attributes - # @param [CloudApp::GiftCard] - def initialize(attributes = {}) - load(attributes) - end - + # Apply the gift card to the authenticated account. # # @return [CloudApp::GiftCard] def redeem self.class.redeem code \ No newline at end of file