processout 1.0.2 → 1.0.3
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 +6 -6
- data/lib/processout/authorization_request.rb +13 -13
- data/lib/processout/card.rb +13 -13
- data/lib/processout/coupon.rb +13 -13
- data/lib/processout/customer.rb +17 -17
- data/lib/processout/customer_action.rb +2 -2
- data/lib/processout/discount.rb +9 -9
- data/lib/processout/event.rb +6 -6
- data/lib/processout/gateway.rb +8 -8
- data/lib/processout/gateway_configuration.rb +5 -5
- data/lib/processout/invoice.rb +16 -16
- data/lib/processout/networking/request.rb +4 -4
- data/lib/processout/plan.rb +12 -12
- data/lib/processout/product.rb +13 -13
- data/lib/processout/project.rb +5 -5
- data/lib/processout/refund.rb +8 -8
- data/lib/processout/subscription.rb +24 -24
- data/lib/processout/token.rb +6 -6
- data/lib/processout/transaction.rb +17 -17
- data/lib/processout/version.rb +1 -1
- data/lib/processout/webhook.rb +12 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4a75126feaa5016d2f3d95f7a575e7fd227a896
|
4
|
+
data.tar.gz: 8fa76a68941a9bc80f47f5cc99299441d889a75d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b34d327e6b993e51d5ec6188b4acba030fa7fc92a138a6b22aeb67b70ee5170e19f1d8f592675b0b64146d66bcf330700644e10adc172c58a44e2f5e01d88ac3
|
7
|
+
data.tar.gz: 9120bb5df77af02de188f82080400b9762e35ddc77483e37b792e5d2707cc0b0fe900f6afa66ce64758df91d38ea77f8262e4b375a1ce4761f3acaeea8d526ad
|
data/lib/processout/activity.rb
CHANGED
@@ -73,22 +73,22 @@ module ProcessOut
|
|
73
73
|
# +data+:: +Hash+ of data coming from the API
|
74
74
|
def fill_with_data(data)
|
75
75
|
if data.include? "id"
|
76
|
-
|
76
|
+
self.id = data["id"]
|
77
77
|
end
|
78
78
|
if data.include? "project"
|
79
|
-
|
79
|
+
self.project = data["project"]
|
80
80
|
end
|
81
81
|
if data.include? "title"
|
82
|
-
|
82
|
+
self.title = data["title"]
|
83
83
|
end
|
84
84
|
if data.include? "content"
|
85
|
-
|
85
|
+
self.content = data["content"]
|
86
86
|
end
|
87
87
|
if data.include? "level"
|
88
|
-
|
88
|
+
self.level = data["level"]
|
89
89
|
end
|
90
90
|
if data.include? "created_at"
|
91
|
-
|
91
|
+
self.created_at = data["created_at"]
|
92
92
|
end
|
93
93
|
|
94
94
|
self
|
@@ -129,43 +129,43 @@ module ProcessOut
|
|
129
129
|
# +data+:: +Hash+ of data coming from the API
|
130
130
|
def fill_with_data(data)
|
131
131
|
if data.include? "id"
|
132
|
-
|
132
|
+
self.id = data["id"]
|
133
133
|
end
|
134
134
|
if data.include? "project"
|
135
|
-
|
135
|
+
self.project = data["project"]
|
136
136
|
end
|
137
137
|
if data.include? "customer"
|
138
|
-
|
138
|
+
self.customer = data["customer"]
|
139
139
|
end
|
140
140
|
if data.include? "token"
|
141
|
-
|
141
|
+
self.token = data["token"]
|
142
142
|
end
|
143
143
|
if data.include? "url"
|
144
|
-
|
144
|
+
self.url = data["url"]
|
145
145
|
end
|
146
146
|
if data.include? "authorized"
|
147
|
-
|
147
|
+
self.authorized = data["authorized"]
|
148
148
|
end
|
149
149
|
if data.include? "name"
|
150
|
-
|
150
|
+
self.name = data["name"]
|
151
151
|
end
|
152
152
|
if data.include? "currency"
|
153
|
-
|
153
|
+
self.currency = data["currency"]
|
154
154
|
end
|
155
155
|
if data.include? "return_url"
|
156
|
-
|
156
|
+
self.return_url = data["return_url"]
|
157
157
|
end
|
158
158
|
if data.include? "cancel_url"
|
159
|
-
|
159
|
+
self.cancel_url = data["cancel_url"]
|
160
160
|
end
|
161
161
|
if data.include? "custom"
|
162
|
-
|
162
|
+
self.custom = data["custom"]
|
163
163
|
end
|
164
164
|
if data.include? "sandbox"
|
165
|
-
|
165
|
+
self.sandbox = data["sandbox"]
|
166
166
|
end
|
167
167
|
if data.include? "created_at"
|
168
|
-
|
168
|
+
self.created_at = data["created_at"]
|
169
169
|
end
|
170
170
|
|
171
171
|
self
|
data/lib/processout/card.rb
CHANGED
@@ -115,43 +115,43 @@ module ProcessOut
|
|
115
115
|
# +data+:: +Hash+ of data coming from the API
|
116
116
|
def fill_with_data(data)
|
117
117
|
if data.include? "id"
|
118
|
-
|
118
|
+
self.id = data["id"]
|
119
119
|
end
|
120
120
|
if data.include? "project"
|
121
|
-
|
121
|
+
self.project = data["project"]
|
122
122
|
end
|
123
123
|
if data.include? "brand"
|
124
|
-
|
124
|
+
self.brand = data["brand"]
|
125
125
|
end
|
126
126
|
if data.include? "type"
|
127
|
-
|
127
|
+
self.type = data["type"]
|
128
128
|
end
|
129
129
|
if data.include? "bank_name"
|
130
|
-
|
130
|
+
self.bank_name = data["bank_name"]
|
131
131
|
end
|
132
132
|
if data.include? "level"
|
133
|
-
|
133
|
+
self.level = data["level"]
|
134
134
|
end
|
135
135
|
if data.include? "iin"
|
136
|
-
|
136
|
+
self.iin = data["iin"]
|
137
137
|
end
|
138
138
|
if data.include? "last_4_digits"
|
139
|
-
|
139
|
+
self.last_4_digits = data["last_4_digits"]
|
140
140
|
end
|
141
141
|
if data.include? "exp_month"
|
142
|
-
|
142
|
+
self.exp_month = data["exp_month"]
|
143
143
|
end
|
144
144
|
if data.include? "exp_year"
|
145
|
-
|
145
|
+
self.exp_year = data["exp_year"]
|
146
146
|
end
|
147
147
|
if data.include? "metadata"
|
148
|
-
|
148
|
+
self.metadata = data["metadata"]
|
149
149
|
end
|
150
150
|
if data.include? "sandbox"
|
151
|
-
|
151
|
+
self.sandbox = data["sandbox"]
|
152
152
|
end
|
153
153
|
if data.include? "created_at"
|
154
|
-
|
154
|
+
self.created_at = data["created_at"]
|
155
155
|
end
|
156
156
|
|
157
157
|
self
|
data/lib/processout/coupon.rb
CHANGED
@@ -115,43 +115,43 @@ module ProcessOut
|
|
115
115
|
# +data+:: +Hash+ of data coming from the API
|
116
116
|
def fill_with_data(data)
|
117
117
|
if data.include? "id"
|
118
|
-
|
118
|
+
self.id = data["id"]
|
119
119
|
end
|
120
120
|
if data.include? "project"
|
121
|
-
|
121
|
+
self.project = data["project"]
|
122
122
|
end
|
123
123
|
if data.include? "name"
|
124
|
-
|
124
|
+
self.name = data["name"]
|
125
125
|
end
|
126
126
|
if data.include? "amount_off"
|
127
|
-
|
127
|
+
self.amount_off = data["amount_off"]
|
128
128
|
end
|
129
129
|
if data.include? "percent_off"
|
130
|
-
|
130
|
+
self.percent_off = data["percent_off"]
|
131
131
|
end
|
132
132
|
if data.include? "currency"
|
133
|
-
|
133
|
+
self.currency = data["currency"]
|
134
134
|
end
|
135
135
|
if data.include? "max_redemptions"
|
136
|
-
|
136
|
+
self.max_redemptions = data["max_redemptions"]
|
137
137
|
end
|
138
138
|
if data.include? "expires_at"
|
139
|
-
|
139
|
+
self.expires_at = data["expires_at"]
|
140
140
|
end
|
141
141
|
if data.include? "metadata"
|
142
|
-
|
142
|
+
self.metadata = data["metadata"]
|
143
143
|
end
|
144
144
|
if data.include? "iteration_count"
|
145
|
-
|
145
|
+
self.iteration_count = data["iteration_count"]
|
146
146
|
end
|
147
147
|
if data.include? "redeemed_number"
|
148
|
-
|
148
|
+
self.redeemed_number = data["redeemed_number"]
|
149
149
|
end
|
150
150
|
if data.include? "sandbox"
|
151
|
-
|
151
|
+
self.sandbox = data["sandbox"]
|
152
152
|
end
|
153
153
|
if data.include? "created_at"
|
154
|
-
|
154
|
+
self.created_at = data["created_at"]
|
155
155
|
end
|
156
156
|
|
157
157
|
self
|
data/lib/processout/customer.rb
CHANGED
@@ -139,55 +139,55 @@ module ProcessOut
|
|
139
139
|
# +data+:: +Hash+ of data coming from the API
|
140
140
|
def fill_with_data(data)
|
141
141
|
if data.include? "id"
|
142
|
-
|
142
|
+
self.id = data["id"]
|
143
143
|
end
|
144
144
|
if data.include? "project"
|
145
|
-
|
145
|
+
self.project = data["project"]
|
146
146
|
end
|
147
147
|
if data.include? "email"
|
148
|
-
|
148
|
+
self.email = data["email"]
|
149
149
|
end
|
150
150
|
if data.include? "first_name"
|
151
|
-
|
151
|
+
self.first_name = data["first_name"]
|
152
152
|
end
|
153
153
|
if data.include? "last_name"
|
154
|
-
|
154
|
+
self.last_name = data["last_name"]
|
155
155
|
end
|
156
156
|
if data.include? "address1"
|
157
|
-
|
157
|
+
self.address1 = data["address1"]
|
158
158
|
end
|
159
159
|
if data.include? "address2"
|
160
|
-
|
160
|
+
self.address2 = data["address2"]
|
161
161
|
end
|
162
162
|
if data.include? "city"
|
163
|
-
|
163
|
+
self.city = data["city"]
|
164
164
|
end
|
165
165
|
if data.include? "state"
|
166
|
-
|
166
|
+
self.state = data["state"]
|
167
167
|
end
|
168
168
|
if data.include? "zip"
|
169
|
-
|
169
|
+
self.zip = data["zip"]
|
170
170
|
end
|
171
171
|
if data.include? "country_code"
|
172
|
-
|
172
|
+
self.country_code = data["country_code"]
|
173
173
|
end
|
174
174
|
if data.include? "balance"
|
175
|
-
|
175
|
+
self.balance = data["balance"]
|
176
176
|
end
|
177
177
|
if data.include? "currency"
|
178
|
-
|
178
|
+
self.currency = data["currency"]
|
179
179
|
end
|
180
180
|
if data.include? "metadata"
|
181
|
-
|
181
|
+
self.metadata = data["metadata"]
|
182
182
|
end
|
183
183
|
if data.include? "has_pin"
|
184
|
-
|
184
|
+
self.has_pin = data["has_pin"]
|
185
185
|
end
|
186
186
|
if data.include? "sandbox"
|
187
|
-
|
187
|
+
self.sandbox = data["sandbox"]
|
188
188
|
end
|
189
189
|
if data.include? "created_at"
|
190
|
-
|
190
|
+
self.created_at = data["created_at"]
|
191
191
|
end
|
192
192
|
|
193
193
|
self
|
@@ -42,10 +42,10 @@ module ProcessOut
|
|
42
42
|
# +data+:: +Hash+ of data coming from the API
|
43
43
|
def fill_with_data(data)
|
44
44
|
if data.include? "type"
|
45
|
-
|
45
|
+
self.type = data["type"]
|
46
46
|
end
|
47
47
|
if data.include? "value"
|
48
|
-
|
48
|
+
self.value = data["value"]
|
49
49
|
end
|
50
50
|
|
51
51
|
self
|
data/lib/processout/discount.rb
CHANGED
@@ -105,31 +105,31 @@ module ProcessOut
|
|
105
105
|
# +data+:: +Hash+ of data coming from the API
|
106
106
|
def fill_with_data(data)
|
107
107
|
if data.include? "id"
|
108
|
-
|
108
|
+
self.id = data["id"]
|
109
109
|
end
|
110
110
|
if data.include? "project"
|
111
|
-
|
111
|
+
self.project = data["project"]
|
112
112
|
end
|
113
113
|
if data.include? "subscription"
|
114
|
-
|
114
|
+
self.subscription = data["subscription"]
|
115
115
|
end
|
116
116
|
if data.include? "coupon"
|
117
|
-
|
117
|
+
self.coupon = data["coupon"]
|
118
118
|
end
|
119
119
|
if data.include? "amount"
|
120
|
-
|
120
|
+
self.amount = data["amount"]
|
121
121
|
end
|
122
122
|
if data.include? "expires_at"
|
123
|
-
|
123
|
+
self.expires_at = data["expires_at"]
|
124
124
|
end
|
125
125
|
if data.include? "metadata"
|
126
|
-
|
126
|
+
self.metadata = data["metadata"]
|
127
127
|
end
|
128
128
|
if data.include? "sandbox"
|
129
|
-
|
129
|
+
self.sandbox = data["sandbox"]
|
130
130
|
end
|
131
131
|
if data.include? "created_at"
|
132
|
-
|
132
|
+
self.created_at = data["created_at"]
|
133
133
|
end
|
134
134
|
|
135
135
|
self
|
data/lib/processout/event.rb
CHANGED
@@ -74,22 +74,22 @@ module ProcessOut
|
|
74
74
|
# +data+:: +Hash+ of data coming from the API
|
75
75
|
def fill_with_data(data)
|
76
76
|
if data.include? "id"
|
77
|
-
|
77
|
+
self.id = data["id"]
|
78
78
|
end
|
79
79
|
if data.include? "project"
|
80
|
-
|
80
|
+
self.project = data["project"]
|
81
81
|
end
|
82
82
|
if data.include? "name"
|
83
|
-
|
83
|
+
self.name = data["name"]
|
84
84
|
end
|
85
85
|
if data.include? "data"
|
86
|
-
|
86
|
+
self.data = data["data"]
|
87
87
|
end
|
88
88
|
if data.include? "sandbox"
|
89
|
-
|
89
|
+
self.sandbox = data["sandbox"]
|
90
90
|
end
|
91
91
|
if data.include? "fired_at"
|
92
|
-
|
92
|
+
self.fired_at = data["fired_at"]
|
93
93
|
end
|
94
94
|
|
95
95
|
self
|
data/lib/processout/gateway.rb
CHANGED
@@ -78,28 +78,28 @@ module ProcessOut
|
|
78
78
|
# +data+:: +Hash+ of data coming from the API
|
79
79
|
def fill_with_data(data)
|
80
80
|
if data.include? "id"
|
81
|
-
|
81
|
+
self.id = data["id"]
|
82
82
|
end
|
83
83
|
if data.include? "name"
|
84
|
-
|
84
|
+
self.name = data["name"]
|
85
85
|
end
|
86
86
|
if data.include? "display_name"
|
87
|
-
|
87
|
+
self.display_name = data["display_name"]
|
88
88
|
end
|
89
89
|
if data.include? "logo_url"
|
90
|
-
|
90
|
+
self.logo_url = data["logo_url"]
|
91
91
|
end
|
92
92
|
if data.include? "url"
|
93
|
-
|
93
|
+
self.url = data["url"]
|
94
94
|
end
|
95
95
|
if data.include? "flows"
|
96
|
-
|
96
|
+
self.flows = data["flows"]
|
97
97
|
end
|
98
98
|
if data.include? "tags"
|
99
|
-
|
99
|
+
self.tags = data["tags"]
|
100
100
|
end
|
101
101
|
if data.include? "description"
|
102
|
-
|
102
|
+
self.description = data["description"]
|
103
103
|
end
|
104
104
|
|
105
105
|
self
|
@@ -74,19 +74,19 @@ module ProcessOut
|
|
74
74
|
# +data+:: +Hash+ of data coming from the API
|
75
75
|
def fill_with_data(data)
|
76
76
|
if data.include? "id"
|
77
|
-
|
77
|
+
self.id = data["id"]
|
78
78
|
end
|
79
79
|
if data.include? "project"
|
80
|
-
|
80
|
+
self.project = data["project"]
|
81
81
|
end
|
82
82
|
if data.include? "gateway"
|
83
|
-
|
83
|
+
self.gateway = data["gateway"]
|
84
84
|
end
|
85
85
|
if data.include? "enabled"
|
86
|
-
|
86
|
+
self.enabled = data["enabled"]
|
87
87
|
end
|
88
88
|
if data.include? "public_keys"
|
89
|
-
|
89
|
+
self.public_keys = data["public_keys"]
|
90
90
|
end
|
91
91
|
|
92
92
|
self
|
data/lib/processout/invoice.rb
CHANGED
@@ -154,52 +154,52 @@ module ProcessOut
|
|
154
154
|
# +data+:: +Hash+ of data coming from the API
|
155
155
|
def fill_with_data(data)
|
156
156
|
if data.include? "id"
|
157
|
-
|
157
|
+
self.id = data["id"]
|
158
158
|
end
|
159
159
|
if data.include? "project"
|
160
|
-
|
160
|
+
self.project = data["project"]
|
161
161
|
end
|
162
162
|
if data.include? "transaction"
|
163
|
-
|
163
|
+
self.transaction = data["transaction"]
|
164
164
|
end
|
165
165
|
if data.include? "customer"
|
166
|
-
|
166
|
+
self.customer = data["customer"]
|
167
167
|
end
|
168
168
|
if data.include? "subscription"
|
169
|
-
|
169
|
+
self.subscription = data["subscription"]
|
170
170
|
end
|
171
171
|
if data.include? "url"
|
172
|
-
|
172
|
+
self.url = data["url"]
|
173
173
|
end
|
174
174
|
if data.include? "name"
|
175
|
-
|
175
|
+
self.name = data["name"]
|
176
176
|
end
|
177
177
|
if data.include? "amount"
|
178
|
-
|
178
|
+
self.amount = data["amount"]
|
179
179
|
end
|
180
180
|
if data.include? "currency"
|
181
|
-
|
181
|
+
self.currency = data["currency"]
|
182
182
|
end
|
183
183
|
if data.include? "metadata"
|
184
|
-
|
184
|
+
self.metadata = data["metadata"]
|
185
185
|
end
|
186
186
|
if data.include? "request_email"
|
187
|
-
|
187
|
+
self.request_email = data["request_email"]
|
188
188
|
end
|
189
189
|
if data.include? "request_shipping"
|
190
|
-
|
190
|
+
self.request_shipping = data["request_shipping"]
|
191
191
|
end
|
192
192
|
if data.include? "return_url"
|
193
|
-
|
193
|
+
self.return_url = data["return_url"]
|
194
194
|
end
|
195
195
|
if data.include? "cancel_url"
|
196
|
-
|
196
|
+
self.cancel_url = data["cancel_url"]
|
197
197
|
end
|
198
198
|
if data.include? "sandbox"
|
199
|
-
|
199
|
+
self.sandbox = data["sandbox"]
|
200
200
|
end
|
201
201
|
if data.include? "created_at"
|
202
|
-
|
202
|
+
self.created_at = data["created_at"]
|
203
203
|
end
|
204
204
|
|
205
205
|
self
|
@@ -25,7 +25,7 @@ module ProcessOut
|
|
25
25
|
# ComputeData computes the data to be sent in the request
|
26
26
|
def compute_data(data, options)
|
27
27
|
unless options.nil?
|
28
|
-
data["expand"] = options.fetch(:expand,
|
28
|
+
data["expand"] = options.fetch(:expand, [])
|
29
29
|
data["filter"] = options.fetch(:filter, "")
|
30
30
|
data["limit"] = options.fetch(:limit, "")
|
31
31
|
data["page"] = options.fetch(:page, "")
|
@@ -54,7 +54,7 @@ module ProcessOut
|
|
54
54
|
def post(path, data, options)
|
55
55
|
uri = URI(@client.host + path)
|
56
56
|
req = Net::HTTP::Post.new(uri)
|
57
|
-
req.body = data.to_json
|
57
|
+
req.body = self.compute_data(data, options).to_json
|
58
58
|
self.apply_headers(req, options)
|
59
59
|
|
60
60
|
Net::HTTP.start(uri.hostname, uri.port,
|
@@ -68,7 +68,7 @@ module ProcessOut
|
|
68
68
|
def put(path, data, options)
|
69
69
|
uri = URI(@client.host + path)
|
70
70
|
req = Net::HTTP::Put.new(uri)
|
71
|
-
req.body = data.to_json
|
71
|
+
req.body = self.compute_data(data, options).to_json
|
72
72
|
self.apply_headers(req, options)
|
73
73
|
|
74
74
|
Net::HTTP.start(uri.hostname, uri.port,
|
@@ -81,8 +81,8 @@ module ProcessOut
|
|
81
81
|
# DELETE sends a delete request to the API
|
82
82
|
def delete(path, data, options)
|
83
83
|
uri = URI(@client.host + path)
|
84
|
+
uri.query = URI.encode_www_form(self.compute_data(data, options))
|
84
85
|
req = Net::HTTP::Delete.new(uri)
|
85
|
-
req.body = data.to_json
|
86
86
|
self.apply_headers(req, options)
|
87
87
|
|
88
88
|
Net::HTTP.start(uri.hostname, uri.port,
|
data/lib/processout/plan.rb
CHANGED
@@ -109,40 +109,40 @@ module ProcessOut
|
|
109
109
|
# +data+:: +Hash+ of data coming from the API
|
110
110
|
def fill_with_data(data)
|
111
111
|
if data.include? "id"
|
112
|
-
|
112
|
+
self.id = data["id"]
|
113
113
|
end
|
114
114
|
if data.include? "project"
|
115
|
-
|
115
|
+
self.project = data["project"]
|
116
116
|
end
|
117
117
|
if data.include? "name"
|
118
|
-
|
118
|
+
self.name = data["name"]
|
119
119
|
end
|
120
120
|
if data.include? "amount"
|
121
|
-
|
121
|
+
self.amount = data["amount"]
|
122
122
|
end
|
123
123
|
if data.include? "currency"
|
124
|
-
|
124
|
+
self.currency = data["currency"]
|
125
125
|
end
|
126
126
|
if data.include? "metadata"
|
127
|
-
|
127
|
+
self.metadata = data["metadata"]
|
128
128
|
end
|
129
129
|
if data.include? "interval"
|
130
|
-
|
130
|
+
self.interval = data["interval"]
|
131
131
|
end
|
132
132
|
if data.include? "trial_period"
|
133
|
-
|
133
|
+
self.trial_period = data["trial_period"]
|
134
134
|
end
|
135
135
|
if data.include? "return_url"
|
136
|
-
|
136
|
+
self.return_url = data["return_url"]
|
137
137
|
end
|
138
138
|
if data.include? "cancel_url"
|
139
|
-
|
139
|
+
self.cancel_url = data["cancel_url"]
|
140
140
|
end
|
141
141
|
if data.include? "sandbox"
|
142
|
-
|
142
|
+
self.sandbox = data["sandbox"]
|
143
143
|
end
|
144
144
|
if data.include? "created_at"
|
145
|
-
|
145
|
+
self.created_at = data["created_at"]
|
146
146
|
end
|
147
147
|
|
148
148
|
self
|
data/lib/processout/product.rb
CHANGED
@@ -115,43 +115,43 @@ module ProcessOut
|
|
115
115
|
# +data+:: +Hash+ of data coming from the API
|
116
116
|
def fill_with_data(data)
|
117
117
|
if data.include? "id"
|
118
|
-
|
118
|
+
self.id = data["id"]
|
119
119
|
end
|
120
120
|
if data.include? "project"
|
121
|
-
|
121
|
+
self.project = data["project"]
|
122
122
|
end
|
123
123
|
if data.include? "url"
|
124
|
-
|
124
|
+
self.url = data["url"]
|
125
125
|
end
|
126
126
|
if data.include? "name"
|
127
|
-
|
127
|
+
self.name = data["name"]
|
128
128
|
end
|
129
129
|
if data.include? "amount"
|
130
|
-
|
130
|
+
self.amount = data["amount"]
|
131
131
|
end
|
132
132
|
if data.include? "currency"
|
133
|
-
|
133
|
+
self.currency = data["currency"]
|
134
134
|
end
|
135
135
|
if data.include? "metadata"
|
136
|
-
|
136
|
+
self.metadata = data["metadata"]
|
137
137
|
end
|
138
138
|
if data.include? "request_email"
|
139
|
-
|
139
|
+
self.request_email = data["request_email"]
|
140
140
|
end
|
141
141
|
if data.include? "request_shipping"
|
142
|
-
|
142
|
+
self.request_shipping = data["request_shipping"]
|
143
143
|
end
|
144
144
|
if data.include? "return_url"
|
145
|
-
|
145
|
+
self.return_url = data["return_url"]
|
146
146
|
end
|
147
147
|
if data.include? "cancel_url"
|
148
|
-
|
148
|
+
self.cancel_url = data["cancel_url"]
|
149
149
|
end
|
150
150
|
if data.include? "sandbox"
|
151
|
-
|
151
|
+
self.sandbox = data["sandbox"]
|
152
152
|
end
|
153
153
|
if data.include? "created_at"
|
154
|
-
|
154
|
+
self.created_at = data["created_at"]
|
155
155
|
end
|
156
156
|
|
157
157
|
self
|
data/lib/processout/project.rb
CHANGED
@@ -60,19 +60,19 @@ module ProcessOut
|
|
60
60
|
# +data+:: +Hash+ of data coming from the API
|
61
61
|
def fill_with_data(data)
|
62
62
|
if data.include? "id"
|
63
|
-
|
63
|
+
self.id = data["id"]
|
64
64
|
end
|
65
65
|
if data.include? "name"
|
66
|
-
|
66
|
+
self.name = data["name"]
|
67
67
|
end
|
68
68
|
if data.include? "logo_url"
|
69
|
-
|
69
|
+
self.logo_url = data["logo_url"]
|
70
70
|
end
|
71
71
|
if data.include? "email"
|
72
|
-
|
72
|
+
self.email = data["email"]
|
73
73
|
end
|
74
74
|
if data.include? "created_at"
|
75
|
-
|
75
|
+
self.created_at = data["created_at"]
|
76
76
|
end
|
77
77
|
|
78
78
|
self
|
data/lib/processout/refund.rb
CHANGED
@@ -85,28 +85,28 @@ module ProcessOut
|
|
85
85
|
# +data+:: +Hash+ of data coming from the API
|
86
86
|
def fill_with_data(data)
|
87
87
|
if data.include? "id"
|
88
|
-
|
88
|
+
self.id = data["id"]
|
89
89
|
end
|
90
90
|
if data.include? "transaction"
|
91
|
-
|
91
|
+
self.transaction = data["transaction"]
|
92
92
|
end
|
93
93
|
if data.include? "reason"
|
94
|
-
|
94
|
+
self.reason = data["reason"]
|
95
95
|
end
|
96
96
|
if data.include? "information"
|
97
|
-
|
97
|
+
self.information = data["information"]
|
98
98
|
end
|
99
99
|
if data.include? "amount"
|
100
|
-
|
100
|
+
self.amount = data["amount"]
|
101
101
|
end
|
102
102
|
if data.include? "metadata"
|
103
|
-
|
103
|
+
self.metadata = data["metadata"]
|
104
104
|
end
|
105
105
|
if data.include? "sandbox"
|
106
|
-
|
106
|
+
self.sandbox = data["sandbox"]
|
107
107
|
end
|
108
108
|
if data.include? "created_at"
|
109
|
-
|
109
|
+
self.created_at = data["created_at"]
|
110
110
|
end
|
111
111
|
|
112
112
|
self
|
@@ -202,76 +202,76 @@ module ProcessOut
|
|
202
202
|
# +data+:: +Hash+ of data coming from the API
|
203
203
|
def fill_with_data(data)
|
204
204
|
if data.include? "id"
|
205
|
-
|
205
|
+
self.id = data["id"]
|
206
206
|
end
|
207
207
|
if data.include? "project"
|
208
|
-
|
208
|
+
self.project = data["project"]
|
209
209
|
end
|
210
210
|
if data.include? "plan"
|
211
|
-
|
211
|
+
self.plan = data["plan"]
|
212
212
|
end
|
213
213
|
if data.include? "customer"
|
214
|
-
|
214
|
+
self.customer = data["customer"]
|
215
215
|
end
|
216
216
|
if data.include? "token"
|
217
|
-
|
217
|
+
self.token = data["token"]
|
218
218
|
end
|
219
219
|
if data.include? "url"
|
220
|
-
|
220
|
+
self.url = data["url"]
|
221
221
|
end
|
222
222
|
if data.include? "name"
|
223
|
-
|
223
|
+
self.name = data["name"]
|
224
224
|
end
|
225
225
|
if data.include? "amount"
|
226
|
-
|
226
|
+
self.amount = data["amount"]
|
227
227
|
end
|
228
228
|
if data.include? "currency"
|
229
|
-
|
229
|
+
self.currency = data["currency"]
|
230
230
|
end
|
231
231
|
if data.include? "metadata"
|
232
|
-
|
232
|
+
self.metadata = data["metadata"]
|
233
233
|
end
|
234
234
|
if data.include? "interval"
|
235
|
-
|
235
|
+
self.interval = data["interval"]
|
236
236
|
end
|
237
237
|
if data.include? "trial_end_at"
|
238
|
-
|
238
|
+
self.trial_end_at = data["trial_end_at"]
|
239
239
|
end
|
240
240
|
if data.include? "activated"
|
241
|
-
|
241
|
+
self.activated = data["activated"]
|
242
242
|
end
|
243
243
|
if data.include? "active"
|
244
|
-
|
244
|
+
self.active = data["active"]
|
245
245
|
end
|
246
246
|
if data.include? "canceled"
|
247
|
-
|
247
|
+
self.canceled = data["canceled"]
|
248
248
|
end
|
249
249
|
if data.include? "cancellation_reason"
|
250
|
-
|
250
|
+
self.cancellation_reason = data["cancellation_reason"]
|
251
251
|
end
|
252
252
|
if data.include? "pending_cancellation"
|
253
|
-
|
253
|
+
self.pending_cancellation = data["pending_cancellation"]
|
254
254
|
end
|
255
255
|
if data.include? "cancel_at"
|
256
|
-
|
256
|
+
self.cancel_at = data["cancel_at"]
|
257
257
|
end
|
258
258
|
if data.include? "return_url"
|
259
|
-
|
259
|
+
self.return_url = data["return_url"]
|
260
260
|
end
|
261
261
|
if data.include? "cancel_url"
|
262
|
-
|
262
|
+
self.cancel_url = data["cancel_url"]
|
263
263
|
end
|
264
264
|
if data.include? "sandbox"
|
265
|
-
|
265
|
+
self.sandbox = data["sandbox"]
|
266
266
|
end
|
267
267
|
if data.include? "created_at"
|
268
|
-
|
268
|
+
self.created_at = data["created_at"]
|
269
269
|
end
|
270
270
|
if data.include? "activated_at"
|
271
|
-
|
271
|
+
self.activated_at = data["activated_at"]
|
272
272
|
end
|
273
273
|
if data.include? "iterate_at"
|
274
|
-
|
274
|
+
self.iterate_at = data["iterate_at"]
|
275
275
|
end
|
276
276
|
|
277
277
|
self
|
data/lib/processout/token.rb
CHANGED
@@ -80,22 +80,22 @@ module ProcessOut
|
|
80
80
|
# +data+:: +Hash+ of data coming from the API
|
81
81
|
def fill_with_data(data)
|
82
82
|
if data.include? "id"
|
83
|
-
|
83
|
+
self.id = data["id"]
|
84
84
|
end
|
85
85
|
if data.include? "customer"
|
86
|
-
|
86
|
+
self.customer = data["customer"]
|
87
87
|
end
|
88
88
|
if data.include? "card"
|
89
|
-
|
89
|
+
self.card = data["card"]
|
90
90
|
end
|
91
91
|
if data.include? "metadata"
|
92
|
-
|
92
|
+
self.metadata = data["metadata"]
|
93
93
|
end
|
94
94
|
if data.include? "is_subscription_only"
|
95
|
-
|
95
|
+
self.is_subscription_only = data["is_subscription_only"]
|
96
96
|
end
|
97
97
|
if data.include? "created_at"
|
98
|
-
|
98
|
+
self.created_at = data["created_at"]
|
99
99
|
end
|
100
100
|
|
101
101
|
self
|
@@ -167,55 +167,55 @@ module ProcessOut
|
|
167
167
|
# +data+:: +Hash+ of data coming from the API
|
168
168
|
def fill_with_data(data)
|
169
169
|
if data.include? "id"
|
170
|
-
|
170
|
+
self.id = data["id"]
|
171
171
|
end
|
172
172
|
if data.include? "project"
|
173
|
-
|
173
|
+
self.project = data["project"]
|
174
174
|
end
|
175
175
|
if data.include? "customer"
|
176
|
-
|
176
|
+
self.customer = data["customer"]
|
177
177
|
end
|
178
178
|
if data.include? "subscription"
|
179
|
-
|
179
|
+
self.subscription = data["subscription"]
|
180
180
|
end
|
181
181
|
if data.include? "token"
|
182
|
-
|
182
|
+
self.token = data["token"]
|
183
183
|
end
|
184
184
|
if data.include? "card"
|
185
|
-
|
185
|
+
self.card = data["card"]
|
186
186
|
end
|
187
187
|
if data.include? "name"
|
188
|
-
|
188
|
+
self.name = data["name"]
|
189
189
|
end
|
190
190
|
if data.include? "authorized_amount"
|
191
|
-
|
191
|
+
self.authorized_amount = data["authorized_amount"]
|
192
192
|
end
|
193
193
|
if data.include? "captured_amount"
|
194
|
-
|
194
|
+
self.captured_amount = data["captured_amount"]
|
195
195
|
end
|
196
196
|
if data.include? "currency"
|
197
|
-
|
197
|
+
self.currency = data["currency"]
|
198
198
|
end
|
199
199
|
if data.include? "status"
|
200
|
-
|
200
|
+
self.status = data["status"]
|
201
201
|
end
|
202
202
|
if data.include? "authorized"
|
203
|
-
|
203
|
+
self.authorized = data["authorized"]
|
204
204
|
end
|
205
205
|
if data.include? "captured"
|
206
|
-
|
206
|
+
self.captured = data["captured"]
|
207
207
|
end
|
208
208
|
if data.include? "processout_fee"
|
209
|
-
|
209
|
+
self.processout_fee = data["processout_fee"]
|
210
210
|
end
|
211
211
|
if data.include? "metadata"
|
212
|
-
|
212
|
+
self.metadata = data["metadata"]
|
213
213
|
end
|
214
214
|
if data.include? "sandbox"
|
215
|
-
|
215
|
+
self.sandbox = data["sandbox"]
|
216
216
|
end
|
217
217
|
if data.include? "created_at"
|
218
|
-
|
218
|
+
self.created_at = data["created_at"]
|
219
219
|
end
|
220
220
|
|
221
221
|
self
|
data/lib/processout/version.rb
CHANGED
data/lib/processout/webhook.rb
CHANGED
@@ -116,40 +116,40 @@ module ProcessOut
|
|
116
116
|
# +data+:: +Hash+ of data coming from the API
|
117
117
|
def fill_with_data(data)
|
118
118
|
if data.include? "id"
|
119
|
-
|
119
|
+
self.id = data["id"]
|
120
120
|
end
|
121
121
|
if data.include? "project"
|
122
|
-
|
122
|
+
self.project = data["project"]
|
123
123
|
end
|
124
124
|
if data.include? "event"
|
125
|
-
|
125
|
+
self.event = data["event"]
|
126
126
|
end
|
127
127
|
if data.include? "request_url"
|
128
|
-
|
128
|
+
self.request_url = data["request_url"]
|
129
129
|
end
|
130
130
|
if data.include? "request_method"
|
131
|
-
|
131
|
+
self.request_method = data["request_method"]
|
132
132
|
end
|
133
133
|
if data.include? "response_body"
|
134
|
-
|
134
|
+
self.response_body = data["response_body"]
|
135
135
|
end
|
136
136
|
if data.include? "response_code"
|
137
|
-
|
137
|
+
self.response_code = data["response_code"]
|
138
138
|
end
|
139
139
|
if data.include? "response_headers"
|
140
|
-
|
140
|
+
self.response_headers = data["response_headers"]
|
141
141
|
end
|
142
142
|
if data.include? "response_time_ms"
|
143
|
-
|
143
|
+
self.response_time_ms = data["response_time_ms"]
|
144
144
|
end
|
145
145
|
if data.include? "status"
|
146
|
-
|
146
|
+
self.status = data["status"]
|
147
147
|
end
|
148
148
|
if data.include? "created_at"
|
149
|
-
|
149
|
+
self.created_at = data["created_at"]
|
150
150
|
end
|
151
151
|
if data.include? "release_at"
|
152
|
-
|
152
|
+
self.release_at = data["release_at"]
|
153
153
|
end
|
154
154
|
|
155
155
|
self
|