fastly-ruby icon indicating copy to clipboard operation
fastly-ruby copied to clipboard

ACL Entry - NEGATED constant not defined

Open bstewart00 opened this issue 1 year ago • 0 comments

Version 5.1.1 What happened Attempting to use this API results in a NameError

acl_entry_api.bulk_update_acl_entries({ service_id: 'service id', acl_id: 'acl-id', bulk_update_acl_entries_request: Fastly::BulkUpdateAclEntriesRequest.new(entries: [Fastly::BulkUpdateAclEntry.new(id: 'entry_id')]) })

NameError: uninitialized constant Fastly::BulkUpdateAclEntry::NEGATED

Workaround: define it in the calling application

  Fastly::NEGATED = Module.new unless Fastly.const_defined?(:NEGATED)
  unless Fastly::NEGATED.const_defined?(:N0)
    Fastly::NEGATED.const_set(:N0, false)
  end

bstewart00 avatar Jun 28 '23 06:06 bstewart00