mastercard_vending 1.0.0

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: dfdf1e7c2300f10c9bf3614ac67bf0d9c174760f
4
+ data.tar.gz: bed492156f4a3c01c29e65be28f7b10342aa609b
5
+ SHA512:
6
+ metadata.gz: 37c0c575c3f56b7b321a9fdeea54d3609256412308dcab71a894f706504a70c8c66e2afbd8fc87fadd3d49541cda89fa50fce601e51f449088bef90f4e8e3126
7
+ data.tar.gz: e3114b2b2c12b6f12fdb01e8ed1eeebd967e132254954133be33c6693520eaab707e2980fba6ba7b94e1c445148871b0f27a91997d988f57d79147a97386c792
@@ -0,0 +1,99 @@
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
+
31
+ module MasterCard
32
+ module API
33
+ module Vending
34
+ class Approval < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
+ #
37
+
38
+ @__store = {
39
+ 'd9bddc17-ac45-4964-b983-dfeb359b9a87' => OperationConfig.new("/mtf/labs/proxy/vending/v1/approval", "create", [], []),
40
+ '3d1ec5bd-5416-453f-b1dd-db27686b1070' => OperationConfig.new("/mtf/labs/proxy/vending/v1/approval/{id}", "update", [], []),
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(SDKConfig.getVersion(), SDKConfig.getHost())
55
+ end
56
+
57
+ public
58
+
59
+ def self.create(mapObj)
60
+ #
61
+ #Creates object of type Approval
62
+ #
63
+ #@param Dict mapObj, containing the required parameters to create a new object
64
+ #@return Approval of the response of created instance.
65
+ #
66
+ return self.execute("d9bddc17-ac45-4964-b983-dfeb359b9a87", Approval.new(mapObj))
67
+ end
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+ def update
76
+ #
77
+ #Updates an object of type Approval
78
+ #
79
+ #@return Approval object representing the response.
80
+ #
81
+ return self.class.execute("3d1ec5bd-5416-453f-b1dd-db27686b1070",self)
82
+ end
83
+
84
+
85
+
86
+
87
+
88
+
89
+ end
90
+ end
91
+ end
92
+ end
93
+
94
+
95
+
96
+
97
+
98
+
99
+
@@ -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
+
31
+ module MasterCard
32
+ module API
33
+ module Vending
34
+ class Machine < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
+ #
37
+
38
+ @__store = {
39
+ '211e8456-65f7-442b-a00a-28f730aa6a9f' => OperationConfig.new("/mtf/labs/proxy/vending/v1/machine/nearby", "list", [], ["latitude","longitude"]),
40
+
41
+ }
42
+
43
+ protected
44
+
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
48
+ end
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
50
+ end
51
+
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
54
+ end
55
+
56
+ public
57
+
58
+
59
+
60
+ def self.listByCriteria(criteria = nil)
61
+ #
62
+ #List objects of type Machine
63
+ #
64
+ #@param Dict criteria
65
+ #@return Array of Machine object matching the criteria.
66
+
67
+ if criteria.nil?
68
+ return self.execute("211e8456-65f7-442b-a00a-28f730aa6a9f",Machine.new)
69
+ else
70
+ return self.execute("211e8456-65f7-442b-a00a-28f730aa6a9f",Machine.new(criteria))
71
+ end
72
+ end
73
+
74
+
75
+
76
+ end
77
+ end
78
+ end
79
+ end
80
+
81
+
82
+
83
+
84
+
85
+
86
+
@@ -0,0 +1,50 @@
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
+ module MasterCard
28
+ module API
29
+ module Vending
30
+ class SDKConfig
31
+
32
+ private
33
+ @@host = nil
34
+
35
+ public
36
+ def self.setHost(host)
37
+ @@host = host
38
+ end
39
+
40
+ def self.getHost()
41
+ return @@host
42
+ end
43
+
44
+ def self.getVersion()
45
+ return "1.0.0"
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,4 @@
1
+ require 'mastercard_api_core'
2
+ require 'mastercard/api/vending/skdconfig'
3
+ require 'mastercard/api/vending/machine'
4
+ require 'mastercard/api/vending/approval'
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mastercard_vending
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - MasterCard Worldwide
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-10-21 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.2.0
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.2.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.2.0
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.2.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 Vending Description
48
+ email:
49
+ - APISupport@mastercard.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - lib/mastercard/api/vending/approval.rb
55
+ - lib/mastercard/api/vending/machine.rb
56
+ - lib/mastercard/api/vending/skdconfig.rb
57
+ - lib/mastercard_vending.rb
58
+ homepage: https://developer.mastercard.com
59
+ licenses:
60
+ - BSD-2-Clause
61
+ metadata: {}
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.5.1
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: MasterCard Vending SDK
82
+ test_files: []