Class: AdvancedBilling::ResentInvitation

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/advanced_billing/models/resent_invitation.rb

Overview

ResentInvitation Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(last_sent_at = SKIP, last_accepted_at = SKIP, send_invite_link_text = SKIP, uninvited_count = SKIP) ⇒ ResentInvitation

Returns a new instance of ResentInvitation.



53
54
55
56
57
58
59
# File 'lib/advanced_billing/models/resent_invitation.rb', line 53

def initialize(last_sent_at = SKIP, last_accepted_at = SKIP,
               send_invite_link_text = SKIP, uninvited_count = SKIP)
  @last_sent_at = last_sent_at unless last_sent_at == SKIP
  @last_accepted_at = last_accepted_at unless last_accepted_at == SKIP
  @send_invite_link_text = send_invite_link_text unless send_invite_link_text == SKIP
  @uninvited_count = uninvited_count unless uninvited_count == SKIP
end

Instance Attribute Details

#last_accepted_atString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/advanced_billing/models/resent_invitation.rb', line 18

def last_accepted_at
  @last_accepted_at
end

#last_sent_atString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/advanced_billing/models/resent_invitation.rb', line 14

def last_sent_at
  @last_sent_at
end

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/advanced_billing/models/resent_invitation.rb', line 22

def send_invite_link_text
  @send_invite_link_text
end

#uninvited_countInteger

TODO: Write general description for this method

Returns:

  • (Integer)


26
27
28
# File 'lib/advanced_billing/models/resent_invitation.rb', line 26

def uninvited_count
  @uninvited_count
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/advanced_billing/models/resent_invitation.rb', line 62

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.

  last_sent_at = hash.key?('last_sent_at') ? hash['last_sent_at'] : SKIP
  last_accepted_at =
    hash.key?('last_accepted_at') ? hash['last_accepted_at'] : SKIP
  send_invite_link_text =
    hash.key?('send_invite_link_text') ? hash['send_invite_link_text'] : SKIP
  uninvited_count =
    hash.key?('uninvited_count') ? hash['uninvited_count'] : SKIP

  # Create object from extracted values.

  ResentInvitation.new(last_sent_at,
                       last_accepted_at,
                       send_invite_link_text,
                       uninvited_count)
end

.namesObject

A mapping from model property names to API property names.



29
30
31
32
33
34
35
36
# File 'lib/advanced_billing/models/resent_invitation.rb', line 29

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['last_sent_at'] = 'last_sent_at'
  @_hash['last_accepted_at'] = 'last_accepted_at'
  @_hash['send_invite_link_text'] = 'send_invite_link_text'
  @_hash['uninvited_count'] = 'uninvited_count'
  @_hash
end

.nullablesObject

An array for nullable fields



49
50
51
# File 'lib/advanced_billing/models/resent_invitation.rb', line 49

def self.nullables
  []
end

.optionalsObject

An array for optional fields



39
40
41
42
43
44
45
46
# File 'lib/advanced_billing/models/resent_invitation.rb', line 39

def self.optionals
  %w[
    last_sent_at
    last_accepted_at
    send_invite_link_text
    uninvited_count
  ]
end