Class: AdvancedBilling::PortalManagementLink
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::PortalManagementLink
- Defined in:
- lib/advanced_billing/models/portal_management_link.rb
Overview
PortalManagementLink Model.
Instance Attribute Summary collapse
-
#created_at ⇒ String
TODO: Write general description for this method.
-
#expires_at ⇒ String
TODO: Write general description for this method.
-
#fetch_count ⇒ Integer
TODO: Write general description for this method.
-
#last_invite_sent_at ⇒ String
TODO: Write general description for this method.
-
#new_link_available_at ⇒ String
TODO: Write general description for this method.
-
#url ⇒ String
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(url = SKIP, fetch_count = SKIP, created_at = SKIP, new_link_available_at = SKIP, expires_at = SKIP, last_invite_sent_at = SKIP) ⇒ PortalManagementLink
constructor
A new instance of PortalManagementLink.
Methods inherited from BaseModel
Constructor Details
#initialize(url = SKIP, fetch_count = SKIP, created_at = SKIP, new_link_available_at = SKIP, expires_at = SKIP, last_invite_sent_at = SKIP) ⇒ PortalManagementLink
Returns a new instance of PortalManagementLink.
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/advanced_billing/models/portal_management_link.rb', line 67 def initialize(url = SKIP, fetch_count = SKIP, created_at = SKIP, new_link_available_at = SKIP, expires_at = SKIP, last_invite_sent_at = SKIP) @url = url unless url == SKIP @fetch_count = fetch_count unless fetch_count == SKIP @created_at = created_at unless created_at == SKIP @new_link_available_at = new_link_available_at unless new_link_available_at == SKIP @expires_at = expires_at unless expires_at == SKIP @last_invite_sent_at = last_invite_sent_at unless last_invite_sent_at == SKIP end |
Instance Attribute Details
#created_at ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/advanced_billing/models/portal_management_link.rb', line 22 def created_at @created_at end |
#expires_at ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/advanced_billing/models/portal_management_link.rb', line 30 def expires_at @expires_at end |
#fetch_count ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/advanced_billing/models/portal_management_link.rb', line 18 def fetch_count @fetch_count end |
#last_invite_sent_at ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/advanced_billing/models/portal_management_link.rb', line 34 def last_invite_sent_at @last_invite_sent_at end |
#new_link_available_at ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/advanced_billing/models/portal_management_link.rb', line 26 def new_link_available_at @new_link_available_at end |
#url ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/advanced_billing/models/portal_management_link.rb', line 14 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/advanced_billing/models/portal_management_link.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. url = hash.key?('url') ? hash['url'] : SKIP fetch_count = hash.key?('fetch_count') ? hash['fetch_count'] : SKIP created_at = hash.key?('created_at') ? hash['created_at'] : SKIP new_link_available_at = hash.key?('new_link_available_at') ? hash['new_link_available_at'] : SKIP expires_at = hash.key?('expires_at') ? hash['expires_at'] : SKIP last_invite_sent_at = hash.key?('last_invite_sent_at') ? hash['last_invite_sent_at'] : SKIP # Create object from extracted values. PortalManagementLink.new(url, fetch_count, created_at, new_link_available_at, expires_at, last_invite_sent_at) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/advanced_billing/models/portal_management_link.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['url'] = 'url' @_hash['fetch_count'] = 'fetch_count' @_hash['created_at'] = 'created_at' @_hash['new_link_available_at'] = 'new_link_available_at' @_hash['expires_at'] = 'expires_at' @_hash['last_invite_sent_at'] = 'last_invite_sent_at' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 64 65 |
# File 'lib/advanced_billing/models/portal_management_link.rb', line 61 def self.nullables %w[ last_invite_sent_at ] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/advanced_billing/models/portal_management_link.rb', line 49 def self.optionals %w[ url fetch_count created_at new_link_available_at expires_at last_invite_sent_at ] end |