global_registry_models 0.8.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/global_registry_models.rb +2 -0
- data/lib/global_registry_models/entity/base.rb +2 -4
- data/lib/global_registry_models/entity/enum_value.rb +21 -0
- data/lib/global_registry_models/entity/ministry_brand.rb +7 -0
- data/lib/global_registry_models/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9b56d180b2023b55910eceae846cfd7fe04f13e
|
4
|
+
data.tar.gz: 3e382bd75fd39f60dfbb8153f2a5169f48aa9f42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04d217529871cad9d1582c881fab166d1d6c475bb4909d5bac8e806e8833e54542ed8d06d6d3207d761743a210f0747bfb55247f71a606556039f5e6e0ad162c
|
7
|
+
data.tar.gz: cf39b76d381e23acd87bcc832471852cdeacd6507cfa5eadced6e681580d2432c38c34a19676d7160a23acfa8923a9f6db2ff5d5c6e849c1cb94fff47def9233
|
@@ -21,10 +21,12 @@ require 'global_registry_models/api_operations/reset_access_token'
|
|
21
21
|
require 'global_registry_models/common_base'
|
22
22
|
|
23
23
|
require 'global_registry_models/entity/base'
|
24
|
+
require 'global_registry_models/entity/enum_value'
|
24
25
|
require 'global_registry_models/entity/area'
|
25
26
|
require 'global_registry_models/entity/global_mcc'
|
26
27
|
require 'global_registry_models/entity/iso_country'
|
27
28
|
require 'global_registry_models/entity/ministry'
|
29
|
+
require 'global_registry_models/entity/ministry_brand'
|
28
30
|
require 'global_registry_models/entity/target_area'
|
29
31
|
|
30
32
|
require 'global_registry_models/entity_type/base'
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# A base class providing CRUD for GlobalRegistry Entities.
|
2
2
|
# API doc at https://github.com/CruGlobal/global_registry_docs/wiki/Entities
|
3
3
|
|
4
|
-
|
5
|
-
|
6
4
|
module GlobalRegistryModels
|
7
5
|
module Entity
|
8
6
|
class Base < CommonBase
|
@@ -20,14 +18,14 @@ module GlobalRegistryModels
|
|
20
18
|
end
|
21
19
|
|
22
20
|
def self.attributes_hash(attributes)
|
23
|
-
{'entity'.to_sym => { name => attributes }}
|
21
|
+
{'entity'.to_sym => { name => attributes }}
|
24
22
|
end
|
25
23
|
|
26
24
|
# The name of the entity class. The entity name is required in the api responses and requests, hence the need for this class method.
|
27
25
|
def self.name
|
28
26
|
to_s.gsub(/.*::/, '').underscore
|
29
27
|
end
|
30
|
-
|
28
|
+
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module GlobalRegistryModels
|
2
|
+
module Entity
|
3
|
+
class EnumValueBase < Base
|
4
|
+
|
5
|
+
attribute :enum_value, String
|
6
|
+
|
7
|
+
def initialize(enum_value)
|
8
|
+
self.enum_value = enum_value
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.identifying_attributes
|
12
|
+
[:enum_value]
|
13
|
+
end
|
14
|
+
|
15
|
+
def to_s
|
16
|
+
enum_value
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: global_registry_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sheldon Dueck
|
@@ -157,9 +157,11 @@ files:
|
|
157
157
|
- lib/global_registry_models/entity/.DS_Store
|
158
158
|
- lib/global_registry_models/entity/area.rb
|
159
159
|
- lib/global_registry_models/entity/base.rb
|
160
|
+
- lib/global_registry_models/entity/enum_value.rb
|
160
161
|
- lib/global_registry_models/entity/global_mcc.rb
|
161
162
|
- lib/global_registry_models/entity/iso_country.rb
|
162
163
|
- lib/global_registry_models/entity/ministry.rb
|
164
|
+
- lib/global_registry_models/entity/ministry_brand.rb
|
163
165
|
- lib/global_registry_models/entity/target_area.rb
|
164
166
|
- lib/global_registry_models/entity_type/.DS_Store
|
165
167
|
- lib/global_registry_models/entity_type/base.rb
|