affiliation-api-client 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90fa2eb47ce15d1ab0899ec8de34fca9757adf87
|
4
|
+
data.tar.gz: 6e966c77535e392ccb10f952116103a3c2b831fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae765d726b9f496255d49e0bc3d8af65e6a3de540edae5cef2c45f5ea384314a42b696a33cf9851d695fd00ef522d18f7427bfcd4545cb80fd3ebbea96a8b7ce
|
7
|
+
data.tar.gz: f84f590ef7cd746c9fc535c8b65e3e78dd4ff1174c5883ba1edb0fe273fc6736be12cae80a8d8632e2f5e69744f8e1f2442c7b490fc95036c9723f7e98ce7298
|
@@ -6,9 +6,10 @@ module AffiliationApi
|
|
6
6
|
autoload :Merchant, 'affiliation-api/merchant'
|
7
7
|
autoload :Ad, 'affiliation-api/ad'
|
8
8
|
autoload :Offer, 'affiliation-api/offer'
|
9
|
+
autoload 'MerchantVersion', 'affiliation-api/merchant_version'
|
9
10
|
|
10
11
|
def self.setup(api_key, api_secret, api_endpoint='https://affiliation.api.wizypay.com')
|
11
12
|
AffiliationApi::Resource::base_url = api_endpoint
|
12
13
|
AffiliationApi::Resource::with_hmac(api_key, api_secret)
|
13
14
|
end
|
14
|
-
end
|
15
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module AffiliationApi
|
2
|
+
class MerchantVersion < AffiliationApi::Resource
|
3
|
+
self.resource_path = 'versions'
|
4
|
+
|
5
|
+
attr_accessor :created_at, :event, :merchant
|
6
|
+
|
7
|
+
def merchant
|
8
|
+
Merchant.new @merchant['data']
|
9
|
+
end
|
10
|
+
|
11
|
+
def created_at
|
12
|
+
return nil unless @created_at.present?
|
13
|
+
Time.parse(@created_at)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: affiliation-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chaker Nakhli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: api-resource
|
@@ -93,6 +93,7 @@ files:
|
|
93
93
|
- lib/affiliation-api/ad.rb
|
94
94
|
- lib/affiliation-api/category.rb
|
95
95
|
- lib/affiliation-api/merchant.rb
|
96
|
+
- lib/affiliation-api/merchant_version.rb
|
96
97
|
- lib/affiliation-api/offer.rb
|
97
98
|
- lib/affiliation-api/resource.rb
|
98
99
|
- lib/affiliation-api/version.rb
|