Class: AdvancedBilling::RevokedInvitation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::RevokedInvitation
- Defined in:
- lib/advanced_billing/models/revoked_invitation.rb
Overview
RevokedInvitation Model.
Instance Attribute Summary collapse
-
#last_accepted_at ⇒ String
TODO: Write general description for this method.
-
#last_sent_at ⇒ 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, uninvited_count: SKIP, additional_properties: {}) ⇒ RevokedInvitation
constructor
A new instance of RevokedInvitation.
Methods inherited from BaseModel
Constructor Details
#initialize(last_sent_at: SKIP, last_accepted_at: SKIP, uninvited_count: SKIP, additional_properties: {}) ⇒ RevokedInvitation
Returns a new instance of RevokedInvitation.
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/advanced_billing/models/revoked_invitation.rb', line 47 def initialize(last_sent_at: SKIP, last_accepted_at: SKIP, uninvited_count: 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 @uninvited_count = uninvited_count unless uninvited_count == 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
18 19 20 |
# File 'lib/advanced_billing/models/revoked_invitation.rb', line 18 def last_accepted_at @last_accepted_at end |
#last_sent_at ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/advanced_billing/models/revoked_invitation.rb', line 14 def last_sent_at @last_sent_at end |
#uninvited_count ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/advanced_billing/models/revoked_invitation.rb', line 22 def uninvited_count @uninvited_count end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/advanced_billing/models/revoked_invitation.rb', line 60 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 uninvited_count = hash.key?('uninvited_count') ? hash['uninvited_count'] : SKIP # Clean out expected properties from Hash. names.each_value { |k| hash.delete(k) } # Create object from extracted values. RevokedInvitation.new(last_sent_at: last_sent_at, last_accepted_at: last_accepted_at, uninvited_count: uninvited_count, additional_properties: hash) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/advanced_billing/models/revoked_invitation.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['last_sent_at'] = 'last_sent_at' @_hash['last_accepted_at'] = 'last_accepted_at' @_hash['uninvited_count'] = 'uninvited_count' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/advanced_billing/models/revoked_invitation.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/advanced_billing/models/revoked_invitation.rb', line 34 def self.optionals %w[ last_sent_at last_accepted_at uninvited_count ] end |