processout 2.19.0 → 2.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +4 -67
- data/.gitignore +0 -52
- data/.rspec +0 -2
- data/.travis.yml +0 -5
- data/Dockerfile +0 -7
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -21
- data/Makefile +0 -4
- data/README.md +0 -12
- data/Rakefile +0 -6
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/processout/activity.rb +0 -206
- data/lib/processout/addon.rb +0 -401
- data/lib/processout/alternative_merchant_certificate.rb +0 -94
- data/lib/processout/api_request.rb +0 -295
- data/lib/processout/api_version.rb +0 -92
- data/lib/processout/apple_pay_alternative_merchant_certificates.rb +0 -110
- data/lib/processout/balance.rb +0 -81
- data/lib/processout/balances.rb +0 -111
- data/lib/processout/card.rb +0 -503
- data/lib/processout/card_information.rb +0 -164
- data/lib/processout/coupon.rb +0 -352
- data/lib/processout/customer.rb +0 -755
- data/lib/processout/customer_action.rb +0 -81
- data/lib/processout/discount.rb +0 -360
- data/lib/processout/dunning_action.rb +0 -81
- data/lib/processout/errors/authentication_error.rb +0 -9
- data/lib/processout/errors/generic_error.rb +0 -9
- data/lib/processout/errors/internal_error.rb +0 -9
- data/lib/processout/errors/notfound_error.rb +0 -9
- data/lib/processout/errors/validation_error.rb +0 -9
- data/lib/processout/event.rb +0 -237
- data/lib/processout/gateway.rb +0 -210
- data/lib/processout/gateway_configuration.rb +0 -346
- data/lib/processout/gateway_request.rb +0 -26
- data/lib/processout/invoice.rb +0 -945
- data/lib/processout/invoice_detail.rb +0 -235
- data/lib/processout/invoice_device.rb +0 -92
- data/lib/processout/invoice_external_fraud_tools.rb +0 -70
- data/lib/processout/invoice_risk.rb +0 -81
- data/lib/processout/invoice_shipping.rb +0 -191
- data/lib/processout/invoice_tax.rb +0 -81
- data/lib/processout/networking/request.rb +0 -102
- data/lib/processout/networking/response.rb +0 -67
- data/lib/processout/payment_data_network_authentication.rb +0 -70
- data/lib/processout/payment_data_three_ds_authentication.rb +0 -70
- data/lib/processout/payment_data_three_ds_request.rb +0 -103
- data/lib/processout/payout.rb +0 -379
- data/lib/processout/payout_item.rb +0 -238
- data/lib/processout/plan.rb +0 -368
- data/lib/processout/product.rb +0 -368
- data/lib/processout/project.rb +0 -353
- data/lib/processout/refund.rb +0 -277
- data/lib/processout/subscription.rb +0 -910
- data/lib/processout/three_ds.rb +0 -158
- data/lib/processout/token.rb +0 -493
- data/lib/processout/transaction.rb +0 -905
- data/lib/processout/transaction_operation.rb +0 -418
- data/lib/processout/version.rb +0 -3
- data/lib/processout/webhook.rb +0 -237
- data/lib/processout/webhook_endpoint.rb +0 -149
- data/lib/processout.rb +0 -263
- data/processout.gemspec +0 -26
@@ -1,149 +0,0 @@
|
|
1
|
-
# The content of this file was automatically generated
|
2
|
-
|
3
|
-
require "cgi"
|
4
|
-
require "json"
|
5
|
-
require "processout/networking/request"
|
6
|
-
require "processout/networking/response"
|
7
|
-
|
8
|
-
module ProcessOut
|
9
|
-
class WebhookEndpoint
|
10
|
-
|
11
|
-
attr_reader :id
|
12
|
-
attr_reader :project
|
13
|
-
attr_reader :project_id
|
14
|
-
attr_reader :url
|
15
|
-
attr_reader :events_whitelist
|
16
|
-
attr_reader :sandbox
|
17
|
-
attr_reader :created_at
|
18
|
-
|
19
|
-
|
20
|
-
def id=(val)
|
21
|
-
@id = val
|
22
|
-
end
|
23
|
-
|
24
|
-
def project=(val)
|
25
|
-
if val.nil?
|
26
|
-
@project = val
|
27
|
-
return
|
28
|
-
end
|
29
|
-
|
30
|
-
if val.instance_of? Project
|
31
|
-
@project = val
|
32
|
-
else
|
33
|
-
obj = Project.new(@client)
|
34
|
-
obj.fill_with_data(val)
|
35
|
-
@project = obj
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
def project_id=(val)
|
41
|
-
@project_id = val
|
42
|
-
end
|
43
|
-
|
44
|
-
def url=(val)
|
45
|
-
@url = val
|
46
|
-
end
|
47
|
-
|
48
|
-
def events_whitelist=(val)
|
49
|
-
@events_whitelist = val
|
50
|
-
|
51
|
-
end
|
52
|
-
|
53
|
-
def sandbox=(val)
|
54
|
-
@sandbox = val
|
55
|
-
end
|
56
|
-
|
57
|
-
def created_at=(val)
|
58
|
-
@created_at = val
|
59
|
-
end
|
60
|
-
|
61
|
-
|
62
|
-
# Initializes the WebhookEndpoint object
|
63
|
-
# Params:
|
64
|
-
# +client+:: +ProcessOut+ client instance
|
65
|
-
# +data+:: data that can be used to fill the object
|
66
|
-
def initialize(client, data = {})
|
67
|
-
@client = client
|
68
|
-
|
69
|
-
self.id = data.fetch(:id, nil)
|
70
|
-
self.project = data.fetch(:project, nil)
|
71
|
-
self.project_id = data.fetch(:project_id, nil)
|
72
|
-
self.url = data.fetch(:url, nil)
|
73
|
-
self.events_whitelist = data.fetch(:events_whitelist, nil)
|
74
|
-
self.sandbox = data.fetch(:sandbox, nil)
|
75
|
-
self.created_at = data.fetch(:created_at, nil)
|
76
|
-
|
77
|
-
end
|
78
|
-
|
79
|
-
# Create a new WebhookEndpoint using the current client
|
80
|
-
def new(data = {})
|
81
|
-
WebhookEndpoint.new(@client, data)
|
82
|
-
end
|
83
|
-
|
84
|
-
# Overrides the JSON marshaller to only send the fields we want
|
85
|
-
def to_json(options)
|
86
|
-
{
|
87
|
-
"id": self.id,
|
88
|
-
"project": self.project,
|
89
|
-
"project_id": self.project_id,
|
90
|
-
"url": self.url,
|
91
|
-
"events_whitelist": self.events_whitelist,
|
92
|
-
"sandbox": self.sandbox,
|
93
|
-
"created_at": self.created_at,
|
94
|
-
}.to_json
|
95
|
-
end
|
96
|
-
|
97
|
-
# Fills the object with data coming from the API
|
98
|
-
# Params:
|
99
|
-
# +data+:: +Hash+ of data coming from the API
|
100
|
-
def fill_with_data(data)
|
101
|
-
if data.nil?
|
102
|
-
return self
|
103
|
-
end
|
104
|
-
if data.include? "id"
|
105
|
-
self.id = data["id"]
|
106
|
-
end
|
107
|
-
if data.include? "project"
|
108
|
-
self.project = data["project"]
|
109
|
-
end
|
110
|
-
if data.include? "project_id"
|
111
|
-
self.project_id = data["project_id"]
|
112
|
-
end
|
113
|
-
if data.include? "url"
|
114
|
-
self.url = data["url"]
|
115
|
-
end
|
116
|
-
if data.include? "events_whitelist"
|
117
|
-
self.events_whitelist = data["events_whitelist"]
|
118
|
-
end
|
119
|
-
if data.include? "sandbox"
|
120
|
-
self.sandbox = data["sandbox"]
|
121
|
-
end
|
122
|
-
if data.include? "created_at"
|
123
|
-
self.created_at = data["created_at"]
|
124
|
-
end
|
125
|
-
|
126
|
-
self
|
127
|
-
end
|
128
|
-
|
129
|
-
# Prefills the object with the data passed as parameters
|
130
|
-
# Params:
|
131
|
-
# +data+:: +Hash+ of data
|
132
|
-
def prefill(data)
|
133
|
-
if data.nil?
|
134
|
-
return self
|
135
|
-
end
|
136
|
-
self.id = data.fetch(:id, self.id)
|
137
|
-
self.project = data.fetch(:project, self.project)
|
138
|
-
self.project_id = data.fetch(:project_id, self.project_id)
|
139
|
-
self.url = data.fetch(:url, self.url)
|
140
|
-
self.events_whitelist = data.fetch(:events_whitelist, self.events_whitelist)
|
141
|
-
self.sandbox = data.fetch(:sandbox, self.sandbox)
|
142
|
-
self.created_at = data.fetch(:created_at, self.created_at)
|
143
|
-
|
144
|
-
self
|
145
|
-
end
|
146
|
-
|
147
|
-
|
148
|
-
end
|
149
|
-
end
|
data/lib/processout.rb
DELETED
@@ -1,263 +0,0 @@
|
|
1
|
-
require "processout/version"
|
2
|
-
require "processout/gateway_request"
|
3
|
-
require "processout/activity"
|
4
|
-
require "processout/addon"
|
5
|
-
require "processout/api_request"
|
6
|
-
require "processout/api_version"
|
7
|
-
require "processout/apple_pay_alternative_merchant_certificates"
|
8
|
-
require "processout/alternative_merchant_certificate"
|
9
|
-
require "processout/balances"
|
10
|
-
require "processout/balance"
|
11
|
-
require "processout/card"
|
12
|
-
require "processout/card_information"
|
13
|
-
require "processout/coupon"
|
14
|
-
require "processout/customer"
|
15
|
-
require "processout/token"
|
16
|
-
require "processout/discount"
|
17
|
-
require "processout/event"
|
18
|
-
require "processout/gateway"
|
19
|
-
require "processout/gateway_configuration"
|
20
|
-
require "processout/invoice"
|
21
|
-
require "processout/invoice_tax"
|
22
|
-
require "processout/invoice_external_fraud_tools"
|
23
|
-
require "processout/invoice_risk"
|
24
|
-
require "processout/invoice_device"
|
25
|
-
require "processout/invoice_shipping"
|
26
|
-
require "processout/invoice_detail"
|
27
|
-
require "processout/customer_action"
|
28
|
-
require "processout/dunning_action"
|
29
|
-
require "processout/payout"
|
30
|
-
require "processout/payout_item"
|
31
|
-
require "processout/plan"
|
32
|
-
require "processout/product"
|
33
|
-
require "processout/project"
|
34
|
-
require "processout/refund"
|
35
|
-
require "processout/subscription"
|
36
|
-
require "processout/transaction"
|
37
|
-
require "processout/three_ds"
|
38
|
-
require "processout/payment_data_three_ds_request"
|
39
|
-
require "processout/payment_data_network_authentication"
|
40
|
-
require "processout/payment_data_three_ds_authentication"
|
41
|
-
require "processout/transaction_operation"
|
42
|
-
require "processout/webhook"
|
43
|
-
require "processout/webhook_endpoint"
|
44
|
-
|
45
|
-
module ProcessOut
|
46
|
-
class Client
|
47
|
-
attr_reader :host, :project_id, :project_secret
|
48
|
-
|
49
|
-
def initialize(project_id, project_secret)
|
50
|
-
@host = "https://api.processout.com"
|
51
|
-
|
52
|
-
@project_id = project_id
|
53
|
-
@project_secret = project_secret
|
54
|
-
end
|
55
|
-
|
56
|
-
# Create a new Activity instance
|
57
|
-
def activity(data = {})
|
58
|
-
obj = Activity.new(self, data)
|
59
|
-
end
|
60
|
-
|
61
|
-
# Create a new Addon instance
|
62
|
-
def addon(data = {})
|
63
|
-
obj = Addon.new(self, data)
|
64
|
-
end
|
65
|
-
|
66
|
-
# Create a new APIRequest instance
|
67
|
-
def api_request(data = {})
|
68
|
-
obj = APIRequest.new(self, data)
|
69
|
-
end
|
70
|
-
|
71
|
-
# Create a new APIVersion instance
|
72
|
-
def api_version(data = {})
|
73
|
-
obj = APIVersion.new(self, data)
|
74
|
-
end
|
75
|
-
|
76
|
-
# Create a new ApplePayAlternativeMerchantCertificates instance
|
77
|
-
def apple_pay_alternative_merchant_certificates(data = {})
|
78
|
-
obj = ApplePayAlternativeMerchantCertificates.new(self, data)
|
79
|
-
end
|
80
|
-
|
81
|
-
# Create a new AlternativeMerchantCertificate instance
|
82
|
-
def alternative_merchant_certificate(data = {})
|
83
|
-
obj = AlternativeMerchantCertificate.new(self, data)
|
84
|
-
end
|
85
|
-
|
86
|
-
# Create a new Balances instance
|
87
|
-
def balances(data = {})
|
88
|
-
obj = Balances.new(self, data)
|
89
|
-
end
|
90
|
-
|
91
|
-
# Create a new Balance instance
|
92
|
-
def balance(data = {})
|
93
|
-
obj = Balance.new(self, data)
|
94
|
-
end
|
95
|
-
|
96
|
-
# Create a new Card instance
|
97
|
-
def card(data = {})
|
98
|
-
obj = Card.new(self, data)
|
99
|
-
end
|
100
|
-
|
101
|
-
# Create a new CardInformation instance
|
102
|
-
def card_information(data = {})
|
103
|
-
obj = CardInformation.new(self, data)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Create a new Coupon instance
|
107
|
-
def coupon(data = {})
|
108
|
-
obj = Coupon.new(self, data)
|
109
|
-
end
|
110
|
-
|
111
|
-
# Create a new Customer instance
|
112
|
-
def customer(data = {})
|
113
|
-
obj = Customer.new(self, data)
|
114
|
-
end
|
115
|
-
|
116
|
-
# Create a new Token instance
|
117
|
-
def token(data = {})
|
118
|
-
obj = Token.new(self, data)
|
119
|
-
end
|
120
|
-
|
121
|
-
# Create a new Discount instance
|
122
|
-
def discount(data = {})
|
123
|
-
obj = Discount.new(self, data)
|
124
|
-
end
|
125
|
-
|
126
|
-
# Create a new Event instance
|
127
|
-
def event(data = {})
|
128
|
-
obj = Event.new(self, data)
|
129
|
-
end
|
130
|
-
|
131
|
-
# Create a new Gateway instance
|
132
|
-
def gateway(data = {})
|
133
|
-
obj = Gateway.new(self, data)
|
134
|
-
end
|
135
|
-
|
136
|
-
# Create a new GatewayConfiguration instance
|
137
|
-
def gateway_configuration(data = {})
|
138
|
-
obj = GatewayConfiguration.new(self, data)
|
139
|
-
end
|
140
|
-
|
141
|
-
# Create a new Invoice instance
|
142
|
-
def invoice(data = {})
|
143
|
-
obj = Invoice.new(self, data)
|
144
|
-
end
|
145
|
-
|
146
|
-
# Create a new InvoiceTax instance
|
147
|
-
def invoice_tax(data = {})
|
148
|
-
obj = InvoiceTax.new(self, data)
|
149
|
-
end
|
150
|
-
|
151
|
-
# Create a new InvoiceExternalFraudTools instance
|
152
|
-
def invoice_external_fraud_tools(data = {})
|
153
|
-
obj = InvoiceExternalFraudTools.new(self, data)
|
154
|
-
end
|
155
|
-
|
156
|
-
# Create a new InvoiceRisk instance
|
157
|
-
def invoice_risk(data = {})
|
158
|
-
obj = InvoiceRisk.new(self, data)
|
159
|
-
end
|
160
|
-
|
161
|
-
# Create a new InvoiceDevice instance
|
162
|
-
def invoice_device(data = {})
|
163
|
-
obj = InvoiceDevice.new(self, data)
|
164
|
-
end
|
165
|
-
|
166
|
-
# Create a new InvoiceShipping instance
|
167
|
-
def invoice_shipping(data = {})
|
168
|
-
obj = InvoiceShipping.new(self, data)
|
169
|
-
end
|
170
|
-
|
171
|
-
# Create a new InvoiceDetail instance
|
172
|
-
def invoice_detail(data = {})
|
173
|
-
obj = InvoiceDetail.new(self, data)
|
174
|
-
end
|
175
|
-
|
176
|
-
# Create a new CustomerAction instance
|
177
|
-
def customer_action(data = {})
|
178
|
-
obj = CustomerAction.new(self, data)
|
179
|
-
end
|
180
|
-
|
181
|
-
# Create a new DunningAction instance
|
182
|
-
def dunning_action(data = {})
|
183
|
-
obj = DunningAction.new(self, data)
|
184
|
-
end
|
185
|
-
|
186
|
-
# Create a new Payout instance
|
187
|
-
def payout(data = {})
|
188
|
-
obj = Payout.new(self, data)
|
189
|
-
end
|
190
|
-
|
191
|
-
# Create a new PayoutItem instance
|
192
|
-
def payout_item(data = {})
|
193
|
-
obj = PayoutItem.new(self, data)
|
194
|
-
end
|
195
|
-
|
196
|
-
# Create a new Plan instance
|
197
|
-
def plan(data = {})
|
198
|
-
obj = Plan.new(self, data)
|
199
|
-
end
|
200
|
-
|
201
|
-
# Create a new Product instance
|
202
|
-
def product(data = {})
|
203
|
-
obj = Product.new(self, data)
|
204
|
-
end
|
205
|
-
|
206
|
-
# Create a new Project instance
|
207
|
-
def project(data = {})
|
208
|
-
obj = Project.new(self, data)
|
209
|
-
end
|
210
|
-
|
211
|
-
# Create a new Refund instance
|
212
|
-
def refund(data = {})
|
213
|
-
obj = Refund.new(self, data)
|
214
|
-
end
|
215
|
-
|
216
|
-
# Create a new Subscription instance
|
217
|
-
def subscription(data = {})
|
218
|
-
obj = Subscription.new(self, data)
|
219
|
-
end
|
220
|
-
|
221
|
-
# Create a new Transaction instance
|
222
|
-
def transaction(data = {})
|
223
|
-
obj = Transaction.new(self, data)
|
224
|
-
end
|
225
|
-
|
226
|
-
# Create a new ThreeDS instance
|
227
|
-
def three_ds(data = {})
|
228
|
-
obj = ThreeDS.new(self, data)
|
229
|
-
end
|
230
|
-
|
231
|
-
# Create a new PaymentDataThreeDSRequest instance
|
232
|
-
def payment_data_three_ds_request(data = {})
|
233
|
-
obj = PaymentDataThreeDSRequest.new(self, data)
|
234
|
-
end
|
235
|
-
|
236
|
-
# Create a new PaymentDataNetworkAuthentication instance
|
237
|
-
def payment_data_network_authentication(data = {})
|
238
|
-
obj = PaymentDataNetworkAuthentication.new(self, data)
|
239
|
-
end
|
240
|
-
|
241
|
-
# Create a new PaymentDataThreeDSAuthentication instance
|
242
|
-
def payment_data_three_ds_authentication(data = {})
|
243
|
-
obj = PaymentDataThreeDSAuthentication.new(self, data)
|
244
|
-
end
|
245
|
-
|
246
|
-
# Create a new TransactionOperation instance
|
247
|
-
def transaction_operation(data = {})
|
248
|
-
obj = TransactionOperation.new(self, data)
|
249
|
-
end
|
250
|
-
|
251
|
-
# Create a new Webhook instance
|
252
|
-
def webhook(data = {})
|
253
|
-
obj = Webhook.new(self, data)
|
254
|
-
end
|
255
|
-
|
256
|
-
# Create a new WebhookEndpoint instance
|
257
|
-
def webhook_endpoint(data = {})
|
258
|
-
obj = WebhookEndpoint.new(self, data)
|
259
|
-
end
|
260
|
-
|
261
|
-
|
262
|
-
end
|
263
|
-
end
|
data/processout.gemspec
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'processout/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "processout"
|
8
|
-
spec.version = ProcessOut::VERSION
|
9
|
-
spec.authors = ["Manuel HUEZ"]
|
10
|
-
spec.email = ["manuel@processout.com"]
|
11
|
-
|
12
|
-
spec.summary = "Ruby bindings for the ProcessOut API"
|
13
|
-
spec.homepage = "https://docs.processout.com"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
-
f.match(%r{^(test|spec|features)/})
|
18
|
-
end
|
19
|
-
spec.bindir = "exe"
|
20
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
-
spec.require_paths = ["lib"]
|
22
|
-
|
23
|
-
spec.add_development_dependency "bundler", "~> 1.13"
|
24
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
26
|
-
end
|