Class: RubyPtvApi::Operation::XTour::PlanSequence
- Defined in:
- lib/ruby_ptv_api/operation/x_tour/plan_sequence.rb
Instance Attribute Summary collapse
-
#depots ⇒ Object
readonly
Returns the value of attribute depots.
-
#transport_orders ⇒ Object
readonly
Returns the value of attribute transport_orders.
-
#vehicle ⇒ Object
readonly
Returns the value of attribute vehicle.
Attributes inherited from Base
#result_field_array, #search_option_base_array, #sort_option_array
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(transport_orders:, depots:, vehicle:) ⇒ PlanSequence
constructor
A new instance of PlanSequence.
- #params ⇒ Object
- #ptv_function ⇒ Object
- #sequencing_params ⇒ Object
Methods inherited from Base
Methods inherited from Base
#connection, #default_params, #demodulize, #demodulized_name, #endpoint, #parent_module_name, #post, #ptv_path, #underscore, #uri
Constructor Details
#initialize(transport_orders:, depots:, vehicle:) ⇒ PlanSequence
Returns a new instance of PlanSequence.
7 8 9 10 11 12 |
# File 'lib/ruby_ptv_api/operation/x_tour/plan_sequence.rb', line 7 def initialize(transport_orders:, depots:, vehicle:) @transport_orders = transport_orders @depots = depots @vehicle = vehicle @dimaId = 1 end |
Instance Attribute Details
#depots ⇒ Object (readonly)
Returns the value of attribute depots.
5 6 7 |
# File 'lib/ruby_ptv_api/operation/x_tour/plan_sequence.rb', line 5 def depots @depots end |
#transport_orders ⇒ Object (readonly)
Returns the value of attribute transport_orders.
5 6 7 |
# File 'lib/ruby_ptv_api/operation/x_tour/plan_sequence.rb', line 5 def transport_orders @transport_orders end |
#vehicle ⇒ Object (readonly)
Returns the value of attribute vehicle.
5 6 7 |
# File 'lib/ruby_ptv_api/operation/x_tour/plan_sequence.rb', line 5 def vehicle @vehicle end |
Instance Method Details
#params ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/ruby_ptv_api/operation/x_tour/plan_sequence.rb', line 32 def params { transportOrders: transport_orders, depots: depots, vehicle: vehicle, sequencingParams: sequencing_params, inputPlan: nil } end |
#ptv_function ⇒ Object
14 15 16 |
# File 'lib/ruby_ptv_api/operation/x_tour/plan_sequence.rb', line 14 def ptv_function 'planSequence' end |
#sequencing_params ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ruby_ptv_api/operation/x_tour/plan_sequence.rb', line 18 def sequencing_params RubyPtvApi::Model::XTour::SequencingParams.new({ 'coDriverTransportPointsInSeparateTours' => false, 'distanceMatrixCalculation' => [ RubyPtvApi::Model::XTour::DistanceMatrixByRoad.new({ 'dimaId' => 1, 'deleteBeforeUsage' => true, 'deleteAfterUsage' => true }) ] }) end |