Class: CzechPostB2bClient::Services::ParcelsSyncSender
- Inherits:
-
Communicator
- Object
- SteppedService::Base
- Orchestrator
- Communicator
- CzechPostB2bClient::Services::ParcelsSyncSender
- Defined in:
- lib/czech_post_b2b_client/services/parcels_sync_sender.rb
Overview
Combination of ParcelsAsyncSender + ParcelsSendProcessUpdater for fast SYNC registering parcel at CPOST It accept only one parcel! It should be used for instant one parcel registration.
Instance Attribute Summary collapse
-
#parcels ⇒ Object
readonly
Returns the value of attribute parcels.
-
#sending_data ⇒ Object
readonly
Returns the value of attribute sending_data.
Attributes inherited from SteppedService::Base
Instance Method Summary collapse
-
#initialize(sending_data:, parcels:) ⇒ ParcelsSyncSender
constructor
A new instance of ParcelsSyncSender.
- #steps ⇒ Object
Methods inherited from SteppedService::Base
call, #call, #errors, #failure?, #finished?, #success?
Constructor Details
#initialize(sending_data:, parcels:) ⇒ ParcelsSyncSender
Returns a new instance of ParcelsSyncSender.
11 12 13 14 |
# File 'lib/czech_post_b2b_client/services/parcels_sync_sender.rb', line 11 def initialize(sending_data:, parcels:) @sending_data = sending_data @parcels = parcels end |
Instance Attribute Details
#parcels ⇒ Object (readonly)
Returns the value of attribute parcels.
9 10 11 |
# File 'lib/czech_post_b2b_client/services/parcels_sync_sender.rb', line 9 def parcels @parcels end |
#sending_data ⇒ Object (readonly)
Returns the value of attribute sending_data.
9 10 11 |
# File 'lib/czech_post_b2b_client/services/parcels_sync_sender.rb', line 9 def sending_data @sending_data end |
Instance Method Details
#steps ⇒ Object
16 17 18 |
# File 'lib/czech_post_b2b_client/services/parcels_sync_sender.rb', line 16 def steps super + %i[check_for_state_errors] end |