mastercard_currencyconversion 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: ae4042d717f41cce237d3ba9d45bbc6027d20e7d
4
+ data.tar.gz: 71fdc858bddf8fa162201c42346e57c95168a910
5
+ SHA512:
6
+ metadata.gz: 045f53bb0accc4f28649d0fb222fbebb9bc071c14272f350f252ce7952d54f7240896f494831cdb42948abc3e18fd6b0ca816099171a71444ef34160d27b92f9
7
+ data.tar.gz: f3cc59e8a3ee913fd75dedb3a907305fa1fee59d675ba4d836f89c2f25f52f85ac20fff4351fecb65e2dbd517d4a85ea1fac43cff16833c995b8dae99f395e87
@@ -0,0 +1,87 @@
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 CurrencyConversion
35
+ class ConversionRate < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ 'ad7574d1-f21a-41db-9b3a-854fed685c54' => OperationConfig.new("/settlement/currencyrate/conversion-rate", "query", [], ["fxDate","transCurr","crdhldBillCurr","bankFee","transAmt"]),
41
+
42
+ }
43
+
44
+ protected
45
+
46
+ def self.getOperationConfig(operationUUID)
47
+ if @__store.key?(operationUUID)
48
+ return @__store[operationUUID]
49
+ end
50
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
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
+
61
+
62
+
63
+
64
+
65
+ def self.query(criteria)
66
+ #
67
+ #Query objects of type ConversionRate by id and optional criteria
68
+ #@param [Dict] criteria
69
+ #@return [ConversionRate] object representing the response.
70
+ #@raise [APIException] an exception from the response status
71
+ #
72
+
73
+ return self.execute("ad7574d1-f21a-41db-9b3a-854fed685c54",ConversionRate.new(criteria))
74
+ end
75
+
76
+
77
+ end
78
+ end
79
+ end
80
+ end
81
+
82
+
83
+
84
+
85
+
86
+
87
+
@@ -0,0 +1,87 @@
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 CurrencyConversion
35
+ class Currencies < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ 'df7fc6bc-f394-458a-ad57-fdbc13e05df2' => OperationConfig.new("/settlement/currencyrate/settlement-currencies", "query", [], []),
41
+
42
+ }
43
+
44
+ protected
45
+
46
+ def self.getOperationConfig(operationUUID)
47
+ if @__store.key?(operationUUID)
48
+ return @__store[operationUUID]
49
+ end
50
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
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
+
61
+
62
+
63
+
64
+
65
+ def self.query(criteria)
66
+ #
67
+ #Query objects of type Currencies by id and optional criteria
68
+ #@param [Dict] criteria
69
+ #@return [Currencies] object representing the response.
70
+ #@raise [APIException] an exception from the response status
71
+ #
72
+
73
+ return self.execute("df7fc6bc-f394-458a-ad57-fdbc13e05df2",Currencies.new(criteria))
74
+ end
75
+
76
+
77
+ end
78
+ end
79
+ end
80
+ end
81
+
82
+
83
+
84
+
85
+
86
+
87
+
@@ -0,0 +1,87 @@
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 CurrencyConversion
35
+ class RateIssued < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ '73f8846b-86e4-4d5b-ba8c-4d9459b1707a' => OperationConfig.new("/settlement/currencyrate/conversion-rate-issued", "query", [], ["date"]),
41
+
42
+ }
43
+
44
+ protected
45
+
46
+ def self.getOperationConfig(operationUUID)
47
+ if @__store.key?(operationUUID)
48
+ return @__store[operationUUID]
49
+ end
50
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
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
+
61
+
62
+
63
+
64
+
65
+ def self.query(criteria)
66
+ #
67
+ #Query objects of type RateIssued by id and optional criteria
68
+ #@param [Dict] criteria
69
+ #@return [RateIssued] object representing the response.
70
+ #@raise [APIException] an exception from the response status
71
+ #
72
+
73
+ return self.execute("73f8846b-86e4-4d5b-ba8c-4d9459b1707a",RateIssued.new(criteria))
74
+ end
75
+
76
+
77
+ end
78
+ end
79
+ end
80
+ end
81
+
82
+
83
+
84
+
85
+
86
+
87
+
@@ -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 CurrencyConversion
34
+ class ResourceConfig
35
+ include MasterCard::Core
36
+
37
+ @@instance = nil
38
+
39
+ def initialize
40
+ @name = "currency-conversion"
41
+ @override = nil
42
+ @host = nil
43
+ @context = nil
44
+ @version = "currency-conversion:1.0.0"
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/currencyconversion/resourceconfig'
4
+
5
+ require 'mastercard/api/currencyconversion/conversionrate'
6
+ require 'mastercard/api/currencyconversion/currencies'
7
+ require 'mastercard/api/currencyconversion/rateissued'
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mastercard_currencyconversion
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: 2017-11-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 CurrencyConversion Description
48
+ email:
49
+ - APISupport@mastercard.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - lib/mastercard/api/currencyconversion/conversionrate.rb
55
+ - lib/mastercard/api/currencyconversion/currencies.rb
56
+ - lib/mastercard/api/currencyconversion/rateissued.rb
57
+ - lib/mastercard/api/currencyconversion/resourceconfig.rb
58
+ - lib/mastercard_currencyconversion.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 CurrencyConversion SDK
83
+ test_files: []