paypal-sdk-buttonmanager 1.96.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +17 -0
- data/README.md +164 -0
- data/Rakefile +14 -0
- data/lib/paypal-sdk/button_manager/api.rb +21 -0
- data/lib/paypal-sdk/button_manager/data_types.rb +5031 -0
- data/lib/paypal-sdk/button_manager/services.rb +168 -0
- data/lib/paypal-sdk/button_manager/version.rb +7 -0
- data/lib/paypal-sdk/button_manager.rb +16 -0
- data/lib/paypal-sdk-buttonmanager.rb +2 -0
- data/spec/button_manager_spec.rb +27 -0
- data/spec/config/cert_key.pem +33 -0
- data/spec/config/paypal.yml +25 -0
- data/spec/spec_helper.rb +6 -0
- metadata +84 -0
@@ -0,0 +1,168 @@
|
|
1
|
+
require 'paypal-sdk-core'
|
2
|
+
require 'paypal-sdk/button_manager/data_types'
|
3
|
+
|
4
|
+
# AUTO GENERATED code for PayPalAPIInterfaceService
|
5
|
+
module PayPal::SDK
|
6
|
+
module ButtonManager
|
7
|
+
|
8
|
+
# Service Version
|
9
|
+
SERVICE_VERSION = "94.0"
|
10
|
+
# Service Name
|
11
|
+
SERVICE_NAME = "PayPalAPIInterfaceService"
|
12
|
+
|
13
|
+
module Services
|
14
|
+
include DataTypes
|
15
|
+
|
16
|
+
|
17
|
+
# Service Call: BMCreateButton
|
18
|
+
# @param BMCreateButtonReq
|
19
|
+
# @return BMCreateButtonResponseType
|
20
|
+
def BMCreateButton(options = {} , http_header = {})
|
21
|
+
request_object = BuildBMCreateButton(options)
|
22
|
+
request_hash = request_object.to_hash
|
23
|
+
response_hash = request("BMCreateButton", request_hash, http_header)
|
24
|
+
BMCreateButtonResponseType.new(response_hash)
|
25
|
+
end
|
26
|
+
alias_method :bm_create_button, :BMCreateButton
|
27
|
+
|
28
|
+
def BuildBMCreateButton(options = {}, &block)
|
29
|
+
klass = BMCreateButtonReq
|
30
|
+
options = klass.new(:BMCreateButtonRequest => options) unless options.is_a?(klass)
|
31
|
+
object = (options.BMCreateButtonRequest ||= {})
|
32
|
+
object.version = SERVICE_VERSION
|
33
|
+
object.instance_eval(&block) if block
|
34
|
+
object
|
35
|
+
end
|
36
|
+
alias_method :build_bm_create_button, :BuildBMCreateButton
|
37
|
+
|
38
|
+
# Service Call: BMUpdateButton
|
39
|
+
# @param BMUpdateButtonReq
|
40
|
+
# @return BMUpdateButtonResponseType
|
41
|
+
def BMUpdateButton(options = {} , http_header = {})
|
42
|
+
request_object = BuildBMUpdateButton(options)
|
43
|
+
request_hash = request_object.to_hash
|
44
|
+
response_hash = request("BMUpdateButton", request_hash, http_header)
|
45
|
+
BMUpdateButtonResponseType.new(response_hash)
|
46
|
+
end
|
47
|
+
alias_method :bm_update_button, :BMUpdateButton
|
48
|
+
|
49
|
+
def BuildBMUpdateButton(options = {}, &block)
|
50
|
+
klass = BMUpdateButtonReq
|
51
|
+
options = klass.new(:BMUpdateButtonRequest => options) unless options.is_a?(klass)
|
52
|
+
object = (options.BMUpdateButtonRequest ||= {})
|
53
|
+
object.version = SERVICE_VERSION
|
54
|
+
object.instance_eval(&block) if block
|
55
|
+
object
|
56
|
+
end
|
57
|
+
alias_method :build_bm_update_button, :BuildBMUpdateButton
|
58
|
+
|
59
|
+
# Service Call: BMManageButtonStatus
|
60
|
+
# @param BMManageButtonStatusReq
|
61
|
+
# @return BMManageButtonStatusResponseType
|
62
|
+
def BMManageButtonStatus(options = {} , http_header = {})
|
63
|
+
request_object = BuildBMManageButtonStatus(options)
|
64
|
+
request_hash = request_object.to_hash
|
65
|
+
response_hash = request("BMManageButtonStatus", request_hash, http_header)
|
66
|
+
BMManageButtonStatusResponseType.new(response_hash)
|
67
|
+
end
|
68
|
+
alias_method :bm_manage_button_status, :BMManageButtonStatus
|
69
|
+
|
70
|
+
def BuildBMManageButtonStatus(options = {}, &block)
|
71
|
+
klass = BMManageButtonStatusReq
|
72
|
+
options = klass.new(:BMManageButtonStatusRequest => options) unless options.is_a?(klass)
|
73
|
+
object = (options.BMManageButtonStatusRequest ||= {})
|
74
|
+
object.version = SERVICE_VERSION
|
75
|
+
object.instance_eval(&block) if block
|
76
|
+
object
|
77
|
+
end
|
78
|
+
alias_method :build_bm_manage_button_status, :BuildBMManageButtonStatus
|
79
|
+
|
80
|
+
# Service Call: BMGetButtonDetails
|
81
|
+
# @param BMGetButtonDetailsReq
|
82
|
+
# @return BMGetButtonDetailsResponseType
|
83
|
+
def BMGetButtonDetails(options = {} , http_header = {})
|
84
|
+
request_object = BuildBMGetButtonDetails(options)
|
85
|
+
request_hash = request_object.to_hash
|
86
|
+
response_hash = request("BMGetButtonDetails", request_hash, http_header)
|
87
|
+
BMGetButtonDetailsResponseType.new(response_hash)
|
88
|
+
end
|
89
|
+
alias_method :bm_get_button_details, :BMGetButtonDetails
|
90
|
+
|
91
|
+
def BuildBMGetButtonDetails(options = {}, &block)
|
92
|
+
klass = BMGetButtonDetailsReq
|
93
|
+
options = klass.new(:BMGetButtonDetailsRequest => options) unless options.is_a?(klass)
|
94
|
+
object = (options.BMGetButtonDetailsRequest ||= {})
|
95
|
+
object.version = SERVICE_VERSION
|
96
|
+
object.instance_eval(&block) if block
|
97
|
+
object
|
98
|
+
end
|
99
|
+
alias_method :build_bm_get_button_details, :BuildBMGetButtonDetails
|
100
|
+
|
101
|
+
# Service Call: BMSetInventory
|
102
|
+
# @param BMSetInventoryReq
|
103
|
+
# @return BMSetInventoryResponseType
|
104
|
+
def BMSetInventory(options = {} , http_header = {})
|
105
|
+
request_object = BuildBMSetInventory(options)
|
106
|
+
request_hash = request_object.to_hash
|
107
|
+
response_hash = request("BMSetInventory", request_hash, http_header)
|
108
|
+
BMSetInventoryResponseType.new(response_hash)
|
109
|
+
end
|
110
|
+
alias_method :bm_set_inventory, :BMSetInventory
|
111
|
+
|
112
|
+
def BuildBMSetInventory(options = {}, &block)
|
113
|
+
klass = BMSetInventoryReq
|
114
|
+
options = klass.new(:BMSetInventoryRequest => options) unless options.is_a?(klass)
|
115
|
+
object = (options.BMSetInventoryRequest ||= {})
|
116
|
+
object.version = SERVICE_VERSION
|
117
|
+
object.instance_eval(&block) if block
|
118
|
+
object
|
119
|
+
end
|
120
|
+
alias_method :build_bm_set_inventory, :BuildBMSetInventory
|
121
|
+
|
122
|
+
# Service Call: BMGetInventory
|
123
|
+
# @param BMGetInventoryReq
|
124
|
+
# @return BMGetInventoryResponseType
|
125
|
+
def BMGetInventory(options = {} , http_header = {})
|
126
|
+
request_object = BuildBMGetInventory(options)
|
127
|
+
request_hash = request_object.to_hash
|
128
|
+
response_hash = request("BMGetInventory", request_hash, http_header)
|
129
|
+
BMGetInventoryResponseType.new(response_hash)
|
130
|
+
end
|
131
|
+
alias_method :bm_get_inventory, :BMGetInventory
|
132
|
+
|
133
|
+
def BuildBMGetInventory(options = {}, &block)
|
134
|
+
klass = BMGetInventoryReq
|
135
|
+
options = klass.new(:BMGetInventoryRequest => options) unless options.is_a?(klass)
|
136
|
+
object = (options.BMGetInventoryRequest ||= {})
|
137
|
+
object.version = SERVICE_VERSION
|
138
|
+
object.instance_eval(&block) if block
|
139
|
+
object
|
140
|
+
end
|
141
|
+
alias_method :build_bm_get_inventory, :BuildBMGetInventory
|
142
|
+
|
143
|
+
# Service Call: BMButtonSearch
|
144
|
+
# @param BMButtonSearchReq
|
145
|
+
# @return BMButtonSearchResponseType
|
146
|
+
def BMButtonSearch(options = {} , http_header = {})
|
147
|
+
request_object = BuildBMButtonSearch(options)
|
148
|
+
request_hash = request_object.to_hash
|
149
|
+
response_hash = request("BMButtonSearch", request_hash, http_header)
|
150
|
+
BMButtonSearchResponseType.new(response_hash)
|
151
|
+
end
|
152
|
+
alias_method :bm_button_search, :BMButtonSearch
|
153
|
+
|
154
|
+
def BuildBMButtonSearch(options = {}, &block)
|
155
|
+
klass = BMButtonSearchReq
|
156
|
+
options = klass.new(:BMButtonSearchRequest => options) unless options.is_a?(klass)
|
157
|
+
object = (options.BMButtonSearchRequest ||= {})
|
158
|
+
object.version = SERVICE_VERSION
|
159
|
+
object.instance_eval(&block) if block
|
160
|
+
object
|
161
|
+
end
|
162
|
+
alias_method :build_bm_button_search, :BuildBMButtonSearch
|
163
|
+
|
164
|
+
|
165
|
+
end
|
166
|
+
|
167
|
+
end
|
168
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'paypal-sdk-core'
|
2
|
+
|
3
|
+
module PayPal
|
4
|
+
module SDK
|
5
|
+
module ButtonManager
|
6
|
+
autoload :VERSION, "paypal-sdk/button_manager/version"
|
7
|
+
autoload :Services, "paypal-sdk/button_manager/services"
|
8
|
+
autoload :DataTypes, "paypal-sdk/button_manager/data_types"
|
9
|
+
autoload :API, "paypal-sdk/button_manager/api"
|
10
|
+
|
11
|
+
def self.new(*args)
|
12
|
+
API.new(*args)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "ButtonManager" do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@client = PayPal::SDK::ButtonManager::API.new
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "Services" do
|
10
|
+
PayPal::SDK::ButtonManager::Services.instance_methods.select{|s| s =~ /^[A-Z]/ and s !~ /^Build/ }.each do |service_method|
|
11
|
+
it "make empty request to #{service_method}" do
|
12
|
+
response = @client.send(service_method, {})
|
13
|
+
response.ack.should_not be_nil
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "DataTypes" do
|
19
|
+
PayPal::SDK::ButtonManager::DataTypes.constants.each do |const_name|
|
20
|
+
it "create object for #{const_name}" do
|
21
|
+
klass = PayPal::SDK::ButtonManager::DataTypes.const_get(const_name)
|
22
|
+
klass.new.should be_a klass
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIICXAIBAAKBgQCx/rJhKDRYhs9WZj66FA+HidsrK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1UEBxMIU2FuIEpvc2UxFTATBgNV
|
20
|
+
BAoTDFBheVBhbCwgSW5jLjEWMBQGA1UECxQNc2FuZGJveF9jZXJ0czEbMBkGA1UE
|
21
|
+
AxQSc2FuZGJveF9jYW1lcmNoYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwu
|
22
|
+
Y29tMB4XDTA5MTAxNTA2Mzg1N1oXDTE5MTAxMzA2Mzg1N1owgYAxLTArBgNVBAMU
|
23
|
+
JHBsYXRmb18xMjU1MTcwNjk0X2Jpel9hcGkxLmdtYWlsLmNvbTEiMCAGA1UEChMZ
|
24
|
+
cGxhdGZvcm0gc2RrJ3MgVGVzdCBTdG9yZTERMA8GA1UEBxMIU2FuIEpvc2UxCzAJ
|
25
|
+
BgNVBAgTAkNBMQswCQYDVQQGEwJVUzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
|
26
|
+
gYEAsf6yYSg0WIbPVmY+uhQPh4nbKysL3qd4PmDW5tX15o3INqxJgpKu9fhbcPa8
|
27
|
+
dFM+75oOr3LAElIDsnjRu5lQdUrF3Oo/iQM2bJqc8RyNECpvpwTU0jgKeTVp+jWU
|
28
|
+
H7twTQCfzKJP4i92ptg1l1enVO+CeuqwacCCX87PZJsPGRsCAwEAAaMNMAswCQYD
|
29
|
+
VR0TBAIwADANBgkqhkiG9w0BAQUFAAOBgQCgH3kwXMJtcAaCBQLKz5TGFogJp/C3
|
30
|
+
06MvjYzdbDrx9Rjf/252UhD8dMPUP5FhU1KXduL+KIEYawPbDQ9+lV58JgM12R0p
|
31
|
+
EhCODDI/lDvzbfxUnYgkJ5cnFhTZpcAqVzWuinUnG8jAL9XKiEyu/C73ePMPWPbt
|
32
|
+
otoWi+Tk828Qlw==
|
33
|
+
-----END CERTIFICATE-----
|
@@ -0,0 +1,25 @@
|
|
1
|
+
test: &default
|
2
|
+
username: jb-us-seller_api1.paypal.com
|
3
|
+
password: WX4WTU3S8MY44S7F
|
4
|
+
signature: AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy
|
5
|
+
app_id: APP-80W284485P519543T
|
6
|
+
http_timeout: 30
|
7
|
+
mode: sandbox
|
8
|
+
redirect_url: "https://www.sandbox.paypal.com/webscr&cmd="
|
9
|
+
dev_central_url: "https://developer.paypal.com"
|
10
|
+
development:
|
11
|
+
<<: *default
|
12
|
+
|
13
|
+
with_certificate:
|
14
|
+
<<: *default
|
15
|
+
username: platfo_1255170694_biz_api1.gmail.com
|
16
|
+
password: 2DPPKUPKB7DQLXNR
|
17
|
+
signature:
|
18
|
+
cert_path: "spec/config/cert_key.pem"
|
19
|
+
app_id: APP-80W284485P519543T
|
20
|
+
soap_end_point: "https://api.sandbox.paypal.com/2.0/"
|
21
|
+
|
22
|
+
with_oauth_token:
|
23
|
+
<<: *default
|
24
|
+
token: H2kLxjm9lCxQdnOYxkH29I53TpZyIXez4GtHhAVGpiU3DiVTz5eNPQ
|
25
|
+
token_secret: MnZ-iPdDqGLEfQIuTIfUN4uK9lU
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: paypal-sdk-buttonmanager
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.96.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- PayPal
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-12-11 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: paypal-sdk-core
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.1.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.1.0
|
30
|
+
description: ButtonManager SDK
|
31
|
+
email:
|
32
|
+
- DL-PP-Platform-Ruby-SDK@ebay.com
|
33
|
+
executables: []
|
34
|
+
extensions: []
|
35
|
+
extra_rdoc_files: []
|
36
|
+
files:
|
37
|
+
- spec/button_manager_spec.rb
|
38
|
+
- spec/spec_helper.rb
|
39
|
+
- spec/config/paypal.yml
|
40
|
+
- spec/config/cert_key.pem
|
41
|
+
- lib/paypal-sdk/button_manager.rb
|
42
|
+
- lib/paypal-sdk/button_manager/services.rb
|
43
|
+
- lib/paypal-sdk/button_manager/api.rb
|
44
|
+
- lib/paypal-sdk/button_manager/version.rb
|
45
|
+
- lib/paypal-sdk/button_manager/data_types.rb
|
46
|
+
- lib/paypal-sdk-buttonmanager.rb
|
47
|
+
- Rakefile
|
48
|
+
- README.md
|
49
|
+
- Gemfile
|
50
|
+
homepage: https://www.x.com/
|
51
|
+
licenses: []
|
52
|
+
post_install_message:
|
53
|
+
rdoc_options: []
|
54
|
+
require_paths:
|
55
|
+
- lib
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
hash: 778181425
|
65
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
hash: 778181425
|
74
|
+
requirements: []
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 1.8.24
|
77
|
+
signing_key:
|
78
|
+
specification_version: 3
|
79
|
+
summary: ButtonManager SDK
|
80
|
+
test_files:
|
81
|
+
- spec/button_manager_spec.rb
|
82
|
+
- spec/spec_helper.rb
|
83
|
+
- spec/config/paypal.yml
|
84
|
+
- spec/config/cert_key.pem
|