processout 1.0.6 → 1.0.7
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.
- checksums.yaml +4 -4
- data/lib/processout/activity.rb +30 -6
- data/lib/processout/authorization_request.rb +44 -22
- data/lib/processout/card.rb +40 -13
- data/lib/processout/coupon.rb +50 -13
- data/lib/processout/customer.rb +66 -25
- data/lib/processout/customer_action.rb +18 -2
- data/lib/processout/discount.rb +38 -9
- data/lib/processout/event.rb +32 -6
- data/lib/processout/gateway.rb +30 -8
- data/lib/processout/gateway_configuration.rb +24 -5
- data/lib/processout/invoice.rb +66 -16
- data/lib/processout/plan.rb +50 -14
- data/lib/processout/product.rb +52 -13
- data/lib/processout/project.rb +26 -5
- data/lib/processout/refund.rb +34 -8
- data/lib/processout/subscription.rb +107 -37
- data/lib/processout/token.rb +38 -8
- data/lib/processout/transaction.rb +56 -17
- data/lib/processout/version.rb +1 -1
- data/lib/processout/webhook.rb +38 -12
- metadata +3 -3
data/lib/processout/webhook.rb
CHANGED
@@ -91,18 +91,18 @@ module ProcessOut
|
|
91
91
|
def initialize(client, data = {})
|
92
92
|
@client = client
|
93
93
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
94
|
+
self.id = data.fetch(:id, nil)
|
95
|
+
self.project = data.fetch(:project, nil)
|
96
|
+
self.event = data.fetch(:event, nil)
|
97
|
+
self.request_url = data.fetch(:request_url, nil)
|
98
|
+
self.request_method = data.fetch(:request_method, nil)
|
99
|
+
self.response_body = data.fetch(:response_body, nil)
|
100
|
+
self.response_code = data.fetch(:response_code, nil)
|
101
|
+
self.response_headers = data.fetch(:response_headers, nil)
|
102
|
+
self.response_time_ms = data.fetch(:response_time_ms, nil)
|
103
|
+
self.status = data.fetch(:status, nil)
|
104
|
+
self.created_at = data.fetch(:created_at, nil)
|
105
|
+
self.release_at = data.fetch(:release_at, nil)
|
106
106
|
|
107
107
|
end
|
108
108
|
|
@@ -115,6 +115,9 @@ module ProcessOut
|
|
115
115
|
# Params:
|
116
116
|
# +data+:: +Hash+ of data coming from the API
|
117
117
|
def fill_with_data(data)
|
118
|
+
if data.nil?
|
119
|
+
return self
|
120
|
+
end
|
118
121
|
if data.include? "id"
|
119
122
|
self.id = data["id"]
|
120
123
|
end
|
@@ -155,6 +158,29 @@ module ProcessOut
|
|
155
158
|
self
|
156
159
|
end
|
157
160
|
|
161
|
+
# Prefills the object with the data passed as Parameters
|
162
|
+
# Params:
|
163
|
+
# +data+:: +Hash+ of data
|
164
|
+
def prefill(data)
|
165
|
+
if data.nil?
|
166
|
+
return self
|
167
|
+
end
|
168
|
+
self.id = data.fetch(:id, self.id)
|
169
|
+
self.project = data.fetch(:project, self.project)
|
170
|
+
self.event = data.fetch(:event, self.event)
|
171
|
+
self.request_url = data.fetch(:request_url, self.request_url)
|
172
|
+
self.request_method = data.fetch(:request_method, self.request_method)
|
173
|
+
self.response_body = data.fetch(:response_body, self.response_body)
|
174
|
+
self.response_code = data.fetch(:response_code, self.response_code)
|
175
|
+
self.response_headers = data.fetch(:response_headers, self.response_headers)
|
176
|
+
self.response_time_ms = data.fetch(:response_time_ms, self.response_time_ms)
|
177
|
+
self.status = data.fetch(:status, self.status)
|
178
|
+
self.created_at = data.fetch(:created_at, self.created_at)
|
179
|
+
self.release_at = data.fetch(:release_at, self.release_at)
|
180
|
+
|
181
|
+
self
|
182
|
+
end
|
183
|
+
|
158
184
|
|
159
185
|
end
|
160
186
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: processout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel HUEZ
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.0.14.1
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: Ruby bindings for the ProcessOut API
|