paypal-sdk-invoice 1.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,211 @@
1
+ require 'paypal-sdk-core'
2
+ require 'paypal-sdk/invoice/data_types'
3
+
4
+ # AUTO GENERATED code for Invoice
5
+ module PayPal::SDK
6
+ module Invoice
7
+
8
+ # Service Version
9
+ SERVICE_VERSION = "1.6.0"
10
+ # Service Name
11
+ SERVICE_NAME = "Invoice"
12
+
13
+ module Services
14
+ include DataTypes
15
+
16
+
17
+ # Service Call: CreateInvoice
18
+ # @param CreateInvoiceRequest
19
+ # @return CreateInvoiceResponse
20
+ def CreateInvoice(options = {} , http_header = {})
21
+ request_object = BuildCreateInvoice(options)
22
+ request_hash = request_object.to_hash
23
+ response_hash = request("CreateInvoice", request_hash, http_header)
24
+ CreateInvoiceResponse.new(response_hash)
25
+ end
26
+ alias_method :create_invoice, :CreateInvoice
27
+
28
+ def BuildCreateInvoice(options = {}, &block)
29
+ klass = CreateInvoiceRequest
30
+ object = options.is_a?(klass) ? options : klass.new(options || {})
31
+ object.instance_eval(&block) if block
32
+ object
33
+ end
34
+ alias_method :build_create_invoice, :BuildCreateInvoice
35
+
36
+ # Service Call: SendInvoice
37
+ # @param SendInvoiceRequest
38
+ # @return SendInvoiceResponse
39
+ def SendInvoice(options = {} , http_header = {})
40
+ request_object = BuildSendInvoice(options)
41
+ request_hash = request_object.to_hash
42
+ response_hash = request("SendInvoice", request_hash, http_header)
43
+ SendInvoiceResponse.new(response_hash)
44
+ end
45
+ alias_method :send_invoice, :SendInvoice
46
+
47
+ def BuildSendInvoice(options = {}, &block)
48
+ klass = SendInvoiceRequest
49
+ object = options.is_a?(klass) ? options : klass.new(options || {})
50
+ object.instance_eval(&block) if block
51
+ object
52
+ end
53
+ alias_method :build_send_invoice, :BuildSendInvoice
54
+
55
+ # Service Call: CreateAndSendInvoice
56
+ # @param CreateAndSendInvoiceRequest
57
+ # @return CreateAndSendInvoiceResponse
58
+ def CreateAndSendInvoice(options = {} , http_header = {})
59
+ request_object = BuildCreateAndSendInvoice(options)
60
+ request_hash = request_object.to_hash
61
+ response_hash = request("CreateAndSendInvoice", request_hash, http_header)
62
+ CreateAndSendInvoiceResponse.new(response_hash)
63
+ end
64
+ alias_method :create_and_send_invoice, :CreateAndSendInvoice
65
+
66
+ def BuildCreateAndSendInvoice(options = {}, &block)
67
+ klass = CreateAndSendInvoiceRequest
68
+ object = options.is_a?(klass) ? options : klass.new(options || {})
69
+ object.instance_eval(&block) if block
70
+ object
71
+ end
72
+ alias_method :build_create_and_send_invoice, :BuildCreateAndSendInvoice
73
+
74
+ # Service Call: UpdateInvoice
75
+ # @param UpdateInvoiceRequest
76
+ # @return UpdateInvoiceResponse
77
+ def UpdateInvoice(options = {} , http_header = {})
78
+ request_object = BuildUpdateInvoice(options)
79
+ request_hash = request_object.to_hash
80
+ response_hash = request("UpdateInvoice", request_hash, http_header)
81
+ UpdateInvoiceResponse.new(response_hash)
82
+ end
83
+ alias_method :update_invoice, :UpdateInvoice
84
+
85
+ def BuildUpdateInvoice(options = {}, &block)
86
+ klass = UpdateInvoiceRequest
87
+ object = options.is_a?(klass) ? options : klass.new(options || {})
88
+ object.instance_eval(&block) if block
89
+ object
90
+ end
91
+ alias_method :build_update_invoice, :BuildUpdateInvoice
92
+
93
+ # Service Call: GetInvoiceDetails
94
+ # @param GetInvoiceDetailsRequest
95
+ # @return GetInvoiceDetailsResponse
96
+ def GetInvoiceDetails(options = {} , http_header = {})
97
+ request_object = BuildGetInvoiceDetails(options)
98
+ request_hash = request_object.to_hash
99
+ response_hash = request("GetInvoiceDetails", request_hash, http_header)
100
+ GetInvoiceDetailsResponse.new(response_hash)
101
+ end
102
+ alias_method :get_invoice_details, :GetInvoiceDetails
103
+
104
+ def BuildGetInvoiceDetails(options = {}, &block)
105
+ klass = GetInvoiceDetailsRequest
106
+ object = options.is_a?(klass) ? options : klass.new(options || {})
107
+ object.instance_eval(&block) if block
108
+ object
109
+ end
110
+ alias_method :build_get_invoice_details, :BuildGetInvoiceDetails
111
+
112
+ # Service Call: CancelInvoice
113
+ # @param CancelInvoiceRequest
114
+ # @return CancelInvoiceResponse
115
+ def CancelInvoice(options = {} , http_header = {})
116
+ request_object = BuildCancelInvoice(options)
117
+ request_hash = request_object.to_hash
118
+ response_hash = request("CancelInvoice", request_hash, http_header)
119
+ CancelInvoiceResponse.new(response_hash)
120
+ end
121
+ alias_method :cancel_invoice, :CancelInvoice
122
+
123
+ def BuildCancelInvoice(options = {}, &block)
124
+ klass = CancelInvoiceRequest
125
+ object = options.is_a?(klass) ? options : klass.new(options || {})
126
+ object.instance_eval(&block) if block
127
+ object
128
+ end
129
+ alias_method :build_cancel_invoice, :BuildCancelInvoice
130
+
131
+ # Service Call: SearchInvoices
132
+ # @param SearchInvoicesRequest
133
+ # @return SearchInvoicesResponse
134
+ def SearchInvoices(options = {} , http_header = {})
135
+ request_object = BuildSearchInvoices(options)
136
+ request_hash = request_object.to_hash
137
+ response_hash = request("SearchInvoices", request_hash, http_header)
138
+ SearchInvoicesResponse.new(response_hash)
139
+ end
140
+ alias_method :search_invoices, :SearchInvoices
141
+
142
+ def BuildSearchInvoices(options = {}, &block)
143
+ klass = SearchInvoicesRequest
144
+ object = options.is_a?(klass) ? options : klass.new(options || {})
145
+ object.instance_eval(&block) if block
146
+ object
147
+ end
148
+ alias_method :build_search_invoices, :BuildSearchInvoices
149
+
150
+ # Service Call: MarkInvoiceAsPaid
151
+ # @param MarkInvoiceAsPaidRequest
152
+ # @return MarkInvoiceAsPaidResponse
153
+ def MarkInvoiceAsPaid(options = {} , http_header = {})
154
+ request_object = BuildMarkInvoiceAsPaid(options)
155
+ request_hash = request_object.to_hash
156
+ response_hash = request("MarkInvoiceAsPaid", request_hash, http_header)
157
+ MarkInvoiceAsPaidResponse.new(response_hash)
158
+ end
159
+ alias_method :mark_invoice_as_paid, :MarkInvoiceAsPaid
160
+
161
+ def BuildMarkInvoiceAsPaid(options = {}, &block)
162
+ klass = MarkInvoiceAsPaidRequest
163
+ object = options.is_a?(klass) ? options : klass.new(options || {})
164
+ object.instance_eval(&block) if block
165
+ object
166
+ end
167
+ alias_method :build_mark_invoice_as_paid, :BuildMarkInvoiceAsPaid
168
+
169
+ # Service Call: MarkInvoiceAsUnpaid
170
+ # @param MarkInvoiceAsUnpaidRequest
171
+ # @return MarkInvoiceAsUnpaidResponse
172
+ def MarkInvoiceAsUnpaid(options = {} , http_header = {})
173
+ request_object = BuildMarkInvoiceAsUnpaid(options)
174
+ request_hash = request_object.to_hash
175
+ response_hash = request("MarkInvoiceAsUnpaid", request_hash, http_header)
176
+ MarkInvoiceAsUnpaidResponse.new(response_hash)
177
+ end
178
+ alias_method :mark_invoice_as_unpaid, :MarkInvoiceAsUnpaid
179
+
180
+ def BuildMarkInvoiceAsUnpaid(options = {}, &block)
181
+ klass = MarkInvoiceAsUnpaidRequest
182
+ object = options.is_a?(klass) ? options : klass.new(options || {})
183
+ object.instance_eval(&block) if block
184
+ object
185
+ end
186
+ alias_method :build_mark_invoice_as_unpaid, :BuildMarkInvoiceAsUnpaid
187
+
188
+ # Service Call: MarkInvoiceAsRefunded
189
+ # @param MarkInvoiceAsRefundedRequest
190
+ # @return MarkInvoiceAsRefundedResponse
191
+ def MarkInvoiceAsRefunded(options = {} , http_header = {})
192
+ request_object = BuildMarkInvoiceAsRefunded(options)
193
+ request_hash = request_object.to_hash
194
+ response_hash = request("MarkInvoiceAsRefunded", request_hash, http_header)
195
+ MarkInvoiceAsRefundedResponse.new(response_hash)
196
+ end
197
+ alias_method :mark_invoice_as_refunded, :MarkInvoiceAsRefunded
198
+
199
+ def BuildMarkInvoiceAsRefunded(options = {}, &block)
200
+ klass = MarkInvoiceAsRefundedRequest
201
+ object = options.is_a?(klass) ? options : klass.new(options || {})
202
+ object.instance_eval(&block) if block
203
+ object
204
+ end
205
+ alias_method :build_mark_invoice_as_refunded, :BuildMarkInvoiceAsRefunded
206
+
207
+
208
+ end
209
+
210
+ end
211
+ end
@@ -0,0 +1,7 @@
1
+ module PayPal
2
+ module SDK
3
+ module Invoice
4
+ VERSION = "1.96.0"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,33 @@
1
+ -----BEGIN RSA PRIVATE KEY-----
2
+ MIICXAIBAAKBgQCx/rJhKDRYhs9WZj66FA+HidsrKwvep3g+YNbm1fXmjcg2rEmC
3
+ kq71+Ftw9rx0Uz7vmg6vcsASUgOyeNG7mVB1SsXc6j+JAzZsmpzxHI0QKm+nBNTS
4
+ OAp5NWn6NZQfu3BNAJ/Mok/iL3am2DWXV6dU74J66rBpwIJfzs9kmw8ZGwIDAQAB
5
+ AoGAa/V1sCQ4i7FItLjTNv3P5X+h5W74hhXBguQttFj2Ct7YHwEknQPnBt2aaMve
6
+ xhdvxtgELDpHcVU5VNifLU/yUg3+DSr/YkpBWOcNTCt1seW/z5s+jr2fQERQKbyf
7
+ SXWMTqwrQ19iQoCPYaj7Drf68JhksQCaYN650g7+B/QmSBECQQDp6r75fzDtEWrr
8
+ O4Sl9plK6CRLqQQ3LveAw4JV31N2UAqgAYtzRqD6K+SviAVtX9xxuv983qQxsfX4
9
+ ozE9sGXPAkEAwsxwR1s2Acuy10h3Xj6VtnFB3PpUrkSI9c9ZxF4CMf/+AS/b2UEe
10
+ QhH60WHY8ccgKT/DoPWBcEu2o0f9nPw29QJBAI480zHNeMe/Hp+5iliM0fvtmxxy
11
+ wwB3S8L9n4RuD0dTNpLDPbO0D/DvvdhKwtoWP2rcxbx9eaRKTYKKYUfcupsCQAkP
12
+ SQmIjHJ47tBkZmjTsFLT4aRNYDLarSQBiMNBPAjnRwD3INpx1N5tx6SFUHmuMSi5
13
+ 9nc9888tNklRx9HNSSECQHgs9ExBpA6WbRVcgiizOKH7fmNxAB5f6TQ2W1QHMUb+
14
+ UhZpwuDelOIfzJAQUZGTZk8a8uVmyXU5hTf3ZDbrnJ8=
15
+ -----END RSA PRIVATE KEY-----
16
+
17
+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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
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Invoice" do
4
+
5
+ before :all do
6
+ @client = PayPal::SDK::Invoice::API.new
7
+ end
8
+
9
+ describe "Services" do
10
+ PayPal::SDK::Invoice::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.response_envelope.ack.should_not be_nil
14
+ end
15
+ end
16
+ end
17
+
18
+ describe "DataTypes" do
19
+ PayPal::SDK::Invoice::DataTypes.constants.each do |const_name|
20
+ it "create object for #{const_name}" do
21
+ klass = PayPal::SDK::Invoice::DataTypes.const_get(const_name)
22
+ klass.new.should be_a klass
23
+ end
24
+ end
25
+ end
26
+
27
+ end
@@ -0,0 +1,6 @@
1
+ require 'bundler/setup'
2
+
3
+ Bundler.require :default, :test
4
+ PayPal::SDK::Core::Config.load('spec/config/paypal.yml', 'test')
5
+
6
+ require 'paypal-sdk-invoice'
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: paypal-sdk-invoice
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: Invoice SDK
31
+ email:
32
+ - DL-PP-Platform-Ruby-SDK@ebay.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - spec/invoice_spec.rb
38
+ - spec/spec_helper.rb
39
+ - spec/config/paypal.yml
40
+ - spec/config/cert_key.pem
41
+ - lib/paypal-sdk-invoice.rb
42
+ - lib/paypal-sdk/invoice/services.rb
43
+ - lib/paypal-sdk/invoice/api.rb
44
+ - lib/paypal-sdk/invoice/version.rb
45
+ - lib/paypal-sdk/invoice/data_types.rb
46
+ - lib/paypal-sdk/invoice.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: 898902689
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: 898902689
74
+ requirements: []
75
+ rubyforge_project:
76
+ rubygems_version: 1.8.24
77
+ signing_key:
78
+ specification_version: 3
79
+ summary: Invoice SDK
80
+ test_files:
81
+ - spec/invoice_spec.rb
82
+ - spec/spec_helper.rb
83
+ - spec/config/paypal.yml
84
+ - spec/config/cert_key.pem