Skip to content

Commit

Permalink
chore: adding source parameter as rudderstack for rakuten
Browse files Browse the repository at this point in the history
  • Loading branch information
anantjain45823 committed Feb 6, 2024
1 parent 6919a9e commit 2a94bd8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cdk/v2/destinations/rakuten/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ steps:
template: |
const properties = $.constructProperties(.message);
const lineItems = $.constructLineItems(.message.properties)
$.context.payload = {...properties,...lineItems,xml:1, mid:.destination.Config.mid}
$.context.payload = {...properties,...lineItems,xml:1,source:'rudderstack', mid:.destination.Config.mid}
$.context.payload = $.removeUndefinedAndNullValues($.context.payload);
- name: buildResponse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { endpoint, commonOutputHeaders } from '../processor/commonConfig';
const commonParams = {
xml: 1,
source: 'rudderstack',
amtlist: '12500|12500',
qlist: '|5',
ord: 'SampleOrderId',
Expand Down
4 changes: 4 additions & 0 deletions test/integrations/destinations/rakuten/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const networkCallsData = [
params: {
mid: 'invalid_mid',
xml: 1,
source: 'rudderstack',
amtlist: '12500|12500',
qlist: '|5',
ord: 'SampleOrderId',
Expand All @@ -30,6 +31,7 @@ export const networkCallsData = [
params: {
mid: 'access_denied_for_mid',
xml: 1,
source: 'rudderstack',
amtlist: '12500|12500',
qlist: '|5',
ord: 'SampleOrderId',
Expand All @@ -54,6 +56,7 @@ export const networkCallsData = [
params: {
mid: 'valid_mid_with_good_records',
xml: 1,
source: 'rudderstack',
amtlist: '12500|12500',
qlist: '|5',
ord: 'SampleOrderId',
Expand All @@ -78,6 +81,7 @@ export const networkCallsData = [
params: {
mid: 'valid_mid_with_bad_records',
xml: 1,
source: 'rudderstack',
amtlist: '12500|12500',
qlist: '|5',
ord: 'SampleOrderId',
Expand Down
4 changes: 4 additions & 0 deletions test/integrations/destinations/rakuten/processor/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export const trackSuccess = [
params: {
mid: 'dummyMarketingId',
xml: 1,
source: 'rudderstack',
amtlist: '2000|2500|3000',
brandlist: 'SampleBrand||',
catidlist: '12345||',
Expand Down Expand Up @@ -209,6 +210,7 @@ export const trackSuccess = [
params: {
mid: 'dummyMarketingId',
xml: 1,
source: 'rudderstack',
amtlist: '12500|12500|3000',
couponlist: '||SALE50',
namelist: 'name_1|name_2|SampleProduct',
Expand Down Expand Up @@ -316,6 +318,7 @@ export const trackSuccess = [
params: {
mid: 'dummyMarketingId',
xml: 1,
source: 'rudderstack',
amtlist: '-12500|-12500',
skulist: 'custom sku 0|custom sku 1',
qlist: '1|5',
Expand Down Expand Up @@ -429,6 +432,7 @@ export const trackSuccess = [
params: {
mid: 'dummyMarketingId',
xml: 1,
source: 'rudderstack',
namelist: 'name_1|name_2|Discount',
amtlist: '12500|12500|-50000',
skulist: 'custom sku 0|custom sku 1|Discount',
Expand Down

0 comments on commit 2a94bd8

Please sign in to comment.