public async Task <CustomerAuthTicket> AddCustomerAccount(int tenantId, int?siteId, int?masterCatalogId, CustomerAccountAndAuthInfo account) { _apiContext = new ApiContext(tenantId, siteId); var customerAccountResource = new CustomerAccountResource(_apiContext); var newAccount = await customerAccountResource.AddAccountAndLoginAsync(account); return(newAccount); }
public async Task <Credit> AddCustomerCredit(Credit credit, int tenantId, int?siteId, int?masterCatalogId) { _apiContext = new ApiContext(tenantId, siteId); var customerCreditResource = new CreditResource(_apiContext); var newCustomerCredit = await customerCreditResource.AddCreditAsync(credit); return(newCustomerCredit); }
public async Task <Mozu.Api.Contracts.ProductAdmin.Attribute> UpdateAttribute(int tenantId, int?siteId, int?masterCatalogId, Mozu.Api.Contracts.ProductAdmin.Attribute attribute) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var attributeResource = new AttributeResource(_apiContext); var updatedAttribute = await attributeResource.UpdateAttributeAsync(attribute, attribute.AttributeFQN, null); return(updatedAttribute); }
public async Task <IEnumerable <Mozu.Api.Contracts.ProductAdmin.ProductType> > GetProductTypes(int tenantId, int?siteId, int?masterCatalogId, int?startIndex, int?pageSize, string sortBy = null, string filter = null) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var productTypeResource = new ProductTypeResource(_apiContext); var productTypes = await productTypeResource.GetProductTypesAsync(startIndex, pageSize, sortBy, filter, null); return(productTypes.Items); }
public async Task <Mozu.Api.Contracts.ProductAdmin.ProductType> AddProductType(int tenantId, int?siteId, int?masterCatalogId, Mozu.Api.Contracts.ProductAdmin.ProductType productType) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var productTypeResource = new ProductTypeResource(_apiContext); var newProductType = await productTypeResource.AddProductTypeAsync(productType, null); return(newProductType); }
public async Task <Mozu.Api.Contracts.ProductAdmin.Product> AddProduct(int tenantId, int?siteId, int?masterCatalogId, Mozu.Api.Contracts.ProductAdmin.Product product) { _apiContext = new ApiContext(tenantId, siteId); var productResource = new ProductResource(_apiContext); var newProduct = await productResource.AddProductAsync(product); return(newProduct); }
public async Task <IEnumerable <CustomerAccount> > GetCustomerAccounts(int tenantId, int?siteId, int?masterCatalogId, int?startIndex, int?pageSize, string sortBy = null, string filter = null) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var customerAccountResource = new CustomerAccountResource(_apiContext); var accounts = await customerAccountResource.GetAccountsAsync(startIndex, pageSize, sortBy, filter, null); return(accounts.Items); }
public async Task <Mozu.Api.Contracts.ProductAdmin.Product> GetProduct(int tenantId, int?siteId, int?masterCatalogId, string productCode) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var productResource = new ProductResource(_apiContext); var product = await productResource.GetProductAsync(productCode, null); return(product); }
public async Task <Credit> UpdateCustomerCredit(int tenantId, int?siteId, int?masterCatalogId, Credit credit) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var customerCreditResource = new CreditResource(_apiContext); var updatedCustomerCredit = await customerCreditResource.UpdateCreditAsync(credit, credit.Code); return(updatedCustomerCredit); }
public async Task <Credit> GetCustomerCredit(int tenantId, int?siteId, int?masterCatalogId, string code) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var customerCreditResource = new CreditResource(_apiContext); var credit = await customerCreditResource.GetCreditAsync(code); return(credit); }
public async Task <CustomerContact> AddCustomerContact(int accountId, CustomerContact contact, int tenantId, int?siteId, int?masterCatalogId) { _apiContext = new ApiContext(tenantId, siteId); var customerContactResource = new CustomerContactResource(_apiContext); var newContact = await customerContactResource.AddAccountContactAsync(contact, accountId); return(newContact); }
public async Task <CustomerContact> GetCustomerContact(int tenantId, int?siteId, int?masterCatalogId, int accountId, int contactId) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var customerContactResource = new CustomerContactResource(_apiContext); var contact = await customerContactResource.GetAccountContactAsync(accountId, contactId); return(contact); }
public async Task <Mozu.Api.Contracts.ProductAdmin.ProductType> UpdateProductType(int tenantId, int?siteId, int?masterCatalogId, Mozu.Api.Contracts.ProductAdmin.ProductType productType) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var productTypeResource = new ProductTypeResource(_apiContext); var updatedProductType = await productTypeResource.UpdateProductTypeAsync(productType, Convert.ToInt32(productType.Id), null); return(updatedProductType); }
public async Task <Mozu.Api.Contracts.ProductAdmin.Product> UpdateProduct(int tenantId, int?siteId, int?masterCatalogId, Mozu.Api.Contracts.ProductAdmin.Product product) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var productResource = new ProductResource(_apiContext); var updatedProduct = await productResource.UpdateProductAsync(product, product.ProductCode, null); return(updatedProduct); }
public async Task <CustomerContact> UpdateCustomerContact(int tenantId, int?siteId, int?masterCatalogId, CustomerContact contact) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var customerContactResource = new CustomerContactResource(_apiContext); var updatedcontact = await customerContactResource.UpdateAccountContactAsync(contact, contact.AccountId, contact.Id); return(updatedcontact); }
public async Task <CustomerAccount> UpdateCustomerAccount(int tenantId, int?siteId, int?masterCatalogId, CustomerAccount account) { _apiContext = new ApiContext(tenantId, siteId, masterCatalogId); var customerAccountResource = new CustomerAccountResource(_apiContext); var updatedAccount = await customerAccountResource.UpdateAccountAsync(account, account.Id); return(updatedAccount); }
public CustomerHandler(int tenantId, int?siteId, int?masterCatalogId) { _apiContext = new Mozu.Api.ApiContext(tenantId, siteId); }