Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit beb928e

Browse files
author
Raphael Santo Domingo
committed
Rename 'type' to 'product_type' for coherency
1 parent 85178c5 commit beb928e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sdk/protos/product_state.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ message Product {
2626
string identifier = 1;
2727

2828
// What type of product is this (GS1)
29-
ProductType type = 2;
29+
ProductType product_type = 2;
3030

3131
// Who owns this product (pike organization id)
3232
string owner = 3;

sdk/src/protocol/product/state.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl FromProto<protos::product_state::Product> for Product {
9090
) -> Result<Self, ProtoConversionError> {
9191
Ok(Product {
9292
identifier: product.get_identifier().to_string(),
93-
product_type: ProductType::from_proto(product.get_field_type())?,
93+
product_type: ProductType::from_proto(product.get_product_type())?,
9494
owner: product.get_owner().to_string(),
9595
product_values: product
9696
.get_product_values()
@@ -106,7 +106,7 @@ impl FromNative<Product> for protos::product_state::Product {
106106
fn from_native(product: Product) -> Result<Self, ProtoConversionError> {
107107
let mut proto = protos::product_state::Product::new();
108108
proto.set_identifier(product.identifier().to_string());
109-
proto.set_field_type(product.product_type().clone().into_proto()?);
109+
proto.set_product_type(product.product_type().clone().into_proto()?);
110110
proto.set_owner(product.owner().to_string());
111111
proto.set_product_values(RepeatedField::from_vec(
112112
product.product_values()

0 commit comments

Comments
 (0)