예제 #1
0
        /// <summary>
        /// Returns a seller's invoice data for their eBay account, including the account's
        /// summary data.
        /// </summary>
        ///
        /// <param name="AccountHistorySelection">
        /// This field is used by the user to control which account entries are returned. The user has options to retrieve all new account entries (since last invoice), all account entries between two specified dates, or all account entries from a specified invoice. If this field is not include
        /// </param>
        ///
        /// <param name="InvoiceDate">
        /// This field is used to retrieve all account entries from a specific invoice, which is identified through this <b>InvoiceDate</b> field with the timestamp of the account invoice. This field is only applicable if the  <b>AccountHistorySelection</b> value is set to 'SpecifiedInvoice'; otherwise, this field will be ignored.
        /// </param>
        ///
        /// <param name="BeginDate">
        /// This field is used to retrieve all account entries dating back to the timestamp passed into this <b>BeginDate</b> field up until the timestamp passed into the <b>EndDate</b> field. The <b>BeginDate</b> value can not be set back any further than four months into the past.
        /// <br/><br/>
        /// The allowed date formats are <em>YYYY-MM-DD</em> and <em>YYYY-MM-DD HH:mm:ss</em> The <b>BeginDate</b> value must be less than or equal to the <b>EndDate</b> value. The user might use the same values in both fields if that user wanted to retrieve all account entries from a specific day (if <em>YYYY-MM-DD</em> format used) or wanted to retrieve a specific account entry (if <em>YYYY-MM-DD HH:mm:ss</em> format used).
        /// <br/><br/>
        /// This field is only applicable if the  <b>AccountHistorySelection</b> value is set to 'BetweenSpecifiedDates'; otherwise, this field will be ignored. fiedDates' is used, both the <b>BeginDate</b> and <b>EndDate</b> must be included.
        /// </param>
        ///
        /// <param name="EndDate">
        /// This field is used to retrieve all account entries dating up to the timestamp passed into this <b>EndDate</b> field dating back to the timestamp passed into the <b>BeginDate</b> field. The <b>EndDate</b> value can not be set for a future date.
        /// <br/><br/>
        /// The allowed date formats are <em>YYYY-MM-DD</em> and <em>YYYY-MM-DD HH:mm:ss</em> The <b>EndDate</b> value must be more than or equal to the <b>BeginDate</b> value. The user might use the same values in both fields if that user wanted to retrieve all account entries from a specific day (if <em>YYYY-MM-DD</em> format used) or wanted to retrieve a specific account entry (if <em>YYYY-MM-DD HH:mm:ss</em> format used).
        /// <br/><br/>
        /// This field is only applicable if the  <b>AccountHistorySelection</b> value is set to 'BetweenSpecifiedDates'; otherwise, this field will be ignored. If 'BetweenSpecifiedDates' is used, both the <b>BeginDate</b> and <b>EndDate</b> must be included.
        /// </param>
        ///
        /// <param name="Pagination">
        /// This container is used to control how many account entries are returned on each page of data in the response. <b>PaginationType</b> is used by numerous Trading API calls, and the default and maximum values for the <b>EntriesPerPage</b> field differs with each call. For the <b>GetAccount</b> call, the default value is 500 (account entries) per page, and maximum allowed value is 2000 (account entries) per page.
        /// </param>
        ///
        /// <param name="ExcludeBalance">
        /// By default, the current balance of the user's account will not be returned in the call response. To retrieve the current balance of their account, the user should include the <b>ExcludeBalance</b> flag in the request and set its value to 'false'. The current balance on the account will be shown in the <b>AccountSummary.CurrentBalance</b> field in the call response.
        /// </param>
        ///
        /// <param name="ExcludeSummary">
        /// Specifies whether to return account summary information in an
        /// AccountSummary node. Default is true, to return AccountSummary.
        /// </param>
        ///
        /// <param name="IncludeConversionRate">
        /// Specifies whether to retrieve the rate used for the currency conversion for usage transactions.
        /// </param>
        ///
        /// <param name="AccountEntrySortType">
        /// Specifies how account entries should be sorted in the response, by an
        /// element and then in ascending or descending order.
        /// </param>
        ///
        /// <param name="Currency">
        /// Specifies the currency used in the account report. Do not specify Currency
        /// in the request unless the following conditions are met. First, the user has
        /// or had multiple accounts under the same UserID. Second, the account
        /// identified in the request uses the currency you specify in the request. An
        /// error is returned if no account is found that uses the currency you specify
        /// in the request.
        /// </param>
        ///
        /// <param name="ItemID">
        /// Specifies the item ID for which to return account entries. If ItemID is
        /// used, all other filters in the request are ignored. If the specified item
        /// does not exist or if the requesting user is not the seller of the item, an
        /// error is returned.
        /// </param>
        ///
        public AccountEntryTypeCollection GetAccount(AccountHistorySelectionCodeType AccountHistorySelection, DateTime InvoiceDate, DateTime BeginDate, DateTime EndDate, PaginationType Pagination, bool ExcludeBalance, bool ExcludeSummary, bool IncludeConversionRate, AccountEntrySortTypeCodeType AccountEntrySortType, CurrencyCodeType Currency, string ItemID)
        {
            this.AccountHistorySelection = AccountHistorySelection;
            this.InvoiceDate             = InvoiceDate;
            this.BeginDate             = BeginDate;
            this.EndDate               = EndDate;
            this.Pagination            = Pagination;
            this.ExcludeBalance        = ExcludeBalance;
            this.ExcludeSummary        = ExcludeSummary;
            this.IncludeConversionRate = IncludeConversionRate;
            this.AccountEntrySortType  = AccountEntrySortType;
            this.Currency              = Currency;
            this.ItemID = ItemID;

            Execute();
            return(ApiResponse.AccountEntries.AccountEntry);
        }
예제 #2
0
 /// <summary>
 /// For backward compatibility with old wrappers.
 /// </summary>
 public AccountEntryTypeCollection GetAccount(AccountHistorySelectionCodeType AccountHistorySelection)
 {
     this.AccountHistorySelection = AccountHistorySelection;
     Execute();
     return AccountEntryList;
 }
예제 #3
0
        /// <summary>
        /// Returns a seller's invoice data for their eBay account, including the account's
        /// summary data.
        /// </summary>
        /// 
        /// <param name="AccountHistorySelection">
        /// This field is used by the user to control which account entries are returned. The user has options to retrieve all new account entries (since last invoice), all account entries between two specified dates, or all account entries from a specified invoice. If this field is not include
        /// </param>
        ///
        /// <param name="InvoiceDate">
        /// This field is used to retrieve all account entries from a specific invoice, which is identified through this <b>InvoiceDate</b> field with the timestamp of the account invoice. This field is only applicable if the  <b>AccountHistorySelection</b> value is set to 'SpecifiedInvoice'; otherwise, this field will be ignored.
        /// </param>
        ///
        /// <param name="BeginDate">
        /// This field is used to retrieve all account entries dating back to the timestamp passed into this <b>BeginDate</b> field up until the timestamp passed into the <b>EndDate</b> field. The <b>BeginDate</b> value can not be set back any further than four months into the past. 
        /// <br/><br/>
        /// The allowed date formats are <em>YYYY-MM-DD</em> and <em>YYYY-MM-DD HH:mm:ss</em> The <b>BeginDate</b> value must be less than or equal to the <b>EndDate</b> value. The user might use the same values in both fields if that user wanted to retrieve all account entries from a specific day (if <em>YYYY-MM-DD</em> format used) or wanted to retrieve a specific account entry (if <em>YYYY-MM-DD HH:mm:ss</em> format used).
        /// <br/><br/>
        /// This field is only applicable if the  <b>AccountHistorySelection</b> value is set to 'BetweenSpecifiedDates'; otherwise, this field will be ignored. fiedDates' is used, both the <b>BeginDate</b> and <b>EndDate</b> must be included.
        /// </param>
        ///
        /// <param name="EndDate">
        /// This field is used to retrieve all account entries dating up to the timestamp passed into this <b>EndDate</b> field dating back to the timestamp passed into the <b>BeginDate</b> field. The <b>EndDate</b> value can not be set for a future date. 
        /// <br/><br/>
        /// The allowed date formats are <em>YYYY-MM-DD</em> and <em>YYYY-MM-DD HH:mm:ss</em> The <b>EndDate</b> value must be more than or equal to the <b>BeginDate</b> value. The user might use the same values in both fields if that user wanted to retrieve all account entries from a specific day (if <em>YYYY-MM-DD</em> format used) or wanted to retrieve a specific account entry (if <em>YYYY-MM-DD HH:mm:ss</em> format used).
        /// <br/><br/>
        /// This field is only applicable if the  <b>AccountHistorySelection</b> value is set to 'BetweenSpecifiedDates'; otherwise, this field will be ignored. If 'BetweenSpecifiedDates' is used, both the <b>BeginDate</b> and <b>EndDate</b> must be included.
        /// </param>
        ///
        /// <param name="Pagination">
        /// This container is used to control how many account entries are returned on each page of data in the response. <b>PaginationType</b> is used by numerous Trading API calls, and the default and maximum values for the <b>EntriesPerPage</b> field differs with each call. For the <b>GetAccount</b> call, the default value is 500 (account entries) per page, and maximum allowed value is 2000 (account entries) per page.
        /// </param>
        ///
        /// <param name="ExcludeBalance">
        /// By default, the current balance of the user's account will not be returned in the call response. To retrieve the current balance of their account, the user should include the <b>ExcludeBalance</b> flag in the request and set its value to 'false'. The current balance on the account will be shown in the <b>AccountSummary.CurrentBalance</b> field in the call response.
        /// </param>
        ///
        /// <param name="ExcludeSummary">
        /// Specifies whether to return account summary information in an
        /// AccountSummary node. Default is true, to return AccountSummary.
        /// </param>
        ///
        /// <param name="IncludeConversionRate">
        /// Specifies whether to retrieve the rate used for the currency conversion for usage transactions.
        /// </param>
        ///
        /// <param name="AccountEntrySortType">
        /// Specifies how account entries should be sorted in the response, by an
        /// element and then in ascending or descending order.
        /// </param>
        ///
        /// <param name="Currency">
        /// Specifies the currency used in the account report. Do not specify Currency
        /// in the request unless the following conditions are met. First, the user has
        /// or had multiple accounts under the same UserID. Second, the account
        /// identified in the request uses the currency you specify in the request. An
        /// error is returned if no account is found that uses the currency you specify
        /// in the request.
        /// </param>
        ///
        /// <param name="ItemID">
        /// Specifies the item ID for which to return account entries. If ItemID is
        /// used, all other filters in the request are ignored. If the specified item
        /// does not exist or if the requesting user is not the seller of the item, an
        /// error is returned.
        /// </param>
        ///
        public AccountEntryTypeCollection GetAccount(AccountHistorySelectionCodeType AccountHistorySelection, DateTime InvoiceDate, DateTime BeginDate, DateTime EndDate, PaginationType Pagination, bool ExcludeBalance, bool ExcludeSummary, bool IncludeConversionRate, AccountEntrySortTypeCodeType AccountEntrySortType, CurrencyCodeType Currency, string ItemID)
        {
            this.AccountHistorySelection = AccountHistorySelection;
            this.InvoiceDate = InvoiceDate;
            this.BeginDate = BeginDate;
            this.EndDate = EndDate;
            this.Pagination = Pagination;
            this.ExcludeBalance = ExcludeBalance;
            this.ExcludeSummary = ExcludeSummary;
            this.IncludeConversionRate = IncludeConversionRate;
            this.AccountEntrySortType = AccountEntrySortType;
            this.Currency = Currency;
            this.ItemID = ItemID;

            Execute();
            return ApiResponse.AccountEntries.AccountEntry;
        }
예제 #4
0
 /// <summary>
 /// For backward compatibility with old wrappers.
 /// </summary>
 public AccountEntryTypeCollection GetAccount(AccountHistorySelectionCodeType AccountHistorySelection)
 {
     this.AccountHistorySelection = AccountHistorySelection;
     Execute();
     return(AccountEntryList);
 }
예제 #5
0
        private void CallGetAccount(int PageNumber)
        {
            try
            {
                LstAccountEntries.Items.Clear();
                TxtAccState.Text             = "";
                TxtBillingCycleDate.Text     = "";
                TxtLastAmountPaid.Text       = "";
                TxtAccBalance.Text           = "";
                TxtPayMethod.Text            = "";
                TxtAmountPastDue.Text        = "";
                TxtPastDue.Text              = "";
                TxtCreditCardInfo.Text       = "";
                TxtCreditCardExpiration.Text = "";
                TxtCreditCardModifyDate.Text = "";
                TxtAccountID.Text            = "";
                TxtLastPaymentDate.Text      = "";
                TxtEntriesPerPage.Text       = "";
                TxtPageNumber.Text           = "";
                TxtTotalNumberOfPages.Text   = "";

                GetAccountCall apicall = new GetAccountCall(Context);

                AccountHistorySelectionCodeType ahselect = AccountHistorySelectionCodeType.CustomCode;
                if (OptLastInvoice.Checked == true)
                {
                    ahselect = AccountHistorySelectionCodeType.LastInvoice;
                }
                else if (OptInvoiceDate.Checked == true)
                {
                    ahselect            = AccountHistorySelectionCodeType.SpecifiedInvoice;
                    apicall.InvoiceDate = DatePickInvoice.Value;
                }
                else if (OptRange.Checked == true)
                {
                    ahselect = AccountHistorySelectionCodeType.BetweenSpecifiedDates;
                    apicall.StartTimeFilter = new TimeFilter(DatePickFrom.Value, DatePickTo.Value);
                }

                apicall.Pagination            = new PaginationType();
                apicall.Pagination.PageNumber = PageNumber;

                //apicall.ApiRequest.ExcludeSummary = true;
                //apicall.ApiRequest.Pagination.EntriesPerPage = 1;
                AccountEntryTypeCollection entrylist = apicall.GetAccount(ahselect);

                TxtAccountID.Text = apicall.AccountID;
                if (apicall.AccountSummary != null)
                {
                    AccountSummaryType Summary = apicall.AccountSummary;
                    TxtAccState.Text         = Summary.AccountState.ToString();
                    TxtBillingCycleDate.Text = Summary.BillingCycleDate.ToString();
                    TxtLastAmountPaid.Text   = Summary.LastAmountPaid.Value.ToString();
                    TxtAccBalance.Text       = Summary.CurrentBalance.Value.ToString();
                    TxtPayMethod.Text        = Summary.PaymentMethod.ToString();
                    TxtAmountPastDue.Text    = Summary.AmountPastDue.Value.ToString();
                    TxtPastDue.Text          = Summary.PastDue.ToString();
                    TxtCreditCardInfo.Text   = Summary.CreditCardInfo;
                    if (Summary.CreditCardExpirationSpecified)
                    {
                        TxtCreditCardExpiration.Text = Summary.CreditCardExpiration.ToString();
                    }

                    if (Summary.CreditCardModifyDateSpecified)
                    {
                        TxtCreditCardModifyDate.Text = Summary.CreditCardModifyDate.ToString();
                    }

                    if (Summary.LastPaymentDateSpecified)
                    {
                        TxtLastPaymentDate.Text = Summary.LastPaymentDate.ToString();
                    }

                    /*	Summary.InvoiceBalance;
                     *      Summary.InvoiceCredit;
                     *      Summary.InvoiceDate;
                     *      Summary.InvoiceNewFee;
                     *      Summary.InvoicePayment;
                     */
                    TxtEntriesPerPage.Text     = apicall.ApiResponse.EntriesPerPage.ToString();
                    TxtPageNumber.Text         = apicall.ApiResponse.PageNumber.ToString();
                    TxtTotalNumberOfPages.Text = apicall.ApiResponse.PaginationResult.TotalNumberOfPages.ToString();
                }

                if (TxtPageNumber.Text.Length > 0 && Int32.Parse(TxtPageNumber.Text) < Int32.Parse(TxtTotalNumberOfPages.Text))
                {
                    BtnNextPage.Visible = true;
                }
                ;


                if (entrylist == null)
                {
                    return;
                }

                foreach (AccountEntryType entry in entrylist)
                {
                    string[] listparams = new string[9];
                    listparams[0] = entry.RefNumber;
                    listparams[1] = entry.AccountDetailsEntryType.ToString();
                    listparams[2] = entry.ItemID;
                    listparams[3] = entry.Description;
                    if (entry.NetDetailAmount != null)
                    {
                        listparams[4] = entry.NetDetailAmount.Value.ToString();
                    }

                    if (entry.GrossDetailAmount != null)
                    {
                        listparams[5] = entry.GrossDetailAmount.Value.ToString();
                    }
                    listparams[6] = entry.VATPercent.ToString();
                    listparams[7] = entry.Balance.Value.ToString();
                    listparams[8] = entry.Date.ToString();

                    ListViewItem vi = new ListViewItem(listparams);
                    this.LstAccountEntries.Items.Add(vi);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }