Skip to content

Commit 543665a

Browse files
author
mvgreen
committed
Make all toUpdate() methods public
1 parent af562c7 commit 543665a

4 files changed

Lines changed: 61 additions & 61 deletions

File tree

src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedCombination.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,23 @@ fun FetchedVariation.toUpdated(): UpdatedVariation {
3434
)
3535
}
3636

37-
private fun FetchedVariation.WholesalePrice.toUpdated() = UpdatedVariation.WholesalePrice(
37+
fun FetchedVariation.WholesalePrice.toUpdated() = UpdatedVariation.WholesalePrice(
3838
quantity = quantity,
3939
price = price
4040
)
4141

42-
private fun FetchedVariation.AttributeValue.toUpdated() = UpdatedVariation.AttributeValue(
42+
fun FetchedVariation.AttributeValue.toUpdated() = UpdatedVariation.AttributeValue(
4343
id = id,
4444
alias = type?.toAttributeValueAlias(),
4545
value = value
4646
)
4747

48-
private fun FetchedVariation.Option.toUpdated() = UpdatedVariation.Option(
48+
fun FetchedVariation.Option.toUpdated() = UpdatedVariation.Option(
4949
name = name,
5050
value = value
5151
)
5252

53-
private fun FetchedVariation.ProductDimensions.toUpdated() = UpdatedVariation.ProductDimensions(
53+
fun FetchedVariation.ProductDimensions.toUpdated() = UpdatedVariation.ProductDimensions(
5454
length = length,
5555
width = width,
5656
height = height

src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ fun FetchedOrder.HandlingFee.toUpdated(): UpdatedOrder.HandlingFee {
239239
)
240240
}
241241

242-
private fun FetchedOrder.Surcharge.toUpdated(): UpdatedOrder.Surcharge {
242+
fun FetchedOrder.Surcharge.toUpdated(): UpdatedOrder.Surcharge {
243243
return UpdatedOrder.Surcharge(
244244
id = id,
245245
value = value,
@@ -252,15 +252,15 @@ private fun FetchedOrder.Surcharge.toUpdated(): UpdatedOrder.Surcharge {
252252
)
253253
}
254254

255-
private fun FetchedOrder.BaseOrderItemTax.toUpdated(): UpdatedOrder.BaseOrderItemTax {
255+
fun FetchedOrder.BaseOrderItemTax.toUpdated(): UpdatedOrder.BaseOrderItemTax {
256256
return UpdatedOrder.BaseOrderItemTax(
257257
name = name,
258258
value = value,
259259
total = total
260260
)
261261
}
262262

263-
private fun FetchedOrder.UtmData.toUpdated(): UpdatedOrder.UtmData {
263+
fun FetchedOrder.UtmData.toUpdated(): UpdatedOrder.UtmData {
264264
return UpdatedOrder.UtmData(
265265
source = source,
266266
campaign = campaign,

src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedProduct.kt

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -65,36 +65,36 @@ fun FetchedProduct.toUpdated(): UpdatedProduct {
6565
)
6666
}
6767

68-
private fun FetchedProduct.Ribbon.toUpdated() = UpdatedProduct.Ribbon(
68+
fun FetchedProduct.Ribbon.toUpdated() = UpdatedProduct.Ribbon(
6969
text = text,
7070
color = color
7171
)
7272

73-
private fun FetchedProduct.SubscriptionSettings.toUpdated() = UpdatedProduct.SubscriptionSettings(
73+
fun FetchedProduct.SubscriptionSettings.toUpdated() = UpdatedProduct.SubscriptionSettings(
7474
subscriptionAllowed = subscriptionAllowed,
7575
oneTimePurchaseAllowed = oneTimePurchaseAllowed,
7676
oneTimePurchasePrice = oneTimePurchasePrice,
7777
recurringChargeSettings = recurringChargeSettings.toUpdated()
7878
)
7979

80-
private fun FetchedProduct.CustomPriceTier.toUpdated() = UpdatedProduct.CustomPriceTier(
80+
fun FetchedProduct.CustomPriceTier.toUpdated() = UpdatedProduct.CustomPriceTier(
8181
value = value,
8282
)
8383

84-
private fun List<FetchedProduct.RecurringChargeSettings>.toUpdated() = map {
84+
fun List<FetchedProduct.RecurringChargeSettings>.toUpdated() = map {
8585
UpdatedProduct.RecurringChargeSettings(
8686
recurringInterval = it.recurringInterval,
8787
recurringIntervalCount = it.recurringIntervalCount,
8888
subscriptionPriceWithSignUpFee = it.subscriptionPriceWithSignUpFee
8989
)
9090
}
9191

92-
private fun FetchedProduct.WholesalePrice.toUpdated() = UpdatedProduct.WholesalePrice(
92+
fun FetchedProduct.WholesalePrice.toUpdated() = UpdatedProduct.WholesalePrice(
9393
quantity = quantity,
9494
price = price
9595
)
9696

97-
private fun FetchedProduct.ProductOption.toUpdated() = when (this) {
97+
fun FetchedProduct.ProductOption.toUpdated() = when (this) {
9898
is FetchedProduct.ProductOption.SelectOption -> toUpdated()
9999
is FetchedProduct.ProductOption.SizeOption -> toUpdated()
100100
is FetchedProduct.ProductOption.RadioOption -> toUpdated()
@@ -105,101 +105,101 @@ private fun FetchedProduct.ProductOption.toUpdated() = when (this) {
105105
is FetchedProduct.ProductOption.FilesOption -> toUpdated()
106106
}
107107

108-
private fun FetchedProduct.ProductOption.SelectOption.toUpdated() = UpdatedProduct.ProductOption.SelectOption(
108+
fun FetchedProduct.ProductOption.SelectOption.toUpdated() = UpdatedProduct.ProductOption.SelectOption(
109109
name = name,
110110
nameTranslated = nameTranslated,
111111
choices = choices.map { it.toUpdated() },
112112
defaultChoice = defaultChoice,
113113
required = required
114114
)
115115

116-
private fun FetchedProduct.ProductOption.SizeOption.toUpdated() = UpdatedProduct.ProductOption.SizeOption(
116+
fun FetchedProduct.ProductOption.SizeOption.toUpdated() = UpdatedProduct.ProductOption.SizeOption(
117117
name = name,
118118
nameTranslated = nameTranslated,
119119
choices = choices.map { it.toUpdated() },
120120
defaultChoice = defaultChoice,
121121
required = required
122122
)
123123

124-
private fun FetchedProduct.ProductOption.RadioOption.toUpdated() = UpdatedProduct.ProductOption.RadioOption(
124+
fun FetchedProduct.ProductOption.RadioOption.toUpdated() = UpdatedProduct.ProductOption.RadioOption(
125125
name = name,
126126
nameTranslated = nameTranslated,
127127
choices = choices.map { it.toUpdated() },
128128
defaultChoice = defaultChoice,
129129
required = required
130130
)
131131

132-
private fun FetchedProduct.ProductOption.CheckboxOption.toUpdated() = UpdatedProduct.ProductOption.CheckboxOption(
132+
fun FetchedProduct.ProductOption.CheckboxOption.toUpdated() = UpdatedProduct.ProductOption.CheckboxOption(
133133
name = name,
134134
nameTranslated = nameTranslated,
135135
choices = choices.map { it.toUpdated() },
136136
defaultChoice = defaultChoice,
137137
required = required
138138
)
139139

140-
private fun FetchedProduct.ProductOption.TextFieldOption.toUpdated() = UpdatedProduct.ProductOption.TextFieldOption(
140+
fun FetchedProduct.ProductOption.TextFieldOption.toUpdated() = UpdatedProduct.ProductOption.TextFieldOption(
141141
name = name,
142142
nameTranslated = nameTranslated,
143143
required = required
144144
)
145145

146-
private fun FetchedProduct.ProductOption.TextAreaOption.toUpdated() = UpdatedProduct.ProductOption.TextAreaOption(
146+
fun FetchedProduct.ProductOption.TextAreaOption.toUpdated() = UpdatedProduct.ProductOption.TextAreaOption(
147147
name = name,
148148
nameTranslated = nameTranslated,
149149
required = required
150150
)
151151

152-
private fun FetchedProduct.ProductOption.DateOption.toUpdated() = UpdatedProduct.ProductOption.DateOption(
152+
fun FetchedProduct.ProductOption.DateOption.toUpdated() = UpdatedProduct.ProductOption.DateOption(
153153
name = name,
154154
nameTranslated = nameTranslated,
155155
required = required
156156
)
157157

158-
private fun FetchedProduct.ProductOption.FilesOption.toUpdated() = UpdatedProduct.ProductOption.FilesOption(
158+
fun FetchedProduct.ProductOption.FilesOption.toUpdated() = UpdatedProduct.ProductOption.FilesOption(
159159
name = name,
160160
nameTranslated = nameTranslated,
161161
required = required
162162
)
163163

164-
private fun FetchedProduct.ProductOptionChoice.toUpdated() = UpdatedProduct.ProductOptionChoice(
164+
fun FetchedProduct.ProductOptionChoice.toUpdated() = UpdatedProduct.ProductOptionChoice(
165165
text = text,
166166
textTranslated = textTranslated,
167167
priceModifier = priceModifier,
168168
priceModifierType = priceModifierType
169169
)
170170

171-
private fun FetchedProduct.ShippingSettings.toUpdated() = UpdatedProduct.ShippingSettings(
171+
fun FetchedProduct.ShippingSettings.toUpdated() = UpdatedProduct.ShippingSettings(
172172
type = type,
173173
methodMarkup = methodMarkup,
174174
flatRate = flatRate,
175175
disabledMethods = disabledMethods,
176176
enabledMethods = enabledMethods
177177
)
178178

179-
private fun FetchedProduct.AttributeValue.toUpdated() = UpdatedProduct.AttributeValue(
179+
fun FetchedProduct.AttributeValue.toUpdated() = UpdatedProduct.AttributeValue(
180180
id = id,
181181
alias = type?.toAttributeValueAlias(),
182182
value = value
183183
)
184184

185-
private fun FetchedProduct.RelatedProducts.toUpdated() = UpdatedProduct.RelatedProducts(
185+
fun FetchedProduct.RelatedProducts.toUpdated() = UpdatedProduct.RelatedProducts(
186186
productIds = productIds,
187187
relatedCategory = relatedCategory?.toUpdated()
188188
)
189189

190-
private fun FetchedProduct.RelatedCategory.toUpdated() = UpdatedProduct.RelatedCategory(
190+
fun FetchedProduct.RelatedCategory.toUpdated() = UpdatedProduct.RelatedCategory(
191191
enabled = enabled,
192192
categoryId = categoryId,
193193
productCount = productCount
194194
)
195195

196-
private fun FetchedProduct.ProductDimensions.toUpdated() = UpdatedProduct.ProductDimensions(
196+
fun FetchedProduct.ProductDimensions.toUpdated() = UpdatedProduct.ProductDimensions(
197197
length = length,
198198
width = width,
199199
height = height
200200
)
201201

202-
private fun FetchedProduct.ShippingPreparationTime.toUpdated() = UpdatedProduct.ShippingPreparationTime(
202+
fun FetchedProduct.ShippingPreparationTime.toUpdated() = UpdatedProduct.ShippingPreparationTime(
203203
shippingPreparationTimeForInStockItemDays = shippingPreparationTimeForInStockItemDays,
204204
shippingPreparationTimeForOutOfStockItemDays = shippingPreparationTimeForOutOfStockItemDays,
205205
pickupPreparationTimeForInStockItemInMinutes = pickupPreparationTimeForInStockItemInMinutes,
@@ -210,12 +210,12 @@ fun FetchedProduct.ProductMedia.toUpdated() = UpdatedProduct.ProductMedia(
210210
images = images.map(FetchedProduct.ProductImage::toUpdated)
211211
)
212212

213-
private fun FetchedProduct.ProductImage.toUpdated() = UpdatedProduct.ProductImage(
213+
fun FetchedProduct.ProductImage.toUpdated() = UpdatedProduct.ProductImage(
214214
id = id,
215215
orderBy = orderBy
216216
)
217217

218-
private fun FetchedProduct.TaxInfo.toUpdated() = UpdatedProduct.TaxInfo(
218+
fun FetchedProduct.TaxInfo.toUpdated() = UpdatedProduct.TaxInfo(
219219
taxable = taxable,
220220
enabledManualTaxes = enabledManualTaxes,
221221
taxClassCode = taxClassCode,

0 commit comments

Comments
 (0)