diff --git a/constant.go b/constant.go index c74f6ef..e5ba835 100644 --- a/constant.go +++ b/constant.go @@ -1,8 +1,15 @@ package appier const ( - SubjectPullProductUpsert = "selly.pull.product.upsert" - SubjectPullBrandUpsert = "selly.pull.brand.upsert" + SubjectPullProductUpsert = "selly.pull.product.upsert" + SubjectPullBrandUpsert = "selly.pull.brand.upsert" + SubjectPullCategoryUpsert = "selly.pull.category.upsert" + SubjectPullSubCategoryUpsert = "selly.pull.subcategory.upsert" + SubjectPullInventoryUpsert = "selly.pull.inventory.upsert" + SubjectPullSupplierUpsert = "selly.pull.supplier.upsert" + SubjectPullPropertyUpsert = "selly.pull.property.upsert" + SubjectPullPropertyValueUpsert = "selly.pull.property_value.upsert" + SubjectPullSKUUpsert = "selly.pull.sku.upsert" ) const ( diff --git a/pull.go b/pull.go index dedaeb8..b2c5155 100644 --- a/pull.go +++ b/pull.go @@ -12,3 +12,38 @@ func (Pull) ProductUpsert(payload []byte) (bool, error) { func (Pull) BrandUpsert(payload []byte) (bool, error) { return publishWithJetStream(JetStreamAppierService, SubjectPullBrandUpsert, payload) } + +// CategoryUpsert ... +func (Pull) CategoryUpsert(payload []byte) (bool, error) { + return publishWithJetStream(JetStreamAppierService, SubjectPullCategoryUpsert, payload) +} + +// SubCategoryUpsert ... +func (Pull) SubCategoryUpsert(payload []byte) (bool, error) { + return publishWithJetStream(JetStreamAppierService, SubjectPullSubCategoryUpsert, payload) +} + +// SupplierUpsert ... +func (Pull) SupplierUpsert(payload []byte) (bool, error) { + return publishWithJetStream(JetStreamAppierService, SubjectPullSupplierUpsert, payload) +} + +// InventoryUpsert ... +func (Pull) InventoryUpsert(payload []byte) (bool, error) { + return publishWithJetStream(JetStreamAppierService, SubjectPullInventoryUpsert, payload) +} + +// SKUUpsert ... +func (Pull) SKUUpsert(payload []byte) (bool, error) { + return publishWithJetStream(JetStreamAppierService, SubjectPullSKUUpsert, payload) +} + +// PropertyUpsert ... +func (Pull) PropertyUpsert(payload []byte) (bool, error) { + return publishWithJetStream(JetStreamAppierService, SubjectPullPropertyUpsert, payload) +} + +// PropertyValueUpsert ... +func (Pull) PropertyValueUpsert(payload []byte) (bool, error) { + return publishWithJetStream(JetStreamAppierService, SubjectPullPropertyValueUpsert, payload) +}