Skip to content

Commit

Permalink
Merge pull request #14 from gadventures/declined-reason
Browse files Browse the repository at this point in the history
Declined reason
  • Loading branch information
bartek committed Jul 20, 2015
2 parents 36e318f + 4b9f2a8 commit 46201a0
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 11 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
History
-------

0.1.48 (2015-07-15)
-------------------

* Add DeclinedReason resource

0.1.47 (2015-07-08)
-------------------
Expand Down
2 changes: 1 addition & 1 deletion gapipy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

__version__ = '0.1.47'
__version__ = '0.1.48'
__title__ = 'gapipy'


Expand Down
51 changes: 41 additions & 10 deletions gapipy/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
Booking,
Customer,
Invoice,
DeclinedReason,
Document,
Nationality,
AccommodationService,
Expand Down Expand Up @@ -59,25 +60,55 @@

available_public_resources = [
# Tour
'Accommodation', 'Activity', 'Departure', 'Itinerary', 'Promotion',
'SingleSupplement', 'Tour', 'TourCategory', 'TourDossier', 'Transport',
'Accommodation',
'Activity',
'Departure',
'DepartureComponent',
'Itinerary',
'Promotion',
'SingleSupplement',
'Tour',
'TourCategory',
'TourDossier',
'Transport',

# Geographical
'Airport', 'Continent', 'Country', 'Feature', 'FeatureCategory', 'Place',
'State', 'Timezone',
'Airport',
'Continent',
'Country',
'Feature',
'FeatureCategory',
'Place',
'State',
'Timezone',

# Dossier
'AccommodationDossier', 'ActivityDossier', 'PlaceDossier', 'TransportDossier',

'AccommodationDossier',
'ActivityDossier',
'PlaceDossier',
'TransportDossier',
'Language',
]

available_private_resources = [
'Agency', 'Agent', 'Booking', 'Customer', 'Invoice', 'Document',
'Nationality', 'AccommodationService', 'ActivityService',
'DepartureService', 'FeeService', 'FlightService', 'InsuranceService',
'SingleSupplementService', 'TransportService', 'Payment', 'Refund',
'AccommodationService',
'ActivityService',
'Agency',
'Agent',
'Booking',
'Customer',
'DeclinedReason',
'DepartureService',
'Document',
'FeeService',
'FlightService',
'InsuranceService',
'Invoice',
'Nationality',
'Payment',
'Refund',
'SingleSupplementService',
'TransportService',
]

available_resources = available_public_resources + available_private_resources
1 change: 1 addition & 0 deletions gapipy/resources/booking/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from .agent import Agent
from .booking import Booking
from .customer import Customer
from .declined_reason import DeclinedReason
from .document import Invoice, Document
from .nationality import Nationality
from .service import (
Expand Down
7 changes: 7 additions & 0 deletions gapipy/resources/booking/declined_reason.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from gapipy.resources.base import Resource


class DeclinedReason(Resource):
_resource_name = 'declined_reasons'

_as_is_fields = ['id', 'href', 'service', 'channels', 'name']

0 comments on commit 46201a0

Please sign in to comment.