// Path: src/main/java/io/pivotal/web/domain/Order.java
// @Data
// public class Order {
// 
// 	private Integer orderId;
// 	
// 	private Integer accountId;
// 
// 	private String symbol;
// 
// 	private BigDecimal orderFee;
// 
// 	private Date completionDate;
// 
// 	private OrderType orderType;
// 
// 	private BigDecimal price;
// 
// 	private Integer quantity;
// 	
// 	private String currency;
// 
// 
// 
// }


import com.newrelic.api.agent.Trace;
import io.pivotal.web.domain.Order;
import io.pivotal.web.domain.Portfolio;
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.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 static org.springframework.security.oauth2.client.web.reactive.function.client.ServletOAuth2AuthorizedClientExchangeFilterFunction.oauth2AuthorizedClient;
package io.pivotal.web.service;




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

	@Autowired
	private WebClient webClient;

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


	@Trace(async = true)
// Path: src/main/java/io/pivotal/web/domain/Order.java
// @Data
// public class Order {
// 
// 	private Integer orderId;
// 	
// 	private Integer accountId;
// 
// 	private String symbol;
// 
// 	private BigDecimal orderFee;
// 
// 	private Date completionDate;
// 
// 	private OrderType orderType;
// 
// 	private BigDecimal price;
// 
// 	private Integer quantity;
// 	
// 	private String currency;
// 
// 
// 
// }


// Path: src/main/java/io/pivotal/web/service/PortfolioService.java
import com.newrelic.api.agent.Trace;
import io.pivotal.web.domain.Order;
import io.pivotal.web.domain.Portfolio;
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.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 static org.springframework.security.oauth2.client.web.reactive.function.client.ServletOAuth2AuthorizedClientExchangeFilterFunction.oauth2AuthorizedClient;

package io.pivotal.web.service;




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

	@Autowired
	private WebClient webClient;

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


	@Trace(async = true)
	public Order sendOrder(Order order, OAuth2AuthorizedClient oAuth2AuthorizedClient ) {