mastercard_blockchainb2bxb 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 50c52bc305ec329a427631b333442f218f0c561b
4
+ data.tar.gz: 62858dbf9fac5d67beab75d07c87854b64d5c9c0
5
+ SHA512:
6
+ metadata.gz: 0acd790e28d0d4b86e7006e8282b7528f914000b282d573bcabc02f301d7620157ed554513be55fb361ee9fb53e0cc06e824679375be4d3e09e7ac9b89c21e64
7
+ data.tar.gz: 04e80b137a29517f56638a276e66844a9d22e3d508ca79536fb403e74ac1986bbe597bd47244b1f483981f6c712d4637ba30b15bc2cfca4ec29556a656a54a2c
@@ -0,0 +1,86 @@
1
+ #
2
+ # Copyright (c) 2016 MasterCard International Incorporated
3
+ # All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without modification, are
6
+ # permitted provided that the following conditions are met:
7
+ #
8
+ # Redistributions of source code must retain the above copyright notice, this list of
9
+ # conditions and the following disclaimer.
10
+ # Redistributions in binary form must reproduce the above copyright notice, this list of
11
+ # conditions and the following disclaimer in the documentation and/or other materials
12
+ # provided with the distribution.
13
+ # Neither the name of the MasterCard International Incorporated nor the names of its
14
+ # contributors may be used to endorse or promote products derived from this software
15
+ # without specific prior written permission.
16
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
17
+ # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
+ # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19
+ # SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20
+ # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21
+ # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22
+ # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
+ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24
+ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25
+ # SUCH DAMAGE.
26
+ #
27
+
28
+
29
+ require "mastercard/core/model"
30
+ require "mastercard/core/baseobject"
31
+
32
+ module MasterCard
33
+ module API
34
+ module BlockchainB2bxb
35
+ class Claims < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ '65af2a46-9237-4751-9f8f-6a1a63fb63a9' => OperationConfig.new("/labs/proxy/blockchain/b2bxb/api/v1/claims", "create", [], []),
41
+
42
+ }
43
+
44
+ protected
45
+
46
+ def self.getOperationConfig(uuid)
47
+ if @__store.key?(uuid)
48
+ return @__store[uuid]
49
+ end
50
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
51
+ end
52
+
53
+ def self.getOperationMetadata()
54
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
55
+ end
56
+
57
+ public
58
+
59
+
60
+ def self.create(mapObj)
61
+ #
62
+ #Creates object of type Claims
63
+ #
64
+ #@param Dict mapObj, containing the required parameters to create a new object
65
+ #@return [Claims] of the response of created instance.
66
+ #@raise [APIException] an exception from the response status
67
+ return self.execute("65af2a46-9237-4751-9f8f-6a1a63fb63a9", Claims.new(mapObj))
68
+ end
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+ end
77
+ end
78
+ end
79
+ end
80
+
81
+
82
+
83
+
84
+
85
+
86
+
@@ -0,0 +1,120 @@
1
+ #
2
+ # Copyright (c) 2016 MasterCard International Incorporated
3
+ # All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without modification, are
6
+ # permitted provided that the following conditions are met:
7
+ #
8
+ # Redistributions of source code must retain the above copyright notice, this list of
9
+ # conditions and the following disclaimer.
10
+ # Redistributions in binary form must reproduce the above copyright notice, this list of
11
+ # conditions and the following disclaimer in the documentation and/or other materials
12
+ # provided with the distribution.
13
+ # Neither the name of the MasterCard International Incorporated nor the names of its
14
+ # contributors may be used to endorse or promote products derived from this software
15
+ # without specific prior written permission.
16
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
17
+ # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
+ # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19
+ # SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20
+ # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21
+ # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22
+ # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
+ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24
+ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25
+ # SUCH DAMAGE.
26
+ #
27
+
28
+
29
+ require "mastercard/core/model"
30
+ require "mastercard/core/baseobject"
31
+
32
+ module MasterCard
33
+ module API
34
+ module BlockchainB2bxb
35
+ class FX < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ '20d25fe5-31bb-4ffb-b095-f33185db3969' => OperationConfig.new("/labs/proxy/blockchain/b2bxb/api/v1/fx", "list", [], []),
41
+ '3c685e1d-844b-475f-8277-0d0471b76133' => OperationConfig.new("/labs/proxy/blockchain/b2bxb/api/v1/fx/{id}", "read", [], []),
42
+
43
+ }
44
+
45
+ protected
46
+
47
+ def self.getOperationConfig(uuid)
48
+ if @__store.key?(uuid)
49
+ return @__store[uuid]
50
+ end
51
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
52
+ end
53
+
54
+ def self.getOperationMetadata()
55
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
56
+ end
57
+
58
+ public
59
+
60
+
61
+
62
+
63
+ def self.listByCriteria(criteria = nil)
64
+ #
65
+ #List objects of type FX
66
+ #
67
+ #@param [Dict] criteria
68
+ #@return Array [FX] object matching the criteria.
69
+ #@raise [APIException] an exception from the response status
70
+
71
+ if criteria.nil?
72
+ return self.execute("20d25fe5-31bb-4ffb-b095-f33185db3969",FX.new)
73
+ else
74
+ return self.execute("20d25fe5-31bb-4ffb-b095-f33185db3969",FX.new(criteria))
75
+ end
76
+ end
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+ def self.read(id, criteria = nil)
86
+ #
87
+ #Returns objects of type FX by id and optional criteria
88
+ #@param [String] id
89
+ #@param [Dict] criteria
90
+ #@return [FX] object representing the response
91
+ #@raise [APIException] an exception from the response status
92
+
93
+ mapObj = FX.new
94
+ if !(id.nil? || id.to_s.empty?)
95
+ mapObj.set("id", id)
96
+ end
97
+ if !criteria.nil?
98
+ if criteria.instance_of? RequestMap
99
+ mapObj.setAll(criteria.getObject())
100
+ else
101
+ mapObj.setAll(criteria)
102
+ end
103
+ end
104
+
105
+ return self.execute("3c685e1d-844b-475f-8277-0d0471b76133",FX.new(mapObj))
106
+ end
107
+
108
+
109
+
110
+ end
111
+ end
112
+ end
113
+ end
114
+
115
+
116
+
117
+
118
+
119
+
120
+
@@ -0,0 +1,137 @@
1
+ #
2
+ # Copyright (c) 2016 MasterCard International Incorporated
3
+ # All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without modification, are
6
+ # permitted provided that the following conditions are met:
7
+ #
8
+ # Redistributions of source code must retain the above copyright notice, this list of
9
+ # conditions and the following disclaimer.
10
+ # Redistributions in binary form must reproduce the above copyright notice, this list of
11
+ # conditions and the following disclaimer in the documentation and/or other materials
12
+ # provided with the distribution.
13
+ # Neither the name of the MasterCard International Incorporated nor the names of its
14
+ # contributors may be used to endorse or promote products derived from this software
15
+ # without specific prior written permission.
16
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
17
+ # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
+ # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19
+ # SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20
+ # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21
+ # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22
+ # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
+ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24
+ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25
+ # SUCH DAMAGE.
26
+ #
27
+
28
+
29
+ require "mastercard/core/model"
30
+ require "mastercard/core/baseobject"
31
+
32
+ module MasterCard
33
+ module API
34
+ module BlockchainB2bxb
35
+ class Payments < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ '15c64161-55c7-4a0f-9d8a-4cb456c9b3a1' => OperationConfig.new("/labs/proxy/blockchain/b2bxb/api/v1/payments", "list", [], ["status"]),
41
+ 'df1eeeb3-c824-4bce-ba16-876fac38742e' => OperationConfig.new("/labs/proxy/blockchain/b2bxb/api/v1/payments", "create", [], []),
42
+ '97693c79-55c5-4cba-85a4-1244c5f4536a' => OperationConfig.new("/labs/proxy/blockchain/b2bxb/api/v1/payments/{reference}", "read", [], []),
43
+
44
+ }
45
+
46
+ protected
47
+
48
+ def self.getOperationConfig(uuid)
49
+ if @__store.key?(uuid)
50
+ return @__store[uuid]
51
+ end
52
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
53
+ end
54
+
55
+ def self.getOperationMetadata()
56
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
57
+ end
58
+
59
+ public
60
+
61
+
62
+
63
+
64
+ def self.listByCriteria(criteria = nil)
65
+ #
66
+ #List objects of type Payments
67
+ #
68
+ #@param [Dict] criteria
69
+ #@return Array [Payments] object matching the criteria.
70
+ #@raise [APIException] an exception from the response status
71
+
72
+ if criteria.nil?
73
+ return self.execute("15c64161-55c7-4a0f-9d8a-4cb456c9b3a1",Payments.new)
74
+ else
75
+ return self.execute("15c64161-55c7-4a0f-9d8a-4cb456c9b3a1",Payments.new(criteria))
76
+ end
77
+ end
78
+
79
+
80
+
81
+
82
+ def self.create(mapObj)
83
+ #
84
+ #Creates object of type Payments
85
+ #
86
+ #@param Dict mapObj, containing the required parameters to create a new object
87
+ #@return [Payments] of the response of created instance.
88
+ #@raise [APIException] an exception from the response status
89
+ return self.execute("df1eeeb3-c824-4bce-ba16-876fac38742e", Payments.new(mapObj))
90
+ end
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+ def self.read(id, criteria = nil)
103
+ #
104
+ #Returns objects of type Payments by id and optional criteria
105
+ #@param [String] id
106
+ #@param [Dict] criteria
107
+ #@return [Payments] object representing the response
108
+ #@raise [APIException] an exception from the response status
109
+
110
+ mapObj = Payments.new
111
+ if !(id.nil? || id.to_s.empty?)
112
+ mapObj.set("id", id)
113
+ end
114
+ if !criteria.nil?
115
+ if criteria.instance_of? RequestMap
116
+ mapObj.setAll(criteria.getObject())
117
+ else
118
+ mapObj.setAll(criteria)
119
+ end
120
+ end
121
+
122
+ return self.execute("97693c79-55c5-4cba-85a4-1244c5f4536a",Payments.new(mapObj))
123
+ end
124
+
125
+
126
+
127
+ end
128
+ end
129
+ end
130
+ end
131
+
132
+
133
+
134
+
135
+
136
+
137
+
@@ -0,0 +1,103 @@
1
+ #
2
+ # Copyright (c) 2016 MasterCard International Incorporated
3
+ # All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without modification, are
6
+ # permitted provided that the following conditions are met:
7
+ #
8
+ # Redistributions of source code must retain the above copyright notice, this list of
9
+ # conditions and the following disclaimer.
10
+ # Redistributions in binary form must reproduce the above copyright notice, this list of
11
+ # conditions and the following disclaimer in the documentation and/or other materials
12
+ # provided with the distribution.
13
+ # Neither the name of the MasterCard International Incorporated nor the names of its
14
+ # contributors may be used to endorse or promote products derived from this software
15
+ # without specific prior written permission.
16
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
17
+ # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
+ # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19
+ # SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20
+ # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21
+ # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22
+ # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
+ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24
+ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25
+ # SUCH DAMAGE.
26
+ #
27
+
28
+ require "mastercard/core/constants"
29
+ require "mastercard/core/config"
30
+
31
+ module MasterCard
32
+ module API
33
+ module BlockchainB2bxb
34
+ class ResourceConfig
35
+ include MasterCard::Core
36
+
37
+ @@instance = nil
38
+
39
+ def initialize
40
+ @name = "blockchain-b2bxb"
41
+ @override = nil
42
+ @host = nil
43
+ @context = nil
44
+ @version = "blockchain-b2bxb:0.0.1"
45
+ @jsonNative = false
46
+
47
+ Config.registerResourceConfig(self)
48
+ currentEnvironment = Config.getEnvironment()
49
+ self.setEnvironment(currentEnvironment)
50
+
51
+ end
52
+
53
+
54
+ def self.instance
55
+ return @@instance
56
+ end
57
+
58
+
59
+ def getName
60
+ return @name
61
+ end
62
+
63
+
64
+ def getHost
65
+ unless @override.nil? || @override == 0
66
+ return @override
67
+ else
68
+ return @host
69
+ end
70
+ end
71
+
72
+ def getContext
73
+ return @context
74
+ end
75
+
76
+ def getVersion
77
+ return @version
78
+ end
79
+
80
+ def getJsonNative
81
+ return @jsonNative
82
+ end
83
+
84
+ def setEnvironment(environmet)
85
+ if Environment::MAPPING.key?(environmet)
86
+ tuple = Environment::MAPPING[environmet]
87
+ @host = tuple[0]
88
+ @context = tuple[1]
89
+ end
90
+ end
91
+
92
+ def setCustomEnvironment(host,context)
93
+ @host = host
94
+ @context = context
95
+ end
96
+
97
+ @@instance = ResourceConfig.new
98
+
99
+ private_class_method :new
100
+ end
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,7 @@
1
+ require 'mastercard_api_core'
2
+
3
+ require 'mastercard/api/blockchainb2bxb/resourceconfig'
4
+
5
+ require 'mastercard/api/blockchainb2bxb/claims'
6
+ require 'mastercard/api/blockchainb2bxb/fx'
7
+ require 'mastercard/api/blockchainb2bxb/payments'
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mastercard_blockchainb2bxb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - MasterCard Worldwide
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-09-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: mastercard_api_core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.4.0
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.4.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: 1.4.0
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.4.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: ci_reporter_minitest
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ description: MasterCard BlockchainB2bxb Description
48
+ email:
49
+ - APISupport@mastercard.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - lib/mastercard/api/blockchainb2bxb/claims.rb
55
+ - lib/mastercard/api/blockchainb2bxb/fx.rb
56
+ - lib/mastercard/api/blockchainb2bxb/payments.rb
57
+ - lib/mastercard/api/blockchainb2bxb/resourceconfig.rb
58
+ - lib/mastercard_blockchainb2bxb.rb
59
+ homepage: https://developer.mastercard.com
60
+ licenses:
61
+ - BSD-2-Clause
62
+ metadata: {}
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project:
79
+ rubygems_version: 2.5.1
80
+ signing_key:
81
+ specification_version: 4
82
+ summary: MasterCard BlockchainB2bxb SDK
83
+ test_files: []