Class: Gonebusy::UpdateUserByIdBody

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/gonebusy/models/update_user_by_id_body.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(email = nil, first_name = nil, last_name = nil, business_name = nil, external_url = nil, permalink = nil, timezone = nil) ⇒ UpdateUserByIdBody

Returns a new instance of UpdateUserByIdBody.



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/gonebusy/models/update_user_by_id_body.rb', line 48

def initialize(email = nil,
               first_name = nil,
               last_name = nil,
               business_name = nil,
               external_url = nil,
               permalink = nil,
               timezone = nil)
  @email = email
  @first_name = first_name
  @last_name = last_name
  @business_name = business_name
  @external_url = external_url
  @permalink = permalink
  @timezone = timezone
end

Instance Attribute Details

#business_nameString

Optional name for your Business/Organization

Returns:



19
20
21
# File 'lib/gonebusy/models/update_user_by_id_body.rb', line 19

def business_name
  @business_name
end

#emailString

User’s email address

Returns:



7
8
9
# File 'lib/gonebusy/models/update_user_by_id_body.rb', line 7

def email
  @email
end

#external_urlString

Optional website URL

Returns:



23
24
25
# File 'lib/gonebusy/models/update_user_by_id_body.rb', line 23

def external_url
  @external_url
end

#first_nameString

Optional first name

Returns:



11
12
13
# File 'lib/gonebusy/models/update_user_by_id_body.rb', line 11

def first_name
  @first_name
end

#last_nameString

Optional last name

Returns:



15
16
17
# File 'lib/gonebusy/models/update_user_by_id_body.rb', line 15

def last_name
  @last_name
end

Optional vanity url - ex: www.gonebusy.com/[permalink] - must be unique

Returns:



27
28
29
# File 'lib/gonebusy/models/update_user_by_id_body.rb', line 27

def permalink
  @permalink
end

#timezoneString

Optional timezone

Returns:



31
32
33
# File 'lib/gonebusy/models/update_user_by_id_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
# File 'lib/gonebusy/models/update_user_by_id_body.rb', line 65

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash
  email = hash['email']
  first_name = hash['first_name']
  last_name = hash['last_name']
  business_name = hash['business_name']
  external_url = hash['external_url']
  permalink = hash['permalink']
  timezone = hash['timezone']

  # Create object from extracted values
  UpdateUserByIdBody.new(email,
                         first_name,
                         last_name,
                         business_name,
                         external_url,
                         permalink,
                         timezone)
end

.namesObject

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/update_user_by_id_body.rb', line 34

def self.names
  if @_hash.nil?
    @_hash = {}
    @_hash["email"] = "email"
    @_hash["first_name"] = "first_name"
    @_hash["last_name"] = "last_name"
    @_hash["business_name"] = "business_name"
    @_hash["external_url"] = "external_url"
    @_hash["permalink"] = "permalink"
    @_hash["timezone"] = "timezone"
  end
  @_hash
end