Sha256: 0de9b1469e2a597d4481a3a48a5b6410d1031d5e3b10e5c9aae74ea27b84aaf6

Contents?: true

Size: 526 Bytes

Versions: 10

Compression:

Stored size: 526 Bytes

Contents

# frozen_string_literal: true

module SolidusBolt
  module AddressDecorator
    def bolt_address(email)
      {
        street_address1: address1,
        street_address2: address2,
        locality: city,
        region: state.abbr,
        postal_code: zipcode,
        country_code: country.iso,
        first_name: Spree::Address::Name.new(name).first_name,
        last_name: Spree::Address::Name.new(name).last_name,
        phone: phone,
        email: email
      }
    end

    Spree::Address.prepend(self)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
solidus_bolt-0.7.2 app/decorators/models/solidus_bolt/address_decorator.rb
solidus_bolt-0.7.1 app/decorators/models/solidus_bolt/address_decorator.rb
solidus_bolt-0.7.0 app/decorators/models/solidus_bolt/address_decorator.rb
solidus_bolt-0.6.0 app/decorators/models/solidus_bolt/address_decorator.rb
solidus_bolt-0.5.0 app/decorators/models/solidus_bolt/address_decorator.rb
solidus_bolt-0.4.0 app/decorators/models/solidus_bolt/address_decorator.rb
solidus_bolt-0.3.0 app/decorators/models/solidus_bolt/address_decorator.rb
solidus_bolt-0.2.0 app/decorators/models/solidus_bolt/address_decorator.rb
solidus_bolt-0.1.0 app/decorators/models/solidus_bolt/address_decorator.rb
solidus_bolt-0.0.1 app/decorators/models/solidus_bolt/address_decorator.rb