mastercard_p2m 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: 1c3b7950a14ca3e8d14d6ba66c3393a48adfc441
|
4
|
+
data.tar.gz: 2f8cd135de62790a86276c86a2b164e00a2327a8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f364e37ab7fced8b6788a378e1010001e81596688c70955b8896413c81b1ddec460e20f2516b5fe22e4a7b32f4c64591329b43905aae0734c748e4d03c042662
|
7
|
+
data.tar.gz: 0715f855537212d45bbdaf4e4e9f8bcecf9db7db86e312f97a7b71852c37daba71d18b51e401bd74685898f0b01907b2a392550df4f5e79ec8c36b48096b1785
|
@@ -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 P2m
|
35
|
+
class MerchantPaymentTransfer < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'f6347707-2495-47ad-ac89-97c342dabd04' => OperationConfig.new("/send/v1/partners/{partnerId}/merchant/transfers/payment", "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 MerchantPaymentTransfer
|
63
|
+
#
|
64
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
65
|
+
#@return [MerchantPaymentTransfer] of the response of created instance.
|
66
|
+
#@raise [APIException] an exception from the response status
|
67
|
+
return self.execute("f6347707-2495-47ad-ac89-97c342dabd04", MerchantPaymentTransfer.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,117 @@
|
|
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 P2m
|
35
|
+
class MerchantTransfer < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'3e96fa85-fb5e-46da-b145-13364df01fb3' => OperationConfig.new("/send/v1/partners/{partnerId}/merchant/transfers/{transferId}", "read", [], []),
|
41
|
+
'96f05a15-22f3-43d1-9bc3-b0f8768c94f0' => OperationConfig.new("/send/v1/partners/{partnerId}/merchant/transfers", "query", [], ["ref"]),
|
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
|
+
|
64
|
+
|
65
|
+
def self.readByID(id, criteria = nil)
|
66
|
+
#
|
67
|
+
#Returns objects of type MerchantTransfer by id and optional criteria
|
68
|
+
#@param [String] id
|
69
|
+
#@param [Dict] criteria
|
70
|
+
#@return [MerchantTransfer] object representing the response
|
71
|
+
#@raise [APIException] an exception from the response status
|
72
|
+
|
73
|
+
mapObj = MerchantTransfer.new
|
74
|
+
if !(id.nil? || id.to_s.empty?)
|
75
|
+
mapObj.set("id", id)
|
76
|
+
end
|
77
|
+
if !criteria.nil?
|
78
|
+
if criteria.instance_of? RequestMap
|
79
|
+
mapObj.setAll(criteria.getObject())
|
80
|
+
else
|
81
|
+
mapObj.setAll(criteria)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
return self.execute("3e96fa85-fb5e-46da-b145-13364df01fb3",MerchantTransfer.new(mapObj))
|
86
|
+
end
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
def self.readByReference(criteria)
|
96
|
+
#
|
97
|
+
#Query objects of type MerchantTransfer by id and optional criteria
|
98
|
+
#@param [Dict] criteria
|
99
|
+
#@return [MerchantTransfer] object representing the response.
|
100
|
+
#@raise [APIException] an exception from the response status
|
101
|
+
#
|
102
|
+
|
103
|
+
return self.execute("96f05a15-22f3-43d1-9bc3-b0f8768c94f0",MerchantTransfer.new(criteria))
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
@@ -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 P2m
|
34
|
+
class ResourceConfig
|
35
|
+
include MasterCard::Core
|
36
|
+
|
37
|
+
@@instance = nil
|
38
|
+
|
39
|
+
def initialize
|
40
|
+
@name = "p2m"
|
41
|
+
@override = nil
|
42
|
+
@host = nil
|
43
|
+
@context = nil
|
44
|
+
@version = "p2m:1.0.0"
|
45
|
+
@jsonNative = true
|
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
|
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mastercard_p2m
|
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-08-16 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 P2m Description
|
48
|
+
email:
|
49
|
+
- APISupport@mastercard.com
|
50
|
+
executables: []
|
51
|
+
extensions: []
|
52
|
+
extra_rdoc_files: []
|
53
|
+
files:
|
54
|
+
- lib/mastercard/api/p2m/merchantpaymenttransfer.rb
|
55
|
+
- lib/mastercard/api/p2m/merchanttransfer.rb
|
56
|
+
- lib/mastercard/api/p2m/resourceconfig.rb
|
57
|
+
- lib/mastercard_p2m.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 P2m SDK
|
82
|
+
test_files: []
|