All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.barchart.ondemand.api.SpecialOptionsClassificationRequest Maven / Gradle / Ivy

The newest version!
package com.barchart.ondemand.api;

import java.util.HashMap;
import java.util.Map;

import com.barchart.ondemand.api.responses.SpecialOptionsClassifications;

public class SpecialOptionsClassificationRequest implements OnDemandRequest {

	private final String symbols;
	private final String fields;

	private final Map params = new HashMap();

	public SpecialOptionsClassificationRequest(Builder b) {

		this.symbols = b.root;
		this.fields = "";
	}

	@Override
	public String endpoint() {

		return "getSpecialOptionsClassification.json";
	}

	@Override
	public String name() {

		return "Mappings for Special Options by root";
	}

	@Override
	public Map parameters() {

		params.put("root", symbols);

		if (!fields.isEmpty()) {
			params.put("fields", fields);
		}

		return params;
	}

	@Override
	public Class responseType() {
		return SpecialOptionsClassifications.class;
	}

	public static class Builder {

		private String root;

		public Builder root(final String root) {
			this.root = root;
			return this;
		}

		public SpecialOptionsClassificationRequest build() {
			return new SpecialOptionsClassificationRequest(this);
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy