Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `=~' for [:ReturnEnvelope, :Boolean]:Array (NoMethodError) #239

Open
elcous opened this issue Jan 25, 2025 · 0 comments
Open

Comments

@elcous
Copy link

elcous commented Jan 25, 2025

ETHON: Libcurl initialized
ETHON: performed EASY effective_url=https://api.lob.com/v1/letters response_code=200 return_code=ok total_time=0.519936
/Users/.../.local/share/mise/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/lob-6.0.9/lib/lob/models/letter.rb:609:in `block in build_from_hash': undefined method `=~' for [:ReturnEnvelope, :Boolean]:Array (NoMethodError)

to recreate

with test credentials Create a letter

def call
      letter_api = Lob::LettersApi.new
      response = letter_api.create(letter_params)
    end

    private

    def letter_params
      Lob::LetterEditable.new(
        description:,
        to: address_params(to_address),
        from: address_params(from_address),
        file: html_content,
        merge_variables:,
        color: false,
        use_type: 'operational'
      )
    end

    def address_params(address)
      # rubocop:disable Naming/VariableNumber
      Lob::AddressEditable.new(
        name: address.name,
        address_line1: address.street_address,
        address_line2: address.street_address_2,
        address_city: address.city,
        address_state: address.state,
        address_zip: address.zip_code
      )
      # rubocop:enable Naming/VariableNumber
    end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant