Class: Billy::SignupToken

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

Instance Attribute Summary

Attributes inherited from BaseModel

#attributes

Class Method Summary collapse

Instance 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

.create(partner) ⇒ Object



8
9
10
11
# File 'lib/billy/signup_token.rb', line 8

def self.create(partner)
  attributes = Billy::Request.request('signup_tokens/create', :partner => partner)
  attributes.is_a?(Hash) ? self.new(attributes) : nil
end

.find(token) ⇒ Object



13
14
15
16
# File 'lib/billy/signup_token.rb', line 13

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

Instance Method Details

#service?Boolean

Returns:

  • (Boolean)


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

def service?
  self.attributes.include?(:service)
end