static void Main(string[] args) { var context = NewApiContext(Settings.Default.eBayURI, Settings.Default.eBayToken); //var apiCall = new GeteBayOfficialTimeCall(context); var apiCall = new SetStoreCall(context); //var time = apiCall.GeteBayOfficialTime(); //var options = apiCall.GetStoreOptions(); var store = new StoreType() { Description = "Test Store", Name = "Test Store", SubscriptionLevel = StoreSubscriptionLevelCodeType.Basic, Theme = new StoreThemeType() { ThemeID = 1 } }; apiCall.SetStore(store); var addCall = new AddFixedPriceItemCall(context); addCall.AddFixedPriceItem(item); //Console.WriteLine(time); //Console.WriteLine(options); Console.ReadKey(); }
public void SetStore() { // Skip if the user is not store enabled. if (TestData.Store == null) { return; } SetStoreCall api = new SetStoreCall(this.apiContext); // Build the StoreType object. StoreType st = new StoreType(); st.Description = TestData.Store.Description; st.Logo = TestData.Store.Logo; st.MerchDisplay = TestData.Store.MerchDisplay; st.Name = TestData.Store.Name; // Make API call. api.SetStore(st); }
private void BtnSetStore_Click(object sender, System.EventArgs e) { try { TxtStatus.Text = ""; SetStoreCall apicall = new SetStoreCall(Context); StoreType store = new StoreType(); if (TxtName.Text != String.Empty) { store.Name = TxtName.Text; } if (TxtDescription.Text != String.Empty) { store.Description = TxtDescription.Text; } if (TxtHeader.Text != String.Empty) { store.CustomHeader = TxtHeader.Text; } if (CboLayout.SelectedIndex > 0) { store.ItemListLayout = (StoreItemListLayoutCodeType)Enum.Parse(typeof(StoreItemListLayoutCodeType), CboLayout.SelectedItem.ToString()); } if (CboSort.SelectedIndex > 0) { store.ItemListSortOrder = (StoreItemListSortOrderCodeType)Enum.Parse(typeof(StoreItemListSortOrderCodeType), CboSort.SelectedItem.ToString()); } apicall.SetStore(store); TxtStatus.Text = apicall.ApiResponse.Ack.ToString(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }