speedy-bg 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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +3 -0
- data/CODE_OF_CONDUCT.md +134 -0
- data/CONTRIBUTING.md +67 -0
- data/LICENSE.txt +21 -0
- data/README.md +150 -0
- data/SECURITY.md +29 -0
- data/docs/API.md +740 -0
- data/docs/RESPONSE_CONTRACTS.md +55 -0
- data/docs/VCR.md +161 -0
- data/docs/schema-notes.md +38 -0
- data/lib/speedy/camel_case_middleware.rb +71 -0
- data/lib/speedy/client.rb +100 -0
- data/lib/speedy/client_resources.rb +776 -0
- data/lib/speedy/collection.rb +58 -0
- data/lib/speedy/error.rb +29 -0
- data/lib/speedy/model.rb +92 -0
- data/lib/speedy/models/calculation/address_location.rb +16 -0
- data/lib/speedy/models/calculation/calculation_content.rb +15 -0
- data/lib/speedy/models/calculation/calculation_recipient.rb +15 -0
- data/lib/speedy/models/calculation/calculation_result.rb +19 -0
- data/lib/speedy/models/calculation/calculation_sender.rb +16 -0
- data/lib/speedy/models/calculation/calculation_service.rb +16 -0
- data/lib/speedy/models/clients/client.rb +21 -0
- data/lib/speedy/models/clients/cod_contract_info.rb +16 -0
- data/lib/speedy/models/clients/cod_international_annex.rb +12 -0
- data/lib/speedy/models/clients/contract_info.rb +16 -0
- data/lib/speedy/models/clients/requirement.rb +12 -0
- data/lib/speedy/models/clients/special_delivery_requirements.rb +12 -0
- data/lib/speedy/models/common/address.rb +36 -0
- data/lib/speedy/models/error.rb +37 -0
- data/lib/speedy/models/location/address_nomenclature_type.rb +12 -0
- data/lib/speedy/models/location/block.rb +15 -0
- data/lib/speedy/models/location/complex.rb +23 -0
- data/lib/speedy/models/location/country.rb +25 -0
- data/lib/speedy/models/location/find_office_response.rb +12 -0
- data/lib/speedy/models/location/find_site_response.rb +12 -0
- data/lib/speedy/models/location/get_office_response.rb +12 -0
- data/lib/speedy/models/location/get_site_response.rb +12 -0
- data/lib/speedy/models/location/office.rb +41 -0
- data/lib/speedy/models/location/office_result.rb +13 -0
- data/lib/speedy/models/location/office_working_time_schedule.rb +15 -0
- data/lib/speedy/models/location/point_of_interest.rb +22 -0
- data/lib/speedy/models/location/postcode.rb +12 -0
- data/lib/speedy/models/location/routing_information.rb +14 -0
- data/lib/speedy/models/location/site.rb +30 -0
- data/lib/speedy/models/location/state.rb +17 -0
- data/lib/speedy/models/location/street.rb +23 -0
- data/lib/speedy/models/location/tour.rb +14 -0
- data/lib/speedy/models/payments/payout.rb +20 -0
- data/lib/speedy/models/payments/payout_details.rb +23 -0
- data/lib/speedy/models/pickup/pickup_order.rb +16 -0
- data/lib/speedy/models/pickup/terms_response.rb +12 -0
- data/lib/speedy/models/print/extended_print_response.rb +13 -0
- data/lib/speedy/models/print/label_info.rb +19 -0
- data/lib/speedy/models/print/label_info_response.rb +12 -0
- data/lib/speedy/models/print/parcel_to_print_additional_barcode.rb +14 -0
- data/lib/speedy/models/print/print_response.rb +12 -0
- data/lib/speedy/models/response.rb +13 -0
- data/lib/speedy/models/services/additional_courier_service.rb +11 -0
- data/lib/speedy/models/services/additional_courier_services.rb +21 -0
- data/lib/speedy/models/services/courier_service.rb +19 -0
- data/lib/speedy/models/services/extended_courier_service.rb +13 -0
- data/lib/speedy/models/shipments/bank_account.rb +12 -0
- data/lib/speedy/models/shipments/barcode_information.rb +20 -0
- data/lib/speedy/models/shipments/cod_payment.rb +12 -0
- data/lib/speedy/models/shipments/content.rb +20 -0
- data/lib/speedy/models/shipments/create_shipment_response.rb +16 -0
- data/lib/speedy/models/shipments/created_shipment_parcel.rb +14 -0
- data/lib/speedy/models/shipments/external_carrier_parcel_number.rb +12 -0
- data/lib/speedy/models/shipments/goods_item.rb +16 -0
- data/lib/speedy/models/shipments/money_transfer_premium.rb +13 -0
- data/lib/speedy/models/shipments/parcel.rb +22 -0
- data/lib/speedy/models/shipments/payment.rb +16 -0
- data/lib/speedy/models/shipments/primary_shipment.rb +12 -0
- data/lib/speedy/models/shipments/recipient.rb +21 -0
- data/lib/speedy/models/shipments/return_amounts.rb +11 -0
- data/lib/speedy/models/shipments/secondary_shipment.rb +18 -0
- data/lib/speedy/models/shipments/sender.rb +21 -0
- data/lib/speedy/models/shipments/shipment.rb +28 -0
- data/lib/speedy/models/shipments/shipment_additional_services.rb +17 -0
- data/lib/speedy/models/shipments/shipment_address.rb +10 -0
- data/lib/speedy/models/shipments/shipment_cod_additional_service.rb +20 -0
- data/lib/speedy/models/shipments/shipment_cod_fiscal_receipt_item.rb +14 -0
- data/lib/speedy/models/shipments/shipment_content.rb +24 -0
- data/lib/speedy/models/shipments/shipment_declared_value_additional_service.rb +13 -0
- data/lib/speedy/models/shipments/shipment_delivery.rb +14 -0
- data/lib/speedy/models/shipments/shipment_discount_card_id.rb +12 -0
- data/lib/speedy/models/shipments/shipment_electronic_return_receipt_additional_service.rb +14 -0
- data/lib/speedy/models/shipments/shipment_obpd.rb +13 -0
- data/lib/speedy/models/shipments/shipment_parcel.rb +23 -0
- data/lib/speedy/models/shipments/shipment_parcel_number.rb +12 -0
- data/lib/speedy/models/shipments/shipment_parcel_ref.rb +13 -0
- data/lib/speedy/models/shipments/shipment_parcel_size.rb +13 -0
- data/lib/speedy/models/shipments/shipment_payment.rb +17 -0
- data/lib/speedy/models/shipments/shipment_phone_number.rb +12 -0
- data/lib/speedy/models/shipments/shipment_price.rb +23 -0
- data/lib/speedy/models/shipments/shipment_price_amount.rb +13 -0
- data/lib/speedy/models/shipments/shipment_recipient.rb +14 -0
- data/lib/speedy/models/shipments/shipment_return_additional_services.rb +20 -0
- data/lib/speedy/models/shipments/shipment_return_receipt_additional_service.rb +14 -0
- data/lib/speedy/models/shipments/shipment_return_voucher_additional_service.rb +14 -0
- data/lib/speedy/models/shipments/shipment_rod_additional_service.rb +15 -0
- data/lib/speedy/models/shipments/shipment_rop_additional_service.rb +12 -0
- data/lib/speedy/models/shipments/shipment_rop_additional_service_line.rb +12 -0
- data/lib/speedy/models/shipments/shipment_sender.rb +23 -0
- data/lib/speedy/models/shipments/shipment_service.rb +17 -0
- data/lib/speedy/models/shipments/shipment_swap_additional_service.rb +17 -0
- data/lib/speedy/models/shipments/update_shipment_response.rb +10 -0
- data/lib/speedy/models/tracking/bulk_tracking_data_file.rb +14 -0
- data/lib/speedy/models/tracking/external_carrier_parcel_number_details.rb +13 -0
- data/lib/speedy/models/tracking/tracked_parcel.rb +21 -0
- data/lib/speedy/models/tracking/tracked_parcel_operation.rb +22 -0
- data/lib/speedy/models/tracking/tracked_parcel_operation_additional_info.rb +17 -0
- data/lib/speedy/models/tracking/tracked_parcel_operation_additional_info_predict.rb +14 -0
- data/lib/speedy/models/tracking/tracked_parcel_operation_additional_info_recipient.rb +14 -0
- data/lib/speedy/models/validation/validation_response.rb +14 -0
- data/lib/speedy/resource_attributes.rb +87 -0
- data/lib/speedy/service_resource.rb +94 -0
- data/lib/speedy/services/calculation.rb +22 -0
- data/lib/speedy/services/clients.rb +40 -0
- data/lib/speedy/services/courier_services.rb +25 -0
- data/lib/speedy/services/location/block.rb +32 -0
- data/lib/speedy/services/location/complex.rb +39 -0
- data/lib/speedy/services/location/country.rb +70 -0
- data/lib/speedy/services/location/office.rb +50 -0
- data/lib/speedy/services/location/point_of_interest.rb +39 -0
- data/lib/speedy/services/location/postcode.rb +25 -0
- data/lib/speedy/services/location/site.rb +77 -0
- data/lib/speedy/services/location/state.rb +46 -0
- data/lib/speedy/services/location/street.rb +39 -0
- data/lib/speedy/services/location.rb +11 -0
- data/lib/speedy/services/payments.rb +19 -0
- data/lib/speedy/services/pickup.rb +38 -0
- data/lib/speedy/services/print.rb +58 -0
- data/lib/speedy/services/shipments/shipment.rb +120 -0
- data/lib/speedy/services/shipments.rb +11 -0
- data/lib/speedy/services/tracking.rb +26 -0
- data/lib/speedy/services/validation/address.rb +26 -0
- data/lib/speedy/services/validation/general.rb +37 -0
- data/lib/speedy/services/validation.rb +11 -0
- data/lib/speedy/transport_error.rb +17 -0
- data/lib/speedy/util.rb +67 -0
- data/lib/speedy/version.rb +5 -0
- data/lib/speedy-bg.rb +6 -0
- data/lib/speedy.rb +203 -0
- data/sig/speedy.rbs +374 -0
- metadata +227 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Location
|
|
6
|
+
class PointOfInterest < Speedy::Model
|
|
7
|
+
collection_key :pois
|
|
8
|
+
|
|
9
|
+
field :id, type: :integer
|
|
10
|
+
field :site_id, type: :integer
|
|
11
|
+
field :type, type: :string
|
|
12
|
+
field :type_en, type: :string
|
|
13
|
+
field :name, type: :string
|
|
14
|
+
field :name_en, type: :string
|
|
15
|
+
field :address, type: :string
|
|
16
|
+
field :address_en, type: :string
|
|
17
|
+
field :x, type: :float
|
|
18
|
+
field :y, type: :float
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Location
|
|
6
|
+
class RoutingInformation < Speedy::Model
|
|
7
|
+
field :tour, type: Speedy::Models::Location::Tour
|
|
8
|
+
field :office_id, type: :integer
|
|
9
|
+
field :hub_id, type: :integer
|
|
10
|
+
field :priority, type: :integer
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Location
|
|
6
|
+
class Site < Speedy::Model
|
|
7
|
+
collection_key :sites
|
|
8
|
+
|
|
9
|
+
field :id, type: :integer
|
|
10
|
+
field :country_id, type: :integer
|
|
11
|
+
field :main_site_id, type: :integer
|
|
12
|
+
field :type, type: :string
|
|
13
|
+
field :type_en, type: :string
|
|
14
|
+
field :name, type: :string
|
|
15
|
+
field :name_en, type: :string
|
|
16
|
+
field :municipality, type: :string
|
|
17
|
+
field :municipality_en, type: :string
|
|
18
|
+
field :region, type: :string
|
|
19
|
+
field :region_en, type: :string
|
|
20
|
+
field :post_code, type: :string
|
|
21
|
+
field :serving_days, type: :string
|
|
22
|
+
field :address_nomenclature, type: :integer
|
|
23
|
+
field :x, type: :float
|
|
24
|
+
field :y, type: :float
|
|
25
|
+
field :serving_office_id, type: :integer
|
|
26
|
+
field :serving_hub_office_id, type: :integer
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Location
|
|
6
|
+
class State < Speedy::Model
|
|
7
|
+
collection_key :states
|
|
8
|
+
|
|
9
|
+
field :id, type: :string
|
|
10
|
+
field :name, type: :string
|
|
11
|
+
field :name_en, type: :string
|
|
12
|
+
field :state_alpha, type: :string
|
|
13
|
+
field :country_id, type: :integer
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Location
|
|
6
|
+
class Street < Speedy::Model
|
|
7
|
+
collection_key :streets
|
|
8
|
+
|
|
9
|
+
field :id, type: :integer
|
|
10
|
+
field :actual_id, type: :integer
|
|
11
|
+
field :site_id, type: :integer
|
|
12
|
+
field :type, type: :string
|
|
13
|
+
field :type_en, type: :string
|
|
14
|
+
field :name, type: :string
|
|
15
|
+
field :name_en, type: :string
|
|
16
|
+
field :actual_type, type: :string
|
|
17
|
+
field :actual_type_en, type: :string
|
|
18
|
+
field :actual_name, type: :string
|
|
19
|
+
field :actual_name_en, type: :string
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Location
|
|
6
|
+
class Tour < Speedy::Model
|
|
7
|
+
field :number, type: :integer
|
|
8
|
+
field :office_id, type: :integer
|
|
9
|
+
field :ramp, type: :string
|
|
10
|
+
field :cell, type: :string
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Payments
|
|
6
|
+
class Payout < Speedy::Model
|
|
7
|
+
collection_key :payouts
|
|
8
|
+
|
|
9
|
+
field :date, type: :date
|
|
10
|
+
field :doc_id, type: :integer
|
|
11
|
+
field :doc_type, type: :string
|
|
12
|
+
field :payment_type, type: :string
|
|
13
|
+
field :payee, type: :string
|
|
14
|
+
field :currency, type: :string
|
|
15
|
+
field :amount, type: :float
|
|
16
|
+
field :details, type: :array, of: Speedy::Models::Payments::PayoutDetails
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Payments
|
|
6
|
+
class PayoutDetails < Speedy::Model
|
|
7
|
+
field :line_no, type: :integer
|
|
8
|
+
field :shipment_id, type: :string
|
|
9
|
+
field :pickup_date, type: :date
|
|
10
|
+
field :primary_shipment_pickup_date, type: :date
|
|
11
|
+
field :delivery_date, type: :date
|
|
12
|
+
field :sender, type: :string
|
|
13
|
+
field :recipient, type: :string
|
|
14
|
+
field :note, type: :string
|
|
15
|
+
field :ref1, type: :string
|
|
16
|
+
field :ref2, type: :string
|
|
17
|
+
field :currency, type: :string
|
|
18
|
+
field :order, type: :integer
|
|
19
|
+
field :amount, type: :float
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Pickup
|
|
6
|
+
class PickupOrder < Speedy::Model
|
|
7
|
+
collection_key :orders
|
|
8
|
+
|
|
9
|
+
field :id, type: :integer
|
|
10
|
+
field :shipment_ids, type: :array
|
|
11
|
+
field :pickup_period_from, type: :string
|
|
12
|
+
field :pickup_period_to, type: :string
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Print
|
|
6
|
+
class ExtendedPrintResponse < Speedy::Model
|
|
7
|
+
field :data, type: :string
|
|
8
|
+
field :error, type: Speedy::Models::Error
|
|
9
|
+
field :print_labels_info, type: :array, of: Speedy::Models::Print::LabelInfo
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Print
|
|
6
|
+
class LabelInfo < Speedy::Model
|
|
7
|
+
field :parcel_id, type: :string
|
|
8
|
+
field :hub_id, type: :integer
|
|
9
|
+
field :office_id, type: :integer
|
|
10
|
+
field :deadline_day, type: :integer
|
|
11
|
+
field :deadline_month, type: :integer
|
|
12
|
+
field :tour_id, type: :integer
|
|
13
|
+
field :full_barcode, type: :string
|
|
14
|
+
field :office_name, type: :string
|
|
15
|
+
field :export_priority, type: :integer
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Print
|
|
6
|
+
class LabelInfoResponse < Speedy::Model
|
|
7
|
+
field :print_labels_info, type: :array, of: Speedy::Models::Print::LabelInfo
|
|
8
|
+
field :error, type: Speedy::Models::Error
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Print
|
|
6
|
+
class ParcelToPrintAdditionalBarcode < Speedy::Model
|
|
7
|
+
field :value_type, type: :string
|
|
8
|
+
field :value, type: :string
|
|
9
|
+
field :label, type: :string
|
|
10
|
+
field :format, type: :string
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Services
|
|
6
|
+
class AdditionalCourierServices < Speedy::Model
|
|
7
|
+
field :cod, type: AdditionalCourierService
|
|
8
|
+
field :obpd, type: AdditionalCourierService
|
|
9
|
+
field :declared_value, type: AdditionalCourierService
|
|
10
|
+
field :fixed_time_delivery, type: AdditionalCourierService
|
|
11
|
+
field :special_delivery, type: AdditionalCourierService
|
|
12
|
+
field :delivery_to_floor, type: AdditionalCourierService
|
|
13
|
+
field :rod, type: AdditionalCourierService
|
|
14
|
+
field :return_receipt, type: AdditionalCourierService
|
|
15
|
+
field :swap, type: AdditionalCourierService
|
|
16
|
+
field :rop, type: AdditionalCourierService
|
|
17
|
+
field :return_voucher, type: AdditionalCourierService
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Services
|
|
6
|
+
class CourierService < Speedy::Model
|
|
7
|
+
collection_key :services
|
|
8
|
+
|
|
9
|
+
field :id, type: :integer
|
|
10
|
+
field :name, type: :string
|
|
11
|
+
field :name_en, type: :string
|
|
12
|
+
field :additional_services, type: Speedy::Models::Services::AdditionalCourierServices
|
|
13
|
+
field :cargo_type, type: :string
|
|
14
|
+
field :require_parcel_weight, type: :boolean
|
|
15
|
+
field :require_parcel_size, type: :boolean
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Shipments
|
|
6
|
+
class BarcodeInformation < Speedy::Model
|
|
7
|
+
field :error, type: Speedy::Models::Error
|
|
8
|
+
field :label_info, type: Speedy::Models::Print::LabelInfo
|
|
9
|
+
field :primary_shipment, type: Speedy::Models::Shipments::PrimaryShipment
|
|
10
|
+
field :primary_parcel_id, type: :string
|
|
11
|
+
field :return_shipment_id, type: :string
|
|
12
|
+
field :return_parcel_id, type: :string
|
|
13
|
+
field :redirect_shipment_id, type: :string
|
|
14
|
+
field :redirect_parcel_id, type: :string
|
|
15
|
+
field :initial_shipment_id, type: :string
|
|
16
|
+
field :initial_parcel_id, type: :string
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Shipments
|
|
6
|
+
class Content < Speedy::Model
|
|
7
|
+
field :parcels_count, type: :integer
|
|
8
|
+
field :declared_weight, type: :float
|
|
9
|
+
field :measured_weight, type: :float
|
|
10
|
+
field :calculation_weight, type: :float
|
|
11
|
+
field :contents, type: :string
|
|
12
|
+
field :documents, type: :boolean
|
|
13
|
+
field :palletized, type: :boolean
|
|
14
|
+
field :parcels, type: :array, of: Speedy::Models::Shipments::Parcel
|
|
15
|
+
field :pending_parcels, type: :boolean
|
|
16
|
+
field :package, type: :string
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Shipments
|
|
6
|
+
class CreateShipmentResponse < Speedy::Model
|
|
7
|
+
field :id, type: :string
|
|
8
|
+
field :parcels, type: :array, of: Speedy::Models::Shipments::CreatedShipmentParcel
|
|
9
|
+
field :pickup_date, type: :string
|
|
10
|
+
field :price, type: Speedy::Models::Shipments::ShipmentPrice
|
|
11
|
+
field :delivery_deadline, type: :string
|
|
12
|
+
field :error, type: Speedy::Models::Error
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Shipments
|
|
6
|
+
class CreatedShipmentParcel < Speedy::Model
|
|
7
|
+
field :id, type: :string
|
|
8
|
+
field :seq_no, type: :integer
|
|
9
|
+
field :external_carrier_id, type: :integer
|
|
10
|
+
field :external_carrier_parcel_number, type: :string
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Shipments
|
|
6
|
+
class GoodsItem < Speedy::Model
|
|
7
|
+
field :description, type: :string
|
|
8
|
+
field :hs_code, type: :string
|
|
9
|
+
field :quantity, type: :integer
|
|
10
|
+
field :value_per_item, type: :float
|
|
11
|
+
field :weight_per_item, type: :float
|
|
12
|
+
field :origin_country_code, type: :string
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Shipments
|
|
6
|
+
class Parcel < Speedy::Model
|
|
7
|
+
field :id, type: :string
|
|
8
|
+
field :seq_no, type: :integer
|
|
9
|
+
field :package_unique_number, type: :integer
|
|
10
|
+
field :declared_size, type: Speedy::Models::Shipments::ShipmentParcelSize
|
|
11
|
+
field :measured_size, type: Speedy::Models::Shipments::ShipmentParcelSize
|
|
12
|
+
field :calculation_size, type: Speedy::Models::Shipments::ShipmentParcelSize
|
|
13
|
+
field :declared_weight, type: :float
|
|
14
|
+
field :measured_weight, type: :float
|
|
15
|
+
field :calculation_weight, type: :float
|
|
16
|
+
field :external_carrier_parcel_numbers, type: :array
|
|
17
|
+
field :base_type, type: :string
|
|
18
|
+
field :size, type: :string
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Shipments
|
|
6
|
+
class Payment < Speedy::Model
|
|
7
|
+
field :courier_service_payer, type: :string
|
|
8
|
+
field :declared_value_payer, type: :string
|
|
9
|
+
field :package_payer, type: :string
|
|
10
|
+
field :third_party_client_id, type: :integer
|
|
11
|
+
field :discount_card_id, type: Speedy::Models::Shipments::ShipmentDiscountCardId
|
|
12
|
+
field :cod_payment, type: Speedy::Models::Shipments::CODPayment
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Shipments
|
|
6
|
+
class Recipient < Speedy::Model
|
|
7
|
+
field :client_id, type: :integer
|
|
8
|
+
field :client_name, type: :string
|
|
9
|
+
field :object_name, type: :string
|
|
10
|
+
field :contact_name, type: :string
|
|
11
|
+
field :address, type: Speedy::Models::Common::Address
|
|
12
|
+
field :email, type: :string
|
|
13
|
+
field :private_person, type: :boolean
|
|
14
|
+
field :phones, type: :array, of: Speedy::Models::Shipments::ShipmentPhoneNumber
|
|
15
|
+
field :external_contact_id, type: :string
|
|
16
|
+
field :pickup_office_id, type: :integer
|
|
17
|
+
field :pickup_geo_pudo_id, type: :string
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Shipments
|
|
6
|
+
class SecondaryShipment < Speedy::Model
|
|
7
|
+
collection_key :shipments
|
|
8
|
+
|
|
9
|
+
field :id, type: :string
|
|
10
|
+
field :type, type: :string
|
|
11
|
+
field :parcels, type: :array, of: Speedy::Models::Shipments::ShipmentParcelNumber
|
|
12
|
+
field :pickup_date, type: :date
|
|
13
|
+
field :service_id, type: :integer
|
|
14
|
+
field :has_scans, type: :boolean
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Speedy
|
|
4
|
+
module Models
|
|
5
|
+
module Shipments
|
|
6
|
+
class Sender < Speedy::Model
|
|
7
|
+
field :client_id, type: :integer
|
|
8
|
+
field :client_name, type: :string
|
|
9
|
+
field :object_name, type: :string
|
|
10
|
+
field :contact_name, type: :string
|
|
11
|
+
field :address, type: Speedy::Models::Common::Address
|
|
12
|
+
field :email, type: :string
|
|
13
|
+
field :private_person, type: :boolean
|
|
14
|
+
field :phones, type: :array, of: Speedy::Models::Shipments::ShipmentPhoneNumber
|
|
15
|
+
field :external_contact_id, type: :string
|
|
16
|
+
field :dropoff_office_id, type: :integer
|
|
17
|
+
field :dropoff_geo_pudo_id, type: :string
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|