Class: SwaggerClient::BulkInvoiceRunItem
- Inherits:
-
Object
- Object
- SwaggerClient::BulkInvoiceRunItem
- Defined in:
- lib/swagger_client/models/bulk_invoice_run_item.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#account_name ⇒ Object
Returns the value of attribute account_name.
-
#created_on ⇒ Object
Returns the value of attribute created_on.
-
#draft_invoice_generated ⇒ Object
Returns the value of attribute draft_invoice_generated.
-
#draft_invoice_not_generated ⇒ Object
Returns the value of attribute draft_invoice_not_generated.
-
#draft_invoice_number ⇒ Object
Returns the value of attribute draft_invoice_number.
-
#email_sent ⇒ Object
Returns the value of attribute email_sent.
-
#excluded_for_emailing ⇒ Object
Returns the value of attribute excluded_for_emailing.
-
#excluded_for_posting ⇒ Object
Returns the value of attribute excluded_for_posting.
-
#failure_reason ⇒ Object
Returns the value of attribute failure_reason.
-
#included_for_emailing ⇒ Object
Returns the value of attribute included_for_emailing.
-
#included_for_posting ⇒ Object
Returns the value of attribute included_for_posting.
-
#invoice_amount ⇒ Object
Returns the value of attribute invoice_amount.
-
#invoice_created_on ⇒ Object
Returns the value of attribute invoice_created_on.
-
#invoice_currency_code ⇒ Object
Returns the value of attribute invoice_currency_code.
-
#invoice_not_posted ⇒ Object
Returns the value of attribute invoice_not_posted.
-
#invoice_posted ⇒ Object
Returns the value of attribute invoice_posted.
-
#posted_invoice_number ⇒ Object
Returns the value of attribute posted_invoice_number.
-
#run_id ⇒ Object
Returns the value of attribute run_id.
-
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
-
#updated_on ⇒ Object
Returns the value of attribute updated_on.
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
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ BulkInvoiceRunItem
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ BulkInvoiceRunItem
Initializes the object
115 116 117 118 119 120 121 122 123 124 125 126 127 128 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 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 115 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 } if attributes.has_key?(:'runId') self.run_id = attributes[:'runId'] end if attributes.has_key?(:'accountId') self.account_id = attributes[:'accountId'] end if attributes.has_key?(:'accountName') self.account_name = attributes[:'accountName'] end if attributes.has_key?(:'subscriptionId') self.subscription_id = attributes[:'subscriptionId'] end if attributes.has_key?(:'draftInvoiceNumber') self.draft_invoice_number = attributes[:'draftInvoiceNumber'] end if attributes.has_key?(:'postedInvoiceNumber') self.posted_invoice_number = attributes[:'postedInvoiceNumber'] end if attributes.has_key?(:'invoiceCreatedOn') self.invoice_created_on = attributes[:'invoiceCreatedOn'] end if attributes.has_key?(:'invoiceCurrencyCode') self.invoice_currency_code = attributes[:'invoiceCurrencyCode'] end if attributes.has_key?(:'invoiceAmount') self.invoice_amount = attributes[:'invoiceAmount'] end if attributes.has_key?(:'failureReason') self.failure_reason = attributes[:'failureReason'] end if attributes.has_key?(:'excludedForPosting') self.excluded_for_posting = attributes[:'excludedForPosting'] end if attributes.has_key?(:'excludedForEmailing') self.excluded_for_emailing = attributes[:'excludedForEmailing'] end if attributes.has_key?(:'emailSent') self.email_sent = attributes[:'emailSent'] end if attributes.has_key?(:'createdOn') self.created_on = attributes[:'createdOn'] end if attributes.has_key?(:'updatedOn') self.updated_on = attributes[:'updatedOn'] end if attributes.has_key?(:'draftInvoiceGenerated') self.draft_invoice_generated = attributes[:'draftInvoiceGenerated'] end if attributes.has_key?(:'includedForPosting') self.included_for_posting = attributes[:'includedForPosting'] end if attributes.has_key?(:'invoiceNotPosted') self.invoice_not_posted = attributes[:'invoiceNotPosted'] end if attributes.has_key?(:'draftInvoiceNotGenerated') self.draft_invoice_not_generated = attributes[:'draftInvoiceNotGenerated'] end if attributes.has_key?(:'includedForEmailing') self.included_for_emailing = attributes[:'includedForEmailing'] end if attributes.has_key?(:'invoicePosted') self.invoice_posted = attributes[:'invoicePosted'] end end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
19 20 21 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 19 def account_id @account_id end |
#account_name ⇒ Object
Returns the value of attribute account_name.
21 22 23 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 21 def account_name @account_name end |
#created_on ⇒ Object
Returns the value of attribute created_on.
43 44 45 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 43 def created_on @created_on end |
#draft_invoice_generated ⇒ Object
Returns the value of attribute draft_invoice_generated.
47 48 49 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 47 def draft_invoice_generated @draft_invoice_generated end |
#draft_invoice_not_generated ⇒ Object
Returns the value of attribute draft_invoice_not_generated.
53 54 55 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 53 def draft_invoice_not_generated @draft_invoice_not_generated end |
#draft_invoice_number ⇒ Object
Returns the value of attribute draft_invoice_number.
25 26 27 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 25 def draft_invoice_number @draft_invoice_number end |
#email_sent ⇒ Object
Returns the value of attribute email_sent.
41 42 43 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 41 def email_sent @email_sent end |
#excluded_for_emailing ⇒ Object
Returns the value of attribute excluded_for_emailing.
39 40 41 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 39 def excluded_for_emailing @excluded_for_emailing end |
#excluded_for_posting ⇒ Object
Returns the value of attribute excluded_for_posting.
37 38 39 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 37 def excluded_for_posting @excluded_for_posting end |
#failure_reason ⇒ Object
Returns the value of attribute failure_reason.
35 36 37 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 35 def failure_reason @failure_reason end |
#included_for_emailing ⇒ Object
Returns the value of attribute included_for_emailing.
55 56 57 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 55 def included_for_emailing @included_for_emailing end |
#included_for_posting ⇒ Object
Returns the value of attribute included_for_posting.
49 50 51 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 49 def included_for_posting @included_for_posting end |
#invoice_amount ⇒ Object
Returns the value of attribute invoice_amount.
33 34 35 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 33 def invoice_amount @invoice_amount end |
#invoice_created_on ⇒ Object
Returns the value of attribute invoice_created_on.
29 30 31 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 29 def invoice_created_on @invoice_created_on end |
#invoice_currency_code ⇒ Object
Returns the value of attribute invoice_currency_code.
31 32 33 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 31 def invoice_currency_code @invoice_currency_code end |
#invoice_not_posted ⇒ Object
Returns the value of attribute invoice_not_posted.
51 52 53 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 51 def invoice_not_posted @invoice_not_posted end |
#invoice_posted ⇒ Object
Returns the value of attribute invoice_posted.
57 58 59 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 57 def invoice_posted @invoice_posted end |
#posted_invoice_number ⇒ Object
Returns the value of attribute posted_invoice_number.
27 28 29 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 27 def posted_invoice_number @posted_invoice_number end |
#run_id ⇒ Object
Returns the value of attribute run_id.
17 18 19 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 17 def run_id @run_id end |
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
23 24 25 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 23 def subscription_id @subscription_id end |
#updated_on ⇒ Object
Returns the value of attribute updated_on.
45 46 47 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 45 def updated_on @updated_on end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 60 def self.attribute_map { :'run_id' => :'runId', :'account_id' => :'accountId', :'account_name' => :'accountName', :'subscription_id' => :'subscriptionId', :'draft_invoice_number' => :'draftInvoiceNumber', :'posted_invoice_number' => :'postedInvoiceNumber', :'invoice_created_on' => :'invoiceCreatedOn', :'invoice_currency_code' => :'invoiceCurrencyCode', :'invoice_amount' => :'invoiceAmount', :'failure_reason' => :'failureReason', :'excluded_for_posting' => :'excludedForPosting', :'excluded_for_emailing' => :'excludedForEmailing', :'email_sent' => :'emailSent', :'created_on' => :'createdOn', :'updated_on' => :'updatedOn', :'draft_invoice_generated' => :'draftInvoiceGenerated', :'included_for_posting' => :'includedForPosting', :'invoice_not_posted' => :'invoiceNotPosted', :'draft_invoice_not_generated' => :'draftInvoiceNotGenerated', :'included_for_emailing' => :'includedForEmailing', :'invoice_posted' => :'invoicePosted' } end |
.swagger_types ⇒ Object
Attribute type mapping.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 87 def self.swagger_types { :'run_id' => :'String', :'account_id' => :'String', :'account_name' => :'String', :'subscription_id' => :'String', :'draft_invoice_number' => :'String', :'posted_invoice_number' => :'String', :'invoice_created_on' => :'Integer', :'invoice_currency_code' => :'String', :'invoice_amount' => :'Float', :'failure_reason' => :'String', :'excluded_for_posting' => :'BOOLEAN', :'excluded_for_emailing' => :'BOOLEAN', :'email_sent' => :'BOOLEAN', :'created_on' => :'Integer', :'updated_on' => :'Integer', :'draft_invoice_generated' => :'BOOLEAN', :'included_for_posting' => :'BOOLEAN', :'invoice_not_posted' => :'BOOLEAN', :'draft_invoice_not_generated' => :'BOOLEAN', :'included_for_emailing' => :'BOOLEAN', :'invoice_posted' => :'BOOLEAN' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 221 def ==(o) return true if self.equal?(o) self.class == o.class && run_id == o.run_id && account_id == o.account_id && account_name == o.account_name && subscription_id == o.subscription_id && draft_invoice_number == o.draft_invoice_number && posted_invoice_number == o.posted_invoice_number && invoice_created_on == o.invoice_created_on && invoice_currency_code == o.invoice_currency_code && invoice_amount == o.invoice_amount && failure_reason == o.failure_reason && excluded_for_posting == o.excluded_for_posting && excluded_for_emailing == o.excluded_for_emailing && email_sent == o.email_sent && created_on == o.created_on && updated_on == o.updated_on && draft_invoice_generated == o.draft_invoice_generated && included_for_posting == o.included_for_posting && invoice_not_posted == o.invoice_not_posted && draft_invoice_not_generated == o.draft_invoice_not_generated && included_for_emailing == o.included_for_emailing && invoice_posted == o.invoice_posted end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 283 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = SwaggerClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 349 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 262 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if 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[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(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?(o) ⇒ Boolean
249 250 251 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 249 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
255 256 257 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 255 def hash [run_id, account_id, account_name, subscription_id, draft_invoice_number, posted_invoice_number, invoice_created_on, invoice_currency_code, invoice_amount, failure_reason, excluded_for_posting, excluded_for_emailing, email_sent, created_on, updated_on, draft_invoice_generated, included_for_posting, invoice_not_posted, draft_invoice_not_generated, included_for_emailing, invoice_posted].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
208 209 210 211 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 208 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
329 330 331 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 329 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
335 336 337 338 339 340 341 342 343 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 335 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
323 324 325 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 323 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
215 216 217 |
# File 'lib/swagger_client/models/bulk_invoice_run_item.rb', line 215 def valid? true end |