amadeus4dev/amadeus-node

View on GitHub

Showing 48 of 52 total issues

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class Airlines{
  constructor(client) {
    this.client = client;
  }

Severity: Major
Found in src/amadeus/namespaces/reference_data/airlines.js and 31 other locations - About 1 hr to fix
src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class CheckinLinks {
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class Traveled{
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class DirectDestinations {
  constructor(client) {
    this.client = client;
  }

Severity: Major
Found in src/amadeus/namespaces/airport/direct-destinations.js and 31 other locations - About 1 hr to fix
src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class RecommendedLocations {
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class FlightChoicePrediction {
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class BusiestPeriod{
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class CategoryRatedAreas {
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class FlightAvailabilities {
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class HotelOffersSearch {
  constructor(client) {
    this.client = client;
  }

Severity: Major
Found in src/amadeus/namespaces/shopping/hotel_offers_search.js and 31 other locations - About 1 hr to fix
src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class TransferOffers {
  constructor(client) {
    this.client = client;
  }

Severity: Major
Found in src/amadeus/namespaces/shopping/transfer_offers.js and 31 other locations - About 1 hr to fix
src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class Flights {
  constructor(client) {
    this.client = client;
  }

Severity: Major
Found in src/amadeus/namespaces/schedule/flights.js and 31 other locations - About 1 hr to fix
src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class TripPurpose {
  constructor(client) {
    this.client = client;
  }

Severity: Major
Found in src/amadeus/namespaces/travel/predictions/trip_purpose.js and 31 other locations - About 1 hr to fix
src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class bySquare {
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class bySquare {
  constructor(client) {
    this.client = client;
  }

Severity: Major
Found in src/amadeus/namespaces/shopping/activities/by_square.js and 31 other locations - About 1 hr to fix
src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class HotelSentiments {
  constructor(client) {
    this.client = client;
  }

Severity: Major
Found in src/amadeus/namespaces/e_reputation/hotel_sentiments.js and 31 other locations - About 1 hr to fix
src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class byHotels {
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class byGeocode {
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class byCity {
  constructor(client) {
    this.client = client;
  }

src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/flight_delay.js on lines 14..57
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 32 locations. Consider refactoring.
Open

class FlightDelay {
  constructor(client) {
    this.client = client;
  }

Severity: Major
Found in src/amadeus/namespaces/travel/predictions/flight_delay.js and 31 other locations - About 1 hr to fix
src/amadeus/namespaces/airline/destinations.js on lines 14..36
src/amadeus/namespaces/airport/direct-destinations.js on lines 14..36
src/amadeus/namespaces/airport/predictions/on_time.js on lines 14..40
src/amadeus/namespaces/analytics/itinerary_price_metrics.js on lines 14..39
src/amadeus/namespaces/booking/flight_orders.js on lines 14..38
src/amadeus/namespaces/booking/hotel_bookings.js on lines 14..38
src/amadeus/namespaces/e_reputation/hotel_sentiments.js on lines 14..38
src/amadeus/namespaces/location/analytics/category_rated_areas.js on lines 14..42
src/amadeus/namespaces/reference_data/airlines.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/airports.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/cities.js on lines 14..38
src/amadeus/namespaces/reference_data/locations/hotel.js on lines 14..36
src/amadeus/namespaces/reference_data/locations/hotels/by-city.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/hotels/by-geocode.js on lines 14..41
src/amadeus/namespaces/reference_data/locations/hotels/by-hotels.js on lines 14..37
src/amadeus/namespaces/reference_data/locations/points_of_interest/by-square.js on lines 14..43
src/amadeus/namespaces/reference_data/recommended_locations.js on lines 14..40
src/amadeus/namespaces/reference_data/urls/checkin_links.js on lines 14..39
src/amadeus/namespaces/schedule/flights.js on lines 14..40
src/amadeus/namespaces/shopping/activities/by_square.js on lines 14..43
src/amadeus/namespaces/shopping/availability/flight_availabilities.js on lines 14..32
src/amadeus/namespaces/shopping/flight_dates.js on lines 14..41
src/amadeus/namespaces/shopping/flight_destinations.js on lines 14..38
src/amadeus/namespaces/shopping/flight_offers/flight_choice_prediction.js on lines 14..47
src/amadeus/namespaces/shopping/flight_offers/upselling.js on lines 14..32
src/amadeus/namespaces/shopping/hotel_offers_search.js on lines 14..40
src/amadeus/namespaces/shopping/transfer_offers.js on lines 15..36
src/amadeus/namespaces/travel/analytics/air_traffic/booked.js on lines 14..41
src/amadeus/namespaces/travel/analytics/air_traffic/busiest_period.js on lines 14..44
src/amadeus/namespaces/travel/analytics/air_traffic/traveled.js on lines 14..41
src/amadeus/namespaces/travel/predictions/trip_purpose.js on lines 14..43

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 62.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language