Skip to content

Commit 4abe195

Browse files
authored
Merge pull request #3 from knottnhupfer/master
fixed read tier_prices properly for magento 2
2 parents a9aed6d + 3a42cc2 commit 4abe195

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/main/java/com/github/chen0040/magento/models/Product.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
package com.github.chen0040.magento.models;
22

33

4-
import lombok.Getter;
5-
import lombok.Setter;
6-
74
import java.util.ArrayList;
8-
import java.util.HashMap;
95
import java.util.List;
10-
import java.util.Map;
6+
7+
import lombok.Getter;
8+
import lombok.Setter;
119

1210

1311
/**
@@ -38,7 +36,7 @@ public class Product {
3836
private double weight = 1;
3937
private List<MagentoAttribute> extension_attributes = new ArrayList<>();
4038
private List<String> product_links = new ArrayList<>();
41-
private List<Double> tier_prices = new ArrayList<>();
39+
private List<TierPrices> tier_prices = new ArrayList<>();
4240
private List<MagentoAttribute> custom_attributes = new ArrayList<>();
4341

4442
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.github.chen0040.magento.models;
2+
3+
import lombok.Data;
4+
5+
@Data
6+
public class TierPrices {
7+
8+
private long customer_group_id = 1;
9+
private long qty = 10000;
10+
private double value = 10;
11+
}

0 commit comments

Comments
 (0)