Class: Usps::Imis::BlankObject

Inherits:
Object
  • Object
show all
Defined in:
lib/usps/imis/blank_object.rb

Overview

Constructor for blank BusinessObject and BasePanel objects

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, ordinal = nil) ⇒ BlankObject

Returns a new instance of BlankObject.



16
17
18
19
# File 'lib/usps/imis/blank_object.rb', line 16

def initialize(parent, ordinal = nil)
  @parent = parent
  @ordinal = ordinal
end

Instance Attribute Details

#parentObject (readonly)

The parent object



14
15
16
# File 'lib/usps/imis/blank_object.rb', line 14

def parent
  @parent
end

Instance Method Details

#buildObject

Build a blank object for the current iMIS ID



23
# File 'lib/usps/imis/blank_object.rb', line 23

def build(&) = payload_header.merge(Properties.build(parent.api.imis_id.to_s, @ordinal.to_s, &))