lib/mangopay/http_calls.rb in mangopay-3.0.0 vs lib/mangopay/http_calls.rb in mangopay-3.0.1
- old
+ new
@@ -1,53 +1,53 @@
-module MangoPay
- module HTTPCalls
- module Create
- module ClassMethods
-
- def create(*id, params)
- id = id.empty? ? nil : id[0]
- response = MangoPay.request(:post, url(id), params)
- end
- end
-
- def self.included(base)
- base.extend(ClassMethods)
- end
- end
-
- module Update
- module ClassMethods
- def update(id = nil, params = {})
- response = MangoPay.request(:put, url(id), params)
- end
- end
-
- def self.included(base)
- base.extend(ClassMethods)
- end
- end
-
- module Fetch
- module ClassMethods
- def fetch(id = nil, filters = {})
- response = MangoPay.request(:get, url(id), filters)
- end
- end
-
- def self.included(base)
- base.extend(ClassMethods)
- end
- end
-
- module Refund
- module ClassMethods
- def refund(id = nil, params = {})
- MangoPay.request(:post, url(id) + '/refunds', params)
- end
- end
-
- def self.included(base)
- base.extend(ClassMethods)
- end
- end
- end
-end
+module MangoPay
+ module HTTPCalls
+ module Create
+ module ClassMethods
+
+ def create(*id, params)
+ id = id.empty? ? nil : id[0]
+ response = MangoPay.request(:post, url(id), params)
+ end
+ end
+
+ def self.included(base)
+ base.extend(ClassMethods)
+ end
+ end
+
+ module Update
+ module ClassMethods
+ def update(id = nil, params = {})
+ response = MangoPay.request(:put, url(id), params)
+ end
+ end
+
+ def self.included(base)
+ base.extend(ClassMethods)
+ end
+ end
+
+ module Fetch
+ module ClassMethods
+ def fetch(id = nil, filters = {})
+ response = MangoPay.request(:get, url(id), filters)
+ end
+ end
+
+ def self.included(base)
+ base.extend(ClassMethods)
+ end
+ end
+
+ module Refund
+ module ClassMethods
+ def refund(id = nil, params = {})
+ MangoPay.request(:post, url(id) + '/refunds', params)
+ end
+ end
+
+ def self.included(base)
+ base.extend(ClassMethods)
+ end
+ end
+ end
+end