Class: PinterestSdkClient::SSIOInsertionOrderUpdate
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- PinterestSdkClient::SSIOInsertionOrderUpdate
- Defined in:
- lib/pinterest_sdk/models/ssio_insertion_order_update.rb
Overview
Resource create or update operation model.
Instance Attribute Summary collapse
-
#ads_manager_order_line_id ⇒ Object
Ads manager OrderLineId.
-
#agency_link ⇒ Object
URL link for agency.
-
#billing_contact_email ⇒ Object
The billing contact email.
-
#billing_contact_firstname ⇒ Object
The billing contact first name.
-
#billing_contact_lastname ⇒ Object
The billing contact last name.
-
#budget_amount ⇒ Object
If Budget order line, the budget amount.
-
#end_date ⇒ Object
End date of time period.
-
#media_contact_email ⇒ Object
The media contact email.
-
#media_contact_firstname ⇒ Object
The media contact first name.
-
#media_contact_lastname ⇒ Object
The media contact last name.
-
#oracle_line_id ⇒ Object
LineId in the Oracle DB.
-
#po_number ⇒ Object
The po number.
-
#salesforce_order_id ⇒ Object
OrderId in SFDC.
-
#salesforce_order_line_id ⇒ Object
OrderLineId in SFDC.
-
#start_date ⇒ Object
Starting date of time period.
-
#user_email ⇒ Object
The email of user submitting the insertion order.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SSIOInsertionOrderUpdate
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ SSIOInsertionOrderUpdate
Initializes the object
129 130 131 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 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 129 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::SSIOInsertionOrderUpdate` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `PinterestSdkClient::SSIOInsertionOrderUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'ads_manager_order_line_id') self.ads_manager_order_line_id = attributes[:'ads_manager_order_line_id'] end if attributes.key?(:'agency_link') self.agency_link = attributes[:'agency_link'] end if attributes.key?(:'billing_contact_email') self.billing_contact_email = attributes[:'billing_contact_email'] end if attributes.key?(:'billing_contact_firstname') self.billing_contact_firstname = attributes[:'billing_contact_firstname'] end if attributes.key?(:'billing_contact_lastname') self.billing_contact_lastname = attributes[:'billing_contact_lastname'] end if attributes.key?(:'budget_amount') self.budget_amount = attributes[:'budget_amount'] end if attributes.key?(:'end_date') self.end_date = attributes[:'end_date'] end if attributes.key?(:'media_contact_email') self.media_contact_email = attributes[:'media_contact_email'] end if attributes.key?(:'media_contact_firstname') self.media_contact_firstname = attributes[:'media_contact_firstname'] end if attributes.key?(:'media_contact_lastname') self.media_contact_lastname = attributes[:'media_contact_lastname'] end if attributes.key?(:'oracle_line_id') self.oracle_line_id = attributes[:'oracle_line_id'] end if attributes.key?(:'po_number') self.po_number = attributes[:'po_number'] end if attributes.key?(:'salesforce_order_id') self.salesforce_order_id = attributes[:'salesforce_order_id'] end if attributes.key?(:'salesforce_order_line_id') self.salesforce_order_line_id = attributes[:'salesforce_order_line_id'] end if attributes.key?(:'start_date') self.start_date = attributes[:'start_date'] end if attributes.key?(:'user_email') self.user_email = attributes[:'user_email'] end end |
Instance Attribute Details
#ads_manager_order_line_id ⇒ Object
Ads manager OrderLineId
20 21 22 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 20 def ads_manager_order_line_id @ads_manager_order_line_id end |
#agency_link ⇒ Object
URL link for agency
23 24 25 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 23 def agency_link @agency_link end |
#billing_contact_email ⇒ Object
The billing contact email
26 27 28 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 26 def billing_contact_email @billing_contact_email end |
#billing_contact_firstname ⇒ Object
The billing contact first name
29 30 31 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 29 def billing_contact_firstname @billing_contact_firstname end |
#billing_contact_lastname ⇒ Object
The billing contact last name
32 33 34 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 32 def billing_contact_lastname @billing_contact_lastname end |
#budget_amount ⇒ Object
If Budget order line, the budget amount.
35 36 37 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 35 def budget_amount @budget_amount end |
#end_date ⇒ Object
End date of time period. Format: YYYY-MM-DD
38 39 40 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 38 def end_date @end_date end |
#media_contact_email ⇒ Object
The media contact email
41 42 43 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 41 def media_contact_email @media_contact_email end |
#media_contact_firstname ⇒ Object
The media contact first name
44 45 46 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 44 def media_contact_firstname @media_contact_firstname end |
#media_contact_lastname ⇒ Object
The media contact last name
47 48 49 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 47 def media_contact_lastname @media_contact_lastname end |
#oracle_line_id ⇒ Object
LineId in the Oracle DB
50 51 52 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 50 def oracle_line_id @oracle_line_id end |
#po_number ⇒ Object
The po number
53 54 55 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 53 def po_number @po_number end |
#salesforce_order_id ⇒ Object
OrderId in SFDC
56 57 58 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 56 def salesforce_order_id @salesforce_order_id end |
#salesforce_order_line_id ⇒ Object
OrderLineId in SFDC
59 60 61 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 59 def salesforce_order_line_id @salesforce_order_line_id end |
#start_date ⇒ Object
Starting date of time period. Format: YYYY-MM-DD
62 63 64 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 62 def start_date @start_date end |
#user_email ⇒ Object
The email of user submitting the insertion order
65 66 67 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 65 def user_email @user_email end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
90 91 92 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 90 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
95 96 97 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 95 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 68 def self.attribute_map { :'ads_manager_order_line_id' => :'ads_manager_order_line_id', :'agency_link' => :'agency_link', :'billing_contact_email' => :'billing_contact_email', :'billing_contact_firstname' => :'billing_contact_firstname', :'billing_contact_lastname' => :'billing_contact_lastname', :'budget_amount' => :'budget_amount', :'end_date' => :'end_date', :'media_contact_email' => :'media_contact_email', :'media_contact_firstname' => :'media_contact_firstname', :'media_contact_lastname' => :'media_contact_lastname', :'oracle_line_id' => :'oracle_line_id', :'po_number' => :'po_number', :'salesforce_order_id' => :'salesforce_order_id', :'salesforce_order_line_id' => :'salesforce_order_line_id', :'start_date' => :'start_date', :'user_email' => :'user_email' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 303 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
122 123 124 125 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 122 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 100 def self.openapi_types { :'ads_manager_order_line_id' => :'String', :'agency_link' => :'String', :'billing_contact_email' => :'String', :'billing_contact_firstname' => :'String', :'billing_contact_lastname' => :'String', :'budget_amount' => :'Float', :'end_date' => :'String', :'media_contact_email' => :'String', :'media_contact_firstname' => :'String', :'media_contact_lastname' => :'String', :'oracle_line_id' => :'String', :'po_number' => :'String', :'salesforce_order_id' => :'String', :'salesforce_order_line_id' => :'String', :'start_date' => :'String', :'user_email' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 267 def ==(o) return true if self.equal?(o) self.class == o.class && ads_manager_order_line_id == o.ads_manager_order_line_id && agency_link == o.agency_link && billing_contact_email == o.billing_contact_email && billing_contact_firstname == o.billing_contact_firstname && billing_contact_lastname == o.billing_contact_lastname && budget_amount == o.budget_amount && end_date == o.end_date && media_contact_email == o.media_contact_email && media_contact_firstname == o.media_contact_firstname && media_contact_lastname == o.media_contact_lastname && oracle_line_id == o.oracle_line_id && po_number == o.po_number && salesforce_order_id == o.salesforce_order_id && salesforce_order_line_id == o.salesforce_order_line_id && start_date == o.start_date && user_email == o.user_email end |
#eql?(o) ⇒ Boolean
290 291 292 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 290 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
296 297 298 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 296 def hash [ads_manager_order_line_id, agency_link, billing_contact_email, billing_contact_firstname, billing_contact_lastname, budget_amount, end_date, media_contact_email, media_contact_firstname, media_contact_lastname, oracle_line_id, po_number, salesforce_order_id, salesforce_order_line_id, start_date, user_email].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 210 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}$/) if !@end_date.nil? && @end_date !~ pattern invalid_properties.push("invalid value for \"end_date\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}$/) if !@start_date.nil? && @start_date !~ pattern invalid_properties.push("invalid value for \"start_date\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 325 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
228 229 230 231 232 233 |
# File 'lib/pinterest_sdk/models/ssio_insertion_order_update.rb', line 228 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@end_date.nil? && @end_date !~ Regexp.new(/^\d{4}-\d{2}-\d{2}$/) return false if !@start_date.nil? && @start_date !~ Regexp.new(/^\d{4}-\d{2}-\d{2}$/) true end |