mastercard_mcaidanalytics 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b113ffd090643263195ce9f8027328efa4433958
4
- data.tar.gz: 6a564418f5b5fa08cfafce3473225ef6e916cf0e
3
+ metadata.gz: b07f83958f1d8182e75c1b0691128b5af73a583e
4
+ data.tar.gz: 0c27a1fe173472f228ce05247c6905f60bd76a14
5
5
  SHA512:
6
- metadata.gz: e67ccca3f48d9acbe986314bb400ab8f0fa8e2771609acf7747200ed615bcf69c7d84a3d6b3b38e8320b63010dffd46761a1e41bc4af97d98ec39e30a69e9132
7
- data.tar.gz: 82142ae69a9f04b80b2271e272777352434045072d7e3ee2971e491958f4cb2d52036484abecea2d9f793cabc7d3ff8b76f3eb1283219af4976ba19e983c7661
6
+ metadata.gz: 000ee31e339f211b75f19cd5f38a7db848242119581c67af9190bd6dffdb9214dae2f00dd185a3f87e3daeeb214f910133bef9832733438cb1bbc08ac3037aef
7
+ data.tar.gz: ecbe660d7836e65bc69217de7246d2463f1cfc3d21d51b5466a5e86fe908c8c05f31c4dbbcc8b2f3e61a139b52d11cdd7726d9a9b762af0ce738acb9cf9f8878
@@ -36,7 +36,7 @@ module MasterCard
36
36
  #
37
37
 
38
38
  @__store = {
39
- '7d23e5f1-f1fb-4803-85fa-7f2eb566b010' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/cards", "list", [], ["programId","status"]),
39
+ '3be17361-d652-40c9-8bee-195b7260ff1d' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/cards", "list", [], ["programId","status"]),
40
40
 
41
41
  }
42
42
 
@@ -50,7 +50,7 @@ module MasterCard
50
50
  end
51
51
 
52
52
  def self.getOperationMetadata()
53
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
53
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
54
54
  end
55
55
 
56
56
  public
@@ -65,9 +65,9 @@ module MasterCard
65
65
  #@return Array of Cards object matching the criteria.
66
66
 
67
67
  if criteria.nil?
68
- return self.execute("7d23e5f1-f1fb-4803-85fa-7f2eb566b010",Cards.new)
68
+ return self.execute("3be17361-d652-40c9-8bee-195b7260ff1d",Cards.new)
69
69
  else
70
- return self.execute("7d23e5f1-f1fb-4803-85fa-7f2eb566b010",Cards.new(criteria))
70
+ return self.execute("3be17361-d652-40c9-8bee-195b7260ff1d",Cards.new(criteria))
71
71
  end
72
72
  end
73
73
 
@@ -36,7 +36,7 @@ module MasterCard
36
36
  #
37
37
 
38
38
  @__store = {
39
- 'acc304a6-ca4e-44ba-a420-13b5033963e2' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/devices", "list", [], ["type"]),
39
+ '25bc93c3-650d-44a4-b545-78e32d3d49c0' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/devices", "list", [], ["type"]),
40
40
 
41
41
  }
42
42
 
@@ -50,7 +50,7 @@ module MasterCard
50
50
  end
51
51
 
52
52
  def self.getOperationMetadata()
53
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
53
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
54
54
  end
55
55
 
56
56
  public
@@ -65,9 +65,9 @@ module MasterCard
65
65
  #@return Array of Devices object matching the criteria.
66
66
 
67
67
  if criteria.nil?
68
- return self.execute("acc304a6-ca4e-44ba-a420-13b5033963e2",Devices.new)
68
+ return self.execute("25bc93c3-650d-44a4-b545-78e32d3d49c0",Devices.new)
69
69
  else
70
- return self.execute("acc304a6-ca4e-44ba-a420-13b5033963e2",Devices.new(criteria))
70
+ return self.execute("25bc93c3-650d-44a4-b545-78e32d3d49c0",Devices.new(criteria))
71
71
  end
72
72
  end
73
73
 
@@ -36,7 +36,7 @@ module MasterCard
36
36
  #
37
37
 
38
38
  @__store = {
39
- '3ddeb082-5b2c-4e3b-ad2a-3aedd1d13e33' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/merchants", "list", [], ["name"]),
39
+ '9d52524e-5589-48eb-89c6-0e131a767940' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/merchants", "list", [], ["name"]),
40
40
 
41
41
  }
42
42
 
@@ -50,7 +50,7 @@ module MasterCard
50
50
  end
51
51
 
52
52
  def self.getOperationMetadata()
53
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
53
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
54
54
  end
55
55
 
56
56
  public
@@ -65,9 +65,9 @@ module MasterCard
65
65
  #@return Array of Merchants object matching the criteria.
66
66
 
67
67
  if criteria.nil?
68
- return self.execute("3ddeb082-5b2c-4e3b-ad2a-3aedd1d13e33",Merchants.new)
68
+ return self.execute("9d52524e-5589-48eb-89c6-0e131a767940",Merchants.new)
69
69
  else
70
- return self.execute("3ddeb082-5b2c-4e3b-ad2a-3aedd1d13e33",Merchants.new(criteria))
70
+ return self.execute("9d52524e-5589-48eb-89c6-0e131a767940",Merchants.new(criteria))
71
71
  end
72
72
  end
73
73
 
@@ -36,7 +36,7 @@ module MasterCard
36
36
  #
37
37
 
38
38
  @__store = {
39
- '95c7e8f2-12df-493f-8f3f-5c818b236bae' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/products", "list", [], ["name"]),
39
+ 'dbe51cd7-867d-4800-a27b-88ae1c68c6a8' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/products", "list", [], ["name"]),
40
40
 
41
41
  }
42
42
 
@@ -50,7 +50,7 @@ module MasterCard
50
50
  end
51
51
 
52
52
  def self.getOperationMetadata()
53
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
53
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
54
54
  end
55
55
 
56
56
  public
@@ -65,9 +65,9 @@ module MasterCard
65
65
  #@return Array of Products object matching the criteria.
66
66
 
67
67
  if criteria.nil?
68
- return self.execute("95c7e8f2-12df-493f-8f3f-5c818b236bae",Products.new)
68
+ return self.execute("dbe51cd7-867d-4800-a27b-88ae1c68c6a8",Products.new)
69
69
  else
70
- return self.execute("95c7e8f2-12df-493f-8f3f-5c818b236bae",Products.new(criteria))
70
+ return self.execute("dbe51cd7-867d-4800-a27b-88ae1c68c6a8",Products.new(criteria))
71
71
  end
72
72
  end
73
73
 
@@ -36,7 +36,7 @@ module MasterCard
36
36
  #
37
37
 
38
38
  @__store = {
39
- 'a6ff4825-08c8-48a9-9cb4-6d1f55fd29dc' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/programs", "list", [], ["name"]),
39
+ 'a7a98acc-82e0-4928-bd6c-31704fb21a4f' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/programs", "list", [], ["name"]),
40
40
 
41
41
  }
42
42
 
@@ -50,7 +50,7 @@ module MasterCard
50
50
  end
51
51
 
52
52
  def self.getOperationMetadata()
53
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
53
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
54
54
  end
55
55
 
56
56
  public
@@ -65,9 +65,9 @@ module MasterCard
65
65
  #@return Array of Programs object matching the criteria.
66
66
 
67
67
  if criteria.nil?
68
- return self.execute("a6ff4825-08c8-48a9-9cb4-6d1f55fd29dc",Programs.new)
68
+ return self.execute("a7a98acc-82e0-4928-bd6c-31704fb21a4f",Programs.new)
69
69
  else
70
- return self.execute("a6ff4825-08c8-48a9-9cb4-6d1f55fd29dc",Programs.new(criteria))
70
+ return self.execute("a7a98acc-82e0-4928-bd6c-31704fb21a4f",Programs.new(criteria))
71
71
  end
72
72
  end
73
73
 
@@ -24,26 +24,69 @@
24
24
  # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25
25
  # SUCH DAMAGE.
26
26
  #
27
+
28
+ require "mastercard/core/constants"
29
+ require "mastercard/core/config"
30
+
27
31
  module MasterCard
28
32
  module API
29
33
  module McaidAnalytics
30
- class SDKConfig
34
+ class ResourceConfig
35
+ include MasterCard::Core
36
+
37
+ @@instance = nil
31
38
 
32
- private
33
- @@host = nil
39
+ def initialize
40
+ @name = "mcaid-analytics"
41
+ @override = nil
42
+ @host = nil
43
+ @context = nil
44
+ @version = "1.0.1"
45
+
46
+ Config.registerResourceConfig(self)
47
+ currentEnvironment = Config.getEnvironment()
48
+ self.setEnvironment(currentEnvironment)
34
49
 
35
- public
36
- def self.setHost(host)
37
- @@host = host
38
50
  end
39
51
 
40
- def self.getHost()
41
- return @@host
52
+
53
+ def self.instance
54
+ return @@instance
42
55
  end
43
56
 
44
- def self.getVersion()
45
- return "1.0.0"
57
+
58
+ def getName
59
+ return @name
60
+ end
61
+
62
+
63
+ def getHost
64
+ unless @override.nil? || @override == 0
65
+ return @override
66
+ else
67
+ return @host
68
+ end
46
69
  end
70
+
71
+ def getContext
72
+ return @context
73
+ end
74
+
75
+ def getVersion
76
+ return @version
77
+ end
78
+
79
+ def setEnvironment(environmet)
80
+ if Environment::MAPPING.key?(environmet)
81
+ tuple = Environment::MAPPING[environmet]
82
+ @host = tuple[0]
83
+ @context = tuple[1]
84
+ end
85
+ end
86
+
87
+ @@instance = ResourceConfig.new
88
+
89
+ private_class_method :new
47
90
  end
48
91
  end
49
92
  end
@@ -36,7 +36,7 @@ module MasterCard
36
36
  #
37
37
 
38
38
  @__store = {
39
- '50e85606-db0d-4e21-91f5-bce9e34de3b8' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/transactions", "query", [], ["pageOffset","pageLength","programId","startDate","endDate","type","status"]),
39
+ '7cfdf43a-acb3-48eb-8b78-45e25b1c846c' => OperationConfig.new("/labs/proxy/mcaid-api/internal/v1/transactions", "query", [], ["pageOffset","pageLength","programId","startDate","endDate","type","status"]),
40
40
 
41
41
  }
42
42
 
@@ -50,7 +50,7 @@ module MasterCard
50
50
  end
51
51
 
52
52
  def self.getOperationMetadata()
53
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
53
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
54
54
  end
55
55
 
56
56
  public
@@ -67,7 +67,7 @@ module MasterCard
67
67
  #@return Transactions object representing the response.
68
68
  #
69
69
 
70
- return self.execute("50e85606-db0d-4e21-91f5-bce9e34de3b8",Transactions.new(criteria))
70
+ return self.execute("7cfdf43a-acb3-48eb-8b78-45e25b1c846c",Transactions.new(criteria))
71
71
  end
72
72
 
73
73
  end
@@ -1,8 +1,8 @@
1
1
  require 'mastercard_api_core'
2
- require 'mastercard/api/mcaidanalytics/skdconfig'
3
2
  require 'mastercard/api/mcaidanalytics/merchants'
4
3
  require 'mastercard/api/mcaidanalytics/transactions'
5
4
  require 'mastercard/api/mcaidanalytics/programs'
6
5
  require 'mastercard/api/mcaidanalytics/devices'
6
+ require 'mastercard/api/mcaidanalytics/resourceconfig'
7
7
  require 'mastercard/api/mcaidanalytics/cards'
8
8
  require 'mastercard/api/mcaidanalytics/products'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mastercard_mcaidanalytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - MasterCard Worldwide
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-25 00:00:00.000000000 Z
11
+ date: 2017-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mastercard_api_core
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.0
19
+ version: 1.3.0
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.2.0
22
+ version: 1.3.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 1.2.0
29
+ version: 1.3.0
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 1.2.0
32
+ version: 1.3.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: ci_reporter_minitest
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -56,7 +56,7 @@ files:
56
56
  - lib/mastercard/api/mcaidanalytics/merchants.rb
57
57
  - lib/mastercard/api/mcaidanalytics/products.rb
58
58
  - lib/mastercard/api/mcaidanalytics/programs.rb
59
- - lib/mastercard/api/mcaidanalytics/skdconfig.rb
59
+ - lib/mastercard/api/mcaidanalytics/resourceconfig.rb
60
60
  - lib/mastercard/api/mcaidanalytics/transactions.rb
61
61
  - lib/mastercard_mcaidanalytics.rb
62
62
  homepage: https://developer.mastercard.com