Sha256: 279730864b5bc258f7c9fa062771b51708e403dc031ff1b5120ec20621a6709b

Contents?: true

Size: 702 Bytes

Versions: 5

Compression:

Stored size: 702 Bytes

Contents

# frozen_string_literal: true

module WhatsappSdk
  module Resource
    class Address
      attr_accessor :street, :city, :state, :zip, :country, :country_code, :type

      def initialize(street:, city:, state:, zip:, country:, country_code:, type: AddressType::Home)
        @street = street
        @city = city
        @state = state
        @zip = zip
        @country = country
        @country_code = country_code
        @type = type
      end

      def to_h
        {
          street: @street,
          city: @city,
          state: @state,
          zip: @zip,
          country: @country,
          country_code: @country_code,
          type: @type
        }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
whatsapp_sdk-1.0.3 lib/whatsapp_sdk/resource/address.rb
whatsapp_sdk-1.0.2 lib/whatsapp_sdk/resource/address.rb
whatsapp_sdk-1.0.1 lib/whatsapp_sdk/resource/address.rb
whatsapp_sdk-1.0.0 lib/whatsapp_sdk/resource/address.rb
whatsapp_sdk-0.13.0 lib/whatsapp_sdk/resource/address.rb