Sha256: 6338a44fdd3de7ec4f9a396ea307ae755954c4c1974ff95d410036caadc69047

Contents?: true

Size: 1.68 KB

Versions: 11

Compression:

Stored size: 1.68 KB

Contents

module GenesisRuby
  module Api
    module Mixins
      module Requests
        module Financial
          module Business
            # Mixin Hotels and Real Estate Rentals Attributes
            module HotelsAndRealEstateRentalsAttributes

              attr_accessor :business_travel_agency_name

              # The data when the customer check-in
              def business_check_in_date
                @business_check_in_date&.strftime(
                  GenesisRuby::Api::Constants::DateTimeFormats::DD_MM_YYYY_L_HYPHENS
                )
              end

              # The data when the customer check-in
              def business_check_in_date=(value)
                parse_date attribute: __method__, value: value, allow_empty: true
              end

              # The data when the customer check-out
              def business_check_out_date
                @business_check_out_date&.strftime(
                  GenesisRuby::Api::Constants::DateTimeFormats::DD_MM_YYYY_L_HYPHENS
                )
              end

              # The data when the customer check-out
              def business_check_out_date=(value)
                parse_date attribute: __method__, value: value, allow_empty: true
              end

              protected

              # Hotels and Real Estate Rentals Attributes Structure
              def hotels_and_real_estate_rentals_attributes_structure
                {
                  check_in_date:      business_check_in_date,
                  check_out_date:     business_check_out_date,
                  travel_agency_name: business_travel_agency_name
                }
              end

            end
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
genesis_ruby-0.2.0 lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb
genesis_ruby-0.1.9 lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb
genesis_ruby-0.1.8 lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb
genesis_ruby-0.1.7 lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb
genesis_ruby-0.1.6 lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb
genesis_ruby-0.1.5 lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb
genesis_ruby-0.1.4 lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb
genesis_ruby-0.1.3 lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb
genesis_ruby-0.1.2 lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb
genesis_ruby-0.1.1 lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb
genesis_ruby-0.1.0 lib/genesis_ruby/api/mixins/requests/financial/business/hotels_and_real_estate_rentals_attributes.rb