mastercard_api_core 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mastercard/core/controller.rb +2 -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: 2150f2800cafbbaffe3222bc742bbf71da53bd47
|
4
|
+
data.tar.gz: 552b61b4877c7d07439631ab14df512e08302083
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64be18bc473d661d8592be890cc5317d70a1f8208da4c35cf82c26741f65308eb5651e003f96005d78667501dd32a382e642d36eab462e4bc4130446a5931bcc
|
7
|
+
data.tar.gz: 09c632919282c1643d74d9704e38dfce46bdcf0ca73787ef9174bc82b227951378d2ee7d3c49cb9f7ce83b8887b4aee9682ec944590a8dac01fa953f9a214a20
|
@@ -137,20 +137,10 @@ module MasterCard
|
|
137
137
|
|
138
138
|
if 200 <= status && status <= 299
|
139
139
|
return content
|
140
|
-
|
141
|
-
raise InvalidRequestException.new("Unexpected response code returned from the API causing redirect",status,content)
|
142
|
-
elsif status == 400
|
143
|
-
raise InvalidRequestException.new("Bad request",status,content)
|
144
|
-
elsif status == 401
|
145
|
-
raise APIException.new("You are not authorized to make this request",status,content)
|
146
|
-
elsif status == 403
|
147
|
-
raise APIException.new("You are not authorized to make this request",status,content)
|
148
|
-
elsif status == 404
|
149
|
-
raise ObjectNotFoundException.new("Object not found",status,content)
|
150
|
-
elsif status == 405
|
140
|
+
else
|
151
141
|
raise APIException.new("Operation not allowed",status,content)
|
152
142
|
else
|
153
|
-
|
143
|
+
|
154
144
|
end
|
155
145
|
|
156
146
|
end
|