processout 2.17.0 → 2.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. metadata +4 -65
  3. data/.gitignore +0 -52
  4. data/.rspec +0 -2
  5. data/.travis.yml +0 -5
  6. data/Dockerfile +0 -7
  7. data/Gemfile +0 -4
  8. data/LICENSE.txt +0 -21
  9. data/Makefile +0 -4
  10. data/README.md +0 -12
  11. data/Rakefile +0 -6
  12. data/bin/console +0 -14
  13. data/bin/setup +0 -8
  14. data/lib/processout/activity.rb +0 -206
  15. data/lib/processout/addon.rb +0 -401
  16. data/lib/processout/api_request.rb +0 -295
  17. data/lib/processout/api_version.rb +0 -92
  18. data/lib/processout/balance.rb +0 -81
  19. data/lib/processout/balances.rb +0 -111
  20. data/lib/processout/card.rb +0 -503
  21. data/lib/processout/card_information.rb +0 -164
  22. data/lib/processout/coupon.rb +0 -352
  23. data/lib/processout/customer.rb +0 -755
  24. data/lib/processout/customer_action.rb +0 -81
  25. data/lib/processout/discount.rb +0 -360
  26. data/lib/processout/dunning_action.rb +0 -81
  27. data/lib/processout/errors/authentication_error.rb +0 -9
  28. data/lib/processout/errors/generic_error.rb +0 -9
  29. data/lib/processout/errors/internal_error.rb +0 -9
  30. data/lib/processout/errors/notfound_error.rb +0 -9
  31. data/lib/processout/errors/validation_error.rb +0 -9
  32. data/lib/processout/event.rb +0 -237
  33. data/lib/processout/gateway.rb +0 -210
  34. data/lib/processout/gateway_configuration.rb +0 -346
  35. data/lib/processout/gateway_request.rb +0 -26
  36. data/lib/processout/invoice.rb +0 -945
  37. data/lib/processout/invoice_detail.rb +0 -224
  38. data/lib/processout/invoice_device.rb +0 -92
  39. data/lib/processout/invoice_external_fraud_tools.rb +0 -70
  40. data/lib/processout/invoice_risk.rb +0 -81
  41. data/lib/processout/invoice_shipping.rb +0 -191
  42. data/lib/processout/invoice_tax.rb +0 -81
  43. data/lib/processout/networking/request.rb +0 -102
  44. data/lib/processout/networking/response.rb +0 -67
  45. data/lib/processout/payment_data_network_authentication.rb +0 -70
  46. data/lib/processout/payment_data_three_ds_authentication.rb +0 -70
  47. data/lib/processout/payment_data_three_ds_request.rb +0 -103
  48. data/lib/processout/payout.rb +0 -379
  49. data/lib/processout/payout_item.rb +0 -238
  50. data/lib/processout/plan.rb +0 -368
  51. data/lib/processout/product.rb +0 -368
  52. data/lib/processout/project.rb +0 -353
  53. data/lib/processout/refund.rb +0 -265
  54. data/lib/processout/subscription.rb +0 -910
  55. data/lib/processout/three_ds.rb +0 -158
  56. data/lib/processout/token.rb +0 -482
  57. data/lib/processout/transaction.rb +0 -894
  58. data/lib/processout/transaction_operation.rb +0 -418
  59. data/lib/processout/version.rb +0 -3
  60. data/lib/processout/webhook.rb +0 -237
  61. data/lib/processout/webhook_endpoint.rb +0 -149
  62. data/lib/processout.rb +0 -251
  63. 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,251 +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/balances"
8
- require "processout/balance"
9
- require "processout/card"
10
- require "processout/card_information"
11
- require "processout/coupon"
12
- require "processout/customer"
13
- require "processout/token"
14
- require "processout/discount"
15
- require "processout/event"
16
- require "processout/gateway"
17
- require "processout/gateway_configuration"
18
- require "processout/invoice"
19
- require "processout/invoice_tax"
20
- require "processout/invoice_external_fraud_tools"
21
- require "processout/invoice_risk"
22
- require "processout/invoice_device"
23
- require "processout/invoice_shipping"
24
- require "processout/invoice_detail"
25
- require "processout/customer_action"
26
- require "processout/dunning_action"
27
- require "processout/payout"
28
- require "processout/payout_item"
29
- require "processout/plan"
30
- require "processout/product"
31
- require "processout/project"
32
- require "processout/refund"
33
- require "processout/subscription"
34
- require "processout/transaction"
35
- require "processout/three_ds"
36
- require "processout/payment_data_three_ds_request"
37
- require "processout/payment_data_network_authentication"
38
- require "processout/payment_data_three_ds_authentication"
39
- require "processout/transaction_operation"
40
- require "processout/webhook"
41
- require "processout/webhook_endpoint"
42
-
43
- module ProcessOut
44
- class Client
45
- attr_reader :host, :project_id, :project_secret
46
-
47
- def initialize(project_id, project_secret)
48
- @host = "https://api.processout.com"
49
-
50
- @project_id = project_id
51
- @project_secret = project_secret
52
- end
53
-
54
- # Create a new Activity instance
55
- def activity(data = {})
56
- obj = Activity.new(self, data)
57
- end
58
-
59
- # Create a new Addon instance
60
- def addon(data = {})
61
- obj = Addon.new(self, data)
62
- end
63
-
64
- # Create a new APIRequest instance
65
- def api_request(data = {})
66
- obj = APIRequest.new(self, data)
67
- end
68
-
69
- # Create a new APIVersion instance
70
- def api_version(data = {})
71
- obj = APIVersion.new(self, data)
72
- end
73
-
74
- # Create a new Balances instance
75
- def balances(data = {})
76
- obj = Balances.new(self, data)
77
- end
78
-
79
- # Create a new Balance instance
80
- def balance(data = {})
81
- obj = Balance.new(self, data)
82
- end
83
-
84
- # Create a new Card instance
85
- def card(data = {})
86
- obj = Card.new(self, data)
87
- end
88
-
89
- # Create a new CardInformation instance
90
- def card_information(data = {})
91
- obj = CardInformation.new(self, data)
92
- end
93
-
94
- # Create a new Coupon instance
95
- def coupon(data = {})
96
- obj = Coupon.new(self, data)
97
- end
98
-
99
- # Create a new Customer instance
100
- def customer(data = {})
101
- obj = Customer.new(self, data)
102
- end
103
-
104
- # Create a new Token instance
105
- def token(data = {})
106
- obj = Token.new(self, data)
107
- end
108
-
109
- # Create a new Discount instance
110
- def discount(data = {})
111
- obj = Discount.new(self, data)
112
- end
113
-
114
- # Create a new Event instance
115
- def event(data = {})
116
- obj = Event.new(self, data)
117
- end
118
-
119
- # Create a new Gateway instance
120
- def gateway(data = {})
121
- obj = Gateway.new(self, data)
122
- end
123
-
124
- # Create a new GatewayConfiguration instance
125
- def gateway_configuration(data = {})
126
- obj = GatewayConfiguration.new(self, data)
127
- end
128
-
129
- # Create a new Invoice instance
130
- def invoice(data = {})
131
- obj = Invoice.new(self, data)
132
- end
133
-
134
- # Create a new InvoiceTax instance
135
- def invoice_tax(data = {})
136
- obj = InvoiceTax.new(self, data)
137
- end
138
-
139
- # Create a new InvoiceExternalFraudTools instance
140
- def invoice_external_fraud_tools(data = {})
141
- obj = InvoiceExternalFraudTools.new(self, data)
142
- end
143
-
144
- # Create a new InvoiceRisk instance
145
- def invoice_risk(data = {})
146
- obj = InvoiceRisk.new(self, data)
147
- end
148
-
149
- # Create a new InvoiceDevice instance
150
- def invoice_device(data = {})
151
- obj = InvoiceDevice.new(self, data)
152
- end
153
-
154
- # Create a new InvoiceShipping instance
155
- def invoice_shipping(data = {})
156
- obj = InvoiceShipping.new(self, data)
157
- end
158
-
159
- # Create a new InvoiceDetail instance
160
- def invoice_detail(data = {})
161
- obj = InvoiceDetail.new(self, data)
162
- end
163
-
164
- # Create a new CustomerAction instance
165
- def customer_action(data = {})
166
- obj = CustomerAction.new(self, data)
167
- end
168
-
169
- # Create a new DunningAction instance
170
- def dunning_action(data = {})
171
- obj = DunningAction.new(self, data)
172
- end
173
-
174
- # Create a new Payout instance
175
- def payout(data = {})
176
- obj = Payout.new(self, data)
177
- end
178
-
179
- # Create a new PayoutItem instance
180
- def payout_item(data = {})
181
- obj = PayoutItem.new(self, data)
182
- end
183
-
184
- # Create a new Plan instance
185
- def plan(data = {})
186
- obj = Plan.new(self, data)
187
- end
188
-
189
- # Create a new Product instance
190
- def product(data = {})
191
- obj = Product.new(self, data)
192
- end
193
-
194
- # Create a new Project instance
195
- def project(data = {})
196
- obj = Project.new(self, data)
197
- end
198
-
199
- # Create a new Refund instance
200
- def refund(data = {})
201
- obj = Refund.new(self, data)
202
- end
203
-
204
- # Create a new Subscription instance
205
- def subscription(data = {})
206
- obj = Subscription.new(self, data)
207
- end
208
-
209
- # Create a new Transaction instance
210
- def transaction(data = {})
211
- obj = Transaction.new(self, data)
212
- end
213
-
214
- # Create a new ThreeDS instance
215
- def three_ds(data = {})
216
- obj = ThreeDS.new(self, data)
217
- end
218
-
219
- # Create a new PaymentDataThreeDSRequest instance
220
- def payment_data_three_ds_request(data = {})
221
- obj = PaymentDataThreeDSRequest.new(self, data)
222
- end
223
-
224
- # Create a new PaymentDataNetworkAuthentication instance
225
- def payment_data_network_authentication(data = {})
226
- obj = PaymentDataNetworkAuthentication.new(self, data)
227
- end
228
-
229
- # Create a new PaymentDataThreeDSAuthentication instance
230
- def payment_data_three_ds_authentication(data = {})
231
- obj = PaymentDataThreeDSAuthentication.new(self, data)
232
- end
233
-
234
- # Create a new TransactionOperation instance
235
- def transaction_operation(data = {})
236
- obj = TransactionOperation.new(self, data)
237
- end
238
-
239
- # Create a new Webhook instance
240
- def webhook(data = {})
241
- obj = Webhook.new(self, data)
242
- end
243
-
244
- # Create a new WebhookEndpoint instance
245
- def webhook_endpoint(data = {})
246
- obj = WebhookEndpoint.new(self, data)
247
- end
248
-
249
-
250
- end
251
- 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