Class: Azure::ARM::Web::Models::DomainPurchaseConsent
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::DomainPurchaseConsent
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/domain_purchase_consent.rb
Overview
Domain purchase consent object representing acceptance of applicable legal agreements
Instance Attribute Summary collapse
-
#agreed_at ⇒ DateTime
Timestamp when the agreements were accepted.
-
#agreed_by ⇒ String
Client IP address.
-
#agreement_keys ⇒ Array<String>
list can be retrieved using ListLegalAgreements Api under TopLevelDomain resource.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ DomainPurchaseConsent
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#agreed_at ⇒ DateTime
Returns Timestamp when the agreements were accepted.
25 26 27 |
# File 'lib/azure_mgmt_web/models/domain_purchase_consent.rb', line 25 def agreed_at @agreed_at end |
#agreed_by ⇒ String
Returns Client IP address.
22 23 24 |
# File 'lib/azure_mgmt_web/models/domain_purchase_consent.rb', line 22 def agreed_by @agreed_by end |
#agreement_keys ⇒ Array<String>
list can be retrieved using ListLegalAgreements Api under TopLevelDomain resource
19 20 21 |
# File 'lib/azure_mgmt_web/models/domain_purchase_consent.rb', line 19 def agreement_keys @agreement_keys end |
Class Method Details
.deserialize_object(object) ⇒ DomainPurchaseConsent
Deserializes given Ruby Hash into Model object.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/azure_mgmt_web/models/domain_purchase_consent.rb', line 61 def self.deserialize_object(object) return if object.nil? output_object = DomainPurchaseConsent.new deserialized_property = object['agreementKeys'] output_object.agreement_keys = deserialized_property deserialized_property = object['agreedBy'] output_object.agreed_by = deserialized_property deserialized_property = object['agreedAt'] deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty? output_object.agreed_at = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/azure_mgmt_web/models/domain_purchase_consent.rb', line 39 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.agreement_keys output_object['agreementKeys'] = serialized_property unless serialized_property.nil? serialized_property = object.agreed_by output_object['agreedBy'] = serialized_property unless serialized_property.nil? serialized_property = object.agreed_at serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ') output_object['agreedAt'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
30 31 32 |
# File 'lib/azure_mgmt_web/models/domain_purchase_consent.rb', line 30 def validate @agreement_keys.each{ |e| e.validate if e.respond_to?(:validate) } unless @agreement_keys.nil? end |