affiliation-api-client 0.1.9 → 0.1.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66af09ad996158f74e8c6894398feb7c876ad241
4
- data.tar.gz: 3a2d4fe068076aa44ab2db4d8996d68d6e2f671a
3
+ metadata.gz: 90fa2eb47ce15d1ab0899ec8de34fca9757adf87
4
+ data.tar.gz: 6e966c77535e392ccb10f952116103a3c2b831fa
5
5
  SHA512:
6
- metadata.gz: fd6d86026aca032f8030b325318704ad5e7609014b8224d860c5735eb296c158758085f92ce065b53405c6430e1cf53c4bdf4840916aea809ba8f2341c598f59
7
- data.tar.gz: ff7db4a482e6fd3354866d0e682d351080713c9b4b62c29a86823b9054486ea331d23bc3d88e9d2cfe0b0a4e3745ca9905a8039735395c55314c7fcd63bcb10a
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
@@ -11,6 +11,7 @@ module AffiliationApi
11
11
  :ad_space_name,
12
12
  :network_status,
13
13
  :network_updated_at,
14
+ :network_data,
14
15
  :needs_review,
15
16
  :categories,
16
17
  :category_ids,
@@ -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
@@ -1,3 +1,3 @@
1
1
  module AffiliationApi
2
- VERSION = '0.1.9'
2
+ VERSION = '0.1.10'
3
3
  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.9
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-08 00:00:00.000000000 Z
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