Class: CzechPostB2bClient::Services::ParcelsSyncSender

Inherits:
Communicator show all
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

Attributes inherited from SteppedService::Base

#result

Instance Method Summary collapse

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

#parcelsObject (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_dataObject (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

#stepsObject



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