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

com.amadeus.shopping.Activity Maven / Gradle / Ivy

package com.amadeus.shopping;

import com.amadeus.Amadeus;
import com.amadeus.Params;
import com.amadeus.Response;
import com.amadeus.exceptions.ResponseException;
import com.amadeus.resources.Resource;

/**
 * 

* A namespaced client for the * /v1/shopping/activities endpoints. *

* *

* Access via the Amadeus client object. *

* *
 * Amadeus amadeus = Amadeus.builder("clientId", "secret").build();
 * amadeus.shopping.activity;
*/ public class Activity { private Amadeus client; private String id; /** * Constructor. * @hide */ public Activity(Amadeus client, String id) { this.client = client; this.id = id; } /** *

* Returns a single activity from a given id. *

* *
   * amadeus.shopping.activity.("4615").get();
* * @param params the parameters to send to the API * @return an API response object * @throws ResponseException when an exception occurs */ public com.amadeus.resources.Activity get(Params params) throws ResponseException { String path = String.format("/v1/shopping/activities/%s", id); Response response = client.get(path, params); return (com.amadeus.resources.Activity) Resource.fromObject( response, com.amadeus.resources.Activity.class); } /** * Convenience method for calling get without any parameters. * @see Activity#get() */ public com.amadeus.resources.Activity get() throws ResponseException { return get(null); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy