etsy 0.3.0 → 0.3.4
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 +5 -5
- data/.travis.yml +14 -5
- data/CHANGELOG.md +16 -0
- data/Gemfile +0 -4
- data/README.md +50 -8
- data/etsy.gemspec +5 -5
- data/lib/etsy/about.rb +15 -0
- data/lib/etsy/attribute_value.rb +46 -0
- data/lib/etsy/bill_charge.rb +31 -0
- data/lib/etsy/bill_payment.rb +28 -0
- data/lib/etsy/billing_overview.rb +18 -0
- data/lib/etsy/image.rb +5 -2
- data/lib/etsy/listing.rb +108 -7
- data/lib/etsy/model.rb +2 -2
- data/lib/etsy/receipt.rb +23 -3
- data/lib/etsy/request.rb +5 -5
- data/lib/etsy/secure_client.rb +1 -1
- data/lib/etsy/shipping_info.rb +27 -0
- data/lib/etsy/shipping_template.rb +10 -1
- data/lib/etsy/shop.rb +5 -0
- data/lib/etsy/transaction.rb +51 -1
- data/lib/etsy/user.rb +30 -0
- data/lib/etsy/variation/property_set.rb +71 -0
- data/lib/etsy/version.rb +1 -1
- data/lib/etsy.rb +10 -3
- data/test/fixtures/about/getAbout.json +16 -0
- data/test/fixtures/attribute_value/findAllListingPropertyValues.json +44 -0
- data/test/fixtures/bill_charge/getBillCharge.json +1 -0
- data/test/fixtures/bill_payment/getBillPayment.json +1 -0
- data/test/fixtures/billing_overview/getBillingOverview.json +1 -0
- data/test/fixtures/listing/findAllShopListings.json +5 -3
- data/test/fixtures/listing/getListing.single.includeImages.json +1 -0
- data/test/fixtures/receipt/findAllShopReceipts.json +4 -4
- data/test/fixtures/shipping_info/getShippingInfo.json +1 -0
- data/test/fixtures/shop/findAllShop.json +1 -1
- data/test/fixtures/shop/findAllShop.single.json +1 -1
- data/test/fixtures/shop/getShop.multiple.json +1 -1
- data/test/fixtures/shop/getShop.single.json +2 -1
- data/test/test_helper.rb +0 -2
- data/test/unit/etsy/attribute_value_test.rb +67 -0
- data/test/unit/etsy/bill_charge_test.rb +24 -0
- data/test/unit/etsy/bill_payment_test.rb +24 -0
- data/test/unit/etsy/billing_overview_test.rb +20 -0
- data/test/unit/etsy/image_test.rb +15 -3
- data/test/unit/etsy/listing_test.rb +45 -7
- data/test/unit/etsy/model_test.rb +4 -4
- data/test/unit/etsy/receipt_test.rb +15 -0
- data/test/unit/etsy/shipping_info_test.rb +24 -0
- data/test/unit/etsy/shop_about_test.rb +43 -0
- data/test/unit/etsy/shop_test.rb +12 -0
- data/test/unit/etsy/transaction_test.rb +5 -1
- metadata +50 -17
data/test/unit/etsy/shop_test.rb
CHANGED
@@ -52,6 +52,10 @@ module Etsy
|
|
52
52
|
@shop.image_url.should == "http://ny-image3.etsy.com/iusb_760x100.8484779.jpg"
|
53
53
|
end
|
54
54
|
|
55
|
+
should "have a value for :icon_url" do
|
56
|
+
@shop.icon_url.should == "https://img0.etsystatic.com/173/0/8740774/isla_fullxfull.22739584_nydzpho0.jpg"
|
57
|
+
end
|
58
|
+
|
55
59
|
should "have a value for :url" do
|
56
60
|
@shop.url.should == "http://www.etsy.com/shop/littletjane"
|
57
61
|
end
|
@@ -98,6 +102,14 @@ module Etsy
|
|
98
102
|
|
99
103
|
shop.listings.should == 'listings'
|
100
104
|
end
|
105
|
+
|
106
|
+
should "have an About object" do
|
107
|
+
shop = Shop.new
|
108
|
+
|
109
|
+
About.stubs(:find_by_shop).with(shop).returns('about')
|
110
|
+
|
111
|
+
shop.about.should == 'about'
|
112
|
+
end
|
101
113
|
end
|
102
114
|
|
103
115
|
end
|
@@ -15,6 +15,10 @@ module Etsy
|
|
15
15
|
Transaction.find_all_by_buyer_id(1, {'key' => 'value'}).should == transactions
|
16
16
|
end
|
17
17
|
|
18
|
+
should "be able to find transactions for a receipt" do
|
19
|
+
transactions = mock_request('/receipts/1/transactions', {'key' => 'value'}, 'Transaction', 'findAllShopTransactions.json')
|
20
|
+
Transaction.find_all_by_receipt_id(1, {'key' => 'value'}).should == transactions
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
context "An instance of the Transaction class" do
|
@@ -43,7 +47,7 @@ module Etsy
|
|
43
47
|
end
|
44
48
|
|
45
49
|
should "know the buyer" do
|
46
|
-
User.stubs(:find).with(1).returns('user')
|
50
|
+
User.stubs(:find).with(1, {}).returns('user')
|
47
51
|
|
48
52
|
transaction = Transaction.new
|
49
53
|
transaction.stubs(:buyer_id).with().returns(1)
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: etsy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
+
- Iuliia Kolomiiets
|
7
8
|
- Patrick Reagan
|
8
9
|
- Katrina Owen
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2021-11-04 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: json
|
@@ -29,30 +30,30 @@ dependencies:
|
|
29
30
|
name: oauth
|
30
31
|
requirement: !ruby/object:Gem::Requirement
|
31
32
|
requirements:
|
32
|
-
- - "
|
33
|
+
- - ">="
|
33
34
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.
|
35
|
+
version: 0.5.5
|
35
36
|
type: :runtime
|
36
37
|
prerelease: false
|
37
38
|
version_requirements: !ruby/object:Gem::Requirement
|
38
39
|
requirements:
|
39
|
-
- - "
|
40
|
+
- - ">="
|
40
41
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.
|
42
|
+
version: 0.5.5
|
42
43
|
- !ruby/object:Gem::Dependency
|
43
44
|
name: rake
|
44
45
|
requirement: !ruby/object:Gem::Requirement
|
45
46
|
requirements:
|
46
47
|
- - "~>"
|
47
48
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
49
|
+
version: 12.3.3
|
49
50
|
type: :development
|
50
51
|
prerelease: false
|
51
52
|
version_requirements: !ruby/object:Gem::Requirement
|
52
53
|
requirements:
|
53
54
|
- - "~>"
|
54
55
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
56
|
+
version: 12.3.3
|
56
57
|
- !ruby/object:Gem::Dependency
|
57
58
|
name: jnunemaker-matchy
|
58
59
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,22 +97,22 @@ dependencies:
|
|
96
97
|
- !ruby/object:Gem::Version
|
97
98
|
version: 0.13.3
|
98
99
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
100
|
+
name: test-unit
|
100
101
|
requirement: !ruby/object:Gem::Requirement
|
101
102
|
requirements:
|
102
|
-
- -
|
103
|
+
- - "~>"
|
103
104
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
105
|
+
version: 3.5.0
|
105
106
|
type: :development
|
106
107
|
prerelease: false
|
107
108
|
version_requirements: !ruby/object:Gem::Requirement
|
108
109
|
requirements:
|
109
|
-
- -
|
110
|
+
- - "~>"
|
110
111
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
112
|
+
version: 3.5.0
|
112
113
|
description: A friendly Ruby interface to the Etsy API
|
113
114
|
email:
|
114
|
-
- reaganpr@gmail.com
|
115
|
+
- etsygeminfo@gmail.com, reaganpr@gmail.com
|
115
116
|
- katrina.owen@gmail.com
|
116
117
|
executables: []
|
117
118
|
extensions: []
|
@@ -119,14 +120,20 @@ extra_rdoc_files: []
|
|
119
120
|
files:
|
120
121
|
- ".gitignore"
|
121
122
|
- ".travis.yml"
|
123
|
+
- CHANGELOG.md
|
122
124
|
- Gemfile
|
123
125
|
- LICENSE
|
124
126
|
- README.md
|
125
127
|
- Rakefile
|
126
128
|
- etsy.gemspec
|
127
129
|
- lib/etsy.rb
|
130
|
+
- lib/etsy/about.rb
|
128
131
|
- lib/etsy/address.rb
|
132
|
+
- lib/etsy/attribute_value.rb
|
129
133
|
- lib/etsy/basic_client.rb
|
134
|
+
- lib/etsy/bill_charge.rb
|
135
|
+
- lib/etsy/bill_payment.rb
|
136
|
+
- lib/etsy/billing_overview.rb
|
130
137
|
- lib/etsy/category.rb
|
131
138
|
- lib/etsy/country.rb
|
132
139
|
- lib/etsy/favorite_listing.rb
|
@@ -140,13 +147,20 @@ files:
|
|
140
147
|
- lib/etsy/response.rb
|
141
148
|
- lib/etsy/section.rb
|
142
149
|
- lib/etsy/secure_client.rb
|
150
|
+
- lib/etsy/shipping_info.rb
|
143
151
|
- lib/etsy/shipping_template.rb
|
144
152
|
- lib/etsy/shop.rb
|
145
153
|
- lib/etsy/transaction.rb
|
146
154
|
- lib/etsy/user.rb
|
155
|
+
- lib/etsy/variation/property_set.rb
|
147
156
|
- lib/etsy/verification_request.rb
|
148
157
|
- lib/etsy/version.rb
|
158
|
+
- test/fixtures/about/getAbout.json
|
149
159
|
- test/fixtures/address/getUserAddresses.json
|
160
|
+
- test/fixtures/attribute_value/findAllListingPropertyValues.json
|
161
|
+
- test/fixtures/bill_charge/getBillCharge.json
|
162
|
+
- test/fixtures/bill_payment/getBillPayment.json
|
163
|
+
- test/fixtures/billing_overview/getBillingOverview.json
|
150
164
|
- test/fixtures/category/findAllSubCategoryChildren.json
|
151
165
|
- test/fixtures/category/findAllTopCategory.json
|
152
166
|
- test/fixtures/category/findAllTopCategory.single.json
|
@@ -159,11 +173,13 @@ files:
|
|
159
173
|
- test/fixtures/listing/findAllListingActive.category.json
|
160
174
|
- test/fixtures/listing/findAllShopListings.json
|
161
175
|
- test/fixtures/listing/getListing.multiple.json
|
176
|
+
- test/fixtures/listing/getListing.single.includeImages.json
|
162
177
|
- test/fixtures/listing/getListing.single.json
|
163
178
|
- test/fixtures/payment_template/getPaymentTemplate.json
|
164
179
|
- test/fixtures/profile/new.json
|
165
180
|
- test/fixtures/receipt/findAllShopReceipts.json
|
166
181
|
- test/fixtures/section/getShopSection.json
|
182
|
+
- test/fixtures/shipping_info/getShippingInfo.json
|
167
183
|
- test/fixtures/shipping_template/getShippingTemplate.json
|
168
184
|
- test/fixtures/shop/findAllShop.json
|
169
185
|
- test/fixtures/shop/findAllShop.single.json
|
@@ -177,7 +193,11 @@ files:
|
|
177
193
|
- test/fixtures/user/getUser.single.withShops.json
|
178
194
|
- test/test_helper.rb
|
179
195
|
- test/unit/etsy/address_test.rb
|
196
|
+
- test/unit/etsy/attribute_value_test.rb
|
180
197
|
- test/unit/etsy/basic_client_test.rb
|
198
|
+
- test/unit/etsy/bill_charge_test.rb
|
199
|
+
- test/unit/etsy/bill_payment_test.rb
|
200
|
+
- test/unit/etsy/billing_overview_test.rb
|
181
201
|
- test/unit/etsy/category_test.rb
|
182
202
|
- test/unit/etsy/country_test.rb
|
183
203
|
- test/unit/etsy/favorite_listing_test.rb
|
@@ -191,7 +211,9 @@ files:
|
|
191
211
|
- test/unit/etsy/response_test.rb
|
192
212
|
- test/unit/etsy/section_test.rb
|
193
213
|
- test/unit/etsy/secure_client_test.rb
|
214
|
+
- test/unit/etsy/shipping_info_test.rb
|
194
215
|
- test/unit/etsy/shipping_template_test.rb
|
216
|
+
- test/unit/etsy/shop_about_test.rb
|
195
217
|
- test/unit/etsy/shop_test.rb
|
196
218
|
- test/unit/etsy/transaction_test.rb
|
197
219
|
- test/unit/etsy/user_test.rb
|
@@ -216,13 +238,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
238
|
- !ruby/object:Gem::Version
|
217
239
|
version: '0'
|
218
240
|
requirements: []
|
219
|
-
|
220
|
-
rubygems_version: 2.2.2
|
241
|
+
rubygems_version: 3.1.2
|
221
242
|
signing_key:
|
222
243
|
specification_version: 4
|
223
244
|
summary: Provides a friendly ruby-like wrapper for the Etsy API
|
224
245
|
test_files:
|
246
|
+
- test/fixtures/about/getAbout.json
|
225
247
|
- test/fixtures/address/getUserAddresses.json
|
248
|
+
- test/fixtures/attribute_value/findAllListingPropertyValues.json
|
249
|
+
- test/fixtures/bill_charge/getBillCharge.json
|
250
|
+
- test/fixtures/bill_payment/getBillPayment.json
|
251
|
+
- test/fixtures/billing_overview/getBillingOverview.json
|
226
252
|
- test/fixtures/category/findAllSubCategoryChildren.json
|
227
253
|
- test/fixtures/category/findAllTopCategory.json
|
228
254
|
- test/fixtures/category/findAllTopCategory.single.json
|
@@ -235,11 +261,13 @@ test_files:
|
|
235
261
|
- test/fixtures/listing/findAllListingActive.category.json
|
236
262
|
- test/fixtures/listing/findAllShopListings.json
|
237
263
|
- test/fixtures/listing/getListing.multiple.json
|
264
|
+
- test/fixtures/listing/getListing.single.includeImages.json
|
238
265
|
- test/fixtures/listing/getListing.single.json
|
239
266
|
- test/fixtures/payment_template/getPaymentTemplate.json
|
240
267
|
- test/fixtures/profile/new.json
|
241
268
|
- test/fixtures/receipt/findAllShopReceipts.json
|
242
269
|
- test/fixtures/section/getShopSection.json
|
270
|
+
- test/fixtures/shipping_info/getShippingInfo.json
|
243
271
|
- test/fixtures/shipping_template/getShippingTemplate.json
|
244
272
|
- test/fixtures/shop/findAllShop.json
|
245
273
|
- test/fixtures/shop/findAllShop.single.json
|
@@ -253,7 +281,11 @@ test_files:
|
|
253
281
|
- test/fixtures/user/getUser.single.withShops.json
|
254
282
|
- test/test_helper.rb
|
255
283
|
- test/unit/etsy/address_test.rb
|
284
|
+
- test/unit/etsy/attribute_value_test.rb
|
256
285
|
- test/unit/etsy/basic_client_test.rb
|
286
|
+
- test/unit/etsy/bill_charge_test.rb
|
287
|
+
- test/unit/etsy/bill_payment_test.rb
|
288
|
+
- test/unit/etsy/billing_overview_test.rb
|
257
289
|
- test/unit/etsy/category_test.rb
|
258
290
|
- test/unit/etsy/country_test.rb
|
259
291
|
- test/unit/etsy/favorite_listing_test.rb
|
@@ -267,10 +299,11 @@ test_files:
|
|
267
299
|
- test/unit/etsy/response_test.rb
|
268
300
|
- test/unit/etsy/section_test.rb
|
269
301
|
- test/unit/etsy/secure_client_test.rb
|
302
|
+
- test/unit/etsy/shipping_info_test.rb
|
270
303
|
- test/unit/etsy/shipping_template_test.rb
|
304
|
+
- test/unit/etsy/shop_about_test.rb
|
271
305
|
- test/unit/etsy/shop_test.rb
|
272
306
|
- test/unit/etsy/transaction_test.rb
|
273
307
|
- test/unit/etsy/user_test.rb
|
274
308
|
- test/unit/etsy/verification_request_test.rb
|
275
309
|
- test/unit/etsy_test.rb
|
276
|
-
has_rdoc:
|