Class: AdvancedBilling::ResentInvitation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::ResentInvitation
- Defined in:
- lib/advanced_billing/models/resent_invitation.rb
Overview
ResentInvitation Model.
Instance Attribute Summary collapse
-
#last_accepted_at ⇒ String
TODO: Write general description for this method.
-
#last_invite_accepted_at ⇒ DateTime
TODO: Write general description for this method.
-
#last_invite_sent_at ⇒ DateTime
TODO: Write general description for this method.
-
#last_sent_at ⇒ String
TODO: Write general description for this method.
-
#send_invite_link_text ⇒ String
TODO: Write general description for this method.
-
#uninvited_count ⇒ Integer
TODO: Write general description for this method.
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.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(last_sent_at: SKIP, last_accepted_at: SKIP, send_invite_link_text: SKIP, uninvited_count: SKIP, last_invite_sent_at: SKIP, last_invite_accepted_at: SKIP, additional_properties: {}) ⇒ ResentInvitation
constructor
A new instance of ResentInvitation.
- #to_custom_last_invite_accepted_at ⇒ Object
- #to_custom_last_invite_sent_at ⇒ Object
Methods inherited from BaseModel
Constructor Details
#initialize(last_sent_at: SKIP, last_accepted_at: SKIP, send_invite_link_text: SKIP, uninvited_count: SKIP, last_invite_sent_at: SKIP, last_invite_accepted_at: SKIP, additional_properties: {}) ⇒ ResentInvitation
Returns a new instance of ResentInvitation.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 66 def initialize(last_sent_at: SKIP, last_accepted_at: SKIP, send_invite_link_text: SKIP, uninvited_count: SKIP, last_invite_sent_at: SKIP, last_invite_accepted_at: SKIP, additional_properties: {}) @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 @last_invite_sent_at = last_invite_sent_at unless last_invite_sent_at == SKIP @last_invite_accepted_at = last_invite_accepted_at unless last_invite_accepted_at == SKIP # Add additional model properties to the instance. additional_properties.each do |_name, _value| instance_variable_set("@#{_name}", _value) end end |
Instance Attribute Details
#last_accepted_at ⇒ String
TODO: Write general description for this method
19 20 21 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 19 def last_accepted_at @last_accepted_at end |
#last_invite_accepted_at ⇒ DateTime
TODO: Write general description for this method
35 36 37 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 35 def last_invite_accepted_at @last_invite_accepted_at end |
#last_invite_sent_at ⇒ DateTime
TODO: Write general description for this method
31 32 33 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 31 def last_invite_sent_at @last_invite_sent_at end |
#last_sent_at ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 15 def last_sent_at @last_sent_at end |
#send_invite_link_text ⇒ String
TODO: Write general description for this method
23 24 25 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 23 def send_invite_link_text @send_invite_link_text end |
#uninvited_count ⇒ Integer
TODO: Write general description for this method
27 28 29 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 27 def uninvited_count @uninvited_count end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 84 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 last_invite_sent_at = if hash.key?('last_invite_sent_at') (DateTimeHelper.from_rfc3339(hash['last_invite_sent_at']) if hash['last_invite_sent_at']) else SKIP end last_invite_accepted_at = if hash.key?('last_invite_accepted_at') (DateTimeHelper.from_rfc3339(hash['last_invite_accepted_at']) if hash['last_invite_accepted_at']) else SKIP end # Clean out expected properties from Hash. names.each_value { |k| hash.delete(k) } # Create object from extracted values. ResentInvitation.new(last_sent_at: last_sent_at, last_accepted_at: last_accepted_at, send_invite_link_text: send_invite_link_text, uninvited_count: uninvited_count, last_invite_sent_at: last_invite_sent_at, last_invite_accepted_at: last_invite_accepted_at, additional_properties: hash) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 38 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['last_invite_sent_at'] = 'last_invite_sent_at' @_hash['last_invite_accepted_at'] = 'last_invite_accepted_at' @_hash end |
.nullables ⇒ Object
An array for nullable fields
62 63 64 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 62 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 50 def self.optionals %w[ last_sent_at last_accepted_at send_invite_link_text uninvited_count last_invite_sent_at last_invite_accepted_at ] end |
Instance Method Details
#to_custom_last_invite_accepted_at ⇒ Object
123 124 125 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 123 def to_custom_last_invite_accepted_at DateTimeHelper.to_rfc3339(last_invite_accepted_at) end |
#to_custom_last_invite_sent_at ⇒ Object
119 120 121 |
# File 'lib/advanced_billing/models/resent_invitation.rb', line 119 def to_custom_last_invite_sent_at DateTimeHelper.to_rfc3339(last_invite_sent_at) end |