Class: UspsApi::AdjustmentsAdjustmentDetails
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UspsApi::AdjustmentsAdjustmentDetails
- Defined in:
- lib/usps_api/models/adjustments_adjustment_details.rb
Overview
Details on adjustments that will be or have been issued to a customer account. Fields will only be provided if they differed from the original manifested data.
Instance Attribute Summary collapse
-
#account_number ⇒ String
The Enterprise Payment Account the adjustment was charged to.
-
#adjustment_status ⇒ AdjustmentStatus
The status of the adjustment.
-
#adjustment_subtype ⇒ AdjustmentSubtype
The Subscription Adjustment Subtype.
-
#base_postage ⇒ BasePostage
The claimed and assessed base postage for the package (minus fees and extra services).
-
#crid ⇒ String
Customer Registration ID used to identify the business location associated to a shipment.
-
#destination_address ⇒ String
Destination address associated to a shipment.
-
#destination_city ⇒ String
Destination city associated to a shipment.
-
#destination_country_code ⇒ String
The destination country code associated to the shipment.
-
#destination_state ⇒ String
Destination state associated to a shipment.
-
#destination_zip_code ⇒ String
Destination zipcode associated to a shipment.
-
#details ⇒ Array[Detail]
Root cause for Census (Zone, Weight, Destination Entry, etc..).
-
#earliest_scan_date ⇒ DateTime
Earliest Datetime USPS scanned the package.
-
#extra_services ⇒ Array[ExtraService]
Array of extra services associated with the shipment.
-
#fees ⇒ Array[Fee]
The claimed and assessed fees for the package.
-
#mail_class_name ⇒ String
The class of mail for the shipment.
-
#mailing_date ⇒ DateTime
Combination of Date Of Mailing and Time Of Mailing YYYYMMDD + HHMMSS.
-
#manifest_number ⇒ String
The manifest number (or electronic file number/EFN) of the package.
-
#manifest_package_id ⇒ String
A unique ID associated to a package.
-
#mid ⇒ String
Mailer ID used in the barcode to identify the Mail Owner associated to a shipment.
-
#origin_address ⇒ String
Origin address associated to a shipment.
-
#origin_city ⇒ String
Origin city associated to a shipment.
-
#origin_state ⇒ String
Origin state associated to a shipment.
-
#origin_zip_code ⇒ String
Origin zipcode associated to a shipment.
-
#package_scan_grouping_id ⇒ String
A Unique ID used to group scans for a package.
-
#postage_adjustment ⇒ Float
The postage charged for the adjustment.
-
#pricing_characteristics ⇒ Array[PricingCharacteristic]
Pricing ingredients of the adjustment.
-
#processing_category ⇒ String
A unique ID representing the processing category associated to a shipment.
-
#processing_category_name ⇒ ProcessingCategoryName
A name representing the processing category associated to a shipment.
-
#root_cause ⇒ Array[RootCause]
Array of root causes that contributed to the adjustment.
-
#total_postage ⇒ TotalPostage
The claimed and assessed total postage for the package.
-
#tracking_number ⇒ String
The trackingNumber of the package.
-
#transaction_id ⇒ String
The Enterprise Payment System Transaction ID the adjustment was charged to.
-
#usps_packaging_barcode ⇒ String
USPS Packaging used for the shipment.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(tracking_number: SKIP, manifest_number: SKIP, adjustment_subtype: SKIP, details: SKIP, root_cause: SKIP, pricing_characteristics: SKIP, usps_packaging_barcode: SKIP, postage_adjustment: SKIP, total_postage: SKIP, base_postage: SKIP, fees: SKIP, account_number: SKIP, transaction_id: SKIP, earliest_scan_date: SKIP, mid: SKIP, crid: SKIP, adjustment_status: SKIP, extra_services: SKIP, origin_address: SKIP, origin_city: SKIP, origin_state: SKIP, origin_zip_code: SKIP, destination_address: SKIP, destination_city: SKIP, destination_state: SKIP, destination_zip_code: SKIP, destination_country_code: SKIP, package_scan_grouping_id: SKIP, manifest_package_id: SKIP, processing_category: SKIP, processing_category_name: SKIP, mailing_date: SKIP, mail_class_name: SKIP) ⇒ AdjustmentsAdjustmentDetails
constructor
A new instance of AdjustmentsAdjustmentDetails.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_earliest_scan_date ⇒ Object
- #to_custom_mailing_date ⇒ Object
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(tracking_number: SKIP, manifest_number: SKIP, adjustment_subtype: SKIP, details: SKIP, root_cause: SKIP, pricing_characteristics: SKIP, usps_packaging_barcode: SKIP, postage_adjustment: SKIP, total_postage: SKIP, base_postage: SKIP, fees: SKIP, account_number: SKIP, transaction_id: SKIP, earliest_scan_date: SKIP, mid: SKIP, crid: SKIP, adjustment_status: SKIP, extra_services: SKIP, origin_address: SKIP, origin_city: SKIP, origin_state: SKIP, origin_zip_code: SKIP, destination_address: SKIP, destination_city: SKIP, destination_state: SKIP, destination_zip_code: SKIP, destination_country_code: SKIP, package_scan_grouping_id: SKIP, manifest_package_id: SKIP, processing_category: SKIP, processing_category_name: SKIP, mailing_date: SKIP, mail_class_name: SKIP) ⇒ AdjustmentsAdjustmentDetails
Returns a new instance of AdjustmentsAdjustmentDetails.
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 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 234 def initialize(tracking_number: SKIP, manifest_number: SKIP, adjustment_subtype: SKIP, details: SKIP, root_cause: SKIP, pricing_characteristics: SKIP, usps_packaging_barcode: SKIP, postage_adjustment: SKIP, total_postage: SKIP, base_postage: SKIP, fees: SKIP, account_number: SKIP, transaction_id: SKIP, earliest_scan_date: SKIP, mid: SKIP, crid: SKIP, adjustment_status: SKIP, extra_services: SKIP, origin_address: SKIP, origin_city: SKIP, origin_state: SKIP, origin_zip_code: SKIP, destination_address: SKIP, destination_city: SKIP, destination_state: SKIP, destination_zip_code: SKIP, destination_country_code: SKIP, package_scan_grouping_id: SKIP, manifest_package_id: SKIP, processing_category: SKIP, processing_category_name: SKIP, mailing_date: SKIP, mail_class_name: SKIP) @tracking_number = tracking_number unless tracking_number == SKIP @manifest_number = manifest_number unless manifest_number == SKIP @adjustment_subtype = adjustment_subtype unless adjustment_subtype == SKIP @details = details unless details == SKIP @root_cause = root_cause unless root_cause == SKIP @pricing_characteristics = pricing_characteristics unless pricing_characteristics == SKIP @usps_packaging_barcode = unless == SKIP @postage_adjustment = postage_adjustment unless postage_adjustment == SKIP @total_postage = total_postage unless total_postage == SKIP @base_postage = base_postage unless base_postage == SKIP @fees = fees unless fees == SKIP @account_number = account_number unless account_number == SKIP @transaction_id = transaction_id unless transaction_id == SKIP @earliest_scan_date = earliest_scan_date unless earliest_scan_date == SKIP @mid = mid unless mid == SKIP @crid = crid unless crid == SKIP @adjustment_status = adjustment_status unless adjustment_status == SKIP @extra_services = extra_services unless extra_services == SKIP @origin_address = origin_address unless origin_address == SKIP @origin_city = origin_city unless origin_city == SKIP @origin_state = origin_state unless origin_state == SKIP @origin_zip_code = origin_zip_code unless origin_zip_code == SKIP @destination_address = destination_address unless destination_address == SKIP @destination_city = destination_city unless destination_city == SKIP @destination_state = destination_state unless destination_state == SKIP @destination_zip_code = destination_zip_code unless destination_zip_code == SKIP @destination_country_code = destination_country_code unless destination_country_code == SKIP @package_scan_grouping_id = package_scan_grouping_id unless package_scan_grouping_id == SKIP @manifest_package_id = manifest_package_id unless manifest_package_id == SKIP @processing_category = processing_category unless processing_category == SKIP @processing_category_name = processing_category_name unless processing_category_name == SKIP @mailing_date = mailing_date unless mailing_date == SKIP @mail_class_name = mail_class_name unless mail_class_name == SKIP end |
Instance Attribute Details
#account_number ⇒ String
The Enterprise Payment Account the adjustment was charged to.
62 63 64 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 62 def account_number @account_number end |
#adjustment_status ⇒ AdjustmentStatus
The status of the adjustment
85 86 87 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 85 def adjustment_status @adjustment_status end |
#adjustment_subtype ⇒ AdjustmentSubtype
The Subscription Adjustment Subtype.
25 26 27 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 25 def adjustment_subtype @adjustment_subtype end |
#base_postage ⇒ BasePostage
The claimed and assessed base postage for the package (minus fees and extra services).
54 55 56 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 54 def base_postage @base_postage end |
#crid ⇒ String
Customer Registration ID used to identify the business location associated to a shipment.
81 82 83 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 81 def crid @crid end |
#destination_address ⇒ String
Destination address associated to a shipment.
109 110 111 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 109 def destination_address @destination_address end |
#destination_city ⇒ String
Destination city associated to a shipment.
113 114 115 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 113 def destination_city @destination_city end |
#destination_country_code ⇒ String
The destination country code associated to the shipment.
125 126 127 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 125 def destination_country_code @destination_country_code end |
#destination_state ⇒ String
Destination state associated to a shipment.
117 118 119 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 117 def destination_state @destination_state end |
#destination_zip_code ⇒ String
Destination zipcode associated to a shipment.
121 122 123 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 121 def destination_zip_code @destination_zip_code end |
#details ⇒ Array[Detail]
Root cause for Census (Zone, Weight, Destination Entry, etc..)
29 30 31 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 29 def details @details end |
#earliest_scan_date ⇒ DateTime
Earliest Datetime USPS scanned the package.
71 72 73 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 71 def earliest_scan_date @earliest_scan_date end |
#extra_services ⇒ Array[ExtraService]
Array of extra services associated with the shipment.
89 90 91 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 89 def extra_services @extra_services end |
#fees ⇒ Array[Fee]
The claimed and assessed fees for the package.
58 59 60 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 58 def fees @fees end |
#mail_class_name ⇒ String
The class of mail for the shipment.
149 150 151 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 149 def mail_class_name @mail_class_name end |
#mailing_date ⇒ DateTime
Combination of Date Of Mailing and Time Of Mailing YYYYMMDD + HHMMSS
145 146 147 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 145 def mailing_date @mailing_date end |
#manifest_number ⇒ String
The manifest number (or electronic file number/EFN) of the package.
21 22 23 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 21 def manifest_number @manifest_number end |
#manifest_package_id ⇒ String
A unique ID associated to a package.
133 134 135 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 133 def manifest_package_id @manifest_package_id end |
#mid ⇒ String
Mailer ID used in the barcode to identify the Mail Owner associated to a shipment.
76 77 78 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 76 def mid @mid end |
#origin_address ⇒ String
Origin address associated to a shipment.
93 94 95 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 93 def origin_address @origin_address end |
#origin_city ⇒ String
Origin city associated to a shipment.
97 98 99 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 97 def origin_city @origin_city end |
#origin_state ⇒ String
Origin state associated to a shipment.
101 102 103 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 101 def origin_state @origin_state end |
#origin_zip_code ⇒ String
Origin zipcode associated to a shipment.
105 106 107 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 105 def origin_zip_code @origin_zip_code end |
#package_scan_grouping_id ⇒ String
A Unique ID used to group scans for a package.
129 130 131 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 129 def package_scan_grouping_id @package_scan_grouping_id end |
#postage_adjustment ⇒ Float
The postage charged for the adjustment
45 46 47 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 45 def postage_adjustment @postage_adjustment end |
#pricing_characteristics ⇒ Array[PricingCharacteristic]
Pricing ingredients of the adjustment
37 38 39 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 37 def pricing_characteristics @pricing_characteristics end |
#processing_category ⇒ String
A unique ID representing the processing category associated to a shipment.
137 138 139 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 137 def processing_category @processing_category end |
#processing_category_name ⇒ ProcessingCategoryName
A name representing the processing category associated to a shipment.
141 142 143 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 141 def processing_category_name @processing_category_name end |
#root_cause ⇒ Array[RootCause]
Array of root causes that contributed to the adjustment
33 34 35 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 33 def root_cause @root_cause end |
#total_postage ⇒ TotalPostage
The claimed and assessed total postage for the package.
49 50 51 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 49 def total_postage @total_postage end |
#tracking_number ⇒ String
The trackingNumber of the package.
17 18 19 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 17 def tracking_number @tracking_number end |
#transaction_id ⇒ String
The Enterprise Payment System Transaction ID the adjustment was charged to.
67 68 69 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 67 def transaction_id @transaction_id end |
#usps_packaging_barcode ⇒ String
USPS Packaging used for the shipment
41 42 43 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 41 def @usps_packaging_barcode end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 284 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. tracking_number = hash.key?('trackingNumber') ? hash['trackingNumber'] : SKIP manifest_number = hash.key?('manifestNumber') ? hash['manifestNumber'] : SKIP adjustment_subtype = hash.key?('adjustmentSubtype') ? hash['adjustmentSubtype'] : SKIP details = hash.key?('details') ? hash['details'] : SKIP root_cause = hash.key?('rootCause') ? hash['rootCause'] : SKIP # Parameter is an array, so we need to iterate through it pricing_characteristics = nil unless hash['pricingCharacteristics'].nil? pricing_characteristics = [] hash['pricingCharacteristics'].each do |structure| pricing_characteristics << (PricingCharacteristic.from_hash(structure) if structure) end end pricing_characteristics = SKIP unless hash.key?('pricingCharacteristics') = hash.key?('USPSPackagingBarcode') ? hash['USPSPackagingBarcode'] : SKIP postage_adjustment = hash.key?('postageAdjustment') ? hash['postageAdjustment'] : SKIP total_postage = TotalPostage.from_hash(hash['totalPostage']) if hash['totalPostage'] base_postage = BasePostage.from_hash(hash['basePostage']) if hash['basePostage'] # Parameter is an array, so we need to iterate through it fees = nil unless hash['fees'].nil? fees = [] hash['fees'].each do |structure| fees << (Fee.from_hash(structure) if structure) end end fees = SKIP unless hash.key?('fees') account_number = hash.key?('accountNumber') ? hash['accountNumber'] : SKIP transaction_id = hash.key?('transactionID') ? hash['transactionID'] : SKIP earliest_scan_date = if hash.key?('earliestScanDate') (DateTimeHelper.from_rfc3339(hash['earliestScanDate']) if hash['earliestScanDate']) else SKIP end mid = hash.key?('MID') ? hash['MID'] : SKIP crid = hash.key?('CRID') ? hash['CRID'] : SKIP adjustment_status = hash.key?('adjustmentStatus') ? hash['adjustmentStatus'] : SKIP # Parameter is an array, so we need to iterate through it extra_services = nil unless hash['extraServices'].nil? extra_services = [] hash['extraServices'].each do |structure| extra_services << (ExtraService.from_hash(structure) if structure) end end extra_services = SKIP unless hash.key?('extraServices') origin_address = hash.key?('originAddress') ? hash['originAddress'] : SKIP origin_city = hash.key?('originCity') ? hash['originCity'] : SKIP origin_state = hash.key?('originState') ? hash['originState'] : SKIP origin_zip_code = hash.key?('originZipCode') ? hash['originZipCode'] : SKIP destination_address = hash.key?('destinationAddress') ? hash['destinationAddress'] : SKIP destination_city = hash.key?('destinationCity') ? hash['destinationCity'] : SKIP destination_state = hash.key?('destinationState') ? hash['destinationState'] : SKIP destination_zip_code = hash.key?('destinationZipCode') ? hash['destinationZipCode'] : SKIP destination_country_code = hash.key?('destinationCountryCode') ? hash['destinationCountryCode'] : SKIP package_scan_grouping_id = hash.key?('packageScanGroupingId') ? hash['packageScanGroupingId'] : SKIP manifest_package_id = hash.key?('manifestPackageId') ? hash['manifestPackageId'] : SKIP processing_category = hash.key?('processingCategory') ? hash['processingCategory'] : SKIP processing_category_name = hash.key?('processingCategoryName') ? hash['processingCategoryName'] : SKIP mailing_date = if hash.key?('mailingDate') (DateTimeHelper.from_rfc3339(hash['mailingDate']) if hash['mailingDate']) else SKIP end mail_class_name = hash.key?('mailClassName') ? hash['mailClassName'] : SKIP # Create object from extracted values. AdjustmentsAdjustmentDetails.new(tracking_number: tracking_number, manifest_number: manifest_number, adjustment_subtype: adjustment_subtype, details: details, root_cause: root_cause, pricing_characteristics: pricing_characteristics, usps_packaging_barcode: , postage_adjustment: postage_adjustment, total_postage: total_postage, base_postage: base_postage, fees: fees, account_number: account_number, transaction_id: transaction_id, earliest_scan_date: earliest_scan_date, mid: mid, crid: crid, adjustment_status: adjustment_status, extra_services: extra_services, origin_address: origin_address, origin_city: origin_city, origin_state: origin_state, origin_zip_code: origin_zip_code, destination_address: destination_address, destination_city: destination_city, destination_state: destination_state, destination_zip_code: destination_zip_code, destination_country_code: destination_country_code, package_scan_grouping_id: package_scan_grouping_id, manifest_package_id: manifest_package_id, processing_category: processing_category, processing_category_name: processing_category_name, mailing_date: mailing_date, mail_class_name: mail_class_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
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 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 152 def self.names @_hash = {} if @_hash.nil? @_hash['tracking_number'] = 'trackingNumber' @_hash['manifest_number'] = 'manifestNumber' @_hash['adjustment_subtype'] = 'adjustmentSubtype' @_hash['details'] = 'details' @_hash['root_cause'] = 'rootCause' @_hash['pricing_characteristics'] = 'pricingCharacteristics' @_hash['usps_packaging_barcode'] = 'USPSPackagingBarcode' @_hash['postage_adjustment'] = 'postageAdjustment' @_hash['total_postage'] = 'totalPostage' @_hash['base_postage'] = 'basePostage' @_hash['fees'] = 'fees' @_hash['account_number'] = 'accountNumber' @_hash['transaction_id'] = 'transactionID' @_hash['earliest_scan_date'] = 'earliestScanDate' @_hash['mid'] = 'MID' @_hash['crid'] = 'CRID' @_hash['adjustment_status'] = 'adjustmentStatus' @_hash['extra_services'] = 'extraServices' @_hash['origin_address'] = 'originAddress' @_hash['origin_city'] = 'originCity' @_hash['origin_state'] = 'originState' @_hash['origin_zip_code'] = 'originZipCode' @_hash['destination_address'] = 'destinationAddress' @_hash['destination_city'] = 'destinationCity' @_hash['destination_state'] = 'destinationState' @_hash['destination_zip_code'] = 'destinationZipCode' @_hash['destination_country_code'] = 'destinationCountryCode' @_hash['package_scan_grouping_id'] = 'packageScanGroupingId' @_hash['manifest_package_id'] = 'manifestPackageId' @_hash['processing_category'] = 'processingCategory' @_hash['processing_category_name'] = 'processingCategoryName' @_hash['mailing_date'] = 'mailingDate' @_hash['mail_class_name'] = 'mailClassName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
230 231 232 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 230 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
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 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 191 def self.optionals %w[ tracking_number manifest_number adjustment_subtype details root_cause pricing_characteristics usps_packaging_barcode postage_adjustment total_postage base_postage fees account_number transaction_id earliest_scan_date mid crid adjustment_status extra_services origin_address origin_city origin_state origin_zip_code destination_address destination_city destination_state destination_zip_code destination_country_code package_scan_grouping_id manifest_package_id processing_category processing_category_name mailing_date mail_class_name ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 441 def inspect class_name = self.class.name.split('::').last "<#{class_name} tracking_number: #{@tracking_number.inspect}, manifest_number:"\ " #{@manifest_number.inspect}, adjustment_subtype: #{@adjustment_subtype.inspect}, details:"\ " #{@details.inspect}, root_cause: #{@root_cause.inspect}, pricing_characteristics:"\ " #{@pricing_characteristics.inspect}, usps_packaging_barcode:"\ " #{@usps_packaging_barcode.inspect}, postage_adjustment: #{@postage_adjustment.inspect},"\ " total_postage: #{@total_postage.inspect}, base_postage: #{@base_postage.inspect}, fees:"\ " #{@fees.inspect}, account_number: #{@account_number.inspect}, transaction_id:"\ " #{@transaction_id.inspect}, earliest_scan_date: #{@earliest_scan_date.inspect}, mid:"\ " #{@mid.inspect}, crid: #{@crid.inspect}, adjustment_status: #{@adjustment_status.inspect},"\ " extra_services: #{@extra_services.inspect}, origin_address: #{@origin_address.inspect},"\ " origin_city: #{@origin_city.inspect}, origin_state: #{@origin_state.inspect},"\ " origin_zip_code: #{@origin_zip_code.inspect}, destination_address:"\ " #{@destination_address.inspect}, destination_city: #{@destination_city.inspect},"\ " destination_state: #{@destination_state.inspect}, destination_zip_code:"\ " #{@destination_zip_code.inspect}, destination_country_code:"\ " #{@destination_country_code.inspect}, package_scan_grouping_id:"\ " #{@package_scan_grouping_id.inspect}, manifest_package_id:"\ " #{@manifest_package_id.inspect}, processing_category: #{@processing_category.inspect},"\ " processing_category_name: #{@processing_category_name.inspect}, mailing_date:"\ " #{@mailing_date.inspect}, mail_class_name: #{@mail_class_name.inspect}>" end |
#to_custom_earliest_scan_date ⇒ Object
410 411 412 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 410 def to_custom_earliest_scan_date DateTimeHelper.to_rfc3339(earliest_scan_date) end |
#to_custom_mailing_date ⇒ Object
414 415 416 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 414 def to_custom_mailing_date DateTimeHelper.to_rfc3339(mailing_date) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 |
# File 'lib/usps_api/models/adjustments_adjustment_details.rb', line 419 def to_s class_name = self.class.name.split('::').last "<#{class_name} tracking_number: #{@tracking_number}, manifest_number: #{@manifest_number},"\ " adjustment_subtype: #{@adjustment_subtype}, details: #{@details}, root_cause:"\ " #{@root_cause}, pricing_characteristics: #{@pricing_characteristics},"\ " usps_packaging_barcode: #{@usps_packaging_barcode}, postage_adjustment:"\ " #{@postage_adjustment}, total_postage: #{@total_postage}, base_postage: #{@base_postage},"\ " fees: #{@fees}, account_number: #{@account_number}, transaction_id: #{@transaction_id},"\ " earliest_scan_date: #{@earliest_scan_date}, mid: #{@mid}, crid: #{@crid},"\ " adjustment_status: #{@adjustment_status}, extra_services: #{@extra_services},"\ " origin_address: #{@origin_address}, origin_city: #{@origin_city}, origin_state:"\ " #{@origin_state}, origin_zip_code: #{@origin_zip_code}, destination_address:"\ " #{@destination_address}, destination_city: #{@destination_city}, destination_state:"\ " #{@destination_state}, destination_zip_code: #{@destination_zip_code},"\ " destination_country_code: #{@destination_country_code}, package_scan_grouping_id:"\ " #{@package_scan_grouping_id}, manifest_package_id: #{@manifest_package_id},"\ " processing_category: #{@processing_category}, processing_category_name:"\ " #{@processing_category_name}, mailing_date: #{@mailing_date}, mail_class_name:"\ " #{@mail_class_name}>" end |