netilion 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/ruby.yml +22 -0
- data/.gitignore +9 -0
- data/.rubocop.yml +74 -0
- data/.ruby-version +1 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +155 -0
- data/Rakefile +12 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/netilion.rb +53 -0
- data/lib/netilion/api_key.rb +12 -0
- data/lib/netilion/api_subscription.rb +13 -0
- data/lib/netilion/asset.rb +18 -0
- data/lib/netilion/asset_health_condition.rb +13 -0
- data/lib/netilion/asset_status.rb +17 -0
- data/lib/netilion/asset_value.rb +12 -0
- data/lib/netilion/attachment.rb +12 -0
- data/lib/netilion/authentication.rb +15 -0
- data/lib/netilion/bill_of_material.rb +10 -0
- data/lib/netilion/client_application.rb +13 -0
- data/lib/netilion/company.rb +12 -0
- data/lib/netilion/delivery.rb +14 -0
- data/lib/netilion/delivery_status.rb +12 -0
- data/lib/netilion/document.rb +14 -0
- data/lib/netilion/document_category.rb +13 -0
- data/lib/netilion/document_classification.rb +12 -0
- data/lib/netilion/document_status.rb +12 -0
- data/lib/netilion/edm.rb +6 -0
- data/lib/netilion/edm/edge_device.rb +23 -0
- data/lib/netilion/edm/edge_device_status.rb +19 -0
- data/lib/netilion/edm/edge_device_type.rb +19 -0
- data/lib/netilion/edm/field_gateway.rb +22 -0
- data/lib/netilion/edm/field_gateway_status.rb +19 -0
- data/lib/netilion/edm/field_gateway_type.rb +19 -0
- data/lib/netilion/edm/network_interface.rb +19 -0
- data/lib/netilion/edm/record.rb +8 -0
- data/lib/netilion/edm/software_image.rb +20 -0
- data/lib/netilion/edm/software_image_type.rb +19 -0
- data/lib/netilion/edm/software_version.rb +21 -0
- data/lib/netilion/edm/software_version_status.rb +19 -0
- data/lib/netilion/edm/specification.rb +12 -0
- data/lib/netilion/edm/update_schedule.rb +21 -0
- data/lib/netilion/edm/update_schedule_status.rb +19 -0
- data/lib/netilion/event.rb +14 -0
- data/lib/netilion/event_status.rb +12 -0
- data/lib/netilion/event_type.rb +12 -0
- data/lib/netilion/extended_order_code_lookup.rb +7 -0
- data/lib/netilion/health_condition.rb +13 -0
- data/lib/netilion/health_condition_cause.rb +10 -0
- data/lib/netilion/health_condition_remedy.rb +10 -0
- data/lib/netilion/instrumentation.rb +15 -0
- data/lib/netilion/instrumentation_status.rb +12 -0
- data/lib/netilion/instrumentation_type.rb +13 -0
- data/lib/netilion/netilion.rb +6 -0
- data/lib/netilion/node.rb +14 -0
- data/lib/netilion/node_type.rb +12 -0
- data/lib/netilion/notification.rb +10 -0
- data/lib/netilion/permission.rb +14 -0
- data/lib/netilion/permission_request.rb +13 -0
- data/lib/netilion/product.rb +15 -0
- data/lib/netilion/product_category.rb +13 -0
- data/lib/netilion/product_lookup.rb +7 -0
- data/lib/netilion/product_status.rb +12 -0
- data/lib/netilion/purchase_order.rb +15 -0
- data/lib/netilion/purchase_order_status.rb +12 -0
- data/lib/netilion/quotation.rb +14 -0
- data/lib/netilion/quotation_status.rb +12 -0
- data/lib/netilion/record.rb +6 -0
- data/lib/netilion/request_for_quotation.rb +14 -0
- data/lib/netilion/request_for_quotation_status.rb +12 -0
- data/lib/netilion/search.rb +7 -0
- data/lib/netilion/specification.rb +13 -0
- data/lib/netilion/subscription.rb +15 -0
- data/lib/netilion/successor_lookup.rb +9 -0
- data/lib/netilion/tenant.rb +14 -0
- data/lib/netilion/threshold.rb +10 -0
- data/lib/netilion/unit.rb +12 -0
- data/lib/netilion/user.rb +10 -0
- data/lib/netilion/user_group.rb +10 -0
- data/lib/netilion/user_role.rb +12 -0
- data/lib/netilion/version.rb +5 -0
- data/netilion.gemspec +33 -0
- metadata +218 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
module EDM
|
5
|
+
class SoftwareVersionStatus < ::Netilion::Record
|
6
|
+
configuration items_key: :software_version_statuses
|
7
|
+
|
8
|
+
configuration pagination_strategy: :page
|
9
|
+
configuration limit_key: { body: [:pagination, :per_page], parameter: :per_page }
|
10
|
+
configuration pagination_key: { body: [:pagination, :page], parameter: :page }
|
11
|
+
configuration total_key: { body: [:pagination, :total_key], parameter: :total_key }
|
12
|
+
|
13
|
+
endpoint '{+edm}/software_version/statuses'
|
14
|
+
endpoint '{+edm}/software_version/statuses/{id}'
|
15
|
+
|
16
|
+
has_many :software_versions, class_name: 'Netilion::EDM::SoftwareVersions'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
module EDM
|
5
|
+
class Specification < ::Netilion::Record
|
6
|
+
configuration paginated: false
|
7
|
+
|
8
|
+
endpoint '{+edm}/edge_devices/{edge_device_id}/specifications'
|
9
|
+
endpoint '{+edm}/edge_devices/{edge_device_id}/field_gateways/{field_gateway_id}/specifications'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
module EDM
|
5
|
+
class UpdateSchedule < ::Netilion::Record
|
6
|
+
configuration items_key: :update_schedules
|
7
|
+
|
8
|
+
configuration pagination_strategy: :page
|
9
|
+
configuration limit_key: { body: [:pagination, :per_page], parameter: :per_page }
|
10
|
+
configuration pagination_key: { body: [:pagination, :page], parameter: :page }
|
11
|
+
configuration total_key: { body: [:pagination, :total_key], parameter: :total_key }
|
12
|
+
|
13
|
+
endpoint '{+edm}/update_schedules'
|
14
|
+
endpoint '{+edm}/update_schedules/{id}'
|
15
|
+
|
16
|
+
has_one :status, class_name: 'Netilion::EDM::UpdateScheduleStatus'
|
17
|
+
has_one :edge_device, class_name: 'Netilion::EDM::EdgeDevice'
|
18
|
+
has_one :software_version, class_name: 'Netilion::EDM::SoftwareVersion'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
module EDM
|
5
|
+
class UpdateScheduleStatus < ::Netilion::Record
|
6
|
+
configuration items_key: :update_schedule_statuses
|
7
|
+
|
8
|
+
configuration pagination_strategy: :page
|
9
|
+
configuration limit_key: { body: [:pagination, :per_page], parameter: :per_page }
|
10
|
+
configuration pagination_key: { body: [:pagination, :page], parameter: :page }
|
11
|
+
configuration total_key: { body: [:pagination, :total_key], parameter: :total_key }
|
12
|
+
|
13
|
+
endpoint '{+edm}/update_schedule/statuses'
|
14
|
+
endpoint '{+edm}/update_schedule/statuses/{id}'
|
15
|
+
|
16
|
+
has_many :update_schedules, class_name: 'Netilion::EDM::UpdateSchedule'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class Event < LHS::Record
|
5
|
+
configuration items_key: :events
|
6
|
+
|
7
|
+
endpoint '{+api}/events'
|
8
|
+
endpoint '{+api}/events/{id}'
|
9
|
+
|
10
|
+
has_one :status, class_name: 'Netilion::EventStatus'
|
11
|
+
has_one :type, class_name: 'Netilion::EventType'
|
12
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class EventStatus < LHS::Record
|
5
|
+
configuration items_key: :event_statuses
|
6
|
+
|
7
|
+
endpoint '{+api}/event/statuses'
|
8
|
+
endpoint '{+api}/event/statuses/{id}'
|
9
|
+
|
10
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class EventType < LHS::Record
|
5
|
+
configuration items_key: :event_types
|
6
|
+
|
7
|
+
endpoint '{+api}/event/types'
|
8
|
+
endpoint '{+api}/event/types/{id}'
|
9
|
+
|
10
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class HealthCondition < LHS::Record
|
5
|
+
configuration items_key: :health_conditions
|
6
|
+
|
7
|
+
endpoint '{+api}/health_conditions'
|
8
|
+
endpoint '{+api}/health_conditions/{id}'
|
9
|
+
|
10
|
+
has_one :asset_status, class_name: 'Netilion::AssetStatus'
|
11
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class HealthConditionCause < LHS::Record
|
5
|
+
configuration items_key: :causes
|
6
|
+
|
7
|
+
endpoint '{+api}/health_conditions/{health_condition_id}/causes'
|
8
|
+
endpoint '{+api}/health_conditions/{health_condition_id}/causes/{id}'
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class HealthConditionRemedy < LHS::Record
|
5
|
+
configuration items_key: :remedies
|
6
|
+
|
7
|
+
endpoint '{+api}/health_conditions/{health_condition_id}/causes/{cause_id}/remedies'
|
8
|
+
endpoint '{+api}/health_conditions/{health_condition_id}/causes/{cause_id}/remedies/{id}'
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class Instrumentation < LHS::Record
|
5
|
+
configuration items_key: :instrumentations
|
6
|
+
|
7
|
+
endpoint '{+api}/instrumentations'
|
8
|
+
endpoint '{+api}/instrumentations/{id}'
|
9
|
+
|
10
|
+
has_one :status, class_name: 'Netilion::InstrumentationStatus'
|
11
|
+
has_one :type, class_name: 'Netilion::InstrumentationType'
|
12
|
+
has_one :parent, class_name: 'Netilion::Instrumentation'
|
13
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class InstrumentationStatus < LHS::Record
|
5
|
+
configuration items_key: :instrumentation_statuses
|
6
|
+
|
7
|
+
endpoint '{+api}/instrumentation/statuses'
|
8
|
+
endpoint '{+api}/instrumentation/statuses/{id}'
|
9
|
+
|
10
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class InstrumentationType < LHS::Record
|
5
|
+
configuration items_key: :instrumentation_types
|
6
|
+
|
7
|
+
endpoint '{+api}/instrumentation/types'
|
8
|
+
endpoint '{+api}/instrumentation/types/{id}'
|
9
|
+
|
10
|
+
has_one :parent, class_name: 'Netilion::InstrumentationType'
|
11
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class Node < LHS::Record
|
5
|
+
configuration items_key: :nodes
|
6
|
+
|
7
|
+
endpoint '{+api}/nodes'
|
8
|
+
endpoint '{+api}/nodes/{id}'
|
9
|
+
|
10
|
+
has_one :type, class_name: 'Netilion::NodeType'
|
11
|
+
has_one :parent, class_name: 'Netilion::Node'
|
12
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class Permission < LHS::Record
|
5
|
+
configuration items_key: :permissions
|
6
|
+
|
7
|
+
endpoint '{+api}/permissions'
|
8
|
+
endpoint '{+api}/permissions/{id}'
|
9
|
+
|
10
|
+
has_one :permitable
|
11
|
+
has_one :request_user, class_name: 'Netilion::User'
|
12
|
+
has_one :response_user, class_name: 'Netilion::User'
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class PermissionRequest < LHS::Record
|
5
|
+
configuration items_key: :permission_requests
|
6
|
+
|
7
|
+
endpoint '{+api}/permission_requests'
|
8
|
+
endpoint '{+api}/permission_requests/{id}'
|
9
|
+
|
10
|
+
has_one :assignable
|
11
|
+
has_one :permitable
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class Product < LHS::Record
|
5
|
+
configuration items_key: :products
|
6
|
+
|
7
|
+
endpoint '{+api}/products'
|
8
|
+
endpoint '{+api}/products/{id}'
|
9
|
+
|
10
|
+
has_one :status, class_name: 'Netilion::ProductStatus'
|
11
|
+
has_one :manufacturer, class_name: 'Netilion::Company'
|
12
|
+
has_one :parent, class_name: 'Netilion::Product'
|
13
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class ProductCategory < LHS::Record
|
5
|
+
configuration items_key: :categories
|
6
|
+
|
7
|
+
endpoint '{+api}/product/categories'
|
8
|
+
endpoint '{+api}/product/categories/{id}'
|
9
|
+
|
10
|
+
has_one :parent, class_name: 'Netilion::ProductCategory'
|
11
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class ProductStatus < LHS::Record
|
5
|
+
configuration items_key: :product_statuses
|
6
|
+
|
7
|
+
endpoint '{+api}/product/statuses'
|
8
|
+
endpoint '{+api}/product/statuses/{id}'
|
9
|
+
|
10
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class PurchaseOrder < LHS::Record
|
5
|
+
configuration items_key: :purchase_orders
|
6
|
+
|
7
|
+
endpoint '{+api}/purchase_orders'
|
8
|
+
endpoint '{+api}/purchase_orders/{id}'
|
9
|
+
|
10
|
+
has_one :status, class_name: 'Netilion::PurchaseOrderStatus'
|
11
|
+
has_one :sender, class_name: 'Netilion::User'
|
12
|
+
has_one :receiver, class_name: 'Netilion::User'
|
13
|
+
has_one :quotation, class_name: 'Netilion::Quotation'
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class PurchaseOrderStatus < LHS::Record
|
5
|
+
configuration items_key: :purchase_orders_statuses
|
6
|
+
|
7
|
+
endpoint '{+api}/purchase_orders/statuses'
|
8
|
+
endpoint '{+api}/purchase_orders/statuses/{id}'
|
9
|
+
|
10
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class Quotation < LHS::Record
|
5
|
+
configuration items_key: :quotations
|
6
|
+
|
7
|
+
endpoint '{+api}/quotations'
|
8
|
+
endpoint '{+api}/quotations/{id}'
|
9
|
+
|
10
|
+
has_one :status, class_name: 'Netilion::QuotationStatus'
|
11
|
+
has_one :sender, class_name: 'Netilion::User'
|
12
|
+
has_one :receiver, class_name: 'Netilion::User'
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class QuotationStatus < LHS::Record
|
5
|
+
configuration items_key: :quotation_statuses
|
6
|
+
|
7
|
+
endpoint '{+api}/quotation/statuses'
|
8
|
+
endpoint '{+api}/quotation/statuses/{id}'
|
9
|
+
|
10
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class RequestForQuotation < LHS::Record
|
5
|
+
configuration items_key: :request_for_quotations
|
6
|
+
|
7
|
+
endpoint '{+api}/request_for_quotations'
|
8
|
+
endpoint '{+api}/request_for_quotations/{id}'
|
9
|
+
|
10
|
+
has_one :status, class_name: 'Netilion::RequestForQuotationStatus'
|
11
|
+
has_one :sender, class_name: 'Netilion::User'
|
12
|
+
has_one :receiver, class_name: 'Netilion::User'
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class RequestForQuotationStatus < LHS::Record
|
5
|
+
configuration items_key: :request_for_quotation_statuses
|
6
|
+
|
7
|
+
endpoint '{+api}/request_for_quotation/statuses'
|
8
|
+
endpoint '{+api}/request_for_quotation/statuses/{id}'
|
9
|
+
|
10
|
+
has_one :tenant, class_name: 'Netilion::Tenant'
|
11
|
+
end
|
12
|
+
end
|