Class: OCI::MarketplacePrivateOffer::Models::UpdateOfferDetails
- Inherits:
-
Object
- Object
- OCI::MarketplacePrivateOffer::Models::UpdateOfferDetails
- Defined in:
- lib/oci/marketplace_private_offer/models/update_offer_details.rb
Overview
The information to be updated.
Instance Attribute Summary collapse
-
#buyer_compartment_id ⇒ String
OCID of the buyer's tenancy (root compartment).
- #buyer_information ⇒ OCI::MarketplacePrivateOffer::Models::BuyerInformation
-
#custom_fields ⇒ Array<OCI::MarketplacePrivateOffer::Models::CustomField>
A list of key value pairs specified by the seller.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
Description of the Offer.
-
#display_name ⇒ String
Offers Identifier.
-
#duration ⇒ String
Duration the Offer will be active after its start date.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#internal_notes ⇒ String
Internal notes of the Offer.
- #pricing ⇒ OCI::MarketplacePrivateOffer::Models::Pricing
-
#resource_bundles ⇒ Array<OCI::MarketplacePrivateOffer::Models::ResourceBundle>
A list of Resource Bundles associated with an Offer.
- #seller_information ⇒ OCI::MarketplacePrivateOffer::Models::SellerInformation
-
#time_accept_by ⇒ DateTime
The time the Offer must be accepted by the Buyer before the Offer becomes invalid.
-
#time_start_date ⇒ DateTime
The time the Offer will become active after it has been accepted by the Buyer.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UpdateOfferDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ UpdateOfferDetails
Initializes the object
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 132 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.buyer_compartment_id = attributes[:'buyerCompartmentId'] if attributes[:'buyerCompartmentId'] raise 'You cannot provide both :buyerCompartmentId and :buyer_compartment_id' if attributes.key?(:'buyerCompartmentId') && attributes.key?(:'buyer_compartment_id') self.buyer_compartment_id = attributes[:'buyer_compartment_id'] if attributes[:'buyer_compartment_id'] self.description = attributes[:'description'] if attributes[:'description'] self.internal_notes = attributes[:'internalNotes'] if attributes[:'internalNotes'] raise 'You cannot provide both :internalNotes and :internal_notes' if attributes.key?(:'internalNotes') && attributes.key?(:'internal_notes') self.internal_notes = attributes[:'internal_notes'] if attributes[:'internal_notes'] self.time_start_date = attributes[:'timeStartDate'] if attributes[:'timeStartDate'] raise 'You cannot provide both :timeStartDate and :time_start_date' if attributes.key?(:'timeStartDate') && attributes.key?(:'time_start_date') self.time_start_date = attributes[:'time_start_date'] if attributes[:'time_start_date'] self.duration = attributes[:'duration'] if attributes[:'duration'] self.time_accept_by = attributes[:'timeAcceptBy'] if attributes[:'timeAcceptBy'] raise 'You cannot provide both :timeAcceptBy and :time_accept_by' if attributes.key?(:'timeAcceptBy') && attributes.key?(:'time_accept_by') self.time_accept_by = attributes[:'time_accept_by'] if attributes[:'time_accept_by'] self.pricing = attributes[:'pricing'] if attributes[:'pricing'] self.buyer_information = attributes[:'buyerInformation'] if attributes[:'buyerInformation'] raise 'You cannot provide both :buyerInformation and :buyer_information' if attributes.key?(:'buyerInformation') && attributes.key?(:'buyer_information') self.buyer_information = attributes[:'buyer_information'] if attributes[:'buyer_information'] self.seller_information = attributes[:'sellerInformation'] if attributes[:'sellerInformation'] raise 'You cannot provide both :sellerInformation and :seller_information' if attributes.key?(:'sellerInformation') && attributes.key?(:'seller_information') self.seller_information = attributes[:'seller_information'] if attributes[:'seller_information'] self.resource_bundles = attributes[:'resourceBundles'] if attributes[:'resourceBundles'] raise 'You cannot provide both :resourceBundles and :resource_bundles' if attributes.key?(:'resourceBundles') && attributes.key?(:'resource_bundles') self.resource_bundles = attributes[:'resource_bundles'] if attributes[:'resource_bundles'] self.custom_fields = attributes[:'customFields'] if attributes[:'customFields'] raise 'You cannot provide both :customFields and :custom_fields' if attributes.key?(:'customFields') && attributes.key?(:'custom_fields') self.custom_fields = attributes[:'custom_fields'] if attributes[:'custom_fields'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] end |
Instance Attribute Details
#buyer_compartment_id ⇒ String
OCID of the buyer's tenancy (root compartment).
17 18 19 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 17 def buyer_compartment_id @buyer_compartment_id end |
#buyer_information ⇒ OCI::MarketplacePrivateOffer::Models::BuyerInformation
43 44 45 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 43 def buyer_information @buyer_information end |
#custom_fields ⇒ Array<OCI::MarketplacePrivateOffer::Models::CustomField>
A list of key value pairs specified by the seller
54 55 56 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 54 def custom_fields @custom_fields end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
66 67 68 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 66 def @defined_tags end |
#description ⇒ String
Description of the Offer
21 22 23 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 21 def description @description end |
#display_name ⇒ String
Offers Identifier
13 14 15 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 13 def display_name @display_name end |
#duration ⇒ String
Duration the Offer will be active after its start date. An ISO8601 extended formatted string.
33 34 35 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 33 def duration @duration end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
60 61 62 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 60 def @freeform_tags end |
#internal_notes ⇒ String
Internal notes of the Offer
25 26 27 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 25 def internal_notes @internal_notes end |
#pricing ⇒ OCI::MarketplacePrivateOffer::Models::Pricing
40 41 42 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 40 def pricing @pricing end |
#resource_bundles ⇒ Array<OCI::MarketplacePrivateOffer::Models::ResourceBundle>
A list of Resource Bundles associated with an Offer.
50 51 52 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 50 def resource_bundles @resource_bundles end |
#seller_information ⇒ OCI::MarketplacePrivateOffer::Models::SellerInformation
46 47 48 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 46 def seller_information @seller_information end |
#time_accept_by ⇒ DateTime
The time the Offer must be accepted by the Buyer before the Offer becomes invalid. An RFC3339 formatted datetime string
37 38 39 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 37 def time_accept_by @time_accept_by end |
#time_start_date ⇒ DateTime
The time the Offer will become active after it has been accepted by the Buyer. An RFC3339 formatted datetime string
29 30 31 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 29 def time_start_date @time_start_date end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 69 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'buyer_compartment_id': :'buyerCompartmentId', 'description': :'description', 'internal_notes': :'internalNotes', 'time_start_date': :'timeStartDate', 'duration': :'duration', 'time_accept_by': :'timeAcceptBy', 'pricing': :'pricing', 'buyer_information': :'buyerInformation', 'seller_information': :'sellerInformation', 'resource_bundles': :'resourceBundles', 'custom_fields': :'customFields', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 91 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'buyer_compartment_id': :'String', 'description': :'String', 'internal_notes': :'String', 'time_start_date': :'DateTime', 'duration': :'String', 'time_accept_by': :'DateTime', 'pricing': :'OCI::MarketplacePrivateOffer::Models::Pricing', 'buyer_information': :'OCI::MarketplacePrivateOffer::Models::BuyerInformation', 'seller_information': :'OCI::MarketplacePrivateOffer::Models::SellerInformation', 'resource_bundles': :'Array<OCI::MarketplacePrivateOffer::Models::ResourceBundle>', 'custom_fields': :'Array<OCI::MarketplacePrivateOffer::Models::CustomField>', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 218 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && buyer_compartment_id == other.buyer_compartment_id && description == other.description && internal_notes == other.internal_notes && time_start_date == other.time_start_date && duration == other.duration && time_accept_by == other.time_accept_by && pricing == other.pricing && buyer_information == other.buyer_information && seller_information == other.seller_information && resource_bundles == other.resource_bundles && custom_fields == other.custom_fields && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 261 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
241 242 243 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 241 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
250 251 252 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 250 def hash [display_name, buyer_compartment_id, description, internal_notes, time_start_date, duration, time_accept_by, pricing, buyer_information, seller_information, resource_bundles, custom_fields, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
294 295 296 297 298 299 300 301 302 303 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 294 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
288 289 290 |
# File 'lib/oci/marketplace_private_offer/models/update_offer_details.rb', line 288 def to_s to_hash.to_s end |