// Path: src/main/java/io/pivotal/web/domain/Account.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// @Data
// public class Account {
// 
// 	@JsonProperty("id")
// 	private Integer id;
// 
// 	@JsonProperty("name")
// 	private String name;
// 	
// 	@JsonProperty("creationdate")
// 	@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss")
//     private Date creationdate;
// 	
// 	@JsonProperty("openbalance")
//     private BigDecimal openbalance;
// 
// 	@JsonProperty("balance")
//     private BigDecimal balance;
// 
// 	@JsonProperty("type")
// 	private String type;
// 
// 	@JsonProperty("currency")
// 	private String currency;
// 
//  }


import com.newrelic.api.agent.Trace;
import io.pivotal.web.domain.Account;
import org.reactivestreams.Publisher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.hystrix.HystrixCommands;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.MediaType;
import org.springframework.security.oauth2.client.OAuth2AuthorizedClient;
import org.springframework.stereotype.Service;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Flux;
import java.util.ArrayList;
import java.util.List;
import static org.springframework.security.oauth2.client.web.reactive.function.client.ServletOAuth2AuthorizedClientExchangeFilterFunction.oauth2AuthorizedClient;
package io.pivotal.web.service;




@Service
@RefreshScope
public class AccountService {
    private static final Logger logger = LoggerFactory
            .getLogger(AccountService.class);

    @Autowired
    private WebClient webClient;

    @Value("${pivotal.accountsService.name}")
    private String accountsService;


    @Trace(async = true)
// Path: src/main/java/io/pivotal/web/domain/Account.java
// @JsonIgnoreProperties(ignoreUnknown = true)
// @Data
// public class Account {
// 
// 	@JsonProperty("id")
// 	private Integer id;
// 
// 	@JsonProperty("name")
// 	private String name;
// 	
// 	@JsonProperty("creationdate")
// 	@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss")
//     private Date creationdate;
// 	
// 	@JsonProperty("openbalance")
//     private BigDecimal openbalance;
// 
// 	@JsonProperty("balance")
//     private BigDecimal balance;
// 
// 	@JsonProperty("type")
// 	private String type;
// 
// 	@JsonProperty("currency")
// 	private String currency;
// 
//  }


// Path: src/main/java/io/pivotal/web/service/AccountService.java
import com.newrelic.api.agent.Trace;
import io.pivotal.web.domain.Account;
import org.reactivestreams.Publisher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.hystrix.HystrixCommands;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.MediaType;
import org.springframework.security.oauth2.client.OAuth2AuthorizedClient;
import org.springframework.stereotype.Service;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Flux;
import java.util.ArrayList;
import java.util.List;
import static org.springframework.security.oauth2.client.web.reactive.function.client.ServletOAuth2AuthorizedClientExchangeFilterFunction.oauth2AuthorizedClient;

package io.pivotal.web.service;




@Service
@RefreshScope
public class AccountService {
    private static final Logger logger = LoggerFactory
            .getLogger(AccountService.class);

    @Autowired
    private WebClient webClient;

    @Value("${pivotal.accountsService.name}")
    private String accountsService;


    @Trace(async = true)
    public void createAccount(Account account, OAuth2AuthorizedClient oAuth2AuthorizedClient ) {