lime_light_platform 1.0.0.20 → 1.0.0.21
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 +4 -4
- data/lib/lime_light_platform.rb +33 -0
- data/lime_light_platform-1.0.0.20.gem +0 -0
- data/lime_light_platform.gemspec +1 -1
- data/spec/campaign_payment_router_view_spec.rb +17 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3747bab0e49fabd5303b9211d6795fa0dcd79c78910651ab8ac81e04ce7954dc
|
4
|
+
data.tar.gz: 5b25c0c0098399d0ec37394dbf21d7a4e53a7f9f0a7553708743baf7409ae570
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89eea87483cded3bfb8cb31f72c63a3ea8a83a55694d06740643ae745bed7b4a8f04dce7dcaa235617574824b4d93bc32a23e8aa1261c161cca8a95b0ec9bdf6
|
7
|
+
data.tar.gz: 1ee6a62c86952bd10fe788a5da7efb0e50a447e7c136c3141643550baf5f0dc0a8dc15d9e4f9ea32aaf8d6c2f9a8fbf463a1b6ea7e3d2adf66617f76df7f6a55
|
data/lib/lime_light_platform.rb
CHANGED
@@ -120,6 +120,39 @@ class LimeLightPlatform < AppBase
|
|
120
120
|
common_entity_view_perform_post base_call_params(__method__), 'campaign_id', campaign_id
|
121
121
|
end
|
122
122
|
|
123
|
+
# Retrieve payment router data for a specified campaign ID
|
124
|
+
# @param campaign_id [Integer] Campaign ID from CRM instance
|
125
|
+
# @return [Hash] Common response object
|
126
|
+
def campaign_payment_router_view campaign_id
|
127
|
+
campaign_view_response = campaign_view campaign_id
|
128
|
+
combined_response = {
|
129
|
+
success: false,
|
130
|
+
data: {
|
131
|
+
has_payment_router: 0,
|
132
|
+
campaign_view_response: {},
|
133
|
+
payment_router_view_response: {}
|
134
|
+
},
|
135
|
+
}
|
136
|
+
|
137
|
+
combined_response[:data][:campaign_view_response] = campaign_view_response
|
138
|
+
|
139
|
+
if campaign_view_response[:success]
|
140
|
+
payment_router_id = campaign_view_response[:data]['payment_router_id']
|
141
|
+
|
142
|
+
if !payment_router_id.blank?
|
143
|
+
combined_response[:data][:has_payment_router] = 1
|
144
|
+
payment_router_view_response = payment_router_view [payment_router_id]
|
145
|
+
|
146
|
+
if payment_router_view_response[:success]
|
147
|
+
combined_response[:success] = true
|
148
|
+
combined_response[:data][:payment_router_view_response] = payment_router_view_response
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
combined_response
|
154
|
+
end
|
155
|
+
|
123
156
|
# Validate a coupon based on promo code and other coupon parameters
|
124
157
|
# @param request [Hash] Request payload hash
|
125
158
|
# @return [Hash] Common response object
|
Binary file
|
data/lime_light_platform.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'lime_light_platform'
|
3
|
-
s.version = '1.0.0.
|
3
|
+
s.version = '1.0.0.21'
|
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)"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe LimeLightPlatform, "#campaign_payment_router_view" do
|
4
|
+
context "Lime Light Platform - Membership API - campaign_view + payment_router_view" do
|
5
|
+
it "Returns payment router data that describes a given campaign" 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.campaign_payment_router_view ENV['TEST_CAMPAIGNID']
|
14
|
+
expect(response[:success]).to eq true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
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.
|
4
|
+
version: 1.0.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marvin Titus-Casseus
|
@@ -30,10 +30,12 @@ files:
|
|
30
30
|
- lime_light_platform-1.0.0.17.gem
|
31
31
|
- lime_light_platform-1.0.0.18.gem
|
32
32
|
- lime_light_platform-1.0.0.19.gem
|
33
|
+
- lime_light_platform-1.0.0.20.gem
|
33
34
|
- lime_light_platform.gemspec
|
34
35
|
- spec/authorize_payment_spec.rb
|
35
36
|
- spec/billing_model_view_spec.rb
|
36
37
|
- spec/campaign_find_active_spec.rb
|
38
|
+
- spec/campaign_payment_router_view_spec.rb
|
37
39
|
- spec/campaign_view_spec.rb
|
38
40
|
- spec/coupon_validate_spec.rb
|
39
41
|
- spec/customer_view_spec.rb
|