Class: AdvancedBilling::PublicKey
- Defined in:
- lib/advanced_billing/models/public_key.rb
Overview
PublicKey Model.
Instance Attribute Summary collapse
-
#created_at ⇒ String
TODO: Write general description for this method.
-
#public_key ⇒ String
TODO: Write general description for this method.
-
#requires_security_token ⇒ TrueClass | FalseClass
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(public_key = SKIP, requires_security_token = SKIP, created_at = SKIP) ⇒ PublicKey
constructor
A new instance of PublicKey.
Methods inherited from BaseModel
Constructor Details
#initialize(public_key = SKIP, requires_security_token = SKIP, created_at = SKIP) ⇒ PublicKey
Returns a new instance of PublicKey.
47 48 49 50 51 52 |
# File 'lib/advanced_billing/models/public_key.rb', line 47 def initialize(public_key = SKIP, requires_security_token = SKIP, created_at = SKIP) @public_key = public_key unless public_key == SKIP @requires_security_token = requires_security_token unless requires_security_token == SKIP @created_at = created_at unless created_at == SKIP end |
Instance Attribute Details
#created_at ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/advanced_billing/models/public_key.rb', line 22 def created_at @created_at end |
#public_key ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/advanced_billing/models/public_key.rb', line 14 def public_key @public_key end |
#requires_security_token ⇒ TrueClass | FalseClass
TODO: Write general description for this method
18 19 20 |
# File 'lib/advanced_billing/models/public_key.rb', line 18 def requires_security_token @requires_security_token end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/advanced_billing/models/public_key.rb', line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. public_key = hash.key?('public_key') ? hash['public_key'] : SKIP requires_security_token = hash.key?('requires_security_token') ? hash['requires_security_token'] : SKIP created_at = hash.key?('created_at') ? hash['created_at'] : SKIP # Create object from extracted values. PublicKey.new(public_key, requires_security_token, created_at) 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/public_key.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['public_key'] = 'public_key' @_hash['requires_security_token'] = 'requires_security_token' @_hash['created_at'] = 'created_at' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/advanced_billing/models/public_key.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/public_key.rb', line 34 def self.optionals %w[ public_key requires_security_token created_at ] end |