Sha256: 7b3737d117ba9229ced18a0d467fb696ad857852887d68d51c0631f870e28eb7

Contents?: true

Size: 424 Bytes

Versions: 6

Compression:

Stored size: 424 Bytes

Contents

module MeducationSDK
  class UserDiscountCode < Resource
    self.path = "/user_discount_codes"

    def user
      @user ||= User.find(user_id)
    end
  end

  class UserDiscountCodeMock < UserDiscountCode
    extend Loquor::ResourceMock

    self.attributes = {
      id: 1,
      user_id: 16,
      product_id: 1,
      code: "1234567890",
      expires_at: "2014-05-10",
      created_at: "2013-04-20"
    }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
meducation_sdk-2.2.2 lib/meducation_sdk/resources/user_discount_code.rb
meducation_sdk-2.2.1 lib/meducation_sdk/resources/user_discount_code.rb
meducation_sdk-2.2.0 lib/meducation_sdk/resources/user_discount_code.rb
meducation_sdk-2.1.4 lib/meducation_sdk/resources/user_discount_code.rb
meducation_sdk-2.1.3 lib/meducation_sdk/resources/user_discount_code.rb
meducation_sdk-2.1.2 lib/meducation_sdk/resources/user_discount_code.rb