Class: Billy::Coupon

Inherits:
BaseModel show all
Defined in:
lib/billy/coupon.rb

Instance Attribute Summary

Attributes inherited from BaseModel

#attributes

Class Method Summary collapse

Methods inherited from BaseModel

#initialize, #method_missing

Constructor Details

This class inherits a constructor from Billy::BaseModel

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Billy::BaseModel

Class Method Details

.find(code) ⇒ Object



4
5
6
7
# File 'lib/billy/coupon.rb', line 4

def self.find(code)
  attributes = Billy::Request.request('coupons/info', :code => code)
  attributes.is_a?(Hash) ? self.new(attributes) : nil
end