Class: Gonebusy::CreateUserBody
- Defined in:
- lib/gonebusy/models/create_user_body.rb
Instance Attribute Summary collapse
-
#business_name ⇒ String
Optional name for your Business/Organization.
-
#email ⇒ String
User’s email address.
-
#external_url ⇒ String
Optional website URL.
-
#first_name ⇒ String
Optional first name.
-
#last_name ⇒ String
Optional last name.
-
#permalink ⇒ String
Optional vanity url - ex: www.gonebusy.com/[permalink] - must be unique.
-
#timezone ⇒ String
Optional timezone.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(email = nil, business_name = nil, external_url = nil, first_name = nil, last_name = nil, permalink = nil, timezone = nil) ⇒ CreateUserBody
constructor
A new instance of CreateUserBody.
Methods inherited from BaseModel
Constructor Details
#initialize(email = nil, business_name = nil, external_url = nil, first_name = nil, last_name = nil, permalink = nil, timezone = nil) ⇒ CreateUserBody
Returns a new instance of CreateUserBody.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/gonebusy/models/create_user_body.rb', line 48 def initialize(email = nil, business_name = nil, external_url = nil, first_name = nil, last_name = nil, permalink = nil, timezone = nil) @email = email @business_name = business_name @external_url = external_url @first_name = first_name @last_name = last_name @permalink = permalink @timezone = timezone end |
Instance Attribute Details
#business_name ⇒ String
Optional name for your Business/Organization
11 12 13 |
# File 'lib/gonebusy/models/create_user_body.rb', line 11 def business_name @business_name end |
#email ⇒ String
User’s email address
7 8 9 |
# File 'lib/gonebusy/models/create_user_body.rb', line 7 def email @email end |
#external_url ⇒ String
Optional website URL
15 16 17 |
# File 'lib/gonebusy/models/create_user_body.rb', line 15 def external_url @external_url end |
#first_name ⇒ String
Optional first name
19 20 21 |
# File 'lib/gonebusy/models/create_user_body.rb', line 19 def first_name @first_name end |
#last_name ⇒ String
Optional last name
23 24 25 |
# File 'lib/gonebusy/models/create_user_body.rb', line 23 def last_name @last_name end |
#permalink ⇒ String
Optional vanity url - ex: www.gonebusy.com/[permalink] - must be unique
27 28 29 |
# File 'lib/gonebusy/models/create_user_body.rb', line 27 def permalink @permalink end |
#timezone ⇒ String
Optional timezone
31 32 33 |
# File 'lib/gonebusy/models/create_user_body.rb', line 31 def timezone @timezone end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/gonebusy/models/create_user_body.rb', line 65 def self.from_hash(hash) if hash == nil nil else # Extract variables from the hash email = hash["email"] business_name = hash["business_name"] external_url = hash["external_url"] first_name = hash["first_name"] last_name = hash["last_name"] permalink = hash["permalink"] timezone = hash["timezone"] # Create object from extracted values CreateUserBody.new(email, business_name, external_url, first_name, last_name, permalink, timezone) end end |
.names ⇒ Object
A mapping from model property names to API property names
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/gonebusy/models/create_user_body.rb', line 34 def self.names if @hash.nil? @hash = {} @hash["email"] = "email" @hash["business_name"] = "business_name" @hash["external_url"] = "external_url" @hash["first_name"] = "first_name" @hash["last_name"] = "last_name" @hash["permalink"] = "permalink" @hash["timezone"] = "timezone" end @hash end |