Class: UspsApi::SubscriptionsAdjustmentsAdjustmentDetails
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UspsApi::SubscriptionsAdjustmentsAdjustmentDetails
- Defined in:
- lib/usps_api/models/subscriptions_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
Customer Registration ID used to identify the business location associated to a shipment.
-
#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.
-
#packaging ⇒ Packaging
Description of the packaging.
-
#postage_adjustment ⇒ Float
The postage charged for the adjustment.
-
#pricing_characteristics ⇒ Array[PricingCharacteristic]
Array of root causes that contributed to 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 ⇒ BasePostage
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, packaging: 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) ⇒ SubscriptionsAdjustmentsAdjustmentDetails
constructor
A new instance of SubscriptionsAdjustmentsAdjustmentDetails.
-
#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, packaging: 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) ⇒ SubscriptionsAdjustmentsAdjustmentDetails
Returns a new instance of SubscriptionsAdjustmentsAdjustmentDetails.
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 282 283 284 285 286 287 288 289 290 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 241 def initialize(tracking_number: SKIP, manifest_number: SKIP, adjustment_subtype: SKIP, details: SKIP, root_cause: SKIP, pricing_characteristics: SKIP, usps_packaging_barcode: SKIP, packaging: 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 @packaging = packaging unless packaging == 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.
66 67 68 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 66 def account_number @account_number end |
#adjustment_status ⇒ AdjustmentStatus
Customer Registration ID used to identify the business location associated to a shipment.
90 91 92 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 90 def adjustment_status @adjustment_status end |
#adjustment_subtype ⇒ AdjustmentSubtype
The Subscription Adjustment Subtype.
25 26 27 |
# File 'lib/usps_api/models/subscriptions_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).
58 59 60 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 58 def base_postage @base_postage end |
#crid ⇒ String
Customer Registration ID used to identify the business location associated to a shipment.
85 86 87 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 85 def crid @crid end |
#destination_address ⇒ String
Destination address associated to a shipment.
114 115 116 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 114 def destination_address @destination_address end |
#destination_city ⇒ String
Destination city associated to a shipment.
118 119 120 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 118 def destination_city @destination_city end |
#destination_country_code ⇒ String
The destination country code associated to the shipment.
130 131 132 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 130 def destination_country_code @destination_country_code end |
#destination_state ⇒ String
Destination state associated to a shipment.
122 123 124 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 122 def destination_state @destination_state end |
#destination_zip_code ⇒ String
Destination zipcode associated to a shipment.
126 127 128 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 126 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/subscriptions_adjustments_adjustment_details.rb', line 29 def details @details end |
#earliest_scan_date ⇒ DateTime
Earliest Datetime USPS scanned the package.
75 76 77 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 75 def earliest_scan_date @earliest_scan_date end |
#extra_services ⇒ Array[ExtraService]
Array of extra services associated with the shipment.
94 95 96 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 94 def extra_services @extra_services end |
#fees ⇒ Array[Fee]
The claimed and assessed fees for the package.
62 63 64 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 62 def fees @fees end |
#mail_class_name ⇒ String
The class of mail for the shipment.
154 155 156 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 154 def mail_class_name @mail_class_name end |
#mailing_date ⇒ DateTime
Combination of Date Of Mailing and Time Of Mailing YYYYMMDD + HHMMSS
150 151 152 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 150 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/subscriptions_adjustments_adjustment_details.rb', line 21 def manifest_number @manifest_number end |
#manifest_package_id ⇒ String
A unique ID associated to a package.
138 139 140 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 138 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.
80 81 82 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 80 def mid @mid end |
#origin_address ⇒ String
Origin address associated to a shipment.
98 99 100 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 98 def origin_address @origin_address end |
#origin_city ⇒ String
Origin city associated to a shipment.
102 103 104 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 102 def origin_city @origin_city end |
#origin_state ⇒ String
Origin state associated to a shipment.
106 107 108 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 106 def origin_state @origin_state end |
#origin_zip_code ⇒ String
Origin zipcode associated to a shipment.
110 111 112 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 110 def origin_zip_code @origin_zip_code end |
#package_scan_grouping_id ⇒ String
A Unique ID used to group scans for a package.
134 135 136 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 134 def package_scan_grouping_id @package_scan_grouping_id end |
#packaging ⇒ Packaging
Description of the packaging
45 46 47 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 45 def packaging @packaging end |
#postage_adjustment ⇒ Float
The postage charged for the adjustment
49 50 51 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 49 def postage_adjustment @postage_adjustment end |
#pricing_characteristics ⇒ Array[PricingCharacteristic]
Array of root causes that contributed to the adjustment
37 38 39 |
# File 'lib/usps_api/models/subscriptions_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.
142 143 144 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 142 def processing_category @processing_category end |
#processing_category_name ⇒ ProcessingCategoryName
A name representing the processing category associated to a shipment.
146 147 148 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 146 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/subscriptions_adjustments_adjustment_details.rb', line 33 def root_cause @root_cause end |
#total_postage ⇒ BasePostage
The claimed and assessed total postage for the package.
53 54 55 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 53 def total_postage @total_postage end |
#tracking_number ⇒ String
The trackingNumber of the package.
17 18 19 |
# File 'lib/usps_api/models/subscriptions_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.
71 72 73 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 71 def transaction_id @transaction_id end |
#usps_packaging_barcode ⇒ String
USPS Packaging used for the shipment
41 42 43 |
# File 'lib/usps_api/models/subscriptions_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.
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 409 410 411 412 413 414 415 416 417 418 419 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 293 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 packaging = hash.key?('packaging') ? hash['packaging'] : SKIP postage_adjustment = hash.key?('postageAdjustment') ? hash['postageAdjustment'] : SKIP total_postage = BasePostage.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. SubscriptionsAdjustmentsAdjustmentDetails.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: , packaging: packaging, 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.
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 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 157 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['packaging'] = 'packaging' @_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
237 238 239 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 237 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
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 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 197 def self.optionals %w[ tracking_number manifest_number adjustment_subtype details root_cause pricing_characteristics usps_packaging_barcode packaging 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.
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 452 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}, packaging: #{@packaging.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
421 422 423 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 421 def to_custom_earliest_scan_date DateTimeHelper.to_rfc3339(earliest_scan_date) end |
#to_custom_mailing_date ⇒ Object
425 426 427 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 425 def to_custom_mailing_date DateTimeHelper.to_rfc3339(mailing_date) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/usps_api/models/subscriptions_adjustments_adjustment_details.rb', line 430 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}, packaging: #{@packaging},"\ " 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 |