econt 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +3 -0
  3. data/CODE_OF_CONDUCT.md +17 -0
  4. data/CONTRIBUTING.md +37 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +171 -0
  7. data/SECURITY.md +33 -0
  8. data/docs/API.md +571 -0
  9. data/docs/ENDPOINTS.md +42 -0
  10. data/docs/PUBLIC_API.md +81 -0
  11. data/docs/RELEASING.md +35 -0
  12. data/docs/RESPONSE_TESTS.md +46 -0
  13. data/docs/VCR.md +144 -0
  14. data/lib/econt/camel_case_middleware.rb +88 -0
  15. data/lib/econt/client.rb +99 -0
  16. data/lib/econt/collection.rb +59 -0
  17. data/lib/econt/error.rb +42 -0
  18. data/lib/econt/meta_resource.rb +6 -0
  19. data/lib/econt/model.rb +95 -0
  20. data/lib/econt/models/error.rb +53 -0
  21. data/lib/econt/models/hosted_file.rb +13 -0
  22. data/lib/econt/models/nomenclatures/address.rb +35 -0
  23. data/lib/econt/models/nomenclatures/address_service_info.rb +16 -0
  24. data/lib/econt/models/nomenclatures/address_service_times_response.rb +19 -0
  25. data/lib/econt/models/nomenclatures/address_validation_response.rb +19 -0
  26. data/lib/econt/models/nomenclatures/city.rb +32 -0
  27. data/lib/econt/models/nomenclatures/country.rb +16 -0
  28. data/lib/econt/models/nomenclatures/geo_location.rb +13 -0
  29. data/lib/econt/models/nomenclatures/office.rb +32 -0
  30. data/lib/econt/models/nomenclatures/quarter.rb +14 -0
  31. data/lib/econt/models/nomenclatures/serving_office_element.rb +12 -0
  32. data/lib/econt/models/nomenclatures/street.rb +14 -0
  33. data/lib/econt/models/nomenclatures/working_date_time.rb +16 -0
  34. data/lib/econt/models/nomenclatures/working_time.rb +12 -0
  35. data/lib/econt/models/payment_report/payment_report_row.rb +17 -0
  36. data/lib/econt/models/profile/cd_pay_options.rb +24 -0
  37. data/lib/econt/models/profile/client_profile.rb +29 -0
  38. data/lib/econt/models/profile/profiles_response_element.rb +16 -0
  39. data/lib/econt/models/shipments/cargo_vehicle_options.rb +16 -0
  40. data/lib/econt/models/shipments/check_possible_shipment_editions_result_element.rb +14 -0
  41. data/lib/econt/models/shipments/create_label_result_element.rb +19 -0
  42. data/lib/econt/models/shipments/customs_list_element.rb +14 -0
  43. data/lib/econt/models/shipments/delete_labels_result_element.rb +14 -0
  44. data/lib/econt/models/shipments/get_my_awb_response.rb +15 -0
  45. data/lib/econt/models/shipments/get_my_awb_result_element.rb +23 -0
  46. data/lib/econt/models/shipments/instruction.rb +20 -0
  47. data/lib/econt/models/shipments/next_shipment_element.rb +13 -0
  48. data/lib/econt/models/shipments/pack_element.rb +14 -0
  49. data/lib/econt/models/shipments/packing_list_element.rb +17 -0
  50. data/lib/econt/models/shipments/payment_addition_price.rb +14 -0
  51. data/lib/econt/models/shipments/payment_instruction.rb +11 -0
  52. data/lib/econt/models/shipments/previous_shipment.rb +14 -0
  53. data/lib/econt/models/shipments/request_courier_response.rb +13 -0
  54. data/lib/econt/models/shipments/request_courier_status.rb +14 -0
  55. data/lib/econt/models/shipments/request_courier_status_result_element.rb +14 -0
  56. data/lib/econt/models/shipments/return_instruction_params.rb +48 -0
  57. data/lib/econt/models/shipments/shipment_edition_response_element.rb +16 -0
  58. data/lib/econt/models/shipments/shipment_status.rb +64 -0
  59. data/lib/econt/models/shipments/shipment_status_result_element.rb +14 -0
  60. data/lib/econt/models/shipments/shipment_status_service.rb +16 -0
  61. data/lib/econt/models/shipments/shipment_tracking_event.rb +21 -0
  62. data/lib/econt/models/shipments/shipping_label.rb +59 -0
  63. data/lib/econt/models/shipments/shipping_label_services.rb +37 -0
  64. data/lib/econt/models/shipments/status_response.rb +11 -0
  65. data/lib/econt/models/shipments/update_label_response.rb +11 -0
  66. data/lib/econt/models/shipments/update_labels_result_element.rb +14 -0
  67. data/lib/econt/models/three_way_logistics/three_way_logistics.rb +50 -0
  68. data/lib/econt/models/three_way_logistics/three_way_logistics_response.rb +11 -0
  69. data/lib/econt/resource_attributes.rb +69 -0
  70. data/lib/econt/service_resource.rb +105 -0
  71. data/lib/econt/services/nomenclatures/address.rb +87 -0
  72. data/lib/econt/services/nomenclatures/nomenclatures.rb +122 -0
  73. data/lib/econt/services/nomenclatures.rb +11 -0
  74. data/lib/econt/services/payment_report/payment_report.rb +35 -0
  75. data/lib/econt/services/payment_report.rb +11 -0
  76. data/lib/econt/services/profile/profile.rb +45 -0
  77. data/lib/econt/services/profile.rb +11 -0
  78. data/lib/econt/services/shipments/label.rb +174 -0
  79. data/lib/econt/services/shipments/shipment.rb +109 -0
  80. data/lib/econt/services/shipments.rb +11 -0
  81. data/lib/econt/services/three_way_logistics/three_way_logistics.rb +30 -0
  82. data/lib/econt/services/three_way_logistics.rb +11 -0
  83. data/lib/econt/util.rb +63 -0
  84. data/lib/econt/version.rb +5 -0
  85. data/lib/econt.rb +118 -0
  86. data/sig/econt.rbs +465 -0
  87. metadata +166 -0
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class Address < Econt::Model
7
+ field :id, type: :integer
8
+ field :city, type: Econt::Models::Nomenclatures::City
9
+ field :full_address, type: :string
10
+ field :full_address_en, type: :string
11
+ field :quarter, type: :string
12
+ field :street, type: :string
13
+ field :num, type: :string
14
+ field :other, type: :string
15
+ field :location, type: Econt::Models::Nomenclatures::GeoLocation
16
+ field :zip, type: :string
17
+ field :hezid, type: :string
18
+ field :validation_status, type: :string
19
+ field :service_info, type: Econt::Models::Nomenclatures::AddressServiceInfo
20
+
21
+ def validate
22
+ address_service.validate_address(@attributes)
23
+ end
24
+
25
+ def get_nearest_offices(shipment_type)
26
+ address_service.get_nearest_offices(address: @attributes, shipment_type: shipment_type)
27
+ end
28
+
29
+ def address_service
30
+ @address_service ||= Services::Nomenclatures::Address.new
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class AddressServiceInfo < Econt::Model
7
+ field :allowed_packs_courier_request, type: :boolean
8
+ field :delivery_packs_extra_delay_days, type: :integer
9
+ field :allowed_cargo_courier_request, type: :boolean
10
+ field :delivery_cargo_extra_delay_days, type: :integer
11
+ field :allowed_pallet_courier_request, type: :boolean
12
+ field :delivery_pallet_extra_delay_days, type: :integer
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class AddressServiceTimesResponse < Econt::Model
7
+ field :service_office, type: Econt::Models::Nomenclatures::Office
8
+ field :service_office_latitude, type: :float
9
+ field :service_office_longitude, type: :float
10
+ field :service_office_clients_work_times, type: :array, of: Econt::Models::Nomenclatures::WorkingTime
11
+ field :service_office_courier_work_times, type: :array, of: Econt::Models::Nomenclatures::WorkingTime
12
+ field :service_office_time, type: Econt::Models::Nomenclatures::WorkingDateTime
13
+ field :service_office_next30days_work_time,
14
+ type: :array,
15
+ of: Econt::Models::Nomenclatures::WorkingDateTime
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class AddressValidationResponse < Econt::Model
7
+ field :address, type: Econt::Models::Nomenclatures::Address
8
+ field :validation_status, type: :string
9
+ field :service_info, type: Econt::Models::Nomenclatures::AddressServiceInfo
10
+
11
+ def validation_status
12
+ return super unless error?
13
+
14
+ 'invalid'
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class City < Econt::Model
7
+ field :id, type: :integer
8
+ field :country, type: Econt::Models::Nomenclatures::Country
9
+ field :post_code, type: :string
10
+ field :name, type: :string
11
+ field :name_en, type: :string
12
+ field :region_name, type: :string
13
+ field :region_name_en, type: :string
14
+ field :phone_code, type: :string
15
+ field :location, type: Econt::Models::Nomenclatures::GeoLocation
16
+ field :express_city_deliveries, type: :boolean
17
+ field :monday, type: :boolean
18
+ field :tuesday, type: :boolean
19
+ field :wednesday, type: :boolean
20
+ field :thursday, type: :boolean
21
+ field :friday, type: :boolean
22
+ field :saturday, type: :boolean
23
+ field :sunday, type: :boolean
24
+ field :service_days, type: :integer
25
+ field :zone_id, type: :integer
26
+ field :zone_name, type: :string
27
+ field :zone_name_en, type: :string
28
+ field :serving_offices, type: :array, of: Econt::Models::Nomenclatures::ServingOfficeElement
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class Country < Econt::Model
7
+ field :id, type: :integer
8
+ field :code2, type: :string
9
+ field :code3, type: :string
10
+ field :name, type: :string
11
+ field :name_en, type: :string
12
+ field :is_eu, type: :boolean
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class GeoLocation < Econt::Model
7
+ field :latitude, type: :float
8
+ field :longitude, type: :float
9
+ field :confidence, type: :integer
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class Office < Econt::Model
7
+ field :id, type: :integer
8
+ field :code, type: :string
9
+ field :is_mps, type: :boolean
10
+ field :is_aps, type: :boolean
11
+ field :name, type: :string
12
+ field :name_en, type: :string
13
+ field :phones, type: :array, of: :string
14
+ field :emails, type: :array, of: :string
15
+ field :address, type: Econt::Models::Nomenclatures::Address
16
+ field :info, type: :string
17
+ field :currency, type: :string
18
+ field :language, type: :string
19
+ field :normal_business_hours_from, type: :string
20
+ field :normal_business_hours_to, type: :string
21
+ field :half_day_business_hours_from, type: :string
22
+ field :half_day_business_hours_to, type: :string
23
+ field :shipment_types, type: :array, of: :string
24
+ field :partner_code, type: :string
25
+ field :hub_code, type: :string
26
+ field :hub_name, type: :string
27
+ field :hub_name_en, type: :string
28
+ field :is_drive, type: :boolean
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class Quarter < Econt::Model
7
+ field :id, type: :integer
8
+ field :city_id, type: :integer
9
+ field :name, type: :string
10
+ field :name_en, type: :string
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class ServingOfficeElement < Econt::Model
7
+ field :office_code, type: :string
8
+ field :serving_type, type: :string
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class Street < Econt::Model
7
+ field :id, type: :integer
8
+ field :city_id, type: :integer
9
+ field :name, type: :string
10
+ field :name_en, type: :string
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class WorkingDateTime < Econt::Model
7
+ collection_key :service_times
8
+
9
+ field :day_type, type: :string
10
+ field :day, type: :string
11
+ field :start, type: :string
12
+ field :end, type: :string
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Nomenclatures
6
+ class WorkingTime < Econt::Model
7
+ field :start, type: :string
8
+ field :end, type: :string
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module PaymentReport
6
+ class PaymentReportRow < Econt::Model
7
+ field :num, type: :integer
8
+ field :type, type: :string
9
+ field :pay_type, type: :string
10
+ field :pay_date, type: :string
11
+ field :amount, type: :float
12
+ field :currency, type: :string
13
+ field :created_time, type: :string
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Profile
6
+ class CDPayOptions < Econt::Model
7
+ field :num, type: :string
8
+ field :client, type: Econt::Models::Profile::ClientProfile
9
+ field :money_transfer, type: :boolean
10
+ field :express, type: :boolean
11
+ field :method, type: :string
12
+ field :address, type: Econt::Models::Nomenclatures::Address
13
+ field :office_code, type: :string
14
+ field :iban, type: :string
15
+ field :bic, type: :string
16
+ field :bank_currency, type: :string
17
+ field :pay_days, type: :array, of: :integer
18
+ field :pay_weekdays, type: :array, of: :string
19
+ field :additional_instructions, type: :string
20
+ field :departament_num, type: :integer
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Profile
6
+ class ClientProfile < Econt::Model
7
+ field :id, type: :integer
8
+ field :name, type: :string
9
+ field :name_en, type: :string
10
+ field :phones, type: :array, of: :string
11
+ field :email, type: :string
12
+ field :skype_accounts, type: :array, of: :string
13
+ field :client_number, type: :string
14
+ field :client_number_en, type: :string
15
+ field :juridical_entity, type: :boolean
16
+ field :personal_id_type, type: :string
17
+ field :personal_id_number, type: :string
18
+ field :company_type, type: :string
19
+ field :ein, type: :string
20
+ field :dds_ein_prefix, type: :string
21
+ field :dds_ein, type: :string
22
+ field :registration_address, type: :string
23
+ field :mol_name, type: :string
24
+ field :mol_egn, type: :string
25
+ field :mol_id_num, type: :string
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Profile
6
+ class ProfilesResponseElement < Econt::Model
7
+ collection_key :profiles
8
+
9
+ field :client, type: Econt::Models::Profile::ClientProfile
10
+ field :addresses, type: :array, of: Econt::Models::Nomenclatures::Address
11
+ field :cd_pay_options, type: :array, of: Econt::Models::Profile::CDPayOptions
12
+ field :instruction_templates, type: :array, of: Econt::Models::Shipments::Instruction
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class CargoVehicleOptions < Econt::Model
7
+ field :sender_address_truck_access, type: :boolean
8
+ field :receiver_address_truck_access, type: :boolean
9
+ field :sender_address_lifting_vehicle_required, type: :boolean
10
+ field :receiver_address_lifting_vehicle_required, type: :boolean
11
+ field :sender_address_tail_lift_truck_required, type: :boolean
12
+ field :receiver_address_tail_lift_truck_required, type: :boolean
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class CheckPossibleShipmentEditionsResultElement < Econt::Model
7
+ collection_key :possible_shipment_editions
8
+
9
+ field :possible_shipment_editions, type: :array, of: :string
10
+ field :shipment_num, type: :integer
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class CreateLabelResultElement < Econt::Model
7
+ collection_key :results
8
+
9
+ field :label, type: Econt::Models::Shipments::ShipmentStatus
10
+ field :error, type: Econt::Models::Error
11
+ field :pay_after_accept_ignored, type: :string
12
+ field :blocking_payment_url, type: :string
13
+ field :courier_request_id, type: :integer
14
+ field :delayed_delivery_warning, type: :string
15
+ field :delayed_request_warning, type: :string
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class CustomsListElement < Econt::Model
7
+ field :cn, type: :string
8
+ field :description, type: :string
9
+ field :sum, type: :float
10
+ field :currency, type: :string
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class DeleteLabelsResultElement < Econt::Model
7
+ collection_key :results
8
+
9
+ field :shipment_num, type: :string
10
+ field :error, type: Econt::Models::Error
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class GetMyAwbResponse < Econt::Model
7
+ field :date_from, type: :date
8
+ field :date_to, type: :date
9
+ field :page, type: :integer
10
+ field :total_pages, type: :integer
11
+ field :results, type: :array, of: Econt::Models::Shipments::GetMyAwbResultElement
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class GetMyAwbResultElement < Econt::Model
7
+ collection_key :results
8
+
9
+ field :shipment_number, type: :string
10
+ field :sender_name, type: :string
11
+ field :status, type: :string
12
+ field :created_date, type: :datetime
13
+ field :accepted_date, type: :datetime
14
+ field :cd_amount, type: :float
15
+ field :courier_service_amount, type: :float
16
+ field :courier_service_master_payer, type: :string
17
+ field :receiver_phone, type: :string
18
+ field :cd_currency, type: :string
19
+ field :courier_service_currency, type: :string
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class Instruction < Econt::Model
7
+ field :id, type: :integer
8
+ field :type, type: :string
9
+ field :title, type: :string
10
+ field :description, type: :string
11
+ field :attachments, type: :array, of: Econt::Models::HostedFile
12
+ field :voice_description, type: Econt::Models::HostedFile
13
+ field :return_instruction_params, type: Econt::Models::Shipments::ReturnInstructionParams
14
+ field :name, type: :string
15
+ field :apply_to_all_parcels, type: :boolean
16
+ field :apply_to_receivers, type: :array, of: :string
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class NextShipmentElement < Econt::Model
7
+ field :shipment_number, type: :string
8
+ field :reason, type: :string
9
+ field :pdf_url, type: :string
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class PackElement < Econt::Model
7
+ field :width, type: :float
8
+ field :height, type: :float
9
+ field :length, type: :float
10
+ field :weight, type: :float
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class PackingListElement < Econt::Model
7
+ field :inventory_num, type: :string
8
+ field :description, type: :string
9
+ field :weight, type: :float
10
+ field :count, type: :integer
11
+ field :price, type: :float
12
+ field :file, type: Econt::Models::HostedFile
13
+ field :alternative_department, type: :string
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class PaymentAdditionPrice < Econt::Model
7
+ field :side, type: :string
8
+ field :share_amount, type: :float
9
+ field :method, type: :string
10
+ field :other_client_number, type: :string
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class PaymentInstruction < Econt::Model
7
+ field :method, type: :string
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class PreviousShipment < Econt::Model
7
+ # Unlike the other shipment-number fields, Econt documents this as int.
8
+ field :shipment_number, type: :integer
9
+ field :reason, type: :string
10
+ field :pdf_url, type: :string
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class RequestCourierResponse < Econt::Model
7
+ field :courier_request_id, type: :string
8
+ field :warnings, type: :string
9
+ field :delayed_request_warning, type: :string
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class RequestCourierStatus < Econt::Model
7
+ field :id, type: :integer
8
+ field :status, type: :string
9
+ field :note, type: :string
10
+ field :reject_reason, type: :string
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Econt
4
+ module Models
5
+ module Shipments
6
+ class RequestCourierStatusResultElement < Econt::Model
7
+ collection_key :request_courier_status
8
+
9
+ field :status, type: Econt::Models::Shipments::RequestCourierStatus
10
+ field :error, type: Econt::Models::Error
11
+ end
12
+ end
13
+ end
14
+ end