public StripeAccountServiceTest()
        {
            this.service = new StripeAccountService();

            this.createOptions = new StripeAccountCreateOptions
            {
                Type = StripeAccountType.Custom,
                ExternalCardAccount = new StripeAccountCardOptions()
                {
                    TokenId = "tok_visa_debit"
                },
                LegalEntity = new StripeAccountLegalEntityOptions
                {
                    AdditionalOwners = new List <StripeAccountAdditionalOwner>
                    {
                        new StripeAccountAdditionalOwner
                        {
                            FirstName                = "John",
                            LastName                 = "Doe",
                            BirthDay                 = 1,
                            BirthMonth               = 1,
                            BirthYear                = 1980,
                            VerificationDocument     = "file_123",
                            VerificationDocumentBack = "file_234",
                        },
                        new StripeAccountAdditionalOwner
                        {
                            FirstName  = "Jenny",
                            LastName   = "Rosen",
                            State      = "CA",
                            CityOrTown = "City",
                            Line1      = "Line1",
                            Line2      = "Line2",
                            PostalCode = "90210",
                            Country    = "US",
                        }
                    },
                    VerificationDocumentFileId     = "file_abc",
                    VerificationDocumentFileBackId = "file_bcd",
                }
            };

            this.updateOptions = new StripeAccountUpdateOptions()
            {
                Metadata = new Dictionary <string, string>()
                {
                    { "key", "value" },
                },
            };

            this.rejectOptions = new StripeAccountRejectOptions
            {
                Reason = "terms_of_service"
            };

            this.listOptions = new StripeAccountListOptions()
            {
                Limit = 1,
            };
        }
Ejemplo n.º 2
0
        public virtual StripeList <StripeAccount> List(StripeAccountListOptions listOptions = null, StripeRequestOptions requestOptions = null)
        {
            var path = $"{Urls.BaseUrl}/accounts";

            return(Mapper <StripeList <StripeAccount> > .MapFromJson(
                       Requestor.GetString(this.ApplyAllParameters(listOptions, path, true),
                                           SetupRequestOptions(requestOptions))
                       ));
        }
Ejemplo n.º 3
0
        public virtual async Task <StripeList <StripeAccount> > ListAsync(StripeAccountListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var path = $"{Urls.BaseUrl}/accounts";

            return(Mapper <StripeList <StripeAccount> > .MapFromJson(
                       await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, path, true),
                                                      SetupRequestOptions(requestOptions),
                                                      cancellationToken).ConfigureAwait(false)
                       ));
        }