Class: OCI::MarketplacePublisher::Models::OfferSummary
- Inherits:
-
Object
- Object
- OCI::MarketplacePublisher::Models::OfferSummary
- Defined in:
- lib/oci/marketplace_publisher/models/offer_summary.rb
Overview
Summary of the Offers.
Instance Attribute Summary collapse
-
#buyer_compartment_id ⇒ String
[Required] Ocid of the buyer tenancy.
- #buyer_information ⇒ OCI::MarketplacePublisher::Models::BuyerInformation
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource.
-
#display_name ⇒ String
[Required] Offer Identifier, can be renamed.
-
#freeform_tags ⇒ Hash<String, String>
[Required] Simple key-value pair that is applied without any predefined name, type or scope.
-
#id ⇒ String
[Required] Unique identifier that is immutable on creation.
-
#lifecycle_details ⇒ String
A message describing the current state in more detail.
-
#lifecycle_state ⇒ String
[Required] The current state of the Offer.
-
#offer_status ⇒ String
The human readable representation of where the offer is at in it's contract lifecycle.
- #pricing ⇒ OCI::MarketplacePublisher::Models::Pricing
-
#seller_compartment_id ⇒ String
[Required] Ocid of the seller tenancy.
- #seller_information ⇒ OCI::MarketplacePublisher::Models::SellerInformation
-
#time_accept_by ⇒ DateTime
The time the Offer must be accepted by the Buyer before the Offer becomes invalid.
-
#time_accepted ⇒ DateTime
The time the Offer was accepted by the Buyer of the Offer.
-
#time_created ⇒ DateTime
[Required] The time the the Offer was created.
-
#time_offer_end ⇒ DateTime
The time the accepted Offer will end.
-
#time_start_date ⇒ DateTime
The time the Offer will become active after it has been accepted by the Buyer.
-
#time_updated ⇒ DateTime
The time the Offer was updated.
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 = {}) ⇒ OfferSummary
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 = {}) ⇒ OfferSummary
Initializes the object
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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 160 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.id = attributes[:'id'] if attributes[:'id'] 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.seller_compartment_id = attributes[:'sellerCompartmentId'] if attributes[:'sellerCompartmentId'] raise 'You cannot provide both :sellerCompartmentId and :seller_compartment_id' if attributes.key?(:'sellerCompartmentId') && attributes.key?(:'seller_compartment_id') self.seller_compartment_id = attributes[:'seller_compartment_id'] if attributes[:'seller_compartment_id'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] 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.time_accepted = attributes[:'timeAccepted'] if attributes[:'timeAccepted'] raise 'You cannot provide both :timeAccepted and :time_accepted' if attributes.key?(:'timeAccepted') && attributes.key?(:'time_accepted') self.time_accepted = attributes[:'time_accepted'] if attributes[:'time_accepted'] 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.time_offer_end = attributes[:'timeOfferEnd'] if attributes[:'timeOfferEnd'] raise 'You cannot provide both :timeOfferEnd and :time_offer_end' if attributes.key?(:'timeOfferEnd') && attributes.key?(:'time_offer_end') self.time_offer_end = attributes[:'time_offer_end'] if attributes[:'time_offer_end'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] self.offer_status = attributes[:'offerStatus'] if attributes[:'offerStatus'] raise 'You cannot provide both :offerStatus and :offer_status' if attributes.key?(:'offerStatus') && attributes.key?(:'offer_status') self.offer_status = attributes[:'offer_status'] if attributes[:'offer_status'] 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.pricing = attributes[:'pricing'] if attributes[:'pricing'] 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
[Required] Ocid of the buyer tenancy.
21 22 23 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 21 def buyer_compartment_id @buyer_compartment_id end |
#buyer_information ⇒ OCI::MarketplacePublisher::Models::BuyerInformation
64 65 66 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 64 def buyer_information @buyer_information end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
82 83 84 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 82 def @defined_tags end |
#display_name ⇒ String
[Required] Offer Identifier, can be renamed
17 18 19 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 17 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
[Required] Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
76 77 78 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 76 def @freeform_tags end |
#id ⇒ String
[Required] Unique identifier that is immutable on creation
13 14 15 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 13 def id @id end |
#lifecycle_details ⇒ String
A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
57 58 59 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 57 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the Offer.
53 54 55 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 53 def lifecycle_state @lifecycle_state end |
#offer_status ⇒ String
The human readable representation of where the offer is at in it's contract lifecycle.
61 62 63 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 61 def offer_status @offer_status end |
#pricing ⇒ OCI::MarketplacePublisher::Models::Pricing
70 71 72 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 70 def pricing @pricing end |
#seller_compartment_id ⇒ String
[Required] Ocid of the seller tenancy.
25 26 27 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 25 def seller_compartment_id @seller_compartment_id end |
#seller_information ⇒ OCI::MarketplacePublisher::Models::SellerInformation
67 68 69 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 67 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_publisher/models/offer_summary.rb', line 37 def time_accept_by @time_accept_by end |
#time_accepted ⇒ DateTime
The time the Offer was accepted by the Buyer of the Offer. An RFC3339 formatted datetime string
41 42 43 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 41 def time_accepted @time_accepted end |
#time_created ⇒ DateTime
[Required] The time the the Offer was created. An RFC3339 formatted datetime string
29 30 31 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 29 def time_created @time_created end |
#time_offer_end ⇒ DateTime
The time the accepted Offer will end. An RFC3339 formatted datetime string
49 50 51 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 49 def time_offer_end @time_offer_end 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
45 46 47 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 45 def time_start_date @time_start_date end |
#time_updated ⇒ DateTime
The time the Offer was updated. An RFC3339 formatted datetime string
33 34 35 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 33 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 85 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'buyer_compartment_id': :'buyerCompartmentId', 'seller_compartment_id': :'sellerCompartmentId', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'time_accept_by': :'timeAcceptBy', 'time_accepted': :'timeAccepted', 'time_start_date': :'timeStartDate', 'time_offer_end': :'timeOfferEnd', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'offer_status': :'offerStatus', 'buyer_information': :'buyerInformation', 'seller_information': :'sellerInformation', 'pricing': :'pricing', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 111 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'buyer_compartment_id': :'String', 'seller_compartment_id': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'time_accept_by': :'DateTime', 'time_accepted': :'DateTime', 'time_start_date': :'DateTime', 'time_offer_end': :'DateTime', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'offer_status': :'String', 'buyer_information': :'OCI::MarketplacePublisher::Models::BuyerInformation', 'seller_information': :'OCI::MarketplacePublisher::Models::SellerInformation', 'pricing': :'OCI::MarketplacePublisher::Models::Pricing', '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.
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 274 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && buyer_compartment_id == other.buyer_compartment_id && seller_compartment_id == other.seller_compartment_id && time_created == other.time_created && time_updated == other.time_updated && time_accept_by == other.time_accept_by && time_accepted == other.time_accepted && time_start_date == other.time_start_date && time_offer_end == other.time_offer_end && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && offer_status == other.offer_status && buyer_information == other.buyer_information && seller_information == other.seller_information && pricing == other.pricing && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 321 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
301 302 303 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 301 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
310 311 312 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 310 def hash [id, display_name, buyer_compartment_id, seller_compartment_id, time_created, time_updated, time_accept_by, time_accepted, time_start_date, time_offer_end, lifecycle_state, lifecycle_details, offer_status, buyer_information, seller_information, pricing, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
354 355 356 357 358 359 360 361 362 363 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 354 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
348 349 350 |
# File 'lib/oci/marketplace_publisher/models/offer_summary.rb', line 348 def to_s to_hash.to_s end |