lime_light_platform 1.0.0.15 → 1.0.0.16

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
  SHA256:
3
- metadata.gz: a8f9891a2f22cf55275d0096295ca483c400edf7bba69db55db2f2a3e41e783d
4
- data.tar.gz: 2210ba3db45baf80089270e92ca3923e9b707f42a57bc6160e2b1556d1b539ad
3
+ metadata.gz: '09f2bca772887236554cfe2749f7411360da8c4131f56b93e7d7e1a39974e37e'
4
+ data.tar.gz: 15f8a202f5d378925bb628d6815b664ff441cb0d5c89e4f16b545aabd0e6f4df
5
5
  SHA512:
6
- metadata.gz: 1d9773c695ce28f6870461d4aa88592788a218103545a30f7dd1cc37f149085ee3e07fa3e4c7c13f533d152e980f76890f21a06323a008f4af856286fa72bf7a
7
- data.tar.gz: 691ed15fead9b5058ebb2a85b2afaa2ba693e7c348cc30d230126d154bd4f23cc0003edba40a37ce71fff671a12da2fa63165f11c9f62aec37134fd8ad9cfc4f
6
+ metadata.gz: 03623aa042a619d2bf228d1b9c8eefc397265d0c8e87786abee8aed6d26f799e906a10aa8f64045801066b9e745394d2f6de4109d1c1fc1fec13649904c88f39
7
+ data.tar.gz: 82ed306ec967182eaf3beea414cb842a7b37f270393c3a0ee40d815263322027c7379420effe1f5d2cdd1c99f6c9323004d978cd4ccb81f76356b28efff670ef
@@ -276,9 +276,32 @@ class LimeLightPlatform < AppBase
276
276
 
277
277
  def order_view request={}
278
278
  call_params = base_call_params __method__
279
- call_params[:body] = {
280
- 'order_id' => get_if_exists('order_id', request, [])
281
- }
279
+ call_params[:body] = { 'order_id' => get_if_exists('order_id', request, []) }
280
+ common_perform_post call_params
281
+ end
282
+
283
+ def product_attribute_index request={}
284
+ call_params = base_call_params __method__
285
+ call_params[:body] = { 'product_id' => get_if_exists('product_id', request, []) }
286
+ common_perform_post call_params
287
+ end
288
+
289
+ def product_bundle_index
290
+ common_perform_post base_call_params(__method__)
291
+ end
292
+
293
+ def product_bundle_view product_id
294
+ common_entity_view_perform_post base_call_params(__method__), 'product_id', product_id
295
+ end
296
+
297
+ def product_copy request={}
298
+ call_params = base_call_params __method__
299
+ call_params[:body] = { 'product_id' => get_if_exists('product_id', request, 0) }
300
+
301
+ if key_exists('new_name', request)
302
+ call_params[:body]['new_name'] = request['new_name']
303
+ end
304
+
282
305
  common_perform_post call_params
283
306
  end
284
307
 
@@ -309,6 +332,10 @@ class LimeLightPlatform < AppBase
309
332
  common_perform_post call_params
310
333
  end
311
334
 
335
+ def product_delete product_id
336
+ common_entity_view_perform_post base_call_params(__method__), 'product_id', product_id
337
+ end
338
+
312
339
  def product_update request={}
313
340
  call_params = base_call_params __method__
314
341
  update_options = [
Binary file
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'lime_light_platform'
3
- s.version = '1.0.0.15'
3
+ s.version = '1.0.0.16'
4
4
  s.date = '2018-05-07'
5
5
  s.summary = "Official Lime Light eCommerce Platform API Ruby Gem (In Development)"
6
6
  s.description = "Official Lime Light eCommerce Platform API Ruby Gem (In Development)"
@@ -10,7 +10,7 @@ RSpec.describe LimeLightPlatform, "#NewOrder" do
10
10
  ENV['API_USERNAME'],
11
11
  ENV['API_PASSWORD'],
12
12
  ENV['DEV_SUB'],
13
- true
13
+ false
14
14
  )
15
15
  response = lime_light.new_order({
16
16
  'first_name' => Faker::Name.first_name,
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe LimeLightPlatform, "#offer_view" do
4
- context "Lime Light Platform - Membersip API - offer_view" do
4
+ context "Lime Light Platform - Membership API - offer_view" do
5
5
  it "Returns offer data for a given campaign" do
6
6
  lime_light = LimeLightPlatform.new(
7
7
  ENV['APP_KEY'],
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe LimeLightPlatform, "#order_find" do
4
- context "Lime Light Platform - Membersip API - order_find" do
4
+ context "Lime Light Platform - Membership API - order_find" do
5
5
  it "Finds an order based upon criteria" do
6
6
  lime_light = LimeLightPlatform.new(
7
7
  ENV['APP_KEY'],
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe LimeLightPlatform, "#order_find_updated" do
4
- context "Lime Light Platform - Membersip API - order_find_updated" do
4
+ context "Lime Light Platform - Membership API - order_find_updated" do
5
5
  it "Finds orders with updated statuses" do
6
6
  lime_light = LimeLightPlatform.new(
7
7
  ENV['APP_KEY'],
@@ -1,14 +1,14 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe LimeLightPlatform, "#order_force_bill" do
4
- context "Lime Light Platform - Membersip API - order_force_bill" do
4
+ context "Lime Light Platform - Membership API - order_force_bill" do
5
5
  it "Force rebill an order" do
6
6
  lime_light = LimeLightPlatform.new(
7
7
  ENV['APP_KEY'],
8
8
  ENV['API_USERNAME'],
9
9
  ENV['API_PASSWORD'],
10
10
  ENV['DEV_SUB'],
11
- true
11
+ false
12
12
  )
13
13
  response = lime_light.order_force_bill({
14
14
  'order_id' => ENV['TEST_ORDER_FORCE_BILL_ORDER_ID'],
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe LimeLightPlatform, "#order_reprocess" do
4
- context "Lime Light Platform - Membersip API - order_reprocess" do
4
+ context "Lime Light Platform - Membership API - order_reprocess" do
5
5
  it "Reprocesses an order" do
6
6
  lime_light = LimeLightPlatform.new(
7
7
  ENV['APP_KEY'],
@@ -1,14 +1,14 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe LimeLightPlatform, "#order_update_recurring" do
4
- context "Lime Light Platform - Membersip API - order_update_recurring" do
4
+ context "Lime Light Platform - Membership API - order_update_recurring" do
5
5
  it "Updates the recurring status of an order" do
6
6
  lime_light = LimeLightPlatform.new(
7
7
  ENV['APP_KEY'],
8
8
  ENV['API_USERNAME'],
9
9
  ENV['API_PASSWORD'],
10
10
  ENV['DEV_SUB'],
11
- true
11
+ false
12
12
  )
13
13
  response = lime_light.order_update_recurring({
14
14
  'order_id' => ENV['TEST_ORDER_UPDATE_RECURRING_ORDER'],
@@ -3,14 +3,14 @@ require 'faker'
3
3
  Faker::Config.locale = 'en-US'
4
4
 
5
5
  RSpec.describe LimeLightPlatform, "#order_update" do
6
- context "Lime Light Platform - Membersip API - order_update" do
6
+ context "Lime Light Platform - Membership API - order_update" do
7
7
  it "Updates an order based upon criteria" do
8
8
  lime_light = LimeLightPlatform.new(
9
9
  ENV['APP_KEY'],
10
10
  ENV['API_USERNAME'],
11
11
  ENV['API_PASSWORD'],
12
12
  ENV['DEV_SUB'],
13
- true
13
+ false
14
14
  )
15
15
  options = [
16
16
  {
@@ -1,14 +1,14 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe LimeLightPlatform, "#order_view" do
4
- context "Lime Light Platform - Membersip API - order_view" do
4
+ context "Lime Light Platform - Membership API - order_view" do
5
5
  it "View order details" do
6
6
  lime_light = LimeLightPlatform.new(
7
7
  ENV['APP_KEY'],
8
8
  ENV['API_USERNAME'],
9
9
  ENV['API_PASSWORD'],
10
10
  ENV['DEV_SUB'],
11
- true
11
+ false
12
12
  )
13
13
  response = lime_light.order_view({
14
14
  'order_id' => [
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe LimeLightPlatform, "#product_attribute_index " do
4
+ context "Lime Light Platform - Membership API - product_attribute_index " do
5
+ it "Fetches the variant properties of one or more products" do
6
+ lime_light = LimeLightPlatform.new(
7
+ ENV['APP_KEY'],
8
+ ENV['API_USERNAME'],
9
+ ENV['API_PASSWORD'],
10
+ ENV['DEV_SUB'],
11
+ false
12
+ )
13
+ response = lime_light.product_attribute_index({
14
+ 'product_id' => [
15
+ ENV['TEST_PRODUCT_ATTRIBUTE_INDEX_PRODUCT_ID_1'],
16
+ ENV['TEST_PRODUCT_ATTRIBUTE_INDEX_PRODUCT_ID_2']
17
+ ]
18
+ })
19
+ expect(response[:success]).to eq true
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe LimeLightPlatform, "#product_bundle_index" do
4
+ context "Lime Light Platform - Membership API - product_bundle_index" do
5
+ it "Fetches all products bundle data" do
6
+ lime_light = LimeLightPlatform.new(
7
+ ENV['APP_KEY'],
8
+ ENV['API_USERNAME'],
9
+ ENV['API_PASSWORD'],
10
+ ENV['DEV_SUB'],
11
+ false
12
+ )
13
+ response = lime_light.product_bundle_index
14
+ expect(response[:success]).to eq true
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe LimeLightPlatform, "#product_bundle_view" do
4
+ context "Lime Light Platform - Membership API - product_bundle_view" do
5
+ it "Fetches a specific product bundle and returns its data" do
6
+ lime_light = LimeLightPlatform.new(
7
+ ENV['APP_KEY'],
8
+ ENV['API_USERNAME'],
9
+ ENV['API_PASSWORD'],
10
+ ENV['DEV_SUB'],
11
+ false
12
+ )
13
+ response = lime_light.product_bundle_view ENV['TEST_PRODUCT_BUNDLE_VIEW_PRODUCT_ID_1']
14
+ expect(response[:success]).to eq true
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+ require 'faker'
3
+
4
+ RSpec.describe LimeLightPlatform, "#product_copy" do
5
+ context "Lime Light Platform - Membership API - product_copy" do
6
+ it "Copies a product" do
7
+ lime_light = LimeLightPlatform.new(
8
+ ENV['APP_KEY'],
9
+ ENV['API_USERNAME'],
10
+ ENV['API_PASSWORD'],
11
+ ENV['DEV_SUB'],
12
+ false
13
+ )
14
+ response = lime_light.product_copy({
15
+ 'product_id' => ENV['TEST_PRODUCT_COPY_PRODUCT_ID'],
16
+ 'new_name' => Faker::Pokemon.name
17
+ })
18
+ expect(response[:success]).to eq true
19
+ end
20
+ end
21
+ end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  require 'faker'
3
3
 
4
4
  RSpec.describe LimeLightPlatform, "#product_create" do
5
- context "Lime Light Platform - Membersip API - product_create" do
5
+ context "Lime Light Platform - Membership API - product_create" do
6
6
  it "Creates a Lime Light Product" do
7
7
  lime_light = LimeLightPlatform.new(
8
8
  ENV['APP_KEY'],
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe LimeLightPlatform, "#product_delete" do
4
+ context "Lime Light Platform - Membership API - product_delete" do
5
+ it "Deletes a product" do
6
+ lime_light = LimeLightPlatform.new(
7
+ ENV['APP_KEY'],
8
+ ENV['API_USERNAME'],
9
+ ENV['API_PASSWORD'],
10
+ ENV['DEV_SUB'],
11
+ false
12
+ )
13
+ response = lime_light.product_delete ENV['TEST_PRODUCT_DELETE_PRODUCT_ID']
14
+ expect(response[:success]).to eq true
15
+ end
16
+ end
17
+ end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  require 'faker'
3
3
 
4
4
  RSpec.describe LimeLightPlatform, "#product_update" do
5
- context "Lime Light Platform - Membersip API - product_update" do
5
+ context "Lime Light Platform - Membership API - product_update" do
6
6
  it "Updates a Lime Light Product" do
7
7
  lime_light = LimeLightPlatform.new(
8
8
  ENV['APP_KEY'],
@@ -8,7 +8,7 @@ RSpec.describe LimeLightPlatform, "#prospect_find" do
8
8
  ENV['API_USERNAME'],
9
9
  ENV['API_PASSWORD'],
10
10
  ENV['DEV_SUB'],
11
- true
11
+ false
12
12
  )
13
13
  possible_criteria = [
14
14
  {
@@ -9,7 +9,7 @@ RSpec.describe LimeLightPlatform, "#prospect_update" do
9
9
  ENV['API_USERNAME'],
10
10
  ENV['API_PASSWORD'],
11
11
  ENV['DEV_SUB'],
12
- true
12
+ false
13
13
  )
14
14
  options = [
15
15
  {
@@ -8,7 +8,7 @@ RSpec.describe LimeLightPlatform, "#prospect_view" do
8
8
  ENV['API_USERNAME'],
9
9
  ENV['API_PASSWORD'],
10
10
  ENV['DEV_SUB'],
11
- true
11
+ false
12
12
  )
13
13
  response = lime_light.prospect_view({
14
14
  'prospect_id' => [
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  RSpec.describe LimeLightPlatform, "#validate_credentials" do
4
- context "Lime Light Platform - Membersip API - validate_credentials" do
4
+ context "Lime Light Platform - Membership API - validate_credentials" do
5
5
  it "Validates the API username and password" do
6
6
  lime_light = LimeLightPlatform.new(
7
7
  ENV['APP_KEY'],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lime_light_platform
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.15
4
+ version: 1.0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marvin Titus-Casseus
@@ -25,6 +25,7 @@ files:
25
25
  - lime_light_platform-1.0.0.12.gem
26
26
  - lime_light_platform-1.0.0.13.gem
27
27
  - lime_light_platform-1.0.0.14.gem
28
+ - lime_light_platform-1.0.0.15.gem
28
29
  - lime_light_platform.gemspec
29
30
  - spec/billing_model_view_spec.rb
30
31
  - spec/campaign_find_active_spec.rb
@@ -40,7 +41,12 @@ files:
40
41
  - spec/order_update_recurring_spec.rb
41
42
  - spec/order_update_spec.rb
42
43
  - spec/order_view_spec.rb
44
+ - spec/product_attribute_index_spec.rb
45
+ - spec/product_bundle_index_spec.rb
46
+ - spec/product_bundle_view_spec.rb
47
+ - spec/product_copy_spec.rb
43
48
  - spec/product_create_spec.rb
49
+ - spec/product_delete_spec.rb
44
50
  - spec/product_update_spec.rb
45
51
  - spec/prospect_find_spec.rb
46
52
  - spec/prospect_update_spec.rb