示例#1
0
 class SimpleIO:
     input_required = (Date('date_from'), Date('date_to'),
                       Float('base_price'), Float('bed_price'))
     input_optional = (Boolean('published', default=False))
     output_optional = ('id', 'date_from', 'date_to', 'base_price',
                        'bed_price', 'published', 'days')
     skip_empty_keys = True
示例#2
0
 class SimpleIO:
     input_required = (Integer('id'))
     input_optional = (Integer('id_guest'), Integer('id_room'),
                       Integer('guests'), Date('check_in'),
                       Date('check_out'), DateTime('checked_in'),
                       DateTime('checked_out'), DateTime('cancelled'),
                       Float('base_price'), Float('taxes_percentage'),
                       Float('taxes_value'), Float('total_price'), 'status',
                       'meal_plan', Dict('extras'))
     output_optional = (
         'id',
         'id_guest',
         'id_room',
         DateTime('reserved'),
         'guests',
         Date('check_in'),
         Date('check_out'),
         DateTime('checked_in'),
         DateTime('checked_out'),
         DateTime('cancelled'),
         'base_price',
         'taxes_percentage',
         'taxes_value',
         'total_price',
         'locator',
         'pin',
         'status',
         'meal_plan',
         Dict('extras'),
         # 'uuid' # JSON serializaction error
         # https://forum.zato.io/t/returning-uuid-types-from-services-using-json/1735
         'nights')
     skip_empty_keys = True
示例#3
0
    class SimpleIO:
        input_required = (AsIs('should_as_is'), 'is_boolean', 'should_boolean',
                          CSV('csv1'), Dict('dict'), Float('float'),
                          Integer('integer'), Integer('integer2'),
                          List('list'), ListOfDicts('list_of_dicts'),
                          Unicode('unicode1'), Unicode('unicode2'), UTC('utc'))

        output_required = (AsIs('should_as_is'),
                           'is_boolean', 'should_boolean', CSV('csv1'),
                           CSV('csv2'), CSV('csv3'), Dict('dict'),
                           Float('float'), Integer('integer'),
                           Integer('integer2'), List('list'),
                           ListOfDicts('list_of_dicts'), Unicode('unicode1'),
                           Unicode('unicode2'), UTC('utc'))
示例#4
0
 class SimpleIO:
     input_required = (Integer('id'))
     input_optional = (Integer('floor_no'), Integer('room_no'), 'name',
                       Integer('sgl_beds'), Integer('dbl_beds'),
                       Float('supplement'))
     output_optional = ('id', 'floor_no', 'room_no', 'sgl_beds', 'dbl_beds',
                        'supplement', 'code', 'name', 'accommodates',
                        'number')
     skip_empty_keys = True
示例#5
0
    class SimpleIO:
        input_required = (AsIs('is_a'), Boolean('b'), Bool('c'), CSV('d'),
                          Dict('e'), Float('f'), Int('g'), Integer('h'),
                          List('i'), ListOfDicts('j'), Nested('k'),
                          Opaque('l'), Unicode('m'), UTC('n'))

        input_optional = (AsIs('is_aa'), Boolean('bb'), Bool('cc'), CSV('dd'),
                          Dict('ee'), Float('ff'), Int('gg'), Integer('hh'),
                          List('ii'), ListOfDicts('jj'), Nested('kk'),
                          Opaque('ll'), Unicode('mm'), UTC('nn'))

        output_required = (AsIs('is_aaa'), Boolean('bbb'), Bool('ccc'),
                           CSV('ddd'), Dict('eee'), Float('fff'), Int('ggg'),
                           Integer('hhh'), List('iii'), ListOfDicts('jjj'),
                           Nested('kkk'), Opaque('lll'), Unicode('mmm'),
                           UTC('nnn'))

        output_optional = (AsIs('is_aaaa'), Boolean('bbbb'), Bool('cccc'),
                           CSV('dddd'), Dict('eeee'), Float('ffff'),
                           Int('gggg'), Integer('hhhh'), List('iiii'),
                           ListOfDicts('jjjj'), Nested('kkkk'), Opaque('llll'),
                           Unicode('mmmm'), UTC('nnnn'))
示例#6
0
 class SimpleIO(AdminSIO):
     input_required = ('cluster_id', 'cache_id', 'key')
     output_required = (Bool('key_found'), )
     output_optional = ('key', 'value', 'is_key_integer',
                        'is_value_integer', Float('expiry'))
示例#7
0
 class SimpleIO(AdminSIO):
     input_required = ('cluster_id', 'cache_id', 'key', 'value',
                       Bool('replace_existing'))
     input_optional = ('key_data_type', 'value_data_type', Float('expiry'))
示例#8
0
 class SimpleIO(_BaseService.SimpleIO):
     input_optional = _BaseService.SimpleIO.input_optional + ('cache', 'value', 'details', Float('expiry'))
     output_optional = _BaseService.SimpleIO.output_optional + ('prev_value',)